UNPKG

1.9 kBJavaScriptView Raw
1Prism.languages.io = {
2 'comment': [
3 {
4 pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
5 lookbehind: true
6 },
7 {
8 pattern: /(^|[^\\])\/\/.*/,
9 lookbehind: true
10 },
11 {
12 pattern: /(^|[^\\])#.*/,
13 lookbehind: true
14 }
15 ],
16 'triple-quoted-string': {
17 pattern: /"""(?:\\[\s\S]|(?!""")[^\\])*"""/,
18 greedy: true,
19 alias: 'string'
20 },
21 'string': {
22 pattern: /"(?:\\.|[^\\\r\n"])*"/,
23 greedy: true
24 },
25 'keyword': /\b(?:activate|activeCoroCount|asString|block|break|catch|clone|collectGarbage|compileString|continue|do|doFile|doMessage|doString|else|elseif|exit|for|foreach|forward|getSlot|getEnvironmentVariable|hasSlot|if|ifFalse|ifNil|ifNilEval|ifTrue|isActive|isNil|isResumable|list|message|method|parent|pass|pause|perform|performWithArgList|print|println|proto|raise|raiseResumable|removeSlot|resend|resume|schedulerSleepSeconds|self|sender|setSchedulerSleepSeconds|setSlot|shallowCopy|slotNames|super|system|then|thisBlock|thisContext|call|try|type|uniqueId|updateSlot|wait|while|write|yield)\b/,
26 'builtin':/\b(?:Array|AudioDevice|AudioMixer|Block|Box|Buffer|CFunction|CGI|Color|Curses|DBM|DNSResolver|DOConnection|DOProxy|DOServer|Date|Directory|Duration|DynLib|Error|Exception|FFT|File|Fnmatch|Font|Future|GL|GLE|GLScissor|GLU|GLUCylinder|GLUQuadric|GLUSphere|GLUT|Host|Image|Importer|LinkList|List|Lobby|Locals|MD5|MP3Decoder|MP3Encoder|Map|Message|Movie|Notification|Number|Object|OpenGL|Point|Protos|Regex|SGML|SGMLElement|SGMLParser|SQLite|Server|Sequence|ShowMessage|SleepyCat|SleepyCatCursor|Socket|SocketManager|Sound|Soup|Store|String|Tree|UDPSender|UPDReceiver|URL|User|Warning|WeakLink|Random|BigNum)\b/,
27 'boolean': /\b(?:true|false|nil)\b/,
28 'number': /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e-?\d+)?/i,
29 'operator': /[=!*/%+\-^&|]=|>>?=?|<<?=?|:?:?=|\+\+?|--?|\*\*?|\/\/?|%|\|\|?|&&?|\b(?:return|and|or|not)\b|@@?|\?\??|\.\./,
30 'punctuation': /[{}[\];(),.:]/
31};