UNPKG

901 BJavaScriptView Raw
1Prism.languages.oz = {
2 'comment': /\/\*[\s\S]*?\*\/|%.*/,
3 'string': {
4 pattern: /"(?:[^"\\]|\\[\s\S])*"/,
5 greedy: true
6 },
7 'atom': {
8 pattern: /'(?:[^'\\]|\\[\s\S])*'/,
9 greedy: true,
10 alias: 'builtin'
11 },
12 'keyword': /[$_]|\[\]|\b(?:at|attr|case|catch|choice|class|cond|declare|define|dis|else(?:case|if)?|end|export|fail|false|feat|finally|from|fun|functor|if|import|in|local|lock|meth|nil|not|of|or|prepare|proc|prop|raise|require|self|skip|then|thread|true|try|unit)\b/,
13 'function': [
14 /[a-z][A-Za-z\d]*(?=\()/,
15 {
16 pattern: /(\{)[A-Z][A-Za-z\d]*/,
17 lookbehind: true
18 }
19 ],
20 'number': /\b(?:0[bx][\da-f]+|\d+\.?\d*(?:e~?\d+)?\b)|&(?:[^\\]|\\(?:\d{3}|.))/i,
21 'variable': /\b[A-Z][A-Za-z\d]*|`(?:[^`\\]|\\.)+`/,
22 'attr-name': /\w+(?=:)/,
23 'operator': /:(?:=|::?)|<[-:=]?|=(?:=|<?:?)|>=?:?|\\=:?|!!?|[|#+\-*\/,~^@]|\b(?:andthen|div|mod|orelse)\b/,
24 'punctuation': /[\[\](){}.:;?]/
25};
\No newline at end of file