mirror of
https://github.com/cheat/cheat.git
synced 2025-09-02 10:08:30 +02:00
chore(deps): resolve dependency conflict
This commit is contained in:
81
vendor/github.com/alecthomas/chroma/lexers/t/terraform.go
generated
vendored
81
vendor/github.com/alecthomas/chroma/lexers/t/terraform.go
generated
vendored
@ -15,55 +15,46 @@ var Terraform = internal.Register(MustNewLexer(
|
||||
},
|
||||
Rules{
|
||||
"root": {
|
||||
Include("string"),
|
||||
Include("punctuation"),
|
||||
Include("curly"),
|
||||
Include("basic"),
|
||||
Include("whitespace"),
|
||||
{`[0-9]+`, LiteralNumber, nil},
|
||||
{`[\[\](),.{}]`, Punctuation, nil},
|
||||
{`-?[0-9]+`, LiteralNumber, nil},
|
||||
{`=>`, Punctuation, nil},
|
||||
{Words(``, `\b`, `true`, `false`), KeywordConstant, nil},
|
||||
{`/(?s)\*(((?!\*/).)*)\*/`, CommentMultiline, nil},
|
||||
{`\s*(#|//).*\n`, CommentSingle, nil},
|
||||
{`([a-zA-Z]\w*)(\s*)(=(?!>))`, ByGroups(NameAttribute, Text, Text), nil},
|
||||
{Words(`^\s*`, `\b`, `variable`, `data`, `resource`, `provider`, `provisioner`, `module`, `output`), KeywordReserved, nil},
|
||||
{Words(``, `\b`, `for`, `in`), Keyword, nil},
|
||||
{Words(``, ``, `count`, `data`, `var`, `module`, `each`), NameBuiltin, nil},
|
||||
{Words(``, `\b`, `abs`, `ceil`, `floor`, `log`, `max`, `min`, `parseint`, `pow`, `signum`), NameBuiltin, nil},
|
||||
{Words(``, `\b`, `chomp`, `format`, `formatlist`, `indent`, `join`, `lower`, `regex`, `regexall`, `replace`, `split`, `strrev`, `substr`, `title`, `trim`, `trimprefix`, `trimsuffix`, `trimspace`, `upper`), NameBuiltin, nil},
|
||||
{Words(`[^.]`, `\b`, `chunklist`, `coalesce`, `coalescelist`, `compact`, `concat`, `contains`, `distinct`, `element`, `flatten`, `index`, `keys`, `length`, `list`, `lookup`, `map`, `matchkeys`, `merge`, `range`, `reverse`, `setintersection`, `setproduct`, `setsubtract`, `setunion`, `slice`, `sort`, `transpose`, `values`, `zipmap`), NameBuiltin, nil},
|
||||
{Words(`[^.]`, `\b`, `base64decode`, `base64encode`, `base64gzip`, `csvdecode`, `jsondecode`, `jsonencode`, `urlencode`, `yamldecode`, `yamlencode`), NameBuiltin, nil},
|
||||
{Words(``, `\b`, `abspath`, `dirname`, `pathexpand`, `basename`, `file`, `fileexists`, `fileset`, `filebase64`, `templatefile`), NameBuiltin, nil},
|
||||
{Words(``, `\b`, `formatdate`, `timeadd`, `timestamp`), NameBuiltin, nil},
|
||||
{Words(``, `\b`, `base64sha256`, `base64sha512`, `bcrypt`, `filebase64sha256`, `filebase64sha512`, `filemd5`, `filesha1`, `filesha256`, `filesha512`, `md5`, `rsadecrypt`, `sha1`, `sha256`, `sha512`, `uuid`, `uuidv5`), NameBuiltin, nil},
|
||||
{Words(``, `\b`, `cidrhost`, `cidrnetmask`, `cidrsubnet`), NameBuiltin, nil},
|
||||
{Words(``, `\b`, `can`, `tobool`, `tolist`, `tomap`, `tonumber`, `toset`, `tostring`, `try`), NameBuiltin, nil},
|
||||
{`=(?!>)|\+|-|\*|\/|:|!|%|>|<(?!<)|>=|<=|==|!=|&&|\||\?`, Operator, nil},
|
||||
{`\n|\s+|\\\n`, Text, nil},
|
||||
{`[a-zA-Z]\w*`, NameOther, nil},
|
||||
{`"`, LiteralStringDouble, Push("string")},
|
||||
{`(?s)(<<-?)(\w+)(\n\s*(?:(?!\2).)*\s*\n\s*)(\2)`, ByGroups(Operator, Operator, String, Operator), nil},
|
||||
},
|
||||
"basic": {
|
||||
{Words(`\b`, `\b`, `true`, `false`), KeywordType, nil},
|
||||
{`\s*/\*`, CommentMultiline, Push("comment")},
|
||||
{`\s*#.*\n`, CommentSingle, nil},
|
||||
{`(.*?)(\s*)(=)`, ByGroups(NameAttribute, Text, Operator), nil},
|
||||
{Words(`\b`, `\b`, `variable`, `resource`, `provider`, `provisioner`, `module`), KeywordReserved, Push("function")},
|
||||
{Words(`\b`, `\b`, `ingress`, `egress`, `listener`, `default`, `connection`, `alias`), KeywordDeclaration, nil},
|
||||
{`\$\{`, LiteralStringInterpol, Push("var_builtin")},
|
||||
},
|
||||
"function": {
|
||||
{`(\s+)(".*")(\s+)`, ByGroups(Text, LiteralString, Text), nil},
|
||||
Include("punctuation"),
|
||||
Include("curly"),
|
||||
},
|
||||
"var_builtin": {
|
||||
{`\$\{`, LiteralStringInterpol, Push()},
|
||||
{Words(`\b`, `\b`, `concat`, `file`, `join`, `lookup`, `element`), NameBuiltin, nil},
|
||||
Include("string"),
|
||||
Include("punctuation"),
|
||||
{`\s+`, Text, nil},
|
||||
{`\}`, LiteralStringInterpol, Pop(1)},
|
||||
"declaration": {
|
||||
{`(\s*)("(?:\\\\|\\"|[^"])*")(\s*)`, ByGroups(Text, NameVariable, Text), nil},
|
||||
{`\{`, Punctuation, Pop(1)},
|
||||
},
|
||||
"string": {
|
||||
{`(".*")`, ByGroups(LiteralStringDouble), nil},
|
||||
{`"`, LiteralStringDouble, Pop(1)},
|
||||
{`\\\\`, LiteralStringDouble, nil},
|
||||
{`\\\\"`, LiteralStringDouble, nil},
|
||||
{`\$\{`, LiteralStringInterpol, Push("interp-inside")},
|
||||
{`\$`, LiteralStringDouble, nil},
|
||||
{`[^"\\\\$]+`, LiteralStringDouble, nil},
|
||||
},
|
||||
"punctuation": {
|
||||
{`[\[\](),.]`, Punctuation, nil},
|
||||
},
|
||||
"curly": {
|
||||
{`\{`, TextPunctuation, nil},
|
||||
{`\}`, TextPunctuation, nil},
|
||||
},
|
||||
"comment": {
|
||||
{`[^*/]`, CommentMultiline, nil},
|
||||
{`/\*`, CommentMultiline, Push()},
|
||||
{`\*/`, CommentMultiline, Pop(1)},
|
||||
{`[*/]`, CommentMultiline, nil},
|
||||
},
|
||||
"whitespace": {
|
||||
{`\n`, Text, nil},
|
||||
{`\s+`, Text, nil},
|
||||
{`\\\n`, Text, nil},
|
||||
"interp-inside": {
|
||||
{`\}`, LiteralStringInterpol, Pop(1)},
|
||||
Include("root"),
|
||||
},
|
||||
},
|
||||
))
|
||||
|
26
vendor/github.com/alecthomas/chroma/lexers/t/typescript.go
generated
vendored
26
vendor/github.com/alecthomas/chroma/lexers/t/typescript.go
generated
vendored
@ -9,7 +9,7 @@ import (
|
||||
var TypeScript = internal.Register(MustNewLexer(
|
||||
&Config{
|
||||
Name: "TypeScript",
|
||||
Aliases: []string{"ts", "typescript"},
|
||||
Aliases: []string{"ts", "tsx", "typescript"},
|
||||
Filenames: []string{"*.ts", "*.tsx"},
|
||||
MimeTypes: []string{"text/x-typescript"},
|
||||
DotAll: true,
|
||||
@ -32,6 +32,7 @@ var TypeScript = internal.Register(MustNewLexer(
|
||||
{`\n`, Text, Pop(1)},
|
||||
},
|
||||
"root": {
|
||||
Include("jsx"),
|
||||
{`^(?=\s|/|<!--)`, Text, Push("slashstartsregex")},
|
||||
Include("commentsandwhitespace"),
|
||||
{`\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|(<<|>>>?|==?|!=?|[-<>+*%&|^/])=?`, Operator, Push("slashstartsregex")},
|
||||
@ -69,5 +70,28 @@ var TypeScript = internal.Register(MustNewLexer(
|
||||
{`\}`, LiteralStringInterpol, Pop(1)},
|
||||
Include("root"),
|
||||
},
|
||||
"jsx": {
|
||||
{`(<)(/?)(>)`, ByGroups(Punctuation, Punctuation, Punctuation), nil},
|
||||
{`(<)([\w\.]+)`, ByGroups(Punctuation, NameTag), Push("tag")},
|
||||
{`(<)(/)([\w\.]*)(>)`, ByGroups(Punctuation, Punctuation, NameTag, Punctuation), nil},
|
||||
},
|
||||
"tag": {
|
||||
{`\s+`, Text, nil},
|
||||
{`([\w]+\s*)(=)(\s*)`, ByGroups(NameAttribute, Operator, Text), Push("attr")},
|
||||
{`[{}]+`, Punctuation, nil},
|
||||
{`[\w\.]+`, NameAttribute, nil},
|
||||
{`(/?)(\s*)(>)`, ByGroups(Punctuation, Text, Punctuation), Pop(1)},
|
||||
},
|
||||
"attr": {
|
||||
{`{`, Punctuation, Push("expression")},
|
||||
{`".*?"`, LiteralString, Pop(1)},
|
||||
{`'.*?'`, LiteralString, Pop(1)},
|
||||
Default(Pop(1)),
|
||||
},
|
||||
"expression": {
|
||||
{`{`, Punctuation, Push()},
|
||||
{`}`, Punctuation, Pop(1)},
|
||||
Include("root"),
|
||||
},
|
||||
},
|
||||
))
|
||||
|
3
vendor/github.com/alecthomas/chroma/lexers/t/typoscript.go
generated
vendored
3
vendor/github.com/alecthomas/chroma/lexers/t/typoscript.go
generated
vendored
@ -10,9 +10,10 @@ var Typoscript = internal.Register(MustNewLexer(
|
||||
&Config{
|
||||
Name: "TypoScript",
|
||||
Aliases: []string{"typoscript"},
|
||||
Filenames: []string{"*.ts", "*.txt"},
|
||||
Filenames: []string{"*.ts"},
|
||||
MimeTypes: []string{"text/x-typoscript"},
|
||||
DotAll: true,
|
||||
Priority: 0.1,
|
||||
},
|
||||
Rules{
|
||||
"root": {
|
||||
|
Reference in New Issue
Block a user