2 lines
8.6 KiB
JavaScript
Raw Normal View History

2025-09-05 14:59:21 +08:00
const e=Object.freeze(JSON.parse('{"displayName":"Kotlin","fileTypes":["kt","kts"],"name":"kotlin","patterns":[{"include":"#import"},{"include":"#package"},{"include":"#code"}],"repository":{"annotation-simple":{"match":"(?<!\\\\w)@[\\\\w\\\\.]+\\\\b(?!:)","name":"entity.name.type.annotation.kotlin"},"annotation-site":{"begin":"(?<!\\\\w)(@\\\\w+):\\\\s*(?!\\\\[)","beginCaptures":{"1":{"name":"entity.name.type.annotation-site.kotlin"}},"end":"$","patterns":[{"include":"#unescaped-annotation"}]},"annotation-site-list":{"begin":"(?<!\\\\w)(@\\\\w+):\\\\s*\\\\[","beginCaptures":{"1":{"name":"entity.name.type.annotation-site.kotlin"}},"end":"\\\\]","patterns":[{"include":"#unescaped-annotation"}]},"binary-literal":{"match":"0(b|B)[01][01_]*","name":"constant.numeric.binary.kotlin"},"boolean-literal":{"match":"\\\\b(true|false)\\\\b","name":"constant.language.boolean.kotlin"},"character":{"begin":"\'","end":"\'","name":"string.quoted.single.kotlin","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.kotlin"}]},"class-declaration":{"captures":{"1":{"name":"keyword.hard.class.kotlin"},"2":{"name":"entity.name.type.class.kotlin"},"3":{"patterns":[{"include":"#type-parameter"}]}},"match":"\\\\b(class|(?:fun\\\\s+)?interface)\\\\s+(\\\\b\\\\w+\\\\b|`[^`]+`)\\\\s*(?<GROUP><([^<>]|\\\\g<GROUP>)+>)?"},"code":{"patterns":[{"include":"#comments"},{"include":"#keywords"},{"include":"#annotation-simple"},{"include":"#annotation-site-list"},{"include":"#annotation-site"},{"include":"#class-declaration"},{"include":"#object"},{"include":"#type-alias"},{"include":"#function"},{"include":"#variable-declaration"},{"include":"#type-constraint"},{"include":"#type-annotation"},{"include":"#function-call"},{"include":"#method-reference"},{"include":"#key"},{"include":"#string"},{"include":"#string-empty"},{"include":"#string-multiline"},{"include":"#character"},{"include":"#lambda-arrow"},{"include":"#operators"},{"include":"#self-reference"},{"include":"#decimal-literal"},{"include":"#hex-literal"},{"include":"#binary-literal"},{"include":"#boolean-literal"},{"include":"#null-literal"}]},"comment-block":{"begin":"/\\\\*(?!\\\\*)","end":"\\\\*/","name":"comment.block.kotlin"},"comment-javadoc":{"patterns":[{"begin":"/\\\\*\\\\*","end":"\\\\*/","name":"comment.block.javadoc.kotlin","patterns":[{"match":"@(return|constructor|receiver|sample|see|author|since|suppress)\\\\b","name":"keyword.other.documentation.javadoc.kotlin"},{"captures":{"1":{"name":"keyword.other.documentation.javadoc.kotlin"},"2":{"name":"variable.parameter.kotlin"}},"match":"(@param|@property)\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"keyword.other.documentation.javadoc.kotlin"},"2":{"name":"variable.parameter.kotlin"}},"match":"(@param)\\\\[(\\\\S+)\\\\]"},{"captures":{"1":{"name":"keyword.other.documentation.javadoc.kotlin"},"2":{"name":"entity.name.type.class.kotlin"}},"match":"(@(?:exception|throws))\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"keyword.other.documentation.javadoc.kotlin"},"2":{"name":"entity.name.type.class.kotlin"},"3":{"name":"variable.parameter.kotlin"}},"match":"{(@link)\\\\s+(\\\\S+)?#([\\\\w$]+\\\\s*\\\\([^()]*\\\\)).*}"}]}]},"comment-line":{"begin":"//","end":"$","name":"comment.line.double-slash.kotlin"},"comments":{"patterns":[{"include":"#comment-line"},{"include":"#comment-block"},{"include":"#comment-javadoc"}]},"control-keywords":{"match":"\\\\b(if|else|while|do|when|try|throw|break|continue|return|for)\\\\b","name":"keyword.control.kotlin"},"decimal-literal":{"match":"\\\\b\\\\d[\\\\d_]*(\\\\.[\\\\d_]+)?((e|E)\\\\d+)?(u|U)?(L|F|f)?\\\\b","name":"constant.numeric.decimal.kotlin"},"function":{"captures":{"1":{"name":"keyword.hard.fun.kotlin"},"2":{"patterns":[{"include":"#type-parameter"}]},"4":{"name":"entity.name.type.class.extension.kotlin"},"5":{"name":"entity.name.function.declaration.kotlin"}},"match":"\\\\b(fun)\\\\b\\\\s*(?<GROUP><([^<>]|\\\\g<GROUP>)+>)?\\\\s*(?:(?:(\\\\w+)\\\\.)?(\\\\b\\\\w+\\\\b|`[^`]+`))?"},"function-call":{"captures":{"1":{"name":"entity.name.function.call.kotlin"},"2":{"patterns":[{"include":"#type-para