1 | Prism.languages.monkey = {
|
2 | 'string': /"[^"\r\n]*"/,
|
3 | 'comment': [
|
4 | {
|
5 | pattern: /^#Rem\s+[\s\S]*?^#End/im,
|
6 | greedy: true
|
7 | },
|
8 | {
|
9 | pattern: /'.+/,
|
10 | greedy: true
|
11 | }
|
12 | ],
|
13 | 'preprocessor': {
|
14 | pattern: /(^[ \t]*)#.+/m,
|
15 | lookbehind: true,
|
16 | alias: 'comment'
|
17 | },
|
18 | 'function': /\w+(?=\()/,
|
19 | 'type-char': {
|
20 | pattern: /(\w)[?%#$]/,
|
21 | lookbehind: true,
|
22 | alias: 'variable'
|
23 | },
|
24 | 'number': {
|
25 | pattern: /((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+(?:(?!\.\.)\.\d*)?|\$[\da-f]+)/i,
|
26 | lookbehind: true
|
27 | },
|
28 | 'keyword': /\b(?:Void|Strict|Public|Private|Property|Bool|Int|Float|String|Array|Object|Continue|Exit|Import|Extern|New|Self|Super|Try|Catch|Eachin|True|False|Extends|Abstract|Final|Select|Case|Default|Const|Local|Global|Field|Method|Function|Class|End|If|Then|Else|ElseIf|EndIf|While|Wend|Repeat|Until|Forever|For|To|Step|Next|Return|Module|Interface|Implements|Inline|Throw|Null)\b/i,
|
29 | 'operator': /\.\.|<[=>]?|>=?|:?=|(?:[+\-*\/&~|]|\b(?:Mod|Shl|Shr)\b)=?|\b(?:And|Not|Or)\b/i,
|
30 | 'punctuation': /[.,:;()\[\]]/
|
31 | }; |
\ | No newline at end of file |