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.6 KB
|
Line | |
---|
1 | Prism.languages.jolie = Prism.languages.extend('clike', {
|
---|
2 | 'string': {
|
---|
3 | pattern: /(^|[^\\])"(?:\\[\s\S]|[^"\\])*"/,
|
---|
4 | lookbehind: true,
|
---|
5 | greedy: true
|
---|
6 | },
|
---|
7 | 'class-name': {
|
---|
8 | pattern: /((?:\b(?:as|courier|embed|in|inputPort|outputPort|service)\b|@)[ \t]*)\w+/,
|
---|
9 | lookbehind: true
|
---|
10 | },
|
---|
11 | 'keyword': /\b(?:as|cH|comp|concurrent|constants|courier|cset|csets|default|define|else|embed|embedded|execution|exit|extender|for|foreach|forward|from|global|if|import|in|include|init|inputPort|install|instanceof|interface|is_defined|linkIn|linkOut|main|new|nullProcess|outputPort|over|private|provide|public|scope|sequential|service|single|spawn|synchronized|this|throw|throws|type|undef|until|while|with)\b/,
|
---|
12 | 'function': /\b[a-z_]\w*(?=[ \t]*[@(])/i,
|
---|
13 | 'number': /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,
|
---|
14 | 'operator': /-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[?\/%^@|]/,
|
---|
15 | 'punctuation': /[()[\]{},;.:]/,
|
---|
16 | 'builtin': /\b(?:Byte|any|bool|char|double|enum|float|int|length|long|ranges|regex|string|undefined|void)\b/
|
---|
17 | });
|
---|
18 |
|
---|
19 | Prism.languages.insertBefore('jolie', 'keyword', {
|
---|
20 | 'aggregates': {
|
---|
21 | pattern: /(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,
|
---|
22 | lookbehind: true,
|
---|
23 | inside: {
|
---|
24 | 'keyword': /\bwith\b/,
|
---|
25 | 'class-name': /\w+/,
|
---|
26 | 'punctuation': /,/
|
---|
27 | }
|
---|
28 | },
|
---|
29 | 'redirects': {
|
---|
30 | pattern: /(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,
|
---|
31 | lookbehind: true,
|
---|
32 | inside: {
|
---|
33 | 'punctuation': /,/,
|
---|
34 | 'class-name': /\w+/,
|
---|
35 | 'operator': /=>/
|
---|
36 | }
|
---|
37 | },
|
---|
38 | 'property': {
|
---|
39 | pattern: /\b(?:Aggregates|[Ii]nterfaces|Java|Javascript|Jolie|[Ll]ocation|OneWay|[Pp]rotocol|Redirects|RequestResponse)\b(?=[ \t]*:)/
|
---|
40 | }
|
---|
41 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.