From b8cd815fc5de4385ef80d87b24035029e15bcce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20F=2E=20R=C3=B8dseth?= Date: Sat, 9 Sep 2023 10:30:47 +0200 Subject: [PATCH] Update dependencies --- go.mod | 2 +- go.sum | 4 +- .../alecthomas/chroma/v2/.gitignore | 5 + .../github.com/alecthomas/chroma/v2/Bitfile | 24 + .../github.com/alecthomas/chroma/v2/Makefile | 8 +- .../github.com/alecthomas/chroma/v2/README.md | 121 ++-- .../github.com/alecthomas/chroma/v2/lexer.go | 20 + .../alecthomas/chroma/v2/lexers/bash.go | 17 - .../alecthomas/chroma/v2/lexers/chapel.go | 62 --- .../alecthomas/chroma/v2/lexers/cheetah.go | 39 -- .../alecthomas/chroma/v2/lexers/cql.go | 70 --- .../alecthomas/chroma/v2/lexers/docker.go | 32 -- .../embedded/{aql.xml => arangodb_aql.xml} | 17 +- .../chroma/v2/lexers/embedded/bash.xml | 3 + .../{bashsession.xml => bash_session.xml} | 4 +- .../v2/lexers/embedded/{csharp.xml => c#.xml} | 10 +- .../chroma/v2/lexers/embedded/c++.xml | 7 +- .../chroma/v2/lexers/embedded/c.xml | 4 + .../v2/lexers/embedded/cassandra_cql.xml | 137 +++++ .../chroma/v2/lexers/embedded/chapel.xml | 143 +++++ .../chroma/v2/lexers/embedded/cheetah.xml | 55 ++ .../chroma/v2/lexers/embedded/clojure.xml | 5 +- .../chroma/v2/lexers/embedded/dns.xml | 6 +- .../chroma/v2/lexers/embedded/docker.xml | 56 ++ .../chroma/v2/lexers/embedded/elixir.xml | 1 + .../v2/lexers/embedded/fortranfixed.xml | 71 +++ .../chroma/v2/lexers/embedded/gas.xml | 1 + .../chroma/v2/lexers/embedded/gdscript.xml | 312 ++++++----- .../chroma/v2/lexers/embedded/gdscript3.xml | 268 +++++++++ .../chroma/v2/lexers/embedded/go_template.xml | 4 +- .../chroma/v2/lexers/embedded/groovy.xml | 8 +- .../chroma/v2/lexers/embedded/hlsl.xml | 5 +- .../chroma/v2/lexers/embedded/html.xml | 159 ++++++ .../chroma/v2/lexers/embedded/ini.xml | 1 + .../chroma/v2/lexers/embedded/iscdhcpd.xml | 2 +- .../chroma/v2/lexers/embedded/java.xml | 5 +- ...pd.xml => lighttpd_configuration_file.xml} | 0 .../chroma/v2/lexers/embedded/makefile.xml | 128 +++++ .../chroma/v2/lexers/embedded/mako.xml | 120 ++++ .../chroma/v2/lexers/embedded/mason.xml | 89 +++ .../chroma/v2/lexers/embedded/mathematica.xml | 8 +- .../chroma/v2/lexers/embedded/myghty.xml | 77 +++ .../chroma/v2/lexers/embedded/nasm.xml | 2 + ...nginx.xml => nginx_configuration_file.xml} | 0 .../chroma/v2/lexers/embedded/odin.xml | 113 ++++ .../v2/lexers/embedded/openedge_abl.xml | 101 ++++ .../chroma/v2/lexers/embedded/org_mode.xml | 329 +++++++++++ .../chroma/v2/lexers/embedded/plaintext.xml | 21 + .../embedded/postgresql_sql_dialect.xml | 155 ++++++ .../{protobuf.xml => protocol_buffer.xml} | 54 +- .../chroma/v2/lexers/embedded/r.xml | 1 + .../chroma/v2/lexers/embedded/smarty.xml | 79 +++ .../chroma/v2/lexers/embedded/sourcepawn.xml | 59 ++ .../chroma/v2/lexers/embedded/toml.xml | 2 + .../chroma/v2/lexers/embedded/twig.xml | 1 + .../chroma/v2/lexers/embedded/typoscript.xml | 178 ++++++ .../chroma/v2/lexers/embedded/v.xml | 355 ++++++++++++ .../chroma/v2/lexers/embedded/v_shell.xml | 365 ++++++++++++ .../chroma/v2/lexers/embedded/viml.xml | 85 +++ .../{wgsl.xml => webgpu_shading_language.xml} | 165 ++++-- .../chroma/v2/lexers/embedded/z80.xml | 36 -- .../v2/lexers/embedded/z80_assembly.xml | 74 +++ .../chroma/v2/lexers/fortran_fixed.go | 38 -- .../alecthomas/chroma/v2/lexers/go.go | 2 +- .../alecthomas/chroma/v2/lexers/haxe.go | 4 +- .../alecthomas/chroma/v2/lexers/html.go | 56 +- .../alecthomas/chroma/v2/lexers/make.go | 56 -- .../alecthomas/chroma/v2/lexers/mako.go | 62 --- .../alecthomas/chroma/v2/lexers/mason.go | 44 -- .../alecthomas/chroma/v2/lexers/myghty.go | 42 -- .../chroma/v2/lexers/openedgeabl.go | 49 -- .../alecthomas/chroma/v2/lexers/org.go | 99 ---- .../alecthomas/chroma/v2/lexers/plaintext.go | 16 - .../alecthomas/chroma/v2/lexers/postgres.go | 77 --- .../alecthomas/chroma/v2/lexers/smarty.go | 42 -- .../alecthomas/chroma/v2/lexers/v.go | 173 ------ .../alecthomas/chroma/v2/lexers/vim.go | 39 -- .../alecthomas/chroma/v2/mutators.go | 2 +- .../github.com/alecthomas/chroma/v2/regexp.go | 17 +- .../alecthomas/chroma/v2/registry.go | 25 +- .../alecthomas/chroma/v2/serialise.go | 51 +- .../chroma/v2/styles/catppuccin-frappe.xml | 105 ++-- .../chroma/v2/styles/catppuccin-latte.xml | 105 ++-- .../chroma/v2/styles/catppuccin-macchiato.xml | 105 ++-- .../chroma/v2/styles/catppuccin-mocha.xml | 105 ++-- .../chroma/v2/styles/github-dark.xml | 8 +- .../alecthomas/chroma/v2/styles/onedark.xml | 2 + .../github.com/alecthomas/chroma/v2/table.py | 3 +- .../alecthomas/chroma/v2/tokentype_enumer.go | 519 ++++++++++++++---- vendor/modules.txt | 2 +- 90 files changed, 4514 insertions(+), 1619 deletions(-) create mode 100644 vendor/github.com/alecthomas/chroma/v2/Bitfile delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/bash.go delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/chapel.go delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/cheetah.go delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/cql.go delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/docker.go rename vendor/github.com/alecthomas/chroma/v2/lexers/embedded/{aql.xml => arangodb_aql.xml} (96%) rename vendor/github.com/alecthomas/chroma/v2/lexers/embedded/{bashsession.xml => bash_session.xml} (84%) rename vendor/github.com/alecthomas/chroma/v2/lexers/embedded/{csharp.xml => c#.xml} (81%) create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/cassandra_cql.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/chapel.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/cheetah.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/docker.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/fortranfixed.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gdscript3.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/html.xml rename vendor/github.com/alecthomas/chroma/v2/lexers/embedded/{lighttpd.xml => lighttpd_configuration_file.xml} (100%) create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/makefile.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mako.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mason.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/myghty.xml rename vendor/github.com/alecthomas/chroma/v2/lexers/embedded/{nginx.xml => nginx_configuration_file.xml} (100%) create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/odin.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/openedge_abl.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/org_mode.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/plaintext.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/postgresql_sql_dialect.xml rename vendor/github.com/alecthomas/chroma/v2/lexers/embedded/{protobuf.xml => protocol_buffer.xml} (100%) create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/smarty.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/sourcepawn.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/typoscript.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/v.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/v_shell.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/viml.xml rename vendor/github.com/alecthomas/chroma/v2/lexers/embedded/{wgsl.xml => webgpu_shading_language.xml} (89%) delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/z80.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/z80_assembly.xml delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/fortran_fixed.go delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/make.go delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/mako.go delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/mason.go delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/myghty.go delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/openedgeabl.go delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/org.go delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/plaintext.go delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/postgres.go delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/smarty.go delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/v.go delete mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/vim.go diff --git a/go.mod b/go.mod index aee2d9b9d..e21e6cab3 100644 --- a/go.mod +++ b/go.mod @@ -52,7 +52,7 @@ require ( require ( github.com/DataDog/gostackparse v0.7.0 // indirect - github.com/alecthomas/chroma/v2 v2.8.0 // indirect + github.com/alecthomas/chroma/v2 v2.9.1 // indirect github.com/dlclark/regexp2 v1.10.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-sql-driver/mysql v1.7.1 // indirect diff --git a/go.sum b/go.sum index ce178569e..118969cef 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,8 @@ github.com/DataDog/gostackparse v0.7.0/go.mod h1:lTfqcJKqS9KnXQGnyQMCugq3u1FP6UZ github.com/alecthomas/assert/v2 v2.2.1 h1:XivOgYcduV98QCahG8T5XTezV5bylXe+lBxLG2K2ink= github.com/alecthomas/assert/v2 v2.2.1/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= github.com/alecthomas/chroma/v2 v2.7.1-0.20230409061740-3c219428245c/go.mod h1:yrkMI9807G1ROx13fhe1v6PN2DDeaR73L3d+1nmYQtw= -github.com/alecthomas/chroma/v2 v2.8.0 h1:w9WJUjFFmHHB2e8mRpL9jjy3alYDlU0QLDezj1xE264= -github.com/alecthomas/chroma/v2 v2.8.0/go.mod h1:yrkMI9807G1ROx13fhe1v6PN2DDeaR73L3d+1nmYQtw= +github.com/alecthomas/chroma/v2 v2.9.1 h1:0O3lTQh9FxazJ4BYE/MOi/vDGuHn7B+6Bu902N2UZvU= +github.com/alecthomas/chroma/v2 v2.9.1/go.mod h1:4TQu7gdfuPjSh76j78ietmqh9LiurGF0EpseFXdKMBw= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= diff --git a/vendor/github.com/alecthomas/chroma/v2/.gitignore b/vendor/github.com/alecthomas/chroma/v2/.gitignore index 6ff4b070f..8cbdd75ea 100644 --- a/vendor/github.com/alecthomas/chroma/v2/.gitignore +++ b/vendor/github.com/alecthomas/chroma/v2/.gitignore @@ -1,4 +1,8 @@ # Binaries for programs and plugins +.git +.idea +.vscode +.hermit *.exe *.dll *.so @@ -18,3 +22,4 @@ _models/ _examples/ *.min.* +build/ diff --git a/vendor/github.com/alecthomas/chroma/v2/Bitfile b/vendor/github.com/alecthomas/chroma/v2/Bitfile new file mode 100644 index 000000000..bf158633a --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/Bitfile @@ -0,0 +1,24 @@ +VERSION = %(git describe --tags --dirty --always)% +export CGOENABLED = 0 + +tokentype_enumer.go: types.go + build: go generate + +# Regenerate the list of lexers in the README +README.md: lexers/*.go lexers/*/*.xml table.py + build: ./table.py + -clean + +implicit %{1}%{2}.min.%{3}: **/*.{css,js} + build: esbuild --bundle %{IN} --minify --outfile=%{OUT} + +implicit build/%{1}: cmd/* + cd cmd/%{1} + inputs: cmd/%{1}/**/* **/*.go + build: go build -ldflags="-X 'main.version=%{VERSION}'" -o ../../build/%{1} . + +#upload: chromad +# build: +# scp chromad root@swapoff.org: +# ssh root@swapoff.org 'install -m755 ./chromad /srv/http/swapoff.org/bin && service chromad restart' +# touch upload diff --git a/vendor/github.com/alecthomas/chroma/v2/Makefile b/vendor/github.com/alecthomas/chroma/v2/Makefile index fe7cb0bed..e2ff762e6 100644 --- a/vendor/github.com/alecthomas/chroma/v2/Makefile +++ b/vendor/github.com/alecthomas/chroma/v2/Makefile @@ -13,11 +13,11 @@ tokentype_string.go: types.go go generate chromad: - rm -f chromad + rm -rf build esbuild --bundle cmd/chromad/static/index.js --minify --outfile=cmd/chromad/static/index.min.js esbuild --bundle cmd/chromad/static/index.css --minify --outfile=cmd/chromad/static/index.min.css - (export CGOENABLED=0 ; cd ./cmd/chromad && go build -ldflags="-X 'main.version=$(VERSION)'" -o ../../chromad .) + (export CGOENABLED=0 ; cd ./cmd/chromad && go build -ldflags="-X 'main.version=$(VERSION)'" -o ../../build/chromad .) -upload: chromad - scp chromad root@swapoff.org: && \ +upload: build/chromad + scp build/chromad root@swapoff.org: && \ ssh root@swapoff.org 'install -m755 ./chromad /srv/http/swapoff.org/bin && service chromad restart' diff --git a/vendor/github.com/alecthomas/chroma/v2/README.md b/vendor/github.com/alecthomas/chroma/v2/README.md index 84ca20e03..cc504eb58 100644 --- a/vendor/github.com/alecthomas/chroma/v2/README.md +++ b/vendor/github.com/alecthomas/chroma/v2/README.md @@ -1,7 +1,6 @@ # Chroma — A general purpose syntax highlighter in pure Go -[![Golang Documentation](https://godoc.org/github.com/alecthomas/chroma?status.svg)](https://godoc.org/github.com/alecthomas/chroma) [![CI](https://github.com/alecthomas/chroma/actions/workflows/ci.yml/badge.svg)](https://github.com/alecthomas/chroma/actions/workflows/ci.yml) [![Slack chat](https://img.shields.io/static/v1?logo=slack&style=flat&label=slack&color=green&message=gophers)](https://invite.slack.golangbridge.org/) -> **NOTE:** As Chroma has just been released, its API is still in flux. That said, the high-level interface should not change significantly. +[![Golang Documentation](https://godoc.org/github.com/alecthomas/chroma?status.svg)](https://godoc.org/github.com/alecthomas/chroma) [![CI](https://github.com/alecthomas/chroma/actions/workflows/ci.yml/badge.svg)](https://github.com/alecthomas/chroma/actions/workflows/ci.yml) [![Slack chat](https://img.shields.io/static/v1?logo=slack&style=flat&label=slack&color=green&message=gophers)](https://invite.slack.golangbridge.org/) Chroma takes source code and other structured text and converts it into syntax highlighted HTML, ANSI-coloured text, etc. @@ -10,6 +9,7 @@ Chroma is based heavily on [Pygments](http://pygments.org/), and includes translators for Pygments lexers and styles. + ## Table of Contents @@ -18,14 +18,14 @@ translators for Pygments lexers and styles. 2. [Supported languages](#supported-languages) 3. [Try it](#try-it) 4. [Using the library](#using-the-library) - 1. [Quick start](#quick-start) - 2. [Identifying the language](#identifying-the-language) - 3. [Formatting the output](#formatting-the-output) - 4. [The HTML formatter](#the-html-formatter) + 1. [Quick start](#quick-start) + 2. [Identifying the language](#identifying-the-language) + 3. [Formatting the output](#formatting-the-output) + 4. [The HTML formatter](#the-html-formatter) 5. [More detail](#more-detail) - 1. [Lexers](#lexers) - 2. [Formatters](#formatters) - 3. [Styles](#styles) + 1. [Lexers](#lexers) + 2. [Formatters](#formatters) + 3. [Styles](#styles) 6. [Command-line interface](#command-line-interface) 7. [Testing lexers](#testing-lexers) 8. [What's missing compared to Pygments?](#whats-missing-compared-to-pygments) @@ -33,46 +33,48 @@ translators for Pygments lexers and styles. -## Supported languages -Prefix | Language -:----: | -------- -A | ABAP, ABNF, ActionScript, ActionScript 3, Ada, Angular2, ANTLR, ApacheConf, APL, AppleScript, ArangoDB AQL, Arduino, Awk -B | Ballerina, Bash, Batchfile, BibTeX, Bicep, BlitzBasic, BNF, Brainfuck, BQN -C | C, C#, C++, Caddyfile, Caddyfile Directives, Cap'n Proto, Cassandra CQL, Ceylon, CFEngine3, cfstatement, ChaiScript, Chapel, Cheetah, Clojure, CMake, COBOL, CoffeeScript, Common Lisp, Coq, Crystal, CSS, Cython -D | D, Dart, Diff, Django/Jinja, Docker, DTD, Dylan -E | EBNF, Elixir, Elm, EmacsLisp, Erlang -F | Factor, Fish, Forth, Fortran, FSharp -G | GAS, GDScript, Genshi, Genshi HTML, Genshi Text, Gherkin, GLSL, Gnuplot, Go, Go HTML Template, Go Text Template, GraphQL, Groff, Groovy -H | Handlebars, Haskell, Haxe, HCL, Hexdump, HLB, HLSL, HTML, HTTP, Hy -I | Idris, Igor, INI, Io -J | J, Java, JavaScript, JSON, Julia, Jungle -K | Kotlin -L | Lighttpd configuration file, LLVM, Lua -M | Makefile, Mako, markdown, Mason, Mathematica, Matlab, MiniZinc, MLIR, Modula-2, MonkeyC, MorrowindScript, Myghty, MySQL -N | NASM, Newspeak, Nginx configuration file, Nim, Nix -O | Objective-C, OCaml, Octave, OnesEnterprise, OpenEdge ABL, OpenSCAD, Org Mode -P | PacmanConf, Perl, PHP, PHTML, Pig, PkgConfig, PL/pgSQL, plaintext, Pony, PostgreSQL SQL dialect, PostScript, POVRay, PowerShell, Prolog, PromQL, Properties, Protocol Buffer, PSL, Puppet, Python 2, Python -Q | QBasic -R | R, Racket, Ragel, Raku, react, ReasonML, reg, reStructuredText, Rexx, Ruby, Rust -S | SAS, Sass, Scala, Scheme, Scilab, SCSS, Sed, Smali, Smalltalk, Smarty, Snobol, Solidity, SPARQL, SQL, SquidConf, Standard ML, stas, Stylus, Svelte, Swift, SYSTEMD, systemverilog -T | TableGen, TASM, Tcl, Tcsh, Termcap, Terminfo, Terraform, TeX, Thrift, TOML, TradingView, Transact-SQL, Turing, Turtle, Twig, TypeScript, TypoScript, TypoScriptCssData, TypoScriptHtmlData -V | VB.net, verilog, VHDL, VHS, VimL, vue -W | WDTE -X | XML, Xorg -Y | YAML, YANG -Z | Zig +## Supported languages +| Prefix | Language | +| :----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| A | ABAP, ABNF, ActionScript, ActionScript 3, Ada, AL, Angular2, ANTLR, ApacheConf, APL, AppleScript, ArangoDB AQL, Arduino, ArmAsm, AutoHotkey, AutoIt, Awk | +| B | Ballerina, Bash, Bash Session, Batchfile, BibTeX, Bicep, BlitzBasic, BNF, BQN, Brainfuck | +| C | C, C#, C++, Caddyfile, Caddyfile Directives, Cap'n Proto, Cassandra CQL, Ceylon, CFEngine3, cfstatement, ChaiScript, Chapel, Cheetah, Clojure, CMake, COBOL, CoffeeScript, Common Lisp, Coq, Crystal, CSS, Cython | +| D | D, Dart, Diff, Django/Jinja, dns, Docker, DTD, Dylan | +| E | EBNF, Elixir, Elm, EmacsLisp, Erlang | +| F | Factor, Fennel, Fish, Forth, Fortran, FortranFixed, FSharp | +| G | GAS, GDScript, Genshi, Genshi HTML, Genshi Text, Gherkin, GLSL, Gnuplot, Go, Go HTML Template, Go Text Template, GraphQL, Groff, Groovy | +| H | Handlebars, Haskell, Haxe, HCL, Hexdump, HLB, HLSL, HolyC, HTML, HTTP, Hy | +| I | Idris, Igor, INI, Io, ISCdhcpd | +| J | J, Java, JavaScript, JSON, Julia, Jungle | +| K | Kotlin | +| L | Lighttpd configuration file, LLVM, Lua | +| M | Makefile, Mako, markdown, Mason, Mathematica, Matlab, mcfunction, Meson, Metal, MiniZinc, MLIR, Modula-2, MonkeyC, MorrowindScript, Myghty, MySQL | +| N | NASM, Natural, Newspeak, Nginx configuration file, Nim, Nix | +| O | Objective-C, OCaml, Octave, Odin, OnesEnterprise, OpenEdge ABL, OpenSCAD, Org Mode | +| P | PacmanConf, Perl, PHP, PHTML, Pig, PkgConfig, PL/pgSQL, plaintext, Plutus Core, Pony, PostgreSQL SQL dialect, PostScript, POVRay, PowerQuery, PowerShell, Prolog, PromQL, properties, Protocol Buffer, PSL, Puppet, Python, Python 2 | +| Q | QBasic, QML | +| R | R, Racket, Ragel, Raku, react, ReasonML, reg, reStructuredText, Rexx, Ruby, Rust | +| S | SAS, Sass, Scala, Scheme, Scilab, SCSS, Sed, Sieve, Smali, Smalltalk, Smarty, Snobol, Solidity, SourcePawn, SPARQL, SQL, SquidConf, Standard ML, stas, Stylus, Svelte, Swift, SYSTEMD, systemverilog | +| T | TableGen, Tal, TASM, Tcl, Tcsh, Termcap, Terminfo, Terraform, TeX, Thrift, TOML, TradingView, Transact-SQL, Turing, Turtle, Twig, TypeScript, TypoScript, TypoScriptCssData, TypoScriptHtmlData | +| V | V, V shell, Vala, VB.net, verilog, VHDL, VHS, VimL, vue | +| W | WDTE, WebGPU Shading Language, Whiley | +| X | XML, Xorg | +| Y | YAML, YANG | +| Z | Z80 Assembly, Zed, Zig | _I will attempt to keep this section up to date, but an authoritative list can be displayed with `chroma --list`._ + ## Try it Try out various languages and styles on the [Chroma Playground](https://swapoff.org/chroma/playground/). + ## Using the library Chroma, like Pygments, has the concepts of @@ -94,6 +96,7 @@ be returned. In this situation you may want to default to the `Fallback` value in each respective package, which provides sane defaults. + ### Quick start A convenience function exists that can be used to simply format some source @@ -104,6 +107,7 @@ err := quick.Highlight(os.Stdout, someSourceCode, "go", "html", "monokai") ``` + ### Identifying the language To highlight code, you'll first have to identify what language the code is @@ -111,21 +115,21 @@ written in. There are three primary ways to do that: 1. Detect the language from its filename. - ```go - lexer := lexers.Match("foo.go") - ``` + ```go + lexer := lexers.Match("foo.go") + ``` -3. Explicitly specify the language by its Chroma syntax ID (a full list is available from `lexers.Names()`). +2. Explicitly specify the language by its Chroma syntax ID (a full list is available from `lexers.Names()`). - ```go - lexer := lexers.Get("go") - ``` + ```go + lexer := lexers.Get("go") + ``` 3. Detect the language from its content. - ```go - lexer := lexers.Analyse("package main\n\nfunc main()\n{\n}\n") - ``` + ```go + lexer := lexers.Analyse("package main\n\nfunc main()\n{\n}\n") + ``` In all cases, `nil` will be returned if the language can not be identified. @@ -144,6 +148,7 @@ lexer = chroma.Coalesce(lexer) ``` + ### Formatting the output Once a language is identified you will need to pick a formatter and a style (theme). @@ -173,6 +178,7 @@ err := formatter.Format(w, style, iterator) ``` + ### The HTML formatter By default the `html` registered formatter generates standalone HTML with @@ -198,9 +204,11 @@ err := formatter.WriteCSS(w, style) ``` + ## More detail + ### Lexers See the [Pygments documentation](http://pygments.org/docs/lexerdevelopment/) @@ -221,6 +229,7 @@ See notes in [pygments-lexers.txt](https://github.com/alecthomas/chroma/blob/mas for a list of lexers, and notes on some of the issues importing them. + ### Formatters Chroma supports HTML output, as well as terminal output in 8 colour, 256 colour, and true-colour. @@ -229,6 +238,7 @@ A `noop` formatter is included that outputs the token text only, and a `tokens` formatter outputs raw tokens. The latter is useful for debugging lexers. + ### Styles Chroma styles are defined in XML. The style entries use the @@ -237,7 +247,7 @@ Chroma styles are defined in XML. The style entries use the All Pygments styles have been converted to Chroma using the `_tools/style.py` script. -When you work with one of [Chroma's styles](https://github.com/alecthomas/chroma/tree/master/styles), +When you work with one of [Chroma's styles](https://github.com/alecthomas/chroma/tree/master/styles), know that the `Background` token type provides the default style for tokens. It does so by defining a foreground color and background color. @@ -253,6 +263,7 @@ Also, token types in a style file are hierarchical. For instance, when `CommentS For a quick overview of the available styles and how they look, check out the [Chroma Style Gallery](https://xyproto.github.io/splash/docs/). + ## Command-line interface A command-line interface to Chroma is included. @@ -280,26 +291,32 @@ for that setup the `chroma` executable can be just symlinked to `~/.lessfilter`. + ## Testing lexers + If you edit some lexers and want to try it, open a shell in `cmd/chromad` and run: + ```shell go run . ``` + A Link will be printed. Open it in your Browser. Now you can test on the Playground with your local changes. If you want to run the tests and the lexers, open a shell in the root directory and run: + ```shell go test ./lexers ``` + When updating or adding a lexer, please add tests. See [lexers/README.md](lexers/README.md) for more. ## What's missing compared to Pygments? - Quite a few lexers, for various reasons (pull-requests welcome): - - Pygments lexers for complex languages often include custom code to - handle certain aspects, such as Raku's ability to nest code inside - regular expressions. These require time and effort to convert. - - I mostly only converted languages I had heard of, to reduce the porting cost. + - Pygments lexers for complex languages often include custom code to + handle certain aspects, such as Raku's ability to nest code inside + regular expressions. These require time and effort to convert. + - I mostly only converted languages I had heard of, to reduce the porting cost. - Some more esoteric features of Pygments are omitted for simplicity. - Though the Chroma API supports content detection, very few languages support them. I have plans to implement a statistical analyser at some point, but not enough time. diff --git a/vendor/github.com/alecthomas/chroma/v2/lexer.go b/vendor/github.com/alecthomas/chroma/v2/lexer.go index 4a1bd0fd1..eb027bf69 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexer.go +++ b/vendor/github.com/alecthomas/chroma/v2/lexer.go @@ -57,6 +57,26 @@ type Config struct { // // If this is 0 it will be treated as a default of 1. Priority float32 `xml:"priority,omitempty"` + + // Analyse is a list of regexes to match against the input. + // + // If a match is found, the score is returned if single attribute is set to true, + // otherwise the sum of all the score of matching patterns will be + // used as the final score. + Analyse *AnalyseConfig `xml:"analyse,omitempty"` +} + +// AnalyseConfig defines the list of regexes analysers. +type AnalyseConfig struct { + Regexes []RegexConfig `xml:"regex,omitempty"` + // If true, the first matching score is returned. + First bool `xml:"first,attr"` +} + +// RegexConfig defines a single regex pattern and its score in case of match. +type RegexConfig struct { + Pattern string `xml:"pattern,attr"` + Score float32 `xml:"score,attr"` } // Token output to formatter. diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/bash.go b/vendor/github.com/alecthomas/chroma/v2/lexers/bash.go deleted file mode 100644 index 1ea30f2dd..000000000 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/bash.go +++ /dev/null @@ -1,17 +0,0 @@ -package lexers - -import ( - "regexp" -) - -// TODO(moorereason): can this be factored away? -var bashAnalyserRe = regexp.MustCompile(`(?m)^#!.*/bin/(?:env |)(?:bash|zsh|sh|ksh)`) - -func init() { // nolint: gochecknoinits - Get("bash").SetAnalyser(func(text string) float32 { - if bashAnalyserRe.FindString(text) != "" { - return 1.0 - } - return 0.0 - }) -} diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/chapel.go b/vendor/github.com/alecthomas/chroma/v2/lexers/chapel.go deleted file mode 100644 index 5f6f0901c..000000000 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/chapel.go +++ /dev/null @@ -1,62 +0,0 @@ -package lexers - -import ( - . "github.com/alecthomas/chroma/v2" // nolint -) - -// Chapel lexer. -var Chapel = Register(MustNewLexer( - &Config{ - Name: "Chapel", - Aliases: []string{"chapel", "chpl"}, - Filenames: []string{"*.chpl"}, - MimeTypes: []string{}, - }, - func() Rules { - return Rules{ - "root": { - {`\n`, TextWhitespace, nil}, - {`\s+`, TextWhitespace, nil}, - {`\\\n`, Text, nil}, - {`//(.*?)\n`, CommentSingle, nil}, - {`/(\\\n)?[*](.|\n)*?[*](\\\n)?/`, CommentMultiline, nil}, - {Words(``, `\b`, `config`, `const`, `in`, `inout`, `out`, `param`, `ref`, `type`, `var`), KeywordDeclaration, nil}, - {Words(``, `\b`, `false`, `nil`, `none`, `true`), KeywordConstant, nil}, - {Words(``, `\b`, `bool`, `bytes`, `complex`, `imag`, `int`, `locale`, `nothing`, `opaque`, `range`, `real`, `string`, `uint`, `void`), KeywordType, nil}, - {Words(``, `\b`, `atomic`, `single`, `sync`, `borrowed`, `owned`, `shared`, `unmanaged`, `align`, `as`, `begin`, `break`, `by`, `catch`, `cobegin`, `coforall`, `continue`, `defer`, `delete`, `dmapped`, `do`, `domain`, `else`, `enum`, `except`, `export`, `extern`, `for`, `forall`, `foreach`, `forwarding`, `if`, `implements`, `import`, `index`, `init`, `inline`, `label`, `lambda`, `let`, `lifetime`, `local`, `new`, `noinit`, `on`, `only`, `otherwise`, `override`, `pragma`, `primitive`, `private`, `prototype`, `public`, `reduce`, `require`, `return`, `scan`, `select`, `serial`, `sparse`, `subdomain`, `then`, `this`, `throw`, `throws`, `try`, `use`, `when`, `where`, `while`, `with`, `yield`, `zip`), Keyword, nil}, - {`(iter)(\s+)`, ByGroups(Keyword, TextWhitespace), Push("procname")}, - {`(proc)(\s+)`, ByGroups(Keyword, TextWhitespace), Push("procname")}, - {`(operator)(\s+)`, ByGroups(Keyword, TextWhitespace), Push("procname")}, - {`(class|interface|module|record|union)(\s+)`, ByGroups(Keyword, TextWhitespace), Push("classname")}, - {`\d+i`, LiteralNumber, nil}, - {`\d+\.\d*([Ee][-+]\d+)?i`, LiteralNumber, nil}, - {`\.\d+([Ee][-+]\d+)?i`, LiteralNumber, nil}, - {`\d+[Ee][-+]\d+i`, LiteralNumber, nil}, - {`(\d*\.\d+)([eE][+-]?[0-9]+)?i?`, LiteralNumberFloat, nil}, - {`\d+[eE][+-]?[0-9]+i?`, LiteralNumberFloat, nil}, - {`0[bB][01]+`, LiteralNumberBin, nil}, - {`0[xX][0-9a-fA-F]+`, LiteralNumberHex, nil}, - {`0[oO][0-7]+`, LiteralNumberOct, nil}, - {`[0-9]+`, LiteralNumberInteger, nil}, - {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, - {`'(\\\\|\\'|[^'])*'`, LiteralString, nil}, - {`(=|\+=|-=|\*=|/=|\*\*=|%=|&=|\|=|\^=|&&=|\|\|=|<<=|>>=|<=>|<~>|\.\.|by|#|\.\.\.|&&|\|\||!|&|\||\^|~|<<|>>|==|!=|<=|>=|<|>|[+\-*/%]|\*\*)`, Operator, nil}, - {`[:;,.?()\[\]{}]`, Punctuation, nil}, - {`[a-zA-Z_][\w$]*`, NameOther, nil}, - }, - "classname": { - {`[a-zA-Z_][\w$]*`, NameClass, Pop(1)}, - }, - "procname": { - {`([a-zA-Z_][.\w$]*|\~[a-zA-Z_][.\w$]*|[+*/!~%<>=&^|\-:]{1,2})`, NameFunction, Pop(1)}, - {`\(`, Punctuation, Push("receivertype")}, - {`\)+\.`, Punctuation, nil}, - }, - "receivertype": { - {Words(``, `\b`, `atomic`, `single`, `sync`, `borrowed`, `owned`, `shared`, `unmanaged`), Keyword, nil}, - {Words(``, `\b`, `bool`, `bytes`, `complex`, `imag`, `int`, `locale`, `nothing`, `opaque`, `range`, `real`, `string`, `uint`, `void`), KeywordType, nil}, - {`[^()]*`, NameOther, Pop(1)}, - }, - } - }, -)) diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/cheetah.go b/vendor/github.com/alecthomas/chroma/v2/lexers/cheetah.go deleted file mode 100644 index 7eea429be..000000000 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/cheetah.go +++ /dev/null @@ -1,39 +0,0 @@ -package lexers - -import ( - . "github.com/alecthomas/chroma/v2" // nolint -) - -// Cheetah lexer. -var Cheetah = Register(MustNewLexer( - &Config{ - Name: "Cheetah", - Aliases: []string{"cheetah", "spitfire"}, - Filenames: []string{"*.tmpl", "*.spt"}, - MimeTypes: []string{"application/x-cheetah", "application/x-spitfire"}, - }, - cheetahRules, -)) - -func cheetahRules() Rules { - return Rules{ - "root": { - {`(##[^\n]*)$`, ByGroups(Comment), nil}, - {`#[*](.|\n)*?[*]#`, Comment, nil}, - {`#end[^#\n]*(?:#|$)`, CommentPreproc, nil}, - {`#slurp$`, CommentPreproc, nil}, - {`(#[a-zA-Z]+)([^#\n]*)(#|$)`, ByGroups(CommentPreproc, Using("Python"), CommentPreproc), nil}, - {`(\$)([a-zA-Z_][\w.]*\w)`, ByGroups(CommentPreproc, Using("Python")), nil}, - {`(\$\{!?)(.*?)(\})(?s)`, ByGroups(CommentPreproc, Using("Python"), CommentPreproc), nil}, - {`(?sx) - (.+?) # anything, followed by: - (?: - (?=\#[#a-zA-Z]*) | # an eval comment - (?=\$[a-zA-Z_{]) | # a substitution - \Z # end of string - ) - `, Other, nil}, - {`\s+`, Text, nil}, - }, - } -} diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/cql.go b/vendor/github.com/alecthomas/chroma/v2/lexers/cql.go deleted file mode 100644 index 32f7a2812..000000000 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/cql.go +++ /dev/null @@ -1,70 +0,0 @@ -package lexers - -import ( - . "github.com/alecthomas/chroma/v2" // nolint -) - -// CassandraCQL lexer. -var CassandraCQL = Register(MustNewLexer( - &Config{ - Name: "Cassandra CQL", - Aliases: []string{"cassandra", "cql"}, - Filenames: []string{"*.cql"}, - MimeTypes: []string{"text/x-cql"}, - NotMultiline: true, - CaseInsensitive: true, - }, - cassandraCQLRules, -)) - -func cassandraCQLRules() Rules { - return Rules{ - "root": { - {`\s+`, TextWhitespace, nil}, - {`(--|\/\/).*\n?`, CommentSingle, nil}, - {`/\*`, CommentMultiline, Push("multiline-comments")}, - {`(ascii|bigint|blob|boolean|counter|date|decimal|double|float|frozen|inet|int|list|map|set|smallint|text|time|timestamp|timeuuid|tinyint|tuple|uuid|varchar|varint)\b`, NameBuiltin, nil}, - {Words(``, `\b`, `ADD`, `AGGREGATE`, `ALL`, `ALLOW`, `ALTER`, `AND`, `ANY`, `APPLY`, `AS`, `ASC`, `AUTHORIZE`, `BATCH`, `BEGIN`, `BY`, `CLUSTERING`, `COLUMNFAMILY`, `COMPACT`, `CONSISTENCY`, `COUNT`, `CREATE`, `CUSTOM`, `DELETE`, `DESC`, `DISTINCT`, `DROP`, `EACH_QUORUM`, `ENTRIES`, `EXISTS`, `FILTERING`, `FROM`, `FULL`, `GRANT`, `IF`, `IN`, `INDEX`, `INFINITY`, `INSERT`, `INTO`, `KEY`, `KEYS`, `KEYSPACE`, `KEYSPACES`, `LEVEL`, `LIMIT`, `LOCAL_ONE`, `LOCAL_QUORUM`, `MATERIALIZED`, `MODIFY`, `NAN`, `NORECURSIVE`, `NOSUPERUSER`, `NOT`, `OF`, `ON`, `ONE`, `ORDER`, `PARTITION`, `PASSWORD`, `PER`, `PERMISSION`, `PERMISSIONS`, `PRIMARY`, `QUORUM`, `RENAME`, `REVOKE`, `SCHEMA`, `SELECT`, `STATIC`, `STORAGE`, `SUPERUSER`, `TABLE`, `THREE`, `TO`, `TOKEN`, `TRUNCATE`, `TTL`, `TWO`, `TYPE`, `UNLOGGED`, `UPDATE`, `USE`, `USER`, `USERS`, `USING`, `VALUES`, `VIEW`, `WHERE`, `WITH`, `WRITETIME`, `REPLICATION`, `OR`, `REPLACE`, `FUNCTION`, `CALLED`, `INPUT`, `RETURNS`, `LANGUAGE`, `ROLE`, `ROLES`, `TRIGGER`, `DURABLE_WRITES`, `LOGIN`, `OPTIONS`, `LOGGED`, `SFUNC`, `STYPE`, `FINALFUNC`, `INITCOND`, `IS`, `CONTAINS`, `JSON`, `PAGING`, `OFF`), Keyword, nil}, - {"[+*/<>=~!@#%^&|`?-]+", Operator, nil}, - { - `(?s)(java|javascript)(\s+)(AS)(\s+)('|\$\$)(.*?)(\5)`, - UsingByGroup(1, 6, - NameBuiltin, TextWhitespace, Keyword, TextWhitespace, - LiteralStringHeredoc, LiteralStringHeredoc, LiteralStringHeredoc), - nil, - }, - {`(true|false|null)\b`, KeywordConstant, nil}, - {`0x[0-9a-f]+`, LiteralNumberHex, nil}, - {`[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}`, LiteralNumberHex, nil}, - {`\.[0-9]+(e[+-]?[0-9]+)?`, Error, nil}, - {`-?[0-9]+(\.[0-9])?(e[+-]?[0-9]+)?`, LiteralNumberFloat, nil}, - {`[0-9]+`, LiteralNumberInteger, nil}, - {`'`, LiteralStringSingle, Push("string")}, - {`"`, LiteralStringName, Push("quoted-ident")}, - {`\$\$`, LiteralStringHeredoc, Push("dollar-string")}, - {`[a-z_]\w*`, Name, nil}, - {`:(['"]?)[a-z]\w*\b\1`, NameVariable, nil}, - {`[;:()\[\]\{\},.]`, Punctuation, nil}, - }, - "multiline-comments": { - {`/\*`, CommentMultiline, Push("multiline-comments")}, - {`\*/`, CommentMultiline, Pop(1)}, - {`[^/*]+`, CommentMultiline, nil}, - {`[/*]`, CommentMultiline, nil}, - }, - "string": { - {`[^']+`, LiteralStringSingle, nil}, - {`''`, LiteralStringSingle, nil}, - {`'`, LiteralStringSingle, Pop(1)}, - }, - "quoted-ident": { - {`[^"]+`, LiteralStringName, nil}, - {`""`, LiteralStringName, nil}, - {`"`, LiteralStringName, Pop(1)}, - }, - "dollar-string": { - {`[^\$]+`, LiteralStringHeredoc, nil}, - {`\$\$`, LiteralStringHeredoc, Pop(1)}, - }, - } -} diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/docker.go b/vendor/github.com/alecthomas/chroma/v2/lexers/docker.go deleted file mode 100644 index b48816ae3..000000000 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/docker.go +++ /dev/null @@ -1,32 +0,0 @@ -package lexers - -import ( - . "github.com/alecthomas/chroma/v2" // nolint -) - -// Docker lexer. -var Docker = Register(MustNewLexer( - &Config{ - Name: "Docker", - Aliases: []string{"docker", "dockerfile"}, - Filenames: []string{"Dockerfile", "Dockerfile.*", "*.docker"}, - MimeTypes: []string{"text/x-dockerfile-config"}, - CaseInsensitive: true, - }, - dockerRules, -)) - -func dockerRules() Rules { - return Rules{ - "root": { - {`#.*`, Comment, nil}, - {`(ONBUILD)((?:\s*\\?\s*))`, ByGroups(Keyword, Using("Bash")), nil}, - {`(HEALTHCHECK)(((?:\s*\\?\s*)--\w+=\w+(?:\s*\\?\s*))*)`, ByGroups(Keyword, Using("Bash")), nil}, - {`(VOLUME|ENTRYPOINT|CMD|SHELL)((?:\s*\\?\s*))(\[.*?\])`, ByGroups(Keyword, Using("Bash"), Using("JSON")), nil}, - {`(LABEL|ENV|ARG)((?:(?:\s*\\?\s*)\w+=\w+(?:\s*\\?\s*))*)`, ByGroups(Keyword, Using("Bash")), nil}, - {`((?:FROM|MAINTAINER|EXPOSE|WORKDIR|USER|STOPSIGNAL)|VOLUME)\b(.*)`, ByGroups(Keyword, LiteralString), nil}, - {`((?:RUN|CMD|ENTRYPOINT|ENV|ARG|LABEL|ADD|COPY))`, Keyword, nil}, - {`(.*\\\n)*.+`, Using("Bash"), nil}, - }, - } -} diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/aql.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/arangodb_aql.xml similarity index 96% rename from vendor/github.com/alecthomas/chroma/v2/lexers/embedded/aql.xml rename to vendor/github.com/alecthomas/chroma/v2/lexers/embedded/arangodb_aql.xml index 665465a9a..e7119737e 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/aql.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/arangodb_aql.xml @@ -4,9 +4,9 @@ aql *.aql text/x-aql + true true true - true @@ -37,10 +37,10 @@ - + - + @@ -49,10 +49,10 @@ - + - + @@ -155,15 +155,14 @@ - + - + - @@ -172,4 +171,4 @@ - + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/bash.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/bash.xml index 10c8dbe8d..d704a8ffa 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/bash.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/bash.xml @@ -26,6 +26,9 @@ PKGBUILD application/x-sh application/x-shellscript + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/bashsession.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/bash_session.xml similarity index 84% rename from vendor/github.com/alecthomas/chroma/v2/lexers/embedded/bashsession.xml rename to vendor/github.com/alecthomas/chroma/v2/lexers/embedded/bash_session.xml index b9b55e0d0..82c5fd6d0 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/bashsession.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/bash_session.xml @@ -1,6 +1,6 @@ - BashSession + Bash Session bash-session console shell-session @@ -10,7 +10,7 @@ - + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/csharp.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/c#.xml similarity index 81% rename from vendor/github.com/alecthomas/chroma/v2/lexers/embedded/csharp.xml rename to vendor/github.com/alecthomas/chroma/v2/lexers/embedded/c#.xml index 8c2ff450f..801a9543b 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/csharp.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/c#.xml @@ -52,7 +52,7 @@ - + @@ -62,7 +62,7 @@ - + @@ -71,9 +71,15 @@ + + + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/c++.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/c++.xml index e8702c58d..680a19afb 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/c++.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/c++.xml @@ -15,9 +15,14 @@ *.H *.cp *.CPP + *.tpp text/x-c++hdr text/x-c++src true + + + + @@ -79,7 +84,7 @@ - + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/c.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/c.xml index f941802e1..35ee32dce 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/c.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/c.xml @@ -11,6 +11,10 @@ image/x-xbitmap image/x-xpixmap true + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/cassandra_cql.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/cassandra_cql.xml new file mode 100644 index 000000000..1a78f99a1 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/cassandra_cql.xml @@ -0,0 +1,137 @@ + + + Cassandra CQL + cassandra + cql + *.cql + text/x-cql + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/chapel.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/chapel.xml new file mode 100644 index 000000000..c89cafc6a --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/chapel.xml @@ -0,0 +1,143 @@ + + + Chapel + chapel + chpl + *.chpl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/cheetah.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/cheetah.xml new file mode 100644 index 000000000..284457c6c --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/cheetah.xml @@ -0,0 +1,55 @@ + + + Cheetah + cheetah + spitfire + *.tmpl + *.spt + application/x-cheetah + application/x-spitfire + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/clojure.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/clojure.xml index ee83a6a0c..967ba399c 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/clojure.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/clojure.xml @@ -3,9 +3,12 @@ Clojure clojure clj + edn *.clj + *.edn text/x-clojure application/x-clojure + application/edn @@ -65,4 +68,4 @@ - \ No newline at end of file + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/dns.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/dns.xml index 2a854e57f..5ac3c2585 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/dns.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/dns.xml @@ -4,6 +4,8 @@ dns zone bind + *.zone + text/dns @@ -22,10 +24,10 @@ - + - + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/docker.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/docker.xml new file mode 100644 index 000000000..77c893766 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/docker.xml @@ -0,0 +1,56 @@ + + + Docker + docker + dockerfile + Dockerfile + Dockerfile.* + *.docker + text/x-dockerfile-config + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/elixir.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/elixir.xml index a3308d619..286f53a24 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/elixir.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/elixir.xml @@ -5,6 +5,7 @@ ex exs *.ex + *.eex *.exs text/x-elixir diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/fortranfixed.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/fortranfixed.xml new file mode 100644 index 000000000..11343c0e7 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/fortranfixed.xml @@ -0,0 +1,71 @@ + + + FortranFixed + fortranfixed + *.f + *.F + text/x-fortran + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gas.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gas.xml index 1feda85f7..7557bce0f 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gas.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gas.xml @@ -6,6 +6,7 @@ *.s *.S text/x-gas + 0.1 diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gdscript.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gdscript.xml index fb75fc800..350beac7a 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gdscript.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gdscript.xml @@ -6,53 +6,78 @@ *.gd text/x-gdscript application/x-gdscript + 0.1 + + + - - - - - - + + + + - - + + - - - + + + - - - - + - - - + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + - - + + + + + - + - + - + @@ -61,205 +86,174 @@ - - - - + - + - + - + + + + - - - + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + - - - - - - - - - - - - - - - - - - - + + - - + + - + - - + + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - + + - - - - - - - - - - - - - + + - - - - - - + + - + - - - - + + + + + + + + + - - - - - - - - - + - - - - - - - - - - - - - - - - - + - + + - - + + - \ No newline at end of file + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gdscript3.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gdscript3.xml new file mode 100644 index 000000000..ea78bb7ee --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gdscript3.xml @@ -0,0 +1,268 @@ + + + GDScript3 + gdscript3 + gd3 + *.gd + text/x-gdscript + application/x-gdscript + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/go_template.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/go_template.xml index 1e90943f4..09009220e 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/go_template.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/go_template.xml @@ -1,7 +1,7 @@ - Go HTML Template - go-html-template + Go Template + go-template diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/groovy.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/groovy.xml index d49d4f3b1..3cca2e9a5 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/groovy.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/groovy.xml @@ -41,10 +41,10 @@ - + - + @@ -56,7 +56,7 @@ - + @@ -132,4 +132,4 @@ - \ No newline at end of file + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/hlsl.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/hlsl.xml index 774f53cf2..41ab32395 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/hlsl.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/hlsl.xml @@ -4,6 +4,9 @@ hlsl *.hlsl *.hlsli + *.cginc + *.fx + *.fxh text/x-hlsl @@ -104,4 +107,4 @@ - \ No newline at end of file + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/html.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/html.xml new file mode 100644 index 000000000..2f1a8a979 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/html.xml @@ -0,0 +1,159 @@ + + + HTML + html + *.html + *.htm + *.xhtml + *.xslt + text/html + application/xhtml+xml + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/ini.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/ini.xml index 13ef274a0..08f3870be 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/ini.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/ini.xml @@ -15,6 +15,7 @@ .pylintrc text/x-ini text/inf + 0.1 diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/iscdhcpd.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/iscdhcpd.xml index 39c5c19ff..645cb05d5 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/iscdhcpd.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/iscdhcpd.xml @@ -2,7 +2,7 @@ ISCdhcpd iscdhcpd - *.conf + dhcpd.conf diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/java.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/java.xml index 715f043af..eabddee06 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/java.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/java.xml @@ -80,6 +80,9 @@ + + + @@ -115,4 +118,4 @@ - \ No newline at end of file + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/lighttpd.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/lighttpd_configuration_file.xml similarity index 100% rename from vendor/github.com/alecthomas/chroma/v2/lexers/embedded/lighttpd.xml rename to vendor/github.com/alecthomas/chroma/v2/lexers/embedded/lighttpd_configuration_file.xml diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/makefile.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/makefile.xml new file mode 100644 index 000000000..81d189385 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/makefile.xml @@ -0,0 +1,128 @@ + + + Makefile + make + makefile + mf + bsdmake + *.mak + *.mk + Makefile + makefile + Makefile.* + GNUmakefile + BSDmakefile + text/x-makefile + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mako.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mako.xml new file mode 100644 index 000000000..782414087 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mako.xml @@ -0,0 +1,120 @@ + + + Mako + mako + *.mao + application/x-mako + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mason.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mason.xml new file mode 100644 index 000000000..5873f2afc --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mason.xml @@ -0,0 +1,89 @@ + + + Mason + mason + *.m + *.mhtml + *.mc + *.mi + autohandler + dhandler + application/x-mason + 0.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mathematica.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mathematica.xml index 5f57470a7..0b8dfb617 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mathematica.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mathematica.xml @@ -4,10 +4,14 @@ mathematica mma nb - *.nb *.cdf - *.nbp + *.m *.ma + *.mt + *.mx + *.nb + *.nbp + *.wl application/mathematica application/vnd.wolfram.mathematica application/vnd.wolfram.mathematica.package diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/myghty.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/myghty.xml new file mode 100644 index 000000000..6d03917e5 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/myghty.xml @@ -0,0 +1,77 @@ + + + Myghty + myghty + *.myt + autodelegate + application/x-myghty + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/nasm.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/nasm.xml index a6107b5d6..defe65b3c 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/nasm.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/nasm.xml @@ -4,8 +4,10 @@ nasm *.asm *.ASM + *.nasm text/x-nasm true + 1.0 diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/nginx.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/nginx_configuration_file.xml similarity index 100% rename from vendor/github.com/alecthomas/chroma/v2/lexers/embedded/nginx.xml rename to vendor/github.com/alecthomas/chroma/v2/lexers/embedded/nginx_configuration_file.xml diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/odin.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/odin.xml new file mode 100644 index 000000000..b98426385 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/odin.xml @@ -0,0 +1,113 @@ + + + Odin + odin + *.odin + text/odin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/openedge_abl.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/openedge_abl.xml new file mode 100644 index 000000000..04a80f3ce --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/openedge_abl.xml @@ -0,0 +1,101 @@ + + + OpenEdge ABL + openedge + abl + progress + openedgeabl + *.p + *.cls + *.w + *.i + text/x-openedge + application/x-openedge + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/org_mode.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/org_mode.xml new file mode 100644 index 000000000..3f227ad8d --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/org_mode.xml @@ -0,0 +1,329 @@ + + + Org Mode + org + orgmode + *.org + text/org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + 4 + + + + + + + + + + + + 2 + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/plaintext.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/plaintext.xml new file mode 100644 index 000000000..d5e3243ee --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/plaintext.xml @@ -0,0 +1,21 @@ + + + plaintext + text + plain + no-highlight + *.txt + text/plain + -1 + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/postgresql_sql_dialect.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/postgresql_sql_dialect.xml new file mode 100644 index 000000000..e901c1855 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/postgresql_sql_dialect.xml @@ -0,0 +1,155 @@ + + + PostgreSQL SQL dialect + postgresql + postgres + text/x-postgresql + true + true + + + + + + + + + + + + + + + + + + + 6 + 12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 12 + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/protobuf.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/protocol_buffer.xml similarity index 100% rename from vendor/github.com/alecthomas/chroma/v2/lexers/embedded/protobuf.xml rename to vendor/github.com/alecthomas/chroma/v2/lexers/embedded/protocol_buffer.xml index 98ae7c831..157d321f8 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/protobuf.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/protocol_buffer.xml @@ -6,6 +6,33 @@ *.proto + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -87,32 +114,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/r.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/r.xml index 6dbfcba7b..1e44ca4a9 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/r.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/r.xml @@ -17,6 +17,7 @@ text/x-R text/x-r-history text/x-r-profile + 0.1 diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/smarty.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/smarty.xml new file mode 100644 index 000000000..dd7752c58 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/smarty.xml @@ -0,0 +1,79 @@ + + + Smarty + smarty + *.tpl + application/x-smarty + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/sourcepawn.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/sourcepawn.xml new file mode 100644 index 000000000..caca401e3 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/sourcepawn.xml @@ -0,0 +1,59 @@ + + + SourcePawn + sp + *.sp + *.inc + text/x-sourcepawn + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/toml.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/toml.xml index 3598cd7c1..9c98ba534 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/toml.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/toml.xml @@ -3,6 +3,8 @@ TOML toml *.toml + Pipfile + poetry.lock text/x-toml diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/twig.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/twig.xml index 5b0496d11..de95c5f91 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/twig.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/twig.xml @@ -2,6 +2,7 @@ Twig twig + *.twig application/x-twig true diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/typoscript.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/typoscript.xml new file mode 100644 index 000000000..bc416d472 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/typoscript.xml @@ -0,0 +1,178 @@ + + + TypoScript + typoscript + *.ts + text/x-typoscript + true + 0.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/v.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/v.xml new file mode 100644 index 000000000..e1af3d1cd --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/v.xml @@ -0,0 +1,355 @@ + + + V + v + vlang + *.v + *.vv + v.mod + text/x-v + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/v_shell.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/v_shell.xml new file mode 100644 index 000000000..34ce61065 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/v_shell.xml @@ -0,0 +1,365 @@ + + + V shell + vsh + vshell + *.vsh + text/x-vsh + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/viml.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/viml.xml new file mode 100644 index 000000000..43e6bfa74 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/viml.xml @@ -0,0 +1,85 @@ + + + VimL + vim + *.vim + .vimrc + .exrc + .gvimrc + _vimrc + _exrc + _gvimrc + vimrc + gvimrc + text/x-vim + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/wgsl.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/webgpu_shading_language.xml similarity index 89% rename from vendor/github.com/alecthomas/chroma/v2/lexers/embedded/wgsl.xml rename to vendor/github.com/alecthomas/chroma/v2/lexers/embedded/webgpu_shading_language.xml index f583dfffa..ea2b6e1ef 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/wgsl.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/webgpu_shading_language.xml @@ -1,4 +1,3 @@ - WebGPU Shading Language @@ -8,54 +7,136 @@ - + + + - - - + + + + + + + + + + - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + - - + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/z80.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/z80.xml deleted file mode 100644 index 410183261..000000000 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/z80.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - Z80 Assembly - z80 - *.z80 - *.asm - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/z80_assembly.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/z80_assembly.xml new file mode 100644 index 000000000..5bb77a9ad --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/z80_assembly.xml @@ -0,0 +1,74 @@ + + + Z80 Assembly + z80 + *.z80 + *.asm + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/fortran_fixed.go b/vendor/github.com/alecthomas/chroma/v2/lexers/fortran_fixed.go deleted file mode 100644 index aa93ce07a..000000000 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/fortran_fixed.go +++ /dev/null @@ -1,38 +0,0 @@ -package lexers - -import ( - . "github.com/alecthomas/chroma/v2" // nolint -) - -// FortranFixed lexer. -var FortranFixed = Register(MustNewLexer( - &Config{ - Name: "FortranFixed", - Aliases: []string{"fortranfixed"}, - Filenames: []string{"*.f", "*.F"}, - MimeTypes: []string{"text/x-fortran"}, - NotMultiline: true, - CaseInsensitive: true, - }, - func() Rules { - return Rules{ - "root": { - {`[C*].*\n`, Comment, nil}, - {`#.*\n`, CommentPreproc, nil}, - {` {0,4}!.*\n`, Comment, nil}, - {`(.{5})`, NameLabel, Push("cont-char")}, - {`.*\n`, Using("Fortran"), nil}, - }, - "cont-char": { - {` `, TextWhitespace, Push("code")}, - {`.`, GenericStrong, Push("code")}, - }, - "code": { - {`(.{66})(.*)(\n)`, ByGroups(Using("Fortran"), Comment, TextWhitespace), Push("root")}, - {`(.*)(!.*)(\n)`, ByGroups(Using("Fortran"), Comment, TextWhitespace), Push("root")}, - {`(.*)(\n)`, ByGroups(Using("Fortran"), TextWhitespace), Push("root")}, - Default(Push("root")), - }, - } - }, -)) diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/go.go b/vendor/github.com/alecthomas/chroma/v2/lexers/go.go index 8a11ffca9..77bc2259c 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/go.go +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/go.go @@ -38,7 +38,7 @@ func goRules() Rules { {`(var|func|struct|map|chan|type|interface|const)\b`, KeywordDeclaration, nil}, {Words(``, `\b`, `break`, `default`, `select`, `case`, `defer`, `go`, `else`, `goto`, `switch`, `fallthrough`, `if`, `range`, `continue`, `for`, `return`), Keyword, nil}, {`(true|false|iota|nil)\b`, KeywordConstant, nil}, - {Words(``, `\b(\()`, `uint`, `uint8`, `uint16`, `uint32`, `uint64`, `int`, `int8`, `int16`, `int32`, `int64`, `float`, `float32`, `float64`, `complex64`, `complex128`, `byte`, `rune`, `string`, `bool`, `error`, `uintptr`, `print`, `println`, `panic`, `recover`, `close`, `complex`, `real`, `imag`, `len`, `cap`, `append`, `copy`, `delete`, `new`, `make`), ByGroups(NameBuiltin, Punctuation), nil}, + {Words(``, `\b(\()`, `uint`, `uint8`, `uint16`, `uint32`, `uint64`, `int`, `int8`, `int16`, `int32`, `int64`, `float`, `float32`, `float64`, `complex64`, `complex128`, `byte`, `rune`, `string`, `bool`, `error`, `uintptr`, `print`, `println`, `panic`, `recover`, `close`, `complex`, `real`, `imag`, `len`, `cap`, `append`, `copy`, `delete`, `new`, `make`, `clear`, `min`, `max`), ByGroups(NameBuiltin, Punctuation), nil}, {Words(``, `\b`, `uint`, `uint8`, `uint16`, `uint32`, `uint64`, `int`, `int8`, `int16`, `int32`, `int64`, `float`, `float32`, `float64`, `complex64`, `complex128`, `byte`, `rune`, `string`, `bool`, `error`, `uintptr`), KeywordType, nil}, {`\d+i`, LiteralNumber, nil}, {`\d+\.\d*([Ee][-+]\d+)?i`, LiteralNumber, nil}, diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/haxe.go b/vendor/github.com/alecthomas/chroma/v2/lexers/haxe.go index 6e23938da..9a72de865 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/haxe.go +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/haxe.go @@ -630,7 +630,9 @@ func haxePreProcMutator(state *LexerState) error { state.Stack = stack[len(stack)-1] } case "end": - stack = stack[:len(stack)-1] + if len(stack) > 0 { + stack = stack[:len(stack)-1] + } } if proc == "if" || proc == "elseif" { diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/html.go b/vendor/github.com/alecthomas/chroma/v2/lexers/html.go index 2fa5cc099..c858042bf 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/html.go +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/html.go @@ -1,60 +1,8 @@ package lexers import ( - . "github.com/alecthomas/chroma/v2" // nolint + "github.com/alecthomas/chroma/v2" ) // HTML lexer. -var HTML = Register(MustNewLexer( - &Config{ - Name: "HTML", - Aliases: []string{"html"}, - Filenames: []string{"*.html", "*.htm", "*.xhtml", "*.xslt"}, - MimeTypes: []string{"text/html", "application/xhtml+xml"}, - NotMultiline: true, - DotAll: true, - CaseInsensitive: true, - }, - htmlRules, -)) - -func htmlRules() Rules { - return Rules{ - "root": { - {`[^<&]+`, Text, nil}, - {`&\S*?;`, NameEntity, nil}, - {`\<\!\[CDATA\[.*?\]\]\>`, CommentPreproc, nil}, - {``, Comment, Pop(1)}, - {`-`, Comment, nil}, - }, - "tag": { - {`\s+`, Text, nil}, - {`([\w:-]+\s*)(=)(\s*)`, ByGroups(NameAttribute, Operator, Text), Push("attr")}, - {`[\w:-]+`, NameAttribute, nil}, - {`(/?)(\s*)(>)`, ByGroups(Punctuation, Text, Punctuation), Pop(1)}, - }, - "script-content": { - {`(<)(\s*)(/)(\s*)(script)(\s*)(>)`, ByGroups(Punctuation, Text, Punctuation, Text, NameTag, Text, Punctuation), Pop(1)}, - {`.+?(?=<\s*/\s*script\s*>)`, Using("Javascript"), nil}, - }, - "style-content": { - {`(<)(\s*)(/)(\s*)(style)(\s*)(>)`, ByGroups(Punctuation, Text, Punctuation, Text, NameTag, Text, Punctuation), Pop(1)}, - {`.+?(?=<\s*/\s*style\s*>)`, Using("CSS"), nil}, - }, - "attr": { - {`".*?"`, LiteralString, Pop(1)}, - {`'.*?'`, LiteralString, Pop(1)}, - {`[^\s>]+`, LiteralString, Pop(1)}, - }, - } -} +var HTML = chroma.MustNewXMLLexer(embedded, "embedded/html.xml") diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/make.go b/vendor/github.com/alecthomas/chroma/v2/lexers/make.go deleted file mode 100644 index 1d2a5d326..000000000 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/make.go +++ /dev/null @@ -1,56 +0,0 @@ -package lexers - -import ( - . "github.com/alecthomas/chroma/v2" // nolint -) - -// Makefile lexer. -var Makefile = Register(MustNewLexer( - &Config{ - Name: "Makefile", - Aliases: []string{"make", "makefile", "mf", "bsdmake"}, - Filenames: []string{"*.mak", "*.mk", "Makefile", "makefile", "Makefile.*", "GNUmakefile", "BSDmakefile"}, - MimeTypes: []string{"text/x-makefile"}, - EnsureNL: true, - }, - makefileRules, -)) - -func makefileRules() Rules { - return Rules{ - "root": { - {`^(?:[\t ]+.*\n|\n)+`, Using("Bash"), nil}, - {`\$[<@$+%?|*]`, Keyword, nil}, - {`\s+`, Text, nil}, - {`#.*?\n`, Comment, nil}, - {`(export)(\s+)(?=[\w${}\t -]+\n)`, ByGroups(Keyword, Text), Push("export")}, - {`export\s+`, Keyword, nil}, - {`([\w${}().-]+)(\s*)([!?:+]?=)([ \t]*)((?:.*\\\n)+|.*\n)`, ByGroups(NameVariable, Text, Operator, Text, Using("Bash")), nil}, - {`(?s)"(\\\\|\\.|[^"\\])*"`, LiteralStringDouble, nil}, - {`(?s)'(\\\\|\\.|[^'\\])*'`, LiteralStringSingle, nil}, - {`([^\n:]+)(:+)([ \t]*)`, ByGroups(NameFunction, Operator, Text), Push("block-header")}, - {`\$\(`, Keyword, Push("expansion")}, - }, - "expansion": { - {`[^$a-zA-Z_()]+`, Text, nil}, - {`[a-zA-Z_]+`, NameVariable, nil}, - {`\$`, Keyword, nil}, - {`\(`, Keyword, Push()}, - {`\)`, Keyword, Pop(1)}, - }, - "export": { - {`[\w${}-]+`, NameVariable, nil}, - {`\n`, Text, Pop(1)}, - {`\s+`, Text, nil}, - }, - "block-header": { - {`[,|]`, Punctuation, nil}, - {`#.*?\n`, Comment, Pop(1)}, - {`\\\n`, Text, nil}, - {`\$\(`, Keyword, Push("expansion")}, - {`[a-zA-Z_]+`, Name, nil}, - {`\n`, Text, Pop(1)}, - {`.`, Text, nil}, - }, - } -} diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/mako.go b/vendor/github.com/alecthomas/chroma/v2/lexers/mako.go deleted file mode 100644 index 0de18fe90..000000000 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/mako.go +++ /dev/null @@ -1,62 +0,0 @@ -package lexers - -import ( - . "github.com/alecthomas/chroma/v2" // nolint -) - -// Mako lexer. -var Mako = Register(MustNewLexer( - &Config{ - Name: "Mako", - Aliases: []string{"mako"}, - Filenames: []string{"*.mao"}, - MimeTypes: []string{"application/x-mako"}, - }, - makoRules, -)) - -func makoRules() Rules { - return Rules{ - "root": { - {`(\s*)(%)(\s*end(?:\w+))(\n|\Z)`, ByGroups(Text, CommentPreproc, Keyword, Other), nil}, - {`(\s*)(%)([^\n]*)(\n|\Z)`, ByGroups(Text, CommentPreproc, Using("Python"), Other), nil}, - {`(\s*)(##[^\n]*)(\n|\Z)`, ByGroups(Text, CommentPreproc, Other), nil}, - {`(?s)<%doc>.*?`, CommentPreproc, nil}, - {`(<%)([\w.:]+)`, ByGroups(CommentPreproc, NameBuiltin), Push("tag")}, - {`()`, ByGroups(CommentPreproc, NameBuiltin, CommentPreproc), nil}, - {`<%(?=([\w.:]+))`, CommentPreproc, Push("ondeftags")}, - {`(<%(?:!?))(.*?)(%>)(?s)`, ByGroups(CommentPreproc, Using("Python"), CommentPreproc), nil}, - {`(\$\{)(.*?)(\})`, ByGroups(CommentPreproc, Using("Python"), CommentPreproc), nil}, - {`(?sx) - (.+?) # anything, followed by: - (?: - (?<=\n)(?=%|\#\#) | # an eval or comment line - (?=\#\*) | # multiline comment - (?=`, CommentPreproc, Pop(1)}, - {`\s+`, Text, nil}, - }, - "attr": { - {`".*?"`, LiteralString, Pop(1)}, - {`'.*?'`, LiteralString, Pop(1)}, - {`[^\s>]+`, LiteralString, Pop(1)}, - }, - } -} diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/mason.go b/vendor/github.com/alecthomas/chroma/v2/lexers/mason.go deleted file mode 100644 index 57e61205a..000000000 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/mason.go +++ /dev/null @@ -1,44 +0,0 @@ -package lexers - -import ( - . "github.com/alecthomas/chroma/v2" // nolint -) - -// Mason lexer. -var Mason = Register(MustNewLexer( - &Config{ - Name: "Mason", - Aliases: []string{"mason"}, - Filenames: []string{"*.m", "*.mhtml", "*.mc", "*.mi", "autohandler", "dhandler"}, - MimeTypes: []string{"application/x-mason"}, - Priority: 0.1, - }, - masonRules, -)) - -func masonRules() Rules { - return Rules{ - "root": { - {`\s+`, Text, nil}, - {`(<%doc>)(.*?)()(?s)`, ByGroups(NameTag, CommentMultiline, NameTag), nil}, - {`(<%(?:def|method))(\s*)(.*?)(>)(.*?)()(?s)`, ByGroups(NameTag, Text, NameFunction, NameTag, UsingSelf("root"), NameTag), nil}, - {`(<%\w+)(.*?)(>)(.*?)()(?s)`, ByGroups(NameTag, NameFunction, NameTag, Using("Perl"), NameTag), nil}, - {`(<&[^|])(.*?)(,.*?)?(&>)(?s)`, ByGroups(NameTag, NameFunction, Using("Perl"), NameTag), nil}, - {`(<&\|)(.*?)(,.*?)?(&>)(?s)`, ByGroups(NameTag, NameFunction, Using("Perl"), NameTag), nil}, - {``, NameTag, nil}, - {`(<%!?)(.*?)(%>)(?s)`, ByGroups(NameTag, Using("Perl"), NameTag), nil}, - {`(?<=^)#[^\n]*(\n|\Z)`, Comment, nil}, - {`(?<=^)(%)([^\n]*)(\n|\Z)`, ByGroups(NameTag, Using("Perl"), Other), nil}, - {`(?sx) - (.+?) # anything, followed by: - (?: - (?<=\n)(?=[%#]) | # an eval or comment line - (?=)(.*?)()(?s)`, ByGroups(NameTag, Text, NameFunction, NameTag, UsingSelf("root"), NameTag), nil}, - {`(<%\w+)(.*?)(>)(.*?)()(?s)`, ByGroups(NameTag, NameFunction, NameTag, Using("Python2"), NameTag), nil}, - {`(<&[^|])(.*?)(,.*?)?(&>)`, ByGroups(NameTag, NameFunction, Using("Python2"), NameTag), nil}, - {`(<&\|)(.*?)(,.*?)?(&>)(?s)`, ByGroups(NameTag, NameFunction, Using("Python2"), NameTag), nil}, - {``, NameTag, nil}, - {`(<%!?)(.*?)(%>)(?s)`, ByGroups(NameTag, Using("Python2"), NameTag), nil}, - {`(?<=^)#[^\n]*(\n|\Z)`, Comment, nil}, - {`(?<=^)(%)([^\n]*)(\n|\Z)`, ByGroups(NameTag, Using("Python2"), Other), nil}, - {`(?sx) - (.+?) # anything, followed by: - (?: - (?<=\n)(?=[%#]) | # an eval or comment line - (?=]+?> *)$`, ByGroups(Comment, CommentSpecial), nil}, // DEADLINE/SCHEDULED: - // DONE state CLOSED - {`(?i)^( *CLOSED: )(\[[^][]+?\] *)$`, ByGroups(Comment, CommentSpecial), nil}, // CLOSED: [datestamp] - // All other lines - Include("inline"), - }, - "inline": { - {`(\s)*(\*[^ \n*][^*]+?[^ \n*]\*)((?=\W|\n|$))`, ByGroups(Text, GenericStrong, Text), nil}, // Bold - {`(\s)*(/[^/]+?/)((?=\W|\n|$))`, ByGroups(Text, GenericEmph, Text), nil}, // Italic - {`(\s)*(=[^\n=]+?=)((?=\W|\n|$))`, ByGroups(Text, NameClass, Text), nil}, // Verbatim - {`(\s)*(~[^\n~]+?~)((?=\W|\n|$))`, ByGroups(Text, NameClass, Text), nil}, // Code - {`(\s)*(\+[^+]+?\+)((?=\W|\n|$))`, ByGroups(Text, GenericDeleted, Text), nil}, // Strikethrough - {`(\s)*(_[^_]+?_)((?=\W|\n|$))`, ByGroups(Text, GenericUnderline, Text), nil}, // Underline - {`(<)([^<>]+?)(>)`, ByGroups(Text, String, Text), nil}, // - {`[{]{3}[^}]+[}]{3}`, NameBuiltin, nil}, // {{{macro(foo,1)}}} - {`([^[])(\[fn:)([^]]+?)(\])([^]])`, ByGroups(Text, NameBuiltinPseudo, LiteralString, NameBuiltinPseudo, Text), nil}, // [fn:1] - // Links - {`(\[\[)([^][]+?)(\]\[)([^][]+)(\]\])`, ByGroups(Text, NameAttribute, Text, NameTag, Text), nil}, // [[link][descr]] - {`(\[\[)([^][]+?)(\]\])`, ByGroups(Text, NameAttribute, Text), nil}, // [[link]] - {`(<<)([^<>]+?)(>>)`, ByGroups(Text, NameAttribute, Text), nil}, // <> - // Tables - {`^( *)(\|[ -].*?[ -]\|)$`, ByGroups(Text, String), nil}, - // Blank lines, newlines - {`\n`, Text, nil}, - // Any other text - {`.`, Text, nil}, - }, - } -} diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/plaintext.go b/vendor/github.com/alecthomas/chroma/v2/lexers/plaintext.go deleted file mode 100644 index 8b32aa442..000000000 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/plaintext.go +++ /dev/null @@ -1,16 +0,0 @@ -package lexers - -import ( - . "github.com/alecthomas/chroma/v2" // nolint -) - -var Plaintext = Register(MustNewLexer( - &Config{ - Name: "plaintext", - Aliases: []string{"text", "plain", "no-highlight"}, - Filenames: []string{"*.txt"}, - MimeTypes: []string{"text/plain"}, - Priority: -1, - }, - PlaintextRules, -)) diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/postgres.go b/vendor/github.com/alecthomas/chroma/v2/lexers/postgres.go deleted file mode 100644 index 0ef96ef8f..000000000 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/postgres.go +++ /dev/null @@ -1,77 +0,0 @@ -package lexers - -import ( - . "github.com/alecthomas/chroma/v2" // nolint -) - -// Postgresql Sql Dialect lexer. -var PostgreSQL = Register(MustNewLexer( - &Config{ - Name: "PostgreSQL SQL dialect", - Aliases: []string{"postgresql", "postgres"}, - Filenames: []string{}, - MimeTypes: []string{"text/x-postgresql"}, - NotMultiline: true, - CaseInsensitive: true, - }, - postgreSQLRules, -)) - -func postgreSQLRules() Rules { - return Rules{ - "root": { - {`\s+`, Text, nil}, - {`--.*\n?`, CommentSingle, nil}, - {`/\*`, CommentMultiline, Push("multiline-comments")}, - {`(bigint|bigserial|bit|bit\s+varying|bool|boolean|box|bytea|char|character|character\s+varying|cidr|circle|date|decimal|double\s+precision|float4|float8|inet|int|int2|int4|int8|integer|interval|json|jsonb|line|lseg|macaddr|money|numeric|path|pg_lsn|point|polygon|real|serial|serial2|serial4|serial8|smallint|smallserial|text|time|timestamp|timestamptz|timetz|tsquery|tsvector|txid_snapshot|uuid|varbit|varchar|with\s+time\s+zone|without\s+time\s+zone|xml|anyarray|anyelement|anyenum|anynonarray|anyrange|cstring|fdw_handler|internal|language_handler|opaque|record|void)\b`, NameBuiltin, nil}, - { - `(?s)(DO)(\s+)(?:(LANGUAGE)?(\s+)('?)(\w+)?('?)(\s+))?(\$)([^$]*)(\$)(.*?)(\$)(\10)(\$)`, - UsingByGroup(6, 12, - Keyword, Text, Keyword, Text, // DO LANGUAGE - StringSingle, StringSingle, StringSingle, Text, // 'plpgsql' - StringHeredoc, StringHeredoc, StringHeredoc, // $tag$ - StringHeredoc, // (code block) - StringHeredoc, StringHeredoc, StringHeredoc), // $tag$ - nil, - }, - {Words(``, `\b`, `ABORT`, `ABSOLUTE`, `ACCESS`, `ACTION`, `ADD`, `ADMIN`, `AFTER`, `AGGREGATE`, `ALL`, `ALSO`, `ALTER`, `ALWAYS`, `ANALYSE`, `ANALYZE`, `AND`, `ANY`, `ARRAY`, `AS`, `ASC`, `ASSERTION`, `ASSIGNMENT`, `ASYMMETRIC`, `AT`, `ATTRIBUTE`, `AUTHORIZATION`, `BACKWARD`, `BEFORE`, `BEGIN`, `BETWEEN`, `BIGINT`, `BINARY`, `BIT`, `BOOLEAN`, `BOTH`, `BY`, `CACHE`, `CALLED`, `CASCADE`, `CASCADED`, `CASE`, `CAST`, `CATALOG`, `CHAIN`, `CHAR`, `CHARACTER`, `CHARACTERISTICS`, `CHECK`, `CHECKPOINT`, `CLASS`, `CLOSE`, `CLUSTER`, `COALESCE`, `COLLATE`, `COLLATION`, `COLUMN`, `COMMENT`, `COMMENTS`, `COMMIT`, `COMMITTED`, `CONCURRENTLY`, `CONFIGURATION`, `CONNECTION`, `CONSTRAINT`, `CONSTRAINTS`, `CONTENT`, `CONTINUE`, `CONVERSION`, `COPY`, `COST`, `CREATE`, `CROSS`, `CSV`, `CURRENT`, `CURRENT_CATALOG`, `CURRENT_DATE`, `CURRENT_ROLE`, `CURRENT_SCHEMA`, `CURRENT_TIME`, `CURRENT_TIMESTAMP`, `CURRENT_USER`, `CURSOR`, `CYCLE`, `DATA`, `DATABASE`, `DAY`, `DEALLOCATE`, `DEC`, `DECIMAL`, `DECLARE`, `DEFAULT`, `DEFAULTS`, `DEFERRABLE`, `DEFERRED`, `DEFINER`, `DELETE`, `DELIMITER`, `DELIMITERS`, `DESC`, `DICTIONARY`, `DISABLE`, `DISCARD`, `DISTINCT`, `DO`, `DOCUMENT`, `DOMAIN`, `DOUBLE`, `DROP`, `EACH`, `ELSE`, `ENABLE`, `ENCODING`, `ENCRYPTED`, `END`, `ENUM`, `ESCAPE`, `EVENT`, `EXCEPT`, `EXCLUDE`, `EXCLUDING`, `EXCLUSIVE`, `EXECUTE`, `EXISTS`, `EXPLAIN`, `EXTENSION`, `EXTERNAL`, `EXTRACT`, `FALSE`, `FAMILY`, `FETCH`, `FILTER`, `FIRST`, `FLOAT`, `FOLLOWING`, `FOR`, `FORCE`, `FOREIGN`, `FORWARD`, `FREEZE`, `FROM`, `FULL`, `FUNCTION`, `FUNCTIONS`, `GLOBAL`, `GRANT`, `GRANTED`, `GREATEST`, `GROUP`, `HANDLER`, `HAVING`, `HEADER`, `HOLD`, `HOUR`, `IDENTITY`, `IF`, `ILIKE`, `IMMEDIATE`, `IMMUTABLE`, `IMPLICIT`, `IN`, `INCLUDING`, `INCREMENT`, `INDEX`, `INDEXES`, `INHERIT`, `INHERITS`, `INITIALLY`, `INLINE`, `INNER`, `INOUT`, `INPUT`, `INSENSITIVE`, `INSERT`, `INSTEAD`, `INT`, `INTEGER`, `INTERSECT`, `INTERVAL`, `INTO`, `INVOKER`, `IS`, `ISNULL`, `ISOLATION`, `JOIN`, `KEY`, `LABEL`, `LANGUAGE`, `LARGE`, `LAST`, `LATERAL`, `LC_COLLATE`, `LC_CTYPE`, `LEADING`, `LEAKPROOF`, `LEAST`, `LEFT`, `LEVEL`, `LIKE`, `LIMIT`, `LISTEN`, `LOAD`, `LOCAL`, `LOCALTIME`, `LOCALTIMESTAMP`, `LOCATION`, `LOCK`, `MAPPING`, `MATCH`, `MATERIALIZED`, `MAXVALUE`, `MINUTE`, `MINVALUE`, `MODE`, `MONTH`, `MOVE`, `NAME`, `NAMES`, `NATIONAL`, `NATURAL`, `NCHAR`, `NEXT`, `NO`, `NONE`, `NOT`, `NOTHING`, `NOTIFY`, `NOTNULL`, `NOWAIT`, `NULL`, `NULLIF`, `NULLS`, `NUMERIC`, `OBJECT`, `OF`, `OFF`, `OFFSET`, `OIDS`, `ON`, `ONLY`, `OPERATOR`, `OPTION`, `OPTIONS`, `OR`, `ORDER`, `ORDINALITY`, `OUT`, `OUTER`, `OVER`, `OVERLAPS`, `OVERLAY`, `OWNED`, `OWNER`, `PARSER`, `PARTIAL`, `PARTITION`, `PASSING`, `PASSWORD`, `PLACING`, `PLANS`, `POLICY`, `POSITION`, `PRECEDING`, `PRECISION`, `PREPARE`, `PREPARED`, `PRESERVE`, `PRIMARY`, `PRIOR`, `PRIVILEGES`, `PROCEDURAL`, `PROCEDURE`, `PROGRAM`, `QUOTE`, `RANGE`, `READ`, `REAL`, `REASSIGN`, `RECHECK`, `RECURSIVE`, `REF`, `REFERENCES`, `REFRESH`, `REINDEX`, `RELATIVE`, `RELEASE`, `RENAME`, `REPEATABLE`, `REPLACE`, `REPLICA`, `RESET`, `RESTART`, `RESTRICT`, `RETURNING`, `RETURNS`, `REVOKE`, `RIGHT`, `ROLE`, `ROLLBACK`, `ROW`, `ROWS`, `RULE`, `SAVEPOINT`, `SCHEMA`, `SCROLL`, `SEARCH`, `SECOND`, `SECURITY`, `SELECT`, `SEQUENCE`, `SEQUENCES`, `SERIALIZABLE`, `SERVER`, `SESSION`, `SESSION_USER`, `SET`, `SETOF`, `SHARE`, `SHOW`, `SIMILAR`, `SIMPLE`, `SMALLINT`, `SNAPSHOT`, `SOME`, `STABLE`, `STANDALONE`, `START`, `STATEMENT`, `STATISTICS`, `STDIN`, `STDOUT`, `STORAGE`, `STRICT`, `STRIP`, `SUBSTRING`, `SYMMETRIC`, `SYSID`, `SYSTEM`, `TABLE`, `TABLES`, `TABLESPACE`, `TEMP`, `TEMPLATE`, `TEMPORARY`, `TEXT`, `THEN`, `TIME`, `TIMESTAMP`, `TO`, `TRAILING`, `TRANSACTION`, `TREAT`, `TRIGGER`, `TRIM`, `TRUE`, `TRUNCATE`, `TRUSTED`, `TYPE`, `TYPES`, `UNBOUNDED`, `UNCOMMITTED`, `UNENCRYPTED`, `UNION`, `UNIQUE`, `UNKNOWN`, `UNLISTEN`, `UNLOGGED`, `UNTIL`, `UPDATE`, `USER`, `USING`, `VACUUM`, `VALID`, `VALIDATE`, `VALIDATOR`, `VALUE`, `VALUES`, `VARCHAR`, `VARIADIC`, `VARYING`, `VERBOSE`, `VERSION`, `VIEW`, `VIEWS`, `VOLATILE`, `WHEN`, `WHERE`, `WHITESPACE`, `WINDOW`, `WITH`, `WITHIN`, `WITHOUT`, `WORK`, `WRAPPER`, `WRITE`, `XML`, `XMLATTRIBUTES`, `XMLCONCAT`, `XMLELEMENT`, `XMLEXISTS`, `XMLFOREST`, `XMLPARSE`, `XMLPI`, `XMLROOT`, `XMLSERIALIZE`, `YEAR`, `YES`, `ZONE`), Keyword, nil}, - {"[+*/<>=~!@#%^&|`?-]+", Operator, nil}, - {`::`, Operator, nil}, - {`\$\d+`, NameVariable, nil}, - {`([0-9]*\.[0-9]*|[0-9]+)(e[+-]?[0-9]+)?`, LiteralNumberFloat, nil}, - {`[0-9]+`, LiteralNumberInteger, nil}, - {`((?:E|U&)?)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("string")}, - {`((?:U&)?)(")`, ByGroups(LiteralStringAffix, LiteralStringName), Push("quoted-ident")}, - { - `(?s)(\$)([^$]*)(\$)(.*?)(\$)(\2)(\$)(\s+)(LANGUAGE)?(\s+)('?)(\w+)?('?)`, - UsingByGroup(12, 4, - StringHeredoc, StringHeredoc, StringHeredoc, // $tag$ - StringHeredoc, // (code block) - StringHeredoc, StringHeredoc, StringHeredoc, // $tag$ - Text, Keyword, Text, // LANGUAGE - StringSingle, StringSingle, StringSingle), // 'type' - nil, - }, - {`(?s)(\$)([^$]*)(\$)(.*?)(\$)(\2)(\$)`, LiteralStringHeredoc, nil}, - {`[a-z_]\w*`, Name, nil}, - {`:(['"]?)[a-z]\w*\b\1`, NameVariable, nil}, - {`[;:()\[\]{},.]`, Punctuation, nil}, - }, - "multiline-comments": { - {`/\*`, CommentMultiline, Push("multiline-comments")}, - {`\*/`, CommentMultiline, Pop(1)}, - {`[^/*]+`, CommentMultiline, nil}, - {`[/*]`, CommentMultiline, nil}, - }, - "string": { - {`[^']+`, LiteralStringSingle, nil}, - {`''`, LiteralStringSingle, nil}, - {`'`, LiteralStringSingle, Pop(1)}, - }, - "quoted-ident": { - {`[^"]+`, LiteralStringName, nil}, - {`""`, LiteralStringName, nil}, - {`"`, LiteralStringName, Pop(1)}, - }, - } -} diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/smarty.go b/vendor/github.com/alecthomas/chroma/v2/lexers/smarty.go deleted file mode 100644 index 38e024565..000000000 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/smarty.go +++ /dev/null @@ -1,42 +0,0 @@ -package lexers - -import ( - . "github.com/alecthomas/chroma/v2" // nolint -) - -// Smarty lexer. -var Smarty = Register(MustNewLexer( - &Config{ - Name: "Smarty", - Aliases: []string{"smarty"}, - Filenames: []string{"*.tpl"}, - MimeTypes: []string{"application/x-smarty"}, - DotAll: true, - }, - smartyRules, -)) - -func smartyRules() Rules { - return Rules{ - "root": { - {`[^{]+`, Other, nil}, - {`(\{)(\*.*?\*)(\})`, ByGroups(CommentPreproc, Comment, CommentPreproc), nil}, - {`(\{php\})(.*?)(\{/php\})`, ByGroups(CommentPreproc, Using("PHP"), CommentPreproc), nil}, - {`(\{)(/?[a-zA-Z_]\w*)(\s*)`, ByGroups(CommentPreproc, NameFunction, Text), Push("smarty")}, - {`\{`, CommentPreproc, Push("smarty")}, - }, - "smarty": { - {`\s+`, Text, nil}, - {`\{`, CommentPreproc, Push()}, - {`\}`, CommentPreproc, Pop(1)}, - {`#[a-zA-Z_]\w*#`, NameVariable, nil}, - {`\$[a-zA-Z_]\w*(\.\w+)*`, NameVariable, nil}, - {`[~!%^&*()+=|\[\]:;,.<>/?@-]`, Operator, nil}, - {`(true|false|null)\b`, KeywordConstant, nil}, - {`[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?`, LiteralNumber, nil}, - {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, - {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, - {`[a-zA-Z_]\w*`, NameAttribute, nil}, - }, - } -} diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/v.go b/vendor/github.com/alecthomas/chroma/v2/lexers/v.go deleted file mode 100644 index 11561b3af..000000000 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/v.go +++ /dev/null @@ -1,173 +0,0 @@ -package lexers - -import ( - "strings" - - . "github.com/alecthomas/chroma/v2" // nolint -) - -// V lexer. -var V = Register(MustNewLexer( - &Config{ - Name: "V", - Aliases: []string{"v", "vlang"}, - Filenames: []string{"*.v", "*.vv", "v.mod"}, - MimeTypes: []string{"text/x-v"}, - EnsureNL: true, - }, - vRules, -).SetAnalyser(func(text string) float32 { - if strings.Contains(text, "import ") && strings.Contains(text, "module ") { - return 0.2 - } - if strings.Contains(text, "module ") { - return 0.1 - } - return 0.0 -})) - -const ( - namePattern = `[^\W\d]\w*` - typeNamePattern = `[A-Z]\w*` - multiLineCommentPattern = `/\*(?:.|\n)*?\*/` -) - -func vRules() Rules { - return Rules{ - "root": { - {`\n`, Text, nil}, - {`\s+`, Text, nil}, - {`\\\n`, Text, nil}, - {`(?<=module\s+\w[^\n]*\s+)(//[^\n]+\n)+(?=\n)`, StringDoc, nil}, - {`(// *)(\w+)([^\n]+\n)(?=(?://[^\n]*\n)* *(?:pub +)?(?:fn|struct|union|type|interface|enum|const) +\2\b)`, ByGroups(StringDoc, GenericEmph, StringDoc), Push(`string-doc`)}, - {`//[^\n]*\n`, CommentSingle, nil}, - {`/\*(?:(?:` + multiLineCommentPattern + `)*|.|\n)*\*/`, CommentMultiline, nil}, - {`\b(import|module)\b`, KeywordNamespace, nil}, - {`\b(fn|struct|union|map|chan|type|interface|enum|const|mut|shared|pub|__global)\b`, KeywordDeclaration, nil}, - {`\?`, KeywordDeclaration, nil}, - {`(?<=\)\s*)!`, KeywordDeclaration, nil}, - {`[ \t]*#include[^\n]+`, Using(`c`), nil}, - {`[ \t]*#\w[^\n]*`, CommentPreproc, nil}, - {`(sql)(\s+)(\w+)(\s+)({)([^}]*?)(})`, ByGroups(Keyword, Text, Name, Text, Punctuation, Using(`sql`), Punctuation), nil}, - {`\$(?=\w)`, Operator, nil}, - {`(?<=\$)(?:embed_file|pkgconfig|tmpl|env|compile_error|compile_warn)`, NameBuiltin, nil}, - {`(asm)(\s+)(\w+)(\s*)({)([^}]*?)(})`, ByGroups(Keyword, Text, KeywordType, Text, Punctuation, Using(`nasm`), Punctuation), nil}, - {`\b_(?:un)?likely_(?=\()`, NameFunctionMagic, nil}, - {`(?<=\$if.+?(?:&&|\|\|)?)(` + Words(``, ``, `windows`, `linux`, `macos`, `mac`, `darwin`, `ios`, `android`, `mach`, `dragonfly`, `gnu`, `hpux`, `haiku`, `qnx`, `solaris`, `gcc`, `tinyc`, `clang`, `mingw`, `msvc`, `cplusplus`, `amd64`, `arm64`, `x64`, `x32`, `little_endian`, `big_endian`, `debug`, `prod`, `test`, `js`, `glibc`, `prealloc`, `no_bounds_checking`, `freestanding`, `no_segfault_handler`, `no_backtrace`, `no_main`) + `)+`, NameBuiltin, nil}, - {`@` + Words(``, `\b`, `FN`, `METHOD`, `MOD`, `STRUCT`, `FILE`, `LINE`, `COLUMN`, `VEXE`, `VEXEROOT`, `VHASH`, `VMOD_FILE`, `VMODROOT`), NameVariableMagic, nil}, - {Words(`\b(?>=|>>>=|>>>|<<|>>|<=|>=|\^=|\+=|-=|\*=|/=|%=|&=|\|=|&&|\|\||<-|\+\+|--|==|!=|:=|\.\.\.|\.\.|[+\-*/%&|^~=#@!])`, Operator, nil}, - {`[\d_]+(\.\d+e[+\-]?\d+|\.\d+|e[+\-]?\d+)`, LiteralNumberFloat, nil}, - {`\.\d+(e[+\-]?\d+)?`, LiteralNumberFloat, nil}, - {`0o[0-7_]+`, LiteralNumberOct, nil}, - {`0x[0-9a-fA-F_]+`, LiteralNumberHex, nil}, - {`0b[01_]+`, LiteralNumberBin, nil}, - {`(0|[1-9][0-9_]*)`, LiteralNumberInteger, nil}, - {"`", StringChar, Push(`char`)}, - Include(`strings`), - {`@?` + typeNamePattern, NameClass, nil}, - {`(?<=` + namePattern + `)(<)(` + typeNamePattern + `)(>)`, ByGroups(Punctuation, NameClass, Punctuation), nil}, - {`@?` + namePattern + `(?=\()`, NameFunction, nil}, - {`(?<=fn\s+)@?` + namePattern + `(?=\s*\()`, NameFunction, nil}, - {`(?<=(?:continue|break|goto)\s+)\w+`, NameLabel, nil}, - {`\b` + namePattern + `(?=:(?:$|\s+for))`, NameLabel, nil}, - {`[<>()\[\]{}.,;:]`, Punctuation, nil}, - {`@?` + namePattern, NameVariable, nil}, - }, - "strings": { - {`(c)?(")`, ByGroups(StringAffix, StringDouble), Push(`string-double`)}, - {`(c)?(')`, ByGroups(StringAffix, StringSingle), Push(`string-single`)}, - {`(r)("[^"]+")`, ByGroups(StringAffix, String), nil}, - {`(r)('[^']+')`, ByGroups(StringAffix, String), nil}, - }, - "string-double": { - {`"`, StringDouble, Pop(1)}, - Include(`char-escape`), - {`(\$)((?!\\){)`, ByGroups(Operator, Punctuation), Push(`string-curly-interpolation`)}, - {`\$`, Operator, Push(`string-interpolation`)}, - {`[^"]+?`, StringDouble, nil}, - }, - "string-single": { - {`'`, StringSingle, Pop(1)}, - Include(`char-escape`), - {`(\$)((?!\\){)`, ByGroups(Operator, Punctuation), Push(`string-curly-interpolation`)}, - {`\$`, Operator, Push(`string-interpolation`)}, - {`[^']+?`, StringSingle, nil}, - }, - "char": { - {"`", StringChar, Pop(1)}, - Include(`char-escape`), - {`[^\\]`, StringChar, nil}, - }, - "char-escape": { - {"\\\\[`'\"\\\\abfnrtv$]|\\\\x[0-9a-fA-F]{2}|\\\\[0-7]{1,3}|\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}", StringEscape, nil}, - }, - "string-doc": { - {`(// *)(#+ [^\n]+)(\n)`, ByGroups(StringDoc, GenericHeading, Text), nil}, - {`// *([=_*~-])\1{2,}\n`, StringDelimiter, nil}, - {`//[^\n]*\n`, StringDoc, nil}, - Default(Pop(1)), - }, - "string-interpolation": { - {`(\.)?(@)?(?:(` + namePattern + `)(\()([^)]*)(\))|(` + namePattern + `))`, ByGroups(Punctuation, Operator, NameFunction, Punctuation, UsingSelf(`root`), Punctuation, NameVariable), nil}, - Default(Pop(1)), - }, - "string-curly-interpolation": { - {`}`, Punctuation, Pop(1)}, - Include(`strings`), - {`(:)( *?)([ 0'#+-])?(?:(\.)?([0-9]+))?([fFgeEGxXobsd])?`, ByGroups(Punctuation, Text, Operator, Punctuation, Number, StringAffix), nil}, - {`[^}"':]+`, UsingSelf(`root`), nil}, - }, - "attribute": { - {`\]`, Punctuation, Pop(1)}, - {`'`, Punctuation, Push(`string-single`)}, - {`"`, Punctuation, Push(`string-double`)}, - {`[;:]`, Punctuation, nil}, - {`(?<=\[)if\b`, Keyword, nil}, - {`\s+`, Text, nil}, - {`(?<=: *)\w+`, String, nil}, - {namePattern, NameAttribute, nil}, - }, - } -} - -// V shell lexer. -var VSH = Register(MustNewLexer( - &Config{ - Name: "V shell", - Aliases: []string{"vsh", "vshell"}, - Filenames: []string{"*.vsh"}, - MimeTypes: []string{"text/x-vsh"}, - EnsureNL: true, - }, - vshRules, -).SetAnalyser(func(text string) float32 { - firstLine := strings.Split(text, "\n")[0] - if strings.Contains(firstLine, "#!/usr/bin/env") && strings.Contains(firstLine, "v run") { - return 1.0 - } - if strings.Contains(firstLine, "#!/") && strings.Contains(firstLine, "/v run") { - return 1.0 - } - return 0.0 -})) - -func vshRules() Rules { - vshRules := vRules() - vshRoot := []Rule{ - {`^#![^\n]*\n`, CommentHashbang, nil}, - {Words(`\b`, `\b`, `args`, `max_path_len`, `wd_at_startup`, `sys_write`, `sys_open`, `sys_close`, `sys_mkdir`, `sys_creat`, `path_separator`, `path_delimiter`, `s_ifmt`, `s_ifdir`, `s_iflnk`, `s_isuid`, `s_isgid`, `s_isvtx`, `s_irusr`, `s_iwusr`, `s_ixusr`, `s_irgrp`, `s_iwgrp`, `s_ixgrp`, `s_iroth`, `s_iwoth`, `s_ixoth`), NameConstant, nil}, - {Words(`\b`, `\b`, `ProcessState`, `SeekMode`, `Signal`, `Command`, `ExecutableNotFoundError`, `File`, `FileNotOpenedError`, `Process`, `Result`, `SizeOfTypeIs0Error`, `Uname`), NameBuiltin, nil}, - {Words(`\b`, `(?=\()`, `abs_path`, `args_after`, `args_before`, `base`, `cache_dir`, `chdir`, `chmod`, `chown`, `config_dir`, `cp`, `cp_all`, `create`, `debugger_present`, `dir`, `environ`, `executable`, `execute`, `execute_or_exit`, `execute_or_panic`, `execve`, `execvp`, `existing_path`, `exists`, `exists_in_system_path`, `expand_tilde_to_home`, `fd_close`, `fd_read`, `fd_slurp`, `fd_write`, `file_ext`, `file_last_mod_unix`, `file_name`, `file_size`, `fileno`, `find_abs_path_of_executable`, `flush`, `fork`, `get_error_msg`, `get_line`, `get_lines`, `get_lines_joined`, `get_raw_line`, `get_raw_lines_joined`, `get_raw_stdin`, `getegid`, `getenv`, `getenv_opt`, `geteuid`, `getgid`, `getpid`, `getppid`, `getuid`, `getwd`, `glob`, `home_dir`, `hostname`, `inode`, `input`, `input_opt`, `is_abs_path`, `is_atty`, `is_dir`, `is_dir_empty`, `is_executable`, `is_file`, `is_link`, `is_readable`, `is_writable`, `is_writable_folder`, `join_path`, `join_path_single`, `last_error`, `link`, `log`, `loginname`, `ls`, `mkdir`, `mkdir_all`, `mv`, `mv_by_cp`, `new_process`, `norm_path`, `open`, `open_append`, `open_file`, `open_uri`, `posix_get_error_msg`, `posix_set_permission_bit`, `quoted_path`, `read_bytes`, `read_file`, `read_file_array`, `read_lines`, `real_path`, `resource_abs_path`, `rm`, `rmdir`, `rmdir_all`, `setenv`, `sigint_to_signal_name`, `signal_opt`, `stderr`, `stdin`, `stdout`, `symlink`, `system`, `temp_dir`, `truncate`, `uname`, `unsetenv`, `user_os`, `utime`, `vfopen`, `vmodules_dir`, `vmodules_paths`, `wait`, `walk`, `walk_ext`, `walk_with_context`, `write_file`, `write_file_array`, `bitmask`, `close`, `read_line`, `start`, `msg`, `read`, `read_bytes_at`, `read_bytes_into`, `read_bytes_into_newline`, `read_from`, `read_into_ptr`, `read_raw`, `read_raw_at`, `read_struct`, `read_struct_at`, `seek`, `tell`, `write`, `write_raw`, `write_raw_at`, `write_string`, `write_struct`, `write_struct_at`, `write_to`, `writeln`, `is_alive`, `run`, `set_args`, `set_environment`, `set_redirect_stdio`, `signal_continue`, `signal_kill`, `signal_pgkill`, `signal_stop`, `stderr_read`, `stderr_slurp`, `stdin_write`, `stdout_read`, `stdout_slurp`), NameBuiltin, nil}, - } - - vshRules[`root`] = append(vshRoot, vshRules[`root`]...) - - return vshRules -} diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/vim.go b/vendor/github.com/alecthomas/chroma/v2/lexers/vim.go deleted file mode 100644 index b0059ea0e..000000000 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/vim.go +++ /dev/null @@ -1,39 +0,0 @@ -package lexers - -import ( - . "github.com/alecthomas/chroma/v2" // nolint -) - -// Viml lexer. -var Viml = Register(MustNewLexer( - &Config{ - Name: "VimL", - Aliases: []string{"vim"}, - Filenames: []string{"*.vim", ".vimrc", ".exrc", ".gvimrc", "_vimrc", "_exrc", "_gvimrc", "vimrc", "gvimrc"}, - MimeTypes: []string{"text/x-vim"}, - }, - vimlRules, -)) - -func vimlRules() Rules { - return Rules{ - "root": { - {`^([ \t:]*)(py(?:t(?:h(?:o(?:n)?)?)?)?)([ \t]*)(<<)([ \t]*)(.*)((?:\n|.)*)(\6)`, ByGroups(UsingSelf("root"), Keyword, Text, Operator, Text, Text, Using("Python"), Text), nil}, - {`^([ \t:]*)(py(?:t(?:h(?:o(?:n)?)?)?)?)([ \t])(.*)`, ByGroups(UsingSelf("root"), Keyword, Text, Using("Python")), nil}, - {`^\s*".*`, Comment, nil}, - {`[ \t]+`, Text, nil}, - {`/(\\\\|\\/|[^\n/])*/`, LiteralStringRegex, nil}, - {`"(\\\\|\\"|[^\n"])*"`, LiteralStringDouble, nil}, - {`'(''|[^\n'])*'`, LiteralStringSingle, nil}, - {`(?<=\s)"[^\-:.%#=*].*`, Comment, nil}, - {`-?\d+`, LiteralNumber, nil}, - {`#[0-9a-f]{6}`, LiteralNumberHex, nil}, - {`^:`, Punctuation, nil}, - {`[()<>+=!|,~-]`, Punctuation, nil}, - {`\b(let|if|else|endif|elseif|fun|function|endfunction)\b`, Keyword, nil}, - {`\b(NONE|bold|italic|underline|dark|light)\b`, NameBuiltin, nil}, - {`\b\w+\b`, NameOther, nil}, - {`.`, Text, nil}, - }, - } -} diff --git a/vendor/github.com/alecthomas/chroma/v2/mutators.go b/vendor/github.com/alecthomas/chroma/v2/mutators.go index ae648aae4..e80ad97a5 100644 --- a/vendor/github.com/alecthomas/chroma/v2/mutators.go +++ b/vendor/github.com/alecthomas/chroma/v2/mutators.go @@ -69,7 +69,7 @@ func (m *multiMutator) MarshalXML(e *xml.Encoder, start xml.StartElement) error return e.EncodeToken(xml.EndElement{Name: name}) } -func (m *multiMutator) MutatorKind() string { return "multiple" } +func (m *multiMutator) MutatorKind() string { return "mutators" } func (m *multiMutator) Mutate(state *LexerState) error { for _, modifier := range m.Mutators { diff --git a/vendor/github.com/alecthomas/chroma/v2/regexp.go b/vendor/github.com/alecthomas/chroma/v2/regexp.go index 1794662e2..0dcb077fe 100644 --- a/vendor/github.com/alecthomas/chroma/v2/regexp.go +++ b/vendor/github.com/alecthomas/chroma/v2/regexp.go @@ -76,8 +76,8 @@ func (r Rules) Merge(rules Rules) Rules { } // MustNewLexer creates a new Lexer with deferred rules generation or panics. -func MustNewLexer(config *Config, rulesFunc func() Rules) *RegexLexer { - lexer, err := NewLexer(config, rulesFunc) +func MustNewLexer(config *Config, rules func() Rules) *RegexLexer { + lexer, err := NewLexer(config, rules) if err != nil { panic(err) } @@ -298,11 +298,12 @@ func (r *RegexLexer) SetAnalyser(analyser func(text string) float32) Lexer { return r } -func (r *RegexLexer) AnalyseText(text string) float32 { // nolint +// AnalyseText scores how likely a fragment of text is to match this lexer, between 0.0 and 1.0. +func (r *RegexLexer) AnalyseText(text string) float32 { if r.analyser != nil { return r.analyser(text) } - return 0.0 + return 0 } // SetConfig replaces the Config for this Lexer. @@ -311,7 +312,8 @@ func (r *RegexLexer) SetConfig(config *Config) *RegexLexer { return r } -func (r *RegexLexer) Config() *Config { // nolint +// Config returns the Config for this Lexer. +func (r *RegexLexer) Config() *Config { return r.config } @@ -330,7 +332,7 @@ func (r *RegexLexer) maybeCompile() (err error) { pattern = "(?" + rule.flags + ")" + pattern } pattern = `\G` + pattern - rule.Regexp, err = regexp2.Compile(pattern, regexp2.RE2) + rule.Regexp, err = regexp2.Compile(pattern, 0) if err != nil { return fmt.Errorf("failed to compile rule %s.%d: %s", state, i, err) } @@ -406,7 +408,8 @@ func (r *RegexLexer) needRules() error { return err } -func (r *RegexLexer) Tokenise(options *TokeniseOptions, text string) (Iterator, error) { // nolint +// Tokenise text using lexer, returning an iterator. +func (r *RegexLexer) Tokenise(options *TokeniseOptions, text string) (Iterator, error) { err := r.needRules() if err != nil { return nil, err diff --git a/vendor/github.com/alecthomas/chroma/v2/registry.go b/vendor/github.com/alecthomas/chroma/v2/registry.go index b047dfc05..55ed36233 100644 --- a/vendor/github.com/alecthomas/chroma/v2/registry.go +++ b/vendor/github.com/alecthomas/chroma/v2/registry.go @@ -172,16 +172,37 @@ func (l *LexerRegistry) Analyse(text string) Lexer { return picked } -// Register a Lexer with the LexerRegistry. +// Register a Lexer with the LexerRegistry. If the lexer is already registered +// it will be replaced. func (l *LexerRegistry) Register(lexer Lexer) Lexer { lexer.SetRegistry(l) config := lexer.Config() + l.byName[config.Name] = lexer l.byName[strings.ToLower(config.Name)] = lexer + for _, alias := range config.Aliases { l.byAlias[alias] = lexer l.byAlias[strings.ToLower(alias)] = lexer } - l.Lexers = append(l.Lexers, lexer) + + l.Lexers = add(l.Lexers, lexer) + return lexer } + +// add adds a lexer to a slice of lexers if it doesn't already exist, or if found will replace it. +func add(lexers Lexers, lexer Lexer) Lexers { + for i, val := range lexers { + if val == nil { + continue + } + + if val.Config().Name == lexer.Config().Name { + lexers[i] = lexer + return lexers + } + } + + return append(lexers, lexer) +} diff --git a/vendor/github.com/alecthomas/chroma/v2/serialise.go b/vendor/github.com/alecthomas/chroma/v2/serialise.go index 2b727db8a..645a5faab 100644 --- a/vendor/github.com/alecthomas/chroma/v2/serialise.go +++ b/vendor/github.com/alecthomas/chroma/v2/serialise.go @@ -7,10 +7,13 @@ import ( "fmt" "io" "io/fs" + "math" "path/filepath" "reflect" "regexp" "strings" + + "github.com/dlclark/regexp2" ) // Serialisation of Chroma rules to XML. The format is: @@ -107,7 +110,7 @@ func fastUnmarshalConfig(from fs.FS, path string) (*Config, error) { var config Config err = dec.DecodeElement(&config, &se) if err != nil { - panic(err) + return nil, fmt.Errorf("%s: %w", path, err) } return &config, nil } @@ -129,14 +132,58 @@ func NewXMLLexer(from fs.FS, path string) (*RegexLexer, error) { if err != nil { return nil, err } + for _, glob := range append(config.Filenames, config.AliasFilenames...) { _, err := filepath.Match(glob, "") if err != nil { return nil, fmt.Errorf("%s: %q is not a valid glob: %w", config.Name, glob, err) } } + + var analyserFn func(string) float32 + + if config.Analyse != nil { + type regexAnalyse struct { + re *regexp2.Regexp + score float32 + } + + regexAnalysers := make([]regexAnalyse, 0, len(config.Analyse.Regexes)) + + for _, ra := range config.Analyse.Regexes { + re, err := regexp2.Compile(ra.Pattern, regexp2.None) + if err != nil { + return nil, fmt.Errorf("%s: %q is not a valid analyser regex: %w", config.Name, ra.Pattern, err) + } + + regexAnalysers = append(regexAnalysers, regexAnalyse{re, ra.Score}) + } + + analyserFn = func(text string) float32 { + var score float32 + + for _, ra := range regexAnalysers { + ok, err := ra.re.MatchString(text) + if err != nil { + return 0 + } + + if ok && config.Analyse.First { + return float32(math.Min(float64(ra.score), 1.0)) + } + + if ok { + score += ra.score + } + } + + return float32(math.Min(float64(score), 1.0)) + } + } + return &RegexLexer{ - config: config, + config: config, + analyser: analyserFn, fetchRulesFunc: func() (Rules, error) { var lexer struct { Config diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/catppuccin-frappe.xml b/vendor/github.com/alecthomas/chroma/v2/styles/catppuccin-frappe.xml index b739c1401..08eb42a63 100644 --- a/vendor/github.com/alecthomas/chroma/v2/styles/catppuccin-frappe.xml +++ b/vendor/github.com/alecthomas/chroma/v2/styles/catppuccin-frappe.xml @@ -1,46 +1,83 @@ \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/catppuccin-latte.xml b/vendor/github.com/alecthomas/chroma/v2/styles/catppuccin-latte.xml index 7c6bddd06..3d510743c 100644 --- a/vendor/github.com/alecthomas/chroma/v2/styles/catppuccin-latte.xml +++ b/vendor/github.com/alecthomas/chroma/v2/styles/catppuccin-latte.xml @@ -1,46 +1,83 @@ \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/catppuccin-macchiato.xml b/vendor/github.com/alecthomas/chroma/v2/styles/catppuccin-macchiato.xml index c9d25e2df..5d96f5996 100644 --- a/vendor/github.com/alecthomas/chroma/v2/styles/catppuccin-macchiato.xml +++ b/vendor/github.com/alecthomas/chroma/v2/styles/catppuccin-macchiato.xml @@ -1,46 +1,83 @@ \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/catppuccin-mocha.xml b/vendor/github.com/alecthomas/chroma/v2/styles/catppuccin-mocha.xml index 4d69ae386..e17866dd2 100644 --- a/vendor/github.com/alecthomas/chroma/v2/styles/catppuccin-mocha.xml +++ b/vendor/github.com/alecthomas/chroma/v2/styles/catppuccin-mocha.xml @@ -1,46 +1,83 @@ \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/github-dark.xml b/vendor/github.com/alecthomas/chroma/v2/styles/github-dark.xml index 7ade2be25..0adb77561 100644 --- a/vendor/github.com/alecthomas/chroma/v2/styles/github-dark.xml +++ b/vendor/github.com/alecthomas/chroma/v2/styles/github-dark.xml @@ -2,11 +2,11 @@ - + - + @@ -29,7 +29,7 @@ - + @@ -42,4 +42,4 @@ - \ No newline at end of file + diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/onedark.xml b/vendor/github.com/alecthomas/chroma/v2/styles/onedark.xml index f5217b600..6921eb5ee 100644 --- a/vendor/github.com/alecthomas/chroma/v2/styles/onedark.xml +++ b/vendor/github.com/alecthomas/chroma/v2/styles/onedark.xml @@ -20,4 +20,6 @@ + + diff --git a/vendor/github.com/alecthomas/chroma/v2/table.py b/vendor/github.com/alecthomas/chroma/v2/table.py index 779453982..ea4b7556a 100644 --- a/vendor/github.com/alecthomas/chroma/v2/table.py +++ b/vendor/github.com/alecthomas/chroma/v2/table.py @@ -5,8 +5,7 @@ README_FILE = "README.md" - -lines = check_output(["go", "run", "./cmd/chroma/main.go", "--list"]).decode("utf-8").splitlines() +lines = check_output(["chroma", "--list"]).decode("utf-8").splitlines() lines = [line.strip() for line in lines if line.startswith(" ") and not line.startswith(" ")] lines = sorted(lines, key=lambda l: l.lower()) diff --git a/vendor/github.com/alecthomas/chroma/v2/tokentype_enumer.go b/vendor/github.com/alecthomas/chroma/v2/tokentype_enumer.go index da5fa0c7c..696e9ce5e 100644 --- a/vendor/github.com/alecthomas/chroma/v2/tokentype_enumer.go +++ b/vendor/github.com/alecthomas/chroma/v2/tokentype_enumer.go @@ -4,9 +4,11 @@ package chroma import ( "fmt" + "strings" ) const _TokenTypeName = "NoneOtherErrorCodeLineLineLinkLineTableTDLineTableLineHighlightLineNumbersTableLineNumbersLinePreWrapperBackgroundEOFTypeKeywordKeywordConstantKeywordDeclarationKeywordNamespaceKeywordPseudoKeywordReservedKeywordTypeNameNameAttributeNameBuiltinNameBuiltinPseudoNameClassNameConstantNameDecoratorNameEntityNameExceptionNameFunctionNameFunctionMagicNameKeywordNameLabelNameNamespaceNameOperatorNameOtherNamePseudoNamePropertyNameTagNameVariableNameVariableAnonymousNameVariableClassNameVariableGlobalNameVariableInstanceNameVariableMagicLiteralLiteralDateLiteralOtherLiteralStringLiteralStringAffixLiteralStringAtomLiteralStringBacktickLiteralStringBooleanLiteralStringCharLiteralStringDelimiterLiteralStringDocLiteralStringDoubleLiteralStringEscapeLiteralStringHeredocLiteralStringInterpolLiteralStringNameLiteralStringOtherLiteralStringRegexLiteralStringSingleLiteralStringSymbolLiteralNumberLiteralNumberBinLiteralNumberFloatLiteralNumberHexLiteralNumberIntegerLiteralNumberIntegerLongLiteralNumberOctOperatorOperatorWordPunctuationCommentCommentHashbangCommentMultilineCommentSingleCommentSpecialCommentPreprocCommentPreprocFileGenericGenericDeletedGenericEmphGenericErrorGenericHeadingGenericInsertedGenericOutputGenericPromptGenericStrongGenericSubheadingGenericTracebackGenericUnderlineTextTextWhitespaceTextSymbolTextPunctuation" +const _TokenTypeLowerName = "noneothererrorcodelinelinelinklinetabletdlinetablelinehighlightlinenumberstablelinenumberslineprewrapperbackgroundeoftypekeywordkeywordconstantkeyworddeclarationkeywordnamespacekeywordpseudokeywordreservedkeywordtypenamenameattributenamebuiltinnamebuiltinpseudonameclassnameconstantnamedecoratornameentitynameexceptionnamefunctionnamefunctionmagicnamekeywordnamelabelnamenamespacenameoperatornameothernamepseudonamepropertynametagnamevariablenamevariableanonymousnamevariableclassnamevariableglobalnamevariableinstancenamevariablemagicliteralliteraldateliteralotherliteralstringliteralstringaffixliteralstringatomliteralstringbacktickliteralstringbooleanliteralstringcharliteralstringdelimiterliteralstringdocliteralstringdoubleliteralstringescapeliteralstringheredocliteralstringinterpolliteralstringnameliteralstringotherliteralstringregexliteralstringsingleliteralstringsymbolliteralnumberliteralnumberbinliteralnumberfloatliteralnumberhexliteralnumberintegerliteralnumberintegerlongliteralnumberoctoperatoroperatorwordpunctuationcommentcommenthashbangcommentmultilinecommentsinglecommentspecialcommentpreproccommentpreprocfilegenericgenericdeletedgenericemphgenericerrorgenericheadinggenericinsertedgenericoutputgenericpromptgenericstronggenericsubheadinggenerictracebackgenericunderlinetexttextwhitespacetextsymboltextpunctuation" var _TokenTypeMap = map[TokenType]string{ -13: _TokenTypeName[0:4], @@ -117,108 +119,414 @@ func (i TokenType) String() string { return fmt.Sprintf("TokenType(%d)", i) } -var _TokenTypeValues = []TokenType{-13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 3000, 3001, 3002, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 4000, 4001, 5000, 6000, 6001, 6002, 6003, 6004, 6100, 6101, 7000, 7001, 7002, 7003, 7004, 7005, 7006, 7007, 7008, 7009, 7010, 7011, 8000, 8001, 8002, 8003} +// An "invalid array index" compiler error signifies that the constant values have changed. +// Re-run the stringer command to generate them again. +func _TokenTypeNoOp() { + var x [1]struct{} + _ = x[None-(-13)] + _ = x[Other-(-12)] + _ = x[Error-(-11)] + _ = x[CodeLine-(-10)] + _ = x[LineLink-(-9)] + _ = x[LineTableTD-(-8)] + _ = x[LineTable-(-7)] + _ = x[LineHighlight-(-6)] + _ = x[LineNumbersTable-(-5)] + _ = x[LineNumbers-(-4)] + _ = x[Line-(-3)] + _ = x[PreWrapper-(-2)] + _ = x[Background-(-1)] + _ = x[EOFType-(0)] + _ = x[Keyword-(1000)] + _ = x[KeywordConstant-(1001)] + _ = x[KeywordDeclaration-(1002)] + _ = x[KeywordNamespace-(1003)] + _ = x[KeywordPseudo-(1004)] + _ = x[KeywordReserved-(1005)] + _ = x[KeywordType-(1006)] + _ = x[Name-(2000)] + _ = x[NameAttribute-(2001)] + _ = x[NameBuiltin-(2002)] + _ = x[NameBuiltinPseudo-(2003)] + _ = x[NameClass-(2004)] + _ = x[NameConstant-(2005)] + _ = x[NameDecorator-(2006)] + _ = x[NameEntity-(2007)] + _ = x[NameException-(2008)] + _ = x[NameFunction-(2009)] + _ = x[NameFunctionMagic-(2010)] + _ = x[NameKeyword-(2011)] + _ = x[NameLabel-(2012)] + _ = x[NameNamespace-(2013)] + _ = x[NameOperator-(2014)] + _ = x[NameOther-(2015)] + _ = x[NamePseudo-(2016)] + _ = x[NameProperty-(2017)] + _ = x[NameTag-(2018)] + _ = x[NameVariable-(2019)] + _ = x[NameVariableAnonymous-(2020)] + _ = x[NameVariableClass-(2021)] + _ = x[NameVariableGlobal-(2022)] + _ = x[NameVariableInstance-(2023)] + _ = x[NameVariableMagic-(2024)] + _ = x[Literal-(3000)] + _ = x[LiteralDate-(3001)] + _ = x[LiteralOther-(3002)] + _ = x[LiteralString-(3100)] + _ = x[LiteralStringAffix-(3101)] + _ = x[LiteralStringAtom-(3102)] + _ = x[LiteralStringBacktick-(3103)] + _ = x[LiteralStringBoolean-(3104)] + _ = x[LiteralStringChar-(3105)] + _ = x[LiteralStringDelimiter-(3106)] + _ = x[LiteralStringDoc-(3107)] + _ = x[LiteralStringDouble-(3108)] + _ = x[LiteralStringEscape-(3109)] + _ = x[LiteralStringHeredoc-(3110)] + _ = x[LiteralStringInterpol-(3111)] + _ = x[LiteralStringName-(3112)] + _ = x[LiteralStringOther-(3113)] + _ = x[LiteralStringRegex-(3114)] + _ = x[LiteralStringSingle-(3115)] + _ = x[LiteralStringSymbol-(3116)] + _ = x[LiteralNumber-(3200)] + _ = x[LiteralNumberBin-(3201)] + _ = x[LiteralNumberFloat-(3202)] + _ = x[LiteralNumberHex-(3203)] + _ = x[LiteralNumberInteger-(3204)] + _ = x[LiteralNumberIntegerLong-(3205)] + _ = x[LiteralNumberOct-(3206)] + _ = x[Operator-(4000)] + _ = x[OperatorWord-(4001)] + _ = x[Punctuation-(5000)] + _ = x[Comment-(6000)] + _ = x[CommentHashbang-(6001)] + _ = x[CommentMultiline-(6002)] + _ = x[CommentSingle-(6003)] + _ = x[CommentSpecial-(6004)] + _ = x[CommentPreproc-(6100)] + _ = x[CommentPreprocFile-(6101)] + _ = x[Generic-(7000)] + _ = x[GenericDeleted-(7001)] + _ = x[GenericEmph-(7002)] + _ = x[GenericError-(7003)] + _ = x[GenericHeading-(7004)] + _ = x[GenericInserted-(7005)] + _ = x[GenericOutput-(7006)] + _ = x[GenericPrompt-(7007)] + _ = x[GenericStrong-(7008)] + _ = x[GenericSubheading-(7009)] + _ = x[GenericTraceback-(7010)] + _ = x[GenericUnderline-(7011)] + _ = x[Text-(8000)] + _ = x[TextWhitespace-(8001)] + _ = x[TextSymbol-(8002)] + _ = x[TextPunctuation-(8003)] +} + +var _TokenTypeValues = []TokenType{None, Other, Error, CodeLine, LineLink, LineTableTD, LineTable, LineHighlight, LineNumbersTable, LineNumbers, Line, PreWrapper, Background, EOFType, Keyword, KeywordConstant, KeywordDeclaration, KeywordNamespace, KeywordPseudo, KeywordReserved, KeywordType, Name, NameAttribute, NameBuiltin, NameBuiltinPseudo, NameClass, NameConstant, NameDecorator, NameEntity, NameException, NameFunction, NameFunctionMagic, NameKeyword, NameLabel, NameNamespace, NameOperator, NameOther, NamePseudo, NameProperty, NameTag, NameVariable, NameVariableAnonymous, NameVariableClass, NameVariableGlobal, NameVariableInstance, NameVariableMagic, Literal, LiteralDate, LiteralOther, LiteralString, LiteralStringAffix, LiteralStringAtom, LiteralStringBacktick, LiteralStringBoolean, LiteralStringChar, LiteralStringDelimiter, LiteralStringDoc, LiteralStringDouble, LiteralStringEscape, LiteralStringHeredoc, LiteralStringInterpol, LiteralStringName, LiteralStringOther, LiteralStringRegex, LiteralStringSingle, LiteralStringSymbol, LiteralNumber, LiteralNumberBin, LiteralNumberFloat, LiteralNumberHex, LiteralNumberInteger, LiteralNumberIntegerLong, LiteralNumberOct, Operator, OperatorWord, Punctuation, Comment, CommentHashbang, CommentMultiline, CommentSingle, CommentSpecial, CommentPreproc, CommentPreprocFile, Generic, GenericDeleted, GenericEmph, GenericError, GenericHeading, GenericInserted, GenericOutput, GenericPrompt, GenericStrong, GenericSubheading, GenericTraceback, GenericUnderline, Text, TextWhitespace, TextSymbol, TextPunctuation} var _TokenTypeNameToValueMap = map[string]TokenType{ - _TokenTypeName[0:4]: -13, - _TokenTypeName[4:9]: -12, - _TokenTypeName[9:14]: -11, - _TokenTypeName[14:22]: -10, - _TokenTypeName[22:30]: -9, - _TokenTypeName[30:41]: -8, - _TokenTypeName[41:50]: -7, - _TokenTypeName[50:63]: -6, - _TokenTypeName[63:79]: -5, - _TokenTypeName[79:90]: -4, - _TokenTypeName[90:94]: -3, - _TokenTypeName[94:104]: -2, - _TokenTypeName[104:114]: -1, - _TokenTypeName[114:121]: 0, - _TokenTypeName[121:128]: 1000, - _TokenTypeName[128:143]: 1001, - _TokenTypeName[143:161]: 1002, - _TokenTypeName[161:177]: 1003, - _TokenTypeName[177:190]: 1004, - _TokenTypeName[190:205]: 1005, - _TokenTypeName[205:216]: 1006, - _TokenTypeName[216:220]: 2000, - _TokenTypeName[220:233]: 2001, - _TokenTypeName[233:244]: 2002, - _TokenTypeName[244:261]: 2003, - _TokenTypeName[261:270]: 2004, - _TokenTypeName[270:282]: 2005, - _TokenTypeName[282:295]: 2006, - _TokenTypeName[295:305]: 2007, - _TokenTypeName[305:318]: 2008, - _TokenTypeName[318:330]: 2009, - _TokenTypeName[330:347]: 2010, - _TokenTypeName[347:358]: 2011, - _TokenTypeName[358:367]: 2012, - _TokenTypeName[367:380]: 2013, - _TokenTypeName[380:392]: 2014, - _TokenTypeName[392:401]: 2015, - _TokenTypeName[401:411]: 2016, - _TokenTypeName[411:423]: 2017, - _TokenTypeName[423:430]: 2018, - _TokenTypeName[430:442]: 2019, - _TokenTypeName[442:463]: 2020, - _TokenTypeName[463:480]: 2021, - _TokenTypeName[480:498]: 2022, - _TokenTypeName[498:518]: 2023, - _TokenTypeName[518:535]: 2024, - _TokenTypeName[535:542]: 3000, - _TokenTypeName[542:553]: 3001, - _TokenTypeName[553:565]: 3002, - _TokenTypeName[565:578]: 3100, - _TokenTypeName[578:596]: 3101, - _TokenTypeName[596:613]: 3102, - _TokenTypeName[613:634]: 3103, - _TokenTypeName[634:654]: 3104, - _TokenTypeName[654:671]: 3105, - _TokenTypeName[671:693]: 3106, - _TokenTypeName[693:709]: 3107, - _TokenTypeName[709:728]: 3108, - _TokenTypeName[728:747]: 3109, - _TokenTypeName[747:767]: 3110, - _TokenTypeName[767:788]: 3111, - _TokenTypeName[788:805]: 3112, - _TokenTypeName[805:823]: 3113, - _TokenTypeName[823:841]: 3114, - _TokenTypeName[841:860]: 3115, - _TokenTypeName[860:879]: 3116, - _TokenTypeName[879:892]: 3200, - _TokenTypeName[892:908]: 3201, - _TokenTypeName[908:926]: 3202, - _TokenTypeName[926:942]: 3203, - _TokenTypeName[942:962]: 3204, - _TokenTypeName[962:986]: 3205, - _TokenTypeName[986:1002]: 3206, - _TokenTypeName[1002:1010]: 4000, - _TokenTypeName[1010:1022]: 4001, - _TokenTypeName[1022:1033]: 5000, - _TokenTypeName[1033:1040]: 6000, - _TokenTypeName[1040:1055]: 6001, - _TokenTypeName[1055:1071]: 6002, - _TokenTypeName[1071:1084]: 6003, - _TokenTypeName[1084:1098]: 6004, - _TokenTypeName[1098:1112]: 6100, - _TokenTypeName[1112:1130]: 6101, - _TokenTypeName[1130:1137]: 7000, - _TokenTypeName[1137:1151]: 7001, - _TokenTypeName[1151:1162]: 7002, - _TokenTypeName[1162:1174]: 7003, - _TokenTypeName[1174:1188]: 7004, - _TokenTypeName[1188:1203]: 7005, - _TokenTypeName[1203:1216]: 7006, - _TokenTypeName[1216:1229]: 7007, - _TokenTypeName[1229:1242]: 7008, - _TokenTypeName[1242:1259]: 7009, - _TokenTypeName[1259:1275]: 7010, - _TokenTypeName[1275:1291]: 7011, - _TokenTypeName[1291:1295]: 8000, - _TokenTypeName[1295:1309]: 8001, - _TokenTypeName[1309:1319]: 8002, - _TokenTypeName[1319:1334]: 8003, + _TokenTypeName[0:4]: None, + _TokenTypeLowerName[0:4]: None, + _TokenTypeName[4:9]: Other, + _TokenTypeLowerName[4:9]: Other, + _TokenTypeName[9:14]: Error, + _TokenTypeLowerName[9:14]: Error, + _TokenTypeName[14:22]: CodeLine, + _TokenTypeLowerName[14:22]: CodeLine, + _TokenTypeName[22:30]: LineLink, + _TokenTypeLowerName[22:30]: LineLink, + _TokenTypeName[30:41]: LineTableTD, + _TokenTypeLowerName[30:41]: LineTableTD, + _TokenTypeName[41:50]: LineTable, + _TokenTypeLowerName[41:50]: LineTable, + _TokenTypeName[50:63]: LineHighlight, + _TokenTypeLowerName[50:63]: LineHighlight, + _TokenTypeName[63:79]: LineNumbersTable, + _TokenTypeLowerName[63:79]: LineNumbersTable, + _TokenTypeName[79:90]: LineNumbers, + _TokenTypeLowerName[79:90]: LineNumbers, + _TokenTypeName[90:94]: Line, + _TokenTypeLowerName[90:94]: Line, + _TokenTypeName[94:104]: PreWrapper, + _TokenTypeLowerName[94:104]: PreWrapper, + _TokenTypeName[104:114]: Background, + _TokenTypeLowerName[104:114]: Background, + _TokenTypeName[114:121]: EOFType, + _TokenTypeLowerName[114:121]: EOFType, + _TokenTypeName[121:128]: Keyword, + _TokenTypeLowerName[121:128]: Keyword, + _TokenTypeName[128:143]: KeywordConstant, + _TokenTypeLowerName[128:143]: KeywordConstant, + _TokenTypeName[143:161]: KeywordDeclaration, + _TokenTypeLowerName[143:161]: KeywordDeclaration, + _TokenTypeName[161:177]: KeywordNamespace, + _TokenTypeLowerName[161:177]: KeywordNamespace, + _TokenTypeName[177:190]: KeywordPseudo, + _TokenTypeLowerName[177:190]: KeywordPseudo, + _TokenTypeName[190:205]: KeywordReserved, + _TokenTypeLowerName[190:205]: KeywordReserved, + _TokenTypeName[205:216]: KeywordType, + _TokenTypeLowerName[205:216]: KeywordType, + _TokenTypeName[216:220]: Name, + _TokenTypeLowerName[216:220]: Name, + _TokenTypeName[220:233]: NameAttribute, + _TokenTypeLowerName[220:233]: NameAttribute, + _TokenTypeName[233:244]: NameBuiltin, + _TokenTypeLowerName[233:244]: NameBuiltin, + _TokenTypeName[244:261]: NameBuiltinPseudo, + _TokenTypeLowerName[244:261]: NameBuiltinPseudo, + _TokenTypeName[261:270]: NameClass, + _TokenTypeLowerName[261:270]: NameClass, + _TokenTypeName[270:282]: NameConstant, + _TokenTypeLowerName[270:282]: NameConstant, + _TokenTypeName[282:295]: NameDecorator, + _TokenTypeLowerName[282:295]: NameDecorator, + _TokenTypeName[295:305]: NameEntity, + _TokenTypeLowerName[295:305]: NameEntity, + _TokenTypeName[305:318]: NameException, + _TokenTypeLowerName[305:318]: NameException, + _TokenTypeName[318:330]: NameFunction, + _TokenTypeLowerName[318:330]: NameFunction, + _TokenTypeName[330:347]: NameFunctionMagic, + _TokenTypeLowerName[330:347]: NameFunctionMagic, + _TokenTypeName[347:358]: NameKeyword, + _TokenTypeLowerName[347:358]: NameKeyword, + _TokenTypeName[358:367]: NameLabel, + _TokenTypeLowerName[358:367]: NameLabel, + _TokenTypeName[367:380]: NameNamespace, + _TokenTypeLowerName[367:380]: NameNamespace, + _TokenTypeName[380:392]: NameOperator, + _TokenTypeLowerName[380:392]: NameOperator, + _TokenTypeName[392:401]: NameOther, + _TokenTypeLowerName[392:401]: NameOther, + _TokenTypeName[401:411]: NamePseudo, + _TokenTypeLowerName[401:411]: NamePseudo, + _TokenTypeName[411:423]: NameProperty, + _TokenTypeLowerName[411:423]: NameProperty, + _TokenTypeName[423:430]: NameTag, + _TokenTypeLowerName[423:430]: NameTag, + _TokenTypeName[430:442]: NameVariable, + _TokenTypeLowerName[430:442]: NameVariable, + _TokenTypeName[442:463]: NameVariableAnonymous, + _TokenTypeLowerName[442:463]: NameVariableAnonymous, + _TokenTypeName[463:480]: NameVariableClass, + _TokenTypeLowerName[463:480]: NameVariableClass, + _TokenTypeName[480:498]: NameVariableGlobal, + _TokenTypeLowerName[480:498]: NameVariableGlobal, + _TokenTypeName[498:518]: NameVariableInstance, + _TokenTypeLowerName[498:518]: NameVariableInstance, + _TokenTypeName[518:535]: NameVariableMagic, + _TokenTypeLowerName[518:535]: NameVariableMagic, + _TokenTypeName[535:542]: Literal, + _TokenTypeLowerName[535:542]: Literal, + _TokenTypeName[542:553]: LiteralDate, + _TokenTypeLowerName[542:553]: LiteralDate, + _TokenTypeName[553:565]: LiteralOther, + _TokenTypeLowerName[553:565]: LiteralOther, + _TokenTypeName[565:578]: LiteralString, + _TokenTypeLowerName[565:578]: LiteralString, + _TokenTypeName[578:596]: LiteralStringAffix, + _TokenTypeLowerName[578:596]: LiteralStringAffix, + _TokenTypeName[596:613]: LiteralStringAtom, + _TokenTypeLowerName[596:613]: LiteralStringAtom, + _TokenTypeName[613:634]: LiteralStringBacktick, + _TokenTypeLowerName[613:634]: LiteralStringBacktick, + _TokenTypeName[634:654]: LiteralStringBoolean, + _TokenTypeLowerName[634:654]: LiteralStringBoolean, + _TokenTypeName[654:671]: LiteralStringChar, + _TokenTypeLowerName[654:671]: LiteralStringChar, + _TokenTypeName[671:693]: LiteralStringDelimiter, + _TokenTypeLowerName[671:693]: LiteralStringDelimiter, + _TokenTypeName[693:709]: LiteralStringDoc, + _TokenTypeLowerName[693:709]: LiteralStringDoc, + _TokenTypeName[709:728]: LiteralStringDouble, + _TokenTypeLowerName[709:728]: LiteralStringDouble, + _TokenTypeName[728:747]: LiteralStringEscape, + _TokenTypeLowerName[728:747]: LiteralStringEscape, + _TokenTypeName[747:767]: LiteralStringHeredoc, + _TokenTypeLowerName[747:767]: LiteralStringHeredoc, + _TokenTypeName[767:788]: LiteralStringInterpol, + _TokenTypeLowerName[767:788]: LiteralStringInterpol, + _TokenTypeName[788:805]: LiteralStringName, + _TokenTypeLowerName[788:805]: LiteralStringName, + _TokenTypeName[805:823]: LiteralStringOther, + _TokenTypeLowerName[805:823]: LiteralStringOther, + _TokenTypeName[823:841]: LiteralStringRegex, + _TokenTypeLowerName[823:841]: LiteralStringRegex, + _TokenTypeName[841:860]: LiteralStringSingle, + _TokenTypeLowerName[841:860]: LiteralStringSingle, + _TokenTypeName[860:879]: LiteralStringSymbol, + _TokenTypeLowerName[860:879]: LiteralStringSymbol, + _TokenTypeName[879:892]: LiteralNumber, + _TokenTypeLowerName[879:892]: LiteralNumber, + _TokenTypeName[892:908]: LiteralNumberBin, + _TokenTypeLowerName[892:908]: LiteralNumberBin, + _TokenTypeName[908:926]: LiteralNumberFloat, + _TokenTypeLowerName[908:926]: LiteralNumberFloat, + _TokenTypeName[926:942]: LiteralNumberHex, + _TokenTypeLowerName[926:942]: LiteralNumberHex, + _TokenTypeName[942:962]: LiteralNumberInteger, + _TokenTypeLowerName[942:962]: LiteralNumberInteger, + _TokenTypeName[962:986]: LiteralNumberIntegerLong, + _TokenTypeLowerName[962:986]: LiteralNumberIntegerLong, + _TokenTypeName[986:1002]: LiteralNumberOct, + _TokenTypeLowerName[986:1002]: LiteralNumberOct, + _TokenTypeName[1002:1010]: Operator, + _TokenTypeLowerName[1002:1010]: Operator, + _TokenTypeName[1010:1022]: OperatorWord, + _TokenTypeLowerName[1010:1022]: OperatorWord, + _TokenTypeName[1022:1033]: Punctuation, + _TokenTypeLowerName[1022:1033]: Punctuation, + _TokenTypeName[1033:1040]: Comment, + _TokenTypeLowerName[1033:1040]: Comment, + _TokenTypeName[1040:1055]: CommentHashbang, + _TokenTypeLowerName[1040:1055]: CommentHashbang, + _TokenTypeName[1055:1071]: CommentMultiline, + _TokenTypeLowerName[1055:1071]: CommentMultiline, + _TokenTypeName[1071:1084]: CommentSingle, + _TokenTypeLowerName[1071:1084]: CommentSingle, + _TokenTypeName[1084:1098]: CommentSpecial, + _TokenTypeLowerName[1084:1098]: CommentSpecial, + _TokenTypeName[1098:1112]: CommentPreproc, + _TokenTypeLowerName[1098:1112]: CommentPreproc, + _TokenTypeName[1112:1130]: CommentPreprocFile, + _TokenTypeLowerName[1112:1130]: CommentPreprocFile, + _TokenTypeName[1130:1137]: Generic, + _TokenTypeLowerName[1130:1137]: Generic, + _TokenTypeName[1137:1151]: GenericDeleted, + _TokenTypeLowerName[1137:1151]: GenericDeleted, + _TokenTypeName[1151:1162]: GenericEmph, + _TokenTypeLowerName[1151:1162]: GenericEmph, + _TokenTypeName[1162:1174]: GenericError, + _TokenTypeLowerName[1162:1174]: GenericError, + _TokenTypeName[1174:1188]: GenericHeading, + _TokenTypeLowerName[1174:1188]: GenericHeading, + _TokenTypeName[1188:1203]: GenericInserted, + _TokenTypeLowerName[1188:1203]: GenericInserted, + _TokenTypeName[1203:1216]: GenericOutput, + _TokenTypeLowerName[1203:1216]: GenericOutput, + _TokenTypeName[1216:1229]: GenericPrompt, + _TokenTypeLowerName[1216:1229]: GenericPrompt, + _TokenTypeName[1229:1242]: GenericStrong, + _TokenTypeLowerName[1229:1242]: GenericStrong, + _TokenTypeName[1242:1259]: GenericSubheading, + _TokenTypeLowerName[1242:1259]: GenericSubheading, + _TokenTypeName[1259:1275]: GenericTraceback, + _TokenTypeLowerName[1259:1275]: GenericTraceback, + _TokenTypeName[1275:1291]: GenericUnderline, + _TokenTypeLowerName[1275:1291]: GenericUnderline, + _TokenTypeName[1291:1295]: Text, + _TokenTypeLowerName[1291:1295]: Text, + _TokenTypeName[1295:1309]: TextWhitespace, + _TokenTypeLowerName[1295:1309]: TextWhitespace, + _TokenTypeName[1309:1319]: TextSymbol, + _TokenTypeLowerName[1309:1319]: TextSymbol, + _TokenTypeName[1319:1334]: TextPunctuation, + _TokenTypeLowerName[1319:1334]: TextPunctuation, +} + +var _TokenTypeNames = []string{ + _TokenTypeName[0:4], + _TokenTypeName[4:9], + _TokenTypeName[9:14], + _TokenTypeName[14:22], + _TokenTypeName[22:30], + _TokenTypeName[30:41], + _TokenTypeName[41:50], + _TokenTypeName[50:63], + _TokenTypeName[63:79], + _TokenTypeName[79:90], + _TokenTypeName[90:94], + _TokenTypeName[94:104], + _TokenTypeName[104:114], + _TokenTypeName[114:121], + _TokenTypeName[121:128], + _TokenTypeName[128:143], + _TokenTypeName[143:161], + _TokenTypeName[161:177], + _TokenTypeName[177:190], + _TokenTypeName[190:205], + _TokenTypeName[205:216], + _TokenTypeName[216:220], + _TokenTypeName[220:233], + _TokenTypeName[233:244], + _TokenTypeName[244:261], + _TokenTypeName[261:270], + _TokenTypeName[270:282], + _TokenTypeName[282:295], + _TokenTypeName[295:305], + _TokenTypeName[305:318], + _TokenTypeName[318:330], + _TokenTypeName[330:347], + _TokenTypeName[347:358], + _TokenTypeName[358:367], + _TokenTypeName[367:380], + _TokenTypeName[380:392], + _TokenTypeName[392:401], + _TokenTypeName[401:411], + _TokenTypeName[411:423], + _TokenTypeName[423:430], + _TokenTypeName[430:442], + _TokenTypeName[442:463], + _TokenTypeName[463:480], + _TokenTypeName[480:498], + _TokenTypeName[498:518], + _TokenTypeName[518:535], + _TokenTypeName[535:542], + _TokenTypeName[542:553], + _TokenTypeName[553:565], + _TokenTypeName[565:578], + _TokenTypeName[578:596], + _TokenTypeName[596:613], + _TokenTypeName[613:634], + _TokenTypeName[634:654], + _TokenTypeName[654:671], + _TokenTypeName[671:693], + _TokenTypeName[693:709], + _TokenTypeName[709:728], + _TokenTypeName[728:747], + _TokenTypeName[747:767], + _TokenTypeName[767:788], + _TokenTypeName[788:805], + _TokenTypeName[805:823], + _TokenTypeName[823:841], + _TokenTypeName[841:860], + _TokenTypeName[860:879], + _TokenTypeName[879:892], + _TokenTypeName[892:908], + _TokenTypeName[908:926], + _TokenTypeName[926:942], + _TokenTypeName[942:962], + _TokenTypeName[962:986], + _TokenTypeName[986:1002], + _TokenTypeName[1002:1010], + _TokenTypeName[1010:1022], + _TokenTypeName[1022:1033], + _TokenTypeName[1033:1040], + _TokenTypeName[1040:1055], + _TokenTypeName[1055:1071], + _TokenTypeName[1071:1084], + _TokenTypeName[1084:1098], + _TokenTypeName[1098:1112], + _TokenTypeName[1112:1130], + _TokenTypeName[1130:1137], + _TokenTypeName[1137:1151], + _TokenTypeName[1151:1162], + _TokenTypeName[1162:1174], + _TokenTypeName[1174:1188], + _TokenTypeName[1188:1203], + _TokenTypeName[1203:1216], + _TokenTypeName[1216:1229], + _TokenTypeName[1229:1242], + _TokenTypeName[1242:1259], + _TokenTypeName[1259:1275], + _TokenTypeName[1275:1291], + _TokenTypeName[1291:1295], + _TokenTypeName[1295:1309], + _TokenTypeName[1309:1319], + _TokenTypeName[1319:1334], } // TokenTypeString retrieves an enum value from the enum constants string name. @@ -227,6 +535,10 @@ func TokenTypeString(s string) (TokenType, error) { if val, ok := _TokenTypeNameToValueMap[s]; ok { return val, nil } + + if val, ok := _TokenTypeNameToValueMap[strings.ToLower(s)]; ok { + return val, nil + } return 0, fmt.Errorf("%s does not belong to TokenType values", s) } @@ -235,6 +547,13 @@ func TokenTypeValues() []TokenType { return _TokenTypeValues } +// TokenTypeStrings returns a slice of all String values of the enum +func TokenTypeStrings() []string { + strs := make([]string, len(_TokenTypeNames)) + copy(strs, _TokenTypeNames) + return strs +} + // IsATokenType returns "true" if the value is listed in the enum definition. "false" otherwise func (i TokenType) IsATokenType() bool { _, ok := _TokenTypeMap[i] diff --git a/vendor/modules.txt b/vendor/modules.txt index f3e4af746..4343b6fc0 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,7 +1,7 @@ # github.com/DataDog/gostackparse v0.7.0 ## explicit; go 1.16 github.com/DataDog/gostackparse -# github.com/alecthomas/chroma/v2 v2.8.0 +# github.com/alecthomas/chroma/v2 v2.9.1 ## explicit; go 1.19 github.com/alecthomas/chroma/v2 github.com/alecthomas/chroma/v2/formatters/html