v0.1.19: fix #11: don't recognise :: on new line as part of a typespec in where blocks

parent 0f3ab588
Pipeline #16291 passed with stage
in 23 seconds
......@@ -367,7 +367,7 @@ var highlightRules = {
['punctuation', 'whitespace', 'literal literal-char'], 'charlist'],
[/(\(.+\)\s+infix.*)/,
['__type__']],
[/([\w`]+\s*::.*)/,
[/([\w`]+\s*(?<!\n)::.*)/,
['__type__']],
[/([A-Z][\w`]*)/,['constructor']],
[/\b(_)\b/, ['argument argument-wildcard']],
......
{
"name": "clean-highlighter",
"version": "0.1.18",
"version": "0.1.19",
"description": "Clean language highlighter",
"keywords": ["clean","highlighter"],
"main": "clean.js",
......
-----
assign :: !TaskAttributes !(Task a) -> Task a | iTask a
assign attr task = task
where
result (Value [_,(_,v)] _) = v
result _ = NoValue
:: ProcessControlView = { assignedTo :: !String
, firstWorkedOn :: !Maybe DateTime
, lastWorkedOn :: !Maybe DateTime
, taskStatus :: !String
}
-----
funcname assign
whitespace
punctuation ::
whitespace
punctuation !
type TaskAttributes
whitespace
punctuation !(
type Task
whitespace
typevar a
punctuation )
whitespace
punctuation ->
whitespace
type Task
whitespace
typevar a
whitespace
punctuation |
whitespace
classname iTask
whitespace
typevar a
whitespace \n
funcname assign
whitespace
argument attr
whitespace
argument task
whitespace
punctuation =
whitespace
argumentinrhs task
whitespace \n
keyword where
whitespace \n
funcname result
whitespace
punctuation (
constructor Value
whitespace
punctuation [
argument _
punctuation ,(
argument _
punctuation ,
argument v
punctuation )]
whitespace
argument _
punctuation )
whitespace
punctuation =
whitespace
argumentinrhs v
whitespace \n
funcname result
whitespace
argument _
whitespace
punctuation =
whitespace
constructor NoValue
whitespace \n\n
punctuation ::
whitespace
type ProcessControlView
whitespace
punctuation =
whitespace
punctuation {
whitespace
field assignedTo
whitespace
punctuation ::
whitespace
punctuation !
type String
whitespace \n
punctuation ,
whitespace
field firstWorkedOn
whitespace
punctuation ::
whitespace
punctuation !
type Maybe
whitespace
type DateTime
whitespace \n
punctuation ,
whitespace
field lastWorkedOn
whitespace
punctuation ::
whitespace
punctuation !
type Maybe
whitespace
type DateTime
whitespace \n
punctuation ,
whitespace
field taskStatus
whitespace
punctuation ::
whitespace
punctuation !
type String
whitespace \n
punctuation }
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