summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorjp2020-02-12 17:46:43 +0000
committerjp2020-02-12 17:46:43 +0000
commit31a65c9b7383d2a87da0fbcf5c265d533146ac23 (patch)
tree732e132c41aa568cb8c5f3bc8723e6c424a499bb /editors
parent2b2ab7a174384b87dc4bfda281383cad0058a1fa (diff)
improve syntax highlighting
Diffstat (limited to 'editors')
-rw-r--r--editors/html_syntax_highlighting/prism_sail.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/editors/html_syntax_highlighting/prism_sail.js b/editors/html_syntax_highlighting/prism_sail.js
index b27404f1..3300af6b 100644
--- a/editors/html_syntax_highlighting/prism_sail.js
+++ b/editors/html_syntax_highlighting/prism_sail.js
@@ -15,19 +15,17 @@ Prism.languages.sail = {
pattern: /(["])(?:\1\1|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
greedy: true
},
- 'operator': /:|->|==|!=|{\||\|}|=>|=|\+|-|@|\(\)|\(|\)|_|;|&|~|\.\.|,|\^|\*/,
+ 'operator': /:|->|==|!=|{\||\|}|=>|=|\+|-|@|\(\)|\(|\)|_|;|&|~|\.\.|,|\^|\*|\|/,
'keyword': [
{
- pattern: /(^|[^.])\b(type|union|register|function|clause|scattered|val|effect|end|true|false|let|if|then)\b/,
+ pattern: /(^|[^.])\b(type|union|register|function|clause|scattered|val|effect|end|true|false|let|if|then|else|match|as)\b/,
lookbehind: true
}
],
- //'builtin': /\b(?:fx|fy|xf[xy]?|yfx?)\b/,
'builtin': /\b[A-Z][A-Za-z_\-\/0-9']*/,
- 'variable': /\b'?[a-z_][A-Za-z_\-\/0-9']*/,
- //'function': /\b[a-z_]\w*(?:(?=\()|\/\d+)/,
+ 'variable': /\b[a-z_][A-Za-z_\-\/0-9']*/,
+ 'function': /\b'[a-z_][A-Za-z_\-\/0-9']*/,
'number': /\b0b\d+|\b\d+\.?\d*/,
- // Custom operators are allowed
'punctuation': /[(){}\[\],:]/
};