mirror of
https://github.com/cheat/cheat.git
synced 2025-09-10 05:52:53 +02:00
chore(deps): update dependencies
This commit is contained in:
14
vendor/github.com/alecthomas/chroma/lexers/p/promql.go
generated
vendored
14
vendor/github.com/alecthomas/chroma/lexers/p/promql.go
generated
vendored
@ -6,14 +6,18 @@ import (
|
||||
)
|
||||
|
||||
// Promql lexer.
|
||||
var Promql = internal.Register(MustNewLexer(
|
||||
var Promql = internal.Register(MustNewLazyLexer(
|
||||
&Config{
|
||||
Name: "PromQL",
|
||||
Aliases: []string{"promql"},
|
||||
Filenames: []string{"*.promql"},
|
||||
MimeTypes: []string{},
|
||||
},
|
||||
Rules{
|
||||
promqlRules,
|
||||
))
|
||||
|
||||
func promqlRules() Rules {
|
||||
return Rules{
|
||||
"root": {
|
||||
{`\n`, TextWhitespace, nil},
|
||||
{`\s+`, TextWhitespace, nil},
|
||||
@ -40,7 +44,7 @@ var Promql = internal.Register(MustNewLexer(
|
||||
{`\n`, TextWhitespace, nil},
|
||||
{`\s+`, TextWhitespace, nil},
|
||||
{`,`, Punctuation, nil},
|
||||
{`([_a-zA-Z][a-zA-Z0-9_]*?)(\s*?)(=~|!=|=|~!)(\s*?)(")(.*?)(")`, ByGroups(NameLabel, TextWhitespace, Operator, TextWhitespace, Punctuation, LiteralString, Punctuation), nil},
|
||||
{`([_a-zA-Z][a-zA-Z0-9_]*?)(\s*?)(=~|!=|=|!~)(\s*?)("|')(.*?)("|')`, ByGroups(NameLabel, TextWhitespace, Operator, TextWhitespace, Punctuation, LiteralString, Punctuation), nil},
|
||||
},
|
||||
"range": {
|
||||
{`\]`, Punctuation, Pop(1)},
|
||||
@ -51,5 +55,5 @@ var Promql = internal.Register(MustNewLexer(
|
||||
{`\(`, Operator, Push()},
|
||||
Default(Pop(1)),
|
||||
},
|
||||
},
|
||||
))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user