summaryrefslogtreecommitdiff
path: root/pyssg.xyz/live/static/hl/languages/erlang.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/erlang.min.js
parentdb4b3736d4f45137a733ce5eb1e50aec968ca1d2 (diff)
add pyssg.xyz configs and templates
Diffstat (limited to 'pyssg.xyz/live/static/hl/languages/erlang.min.js')
-rw-r--r--pyssg.xyz/live/static/hl/languages/erlang.min.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/pyssg.xyz/live/static/hl/languages/erlang.min.js b/pyssg.xyz/live/static/hl/languages/erlang.min.js
new file mode 100644
index 0000000..168fa4f
--- /dev/null
+++ b/pyssg.xyz/live/static/hl/languages/erlang.min.js
@@ -0,0 +1,25 @@
+hljs.registerLanguage("erlang",(()=>{"use strict";return e=>{
+const n="[a-z'][a-zA-Z0-9_']*",r="("+n+":"+n+"|"+n+")",a={
+keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",
+literal:"false true"},i=e.COMMENT("%","$"),s={className:"number",
+begin:"\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",
+relevance:0},c={begin:"fun\\s+"+n+"/\\d+"},t={begin:r+"\\(",end:"\\)",
+returnBegin:!0,relevance:0,contains:[{begin:r,relevance:0},{begin:"\\(",
+end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},d={begin:/\{/,end:/\}/,
+relevance:0},o={begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},l={
+begin:"[A-Z][a-zA-Z0-9_]*",relevance:0},b={begin:"#"+e.UNDERSCORE_IDENT_RE,
+relevance:0,returnBegin:!0,contains:[{begin:"#"+e.UNDERSCORE_IDENT_RE,
+relevance:0},{begin:/\{/,end:/\}/,relevance:0}]},g={
+beginKeywords:"fun receive if try case",end:"end",keywords:a}
+;g.contains=[i,c,e.inherit(e.APOS_STRING_MODE,{className:""
+}),g,t,e.QUOTE_STRING_MODE,s,d,o,l,b]
+;const E=[i,c,g,t,e.QUOTE_STRING_MODE,s,d,o,l,b]
+;t.contains[1].contains=E,d.contains=E,b.contains[1].contains=E;const u={
+className:"params",begin:"\\(",end:"\\)",contains:E};return{name:"Erlang",
+aliases:["erl"],keywords:a,illegal:"(</|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))",
+contains:[{className:"function",begin:"^"+n+"\\s*\\(",end:"->",returnBegin:!0,
+illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[u,e.inherit(e.TITLE_MODE,{begin:n})],
+starts:{end:";|\\.",keywords:a,contains:E}},i,{begin:"^-",end:"\\.",relevance:0,
+excludeEnd:!0,returnBegin:!0,keywords:{$pattern:"-"+e.IDENT_RE,
+keyword:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec"
+},contains:[u]},s,e.QUOTE_STRING_MODE,b,o,l,d,{begin:/\.$/}]}}})()); \ No newline at end of file