File: lighttpd.go

package info (click to toggle)
golang-github-alecthomas-chroma 0.6.3%2Breally0.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, buster-backports
  • size: 2,224 kB
  • sloc: python: 206; makefile: 6
file content (30 lines) | stat: -rw-r--r-- 789 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package l

import (
	. "github.com/alecthomas/chroma" // nolint
	"github.com/alecthomas/chroma/lexers/internal"
)

// Lighttpd Configuration File lexer.
var Lighttpd = internal.Register(MustNewLexer(
	&Config{
		Name:      "Lighttpd configuration file",
		Aliases:   []string{"lighty", "lighttpd"},
		Filenames: []string{},
		MimeTypes: []string{"text/x-lighttpd-conf"},
	},
	Rules{
		"root": {
			{`#.*\n`, CommentSingle, nil},
			{`/\S*`, Name, nil},
			{`[a-zA-Z._-]+`, Keyword, nil},
			{`\d+\.\d+\.\d+\.\d+(?:/\d+)?`, LiteralNumber, nil},
			{`[0-9]+`, LiteralNumber, nil},
			{`=>|=~|\+=|==|=|\+`, Operator, nil},
			{`\$[A-Z]+`, NameBuiltin, nil},
			{`[(){}\[\],]`, Punctuation, nil},
			{`"([^"\\]*(?:\\.[^"\\]*)*)"`, LiteralStringDouble, nil},
			{`\s+`, Text, nil},
		},
	},
))