forked from PrismJS/prism
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prism-pcaxis.js
53 lines (52 loc) · 1.07 KB
/
prism-pcaxis.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Prism.languages.pcaxis = {
'string': /"[^"]*"/,
'keyword': {
pattern: /((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/,
lookbehind: true,
greedy: true,
inside: {
'keyword': /^[-A-Z\d]+/,
'language': {
pattern: /^(\s*)\[[-\w]+\]/,
lookbehind: true,
inside: {
'punctuation': /^\[|\]$/,
'property': /[-\w]+/
}
},
'sub-key': {
pattern: /^(\s*)[\s\S]+/,
lookbehind: true,
inside: {
'parameter': {
pattern: /"[^"]*"/,
alias: 'property'
},
'punctuation': /^\(|\)$|,/
}
}
}
},
'operator': /=/,
'tlist': {
pattern: /TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/,
greedy: true,
inside: {
'function': /^TLIST/,
'property': {
pattern: /^(\s*\(\s*)\w+/,
lookbehind: true
},
'string': /"[^"]*"/,
'punctuation': /[(),]/,
'operator': /-/
}
},
'punctuation': /[;,]/,
'number': {
pattern: /(^|\s)\d+(?:\.\d+)?(?!\S)/,
lookbehind: true
},
'boolean': /YES|NO/,
};
Prism.languages.px = Prism.languages.pcaxis;