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 (
)
// CPP lexer.
var CPP = internal.Register(MustNewLexer(
var CPP = internal.Register(MustNewLazyLexer(
&Config{
Name: "C++",
Aliases: []string{"cpp", "c++"},
@ -14,7 +14,11 @@ var CPP = internal.Register(MustNewLexer(
MimeTypes: []string{"text/x-c++hdr", "text/x-c++src"},
EnsureNL: true,
},
Rules{
cppRules,
))
func cppRules() Rules {
return Rules{
"statements": {
{Words(``, `\b`, `catch`, `const_cast`, `delete`, `dynamic_cast`, `explicit`, `export`, `friend`, `mutable`, `namespace`, `new`, `operator`, `private`, `protected`, `public`, `reinterpret_cast`, `restrict`, `static_cast`, `template`, `this`, `throw`, `throws`, `try`, `typeid`, `typename`, `using`, `virtual`, `constexpr`, `nullptr`, `decltype`, `thread_local`, `alignas`, `alignof`, `static_assert`, `noexcept`, `override`, `final`, `concept`, `requires`, `consteval`, `co_await`, `co_return`, `co_yield`), Keyword, nil},
{`(enum)\b(\s+)(class)\b(\s*)`, ByGroups(Keyword, Text, Keyword, Text), Push("classname")},
@ -102,5 +106,5 @@ var CPP = internal.Register(MustNewLexer(
{`^\s*#endif.*?(?<!\\)\n`, CommentPreproc, Pop(1)},
{`.*?\n`, Comment, nil},
},
},
))
}
}