mirror of
https://github.com/cheat/cheat.git
synced 2025-09-02 18:18:30 +02:00
Add vendor files for go build
This commit is contained in:
51
vendor/github.com/alecthomas/chroma/lexers/e/ebnf.go
generated
vendored
Normal file
51
vendor/github.com/alecthomas/chroma/lexers/e/ebnf.go
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
package e
|
||||
|
||||
import (
|
||||
. "github.com/alecthomas/chroma" // nolint
|
||||
"github.com/alecthomas/chroma/lexers/internal"
|
||||
)
|
||||
|
||||
// Ebnf lexer.
|
||||
var Ebnf = internal.Register(MustNewLexer(
|
||||
&Config{
|
||||
Name: "EBNF",
|
||||
Aliases: []string{"ebnf"},
|
||||
Filenames: []string{"*.ebnf"},
|
||||
MimeTypes: []string{"text/x-ebnf"},
|
||||
},
|
||||
Rules{
|
||||
"root": {
|
||||
Include("whitespace"),
|
||||
Include("comment_start"),
|
||||
Include("identifier"),
|
||||
{`=`, Operator, Push("production")},
|
||||
},
|
||||
"production": {
|
||||
Include("whitespace"),
|
||||
Include("comment_start"),
|
||||
Include("identifier"),
|
||||
{`"[^"]*"`, LiteralStringDouble, nil},
|
||||
{`'[^']*'`, LiteralStringSingle, nil},
|
||||
{`(\?[^?]*\?)`, NameEntity, nil},
|
||||
{`[\[\]{}(),|]`, Punctuation, nil},
|
||||
{`-`, Operator, nil},
|
||||
{`;`, Punctuation, Pop(1)},
|
||||
{`\.`, Punctuation, Pop(1)},
|
||||
},
|
||||
"whitespace": {
|
||||
{`\s+`, Text, nil},
|
||||
},
|
||||
"comment_start": {
|
||||
{`\(\*`, CommentMultiline, Push("comment")},
|
||||
},
|
||||
"comment": {
|
||||
{`[^*)]`, CommentMultiline, nil},
|
||||
Include("comment_start"),
|
||||
{`\*\)`, CommentMultiline, Pop(1)},
|
||||
{`[*)]`, CommentMultiline, nil},
|
||||
},
|
||||
"identifier": {
|
||||
{`([a-zA-Z][\w \-]*)`, Keyword, nil},
|
||||
},
|
||||
},
|
||||
))
|
Reference in New Issue
Block a user