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.9 KB
|
Line | |
---|
1 | 'use strict'
|
---|
2 |
|
---|
3 | module.exports = jolie
|
---|
4 | jolie.displayName = 'jolie'
|
---|
5 | jolie.aliases = []
|
---|
6 | function jolie(Prism) {
|
---|
7 | Prism.languages.jolie = Prism.languages.extend('clike', {
|
---|
8 | string: {
|
---|
9 | pattern: /(^|[^\\])"(?:\\[\s\S]|[^"\\])*"/,
|
---|
10 | lookbehind: true,
|
---|
11 | greedy: true
|
---|
12 | },
|
---|
13 | 'class-name': {
|
---|
14 | pattern:
|
---|
15 | /((?:\b(?:as|courier|embed|in|inputPort|outputPort|service)\b|@)[ \t]*)\w+/,
|
---|
16 | lookbehind: true
|
---|
17 | },
|
---|
18 | keyword:
|
---|
19 | /\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/,
|
---|
20 | function: /\b[a-z_]\w*(?=[ \t]*[@(])/i,
|
---|
21 | number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,
|
---|
22 | operator: /-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[?\/%^@|]/,
|
---|
23 | punctuation: /[()[\]{},;.:]/,
|
---|
24 | builtin:
|
---|
25 | /\b(?:Byte|any|bool|char|double|enum|float|int|length|long|ranges|regex|string|undefined|void)\b/
|
---|
26 | })
|
---|
27 | Prism.languages.insertBefore('jolie', 'keyword', {
|
---|
28 | aggregates: {
|
---|
29 | pattern:
|
---|
30 | /(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,
|
---|
31 | lookbehind: true,
|
---|
32 | inside: {
|
---|
33 | keyword: /\bwith\b/,
|
---|
34 | 'class-name': /\w+/,
|
---|
35 | punctuation: /,/
|
---|
36 | }
|
---|
37 | },
|
---|
38 | redirects: {
|
---|
39 | pattern:
|
---|
40 | /(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,
|
---|
41 | lookbehind: true,
|
---|
42 | inside: {
|
---|
43 | punctuation: /,/,
|
---|
44 | 'class-name': /\w+/,
|
---|
45 | operator: /=>/
|
---|
46 | }
|
---|
47 | },
|
---|
48 | property: {
|
---|
49 | pattern:
|
---|
50 | /\b(?:Aggregates|[Ii]nterfaces|Java|Javascript|Jolie|[Ll]ocation|OneWay|[Pp]rotocol|Redirects|RequestResponse)\b(?=[ \t]*:)/
|
---|
51 | }
|
---|
52 | })
|
---|
53 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.