Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Booklit = lexers.Register(MustNewLexer( &Config{ Name: "Booklit", Aliases: []string{"booklit"}, Filenames: []string{"*.lit"}, MimeTypes: []string{"text/x-booklit"}, }, Rules{ "root": { {`[^\\{}]+`, Text, nil}, {`\{\{\{`, StringDouble, Push("verbatim")}, {`\{-`, CommentMultiline, Push("comment")}, {`[{}]`, NameBuiltin, nil}, {`\\([a-z-]+)`, Keyword, nil}, {`\\[\\{}]+`, Text, nil}, }, "verbatim": { {`\}\}\}`, StringDouble, Pop(1)}, {`[^}]+`, StringDouble, nil}, {`}[^\}]`, StringDouble, nil}, }, "comment": { {`[^-{}]+`, CommentMultiline, nil}, {`\{-`, CommentMultiline, Push()}, {`-\}`, CommentMultiline, Pop(1)}, {`[-{}]`, CommentMultiline, nil}, }, }, ))
Booklit lexer.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.