Verified Commit ba6a4042 authored by Camil Staps's avatar Camil Staps 🙂

Add support for special keyword

parent f4974f8f
......@@ -214,6 +214,7 @@ function highlightFunction(func, callback, start) {
[/([\w`]+\s*::.*)/,
['__type__']],
[/\b(where|with)\b/, ['keyword'], 'pop;macro'],
[/(special)(\s)/,['keyword', 'whitespace'], 'special'],
[/(\()(\S+)(\))/, ['punctuation', 'funcname', 'punctuation'], 'macroargs'],
[/(\S+)/, ['funcname'], 'macroargs']
],
......@@ -278,6 +279,11 @@ function highlightFunction(func, callback, start) {
[/([\w`]+)/, ['funcname funcname-onlyused']],
[/(.)/, ['punctuation']]
],
special: [
[/(\s+)/, ['whitespace']],
[/([a-z][\w`]*)/,['typevar']],
[/(=)/, ['punctuation'], 'type']
],
string: [
[/(")/, ['literal literal-string'], 'pop'],
[/(\\.)/, ['literal literal-string']],
......
Function
-----
sort :: !u:[a] -> u:[a] | Ord a
special
a = Char
a = Int
a = Real
-----
funcname sort
whitespace
punctuation ::
whitespace
punctuation !
typevar u
punctuation :[
typevar a
punctuation ]
whitespace
punctuation ->
whitespace
typevar u
punctuation :[
typevar a
punctuation ]
whitespace
punctuation |
whitespace
classname Ord
whitespace
typevar a
whitespace \n
keyword special
whitespace \n
typevar a
whitespace
punctuation =
whitespace
type Char
whitespace \n
typevar a
whitespace
punctuation =
whitespace
type Int
whitespace \n
typevar a
whitespace
punctuation =
whitespace
type Real
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