main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[d24f17c] | 1 | Prism.languages.qore = Prism.languages.extend('clike', {
|
---|
| 2 | 'comment': {
|
---|
| 3 | pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/|#).*)/,
|
---|
| 4 | lookbehind: true
|
---|
| 5 | },
|
---|
| 6 | // Overridden to allow unescaped multi-line strings
|
---|
| 7 | 'string': {
|
---|
| 8 | pattern: /("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,
|
---|
| 9 | greedy: true
|
---|
| 10 | },
|
---|
| 11 | 'keyword': /\b(?:abstract|any|assert|binary|bool|boolean|break|byte|case|catch|char|class|code|const|continue|data|default|do|double|else|enum|extends|final|finally|float|for|goto|hash|if|implements|import|inherits|instanceof|int|interface|long|my|native|new|nothing|null|object|our|own|private|reference|rethrow|return|short|soft(?:bool|date|float|int|list|number|string)|static|strictfp|string|sub|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/,
|
---|
| 12 | 'boolean': /\b(?:false|true)\b/i,
|
---|
| 13 | 'function': /\$?\b(?!\d)\w+(?=\()/,
|
---|
| 14 | 'number': /\b(?:0b[01]+|0x(?:[\da-f]*\.)?[\da-fp\-]+|(?:\d+(?:\.\d+)?|\.\d+)(?:e\d+)?[df]|(?:\d+(?:\.\d+)?|\.\d+))\b/i,
|
---|
| 15 | 'operator': {
|
---|
| 16 | pattern: /(^|[^.])(?:\+[+=]?|-[-=]?|[!=](?:==?|~)?|>>?=?|<(?:=>?|<=?)?|&[&=]?|\|[|=]?|[*\/%^]=?|[~?])/,
|
---|
| 17 | lookbehind: true
|
---|
| 18 | },
|
---|
| 19 | 'variable': /\$(?!\d)\w+\b/
|
---|
| 20 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.