Verified Commit 5f3ded7d authored by Camil Staps's avatar Camil Staps 🚀

v0.1.27: fix highlighting of explicit types for instances with a type context

parent fa631104
Pipeline #41771 passed with stage
in 48 seconds
......@@ -301,6 +301,7 @@ var highlightRules = {
contextType: [
[/(special)/, ['keyword'], 'pop:2;special'],
[/(where)/, ['keyword'], 'pop:3'],
[/(::)/, ['punctuation'], 'pop:2'],
[/([,;])/, ['punctuation']],
[/(&)/, ['punctuation'], 'pop'],
[/(\[)/, ['punctuation'], 'attrenv'],
......
{
"name": "clean-highlighter",
"version": "0.1.26",
"version": "0.1.27",
"description": "Clean language highlighter",
"keywords": ["clean","highlighter"],
"main": "clean.js",
......
-----
instance == () :: !() !() -> Bool :== code { pop_a 2 ; pushB TRUE }
instance == (a,b) | Eq a & Eq b :: !(!a,b) !(!a,b) -> Bool | Eq a & Eq b
-----
keyword instance
whitespace
classname ==
whitespace
type ()
whitespace
punctuation ::
whitespace
punctuation !
type ()
whitespace
punctuation !
type ()
whitespace
punctuation ->
whitespace
type Bool
whitespace
punctuation :==
whitespace
keyword code
whitespace
punctuation {
whitespace
abc-instruction pop_a
whitespace
literal literal-int literal-int-dec 2
whitespace
punctuation ;
whitespace
abc-instruction pushB
whitespace
literal literal-bool TRUE
whitespace
punctuation }
whitespace \n
keyword instance
whitespace
classname ==
whitespace
punctuation (
typevar a
punctuation ,
typevar b
punctuation )
whitespace
punctuation |
whitespace
classname Eq
whitespace
typevar a
whitespace
punctuation &
whitespace
classname Eq
whitespace
typevar b
whitespace
punctuation ::
whitespace
punctuation !(!
typevar a
punctuation ,
typevar b
punctuation )
whitespace
punctuation !(!
typevar a
punctuation ,
typevar b
punctuation )
whitespace
punctuation ->
whitespace
type Bool
whitespace
punctuation |
whitespace
classname Eq
whitespace
typevar a
whitespace
punctuation &
whitespace
classname Eq
whitespace
typevar b
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