Hash :
e2630d89
Author :
Date :
2021-09-26T11:52:18
Prism.languages.monkey = {
'string': /"[^"\r\n]*"/,
'comment': [
{
pattern: /^#Rem\s[\s\S]*?^#End/im,
greedy: true
},
{
pattern: /'.+/,
greedy: true
}
],
'preprocessor': {
pattern: /(^[ \t]*)#.+/m,
lookbehind: true,
alias: 'comment'
},
'function': /\b\w+(?=\()/,
'type-char': {
pattern: /(\w)[?%#$]/,
lookbehind: true,
alias: 'variable'
},
'number': {
pattern: /((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+(?:(?!\.\.)\.\d*)?|\$[\da-f]+)/i,
lookbehind: true
},
'keyword': /\b(?:Abstract|Array|Bool|Case|Catch|Class|Const|Continue|Default|Eachin|Else|ElseIf|End|EndIf|Exit|Extends|Extern|False|Field|Final|Float|For|Forever|Function|Global|If|Implements|Import|Inline|Int|Interface|Local|Method|Module|New|Next|Null|Object|Private|Property|Public|Repeat|Return|Select|Self|Step|Strict|String|Super|Then|Throw|To|True|Try|Until|Void|Wend|While)\b/i,
'operator': /\.\.|<[=>]?|>=?|:?=|(?:[+\-*\/&~|]|\b(?:Mod|Shl|Shr)\b)=?|\b(?:And|Not|Or)\b/i,
'punctuation': /[.,:;()\[\]]/
};