diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-30 19:47:21 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-30 19:47:21 +0100 |
| commit | a98b5ea6fe8e8cc98a55e0fd793e6e8660ea31c1 (patch) | |
| tree | 542810ab5aef99150db228bb54fd58303dcb31c7 /public/prism/prism-wren.min.js | |
| parent | ab355897a12b7bda1089a44de326d41455a0f7a3 (diff) | |
chore: add prismjs for syntax highlighting
Diffstat (limited to 'public/prism/prism-wren.min.js')
| -rw-r--r-- | public/prism/prism-wren.min.js | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/public/prism/prism-wren.min.js b/public/prism/prism-wren.min.js new file mode 100644 index 0000000..253f452 --- /dev/null +++ b/public/prism/prism-wren.min.js @@ -0,0 +1,56 @@ +(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]+/, + }, + }); |
