Verified Commit 00da34d9 authored by Camil Staps's avatar Camil Staps 🙂

Fix highlighting of record fields not followed by whitespace; special keyword...

Fix highlighting of record fields not followed by whitespace; special keyword in overloaded function signatures
parent 53b28eeb
......@@ -304,6 +304,7 @@ function highlightClean(func, callback, start) {
],
contextType: [
[/(\n)/, ['whitespace'], 'pop:2;macro'],
[/(special)/, ['keyword'], 'pop:2;special'],
[/(,)/, ['punctuation']],
[/(&)/, ['punctuation'], 'pop'],
[/(\[)/, ['punctuation'], 'attrenv'],
......@@ -490,7 +491,7 @@ function highlightClean(func, callback, start) {
[/(:)/, ['punctuation'], 'jump:typeDefRhs']
],
typeDefRecord: [
[/([a-z_][\w`]*)(\s+)(::)/,
[/([a-z_][\w`]*)(\s*)(::)/,
['field', 'whitespace', 'punctuation'], 'typeDefFieldType'],
[/(\})/, ['punctuation']]
],
......@@ -582,11 +583,12 @@ function highlightClean(func, callback, start) {
],
importSelectionsInstanceType: [
[/(,)/, function (m) { return paren_depth == 0 ? [['punctuation'], 'pop'] : [['punctuation']]; }],
[/([\(\[])/, function (m) { paren_depth++; return [['punctuation'], 'importSelectionsInstanceType']; }],
[/([\)\]])/, function (m) { paren_depth--; return [['punctuation'], 'pop']; }],
[/([\(\[{])/, function (m) { paren_depth++; return [['punctuation'], 'importSelectionsInstanceType']; }],
[/([\)\]}])/, function (m) { paren_depth--; return [['punctuation'], 'pop']; }],
[/([a-z][\w`]*)/, ['typevar']],
[/([A-Z_][\w`]*)/, ['type']],
[/([^\s\(\)\[\],]+)/, ['typevar']]
[/([^\s\(\)\[\]{}#!,]+)/, ['typevar']],
[/([#!]+)/, ['punctuation']]
],
importSelectionsTypeDef: [
[/(,)([\s\n]*)/, ['punctuation', 'whitespace'], 'pop'],
......
-----
trace :: !msg .a -> .a | toString msg special msg={#Char}; msg=Int
-----
funcname trace
whitespace
punctuation ::
whitespace
punctuation !
typevar msg
whitespace
punctuation .
typevar a
whitespace
punctuation ->
whitespace
punctuation .
typevar a
whitespace
punctuation |
whitespace
classname toString
whitespace
typevar msg
whitespace
keyword special
whitespace
typevar msg
punctuation ={#
type Char
punctuation };
whitespace
typevar msg
punctuation =
type Int
-----
from StdString import instance toString {#Char},instance toString Int
-----
keyword from
whitespace
modulename StdString
whitespace
keyword import
whitespace
keyword instance
whitespace
classname toString
whitespace
punctuation {#
type Char
punctuation },
keyword instance
whitespace
classname toString
whitespace
type Int
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment