Verified Commit 9528d598 authored by Camil Staps's avatar Camil Staps 🚀

Fixes for =:, records and constructors in patterns

parent 70707b5f
......@@ -186,9 +186,10 @@ function highlightClean(func, callback, start) {
],
funcargs: [
[/((?::=)?=)/, ['punctuation'], 'jump:rhs'],
[/([:\[\](),]+)/, ['punctuation']],
[/([:\[\](),{}=]+)/, ['punctuation']],
[/(\|)/, ['punctuation'], 'jump:guard'],
[/([^:\[\](),\s]+)/, ['argument']]
[/([A-Z][^:\[\](),{}=\s]+)/, ['constructor']],
[/([^:\[\](),{}=\s]+)/, ['argument']]
],
startConstructor: [ // alternative entry point in case this is a constructor
[/(\()(.*)(\))(\s*)(infix[lr]?)(\s*)(\d*)(\s*)(::)/,
......@@ -294,8 +295,9 @@ function highlightClean(func, callback, start) {
[/(\n[^\n\S]+)/, ['whitespace'], 'pop'],
[/(code\s+(?:inline\s*)?)({)/,
['keyword', 'punctuation'], 'abc'],
[/\b(if|let|in|with|case|of|otherwise)\b/,
[/\b(if|let|in|with|case|otherwise)\b/,
['keyword']],
[/\b(of)\b/, ['keyword'], 'funcargs'],
[/('[\w`]+'\.)/, ['qualifiedname']],
[/('(?:[^'\\]|\\(?:x[0-9a-fA-F]+|\d+|.))')/,
['literal literal-char']],
......
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