Verified Commit f3d56551 authored by Camil Staps's avatar Camil Staps 🙂

Fix highlighting of literal Reals

parent 2e3dedb0
......@@ -238,14 +238,14 @@ function highlightFunction(func, callback, start) {
[/(otherwise)/, ['keyword']],
[/('(?:[^'\\]|\\(?:x[0-9a-fA-F]+|\d+|.))')/,
['literal literal-char']],
[/\b([+~-]?\d+\.\d+(?:E[+-]?\d+)?)\b/,
['literal literal-real']],
[/\b([+~-]?0[0-7]+)\b/,
['literal literal-int literal-int-oct']],
[/\b([+~-]?\d+)\b/,
['literal literal-int literal-int-dec']],
[/\b([+~-]?0x[\da-fA-F]+)\b/,
['literal literal-int literal-int-hex']],
[/\b([+~-]?\d+\.\d+(E[+-]?\d+)?)\b/,
['literal literal-real']],
[/\b(True|False)\b/,
['literal literal-bool']],
[/(")/, ['literal literal-string'], 'string'],
......@@ -266,14 +266,14 @@ function highlightFunction(func, callback, start) {
[/('[\w`]+'\.)/, ['qualifiedname']],
[/('(?:[^'\\]|\\(?:x[0-9a-fA-F]+|\d+|.))')/,
['literal literal-char']],
[/\b([+~-]?\d+\.\d+(?:E[+-]?\d+)?)\b/,
['literal literal-real']],
[/\b([+~-]?0[0-7]+)\b/,
['literal literal-int literal-int-oct']],
[/\b([+~-]?\d+)\b/,
['literal literal-int literal-int-dec']],
[/\b([+~-]?0x[\da-fA-F]+)\b/,
['literal literal-int literal-int-hex']],
[/\b([+~-]?\d+\.\d+(E[+-]?\d+)?)\b/,
['literal literal-real']],
[/\b(True|False)\b/,
['literal literal-bool']],
[/(")/, ['literal literal-string'], 'string'],
......@@ -357,12 +357,12 @@ function highlightFunction(func, callback, start) {
[/(\|.*\n)/, ['comment'], 'pop'],
[/('(?:[^'\\]|\\(?:x[0-9a-fA-F]+|\d+|.))')/,
['literal literal-char']],
[/\b([+~-]?\d+\.\d+(?:E[+-]?\d+)?)\b/,
['literal literal-real']],
[/\b([+~-]?\d+)\b/,
['literal literal-int literal-int-dec']],
[/\b([+~-]?0x[\da-fA-F]+)\b/,
['literal literal-int literal-int-hex']],
[/\b([+~-]?\d+\.\d+(E[+-]?\d+)?)\b/,
['literal literal-real']],
[/\b(TRUE|FALSE)\b/,
['literal literal-bool']],
[/(")/, ['literal literal-string'], 'string'],
......
Function
-----
instance zero Real where zero = 0.0
-----
keyword instance
whitespace
classname zero
whitespace
type Real
whitespace
keyword where
whitespace
funcname zero
whitespace
punctuation =
whitespace
literal literal-real 0.0
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