diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2022-12-13 20:44:08 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2022-12-13 20:44:08 -0600 |
commit | abc0de079b895af1b705894eb2b63596e3e37274 (patch) | |
tree | c51d24dce55da8d9b227cbac6c2ef64a59d8e9dc /pyssg.xyz/live/static/hl/languages/scala.min.js | |
parent | db4b3736d4f45137a733ce5eb1e50aec968ca1d2 (diff) |
add pyssg.xyz configs and templates
Diffstat (limited to 'pyssg.xyz/live/static/hl/languages/scala.min.js')
-rw-r--r-- | pyssg.xyz/live/static/hl/languages/scala.min.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pyssg.xyz/live/static/hl/languages/scala.min.js b/pyssg.xyz/live/static/hl/languages/scala.min.js new file mode 100644 index 0000000..b2d8e3b --- /dev/null +++ b/pyssg.xyz/live/static/hl/languages/scala.min.js @@ -0,0 +1,21 @@ +hljs.registerLanguage("scala",(()=>{"use strict";return e=>{const n={ +className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"},{begin:/\$\{/,end:/\}/}] +},a={className:"string",variants:[{begin:'"',end:'"',illegal:"\\n", +contains:[e.BACKSLASH_ESCAPE]},{begin:'"""',end:'"""',relevance:10},{ +begin:'[a-z]+"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,n]},{ +className:"string",begin:'[a-z]+"""',end:'"""',contains:[n],relevance:10}]},s={ +className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},t={ +className:"title", +begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/, +relevance:0},i={className:"class",beginKeywords:"class object trait type", +end:/[:={\[\n;]/,excludeEnd:!0, +contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{ +beginKeywords:"extends with",relevance:10},{begin:/\[/,end:/\]/,excludeBegin:!0, +excludeEnd:!0,relevance:0,contains:[s]},{className:"params",begin:/\(/,end:/\)/, +excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[s]},t]},l={ +className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0, +contains:[t]};return{name:"Scala",keywords:{literal:"true false null", +keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit" +},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,{className:"symbol", +begin:"'\\w[\\w\\d_]*(?!')"},s,l,i,e.C_NUMBER_MODE,{className:"meta", +begin:"@[A-Za-z]+"}]}}})());
\ No newline at end of file |