1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
Prism.languages.ebnf = {
comment: /\(\*[\s\S]*?\*\)/,
string: {
pattern: /"[^"\r\n]*"|'[^'\r\n]*'/,
greedy: true,
},
special: {
pattern: /\?[^?\r\n]*\?/,
greedy: true,
alias: 'class-name',
},
definition: {
pattern: /^([\t ]*)[a-z]\w*(?:[ \t]+[a-z]\w*)*(?=\s*=)/im,
lookbehind: true,
alias: ['rule', 'keyword'],
},
rule: /\b[a-z]\w*(?:[ \t]+[a-z]\w*)*\b/i,
punctuation: /\([:/]|[:/]\)|[.,;()[\]{}]/,
operator: /[-=|*/!]/,
};
|