1package l
2
3import (
4 . "github.com/alecthomas/chroma" // nolint
5 "github.com/alecthomas/chroma/lexers/internal"
6)
7
8// Lighttpd Configuration File lexer.
9var Lighttpd = internal.Register(MustNewLexer(
10 &Config{
11 Name: "Lighttpd configuration file",
12 Aliases: []string{"lighty", "lighttpd"},
13 Filenames: []string{},
14 MimeTypes: []string{"text/x-lighttpd-conf"},
15 },
16 Rules{
17 "root": {
18 {`#.*\n`, CommentSingle, nil},
19 {`/\S*`, Name, nil},
20 {`[a-zA-Z._-]+`, Keyword, nil},
21 {`\d+\.\d+\.\d+\.\d+(?:/\d+)?`, LiteralNumber, nil},
22 {`[0-9]+`, LiteralNumber, nil},
23 {`=>|=~|\+=|==|=|\+`, Operator, nil},
24 {`\$[A-Z]+`, NameBuiltin, nil},
25 {`[(){}\[\],]`, Punctuation, nil},
26 {`"([^"\\]*(?:\\.[^"\\]*)*)"`, LiteralStringDouble, nil},
27 {`\s+`, Text, nil},
28 },
29 },
30))