summaryrefslogtreecommitdiff
path: root/pyssg.xyz/live/static/hl/languages/moonscript.min.js
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2022-12-13 20:44:08 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2022-12-13 20:44:08 -0600
commitabc0de079b895af1b705894eb2b63596e3e37274 (patch)
treec51d24dce55da8d9b227cbac6c2ef64a59d8e9dc /pyssg.xyz/live/static/hl/languages/moonscript.min.js
parentdb4b3736d4f45137a733ce5eb1e50aec968ca1d2 (diff)
add pyssg.xyz configs and templates
Diffstat (limited to 'pyssg.xyz/live/static/hl/languages/moonscript.min.js')
-rw-r--r--pyssg.xyz/live/static/hl/languages/moonscript.min.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/pyssg.xyz/live/static/hl/languages/moonscript.min.js b/pyssg.xyz/live/static/hl/languages/moonscript.min.js
new file mode 100644
index 0000000..450e8ea
--- /dev/null
+++ b/pyssg.xyz/live/static/hl/languages/moonscript.min.js
@@ -0,0 +1,22 @@
+hljs.registerLanguage("moonscript",(()=>{"use strict";return e=>{const n={
+keyword:"if then not for in while do return else elseif break continue switch and or unless when class extends super local import export from using",
+literal:"true false nil",
+built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"
+},s="[A-Za-z$_][0-9A-Za-z$_]*",a={className:"subst",begin:/#\{/,end:/\}/,
+keywords:n},t=[e.inherit(e.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}
+}),{className:"string",variants:[{begin:/'/,end:/'/,
+contains:[e.BACKSLASH_ESCAPE]},{begin:/"/,end:/"/,
+contains:[e.BACKSLASH_ESCAPE,a]}]},{className:"built_in",begin:"@__"+e.IDENT_RE
+},{begin:"@"+e.IDENT_RE},{begin:e.IDENT_RE+"\\\\"+e.IDENT_RE}];a.contains=t
+;const i=e.inherit(e.TITLE_MODE,{begin:s}),r="(\\(.*\\))?\\s*\\B[-=]>",l={
+className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,
+end:/\)/,keywords:n,contains:["self"].concat(t)}]};return{name:"MoonScript",
+aliases:["moon"],keywords:n,illegal:/\/\*/,
+contains:t.concat([e.COMMENT("--","$"),{className:"function",
+begin:"^\\s*"+s+"\\s*=\\s*"+r,end:"[-=]>",returnBegin:!0,contains:[i,l]},{
+begin:/[\(,:=]\s*/,relevance:0,contains:[{className:"function",begin:r,
+end:"[-=]>",returnBegin:!0,contains:[l]}]},{className:"class",
+beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{
+beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[i]},i]
+},{className:"name",begin:s+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0
+}])}}})()); \ No newline at end of file