summaryrefslogtreecommitdiff
path: root/pyssg.xyz/live/static/hl/languages/kotlin.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/kotlin.min.js
parentdb4b3736d4f45137a733ce5eb1e50aec968ca1d2 (diff)
add pyssg.xyz configs and templates
Diffstat (limited to 'pyssg.xyz/live/static/hl/languages/kotlin.min.js')
-rw-r--r--pyssg.xyz/live/static/hl/languages/kotlin.min.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/pyssg.xyz/live/static/hl/languages/kotlin.min.js b/pyssg.xyz/live/static/hl/languages/kotlin.min.js
new file mode 100644
index 0000000..92e2293
--- /dev/null
+++ b/pyssg.xyz/live/static/hl/languages/kotlin.min.js
@@ -0,0 +1,38 @@
+hljs.registerLanguage("kotlin",(()=>{"use strict";return e=>{const n={
+keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",
+built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",
+literal:"true false null"},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"
+},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},i={
+className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},t={className:"string",
+variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,s]},{begin:"'",end:"'",
+illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,
+contains:[e.BACKSLASH_ESCAPE,i,s]}]};s.contains.push(t);const l={
+className:"meta",
+begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"
+},r={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,
+end:/\)/,contains:[e.inherit(t,{className:"meta-string"})]}]
+},c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),o={variants:[{
+className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]
+},d=o;return d.variants[1].contains=[o],o.variants[1].contains=[d],{
+name:"Kotlin",aliases:["kt"],keywords:n,contains:[e.COMMENT("/\\*\\*","\\*/",{
+relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]
+}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",
+begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",
+begin:/@\w+/}]}},a,l,r,{className:"function",beginKeywords:"fun",end:"[(]|$",
+returnBegin:!0,excludeEnd:!0,keywords:n,
+illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{
+begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,
+contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,
+keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,
+endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,
+endsWithParent:!0,contains:[o,e.C_LINE_COMMENT_MODE,c],relevance:0
+},e.C_LINE_COMMENT_MODE,c,l,r,t,e.C_NUMBER_MODE]},c]},{className:"class",
+beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,
+illegal:"extends implements",contains:[{
+beginKeywords:"public protected internal private constructor"
+},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,
+excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/,
+excludeBegin:!0,returnEnd:!0},l,r]},t,{className:"meta",begin:"^#!/usr/bin/env",
+end:"$",illegal:"\n"},{className:"number",
+begin:"\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",
+relevance:0}]}}})()); \ No newline at end of file