Verified Commit 70707b5f authored by Camil Staps's avatar Camil Staps 🙂

Fixes for = on new line; infix class definitions

parent ddcef175
......@@ -178,6 +178,7 @@ function highlightClean(func, callback, start) {
[/(=>)/, ['punctuation']],
[/(")/, ['literal literal-string'], 'string'],
[/(\|)/, ['punctuation'], 'guard'],
[/(=)/, ['punctuation'], 'rhs'],
[/([^\(\)\s]+)/, ['funcname'], 'funcargs']
],
moduleName: [
......@@ -190,10 +191,10 @@ function highlightClean(func, callback, start) {
[/([^:\[\](),\s]+)/, ['argument']]
],
startConstructor: [ // alternative entry point in case this is a constructor
[/(\()(.*)(\))(infix[lr]?)(\s*)(\d*)(\s*)(::)/,
['punctuation', 'constructor', 'punctuation', 'keyword',
'whitespace', 'keyword', 'whitespace', 'punctuation'],
'type'],
[/(\()(.*)(\))(\s*)(infix[lr]?)(\s*)(\d*)(\s*)(::)/,
['punctuation', 'constructor', 'punctuation',
'whitespace', 'keyword', 'whitespace', 'keyword',
'whitespace', 'punctuation'], 'type'],
[/(.*)(::)/, ['constructor', 'punctuation'], 'type']
],
startRecordField: [ // alternative entry point in case this is a record field
......@@ -331,11 +332,14 @@ function highlightClean(func, callback, start) {
[/(\S+)/, ['classname'], 'jump:macro;type'],
],
className: [
[/(\()(.*)(\))(\s*)(infix[lr]?)(\s*)(\d*)(\s*)/,
['punctuation', 'classname', 'punctuation', 'whitespace',
'keyword', 'whitespace', 'keyword', 'whitespace'],
'jump:classHeading'],
[/(\S+)/, ['classname'], 'jump:classHeading']
],
classHeading: [
[/(\n)/, ['whitespace'], 'pop'],
[/(class)/, ['keyword'], 'className'],
[/(where)/, ['keyword'], 'pop'],
[/([a-z][\w`]*)/, ['typevar']],
[/(~)/, ['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