main
Last change
on this file since e48199a was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | 'use strict'
|
---|
2 |
|
---|
3 | module.exports = qore
|
---|
4 | qore.displayName = 'qore'
|
---|
5 | qore.aliases = []
|
---|
6 | function qore(Prism) {
|
---|
7 | Prism.languages.qore = Prism.languages.extend('clike', {
|
---|
8 | comment: {
|
---|
9 | pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/|#).*)/,
|
---|
10 | lookbehind: true
|
---|
11 | },
|
---|
12 | // Overridden to allow unescaped multi-line strings
|
---|
13 | string: {
|
---|
14 | pattern: /("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,
|
---|
15 | greedy: true
|
---|
16 | },
|
---|
17 | keyword:
|
---|
18 | /\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/,
|
---|
19 | boolean: /\b(?:false|true)\b/i,
|
---|
20 | function: /\$?\b(?!\d)\w+(?=\()/,
|
---|
21 | number:
|
---|
22 | /\b(?:0b[01]+|0x(?:[\da-f]*\.)?[\da-fp\-]+|(?:\d+(?:\.\d+)?|\.\d+)(?:e\d+)?[df]|(?:\d+(?:\.\d+)?|\.\d+))\b/i,
|
---|
23 | operator: {
|
---|
24 | pattern:
|
---|
25 | /(^|[^.])(?:\+[+=]?|-[-=]?|[!=](?:==?|~)?|>>?=?|<(?:=>?|<=?)?|&[&=]?|\|[|=]?|[*\/%^]=?|[~?])/,
|
---|
26 | lookbehind: true
|
---|
27 | },
|
---|
28 | variable: /\$(?!\d)\w+\b/
|
---|
29 | })
|
---|
30 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.