From a98b5ea6fe8e8cc98a55e0fd793e6e8660ea31c1 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 30 Dec 2021 19:47:21 +0100 Subject: chore: add prismjs for syntax highlighting --- public/prism/prism-gdscript.min.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 public/prism/prism-gdscript.min.js (limited to 'public/prism/prism-gdscript.min.js') diff --git a/public/prism/prism-gdscript.min.js b/public/prism/prism-gdscript.min.js new file mode 100644 index 0000000..99ebe3b --- /dev/null +++ b/public/prism/prism-gdscript.min.js @@ -0,0 +1,25 @@ +Prism.languages.gdscript = { + comment: /#.*/, + string: { + pattern: + /@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/, + greedy: !0, + }, + 'class-name': { + pattern: + /(^(?:class|class_name|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m, + lookbehind: !0, + }, + keyword: + /\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/, + function: /\b[a-z_]\w*(?=[ \t]*\()/i, + variable: /\$\w+/, + number: [ + /\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/, + /\b(?:INF|NAN|PI|TAU)\b/, + ], + constant: /\b[A-Z][A-Z_\d]*\b/, + boolean: /\b(?:false|true)\b/, + operator: /->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/, + punctuation: /[.:,;()[\]{}]/, +}; -- cgit v1.2.3