diff options
Diffstat (limited to 'editors')
| -rw-r--r-- | editors/html_syntax_highlighting/prism_sail.js | 10 |
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': /[(){}\[\],:]/ }; |
