forked from forgejo/forgejo
Vendor Update (#16121)
* update github.com/PuerkitoBio/goquery * update github.com/alecthomas/chroma * update github.com/blevesearch/bleve/v2 * update github.com/caddyserver/certmagic * update github.com/go-enry/go-enry/v2 * update github.com/go-git/go-billy/v5 * update github.com/go-git/go-git/v5 * update github.com/go-redis/redis/v8 * update github.com/go-testfixtures/testfixtures/v3 * update github.com/jaytaylor/html2text * update github.com/json-iterator/go * update github.com/klauspost/compress * update github.com/markbates/goth * update github.com/mattn/go-isatty * update github.com/mholt/archiver/v3 * update github.com/microcosm-cc/bluemonday * update github.com/minio/minio-go/v7 * update github.com/prometheus/client_golang * update github.com/unrolled/render * update github.com/xanzy/go-gitlab * update github.com/yuin/goldmark * update github.com/yuin/goldmark-highlighting Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
f088dc4ea1
commit
86e2789960
819 changed files with 38072 additions and 34969 deletions
36
vendor/github.com/alecthomas/chroma/lexers/y/yang.go
generated
vendored
36
vendor/github.com/alecthomas/chroma/lexers/y/yang.go
generated
vendored
|
@ -5,14 +5,18 @@ import (
|
|||
"github.com/alecthomas/chroma/lexers/internal"
|
||||
)
|
||||
|
||||
var YANG = internal.Register(MustNewLexer(
|
||||
var YANG = internal.Register(MustNewLazyLexer(
|
||||
&Config{
|
||||
Name: "YANG",
|
||||
Aliases: []string{"yang"},
|
||||
Filenames: []string{"*.yang"},
|
||||
MimeTypes: []string{"application/yang"},
|
||||
},
|
||||
Rules{
|
||||
yangRules,
|
||||
))
|
||||
|
||||
func yangRules() Rules {
|
||||
return Rules{
|
||||
"root": {
|
||||
{`\s+`, Whitespace, nil},
|
||||
{`[\{\}\;]+`, Punctuation, nil},
|
||||
|
@ -24,35 +28,35 @@ var YANG = internal.Register(MustNewLexer(
|
|||
{`/\*`, CommentMultiline, Push("comments")},
|
||||
{`//.*?$`, CommentSingle, nil},
|
||||
|
||||
//match BNF stmt for `node-identifier` with [ prefix ":"]
|
||||
// match BNF stmt for `node-identifier` with [ prefix ":"]
|
||||
{`(?:^|(?<=[\s{};]))([\w.-]+)(:)([\w.-]+)(?=[\s{};])`, ByGroups(KeywordNamespace, Punctuation, Text), nil},
|
||||
|
||||
//match BNF stmt `date-arg-str`
|
||||
// match BNF stmt `date-arg-str`
|
||||
{`([0-9]{4}\-[0-9]{2}\-[0-9]{2})(?=[\s\{\}\;])`, LiteralDate, nil},
|
||||
{`([0-9]+\.[0-9]+)(?=[\s\{\}\;])`, NumberFloat, nil},
|
||||
{`([0-9]+)(?=[\s\{\}\;])`, NumberInteger, nil},
|
||||
|
||||
//TOP_STMTS_KEYWORDS
|
||||
// TOP_STMTS_KEYWORDS
|
||||
{Words(``, `(?=[^\w\-\:])`, `module`, `submodule`), Keyword, nil},
|
||||
//MODULE_HEADER_STMT_KEYWORDS
|
||||
// MODULE_HEADER_STMT_KEYWORDS
|
||||
{Words(``, `(?=[^\w\-\:])`, `belongs-to`, `namespace`, `prefix`, `yang-version`), Keyword, nil},
|
||||
//META_STMT_KEYWORDS
|
||||
// META_STMT_KEYWORDS
|
||||
{Words(``, `(?=[^\w\-\:])`, `contact`, `description`, `organization`, `reference`, `revision`), Keyword, nil},
|
||||
//LINKAGE_STMTS_KEYWORDS
|
||||
// LINKAGE_STMTS_KEYWORDS
|
||||
{Words(``, `(?=[^\w\-\:])`, `import`, `include`, `revision-date`), Keyword, nil},
|
||||
//BODY_STMT_KEYWORDS
|
||||
// BODY_STMT_KEYWORDS
|
||||
{Words(``, `(?=[^\w\-\:])`, `action`, `argument`, `augment`, `deviation`, `extension`, `feature`, `grouping`, `identity`, `if-feature`, `input`, `notification`, `output`, `rpc`, `typedef`), Keyword, nil},
|
||||
//DATA_DEF_STMT_KEYWORDS
|
||||
// DATA_DEF_STMT_KEYWORDS
|
||||
{Words(``, `(?=[^\w\-\:])`, `anydata`, `anyxml`, `case`, `choice`, `config`, `container`, `deviate`, `leaf`, `leaf-list`, `list`, `must`, `presence`, `refine`, `uses`, `when`), Keyword, nil},
|
||||
//TYPE_STMT_KEYWORDS
|
||||
// TYPE_STMT_KEYWORDS
|
||||
{Words(``, `(?=[^\w\-\:])`, `base`, `bit`, `default`, `enum`, `error-app-tag`, `error-message`, `fraction-digits`, `length`, `max-elements`, `min-elements`, `modifier`, `ordered-by`, `path`, `pattern`, `position`, `range`, `require-instance`, `status`, `type`, `units`, `value`, `yin-element`), Keyword, nil},
|
||||
//LIST_STMT_KEYWORDS
|
||||
// LIST_STMT_KEYWORDS
|
||||
{Words(``, `(?=[^\w\-\:])`, `key`, `mandatory`, `unique`), Keyword, nil},
|
||||
|
||||
//CONSTANTS_KEYWORDS - RFC7950 other keywords
|
||||
// CONSTANTS_KEYWORDS - RFC7950 other keywords
|
||||
{Words(``, `(?=[^\w\-\:])`, `add`, `current`, `delete`, `deprecated`, `false`, `invert-match`, `max`, `min`, `not-supported`, `obsolete`, `replace`, `true`, `unbounded`, `user`), NameClass, nil},
|
||||
|
||||
//RFC7950 Built-In Types
|
||||
// RFC7950 Built-In Types
|
||||
{Words(``, `(?=[^\w\-\:])`, `binary`, `bits`, `boolean`, `decimal64`, `empty`, `enumeration`, `identityref`, `instance-identifier`, `int16`, `int32`, `int64`, `int8`, `leafref`, `string`, `uint16`, `uint32`, `uint64`, `uint8`, `union`), NameClass, nil},
|
||||
|
||||
{`[^;{}\s\'\"]+`, Text, nil},
|
||||
|
@ -63,5 +67,5 @@ var YANG = internal.Register(MustNewLexer(
|
|||
{`\*/`, CommentMultiline, Pop(1)},
|
||||
{`[*/]`, CommentMultiline, nil},
|
||||
},
|
||||
},
|
||||
))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue