chore(deps): update dependencies

This commit is contained in:
Chris Lane
2021-04-28 12:23:24 -04:00
parent e847956b02
commit 0aca411279
493 changed files with 16142 additions and 2916 deletions

View File

@ -6,7 +6,7 @@ import (
)
// Ruby lexer.
var Ruby = internal.Register(MustNewLexer(
var Ruby = internal.Register(MustNewLazyLexer(
&Config{
Name: "Ruby",
Aliases: []string{"rb", "ruby", "duby"},
@ -14,7 +14,11 @@ var Ruby = internal.Register(MustNewLexer(
MimeTypes: []string{"text/x-ruby", "application/x-ruby"},
DotAll: true,
},
Rules{
rubyRules,
))
func rubyRules() Rules {
return Rules{
"root": {
{`\A#!.+?$`, CommentHashbang, nil},
{`#.*?$`, CommentSingle, nil},
@ -39,7 +43,7 @@ var Ruby = internal.Register(MustNewLexer(
{`(0_?[0-7]+(?:_[0-7]+)*)(\s*)([/?])?`, ByGroups(LiteralNumberOct, Text, Operator), nil},
{`(0x[0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*)(\s*)([/?])?`, ByGroups(LiteralNumberHex, Text, Operator), nil},
{`(0b[01]+(?:_[01]+)*)(\s*)([/?])?`, ByGroups(LiteralNumberBin, Text, Operator), nil},
{`([\d]+(?:_\d+)*)(\s*)([/?])?`, ByGroups(LiteralNumberInteger, Text, Operator), nil},
{`([\d]+(?:[_e]\d+)*)(\s*)([/?])?`, ByGroups(LiteralNumberInteger, Text, Operator), nil},
{`@@[a-zA-Z_]\w*`, NameVariableClass, nil},
{`@[a-zA-Z_]\w*`, NameVariableInstance, nil},
{`\$\w+`, NameVariableGlobal, nil},
@ -246,5 +250,5 @@ var Ruby = internal.Register(MustNewLexer(
{`[\\#<>]`, LiteralStringRegex, nil},
{`[^\\#<>]+`, LiteralStringRegex, nil},
},
},
))
}
}