Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Kotlin = internal.Register(MustNewLexer( &Config{ Name: "Kotlin", Aliases: []string{"kotlin"}, Filenames: []string{"*.kt"}, MimeTypes: []string{"text/x-kotlin"}, DotAll: true, }, Rules{ "root": { {`^\s*\[.*?\]`, NameAttribute, nil}, {`[^\S\n]+`, Text, nil}, {`\\\n`, Text, nil}, {`//[^\n]*\n?`, CommentSingle, nil}, {`/[*].*?[*]/`, CommentMultiline, nil}, {`\n`, Text, nil}, {`::|!!|\?[:.]`, Operator, nil}, {`[~!%^&*()+=|\[\]:;,.<>/?-]`, Punctuation, nil}, {`[{}]`, Punctuation, nil}, {`"""[^"]*"""`, LiteralString, nil}, {`"(\\\\|\\"|[^"\n])*["\n]`, LiteralString, nil}, {`'\\.'|'[^\\]'`, LiteralStringChar, nil}, {`[0-9](\.[0-9]*)?([eE][+-][0-9]+)?[flFL]?|0[xX][0-9a-fA-F]+[Ll]?`, LiteralNumber, nil}, {`(companion)(\s+)(object)`, ByGroups(Keyword, Text, Keyword), nil}, {`(class|interface|object)(\s+)`, ByGroups(Keyword, Text), Push("class")}, {`(package|import)(\s+)`, ByGroups(Keyword, Text), Push("package")}, {`(val|var)(\s+)`, ByGroups(Keyword, Text), Push("property")}, {`(fun)(\s+)(<[^>]*>\s+)?`, ByGroups(Keyword, Text, Text), Push("function")}, {`(abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|false|final|finally|for|fun|get|if|import|in|infix|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|true|try|val|var|vararg|when|where|while)\b`, Keyword, nil}, {"(@?[" + kotlinIdentifier + "]*`)", Name, nil}, }, "package": { {`\S+`, NameNamespace, Pop(1)}, }, "class": { {"(@?[" + kotlinIdentifier + "]*`)", NameClass, Pop(1)}, }, "property": { {"(@?[" + kotlinIdentifier + " ]*`)", NameProperty, Pop(1)}, }, "function": { {"(@?[" + kotlinIdentifier + " ]*`)", NameFunction, Pop(1)}, }, }, ))
Kotlin lexer.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.