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-wasm.min.js | |
| parent | ab355897a12b7bda1089a44de326d41455a0f7a3 (diff) | |
chore: add prismjs for syntax highlighting
Diffstat (limited to 'public/prism/prism-wasm.min.js')
| -rw-r--r-- | public/prism/prism-wasm.min.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/public/prism/prism-wasm.min.js b/public/prism/prism-wasm.min.js new file mode 100644 index 0000000..885d599 --- /dev/null +++ b/public/prism/prism-wasm.min.js @@ -0,0 +1,17 @@ +Prism.languages.wasm = { + comment: [/\(;[\s\S]*?;\)/, { pattern: /;;.*/, greedy: !0 }], + string: { pattern: /"(?:\\[\s\S]|[^"\\])*"/, greedy: !0 }, + keyword: [ + { pattern: /\b(?:align|offset)=/, inside: { operator: /=/ } }, + { + pattern: + /\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/, + inside: { punctuation: /\./ }, + }, + /\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/, + ], + variable: /\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/, + number: + /[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/, + punctuation: /[()]/, +}; |
