1 | Prism.languages.peoplecode = {
|
2 | 'comment': RegExp([
|
3 |
|
4 | /\/\*[\s\S]*?\*\
|
5 |
|
6 | /\bREM[^;]*;/.source,
|
7 |
|
8 | /<\*(?:[^<*]|\*(?!>)|<(?!\*)|<\*(?:(?!\*>)[\s\S])*\*>)*\*>/.source,
|
9 | // /+ +/ comments
|
10 | /\/\+[\s\S]*?\+\//.source,
|
11 | ].join('|')),
|
12 | 'string': {
|
13 | pattern: /'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,
|
14 | greedy: true
|
15 | },
|
16 | 'variable': /%\w+/,
|
17 | 'function-definition': {
|
18 | pattern: /((?:^|[^\w-])(?:function|method)\s+)\w+/i,
|
19 | lookbehind: true,
|
20 | alias: 'function'
|
21 | },
|
22 | 'class-name': {
|
23 | pattern: /((?:^|[^-\w])(?:as|catch|class|component|create|extends|global|implements|instance|local|of|property|returns)\s+)\w+(?::\w+)*/i,
|
24 | lookbehind: true,
|
25 | inside: {
|
26 | 'punctuation': /:/
|
27 | }
|
28 | },
|
29 | 'keyword': /\b(?:abstract|alias|as|catch|class|component|constant|create|declare|else|end-(?:class|evaluate|for|function|get|if|method|set|try|while)|evaluate|extends|for|function|get|global|if|implements|import|instance|library|local|method|null|of|out|peopleCode|private|program|property|protected|readonly|ref|repeat|returns?|set|step|then|throw|to|try|until|value|when(?:-other)?|while)\b/i,
|
30 | 'operator-keyword': {
|
31 | pattern: /\b(?:and|not|or)\b/i,
|
32 | alias: 'operator'
|
33 | },
|
34 | 'function': /[_a-z]\w*(?=\s*\()/i,
|
35 |
|
36 | 'boolean': /\b(?:false|true)\b/i,
|
37 | 'number': /\b\d+(?:\.\d+)?\b/,
|
38 | 'operator': /<>|[<>]=?|!=|\*\*|[-+*/|=@]/,
|
39 | 'punctuation': /[:.;,()[\]]/
|
40 | };
|
41 |
|
42 | Prism.languages.pcode = Prism.languages.peoplecode;
|