Squashed commit of the following:

commit 95479c8ad744db48386a5c78e54ef8da80e9120b
Author: Chris Lane <chris@chris-allen-lane.com>
Date:   Wed Apr 28 12:26:32 2021 -0400

    chore(version): bump version to 4.2.1

commit 6956f51cae
Author: Chris Lane <chris@chris-allen-lane.com>
Date:   Wed Apr 28 12:24:21 2021 -0400

    fix(Makefile): `vendor-update`

    Update the `vendor-update` build target to run `go mod vendor` after
    updating dependencies.

commit 0aca411279
Author: Chris Lane <chris@chris-allen-lane.com>
Date:   Wed Apr 28 12:23:24 2021 -0400

    chore(deps): update dependencies

commit e847956b02
Author: Chris Lane <chris@chris-allen-lane.com>
Date:   Wed Apr 28 08:26:51 2021 -0400

    chore(deps): build updates

    - Upgrade `go` to `1.16.3`

    - Attempt to fix build errors regarding dependencies
This commit is contained in:
Chris Lane
2021-04-28 12:35:32 -04:00
parent 883a17092f
commit 55b18b4897
495 changed files with 16144 additions and 2927 deletions

View File

@ -6,14 +6,18 @@ import (
)
// J lexer.
var J = internal.Register(MustNewLexer(
var J = internal.Register(MustNewLazyLexer(
&Config{
Name: "J",
Aliases: []string{"j"},
Filenames: []string{"*.ijs"},
MimeTypes: []string{"text/x-j"},
},
Rules{
jRules,
))
func jRules() Rules {
return Rules{
"root": {
{`#!.*$`, CommentPreproc, nil},
{`NB\..*`, CommentSingle, nil},
@ -69,5 +73,5 @@ var J = internal.Register(MustNewLexer(
{`''`, LiteralString, nil},
{`'`, LiteralString, Pop(1)},
},
},
))
}
}

View File

@ -6,15 +6,20 @@ import (
)
// Java lexer.
var Java = internal.Register(MustNewLexer(
var Java = internal.Register(MustNewLazyLexer(
&Config{
Name: "Java",
Aliases: []string{"java"},
Filenames: []string{"*.java"},
MimeTypes: []string{"text/x-java"},
DotAll: true,
EnsureNL: true,
},
Rules{
javaRules,
))
func javaRules() Rules {
return Rules{
"root": {
{`[^\S\n]+`, Text, nil},
{`//.*?\n`, CommentSingle, nil},
@ -47,5 +52,5 @@ var Java = internal.Register(MustNewLexer(
"import": {
{`[\w.]+\*?`, NameNamespace, Pop(1)},
},
},
))
}
}

View File

@ -26,11 +26,11 @@ var JavascriptRules = Rules{
{`\A#! ?/.*?\n`, CommentHashbang, nil},
{`^(?=\s|/|<!--)`, Text, Push("slashstartsregex")},
Include("commentsandwhitespace"),
{`(\.\d+|[0-9]+\.[0-9]*)([eE][-+]?[0-9]+)?`, LiteralNumberFloat, nil},
{`\d+(\.\d*|[eE][+\-]?\d+)`, LiteralNumberFloat, nil},
{`0[bB][01]+`, LiteralNumberBin, nil},
{`0[oO][0-7]+`, LiteralNumberOct, nil},
{`0[xX][0-9a-fA-F]+`, LiteralNumberHex, nil},
{`[0-9]+`, LiteralNumberInteger, nil},
{`[0-9_]+`, LiteralNumberInteger, nil},
{`\.\.\.|=>`, Punctuation, nil},
{`\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|(<<|>>>?|==?|!=?|[-<>+*%&|^/])=?`, Operator, Push("slashstartsregex")},
{`[{(\[;,]`, Punctuation, Push("slashstartsregex")},
@ -65,7 +65,7 @@ var Javascript = internal.Register(MustNewLexer(
&Config{
Name: "JavaScript",
Aliases: []string{"js", "javascript"},
Filenames: []string{"*.js", "*.jsm"},
Filenames: []string{"*.js", "*.jsm", "*.mjs"},
MimeTypes: []string{"application/javascript", "application/x-javascript", "text/x-javascript", "text/javascript"},
DotAll: true,
EnsureNL: true,

View File

@ -6,7 +6,7 @@ import (
)
// JSON lexer.
var JSON = internal.Register(MustNewLexer(
var JSON = internal.Register(MustNewLazyLexer(
&Config{
Name: "JSON",
Aliases: []string{"json"},
@ -15,7 +15,11 @@ var JSON = internal.Register(MustNewLexer(
NotMultiline: true,
DotAll: true,
},
Rules{
jsonRules,
))
func jsonRules() Rules {
return Rules{
"whitespace": {
{`\s+`, Text, nil},
},
@ -51,5 +55,5 @@ var JSON = internal.Register(MustNewLexer(
"root": {
Include("value"),
},
},
))
}
}

View File

@ -8,7 +8,7 @@ import (
// JSX lexer.
//
// This was generated from https://github.com/fcurella/jsx-lexer
var JSX = internal.Register(MustNewLexer(
var JSX = internal.Register(MustNewLazyLexer(
&Config{
Name: "react",
Aliases: []string{"jsx", "react"},
@ -16,7 +16,11 @@ var JSX = internal.Register(MustNewLexer(
MimeTypes: []string{"text/jsx", "text/typescript-jsx"},
DotAll: true,
},
Rules{
jsxRules,
))
func jsxRules() Rules {
return Rules{
"commentsandwhitespace": {
{`\s+`, Text, nil},
{`<!--`, Comment, nil},
@ -91,5 +95,5 @@ var JSX = internal.Register(MustNewLexer(
{`}`, Punctuation, Pop(1)},
Include("root"),
},
},
))
}
}

File diff suppressed because one or more lines are too long

View File

@ -5,14 +5,18 @@ import (
"github.com/alecthomas/chroma/lexers/internal"
)
var Jungle = internal.Register(MustNewLexer(
var Jungle = internal.Register(MustNewLazyLexer(
&Config{
Name: "Jungle",
Aliases: []string{"jungle"},
Filenames: []string{"*.jungle"},
MimeTypes: []string{"text/x-jungle"},
},
Rules{
jungleRules,
))
func jungleRules() Rules {
return Rules{
"root": {
{`[^\S\n]+`, Text, nil},
{`\n`, Text, nil},
@ -46,5 +50,5 @@ var Jungle = internal.Register(MustNewLexer(
{`[a-zA-Z_]\w*`, Name, nil},
Default(Pop(1)),
},
},
))
}
}