Verified Commit 644ab3ff authored by Camil Staps's avatar Camil Staps 🚀

Fix highlighting of negative integers/reals

parent 00da34d9
......@@ -335,13 +335,12 @@ function highlightClean(func, callback, start) {
[/(otherwise)/, ['keyword']],
[/('(?:[^'\\]|\\(?:x[0-9a-fA-F]+|\d+|.))')/,
['literal literal-char']],
[/\b([+~-]?\d+\.\d+(?:E[+-]?\d+)?)\b/,
[/([+~-]?\d+\.\d+(?:E[+-]?\d+)?)\b/,
['literal literal-real']],
[/\b([+~-]?0[0-7]+)\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/,
[/([+~-]?\d+)\b/,['literal literal-int literal-int-dec']],
[/([+~-]?0x[\da-fA-F]+)\b/,
['literal literal-int literal-int-hex']],
[/\b(True|False)\b/,
['literal literal-bool']],
......@@ -445,11 +444,10 @@ function highlightClean(func, callback, start) {
[/(\|.*\n)/, ['comment'], 'pop'],
[/('(?:[^'\\]|\\(?:x[0-9a-fA-F]+|\d+|.))')/,
['literal literal-char']],
[/\b([+~-]?\d+\.\d+(?:E[+-]?\d+)?)\b/,
[/([+~-]?\d+\.\d+(?:E[+-]?\d+)?)\b/,
['literal literal-real']],
[/\b([+~-]?\d+)\b/,
['literal literal-int literal-int-dec']],
[/\b([+~-]?0x[\da-fA-F]+)\b/,
[/([+~-]?\d+)\b/,['literal literal-int literal-int-dec']],
[/([+~-]?0x[\da-fA-F]+)\b/,
['literal literal-int literal-int-hex']],
[/\b(TRUE|FALSE)\b/,
['literal literal-bool']],
......
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