Cleanup

parent 6e2fb85a
......@@ -168,32 +168,32 @@ var highlightRules = {
],
start: [
[/(generic)(\s)/,
['keyword', 'whitespace'], 'generic'],
['keyword', 'whitespace'], 'generic'],
[/(import)(\s)/, ['keyword', 'whitespace'], 'import'],
[/(from)(\s)/, ['keyword', 'whitespace'], 'importFrom'],
[/(where\b)/, ['keyword']],
[/((?:(?:definition|implementation|system)\s+)?module\b)/,
['keyword'], 'moduleName'],
['keyword'], 'moduleName'],
[/(instance)(\s)/, ['keyword', 'whitespace'], 'instance'],
[/(derive)(\s+)(class)/, ['keyword', 'whitespace', 'keyword'], 'deriveClass'],
[/(derive)(\s)/, ['keyword', 'whitespace'], 'derive'],
[/(class)(\s)/, ['keyword', 'whitespace'], 'className'],
[/(::)/, ['punctuation'], 'typeDefName'],
[/(\S+)(\s+)(::)/,
['funcname', 'whitespace', 'punctuation'], 'type'],
['funcname', 'whitespace', 'punctuation'], 'type'],
[/(\()(\S+)(\))(\s*)(infix[rl]?)(\s*)(\d*)(\s*)(::)/,
['punctuation', 'funcname', 'punctuation', 'whitespace',
'keyword', 'whitespace', 'keyword', 'whitespace',
'punctuation']
, 'type'],
['punctuation', 'funcname', 'punctuation', 'whitespace',
'keyword', 'whitespace', 'keyword', 'whitespace',
'punctuation']
, 'type'],
[/(\()(\S+)(\))(\s+)(infix[rl]?)(\s*)(\d*)/,
['punctuation', 'funcname', 'punctuation', 'whitespace',
'keyword', 'whitespace', 'keyword']],
['punctuation', 'funcname', 'punctuation', 'whitespace',
'keyword', 'whitespace', 'keyword']],
[/(\()(\S+)(\))/,['punctuation', 'funcname', 'punctuation'], 'funcargs'],
[/(infix[rl]?)(\s+)(\d*)/,
['keyword', 'whitespace', 'keyword']],
['keyword', 'whitespace', 'keyword']],
[/(foreign export(?: (?:c|std)call)?)/,
['keyword']],
['keyword']],
[/([\(\)])/, ['punctuation']],
[/(::)/, ['punctuation'], 'type'],
[/([{};])/, ['punctuation']],
......@@ -223,9 +223,9 @@ var highlightRules = {
],
startConstructor: [ // alternative entry point in case this is a constructor
[/(\()(.*)(\))(\s*)(infix[lr]?)(\s*)(\d*)(\s*)(::)/,
['punctuation', 'constructor', 'punctuation',
'whitespace', 'keyword', 'whitespace', 'keyword',
'whitespace', 'punctuation'], 'type'],
['punctuation', 'constructor', 'punctuation',
'whitespace', 'keyword', 'whitespace', 'keyword',
'whitespace', 'punctuation'], 'type'],
[/(.*)(::)/, ['constructor', 'punctuation'], 'type']
],
startRecordField: [ // alternative entry point in case this is a record field
......@@ -316,9 +316,9 @@ var highlightRules = {
],
macro: [
[/(\(.+\)\s+infix.*)/,
['__type__']],
['__type__']],
[/([\w`]+\s*::.*)/,
['__type__']],
['__type__']],
[/\b(where|with)\b/, ['keyword'], 'jump:macro'],
[/(special)(\s)/,['keyword', 'whitespace'], 'special'],
[/(\()(\S+)(\))/, ['punctuation', 'funcname', 'punctuation'], 'funcargs'],
......@@ -454,16 +454,16 @@ var highlightRules = {
[/(\n)/, ['whitespace'], 'pop'],
[/(\|.*\n)/, ['comment'], 'pop'],
[/('(?:[^'\\]|\\(?:x[0-9a-fA-F]+|\d+|.))')/,
['literal literal-char']],
['literal literal-char']],
[/([+~-]?\d+\.\d+(?:E[+-]?\d+)?)\b/,
['literal literal-real']],
['literal literal-real']],
[/([+~-]?\d+E[+-]?\d+)\b/,
['literal literal-real']],
[/([+~-]?\d+)\b/,['literal literal-int literal-int-dec']],
[/([+~-]?0x[\da-fA-F]+)\b/,
['literal literal-int literal-int-hex']],
['literal literal-int literal-int-hex']],
[/\b(TRUE|FALSE)\b/,
['literal literal-bool']],
['literal literal-bool']],
[/(")/, ['literal literal-string'], 'string'],
[/(\S+)/, ['abc-argument']]
],
......@@ -504,7 +504,7 @@ var highlightRules = {
],
typeDefRecord: [
[/([a-z_][\w`]*)(\s*)(::)/,
['field', 'whitespace', 'punctuation'], 'typeDefFieldType'],
['field', 'whitespace', 'punctuation'], 'typeDefFieldType'],
[/(\})/, ['punctuation']]
],
typeDefFieldType: [
......@@ -526,13 +526,13 @@ var highlightRules = {
[/(E)(\.)/, ['existential', 'punctuation'], 'quantifiedVariables'],
[/([A-Z_][\w`]*)/, ['constructor'], 'typeDefConsArgs'],
[/(\()([~@#\$%\^\?!\+\-\*<>\\\/\|&=:]*)(\))/,
['punctuation', 'constructor', 'punctuation'],
'typeDefConsArgs'],
['punctuation', 'constructor', 'punctuation'],
'typeDefConsArgs'],
[/(\.\.)/, ['punctuation']]
],
typeDefConsArgs: [
[/(infix[lr]?)(\s*)(\d*)(\s+)/,
['keyword', 'whitespace', 'keyword', 'whitespace']],
['keyword', 'whitespace', 'keyword', 'whitespace']],
[/([a-z][\w`]*)/, ['typevar']],
[/(A)(\.)/, ['existential', 'punctuation'], 'quantifiedVariables'],
[/([A-Z][\w`]*)/, ['type']],
......
......@@ -55,9 +55,6 @@ function parseTestCase(name, contents) {
return testcase;
}
function resultsAreEqual(expected, actual) {
}
function parseResult(result) {
var parsedResult = '';
result = JSDOM.fragment(result);
......
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