(Prism.languages.wren = {
comment: [
{
pattern:
/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*))*\*\/)*\*\/)*\*\//,
greedy: !0,
},
{ pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 },
],
'triple-quoted-string': {
pattern: /"""[\s\S]*?"""/,
greedy: !0,
alias: 'string',
},
'string-literal': null,
hashbang: { pattern: /^#!\/.+/, greedy: !0, alias: 'comment' },
attribute: { pattern: /#!?[ \t\u3000]*\w+/, alias: 'keyword' },
'class-name': [
{ pattern: /(\bclass\s+)\w+/, lookbehind: !0 },
/\b[A-Z][a-z\d_]*\b/,
],
constant: /\b[A-Z][A-Z\d_]*\b/,
null: { pattern: /\bnull\b/, alias: 'keyword' },
keyword:
/\b(?:as|break|class|construct|continue|else|for|foreign|if|import|in|is|return|static|super|this|var|while)\b/,
boolean: /\b(?:false|true)\b/,
number: /\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,
function: /\b[a-z_]\w*(?=\s*[({])/i,
operator: /<<|>>|[=!<>]=?|&&|\|\||[-+*/%~^&|?:]|\.{2,3}/,
punctuation: /[\[\](){}.,;]/,
}),
(Prism.languages.wren['string-literal'] = {
pattern:
/(^|[^\\"])"(?:[^\\"%]|\\[\s\S]|%(?!\()|%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\))*"/,
lookbehind: !0,
greedy: !0,
inside: {
interpolation: {
pattern:
/((?:^|[^\\])(?:\\{2})*)%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\)/,
lookbehind: !0,
inside: {
expression: {
pattern: /^(%\()[\s\S]+(?=\)$)/,
lookbehind: !0,
inside: Prism.languages.wren,
},
'interpolation-punctuation': {
pattern: /^%\(|\)$/,
alias: 'punctuation',
},
},
},
string: /[\s\S]+/,
},
});
2.0.0&id=11b9de44a4b2f305a6a484187805e429b2767118'>commitdiffstats
|
blob: 39621e5f9ccaaa294ab290b3e5b0bb9d3fe90cf7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
Prism.languages.false = {
comment: { pattern: /\{[^}]*\}/ },
string: { pattern: /"[^"]*"/, greedy: !0 },
'character-code': { pattern: /'(?:[^\r]|\r\n?)/, alias: 'number' },
'assembler-code': { pattern: /\d+`/, alias: 'important' },
number: /\d+/,
operator: /[-!#$%&'*+,./:;=>?@\\^_`|~ßø]/,
punctuation: /\[|\]/,
variable: /[a-z]/,
'non-standard': { pattern: /[()<BDO®]/, alias: 'bold' },
};
|