main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
913 bytes
|
Line | |
---|
1 | Prism.languages.warpscript = {
|
---|
2 | 'comment': /#.*|\/\/.*|\/\*[\s\S]*?\*\//,
|
---|
3 | 'string': {
|
---|
4 | pattern: /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'|<'(?:[^\\']|'(?!>)|\\.)*'>/,
|
---|
5 | greedy: true
|
---|
6 | },
|
---|
7 | 'variable': /\$\S+/,
|
---|
8 | 'macro': {
|
---|
9 | pattern: /@\S+/,
|
---|
10 | alias: 'property'
|
---|
11 | },
|
---|
12 | // WarpScript doesn't have any keywords, these are all functions under the control category
|
---|
13 | // https://www.warp10.io/tags/control
|
---|
14 | 'keyword': /\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/,
|
---|
15 | 'number': /[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/,
|
---|
16 | 'boolean': /\b(?:F|T|false|true)\b/,
|
---|
17 | 'punctuation': /<%|%>|[{}[\]()]/,
|
---|
18 | // Some operators from the "operators" category
|
---|
19 | // https://www.warp10.io/tags/operators
|
---|
20 | 'operator': /==|&&?|\|\|?|\*\*?|>>>?|<<|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/
|
---|
21 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.