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\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: /NO|YES/,
};
Prism.languages.px = Prism.languages.pcaxis;
ht'>Armand Philippot
blob: 01ee42d2dc63683b369645cbecf00b4f762c809a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
Prism.languages.icon = {
comment: /#.*/,
string: {
pattern: /(["'])(?:(?!\1)[^\\\r\n_]|\\.|_(?!\1)(?:\r\n|[\s\S]))*\1/,
greedy: true,
},
number: /\b(?:\d+r[a-z\d]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b|\.\d+\b/i,
'builtin-keyword': {
pattern:
/&(?:allocated|ascii|clock|collections|cset|current|date|dateline|digits|dump|e|error(?:number|text|value)?|errout|fail|features|file|host|input|lcase|letters|level|line|main|null|output|phi|pi|pos|progname|random|regions|source|storage|subject|time|trace|ucase|version)\b/,
alias: 'variable',
},
directive: {
pattern: /\$\w+/,
alias: 'builtin',
},
keyword:
/\b(?:break|by|case|create|default|do|else|end|every|fail|global|if|initial|invocable|link|local|next|not|of|procedure|record|repeat|return|static|suspend|then|to|until|while)\b/,
function: /\b(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/,
operator:
/[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|<?=?)|>>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/,
punctuation: /[\[\](){},;]/,
};
|