From de865fd33295061658807142c4502632c06b9d96 Mon Sep 17 00:00:00 2001 From: Kevin Burke Date: Wed, 4 Aug 2021 11:11:59 -0700 Subject: [PATCH] vendor: update chroma to latest version --- Gopkg.lock | 10 +- Gopkg.toml | 6 +- .../alecthomas/chroma/.golangci.yml | 21 + .../alecthomas/chroma/.goreleaser.yml | 2 + .../github.com/alecthomas/chroma/.travis.yml | 12 - vendor/github.com/alecthomas/chroma/Makefile | 6 +- vendor/github.com/alecthomas/chroma/README.md | 53 +- .../alecthomas/chroma/bin/.go-1.16.3.pkg | 1 + .../chroma/bin/.golangci-lint-1.37.0.pkg | 1 + vendor/github.com/alecthomas/chroma/bin/go | 1 + vendor/github.com/alecthomas/chroma/bin/gofmt | 1 + .../alecthomas/chroma/bin/golangci-lint | 1 + .../alecthomas/chroma/formatters/html/html.go | 20 +- vendor/github.com/alecthomas/chroma/go.mod | 2 +- vendor/github.com/alecthomas/chroma/go.sum | 6 +- .../github.com/alecthomas/chroma/iterator.go | 2 +- vendor/github.com/alecthomas/chroma/lexer.go | 9 +- .../alecthomas/chroma/lexers/README.md | 3 + .../alecthomas/chroma/lexers/a/abap.go | 12 +- .../alecthomas/chroma/lexers/a/abnf.go | 12 +- .../chroma/lexers/a/actionscript.go | 12 +- .../chroma/lexers/a/actionscript3.go | 12 +- .../alecthomas/chroma/lexers/a/ada.go | 12 +- .../alecthomas/chroma/lexers/a/al.go | 48 + .../alecthomas/chroma/lexers/a/angular2.go | 12 +- .../alecthomas/chroma/lexers/a/antlr.go | 12 +- .../alecthomas/chroma/lexers/a/apache.go | 12 +- .../alecthomas/chroma/lexers/a/apl.go | 12 +- .../alecthomas/chroma/lexers/a/applescript.go | 12 +- .../alecthomas/chroma/lexers/a/arduino.go | 12 +- .../alecthomas/chroma/lexers/a/awk.go | 22 +- .../alecthomas/chroma/lexers/b/ballerina.go | 12 +- .../alecthomas/chroma/lexers/b/bash.go | 25 +- .../alecthomas/chroma/lexers/b/batch.go | 12 +- .../alecthomas/chroma/lexers/b/bibtex.go | 12 +- .../alecthomas/chroma/lexers/b/blitz.go | 12 +- .../alecthomas/chroma/lexers/b/bnf.go | 12 +- .../alecthomas/chroma/lexers/b/brainfuck.go | 12 +- .../alecthomas/chroma/lexers/c/c.go | 19 +- .../alecthomas/chroma/lexers/c/caddyfile.go | 216 +++ .../alecthomas/chroma/lexers/c/capnproto.go | 12 +- .../alecthomas/chroma/lexers/c/ceylon.go | 12 +- .../alecthomas/chroma/lexers/c/cfengine3.go | 12 +- .../alecthomas/chroma/lexers/c/chaiscript.go | 12 +- .../alecthomas/chroma/lexers/c/cheetah.go | 12 +- .../alecthomas/chroma/lexers/c/cl.go | 28 +- .../alecthomas/chroma/lexers/c/clojure.go | 12 +- .../alecthomas/chroma/lexers/c/cmake.go | 12 +- .../alecthomas/chroma/lexers/c/cobol.go | 12 +- .../alecthomas/chroma/lexers/c/coffee.go | 12 +- .../alecthomas/chroma/lexers/c/coldfusion.go | 12 +- .../alecthomas/chroma/lexers/c/coq.go | 12 +- .../alecthomas/chroma/lexers/c/cpp.go | 12 +- .../alecthomas/chroma/lexers/c/cql.go | 15 +- .../alecthomas/chroma/lexers/c/crystal.go | 12 +- .../alecthomas/chroma/lexers/c/csharp.go | 14 +- .../alecthomas/chroma/lexers/c/css.go | 25 +- .../alecthomas/chroma/lexers/c/cython.go | 12 +- .../alecthomas/chroma/lexers/circular/php.go | 33 +- .../chroma/lexers/circular/phtml.go | 39 + .../alecthomas/chroma/lexers/d/d.go | 12 +- .../alecthomas/chroma/lexers/d/dart.go | 12 +- .../alecthomas/chroma/lexers/d/diff.go | 12 +- .../alecthomas/chroma/lexers/d/django.go | 12 +- .../alecthomas/chroma/lexers/d/docker.go | 12 +- .../alecthomas/chroma/lexers/d/dtd.go | 12 +- .../alecthomas/chroma/lexers/d/dylan.go | 76 + .../alecthomas/chroma/lexers/e/ebnf.go | 12 +- .../alecthomas/chroma/lexers/e/elixir.go | 19 +- .../alecthomas/chroma/lexers/e/elm.go | 12 +- .../alecthomas/chroma/lexers/e/emacs.go | 24 +- .../alecthomas/chroma/lexers/e/erlang.go | 12 +- .../alecthomas/chroma/lexers/f/factor.go | 12 +- .../alecthomas/chroma/lexers/f/fish.go | 55 +- .../alecthomas/chroma/lexers/f/forth.go | 12 +- .../alecthomas/chroma/lexers/f/fortran.go | 12 +- .../chroma/lexers/f/fortran_fixed.go | 39 + .../alecthomas/chroma/lexers/f/fsharp.go | 12 +- .../alecthomas/chroma/lexers/g/gas.go | 12 +- .../alecthomas/chroma/lexers/g/gdscript.go | 12 +- .../alecthomas/chroma/lexers/g/genshi.go | 116 +- .../alecthomas/chroma/lexers/g/gherkin.go | 28 +- .../alecthomas/chroma/lexers/g/glsl.go | 12 +- .../alecthomas/chroma/lexers/g/gnuplot.go | 12 +- .../alecthomas/chroma/lexers/g/go.go | 115 +- .../alecthomas/chroma/lexers/g/graphql.go | 12 +- .../alecthomas/chroma/lexers/g/groff.go | 47 + .../alecthomas/chroma/lexers/g/groovy.go | 12 +- .../alecthomas/chroma/lexers/h/handlebars.go | 16 +- .../alecthomas/chroma/lexers/h/haskell.go | 12 +- .../alecthomas/chroma/lexers/h/haxe.go | 12 +- .../alecthomas/chroma/lexers/h/hcl.go | 12 +- .../alecthomas/chroma/lexers/h/hexdump.go | 12 +- .../alecthomas/chroma/lexers/{ => h}/hlb.go | 14 +- .../alecthomas/chroma/lexers/h/html.go | 12 +- .../alecthomas/chroma/lexers/h/http.go | 22 +- .../alecthomas/chroma/lexers/h/hy.go | 12 +- .../alecthomas/chroma/lexers/i/idris.go | 12 +- .../alecthomas/chroma/lexers/i/igor.go | 12 +- .../alecthomas/chroma/lexers/i/ini.go | 14 +- .../alecthomas/chroma/lexers/i/io.go | 12 +- .../alecthomas/chroma/lexers/internal/api.go | 44 +- .../alecthomas/chroma/lexers/j/j.go | 12 +- .../alecthomas/chroma/lexers/j/java.go | 13 +- .../alecthomas/chroma/lexers/j/javascript.go | 11 +- .../alecthomas/chroma/lexers/j/json.go | 12 +- .../alecthomas/chroma/lexers/j/jsx.go | 14 +- .../alecthomas/chroma/lexers/j/julia.go | 157 +- .../alecthomas/chroma/lexers/j/jungle.go | 12 +- .../alecthomas/chroma/lexers/k/kotlin.go | 75 +- .../alecthomas/chroma/lexers/l/lighttpd.go | 12 +- .../alecthomas/chroma/lexers/l/llvm.go | 12 +- .../alecthomas/chroma/lexers/l/lua.go | 12 +- .../alecthomas/chroma/lexers/lexers.go | 3 +- .../alecthomas/chroma/lexers/m/make.go | 12 +- .../alecthomas/chroma/lexers/m/mako.go | 12 +- .../alecthomas/chroma/lexers/m/markdown.go | 17 +- .../alecthomas/chroma/lexers/m/mason.go | 12 +- .../alecthomas/chroma/lexers/m/mathematica.go | 12 +- .../alecthomas/chroma/lexers/m/matlab.go | 12 +- .../alecthomas/chroma/lexers/m/mcfunction.go | 109 ++ .../alecthomas/chroma/lexers/m/metal.go | 101 ++ .../alecthomas/chroma/lexers/m/minizinc.go | 12 +- .../alecthomas/chroma/lexers/m/mlir.go | 12 +- .../alecthomas/chroma/lexers/m/modula2.go | 12 +- .../alecthomas/chroma/lexers/m/monkeyc.go | 12 +- .../alecthomas/chroma/lexers/m/mwscript.go | 12 +- .../alecthomas/chroma/lexers/m/myghty.go | 22 +- .../alecthomas/chroma/lexers/m/mysql.go | 43 +- .../alecthomas/chroma/lexers/n/nasm.go | 12 +- .../alecthomas/chroma/lexers/n/newspeak.go | 12 +- .../alecthomas/chroma/lexers/n/nginx.go | 12 +- .../alecthomas/chroma/lexers/n/nim.go | 12 +- .../alecthomas/chroma/lexers/n/nix.go | 18 +- .../alecthomas/chroma/lexers/o/objectivec.go | 12 +- .../alecthomas/chroma/lexers/o/ocaml.go | 12 +- .../alecthomas/chroma/lexers/o/octave.go | 12 +- .../alecthomas/chroma/lexers/o/openscad.go | 12 +- .../alecthomas/chroma/lexers/o/org.go | 18 +- .../alecthomas/chroma/lexers/p/pacman.go | 12 +- .../alecthomas/chroma/lexers/p/perl.go | 12 +- .../alecthomas/chroma/lexers/p/pig.go | 12 +- .../alecthomas/chroma/lexers/p/pkgconfig.go | 12 +- .../alecthomas/chroma/lexers/p/plaintext.go | 2 +- .../alecthomas/chroma/lexers/p/plsql.go | 14 +- .../alecthomas/chroma/lexers/p/pony.go | 63 + .../alecthomas/chroma/lexers/p/postgres.go | 18 +- .../alecthomas/chroma/lexers/p/postscript.go | 12 +- .../alecthomas/chroma/lexers/p/povray.go | 12 +- .../alecthomas/chroma/lexers/p/powerquery.go | 38 + .../alecthomas/chroma/lexers/p/powershell.go | 18 +- .../alecthomas/chroma/lexers/p/prolog.go | 12 +- .../alecthomas/chroma/lexers/p/promql.go | 59 + .../alecthomas/chroma/lexers/p/protobuf.go | 12 +- .../alecthomas/chroma/lexers/p/puppet.go | 12 +- .../alecthomas/chroma/lexers/p/python.go | 182 +- .../alecthomas/chroma/lexers/p/python2.go | 141 ++ .../alecthomas/chroma/lexers/p/python3.go | 137 -- .../alecthomas/chroma/lexers/q/qbasic.go | 12 +- .../alecthomas/chroma/lexers/q/qml.go | 58 + .../alecthomas/chroma/lexers/r/r.go | 12 +- .../alecthomas/chroma/lexers/r/racket.go | 12 +- .../alecthomas/chroma/lexers/r/ragel.go | 12 +- .../alecthomas/chroma/lexers/r/raku.go | 1496 +++++++++++++++++ .../alecthomas/chroma/lexers/r/reasonml.go | 12 +- .../alecthomas/chroma/lexers/r/regedit.go | 12 +- .../alecthomas/chroma/lexers/r/rexx.go | 12 +- .../alecthomas/chroma/lexers/r/rst.go | 16 +- .../alecthomas/chroma/lexers/r/ruby.go | 14 +- .../alecthomas/chroma/lexers/r/rust.go | 22 +- .../alecthomas/chroma/lexers/s/sas.go | 12 +- .../alecthomas/chroma/lexers/s/sass.go | 12 +- .../alecthomas/chroma/lexers/s/scala.go | 26 +- .../alecthomas/chroma/lexers/s/scheme.go | 12 +- .../alecthomas/chroma/lexers/s/scilab.go | 12 +- .../alecthomas/chroma/lexers/s/scss.go | 59 +- .../alecthomas/chroma/lexers/s/smalltalk.go | 12 +- .../alecthomas/chroma/lexers/s/smarty.go | 12 +- .../alecthomas/chroma/lexers/s/sml.go | 12 +- .../alecthomas/chroma/lexers/s/snobol.go | 12 +- .../alecthomas/chroma/lexers/s/solidity.go | 44 +- .../alecthomas/chroma/lexers/s/sparql.go | 12 +- .../alecthomas/chroma/lexers/s/sql.go | 14 +- .../alecthomas/chroma/lexers/s/squid.go | 12 +- .../alecthomas/chroma/lexers/s/stylus.go | 66 + .../alecthomas/chroma/lexers/s/svelte.go | 73 + .../alecthomas/chroma/lexers/s/swift.go | 12 +- .../alecthomas/chroma/lexers/s/systemd.go | 19 +- .../chroma/lexers/s/systemverilog.go | 12 +- .../alecthomas/chroma/lexers/t/tablegen.go | 12 +- .../alecthomas/chroma/lexers/t/tasm.go | 12 +- .../alecthomas/chroma/lexers/t/tcl.go | 12 +- .../alecthomas/chroma/lexers/t/tcsh.go | 12 +- .../alecthomas/chroma/lexers/t/termcap.go | 12 +- .../alecthomas/chroma/lexers/t/terminfo.go | 12 +- .../alecthomas/chroma/lexers/t/terraform.go | 12 +- .../alecthomas/chroma/lexers/t/tex.go | 12 +- .../alecthomas/chroma/lexers/t/thrift.go | 12 +- .../alecthomas/chroma/lexers/t/toml.go | 16 +- .../alecthomas/chroma/lexers/t/tradingview.go | 12 +- .../alecthomas/chroma/lexers/t/transactsql.go | 12 +- .../alecthomas/chroma/lexers/t/turing.go | 12 +- .../alecthomas/chroma/lexers/t/turtle.go | 12 +- .../alecthomas/chroma/lexers/t/twig.go | 12 +- .../alecthomas/chroma/lexers/t/typescript.go | 22 +- .../alecthomas/chroma/lexers/t/typoscript.go | 36 +- .../alecthomas/chroma/lexers/v/vb.go | 12 +- .../alecthomas/chroma/lexers/v/verilog.go | 12 +- .../alecthomas/chroma/lexers/v/vhdl.go | 12 +- .../alecthomas/chroma/lexers/v/vim.go | 12 +- .../alecthomas/chroma/lexers/v/vue.go | 12 +- .../alecthomas/chroma/lexers/w/wdte.go | 12 +- .../alecthomas/chroma/lexers/x/xml.go | 12 +- .../alecthomas/chroma/lexers/x/xorg.go | 12 +- .../alecthomas/chroma/lexers/y/yaml.go | 32 +- .../alecthomas/chroma/lexers/y/yang.go | 36 +- .../alecthomas/chroma/lexers/z/zig.go | 58 + .../alecthomas/chroma/pygments-lexers.txt | 3 - vendor/github.com/alecthomas/chroma/regexp.go | 210 ++- vendor/github.com/alecthomas/chroma/style.go | 10 +- .../alecthomas/chroma/styles/base16-snazzy.go | 81 + .../alecthomas/chroma/styles/doom-one.go | 58 + .../alecthomas/chroma/styles/doom-one2.go | 71 + .../alecthomas/chroma/styles/dracula.go | 4 +- .../alecthomas/chroma/styles/hr_dark.go | 17 + .../chroma/styles/hr_high_contrast.go | 19 + .../alecthomas/chroma/styles/nord.go | 75 + .../alecthomas/chroma/styles/vulcan.go | 95 ++ .../alecthomas/chroma/styles/xcode-dark.go | 62 + vendor/github.com/alecthomas/chroma/table.py | 21 +- vendor/github.com/alecthomas/chroma/types.go | 2 +- vendor/github.com/dlclark/regexp2/.gitignore | 4 +- vendor/github.com/dlclark/regexp2/.travis.yml | 2 +- vendor/github.com/dlclark/regexp2/README.md | 24 +- vendor/github.com/dlclark/regexp2/regexp.go | 12 +- vendor/github.com/dlclark/regexp2/runner.go | 19 +- .../dlclark/regexp2/syntax/charclass.go | 70 + .../dlclark/regexp2/syntax/parser.go | 128 +- 238 files changed, 5834 insertions(+), 1399 deletions(-) delete mode 100644 vendor/github.com/alecthomas/chroma/.travis.yml create mode 120000 vendor/github.com/alecthomas/chroma/bin/.go-1.16.3.pkg create mode 120000 vendor/github.com/alecthomas/chroma/bin/.golangci-lint-1.37.0.pkg create mode 120000 vendor/github.com/alecthomas/chroma/bin/go create mode 120000 vendor/github.com/alecthomas/chroma/bin/gofmt create mode 120000 vendor/github.com/alecthomas/chroma/bin/golangci-lint create mode 100644 vendor/github.com/alecthomas/chroma/lexers/a/al.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/c/caddyfile.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/circular/phtml.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/d/dylan.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/f/fortran_fixed.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/g/groff.go rename vendor/github.com/alecthomas/chroma/lexers/{ => h}/hlb.go (95%) create mode 100644 vendor/github.com/alecthomas/chroma/lexers/m/mcfunction.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/m/metal.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/p/pony.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/p/powerquery.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/p/promql.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/p/python2.go delete mode 100644 vendor/github.com/alecthomas/chroma/lexers/p/python3.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/q/qml.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/r/raku.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/s/stylus.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/s/svelte.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/z/zig.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/base16-snazzy.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/doom-one.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/doom-one2.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/hr_dark.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/hr_high_contrast.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/nord.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/vulcan.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/xcode-dark.go diff --git a/Gopkg.lock b/Gopkg.lock index 45b09bc..89d6719 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -2,7 +2,7 @@ [[projects]] - digest = "1:d0038638a197fe6bbc26587366f10a35d9545a4e763bc7783cb36b84726f323c" + digest = "1:a41877f8e11b1ad96a7d47ba3585e145217679cd9ad2236ad93c5643db15fc48" name = "github.com/alecthomas/chroma" packages = [ ".", @@ -34,10 +34,11 @@ "lexers/w", "lexers/x", "lexers/y", + "lexers/z", "styles", ] pruneopts = "UT" - revision = "v0.7.3" + revision = "v0.9.2" [[projects]] branch = "master" @@ -48,15 +49,14 @@ revision = "cbb64ac3d964b81592e64f957ad53df015803288" [[projects]] - digest = "1:72dc2b6056e7097f829260e4a2ff08d32fec6017df1982a66e110ab4128486f8" + digest = "1:1d760033af7697966e33f900ddd0e68bfa2637b50fa25e7384e45f73f54e3276" name = "github.com/dlclark/regexp2" packages = [ ".", "syntax", ] pruneopts = "UT" - revision = "487489b64fb796de2e55f4e8a4ad1e145f80e957" - version = "v1.1.6" + revision = "v1.4.0" [[projects]] branch = "master" diff --git a/Gopkg.toml b/Gopkg.toml index 64ae962..b37b69b 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -4,7 +4,11 @@ [[constraint]] name = "github.com/alecthomas/chroma" - revision = "v0.7.3" + revision = "v0.9.2" + +[[override]] + name = "github.com/dlclark/regexp2" + revision = "v1.4.0" [[constraint]] name = "golang.org/x/sys" diff --git a/vendor/github.com/alecthomas/chroma/.golangci.yml b/vendor/github.com/alecthomas/chroma/.golangci.yml index b1e51f3..ba75573 100644 --- a/vendor/github.com/alecthomas/chroma/.golangci.yml +++ b/vendor/github.com/alecthomas/chroma/.golangci.yml @@ -20,6 +20,22 @@ linters: - wsl - gomnd - gocognit + - goerr113 + - nolintlint + - testpackage + - godot + - nestif + - paralleltest + - nlreturn + - cyclop + - exhaustivestruct + - gci + - gofumpt + - errorlint + - exhaustive + - ifshort + - wrapcheck + - stylecheck linters-settings: govet: @@ -31,6 +47,11 @@ linters-settings: goconst: min-len: 8 min-occurrences: 3 + forbidigo: + forbid: + - (Must)?NewLexer + exclude_godoc_examples: false + issues: max-per-linter: 0 diff --git a/vendor/github.com/alecthomas/chroma/.goreleaser.yml b/vendor/github.com/alecthomas/chroma/.goreleaser.yml index 99d13e3..f8abfdd 100644 --- a/vendor/github.com/alecthomas/chroma/.goreleaser.yml +++ b/vendor/github.com/alecthomas/chroma/.goreleaser.yml @@ -6,6 +6,8 @@ release: brews: - install: bin.install "chroma" +env: + - CGO_ENABLED=0 builds: - goos: - linux diff --git a/vendor/github.com/alecthomas/chroma/.travis.yml b/vendor/github.com/alecthomas/chroma/.travis.yml deleted file mode 100644 index 9216ec9..0000000 --- a/vendor/github.com/alecthomas/chroma/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -sudo: false -language: go -go: - - "1.13.x" -script: - - go test -v ./... - - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s v1.22.2 - - ./bin/golangci-lint run - - git clean -fdx . -after_success: - curl -sL https://git.io/goreleaser | bash && goreleaser - diff --git a/vendor/github.com/alecthomas/chroma/Makefile b/vendor/github.com/alecthomas/chroma/Makefile index 1b8320a..010ec03 100644 --- a/vendor/github.com/alecthomas/chroma/Makefile +++ b/vendor/github.com/alecthomas/chroma/Makefile @@ -1,5 +1,7 @@ .PHONY: chromad upload all +VERSION ?= $(shell git describe --tags --dirty --always) + all: README.md tokentype_string.go README.md: lexers/*/*.go @@ -9,10 +11,8 @@ tokentype_string.go: types.go go generate chromad: - (cd ./cmd/chromad && go get github.com/GeertJohan/go.rice/rice@master && go install github.com/GeertJohan/go.rice/rice) rm -f chromad - (export CGOENABLED=0 GOOS=linux ; cd ./cmd/chromad && go build -o ../../chromad .) - rice append -i ./cmd/chromad --exec=./chromad + (export CGOENABLED=0 GOOS=linux ; cd ./cmd/chromad && go build -ldflags="-X 'main.version=$(VERSION)'" -o ../../chromad .) upload: chromad scp chromad root@swapoff.org: && \ diff --git a/vendor/github.com/alecthomas/chroma/README.md b/vendor/github.com/alecthomas/chroma/README.md index 490adea..95d54e6 100644 --- a/vendor/github.com/alecthomas/chroma/README.md +++ b/vendor/github.com/alecthomas/chroma/README.md @@ -1,4 +1,4 @@ -# 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) [![Build Status](https://travis-ci.org/alecthomas/chroma.svg)](https://travis-ci.org/alecthomas/chroma) [![Gitter chat](https://badges.gitter.im/alecthomas.svg)](https://gitter.im/alecthomas/Lobby) +# 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) [![CircleCI](https://img.shields.io/circleci/project/github/alecthomas/chroma.svg)](https://circleci.com/gh/alecthomas/chroma) [![Go Report Card](https://goreportcard.com/badge/github.com/alecthomas/chroma)](https://goreportcard.com/report/github.com/alecthomas/chroma) [![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. @@ -36,29 +36,30 @@ translators for Pygments lexers and styles. Prefix | Language :----: | -------- A | ABAP, ABNF, ActionScript, ActionScript 3, Ada, Angular2, ANTLR, ApacheConf, APL, AppleScript, Arduino, Awk -B | Ballerina, Base Makefile, Bash, Batchfile, BlitzBasic, BNF, Brainfuck -C | C, C#, C++, Cap'n Proto, Cassandra CQL, Ceylon, CFEngine3, cfstatement, ChaiScript, Cheetah, Clojure, CMake, COBOL, CoffeeScript, Common Lisp, Coq, Crystal, CSS, Cython -D | D, Dart, Diff, Django/Jinja, Docker, DTD +B | Ballerina, Base Makefile, Bash, Batchfile, BibTeX, BlitzBasic, BNF, Brainfuck +C | C, C#, C++, Caddyfile, Caddyfile Directives, Cap'n Proto, Cassandra CQL, Ceylon, CFEngine3, cfstatement, ChaiScript, 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, GLSL, Gnuplot, Go, Go HTML Template, Go Text Template, GraphQL, Groovy -H | Handlebars, Haskell, Haxe, HCL, Hexdump, HTML, HTTP, Hy -I | Idris, INI, Io +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, HTML, HTTP, Hy +I | Idris, Igor, INI, Io J | J, Java, JavaScript, JSON, Julia, Jungle K | Kotlin L | Lighttpd configuration file, LLVM, Lua M | 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, OpenSCAD, Org Mode -P | PacmanConf, Perl, PHP, Pig, PkgConfig, PL/pgSQL, plaintext, PostgreSQL SQL dialect, PostScript, POVRay, PowerShell, Prolog, Protocol Buffer, Puppet, Python, Python 3 +P | PacmanConf, Perl, PHP, PHTML, Pig, PkgConfig, PL/pgSQL, plaintext, Pony, PostgreSQL SQL dialect, PostScript, POVRay, PowerShell, Prolog, PromQL, Protocol Buffer, Puppet, Python 2, Python Q | QBasic -R | R, Racket, Ragel, react, reg, reStructuredText, Rexx, Ruby, Rust -S | Sass, Scala, Scheme, Scilab, SCSS, Smalltalk, Smarty, SML, Snobol, Solidity, SPARQL, SQL, SquidConf, Swift, SYSTEMD, systemverilog +R | R, Racket, Ragel, Raku, react, ReasonML, reg, reStructuredText, Rexx, Ruby, Rust +S | SAS, Sass, Scala, Scheme, Scilab, SCSS, Smalltalk, Smarty, Snobol, Solidity, SPARQL, SQL, SquidConf, Standard ML, 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, VimL, vue W | WDTE X | XML, Xorg -Y | YAML +Y | YAML, YANG +Z | Zig _I will attempt to keep this section up to date, but an authoritative list can be @@ -183,7 +184,7 @@ following constructor options: - `ClassPrefix(prefix)` - prefix each generated CSS class. - `TabWidth(width)` - Set the rendered tab width, in characters. - `WithLineNumbers()` - Render line numbers (style with `LineNumbers`). -- `LinkableLineNumbers()` - Make the line numbers linkable. +- `LinkableLineNumbers()` - Make the line numbers linkable and be a link to themselves. - `HighlightLines(ranges)` - Highlight lines in these ranges (style with `LineHighlight`). - `LineNumbersInTable()` - Use a table for formatting line numbers and code, rather than spans. @@ -209,13 +210,13 @@ using the included Python 3 script `pygments2chroma.py`. I use something like the following: ```sh -python3 ~/Projects/chroma/_tools/pygments2chroma.py \ +python3 _tools/pygments2chroma.py \ pygments.lexers.jvm.KotlinLexer \ - > ~/Projects/chroma/lexers/kotlin.go \ - && gofmt -s -w ~/Projects/chroma/lexers/*.go + > lexers/k/kotlin.go \ + && gofmt -s -w lexers/k/kotlin.go ``` -See notes in [pygments-lexers.go](https://github.com/alecthomas/chroma/blob/master/pygments-lexers.txt) +See notes in [pygments-lexers.txt](https://github.com/alecthomas/chroma/blob/master/pygments-lexers.txt) for a list of lexers, and notes on some of the issues importing them. @@ -254,12 +255,30 @@ A command-line interface to Chroma is included. It can be installed with: go get -u github.com/alecthomas/chroma/cmd/chroma ``` +The CLI can be used as a preprocessor to colorise output of `less(1)`, +see documentation for the `LESSOPEN` environment variable. + +The `--fail` flag can be used to suppress output and return with exit status +1 to facilitate falling back to some other preprocessor in case chroma +does not resolve a specific lexer to use for the given file. For example: + +```shell +export LESSOPEN='| p() { chroma --fail "$1" || cat "$1"; }; p "%s"' +``` + +Replace `cat` with your favourite fallback preprocessor. + +When invoked as `.lessfilter`, the `--fail` flag is automatically turned +on under the hood for easy integration with [lesspipe shipping with +Debian and derivatives](https://manpages.debian.org/lesspipe#USER_DEFINED_FILTERS); +for that setup the `chroma` executable can be just symlinked to `~/.lessfilter`. + ## 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 Perl6's ability to nest code inside + 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. diff --git a/vendor/github.com/alecthomas/chroma/bin/.go-1.16.3.pkg b/vendor/github.com/alecthomas/chroma/bin/.go-1.16.3.pkg new file mode 120000 index 0000000..383f451 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/bin/.go-1.16.3.pkg @@ -0,0 +1 @@ +hermit \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/bin/.golangci-lint-1.37.0.pkg b/vendor/github.com/alecthomas/chroma/bin/.golangci-lint-1.37.0.pkg new file mode 120000 index 0000000..383f451 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/bin/.golangci-lint-1.37.0.pkg @@ -0,0 +1 @@ +hermit \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/bin/go b/vendor/github.com/alecthomas/chroma/bin/go new file mode 120000 index 0000000..1fd74de --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/bin/go @@ -0,0 +1 @@ +.go-1.16.3.pkg \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/bin/gofmt b/vendor/github.com/alecthomas/chroma/bin/gofmt new file mode 120000 index 0000000..1fd74de --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/bin/gofmt @@ -0,0 +1 @@ +.go-1.16.3.pkg \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/bin/golangci-lint b/vendor/github.com/alecthomas/chroma/bin/golangci-lint new file mode 120000 index 0000000..cf27348 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/bin/golangci-lint @@ -0,0 +1 @@ +.golangci-lint-1.37.0.pkg \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/formatters/html/html.go b/vendor/github.com/alecthomas/chroma/formatters/html/html.go index ad48da1..5121529 100644 --- a/vendor/github.com/alecthomas/chroma/formatters/html/html.go +++ b/vendor/github.com/alecthomas/chroma/formatters/html/html.go @@ -131,7 +131,7 @@ var ( } defaultPreWrapper = preWrapper{ start: func(code bool, styleAttr string) string { - return fmt.Sprintf("", styleAttr) + return fmt.Sprintf(`
`, styleAttr)
 		},
 		end: func(code bool) string {
 			return "
" @@ -211,7 +211,7 @@ func (f *Formatter) writeHTML(w io.Writer, style *chroma.Style, tokens []chroma. fmt.Fprintf(w, "", f.styleAttr(css, chroma.LineHighlight)) } - fmt.Fprintf(w, "%*d\n", f.styleAttr(css, chroma.LineNumbersTable), f.lineIDAttribute(line), lineDigits, line) + fmt.Fprintf(w, "%s\n", f.styleAttr(css, chroma.LineNumbersTable), f.lineIDAttribute(line), f.lineTitleWithLinkIfNeeded(lineDigits, line)) if highlight { fmt.Fprintf(w, "") @@ -237,7 +237,7 @@ func (f *Formatter) writeHTML(w io.Writer, style *chroma.Style, tokens []chroma. } if f.lineNumbers && !wrapInTable { - fmt.Fprintf(w, "%*d", f.styleAttr(css, chroma.LineNumbers), f.lineIDAttribute(line), lineDigits, line) + fmt.Fprintf(w, "%s", f.styleAttr(css, chroma.LineNumbers), f.lineIDAttribute(line), f.lineTitleWithLinkIfNeeded(lineDigits, line)) } for _, token := range tokens { @@ -272,7 +272,19 @@ func (f *Formatter) lineIDAttribute(line int) string { if !f.linkableLineNumbers { return "" } - return fmt.Sprintf(" id=\"%s%d\"", f.lineNumbersIDPrefix, line) + return fmt.Sprintf(" id=\"%s\"", f.lineID(line)) +} + +func (f *Formatter) lineTitleWithLinkIfNeeded(lineDigits, line int) string { + title := fmt.Sprintf("%*d", lineDigits, line) + if !f.linkableLineNumbers { + return title + } + return fmt.Sprintf("%s", f.lineID(line), title) +} + +func (f *Formatter) lineID(line int) string { + return fmt.Sprintf("%s%d", f.lineNumbersIDPrefix, line) } func (f *Formatter) shouldHighlight(highlightIndex, line int) (bool, bool) { diff --git a/vendor/github.com/alecthomas/chroma/go.mod b/vendor/github.com/alecthomas/chroma/go.mod index 10e6d6e..3baf1cb 100644 --- a/vendor/github.com/alecthomas/chroma/go.mod +++ b/vendor/github.com/alecthomas/chroma/go.mod @@ -8,7 +8,7 @@ require ( github.com/alecthomas/kong v0.2.4 github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 // indirect github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 - github.com/dlclark/regexp2 v1.2.0 + github.com/dlclark/regexp2 v1.4.0 github.com/mattn/go-colorable v0.1.6 github.com/mattn/go-isatty v0.0.12 github.com/pkg/errors v0.9.1 // indirect diff --git a/vendor/github.com/alecthomas/chroma/go.sum b/vendor/github.com/alecthomas/chroma/go.sum index fb943fc..12000b7 100644 --- a/vendor/github.com/alecthomas/chroma/go.sum +++ b/vendor/github.com/alecthomas/chroma/go.sum @@ -11,13 +11,12 @@ github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dlclark/regexp2 v1.2.0 h1:8sAhBGEM0dRWogWqWyQeIJnxjWO6oIjl8FKqREDsGfk= -github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E= +github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -26,7 +25,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= diff --git a/vendor/github.com/alecthomas/chroma/iterator.go b/vendor/github.com/alecthomas/chroma/iterator.go index c8845a1..d5175de 100644 --- a/vendor/github.com/alecthomas/chroma/iterator.go +++ b/vendor/github.com/alecthomas/chroma/iterator.go @@ -4,7 +4,7 @@ import "strings" // An Iterator across tokens. // -// nil will be returned at the end of the Token stream. +// EOF will be returned at the end of the Token stream. // // If an error occurs within an Iterator, it may propagate this in a panic. Formatters should recover. type Iterator func() Token diff --git a/vendor/github.com/alecthomas/chroma/lexer.go b/vendor/github.com/alecthomas/chroma/lexer.go index 1269d33..fe62519 100644 --- a/vendor/github.com/alecthomas/chroma/lexer.go +++ b/vendor/github.com/alecthomas/chroma/lexer.go @@ -2,6 +2,7 @@ package chroma import ( "fmt" + "strings" ) var ( @@ -98,9 +99,11 @@ type Lexer interface { // Lexers is a slice of lexers sortable by name. type Lexers []Lexer -func (l Lexers) Len() int { return len(l) } -func (l Lexers) Swap(i, j int) { l[i], l[j] = l[j], l[i] } -func (l Lexers) Less(i, j int) bool { return l[i].Config().Name < l[j].Config().Name } +func (l Lexers) Len() int { return len(l) } +func (l Lexers) Swap(i, j int) { l[i], l[j] = l[j], l[i] } +func (l Lexers) Less(i, j int) bool { + return strings.ToLower(l[i].Config().Name) < strings.ToLower(l[j].Config().Name) +} // PrioritisedLexers is a slice of lexers sortable by priority. type PrioritisedLexers []Lexer diff --git a/vendor/github.com/alecthomas/chroma/lexers/README.md b/vendor/github.com/alecthomas/chroma/lexers/README.md index 2421710..b4ed292 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/README.md +++ b/vendor/github.com/alecthomas/chroma/lexers/README.md @@ -3,6 +3,9 @@ The tests in this directory feed a known input `testdata/.actual` into the parser for `` and check that its output matches `.exported`. +It is also possible to perform several tests on a same parser ``, by placing know inputs `*.actual` into a +directory `testdata//`. + ## Running the tests Run the tests as normal: diff --git a/vendor/github.com/alecthomas/chroma/lexers/a/abap.go b/vendor/github.com/alecthomas/chroma/lexers/a/abap.go index 61c294e..268aa6a 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/a/abap.go +++ b/vendor/github.com/alecthomas/chroma/lexers/a/abap.go @@ -6,7 +6,7 @@ import ( ) // ABAP lexer. -var Abap = internal.Register(MustNewLexer( +var Abap = internal.Register(MustNewLazyLexer( &Config{ Name: "ABAP", Aliases: []string{"abap"}, @@ -14,7 +14,11 @@ var Abap = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-abap"}, CaseInsensitive: true, }, - Rules{ + abapRules, +)) + +func abapRules() Rules { + return Rules{ "common": { {`\s+`, Text, nil}, {`^\*.*$`, CommentSingle, nil}, @@ -52,5 +56,5 @@ var Abap = internal.Register(MustNewLexer( {`[/;:()\[\],.]`, Punctuation, nil}, {`(!)(\w+)`, ByGroups(Operator, Name), nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/a/abnf.go b/vendor/github.com/alecthomas/chroma/lexers/a/abnf.go index ff29aed..85c47af 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/a/abnf.go +++ b/vendor/github.com/alecthomas/chroma/lexers/a/abnf.go @@ -6,14 +6,18 @@ import ( ) // Abnf lexer. -var Abnf = internal.Register(MustNewLexer( +var Abnf = internal.Register(MustNewLazyLexer( &Config{ Name: "ABNF", Aliases: []string{"abnf"}, Filenames: []string{"*.abnf"}, MimeTypes: []string{"text/x-abnf"}, }, - Rules{ + abnfRules, +)) + +func abnfRules() Rules { + return Rules{ "root": { {`;.*$`, CommentSingle, nil}, {`(%[si])?"[^"]*"`, Literal, nil}, @@ -34,5 +38,5 @@ var Abnf = internal.Register(MustNewLexer( {`\s+`, Text, nil}, {`.`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/a/actionscript.go b/vendor/github.com/alecthomas/chroma/lexers/a/actionscript.go index 43d3852..df55d6d 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/a/actionscript.go +++ b/vendor/github.com/alecthomas/chroma/lexers/a/actionscript.go @@ -6,7 +6,7 @@ import ( ) // Actionscript lexer. -var Actionscript = internal.Register(MustNewLexer( +var Actionscript = internal.Register(MustNewLazyLexer( &Config{ Name: "ActionScript", Aliases: []string{"as", "actionscript"}, @@ -15,7 +15,11 @@ var Actionscript = internal.Register(MustNewLexer( NotMultiline: true, DotAll: true, }, - Rules{ + actionscriptRules, +)) + +func actionscriptRules() Rules { + return Rules{ "root": { {`\s+`, Text, nil}, {`//.*?\n`, CommentSingle, nil}, @@ -35,5 +39,5 @@ var Actionscript = internal.Register(MustNewLexer( {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/a/actionscript3.go b/vendor/github.com/alecthomas/chroma/lexers/a/actionscript3.go index 3404bd5..45596dc 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/a/actionscript3.go +++ b/vendor/github.com/alecthomas/chroma/lexers/a/actionscript3.go @@ -6,7 +6,7 @@ import ( ) // Actionscript 3 lexer. -var Actionscript3 = internal.Register(MustNewLexer( +var Actionscript3 = internal.Register(MustNewLazyLexer( &Config{ Name: "ActionScript 3", Aliases: []string{"as3", "actionscript3"}, @@ -14,7 +14,11 @@ var Actionscript3 = internal.Register(MustNewLexer( MimeTypes: []string{"application/x-actionscript3", "text/x-actionscript3", "text/actionscript3"}, DotAll: true, }, - Rules{ + actionscript3Rules, +)) + +func actionscript3Rules() Rules { + return Rules{ "root": { {`\s+`, Text, nil}, {`(function\s+)([$a-zA-Z_]\w*)(\s*)(\()`, ByGroups(KeywordDeclaration, NameFunction, Text, Operator), Push("funcparams")}, @@ -52,5 +56,5 @@ var Actionscript3 = internal.Register(MustNewLexer( {`,`, Operator, Pop(1)}, Default(Pop(1)), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/a/ada.go b/vendor/github.com/alecthomas/chroma/lexers/a/ada.go index d9b34e3..9167271 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/a/ada.go +++ b/vendor/github.com/alecthomas/chroma/lexers/a/ada.go @@ -6,7 +6,7 @@ import ( ) // Ada lexer. -var Ada = internal.Register(MustNewLexer( +var Ada = internal.Register(MustNewLazyLexer( &Config{ Name: "Ada", Aliases: []string{"ada", "ada95", "ada2005"}, @@ -14,7 +14,11 @@ var Ada = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-ada"}, CaseInsensitive: true, }, - Rules{ + adaRules, +)) + +func adaRules() Rules { + return Rules{ "root": { {`[^\S\n]+`, Text, nil}, {`--.*?\n`, CommentSingle, nil}, @@ -110,5 +114,5 @@ var Ada = internal.Register(MustNewLexer( {`\)`, Punctuation, Pop(1)}, Include("root"), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/a/al.go b/vendor/github.com/alecthomas/chroma/lexers/a/al.go new file mode 100644 index 0000000..d701644 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/a/al.go @@ -0,0 +1,48 @@ +package a + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// Al lexer. +var Al = internal.Register(MustNewLazyLexer( + &Config{ + Name: "AL", + Aliases: []string{"al"}, + Filenames: []string{"*.al", "*.dal"}, + MimeTypes: []string{"text/x-al"}, + DotAll: true, + CaseInsensitive: true, + }, + alRules, +)) + +// https://github.com/microsoft/AL/blob/master/grammar/alsyntax.tmlanguage +func alRules() Rules { + return Rules{ + "root": { + {`\s+`, TextWhitespace, nil}, + {`(?s)\/\*.*?\\*\*\/`, CommentMultiline, nil}, + {`(?s)//.*?\n`, CommentSingle, nil}, + {`\"([^\"])*\"`, Text, nil}, + {`'([^'])*'`, LiteralString, nil}, + {`\b(?i:(ARRAY|ASSERTERROR|BEGIN|BREAK|CASE|DO|DOWNTO|ELSE|END|EVENT|EXIT|FOR|FOREACH|FUNCTION|IF|IMPLEMENTS|IN|INDATASET|INTERFACE|INTERNAL|LOCAL|OF|PROCEDURE|PROGRAM|PROTECTED|REPEAT|RUNONCLIENT|SECURITYFILTERING|SUPPRESSDISPOSE|TEMPORARY|THEN|TO|TRIGGER|UNTIL|VAR|WHILE|WITH|WITHEVENTS))\b`, Keyword, nil}, + {`\b(?i:(AND|DIV|MOD|NOT|OR|XOR))\b`, OperatorWord, nil}, + {`\b(?i:(AVERAGE|CONST|COUNT|EXIST|FIELD|FILTER|LOOKUP|MAX|MIN|ORDER|SORTING|SUM|TABLEDATA|UPPERLIMIT|WHERE|ASCENDING|DESCENDING))\b`, Keyword, nil}, + // Added new objects types of BC 2021 wave 1 (REPORTEXTENSION|Entitlement|PermissionSet|PermissionSetExtension) + {`\b(?i:(CODEUNIT|PAGE|PAGEEXTENSION|PAGECUSTOMIZATION|DOTNET|ENUM|ENUMEXTENSION|VALUE|QUERY|REPORT|TABLE|TABLEEXTENSION|XMLPORT|PROFILE|CONTROLADDIN|REPORTEXTENSION|Entitlement|PermissionSet|PermissionSetExtension))\b`, Keyword, nil}, + {`\b(?i:(Action|Array|Automation|BigInteger|BigText|Blob|Boolean|Byte|Char|ClientType|Code|Codeunit|CompletionTriggerErrorLevel|ConnectionType|Database|DataClassification|DataScope|Date|DateFormula|DateTime|Decimal|DefaultLayout|Dialog|Dictionary|DotNet|DotNetAssembly|DotNetTypeDeclaration|Duration|Enum|ErrorInfo|ErrorType|ExecutionContext|ExecutionMode|FieldClass|FieldRef|FieldType|File|FilterPageBuilder|Guid|InStream|Integer|Joker|KeyRef|List|ModuleDependencyInfo|ModuleInfo|None|Notification|NotificationScope|ObjectType|Option|OutStream|Page|PageResult|Query|Record|RecordId|RecordRef|Report|ReportFormat|SecurityFilter|SecurityFiltering|Table|TableConnectionType|TableFilter|TestAction|TestField|TestFilterField|TestPage|TestPermissions|TestRequestPage|Text|TextBuilder|TextConst|TextEncoding|Time|TransactionModel|TransactionType|Variant|Verbosity|Version|XmlPort|HttpContent|HttpHeaders|HttpClient|HttpRequestMessage|HttpResponseMessage|JsonToken|JsonValue|JsonArray|JsonObject|View|Views|XmlAttribute|XmlAttributeCollection|XmlComment|XmlCData|XmlDeclaration|XmlDocument|XmlDocumentType|XmlElement|XmlNamespaceManager|XmlNameTable|XmlNode|XmlNodeList|XmlProcessingInstruction|XmlReadOptions|XmlText|XmlWriteOptions|WebServiceActionContext|WebServiceActionResultCode|SessionSettings))\b`, Keyword, nil}, + {`\b([<>]=|<>|<|>)\b?`, Operator, nil}, + {`\b(\-|\+|\/|\*)\b`, Operator, nil}, + {`\s*(\:=|\+=|-=|\/=|\*=)\s*?`, Operator, nil}, + {`\b(?i:(ADDFIRST|ADDLAST|ADDAFTER|ADDBEFORE|ACTION|ACTIONS|AREA|ASSEMBLY|CHARTPART|CUEGROUP|CUSTOMIZES|COLUMN|DATAITEM|DATASET|ELEMENTS|EXTENDS|FIELD|FIELDGROUP|FIELDATTRIBUTE|FIELDELEMENT|FIELDGROUPS|FIELDS|FILTER|FIXED|GRID|GROUP|MOVEAFTER|MOVEBEFORE|KEY|KEYS|LABEL|LABELS|LAYOUT|MODIFY|MOVEFIRST|MOVELAST|MOVEBEFORE|MOVEAFTER|PART|REPEATER|USERCONTROL|REQUESTPAGE|SCHEMA|SEPARATOR|SYSTEMPART|TABLEELEMENT|TEXTATTRIBUTE|TEXTELEMENT|TYPE))\b`, Keyword, nil}, + {`\s*[(\.\.)&\|]\s*`, Operator, nil}, + {`\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\b`, LiteralNumber, nil}, + {`[;:,]`, Punctuation, nil}, + {`#[ \t]*(if|else|elif|endif|define|undef|region|endregion|pragma)\b.*?\n`, CommentPreproc, nil}, + {`\w+`, Text, nil}, + {`.`, Text, nil}, + }, + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/a/angular2.go b/vendor/github.com/alecthomas/chroma/lexers/a/angular2.go index 5258c92..a947eda 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/a/angular2.go +++ b/vendor/github.com/alecthomas/chroma/lexers/a/angular2.go @@ -6,14 +6,18 @@ import ( ) // Angular2 lexer. -var Angular2 = internal.Register(MustNewLexer( +var Angular2 = internal.Register(MustNewLazyLexer( &Config{ Name: "Angular2", Aliases: []string{"ng2"}, Filenames: []string{}, MimeTypes: []string{}, }, - Rules{ + angular2Rules, +)) + +func angular2Rules() Rules { + return Rules{ "root": { {`[^{([*#]+`, Other, nil}, {`(\{\{)(\s*)`, ByGroups(CommentPreproc, Text), Push("ngExpression")}, @@ -38,5 +42,5 @@ var Angular2 = internal.Register(MustNewLexer( {`'.*?'`, LiteralString, Pop(1)}, {`[^\s>]+`, LiteralString, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/a/antlr.go b/vendor/github.com/alecthomas/chroma/lexers/a/antlr.go index d7649d4..c744353 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/a/antlr.go +++ b/vendor/github.com/alecthomas/chroma/lexers/a/antlr.go @@ -6,14 +6,18 @@ import ( ) // ANTLR lexer. -var ANTLR = internal.Register(MustNewLexer( +var ANTLR = internal.Register(MustNewLazyLexer( &Config{ Name: "ANTLR", Aliases: []string{"antlr"}, Filenames: []string{}, MimeTypes: []string{}, }, - Rules{ + antlrRules, +)) + +func antlrRules() Rules { + return Rules{ "whitespace": { {`\s+`, TextWhitespace, nil}, }, @@ -97,5 +101,5 @@ var ANTLR = internal.Register(MustNewLexer( {`(\$[a-zA-Z]+)(\.?)(text|value)?`, ByGroups(NameVariable, Punctuation, NameProperty), nil}, {`(\\\\|\\\]|\\\[|[^\[\]])+`, Other, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/a/apache.go b/vendor/github.com/alecthomas/chroma/lexers/a/apache.go index 6c56a1d..5685eb1 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/a/apache.go +++ b/vendor/github.com/alecthomas/chroma/lexers/a/apache.go @@ -6,7 +6,7 @@ import ( ) // Apacheconf lexer. -var Apacheconf = internal.Register(MustNewLexer( +var Apacheconf = internal.Register(MustNewLazyLexer( &Config{ Name: "ApacheConf", Aliases: []string{"apacheconf", "aconf", "apache"}, @@ -14,7 +14,11 @@ var Apacheconf = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-apacheconf"}, CaseInsensitive: true, }, - Rules{ + apacheconfRules, +)) + +func apacheconfRules() Rules { + return Rules{ "root": { {`\s+`, Text, nil}, {`(#.*?)$`, Comment, nil}, @@ -34,5 +38,5 @@ var Apacheconf = internal.Register(MustNewLexer( {`"([^"\\]*(?:\\.[^"\\]*)*)"`, LiteralStringDouble, nil}, {`[^\s"\\]+`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/a/apl.go b/vendor/github.com/alecthomas/chroma/lexers/a/apl.go index 820e13b..6cf1ea0 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/a/apl.go +++ b/vendor/github.com/alecthomas/chroma/lexers/a/apl.go @@ -6,14 +6,18 @@ import ( ) // Apl lexer. -var Apl = internal.Register(MustNewLexer( +var Apl = internal.Register(MustNewLazyLexer( &Config{ Name: "APL", Aliases: []string{"apl"}, Filenames: []string{"*.apl"}, MimeTypes: []string{}, }, - Rules{ + aplRules, +)) + +func aplRules() Rules { + return Rules{ "root": { {`\s+`, Text, nil}, {`[⍝#].*$`, CommentSingle, nil}, @@ -32,5 +36,5 @@ var Apl = internal.Register(MustNewLexer( {`[⍺⍵⍶⍹∇:]`, NameBuiltinPseudo, nil}, {`[{}]`, KeywordType, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/a/applescript.go b/vendor/github.com/alecthomas/chroma/lexers/a/applescript.go index db83ed0..b6a53c5 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/a/applescript.go +++ b/vendor/github.com/alecthomas/chroma/lexers/a/applescript.go @@ -6,7 +6,7 @@ import ( ) // Applescript lexer. -var Applescript = internal.Register(MustNewLexer( +var Applescript = internal.Register(MustNewLazyLexer( &Config{ Name: "AppleScript", Aliases: []string{"applescript"}, @@ -14,7 +14,11 @@ var Applescript = internal.Register(MustNewLexer( MimeTypes: []string{}, DotAll: true, }, - Rules{ + applescriptRules, +)) + +func applescriptRules() Rules { + return Rules{ "root": { {`\s+`, Text, nil}, {`¬\n`, LiteralStringEscape, nil}, @@ -51,5 +55,5 @@ var Applescript = internal.Register(MustNewLexer( {`[^*(]+`, CommentMultiline, nil}, {`[*(]`, CommentMultiline, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/a/arduino.go b/vendor/github.com/alecthomas/chroma/lexers/a/arduino.go index b0cd8c9..0edbe3f 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/a/arduino.go +++ b/vendor/github.com/alecthomas/chroma/lexers/a/arduino.go @@ -6,7 +6,7 @@ import ( ) // Arduino lexer. -var Arduino = internal.Register(MustNewLexer( +var Arduino = internal.Register(MustNewLazyLexer( &Config{ Name: "Arduino", Aliases: []string{"arduino"}, @@ -14,7 +14,11 @@ var Arduino = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-arduino"}, EnsureNL: true, }, - Rules{ + arduinoRules, +)) + +func arduinoRules() Rules { + return Rules{ "statements": { {Words(``, `\b`, `catch`, `const_cast`, `delete`, `dynamic_cast`, `explicit`, `export`, `friend`, `mutable`, `namespace`, `new`, `operator`, `private`, `protected`, `public`, `reinterpret_cast`, `restrict`, `static_cast`, `template`, `this`, `throw`, `throws`, `try`, `typeid`, `typename`, `using`, `virtual`, `constexpr`, `nullptr`, `decltype`, `thread_local`, `alignas`, `alignof`, `static_assert`, `noexcept`, `override`, `final`), Keyword, nil}, {`char(16_t|32_t)\b`, KeywordType, nil}, @@ -106,5 +110,5 @@ var Arduino = internal.Register(MustNewLexer( {`^\s*#endif.*?(?+*%\^/!=|])=?`, Operator, Push("slashstartsregex")}, + {`\+\+|--|\|\||&&|in\b|\$|!?~|\|&|(\*\*|[-<>+*%\^/!=|])=?`, Operator, Push("slashstartsregex")}, {`[{(\[;,]`, Punctuation, Push("slashstartsregex")}, {`[})\].]`, Punctuation, nil}, - {`(break|continue|do|while|exit|for|if|else|return)\b`, Keyword, Push("slashstartsregex")}, + {`(break|continue|do|while|exit|for|if|else|return|switch|case|default)\b`, Keyword, Push("slashstartsregex")}, {`function\b`, KeywordDeclaration, Push("slashstartsregex")}, - {`(atan2|cos|exp|int|log|rand|sin|sqrt|srand|gensub|gsub|index|length|match|split|sprintf|sub|substr|tolower|toupper|close|fflush|getline|next|nextfile|print|printf|strftime|systime|delete|system)\b`, KeywordReserved, nil}, - {`(ARGC|ARGIND|ARGV|BEGIN|CONVFMT|ENVIRON|END|ERRNO|FIELDWIDTHS|FILENAME|FNR|FS|IGNORECASE|NF|NR|OFMT|OFS|ORFS|RLENGTH|RS|RSTART|RT|SUBSEP)\b`, NameBuiltin, nil}, - {`[$a-zA-Z_]\w*`, NameOther, nil}, + {`(atan2|cos|exp|int|log|rand|sin|sqrt|srand|gensub|gsub|index|length|match|split|patsplit|sprintf|sub|substr|tolower|toupper|close|fflush|getline|next(file)|print|printf|strftime|systime|mktime|delete|system|strtonum|and|compl|lshift|or|rshift|asorti?|isarray|bindtextdomain|dcn?gettext|@(include|load|namespace))\b`, KeywordReserved, nil}, + {`(ARGC|ARGIND|ARGV|BEGIN(FILE)?|BINMODE|CONVFMT|ENVIRON|END(FILE)?|ERRNO|FIELDWIDTHS|FILENAME|FNR|FPAT|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS|PROCINFO|RLENGTH|RS|RSTART|RT|SUBSEP|TEXTDOMAIN)\b`, NameBuiltin, nil}, + {`[@$a-zA-Z_]\w*`, NameOther, nil}, {`[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?`, LiteralNumberFloat, nil}, {`0x[0-9a-fA-F]+`, LiteralNumberHex, nil}, {`[0-9]+`, LiteralNumberInteger, nil}, {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/b/ballerina.go b/vendor/github.com/alecthomas/chroma/lexers/b/ballerina.go index 91dc901..d8916d0 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/b/ballerina.go +++ b/vendor/github.com/alecthomas/chroma/lexers/b/ballerina.go @@ -6,7 +6,7 @@ import ( ) // Ballerina lexer. -var Ballerina = internal.Register(MustNewLexer( +var Ballerina = internal.Register(MustNewLazyLexer( &Config{ Name: "Ballerina", Aliases: []string{"ballerina"}, @@ -14,7 +14,11 @@ var Ballerina = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-ballerina"}, DotAll: true, }, - Rules{ + ballerinaRules, +)) + +func ballerinaRules() Rules { + return Rules{ "root": { {`[^\S\n]+`, Text, nil}, {`//.*?\n`, CommentSingle, nil}, @@ -42,5 +46,5 @@ var Ballerina = internal.Register(MustNewLexer( "import": { {`[\w.]+`, NameNamespace, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/b/bash.go b/vendor/github.com/alecthomas/chroma/lexers/b/bash.go index 38b3f22..34b1e22 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/b/bash.go +++ b/vendor/github.com/alecthomas/chroma/lexers/b/bash.go @@ -7,17 +7,27 @@ import ( "github.com/alecthomas/chroma/lexers/internal" ) +// TODO(moorereason): can this be factored away? var bashAnalyserRe = regexp.MustCompile(`(?m)^#!.*/bin/(?:env |)(?:bash|zsh|sh|ksh)`) // Bash lexer. -var Bash = internal.Register(MustNewLexer( +var Bash = internal.Register(MustNewLazyLexer( &Config{ Name: "Bash", Aliases: []string{"bash", "sh", "ksh", "zsh", "shell"}, - Filenames: []string{"*.sh", "*.ksh", "*.bash", "*.ebuild", "*.eclass", "*.exheres-0", "*.exlib", "*.zsh", "*.zshrc", ".bashrc", "bashrc", ".bash_*", "bash_*", "zshrc", ".zshrc", "PKGBUILD"}, + Filenames: []string{"*.sh", "*.ksh", "*.bash", "*.ebuild", "*.eclass", ".env", "*.env", "*.exheres-0", "*.exlib", "*.zsh", "*.zshrc", ".bashrc", "bashrc", ".bash_*", "bash_*", "zshrc", ".zshrc", "PKGBUILD"}, MimeTypes: []string{"application/x-sh", "application/x-shellscript"}, }, - Rules{ + bashRules, +).SetAnalyser(func(text string) float32 { + if bashAnalyserRe.FindString(text) != "" { + return 1.0 + } + return 0.0 +})) + +func bashRules() Rules { + return Rules{ "root": { Include("basic"), {"`", LiteralStringBacktick, Push("backticks")}, @@ -36,7 +46,7 @@ var Bash = internal.Register(MustNewLexer( {`\b(if|fi|else|while|do|done|for|then|return|function|case|select|continue|until|esac|elif)(\s*)\b`, ByGroups(Keyword, Text), nil}, {"\\b(alias|bg|bind|break|builtin|caller|cd|command|compgen|complete|declare|dirs|disown|echo|enable|eval|exec|exit|export|false|fc|fg|getopts|hash|help|history|jobs|kill|let|local|logout|popd|printf|pushd|pwd|read|readonly|set|shift|shopt|source|suspend|test|time|times|trap|true|type|typeset|ulimit|umask|unalias|unset|wait)(?=[\\s)`])", NameBuiltin, nil}, {`\A#!.+\n`, CommentPreproc, nil}, - {`#.*\S`, CommentSingle, nil}, + {`#.*(\S|$)`, CommentSingle, nil}, {`\\[\w\W]`, LiteralStringEscape, nil}, {`(\b\w+)(\s*)(\+?=)`, ByGroups(NameVariable, Text, Operator), nil}, {`[\[\]{}()=]`, Operator, nil}, @@ -86,10 +96,5 @@ var Bash = internal.Register(MustNewLexer( {"`", LiteralStringBacktick, Pop(1)}, Include("root"), }, - }, -).SetAnalyser(func(text string) float32 { - if bashAnalyserRe.FindString(text) != "" { - return 1.0 } - return 0.0 -})) +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/b/batch.go b/vendor/github.com/alecthomas/chroma/lexers/b/batch.go index dc6ce52..f7a8677 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/b/batch.go +++ b/vendor/github.com/alecthomas/chroma/lexers/b/batch.go @@ -6,7 +6,7 @@ import ( ) // Batchfile lexer. -var Batchfile = internal.Register(MustNewLexer( +var Batchfile = internal.Register(MustNewLazyLexer( &Config{ Name: "Batchfile", Aliases: []string{"bat", "batch", "dosbatch", "winbatch"}, @@ -14,7 +14,11 @@ var Batchfile = internal.Register(MustNewLexer( MimeTypes: []string{"application/x-dos-batch"}, CaseInsensitive: true, }, - Rules{ + batchfileRules, +)) + +func batchfileRules() Rules { + return Rules{ "root": { {`\)((?=\()|(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))(?:(?:[^\n\x1a^]|\^[\n\x1a]?[\w\W])*)`, CommentSingle, nil}, {`(?=((?:(?<=^[^:])|^[^:]?)[\t\v\f\r ,;=\xa0]*)(:))`, Text, Push("follow")}, @@ -190,5 +194,5 @@ var Batchfile = internal.Register(MustNewLexer( {`else(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a])`, Keyword, Pop(1)}, Default(Pop(1)), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/b/bibtex.go b/vendor/github.com/alecthomas/chroma/lexers/b/bibtex.go index 1d76b1d..d6a0ae3 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/b/bibtex.go +++ b/vendor/github.com/alecthomas/chroma/lexers/b/bibtex.go @@ -6,7 +6,7 @@ import ( ) // Bibtex lexer. -var Bibtex = internal.Register(MustNewLexer( +var Bibtex = internal.Register(MustNewLazyLexer( &Config{ Name: "BibTeX", Aliases: []string{"bib", "bibtex"}, @@ -15,7 +15,11 @@ var Bibtex = internal.Register(MustNewLexer( NotMultiline: true, CaseInsensitive: true, }, - Rules{ + bibtexRules, +)) + +func bibtexRules() Rules { + return Rules{ "root": { Include("whitespace"), {`@comment`, Comment, nil}, @@ -72,5 +76,5 @@ var Bibtex = internal.Register(MustNewLexer( "whitespace": { {`\s+`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/b/blitz.go b/vendor/github.com/alecthomas/chroma/lexers/b/blitz.go index 5d5ffc8..119f96b 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/b/blitz.go +++ b/vendor/github.com/alecthomas/chroma/lexers/b/blitz.go @@ -6,7 +6,7 @@ import ( ) // Blitzbasic lexer. -var Blitzbasic = internal.Register(MustNewLexer( +var Blitzbasic = internal.Register(MustNewLazyLexer( &Config{ Name: "BlitzBasic", Aliases: []string{"blitzbasic", "b3d", "bplus"}, @@ -14,7 +14,11 @@ var Blitzbasic = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-bb"}, CaseInsensitive: true, }, - Rules{ + blitzbasicRules, +)) + +func blitzbasicRules() Rules { + return Rules{ "root": { {`[ \t]+`, Text, nil}, {`;.*?\n`, CommentSingle, nil}, @@ -44,5 +48,5 @@ var Blitzbasic = internal.Register(MustNewLexer( {`"C?`, LiteralStringDouble, Pop(1)}, {`[^"]+`, LiteralStringDouble, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/b/bnf.go b/vendor/github.com/alecthomas/chroma/lexers/b/bnf.go index 5123a45..dcf7360 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/b/bnf.go +++ b/vendor/github.com/alecthomas/chroma/lexers/b/bnf.go @@ -6,19 +6,23 @@ import ( ) // Bnf lexer. -var Bnf = internal.Register(MustNewLexer( +var Bnf = internal.Register(MustNewLazyLexer( &Config{ Name: "BNF", Aliases: []string{"bnf"}, Filenames: []string{"*.bnf"}, MimeTypes: []string{"text/x-bnf"}, }, - Rules{ + bnfRules, +)) + +func bnfRules() Rules { + return Rules{ "root": { {`(<)([ -;=?-~]+)(>)`, ByGroups(Punctuation, NameClass, Punctuation), nil}, {`::=`, Operator, nil}, {`[^<>:]+`, Text, nil}, {`.`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/b/brainfuck.go b/vendor/github.com/alecthomas/chroma/lexers/b/brainfuck.go index 6fac5f5..d35e9c6 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/b/brainfuck.go +++ b/vendor/github.com/alecthomas/chroma/lexers/b/brainfuck.go @@ -6,14 +6,18 @@ import ( ) // Brainfuck lexer. -var Brainfuck = internal.Register(MustNewLexer( +var Brainfuck = internal.Register(MustNewLazyLexer( &Config{ Name: "Brainfuck", Aliases: []string{"brainfuck", "bf"}, Filenames: []string{"*.bf", "*.b"}, MimeTypes: []string{"application/x-brainfuck"}, }, - Rules{ + brainfuckRules, +)) + +func brainfuckRules() Rules { + return Rules{ "common": { {`[.,]+`, NameTag, nil}, {`[+-]+`, NameBuiltin, nil}, @@ -30,5 +34,5 @@ var Brainfuck = internal.Register(MustNewLexer( {`\]`, Keyword, Pop(1)}, Include("common"), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/c.go b/vendor/github.com/alecthomas/chroma/lexers/c/c.go index df2c0fa..3698c4f 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/c.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/c.go @@ -6,14 +6,19 @@ import ( ) // C lexer. -var C = internal.Register(MustNewLexer( +var C = internal.Register(MustNewLazyLexer( &Config{ Name: "C", Aliases: []string{"c"}, - Filenames: []string{"*.c", "*.h", "*.idc"}, - MimeTypes: []string{"text/x-chdr", "text/x-csrc"}, + Filenames: []string{"*.c", "*.h", "*.idc", "*.x[bp]m"}, + MimeTypes: []string{"text/x-chdr", "text/x-csrc", "image/x-xbitmap", "image/x-xpixmap"}, + EnsureNL: true, }, - Rules{ + cRules, +)) + +func cRules() Rules { + return Rules{ "whitespace": { {`^#if\s+0`, CommentPreproc, Push("if0")}, {`^#`, CommentPreproc, Push("macro")}, @@ -38,7 +43,7 @@ var C = internal.Register(MustNewLexer( {`[~!%^&*+=|?:<>/-]`, Operator, nil}, {`[()\[\],.]`, Punctuation, nil}, {Words(``, `\b`, `asm`, `auto`, `break`, `case`, `const`, `continue`, `default`, `do`, `else`, `enum`, `extern`, `for`, `goto`, `if`, `register`, `restricted`, `return`, `sizeof`, `static`, `struct`, `switch`, `typedef`, `union`, `volatile`, `while`), Keyword, nil}, - {`(bool|int|long|float|short|double|char|unsigned|signed|void)\b`, KeywordType, nil}, + {`(bool|int|long|float|short|double|char((8|16|32)_t)?|unsigned|signed|void|u?int(_fast|_least|)(8|16|32|64)_t)\b`, KeywordType, nil}, {Words(``, `\b`, `inline`, `_inline`, `__inline`, `naked`, `restrict`, `thread`, `typename`), KeywordReserved, nil}, {`(__m(128i|128d|128|64))\b`, KeywordReserved, nil}, {Words(`__`, `\b`, `asm`, `int8`, `based`, `except`, `int16`, `stdcall`, `cdecl`, `fastcall`, `int32`, `declspec`, `finally`, `int64`, `try`, `leave`, `wchar_t`, `w64`, `unaligned`, `raise`, `noop`, `identifier`, `forceinline`, `assume`), KeywordReserved, nil}, @@ -87,5 +92,5 @@ var C = internal.Register(MustNewLexer( {`^\s*#endif.*?(?\]`, NameDecorator, Push("matcher")}, + // These cannot have matchers but may have things that look like + // matchers in their arguments, so we just parse as a subdirective. + {`try_files`, Keyword, Push("subdirective")}, + // These are special, they can nest more directives + {`handle_errors|handle|route|handle_path|not`, Keyword, Push("nested_directive")}, + // Any other directive + {`[^\s#]+`, Keyword, Push("directive")}, + Include("base"), + }, + "matcher": { + {`\{`, Punctuation, Push("block")}, + // Not can be one-liner + {`not`, Keyword, Push("deep_not_matcher")}, + // Any other same-line matcher + {`[^\s#]+`, Keyword, Push("arguments")}, + // Terminators + {`\n`, Text, Pop(1)}, + {`\}`, Punctuation, Pop(1)}, + Include("base"), + }, + "block": { + {`\}`, Punctuation, Pop(2)}, + // Not can be one-liner + {`not`, Keyword, Push("not_matcher")}, + // Any other subdirective + {`[^\s#]+`, Keyword, Push("subdirective")}, + Include("base"), + }, + "nested_block": { + {`\}`, Punctuation, Pop(2)}, + // Matcher definition + {`@[^\s]+(?=\s)`, NameDecorator, Push("matcher")}, + // Something that starts with literally < is probably a docs stub + {`\<[^#]+\>`, Keyword, Push("nested_directive")}, + // Any other directive + {`[^\s#]+`, Keyword, Push("nested_directive")}, + Include("base"), + }, + "not_matcher": { + {`\}`, Punctuation, Pop(2)}, + {`\{(?=\s)`, Punctuation, Push("block")}, + {`[^\s#]+`, Keyword, Push("arguments")}, + {`\s+`, Text, nil}, + }, + "deep_not_matcher": { + {`\}`, Punctuation, Pop(2)}, + {`\{(?=\s)`, Punctuation, Push("block")}, + {`[^\s#]+`, Keyword, Push("deep_subdirective")}, + {`\s+`, Text, nil}, + }, + "directive": { + {`\{(?=\s)`, Punctuation, Push("block")}, + Include("matcher_token"), + Include("comments_pop_1"), + {`\n`, Text, Pop(1)}, + Include("base"), + }, + "nested_directive": { + {`\{(?=\s)`, Punctuation, Push("nested_block")}, + Include("matcher_token"), + Include("comments_pop_1"), + {`\n`, Text, Pop(1)}, + Include("base"), + }, + "subdirective": { + {`\{(?=\s)`, Punctuation, Push("block")}, + Include("comments_pop_1"), + {`\n`, Text, Pop(1)}, + Include("base"), + }, + "arguments": { + {`\{(?=\s)`, Punctuation, Push("block")}, + Include("comments_pop_2"), + {`\\\n`, Text, nil}, // Skip escaped newlines + {`\n`, Text, Pop(2)}, + Include("base"), + }, + "deep_subdirective": { + {`\{(?=\s)`, Punctuation, Push("block")}, + Include("comments_pop_3"), + {`\n`, Text, Pop(3)}, + Include("base"), + }, + "matcher_token": { + {`@[^\s]+`, NameDecorator, Push("arguments")}, // Named matcher + {`/[^\s]+`, NameDecorator, Push("arguments")}, // Path matcher + {`\*`, NameDecorator, Push("arguments")}, // Wildcard path matcher + {`\[\\]`, NameDecorator, Push("arguments")}, // Matcher token stub for docs + }, + "comments": { + {`^#.*\n`, CommentSingle, nil}, // Comment at start of line + {`\s+#.*\n`, CommentSingle, nil}, // Comment preceded by whitespace + }, + "comments_pop_1": { + {`^#.*\n`, CommentSingle, Pop(1)}, // Comment at start of line + {`\s+#.*\n`, CommentSingle, Pop(1)}, // Comment preceded by whitespace + }, + "comments_pop_2": { + {`^#.*\n`, CommentSingle, Pop(2)}, // Comment at start of line + {`\s+#.*\n`, CommentSingle, Pop(2)}, // Comment preceded by whitespace + }, + "comments_pop_3": { + {`^#.*\n`, CommentSingle, Pop(3)}, // Comment at start of line + {`\s+#.*\n`, CommentSingle, Pop(3)}, // Comment preceded by whitespace + }, + "base": { + Include("comments"), + {`(on|off|first|last|before|after|internal|strip_prefix|strip_suffix|replace)\b`, NameConstant, nil}, + {`(https?://)?([a-z0-9.-]+)(:)([0-9]+)`, ByGroups(Name, Name, Punctuation, LiteralNumberInteger), nil}, + {`[a-z-]+/[a-z-+]+`, LiteralString, nil}, + {`[0-9]+[km]?\b`, LiteralNumberInteger, nil}, + {`\{[\w+.\$-]+\}`, LiteralStringEscape, nil}, // Placeholder + {`\[(?=[^#{}$]+\])`, Punctuation, nil}, + {`\]|\|`, Punctuation, nil}, + {`[^\s#{}$\]]+`, LiteralString, nil}, + {`/[^\s#]*`, Name, nil}, + {`\s+`, Text, nil}, + }, + } +} + +// Caddyfile lexer. +var Caddyfile = internal.Register(MustNewLazyLexer( + &Config{ + Name: "Caddyfile", + Aliases: []string{"caddyfile", "caddy"}, + Filenames: []string{"Caddyfile*"}, + MimeTypes: []string{}, + }, + caddyfileRules, +)) + +func caddyfileRules() Rules { + return Rules{ + "root": { + Include("comments"), + // Global options block + {`^\s*(\{)\s*$`, ByGroups(Punctuation), Push("globals")}, + // Snippets + {`(\([^\s#]+\))(\s*)(\{)`, ByGroups(NameVariableAnonymous, Text, Punctuation), Push("snippet")}, + // Site label + {`[^#{(\s,]+`, GenericHeading, Push("label")}, + // Site label with placeholder + {`\{[\w+.\$-]+\}`, LiteralStringEscape, Push("label")}, + {`\s+`, Text, nil}, + }, + "globals": { + {`\}`, Punctuation, Pop(1)}, + {`[^\s#]+`, Keyword, Push("directive")}, + Include("base"), + }, + "snippet": { + {`\}`, Punctuation, Pop(1)}, + // Matcher definition + {`@[^\s]+(?=\s)`, NameDecorator, Push("matcher")}, + // Any directive + {`[^\s#]+`, Keyword, Push("directive")}, + Include("base"), + }, + "label": { + // Allow multiple labels, comma separated, newlines after + // a comma means another label is coming + {`,\s*\n?`, Text, nil}, + {` `, Text, nil}, + // Site label with placeholder + {`\{[\w+.\$-]+\}`, LiteralStringEscape, nil}, + // Site label + {`[^#{(\s,]+`, GenericHeading, nil}, + // Comment after non-block label (hack because comments end in \n) + {`#.*\n`, CommentSingle, Push("site_block")}, + // Note: if \n, we'll never pop out of the site_block, it's valid + {`\{(?=\s)|\n`, Punctuation, Push("site_block")}, + }, + "site_block": { + {`\}`, Punctuation, Pop(2)}, + Include("site_block_common"), + }, + }.Merge(caddyfileCommonRules()) +} + +// Caddyfile directive-only lexer. +var CaddyfileDirectives = internal.Register(MustNewLazyLexer( + &Config{ + Name: "Caddyfile Directives", + Aliases: []string{"caddyfile-directives", "caddyfile-d", "caddy-d"}, + Filenames: []string{}, + MimeTypes: []string{}, + }, + caddyfileDirectivesRules, +)) + +func caddyfileDirectivesRules() Rules { + return Rules{ + // Same as "site_block" in Caddyfile + "root": { + Include("site_block_common"), + }, + }.Merge(caddyfileCommonRules()) +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/capnproto.go b/vendor/github.com/alecthomas/chroma/lexers/c/capnproto.go index 0f9d03c..ec0d892 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/capnproto.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/capnproto.go @@ -6,14 +6,18 @@ import ( ) // Cap'N'Proto Proto lexer. -var CapNProto = internal.Register(MustNewLexer( +var CapNProto = internal.Register(MustNewLazyLexer( &Config{ Name: "Cap'n Proto", Aliases: []string{"capnp"}, Filenames: []string{"*.capnp"}, MimeTypes: []string{}, }, - Rules{ + capNProtoRules, +)) + +func capNProtoRules() Rules { + return Rules{ "root": { {`#.*?$`, CommentSingle, nil}, {`@[0-9a-zA-Z]*`, NameDecorator, nil}, @@ -57,5 +61,5 @@ var CapNProto = internal.Register(MustNewLexer( {`[])]`, NameAttribute, Pop(1)}, Default(Pop(1)), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/ceylon.go b/vendor/github.com/alecthomas/chroma/lexers/c/ceylon.go index 07324ca..9d424d4 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/ceylon.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/ceylon.go @@ -6,7 +6,7 @@ import ( ) // Ceylon lexer. -var Ceylon = internal.Register(MustNewLexer( +var Ceylon = internal.Register(MustNewLazyLexer( &Config{ Name: "Ceylon", Aliases: []string{"ceylon"}, @@ -14,7 +14,11 @@ var Ceylon = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-ceylon"}, DotAll: true, }, - Rules{ + ceylonRules, +)) + +func ceylonRules() Rules { + return Rules{ "root": { {`^(\s*(?:[a-zA-Z_][\w.\[\]]*\s+)+?)([a-zA-Z_]\w*)(\s*)(\()`, ByGroups(UsingSelf("root"), NameFunction, Text, Operator), nil}, {`[^\S\n]+`, Text, nil}, @@ -59,5 +63,5 @@ var Ceylon = internal.Register(MustNewLexer( {`\*/`, CommentMultiline, Pop(1)}, {`[*/]`, CommentMultiline, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/cfengine3.go b/vendor/github.com/alecthomas/chroma/lexers/c/cfengine3.go index f96252f..f305034 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/cfengine3.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/cfengine3.go @@ -6,14 +6,18 @@ import ( ) // Cfengine3 lexer. -var Cfengine3 = internal.Register(MustNewLexer( +var Cfengine3 = internal.Register(MustNewLazyLexer( &Config{ Name: "CFEngine3", Aliases: []string{"cfengine3", "cf3"}, Filenames: []string{"*.cf"}, MimeTypes: []string{}, }, - Rules{ + cfengine3Rules, +)) + +func cfengine3Rules() Rules { + return Rules{ "root": { {`#.*?\n`, Comment, nil}, {`(body)(\s+)(\S+)(\s+)(control)`, ByGroups(Keyword, Text, Keyword, Text, Keyword), nil}, @@ -52,5 +56,5 @@ var Cfengine3 = internal.Register(MustNewLexer( {`\w+`, NameVariable, nil}, {`\s+`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/chaiscript.go b/vendor/github.com/alecthomas/chroma/lexers/c/chaiscript.go index d2aa50d..58db9aa 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/chaiscript.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/chaiscript.go @@ -6,7 +6,7 @@ import ( ) // Chaiscript lexer. -var Chaiscript = internal.Register(MustNewLexer( +var Chaiscript = internal.Register(MustNewLazyLexer( &Config{ Name: "ChaiScript", Aliases: []string{"chai", "chaiscript"}, @@ -14,7 +14,11 @@ var Chaiscript = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-chaiscript", "application/x-chaiscript"}, DotAll: true, }, - Rules{ + chaiscriptRules, +)) + +func chaiscriptRules() Rules { + return Rules{ "commentsandwhitespace": { {`\s+`, Text, nil}, {`//.*?\n`, CommentSingle, nil}, @@ -59,5 +63,5 @@ var Chaiscript = internal.Register(MustNewLexer( {`[^\\"$]+`, LiteralStringDouble, nil}, {`"`, LiteralStringDouble, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/cheetah.go b/vendor/github.com/alecthomas/chroma/lexers/c/cheetah.go index b2cb9c4..bd5fb9d 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/cheetah.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/cheetah.go @@ -7,14 +7,18 @@ import ( ) // Cheetah lexer. -var Cheetah = internal.Register(MustNewLexer( +var Cheetah = internal.Register(MustNewLazyLexer( &Config{ Name: "Cheetah", Aliases: []string{"cheetah", "spitfire"}, Filenames: []string{"*.tmpl", "*.spt"}, MimeTypes: []string{"application/x-cheetah", "application/x-spitfire"}, }, - Rules{ + cheetahRules, +)) + +func cheetahRules() Rules { + return Rules{ "root": { {`(##[^\n]*)$`, ByGroups(Comment), nil}, {`#[*](.|\n)*?[*]#`, Comment, nil}, @@ -33,5 +37,5 @@ var Cheetah = internal.Register(MustNewLexer( `, Other, nil}, {`\s+`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/cl.go b/vendor/github.com/alecthomas/chroma/lexers/c/cl.go index fdc9729..bb16273 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/cl.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/cl.go @@ -230,7 +230,7 @@ var ( ) // Common Lisp lexer. -var CommonLisp = internal.Register(TypeRemappingLexer(MustNewLexer( +var CommonLisp = internal.Register(TypeRemappingLexer(MustNewLazyLexer( &Config{ Name: "Common Lisp", Aliases: []string{"common-lisp", "cl", "lisp"}, @@ -238,7 +238,19 @@ var CommonLisp = internal.Register(TypeRemappingLexer(MustNewLexer( MimeTypes: []string{"text/x-common-lisp"}, CaseInsensitive: true, }, - Rules{ + commonLispRules, +), TypeMapping{ + {NameVariable, NameFunction, clBuiltinFunctions}, + {NameVariable, Keyword, clSpecialForms}, + {NameVariable, NameBuiltin, clMacros}, + {NameVariable, Keyword, clLambdaListKeywords}, + {NameVariable, Keyword, clDeclarations}, + {NameVariable, KeywordType, clBuiltinTypes}, + {NameVariable, NameClass, clBuiltinClasses}, +})) + +func commonLispRules() Rules { + return Rules{ "root": { Default(Push("body")), }, @@ -294,13 +306,5 @@ var CommonLisp = internal.Register(TypeRemappingLexer(MustNewLexer( {`\(`, Punctuation, Push("body")}, {`\)`, Punctuation, Pop(1)}, }, - }, -), TypeMapping{ - {NameVariable, NameFunction, clBuiltinFunctions}, - {NameVariable, Keyword, clSpecialForms}, - {NameVariable, NameBuiltin, clMacros}, - {NameVariable, Keyword, clLambdaListKeywords}, - {NameVariable, Keyword, clDeclarations}, - {NameVariable, KeywordType, clBuiltinTypes}, - {NameVariable, NameClass, clBuiltinClasses}, -})) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/clojure.go b/vendor/github.com/alecthomas/chroma/lexers/c/clojure.go index e63752a..f99f906 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/clojure.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/clojure.go @@ -6,14 +6,18 @@ import ( ) // Clojure lexer. -var Clojure = internal.Register(MustNewLexer( +var Clojure = internal.Register(MustNewLazyLexer( &Config{ Name: "Clojure", Aliases: []string{"clojure", "clj"}, Filenames: []string{"*.clj"}, MimeTypes: []string{"text/x-clojure", "application/x-clojure"}, }, - Rules{ + clojureRules, +)) + +func clojureRules() Rules { + return Rules{ "root": { {`;.*$`, CommentSingle, nil}, {`[,\s]+`, Text, nil}, @@ -34,5 +38,5 @@ var Clojure = internal.Register(MustNewLexer( {`(\{|\})`, Punctuation, nil}, {`(\(|\))`, Punctuation, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/cmake.go b/vendor/github.com/alecthomas/chroma/lexers/c/cmake.go index 163f17d..0e0708d 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/cmake.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/cmake.go @@ -6,14 +6,18 @@ import ( ) // Cmake lexer. -var Cmake = internal.Register(MustNewLexer( +var Cmake = internal.Register(MustNewLazyLexer( &Config{ Name: "CMake", Aliases: []string{"cmake"}, Filenames: []string{"*.cmake", "CMakeLists.txt"}, MimeTypes: []string{"text/x-cmake"}, }, - Rules{ + cmakeRules, +)) + +func cmakeRules() Rules { + return Rules{ "root": { {`\b(\w+)([ \t]*)(\()`, ByGroups(NameBuiltin, Text, Punctuation), Push("args")}, Include("keywords"), @@ -40,5 +44,5 @@ var Cmake = internal.Register(MustNewLexer( {`[ \t]+`, Text, nil}, {`#.*\n`, Comment, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/cobol.go b/vendor/github.com/alecthomas/chroma/lexers/c/cobol.go index e9ae0bb..8b2f6d9 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/cobol.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/cobol.go @@ -6,7 +6,7 @@ import ( ) // Cobol lexer. -var Cobol = internal.Register(MustNewLexer( +var Cobol = internal.Register(MustNewLazyLexer( &Config{ Name: "COBOL", Aliases: []string{"cobol"}, @@ -14,7 +14,11 @@ var Cobol = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-cobol"}, CaseInsensitive: true, }, - Rules{ + cobolRules, +)) + +func cobolRules() Rules { + return Rules{ "root": { Include("comment"), Include("strings"), @@ -47,5 +51,5 @@ var Cobol = internal.Register(MustNewLexer( {`[+-]?\d*\.\d+(E[-+]?\d+)?`, LiteralNumberFloat, nil}, {`[+-]?\d+\.\d*(E[-+]?\d+)?`, LiteralNumberFloat, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/coffee.go b/vendor/github.com/alecthomas/chroma/lexers/c/coffee.go index e402b8f..381a8fe 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/coffee.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/coffee.go @@ -6,7 +6,7 @@ import ( ) // Coffeescript lexer. -var Coffeescript = internal.Register(MustNewLexer( +var Coffeescript = internal.Register(MustNewLazyLexer( &Config{ Name: "CoffeeScript", Aliases: []string{"coffee-script", "coffeescript", "coffee"}, @@ -15,7 +15,11 @@ var Coffeescript = internal.Register(MustNewLexer( NotMultiline: true, DotAll: true, }, - Rules{ + coffeescriptRules, +)) + +func coffeescriptRules() Rules { + return Rules{ "commentsandwhitespace": { {`\s+`, Text, nil}, {`###[^#].*?###`, CommentMultiline, nil}, @@ -87,5 +91,5 @@ var Coffeescript = internal.Register(MustNewLexer( {`#|\\.|\'|"`, LiteralString, nil}, Include("strings"), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/coldfusion.go b/vendor/github.com/alecthomas/chroma/lexers/c/coldfusion.go index 2f12472..bc28bc3 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/coldfusion.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/coldfusion.go @@ -6,7 +6,7 @@ import ( ) // Cfstatement lexer. -var Cfstatement = internal.Register(MustNewLexer( +var Cfstatement = internal.Register(MustNewLazyLexer( &Config{ Name: "cfstatement", Aliases: []string{"cfs"}, @@ -15,7 +15,11 @@ var Cfstatement = internal.Register(MustNewLexer( NotMultiline: true, CaseInsensitive: true, }, - Rules{ + cfstatementRules, +)) + +func cfstatementRules() Rules { + return Rules{ "root": { {`//.*?\n`, CommentSingle, nil}, {`/\*(?:.|\n)*?\*/`, CommentMultiline, nil}, @@ -44,5 +48,5 @@ var Cfstatement = internal.Register(MustNewLexer( {`#`, LiteralStringDouble, nil}, {`"`, LiteralStringDouble, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/coq.go b/vendor/github.com/alecthomas/chroma/lexers/c/coq.go index e69a5c1..e0103ef 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/coq.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/coq.go @@ -6,14 +6,18 @@ import ( ) // Coq lexer. -var Coq = internal.Register(MustNewLexer( +var Coq = internal.Register(MustNewLazyLexer( &Config{ Name: "Coq", Aliases: []string{"coq"}, Filenames: []string{"*.v"}, MimeTypes: []string{"text/x-coq"}, }, - Rules{ + coqRules, +)) + +func coqRules() Rules { + return Rules{ "root": { {`\s+`, Text, nil}, {`false|true|\(\)|\[\]`, NameBuiltinPseudo, nil}, @@ -59,5 +63,5 @@ var Coq = internal.Register(MustNewLexer( {`[a-z][a-z0-9_\']*`, Name, Pop(1)}, Default(Pop(1)), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/cpp.go b/vendor/github.com/alecthomas/chroma/lexers/c/cpp.go index 104be24..3f4a1fd 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/cpp.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/cpp.go @@ -6,7 +6,7 @@ import ( ) // CPP lexer. -var CPP = internal.Register(MustNewLexer( +var CPP = internal.Register(MustNewLazyLexer( &Config{ Name: "C++", Aliases: []string{"cpp", "c++"}, @@ -14,7 +14,11 @@ var CPP = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-c++hdr", "text/x-c++src"}, EnsureNL: true, }, - Rules{ + cppRules, +)) + +func cppRules() Rules { + return Rules{ "statements": { {Words(``, `\b`, `catch`, `const_cast`, `delete`, `dynamic_cast`, `explicit`, `export`, `friend`, `mutable`, `namespace`, `new`, `operator`, `private`, `protected`, `public`, `reinterpret_cast`, `restrict`, `static_cast`, `template`, `this`, `throw`, `throws`, `try`, `typeid`, `typename`, `using`, `virtual`, `constexpr`, `nullptr`, `decltype`, `thread_local`, `alignas`, `alignof`, `static_assert`, `noexcept`, `override`, `final`, `concept`, `requires`, `consteval`, `co_await`, `co_return`, `co_yield`), Keyword, nil}, {`(enum)\b(\s+)(class)\b(\s*)`, ByGroups(Keyword, Text, Keyword, Text), Push("classname")}, @@ -102,5 +106,5 @@ var CPP = internal.Register(MustNewLexer( {`^\s*#endif.*?(?=~!@#%^&|`?-]+", Operator, nil}, - {`(?s)(java|javascript)(\s+)(AS)(\s+)('|\$\$)(.*?)(\5)`, + { + `(?s)(java|javascript)(\s+)(AS)(\s+)('|\$\$)(.*?)(\5)`, UsingByGroup( internal.Get, 1, 6, @@ -65,5 +70,5 @@ var CassandraCQL = internal.Register(MustNewLexer( {`[^\$]+`, LiteralStringHeredoc, nil}, {`\$\$`, LiteralStringHeredoc, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/crystal.go b/vendor/github.com/alecthomas/chroma/lexers/c/crystal.go index 69e053c..f06830d 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/crystal.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/crystal.go @@ -6,7 +6,7 @@ import ( ) // Crystal lexer. -var Crystal = internal.Register(MustNewLexer( +var Crystal = internal.Register(MustNewLazyLexer( &Config{ Name: "Crystal", Aliases: []string{"cr", "crystal"}, @@ -14,7 +14,11 @@ var Crystal = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-crystal"}, DotAll: true, }, - Rules{ + crystalRules, +)) + +func crystalRules() Rules { + return Rules{ "root": { {`#.*?$`, CommentSingle, nil}, {Words(``, `\b`, `abstract`, `asm`, `as`, `begin`, `break`, `case`, `do`, `else`, `elsif`, `end`, `ensure`, `extend`, `ifdef`, `if`, `include`, `instance_sizeof`, `next`, `of`, `pointerof`, `private`, `protected`, `rescue`, `return`, `require`, `sizeof`, `super`, `then`, `typeof`, `unless`, `until`, `when`, `while`, `with`, `yield`), Keyword, nil}, @@ -258,5 +262,5 @@ var Crystal = internal.Register(MustNewLexer( {`[\\#<>]`, LiteralStringRegex, nil}, {`[^\\#<>]+`, LiteralStringRegex, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/csharp.go b/vendor/github.com/alecthomas/chroma/lexers/c/csharp.go index c6a5f46..725bcb8 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/csharp.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/csharp.go @@ -6,7 +6,7 @@ import ( ) // CSharp lexer. -var CSharp = internal.Register(MustNewLexer( +var CSharp = internal.Register(MustNewLazyLexer( &Config{ Name: "C#", Aliases: []string{"csharp", "c#"}, @@ -15,7 +15,11 @@ var CSharp = internal.Register(MustNewLexer( DotAll: true, EnsureNL: true, }, - Rules{ + cSharpRules, +)) + +func cSharpRules() Rules { + return Rules{ "root": { {`^\s*\[.*?\]`, NameAttribute, nil}, {`[^\S\n]+`, Text, nil}, @@ -29,7 +33,7 @@ var CSharp = internal.Register(MustNewLexer( {`\$@?"(""|[^"])*"`, LiteralString, nil}, {`"(\\\\|\\"|[^"\n])*["\n]`, LiteralString, nil}, {`'\\.'|'[^\\]'`, LiteralStringChar, nil}, - {`[0-9](\.[0-9]*)?([eE][+-][0-9]+)?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?`, LiteralNumber, nil}, + {`0[xX][0-9a-fA-F]+[Ll]?|[0-9_](\.[0-9]*)?([eE][+-]?[0-9]+)?[flFLdD]?`, LiteralNumber, nil}, {`#[ \t]*(if|endif|else|elif|define|undef|line|error|warning|region|endregion|pragma)\b.*?\n`, CommentPreproc, nil}, {`\b(extern)(\s+)(alias)\b`, ByGroups(Keyword, Text, Keyword), nil}, {`(abstract|as|async|await|base|break|by|case|catch|checked|const|continue|default|delegate|do|else|enum|event|explicit|extern|false|finally|fixed|for|foreach|goto|if|implicit|in|interface|internal|is|let|lock|new|null|on|operator|out|override|params|private|protected|public|readonly|ref|return|sealed|sizeof|stackalloc|static|switch|this|throw|true|try|typeof|unchecked|unsafe|virtual|void|while|get|set|new|partial|yield|add|remove|value|alias|ascending|descending|from|group|into|orderby|select|thenby|where|join|equals)\b`, Keyword, nil}, @@ -47,5 +51,5 @@ var CSharp = internal.Register(MustNewLexer( {`(?=\()`, Text, Pop(1)}, {`(@?[_a-zA-Z]\w*|\.)+`, NameNamespace, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/css.go b/vendor/github.com/alecthomas/chroma/lexers/c/css.go index fedc809..9f3a01d 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/css.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/css.go @@ -6,14 +6,18 @@ import ( ) // CSS lexer. -var CSS = internal.Register(MustNewLexer( +var CSS = internal.Register(MustNewLazyLexer( &Config{ Name: "CSS", Aliases: []string{"css"}, Filenames: []string{"*.css"}, MimeTypes: []string{"text/css"}, }, - Rules{ + cssRules, +)) + +func cssRules() Rules { + return Rules{ "root": { Include("basics"), }, @@ -39,6 +43,18 @@ var CSS = internal.Register(MustNewLexer( Include("basics"), {`\}`, Punctuation, Pop(2)}, }, + "atparenthesis": { + Include("common-values"), + {`/\*(?:.|\n)*?\*/`, Comment, nil}, + Include("numeric-values"), + {`[*+/-]`, Operator, nil}, + {`[,]`, Punctuation, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, + {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, + {`[a-zA-Z_-]\w*`, Name, nil}, + {`\(`, Punctuation, Push("atparenthesis")}, + {`\)`, Punctuation, Pop(1)}, + }, "content": { {`\s+`, Text, nil}, {`\}`, Punctuation, Pop(1)}, @@ -73,6 +89,7 @@ var CSS = internal.Register(MustNewLexer( {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, {`[a-zA-Z_-]\w*`, Name, nil}, + {`\(`, Punctuation, Push("atparenthesis")}, {`\)`, Punctuation, Pop(1)}, }, "common-values": { @@ -100,5 +117,5 @@ var CSS = internal.Register(MustNewLexer( {`%`, KeywordType, nil}, Default(Pop(1)), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/cython.go b/vendor/github.com/alecthomas/chroma/lexers/c/cython.go index 701e2b7..0cce204 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/cython.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/cython.go @@ -6,14 +6,18 @@ import ( ) // Cython lexer. -var Cython = internal.Register(MustNewLexer( +var Cython = internal.Register(MustNewLazyLexer( &Config{ Name: "Cython", Aliases: []string{"cython", "pyx", "pyrex"}, Filenames: []string{"*.pyx", "*.pxd", "*.pxi"}, MimeTypes: []string{"text/x-cython", "application/x-cython"}, }, - Rules{ + cythonRules, +)) + +func cythonRules() Rules { + return Rules{ "root": { {`\n`, Text, nil}, {`^(\s*)("""(?:.|\n)*?""")`, ByGroups(Text, LiteralStringDoc), nil}, @@ -131,5 +135,5 @@ var Cython = internal.Register(MustNewLexer( Include("strings"), Include("nl"), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/circular/php.go b/vendor/github.com/alecthomas/chroma/lexers/circular/php.go index d7f8940..517fb69 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/circular/php.go +++ b/vendor/github.com/alecthomas/chroma/lexers/circular/php.go @@ -1,15 +1,12 @@ package circular import ( - "strings" - . "github.com/alecthomas/chroma" // nolint - "github.com/alecthomas/chroma/lexers/h" "github.com/alecthomas/chroma/lexers/internal" ) -// PHP lexer. -var PHP = internal.Register(DelegatingLexer(h.HTML, MustNewLexer( +// PHP lexer for pure PHP code (not embedded in HTML). +var PHP = internal.Register(MustNewLazyLexer( &Config{ Name: "PHP", Aliases: []string{"php", "php3", "php4", "php5"}, @@ -19,12 +16,15 @@ var PHP = internal.Register(DelegatingLexer(h.HTML, MustNewLexer( CaseInsensitive: true, EnsureNL: true, }, - Rules{ - "root": { - {`<\?(php)?`, CommentPreproc, Push("php")}, - {`[^<]+`, Other, nil}, - {`<`, Other, nil}, - }, + phpRules, +)) + +func phpRules() Rules { + return phpCommonRules().Rename("php", "root") +} + +func phpCommonRules() Rules { + return Rules{ "php": { {`\?>`, CommentPreproc, Pop(1)}, {`(<<<)([\'"]?)((?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w]|[^\x00-\x7f])*)(\2\n.*?\n\s*)(\3)(;?)(\n)`, ByGroups(LiteralString, LiteralString, LiteralStringDelimiter, LiteralString, LiteralStringDelimiter, Punctuation, Text), nil}, @@ -51,8 +51,8 @@ var PHP = internal.Register(DelegatingLexer(h.HTML, MustNewLexer( {`(\d+\.\d*|\d*\.\d+)(e[+-]?[0-9]+)?`, LiteralNumberFloat, nil}, {`\d+e[+-]?[0-9]+`, LiteralNumberFloat, nil}, {`0[0-7]+`, LiteralNumberOct, nil}, - {`0x[a-f0-9]+`, LiteralNumberHex, nil}, - {`\d+`, LiteralNumberInteger, nil}, + {`0x[a-f0-9_]+`, LiteralNumberHex, nil}, + {`[\d_]+`, LiteralNumberInteger, nil}, {`0b[01]+`, LiteralNumberBin, nil}, {`'([^'\\]*(?:\\.[^'\\]*)*)'`, LiteralStringSingle, nil}, {"`([^`\\\\]*(?:\\\\.[^`\\\\]*)*)`", LiteralStringBacktick, nil}, @@ -82,10 +82,5 @@ var PHP = internal.Register(DelegatingLexer(h.HTML, MustNewLexer( {`(\$\{)(\S+)(\})`, ByGroups(LiteralStringInterpol, NameVariable, LiteralStringInterpol), nil}, {`[${\\]`, LiteralStringDouble, nil}, }, - }, -).SetAnalyser(func(text string) float32 { - if strings.Contains(text, "\s|()?+*,]+`, NameAttribute, nil}, {`>`, Keyword, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/d/dylan.go b/vendor/github.com/alecthomas/chroma/lexers/d/dylan.go new file mode 100644 index 0000000..feda748 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/d/dylan.go @@ -0,0 +1,76 @@ +package d + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// Dylan lexer. +var Dylan = internal.Register(MustNewLazyLexer( + &Config{ + Name: "Dylan", + Aliases: []string{"dylan"}, + Filenames: []string{"*.dylan", "*.dyl", "*.intr"}, + MimeTypes: []string{"text/x-dylan"}, + CaseInsensitive: true, + }, + func() Rules { + return Rules{ + "root": { + {`\s+`, Whitespace, nil}, + {`//.*?\n`, CommentSingle, nil}, + {`([a-z0-9-]+:)([ \t]*)(.*(?:\n[ \t].+)*)`, ByGroups(NameAttribute, Whitespace, LiteralString), nil}, + Default(Push("code")), + }, + "code": { + {`\s+`, Whitespace, nil}, + {`//.*?\n`, CommentSingle, nil}, + {`/\*`, CommentMultiline, Push("comment")}, + {`"`, LiteralString, Push("string")}, + {`'(\\.|\\[0-7]{1,3}|\\x[a-f0-9]{1,2}|[^\\\'\n])'`, LiteralStringChar, nil}, + {`#b[01]+`, LiteralNumberBin, nil}, + {`#o[0-7]+`, LiteralNumberOct, nil}, + {`[-+]?(\d*\.\d+([ed][-+]?\d+)?|\d+(\.\d*)?e[-+]?\d+)`, LiteralNumberFloat, nil}, + {`[-+]?\d+`, LiteralNumberInteger, nil}, + {`#x[0-9a-f]+`, LiteralNumberHex, nil}, + + {`(\?\\?)([\w!&*<>|^$%@+~?/=-]+)(:)(token|name|variable|expression|body|case-body|\*)`, + ByGroups(Operator, NameVariable, Operator, NameBuiltin), nil}, + {`(\?)(:)(token|name|variable|expression|body|case-body|\*)`, + ByGroups(Operator, Operator, NameVariable), nil}, + {`(\?\\?)([\w!&*<>|^$%@+~?/=-]+)`, ByGroups(Operator, NameVariable), nil}, + + {`(=>|::|#\(|#\[|##|\?\?|\?=|\?|[(){}\[\],.;])`, Punctuation, nil}, + {`:=`, Operator, nil}, + {`#[tf]`, Literal, nil}, + {`#"`, LiteralStringSymbol, Push("symbol")}, + {`#[a-z0-9-]+`, Keyword, nil}, + {`#(all-keys|include|key|next|rest)`, Keyword, nil}, + {`[\w!&*<>|^$%@+~?/=-]+:`, KeywordConstant, nil}, + {`<[\w!&*<>|^$%@+~?/=-]+>`, NameClass, nil}, + {`\*[\w!&*<>|^$%@+~?/=-]+\*`, NameVariableGlobal, nil}, + {`\$[\w!&*<>|^$%@+~?/=-]+`, NameConstant, nil}, + {`(let|method|function)([ \t]+)([\w!&*<>|^$%@+~?/=-]+)`, ByGroups(NameBuiltin, Whitespace, NameVariable), nil}, + {`(error|signal|return|break)`, NameException, nil}, + {`(\\?)([\w!&*<>|^$%@+~?/=-]+)`, ByGroups(Operator, Name), nil}, + }, + "comment": { + {`[^*/]`, CommentMultiline, nil}, + {`/\*`, CommentMultiline, Push()}, + {`\*/`, CommentMultiline, Pop(1)}, + {`[*/]`, CommentMultiline, nil}, + }, + "symbol": { + {`"`, LiteralStringSymbol, Pop(1)}, + {`[^\\"]+`, LiteralStringSymbol, nil}, + }, + "string": { + {`"`, LiteralString, Pop(1)}, + {`\\([\\abfnrtv"\']|x[a-f0-9]{2,4}|[0-7]{1,3})`, LiteralStringEscape, nil}, + {`[^\\"\n]+`, LiteralString, nil}, + {`\\\n`, LiteralString, nil}, + {`\\`, LiteralString, nil}, + }, + } + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/e/ebnf.go b/vendor/github.com/alecthomas/chroma/lexers/e/ebnf.go index 42a3a37..5ccdd38 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/e/ebnf.go +++ b/vendor/github.com/alecthomas/chroma/lexers/e/ebnf.go @@ -6,14 +6,18 @@ import ( ) // Ebnf lexer. -var Ebnf = internal.Register(MustNewLexer( +var Ebnf = internal.Register(MustNewLazyLexer( &Config{ Name: "EBNF", Aliases: []string{"ebnf"}, Filenames: []string{"*.ebnf"}, MimeTypes: []string{"text/x-ebnf"}, }, - Rules{ + ebnfRules, +)) + +func ebnfRules() Rules { + return Rules{ "root": { Include("whitespace"), Include("comment_start"), @@ -47,5 +51,5 @@ var Ebnf = internal.Register(MustNewLexer( "identifier": { {`([a-zA-Z][\w \-]*)`, Keyword, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/e/elixir.go b/vendor/github.com/alecthomas/chroma/lexers/e/elixir.go index 4073029..f283f84 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/e/elixir.go +++ b/vendor/github.com/alecthomas/chroma/lexers/e/elixir.go @@ -6,14 +6,18 @@ import ( ) // Elixir lexer. -var Elixir = internal.Register(MustNewLexer( +var Elixir = internal.Register(MustNewLazyLexer( &Config{ Name: "Elixir", Aliases: []string{"elixir", "ex", "exs"}, Filenames: []string{"*.ex", "*.exs"}, MimeTypes: []string{"text/x-elixir"}, }, - Rules{ + elixirRules, +)) + +func elixirRules() Rules { + return Rules{ "root": { {`\s+`, Text, nil}, {`#.*$`, CommentSingle, nil}, @@ -28,6 +32,13 @@ var Elixir = internal.Register(MustNewLexer( {`:"`, LiteralStringSymbol, Push("string_double_atom")}, {`:'`, LiteralStringSymbol, Push("string_single_atom")}, {`((?:\.\.\.|<<>>|%\{\}|%|\{\})|(?:(?:\.\.\.|[a-z_]\w*[!?]?)|[A-Z]\w*(?:\.[A-Z]\w*)*|(?:\<\<\<|\>\>\>|\|\|\||\&\&\&|\^\^\^|\~\~\~|\=\=\=|\!\=\=|\~\>\>|\<\~\>|\|\~\>|\<\|\>|\=\=|\!\=|\<\=|\>\=|\&\&|\|\||\<\>|\+\+|\-\-|\|\>|\=\~|\-\>|\<\-|\||\.|\=|\~\>|\<\~|\<|\>|\+|\-|\*|\/|\!|\^|\&)))(:)(?=\s|\n)`, ByGroups(LiteralStringSymbol, Punctuation), nil}, + {`(fn|do|end|after|else|rescue|catch)\b`, Keyword, nil}, + {`(not|and|or|when|in)\b`, OperatorWord, nil}, + {`(case|cond|for|if|unless|try|receive|raise|quote|unquote|unquote_splicing|throw|super|while)\b`, Keyword, nil}, + {`(def|defp|defmodule|defprotocol|defmacro|defmacrop|defdelegate|defexception|defstruct|defimpl|defcallback)\b`, KeywordDeclaration, nil}, + {`(import|require|use|alias)\b`, KeywordNamespace, nil}, + {`(nil|true|false)\b`, NameConstant, nil}, + {`(_|__MODULE__|__DIR__|__ENV__|__CALLER__)\b`, NamePseudo, nil}, {`@(?:\.\.\.|[a-z_]\w*[!?]?)`, NameAttribute, nil}, {`(?:\.\.\.|[a-z_]\w*[!?]?)`, Name, nil}, {`(%?)([A-Z]\w*(?:\.[A-Z]\w*)*)`, ByGroups(Punctuation, NameClass), nil}, @@ -266,5 +277,5 @@ var Elixir = internal.Register(MustNewLexer( {`\\.`, LiteralStringOther, nil}, {`'[a-zA-Z]*`, LiteralStringOther, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/e/elm.go b/vendor/github.com/alecthomas/chroma/lexers/e/elm.go index a71c627..0fb6689 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/e/elm.go +++ b/vendor/github.com/alecthomas/chroma/lexers/e/elm.go @@ -6,14 +6,18 @@ import ( ) // Elm lexer. -var Elm = internal.Register(MustNewLexer( +var Elm = internal.Register(MustNewLazyLexer( &Config{ Name: "Elm", Aliases: []string{"elm"}, Filenames: []string{"*.elm"}, MimeTypes: []string{"text/x-elm"}, }, - Rules{ + elmRules, +)) + +func elmRules() Rules { + return Rules{ "root": { {`\{-`, CommentMultiline, Push("comment")}, {`--.*`, CommentSingle, nil}, @@ -55,5 +59,5 @@ var Elm = internal.Register(MustNewLexer( {`\|\]`, NameEntity, Pop(1)}, {`.*\n`, NameEntity, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/e/emacs.go b/vendor/github.com/alecthomas/chroma/lexers/e/emacs.go index 78ffda1..51c4910 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/e/emacs.go +++ b/vendor/github.com/alecthomas/chroma/lexers/e/emacs.go @@ -522,14 +522,24 @@ var ( ) // EmacsLisp lexer. -var EmacsLisp = internal.Register(TypeRemappingLexer(MustNewLexer( +var EmacsLisp = internal.Register(TypeRemappingLexer(MustNewLazyLexer( &Config{ Name: "EmacsLisp", Aliases: []string{"emacs", "elisp", "emacs-lisp"}, Filenames: []string{"*.el"}, MimeTypes: []string{"text/x-elisp", "application/x-elisp"}, }, - Rules{ + emacsLispRules, +), TypeMapping{ + {NameVariable, NameFunction, emacsBuiltinFunction}, + {NameVariable, NameBuiltin, emacsSpecialForms}, + {NameVariable, NameException, emacsErrorKeywords}, + {NameVariable, NameBuiltin, append(emacsBuiltinFunctionHighlighted, emacsMacros...)}, + {NameVariable, KeywordPseudo, emacsLambdaListKeywords}, +})) + +func emacsLispRules() Rules { + return Rules{ "root": { Default(Push("body")), }, @@ -572,11 +582,5 @@ var EmacsLisp = internal.Register(TypeRemappingLexer(MustNewLexer( {`\\\n`, LiteralString, nil}, {`"`, LiteralString, Pop(1)}, }, - }, -), TypeMapping{ - {NameVariable, NameFunction, emacsBuiltinFunction}, - {NameVariable, NameBuiltin, emacsSpecialForms}, - {NameVariable, NameException, emacsErrorKeywords}, - {NameVariable, NameBuiltin, append(emacsBuiltinFunctionHighlighted, emacsMacros...)}, - {NameVariable, KeywordPseudo, emacsLambdaListKeywords}, -})) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/e/erlang.go b/vendor/github.com/alecthomas/chroma/lexers/e/erlang.go index 63cd59a..5f5c9ca 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/e/erlang.go +++ b/vendor/github.com/alecthomas/chroma/lexers/e/erlang.go @@ -6,14 +6,18 @@ import ( ) // Erlang lexer. -var Erlang = internal.Register(MustNewLexer( +var Erlang = internal.Register(MustNewLazyLexer( &Config{ Name: "Erlang", Aliases: []string{"erlang"}, Filenames: []string{"*.erl", "*.hrl", "*.es", "*.escript"}, MimeTypes: []string{"text/x-erlang"}, }, - Rules{ + erlangRules, +)) + +func erlangRules() Rules { + return Rules{ "root": { {`\s+`, Text, nil}, {`%.*\n`, Comment, nil}, @@ -62,5 +66,5 @@ var Erlang = internal.Register(MustNewLexer( {`,`, Punctuation, Pop(1)}, {`(?=\})`, Punctuation, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/f/factor.go b/vendor/github.com/alecthomas/chroma/lexers/f/factor.go index 26c0d56..d88beb2 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/f/factor.go +++ b/vendor/github.com/alecthomas/chroma/lexers/f/factor.go @@ -6,14 +6,18 @@ import ( ) // Factor lexer. -var Factor = internal.Register(MustNewLexer( +var Factor = internal.Register(MustNewLazyLexer( &Config{ Name: "Factor", Aliases: []string{"factor"}, Filenames: []string{"*.factor"}, MimeTypes: []string{"text/x-factor"}, }, - Rules{ + factorRules, +)) + +func factorRules() Rules { + return Rules{ "root": { {`#!.*$`, CommentPreproc, nil}, Default(Push("base")), @@ -111,5 +115,5 @@ var Factor = internal.Register(MustNewLexer( {`;\s`, Keyword, Pop(1)}, {`\S+`, NameFunction, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/f/fish.go b/vendor/github.com/alecthomas/chroma/lexers/f/fish.go index 185fc92..c350900 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/f/fish.go +++ b/vendor/github.com/alecthomas/chroma/lexers/f/fish.go @@ -6,18 +6,43 @@ import ( ) // Fish lexer. -var Fish = internal.Register(MustNewLexer( +var Fish = internal.Register(MustNewLazyLexer( &Config{ Name: "Fish", Aliases: []string{"fish", "fishshell"}, Filenames: []string{"*.fish", "*.load"}, MimeTypes: []string{"application/x-fish"}, }, - Rules{ + fishRules, +)) + +func fishRules() Rules { + keywords := []string{ + `begin`, `end`, `if`, `else`, `while`, `break`, `for`, `return`, `function`, `block`, + `case`, `continue`, `switch`, `not`, `and`, `or`, `set`, `echo`, `exit`, `pwd`, `true`, + `false`, `cd`, `cdh`, `count`, `test`, + } + keywordsPattern := Words(`\b`, `\b`, keywords...) + + builtins := []string{ + `alias`, `bg`, `bind`, `breakpoint`, `builtin`, `argparse`, `abbr`, `string`, `command`, + `commandline`, `complete`, `contains`, `dirh`, `dirs`, `disown`, `emit`, `eval`, `exec`, + `fg`, `fish`, `fish_add_path`, `fish_breakpoint_prompt`, `fish_command_not_found`, + `fish_config`, `fish_git_prompt`, `fish_greeting`, `fish_hg_prompt`, `fish_indent`, + `fish_is_root_user`, `fish_key_reader`, `fish_mode_prompt`, `fish_opt`, `fish_pager`, + `fish_prompt`, `fish_right_prompt`, `fish_status_to_signal`, `fish_svn_prompt`, + `fish_title`, `fish_update_completions`, `fish_vcs_prompt`, `fishd`, `funced`, + `funcsave`, `functions`, `help`, `history`, `isatty`, `jobs`, `math`, `mimedb`, `nextd`, + `open`, `prompt_pwd`, `realpath`, `popd`, `prevd`, `psub`, `pushd`, `random`, `read`, + `set_color`, `source`, `status`, `suspend`, `trap`, `type`, `ulimit`, `umask`, `vared`, + `fc`, `getopts`, `hash`, `kill`, `printf`, `time`, `wait`, + } + + return Rules{ "root": { Include("basic"), - Include("data"), Include("interp"), + Include("data"), }, "interp": { {`\$\(\(`, Keyword, Push("math")}, @@ -25,13 +50,20 @@ var Fish = internal.Register(MustNewLexer( {`\$#?(\w+|.)`, NameVariable, nil}, }, "basic": { - {`\b(begin|end|if|else|while|break|for|in|return|function|block|case|continue|switch|not|and|or|set|echo|exit|pwd|true|false|cd|count|test)(\s*)\b`, ByGroups(Keyword, Text), nil}, - {`\b(alias|bg|bind|breakpoint|builtin|command|commandline|complete|contains|dirh|dirs|emit|eval|exec|fg|fish|fish_config|fish_indent|fish_pager|fish_prompt|fish_right_prompt|fish_update_completions|fishd|funced|funcsave|functions|help|history|isatty|jobs|math|mimedb|nextd|open|popd|prevd|psub|pushd|random|read|set_color|source|status|trap|type|ulimit|umask|vared|fc|getopts|hash|kill|printf|time|wait)\s*\b(?!\.)`, NameBuiltin, nil}, + {Words(`(?<=(?:^|\A|;|&&|\|\||\||`+keywordsPattern+`)\s*)`, `(?=;?\b)`, keywords...), Keyword, nil}, + {`(?<=for\s+\S+\s+)in\b`, Keyword, nil}, + {Words(`\b`, `\s*\b(?!\.)`, builtins...), NameBuiltin, nil}, + {`#!.*\n`, CommentHashbang, nil}, {`#.*\n`, Comment, nil}, {`\\[\w\W]`, LiteralStringEscape, nil}, {`(\b\w+)(\s*)(=)`, ByGroups(NameVariable, Text, Operator), nil}, - {`[\[\]()=]`, Operator, nil}, + {`[\[\]()={}]`, Operator, nil}, + {`(?<=\[[^\]]+)\.\.|-(?=[^\[]+\])`, Operator, nil}, {`<<-?\s*(\'?)\\?(\w+)[\w\W]+?\2`, LiteralString, nil}, + {`(?<=set\s+(?:--?[^\d\W][\w-]*\s+)?)\w+`, NameVariable, nil}, + {`(?<=for\s+)\w[\w-]*(?=\s+in)`, NameVariable, nil}, + {`(?<=function\s+)\w(?:[^\n])*?(?= *[-\n])`, NameFunction, nil}, + {`(?<=(?:^|\b(?:and|or|sudo)\b|;|\|\||&&|\||\(|(?:\b\w+\s*=\S+\s)) *)\w[\w-]*`, NameFunction, nil}, }, "data": { {`(?s)\$?"(\\\\|\\[0-7]+|\\.|[^"\\$])*"`, LiteralStringDouble, nil}, @@ -39,10 +71,11 @@ var Fish = internal.Register(MustNewLexer( {`(?s)\$'(\\\\|\\[0-7]+|\\.|[^'\\])*'`, LiteralStringSingle, nil}, {`(?s)'.*?'`, LiteralStringSingle, nil}, {`;`, Punctuation, nil}, - {`&|\||\^|<|>`, Operator, nil}, + {`&&|\|\||&|\||\^|<|>`, Operator, nil}, {`\s+`, Text, nil}, - {`\d+(?= |\Z)`, LiteralNumber, nil}, - {"[^=\\s\\[\\]{}()$\"\\'`\\\\<&|;]+", Text, nil}, + {`\b\d+\b`, LiteralNumber, nil}, + {`--?[^\d][\w-]*`, NameAttribute, nil}, + {".+?", Text, nil}, }, "string": { {`"`, LiteralStringDouble, Pop(1)}, @@ -61,5 +94,5 @@ var Fish = internal.Register(MustNewLexer( {`\d+`, LiteralNumber, nil}, Include("root"), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/f/forth.go b/vendor/github.com/alecthomas/chroma/lexers/f/forth.go index 47de636..8d66708 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/f/forth.go +++ b/vendor/github.com/alecthomas/chroma/lexers/f/forth.go @@ -6,7 +6,7 @@ import ( ) // Forth lexer. -var Forth = internal.Register(MustNewLexer( +var Forth = internal.Register(MustNewLazyLexer( &Config{ Name: "Forth", Aliases: []string{"forth"}, @@ -14,7 +14,11 @@ var Forth = internal.Register(MustNewLexer( MimeTypes: []string{"application/x-forth"}, CaseInsensitive: true, }, - Rules{ + forthRules, +)) + +func forthRules() Rules { + return Rules{ "root": { {`\s+`, Text, nil}, {`\\.*?\n`, CommentSingle, nil}, @@ -36,5 +40,5 @@ var Forth = internal.Register(MustNewLexer( "stringdef": { {`[^"]+`, LiteralString, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/f/fortran.go b/vendor/github.com/alecthomas/chroma/lexers/f/fortran.go index 6c57afa..af4a969 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/f/fortran.go +++ b/vendor/github.com/alecthomas/chroma/lexers/f/fortran.go @@ -6,7 +6,7 @@ import ( ) // Fortran lexer. -var Fortran = internal.Register(MustNewLexer( +var Fortran = internal.Register(MustNewLazyLexer( &Config{ Name: "Fortran", Aliases: []string{"fortran"}, @@ -14,7 +14,11 @@ var Fortran = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-fortran"}, CaseInsensitive: true, }, - Rules{ + fortranRules, +)) + +func fortranRules() Rules { + return Rules{ "root": { {`^#.*\n`, CommentPreproc, nil}, {`!.*\n`, Comment, nil}, @@ -43,5 +47,5 @@ var Fortran = internal.Register(MustNewLexer( {`[+-]?\d*\.\d+([ed][-+]?\d+)?(_[a-z]\w+)?`, LiteralNumberFloat, nil}, {`[+-]?\d+\.\d*([ed][-+]?\d+)?(_[a-z]\w+)?`, LiteralNumberFloat, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/f/fortran_fixed.go b/vendor/github.com/alecthomas/chroma/lexers/f/fortran_fixed.go new file mode 100644 index 0000000..7c64638 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/f/fortran_fixed.go @@ -0,0 +1,39 @@ +package f + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// FortranFixed lexer. +var FortranFixed = internal.Register(MustNewLazyLexer( + &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}, + {`[\t ]*!.*\n`, Comment, nil}, + {`(.{5})`, NameLabel, Push("cont-char")}, + {`.*\n`, Using(Fortran), nil}, + }, + "cont-char": { + {` `, Text, Push("code")}, + {`0`, Comment, Push("code")}, + {`.`, GenericStrong, Push("code")}, + }, + "code": { + {`(.{66})(.*)(\n)`, ByGroups(Using(Fortran), Comment, Text), Push("root")}, + {`.*\n`, Using(Fortran), Push("root")}, + Default(Push("root")), + }, + } + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/f/fsharp.go b/vendor/github.com/alecthomas/chroma/lexers/f/fsharp.go index d00f63d..44fced4 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/f/fsharp.go +++ b/vendor/github.com/alecthomas/chroma/lexers/f/fsharp.go @@ -6,14 +6,18 @@ import ( ) // Fsharp lexer. -var Fsharp = internal.Register(MustNewLexer( +var Fsharp = internal.Register(MustNewLazyLexer( &Config{ Name: "FSharp", Aliases: []string{"fsharp"}, Filenames: []string{"*.fs", "*.fsi"}, MimeTypes: []string{"text/x-fsharp"}, }, - Rules{ + fsharpRules, +)) + +func fsharpRules() Rules { + return Rules{ "escape-sequence": { {`\\[\\"\'ntbrafv]`, LiteralStringEscape, nil}, {`\\[0-9]{3}`, LiteralStringEscape, nil}, @@ -90,5 +94,5 @@ var Fsharp = internal.Register(MustNewLexer( {`"""B?`, LiteralString, Pop(1)}, {`"`, LiteralString, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/g/gas.go b/vendor/github.com/alecthomas/chroma/lexers/g/gas.go index a922806..1f733f6 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/g/gas.go +++ b/vendor/github.com/alecthomas/chroma/lexers/g/gas.go @@ -6,14 +6,18 @@ import ( ) // Gas lexer. -var Gas = internal.Register(MustNewLexer( +var Gas = internal.Register(MustNewLazyLexer( &Config{ Name: "GAS", Aliases: []string{"gas", "asm"}, Filenames: []string{"*.s", "*.S"}, MimeTypes: []string{"text/x-gas"}, }, - Rules{ + gasRules, +)) + +func gasRules() Rules { + return Rules{ "root": { Include("whitespace"), {`(?:[a-zA-Z$_][\w$.@-]*|\.[\w$.@-]+):`, NameLabel, nil}, @@ -51,5 +55,5 @@ var Gas = internal.Register(MustNewLexer( "punctuation": { {`[-*,.()\[\]!:]+`, Punctuation, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/g/gdscript.go b/vendor/github.com/alecthomas/chroma/lexers/g/gdscript.go index bfe3063..2b6af97 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/g/gdscript.go +++ b/vendor/github.com/alecthomas/chroma/lexers/g/gdscript.go @@ -6,14 +6,18 @@ import ( ) // GDScript lexer. -var GDScript = internal.Register(MustNewLexer( +var GDScript = internal.Register(MustNewLazyLexer( &Config{ Name: "GDScript", Aliases: []string{"gdscript", "gd"}, Filenames: []string{"*.gd"}, MimeTypes: []string{"text/x-gdscript", "application/x-gdscript"}, }, - Rules{ + gdscriptRules, +)) + +func gdscriptRules() Rules { + return Rules{ "root": { {`\n`, Text, nil}, {`^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil}, @@ -120,5 +124,5 @@ var GDScript = internal.Register(MustNewLexer( Include("strings-single"), {`\n`, LiteralStringSingle, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/g/genshi.go b/vendor/github.com/alecthomas/chroma/lexers/g/genshi.go index 0d3663a..dc4d4b1 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/g/genshi.go +++ b/vendor/github.com/alecthomas/chroma/lexers/g/genshi.go @@ -7,14 +7,18 @@ import ( ) // Genshi Text lexer. -var GenshiText = internal.Register(MustNewLexer( +var GenshiText = internal.Register(MustNewLazyLexer( &Config{ Name: "Genshi Text", Aliases: []string{"genshitext"}, Filenames: []string{}, MimeTypes: []string{"application/x-genshi-text", "text/x-genshi"}, }, - Rules{ + genshiTextRules, +)) + +func genshiTextRules() Rules { + return Rules{ "root": { {`[^#$\s]+`, Other, nil}, {`^(\s*)(##.*)$`, ByGroups(Text, Comment), nil}, @@ -33,11 +37,11 @@ var GenshiText = internal.Register(MustNewLexer( {`(?)`, ByGroups(CommentPreproc, Using(Python), CommentPreproc), nil}, - {`<\s*(script|style)\s*.*?>.*?<\s*/\1\s*>`, Other, nil}, - {`<\s*py:[a-zA-Z0-9]+`, NameTag, Push("pytag")}, - {`<\s*[a-zA-Z0-9:.]+`, NameTag, Push("tag")}, - Include("variable"), - {`[<$]`, Other, nil}, - }, - "pytag": { - {`\s+`, Text, nil}, - {`[\w:-]+\s*=`, NameAttribute, Push("pyattr")}, - {`/?\s*>`, NameTag, Pop(1)}, - }, - "pyattr": { - {`(")(.*?)(")`, ByGroups(LiteralString, Using(Python), LiteralString), Pop(1)}, - {`(')(.*?)(')`, ByGroups(LiteralString, Using(Python), LiteralString), Pop(1)}, - {`[^\s>]+`, LiteralString, Pop(1)}, - }, - "tag": { - {`\s+`, Text, nil}, - {`py:[\w-]+\s*=`, NameAttribute, Push("pyattr")}, - {`[\w:-]+\s*=`, NameAttribute, Push("attr")}, - {`/?\s*>`, NameTag, Pop(1)}, - }, - "attr": { - {`"`, LiteralString, Push("attr-dstring")}, - {`'`, LiteralString, Push("attr-sstring")}, - {`[^\s>]*`, LiteralString, Pop(1)}, - }, - "attr-dstring": { - {`"`, LiteralString, Pop(1)}, - Include("strings"), - {`'`, LiteralString, nil}, - }, - "attr-sstring": { - {`'`, LiteralString, Pop(1)}, - Include("strings"), - {`'`, LiteralString, nil}, - }, - "strings": { - {`[^"'$]+`, LiteralString, nil}, - Include("variable"), - }, - "variable": { - {`(?)`, ByGroups(CommentPreproc, Using(Python), CommentPreproc), nil}, + {`<\s*(script|style)\s*.*?>.*?<\s*/\1\s*>`, Other, nil}, + {`<\s*py:[a-zA-Z0-9]+`, NameTag, Push("pytag")}, + {`<\s*[a-zA-Z0-9:.]+`, NameTag, Push("tag")}, + Include("variable"), + {`[<$]`, Other, nil}, + }, + "pytag": { + {`\s+`, Text, nil}, + {`[\w:-]+\s*=`, NameAttribute, Push("pyattr")}, + {`/?\s*>`, NameTag, Pop(1)}, + }, + "pyattr": { + {`(")(.*?)(")`, ByGroups(LiteralString, Using(Python), LiteralString), Pop(1)}, + {`(')(.*?)(')`, ByGroups(LiteralString, Using(Python), LiteralString), Pop(1)}, + {`[^\s>]+`, LiteralString, Pop(1)}, + }, + "tag": { + {`\s+`, Text, nil}, + {`py:[\w-]+\s*=`, NameAttribute, Push("pyattr")}, + {`[\w:-]+\s*=`, NameAttribute, Push("attr")}, + {`/?\s*>`, NameTag, Pop(1)}, + }, + "attr": { + {`"`, LiteralString, Push("attr-dstring")}, + {`'`, LiteralString, Push("attr-sstring")}, + {`[^\s>]*`, LiteralString, Pop(1)}, + }, + "attr-dstring": { + {`"`, LiteralString, Pop(1)}, + Include("strings"), + {`'`, LiteralString, nil}, + }, + "attr-sstring": { + {`'`, LiteralString, Pop(1)}, + Include("strings"), + {`'`, LiteralString, nil}, + }, + "strings": { + {`[^"'$]+`, LiteralString, nil}, + Include("variable"), + }, + "variable": { + {`(?=!()\[\]{}.,;:]`, Punctuation, nil}, {`[^\W\d]\w*`, NameOther, nil}, }, - }, -).SetAnalyser(func(text string) float32 { - if strings.Contains(text, "fmt.") && strings.Contains(text, "package ") { - return 0.5 } - if strings.Contains(text, "package ") { - return 0.1 - } - return 0.0 -})) - -var goTemplateRules = Rules{ - "root": { - {`{{[-]?`, CommentPreproc, Push("template")}, - {`[^{]+`, Other, nil}, - {`{`, Other, nil}, - }, - "template": { - {`[-]?}}`, CommentPreproc, Pop(1)}, - {`/\*.*?\*/`, Comment, nil}, - {`(?=}})`, CommentPreproc, Pop(1)}, // Terminate the pipeline - {`\(`, Operator, Push("subexpression")}, - {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, - Include("expression"), - }, - "subexpression": { - {`\)`, Operator, Pop(1)}, - Include("expression"), - }, - "expression": { - {`\s+`, Whitespace, nil}, - {`\(`, Operator, Push("subexpression")}, - {`(range|if|else|while|with|template|end|true|false|nil|and|call|html|index|js|len|not|or|print|printf|println|urlquery|eq|ne|lt|le|gt|ge)\b`, Keyword, nil}, - {`\||:=`, Operator, nil}, - {`[$]?[^\W\d]\w*`, NameOther, nil}, - {`[$]?\.(?:[^\W\d]\w*)?`, NameAttribute, nil}, - {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, - {`\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][+\-]?\d+|\.\d*|[eE][+\-]?\d+)`, LiteralNumberFloat, nil}, - {`\.\d+([eE][+\-]?\d+)?`, LiteralNumberFloat, nil}, - {`0[0-7]+`, LiteralNumberOct, nil}, - {`0[xX][0-9a-fA-F]+`, LiteralNumberHex, nil}, - {`(0|[1-9][0-9]*)`, LiteralNumberInteger, nil}, - {`'(\\['"\\abfnrtv]|\\x[0-9a-fA-F]{2}|\\[0-7]{1,3}|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|[^\\])'`, LiteralStringChar, nil}, - {"`[^`]*`", LiteralString, nil}, - }, } -var GoHTMLTemplate = internal.Register(DelegatingLexer(h.HTML, MustNewLexer( +func goTemplateRules() Rules { + return Rules{ + "root": { + {`{{(- )?/\*(.|\n)*?\*/( -)?}}`, CommentMultiline, nil}, + {`{{[-]?`, CommentPreproc, Push("template")}, + {`[^{]+`, Other, nil}, + {`{`, Other, nil}, + }, + "template": { + {`[-]?}}`, CommentPreproc, Pop(1)}, + {`(?=}})`, CommentPreproc, Pop(1)}, // Terminate the pipeline + {`\(`, Operator, Push("subexpression")}, + {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + Include("expression"), + }, + "subexpression": { + {`\)`, Operator, Pop(1)}, + Include("expression"), + }, + "expression": { + {`\s+`, Whitespace, nil}, + {`\(`, Operator, Push("subexpression")}, + {`(range|if|else|while|with|template|end|true|false|nil|and|call|html|index|js|len|not|or|print|printf|println|urlquery|eq|ne|lt|le|gt|ge)\b`, Keyword, nil}, + {`\||:?=|,`, Operator, nil}, + {`[$]?[^\W\d]\w*`, NameOther, nil}, + {`\$|[$]?\.(?:[^\W\d]\w*)?`, NameAttribute, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + {`-?\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][+\-]?\d+|\.\d*|[eE][+\-]?\d+)`, LiteralNumberFloat, nil}, + {`-?\.\d+([eE][+\-]?\d+)?`, LiteralNumberFloat, nil}, + {`-?0[0-7]+`, LiteralNumberOct, nil}, + {`-?0[xX][0-9a-fA-F]+`, LiteralNumberHex, nil}, + {`-?(0|[1-9][0-9]*)`, LiteralNumberInteger, nil}, + {`'(\\['"\\abfnrtv]|\\x[0-9a-fA-F]{2}|\\[0-7]{1,3}|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|[^\\])'`, LiteralStringChar, nil}, + {"`[^`]*`", LiteralString, nil}, + }, + } +} + +var GoHTMLTemplate = internal.Register(DelegatingLexer(h.HTML, MustNewLazyLexer( &Config{ Name: "Go HTML Template", Aliases: []string{"go-html-template"}, @@ -105,7 +112,7 @@ var GoHTMLTemplate = internal.Register(DelegatingLexer(h.HTML, MustNewLexer( goTemplateRules, ))) -var GoTextTemplate = internal.Register(MustNewLexer( +var GoTextTemplate = internal.Register(MustNewLazyLexer( &Config{ Name: "Go Text Template", Aliases: []string{"go-text-template"}, diff --git a/vendor/github.com/alecthomas/chroma/lexers/g/graphql.go b/vendor/github.com/alecthomas/chroma/lexers/g/graphql.go index a57e693..7d465cd 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/g/graphql.go +++ b/vendor/github.com/alecthomas/chroma/lexers/g/graphql.go @@ -6,13 +6,17 @@ import ( ) // Go lexer. -var Graphql = internal.Register(MustNewLexer( +var Graphql = internal.Register(MustNewLazyLexer( &Config{ Name: "GraphQL", Aliases: []string{"graphql", "graphqls", "gql"}, Filenames: []string{"*.graphql", "*.graphqls"}, }, - Rules{ + graphqlRules, +)) + +func graphqlRules() Rules { + return Rules{ "root": { {`(query|mutation|subscription|fragment|scalar|implements|interface|union|enum|input|type)`, KeywordDeclaration, Push("type")}, {`(on|extend|schema|directive|\.\.\.)`, KeywordDeclaration, nil}, @@ -41,5 +45,5 @@ var Graphql = internal.Register(MustNewLexer( {`[^\W\d]\w*`, NameClass, Pop(1)}, Include("root"), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/g/groff.go b/vendor/github.com/alecthomas/chroma/lexers/g/groff.go new file mode 100644 index 0000000..65a7093 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/g/groff.go @@ -0,0 +1,47 @@ +package g + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// Groff lexer. +var Groff = internal.Register(MustNewLazyLexer( + &Config{ + Name: "Groff", + Aliases: []string{"groff", "nroff", "man"}, + Filenames: []string{"*.[1-9]", "*.1p", "*.3pm", "*.man"}, + MimeTypes: []string{"application/x-troff", "text/troff"}, + }, + func() Rules { + return Rules{ + "root": { + {`(\.)(\w+)`, ByGroups(Text, Keyword), Push("request")}, + {`\.`, Punctuation, Push("request")}, + {`[^\\\n]+`, Text, Push("textline")}, + Default(Push("textline")), + }, + "textline": { + Include("escapes"), + {`[^\\\n]+`, Text, nil}, + {`\n`, Text, Pop(1)}, + }, + "escapes": { + {`\\"[^\n]*`, Comment, nil}, + {`\\[fn]\w`, LiteralStringEscape, nil}, + {`\\\(.{2}`, LiteralStringEscape, nil}, + {`\\.\[.*\]`, LiteralStringEscape, nil}, + {`\\.`, LiteralStringEscape, nil}, + {`\\\n`, Text, Push("request")}, + }, + "request": { + {`\n`, Text, Pop(1)}, + Include("escapes"), + {`"[^\n"]+"`, LiteralStringDouble, nil}, + {`\d+`, LiteralNumber, nil}, + {`\S+`, LiteralString, nil}, + {`\s+`, Text, nil}, + }, + } + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/g/groovy.go b/vendor/github.com/alecthomas/chroma/lexers/g/groovy.go index a395415..8d37bd8 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/g/groovy.go +++ b/vendor/github.com/alecthomas/chroma/lexers/g/groovy.go @@ -6,7 +6,7 @@ import ( ) // Groovy lexer. -var Groovy = internal.Register(MustNewLexer( +var Groovy = internal.Register(MustNewLazyLexer( &Config{ Name: "Groovy", Aliases: []string{"groovy"}, @@ -14,7 +14,11 @@ var Groovy = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-groovy"}, DotAll: true, }, - Rules{ + groovyRules, +)) + +func groovyRules() Rules { + return Rules{ "root": { {`#!(.*?)$`, CommentPreproc, Push("base")}, Default(Push("base")), @@ -54,5 +58,5 @@ var Groovy = internal.Register(MustNewLexer( "import": { {`[\w.]+\*?`, NameNamespace, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/h/handlebars.go b/vendor/github.com/alecthomas/chroma/lexers/h/handlebars.go index 07072da..d34ef3a 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/h/handlebars.go +++ b/vendor/github.com/alecthomas/chroma/lexers/h/handlebars.go @@ -6,14 +6,18 @@ import ( ) // Handlebars lexer. -var Handlebars = internal.Register(MustNewLexer( +var Handlebars = internal.Register(MustNewLazyLexer( &Config{ Name: "Handlebars", - Aliases: []string{"handlebars"}, - Filenames: []string{"*.handlebars"}, + Aliases: []string{"handlebars", "hbs"}, + Filenames: []string{"*.handlebars", "*.hbs"}, MimeTypes: []string{}, }, - Rules{ + handlebarsRules, +)) + +func handlebarsRules() Rules { + return Rules{ "root": { {`[^{]+`, Other, nil}, {`\{\{!.*\}\}`, Comment, nil}, @@ -52,5 +56,5 @@ var Handlebars = internal.Register(MustNewLexer( {`:?'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, {`[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?`, LiteralNumber, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/h/haskell.go b/vendor/github.com/alecthomas/chroma/lexers/h/haskell.go index b018eab..9780481 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/h/haskell.go +++ b/vendor/github.com/alecthomas/chroma/lexers/h/haskell.go @@ -6,14 +6,18 @@ import ( ) // Haskell lexer. -var Haskell = internal.Register(MustNewLexer( +var Haskell = internal.Register(MustNewLazyLexer( &Config{ Name: "Haskell", Aliases: []string{"haskell", "hs"}, Filenames: []string{"*.hs"}, MimeTypes: []string{"text/x-haskell"}, }, - Rules{ + haskellRules, +)) + +func haskellRules() Rules { + return Rules{ "root": { {`\s+`, Text, nil}, {`--(?![!#$%&*+./<=>?@^|_~:\\]).*?$`, CommentSingle, nil}, @@ -95,5 +99,5 @@ var Haskell = internal.Register(MustNewLexer( {`\d+`, LiteralStringEscape, Pop(1)}, {`\s+\\`, LiteralStringEscape, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/h/haxe.go b/vendor/github.com/alecthomas/chroma/lexers/h/haxe.go index 5958543..cc8c693 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/h/haxe.go +++ b/vendor/github.com/alecthomas/chroma/lexers/h/haxe.go @@ -6,7 +6,7 @@ import ( ) // Haxe lexer. -var Haxe = internal.Register(MustNewLexer( +var Haxe = internal.Register(MustNewLazyLexer( &Config{ Name: "Haxe", Aliases: []string{"hx", "haxe", "hxsl"}, @@ -14,7 +14,11 @@ var Haxe = internal.Register(MustNewLexer( MimeTypes: []string{"text/haxe", "text/x-haxe", "text/x-hx"}, DotAll: true, }, - Rules{ + haxeRules, +)) + +func haxeRules() Rules { + return Rules{ "root": { Include("spaces"), Include("meta"), @@ -609,8 +613,8 @@ var Haxe = internal.Register(MustNewLexer( {`\}`, Punctuation, Pop(1)}, {`,`, Punctuation, Push("#pop", "object")}, }, - }, -)) + } +} func haxePreProcMutator(state *LexerState) error { stack, ok := state.Get("haxe-pre-proc").([][]string) diff --git a/vendor/github.com/alecthomas/chroma/lexers/h/hcl.go b/vendor/github.com/alecthomas/chroma/lexers/h/hcl.go index ce7064b..7206fba 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/h/hcl.go +++ b/vendor/github.com/alecthomas/chroma/lexers/h/hcl.go @@ -6,14 +6,18 @@ import ( ) // HCL lexer. -var HCL = internal.Register(MustNewLexer( +var HCL = internal.Register(MustNewLazyLexer( &Config{ Name: "HCL", Aliases: []string{"hcl"}, Filenames: []string{"*.hcl"}, MimeTypes: []string{"application/x-hcl"}, }, - Rules{ + hclRules, +)) + +func hclRules() Rules { + return Rules{ "root": { Include("string"), Include("punctuation"), @@ -65,5 +69,5 @@ var HCL = internal.Register(MustNewLexer( {`\s+`, Text, nil}, {`\\\n`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/h/hexdump.go b/vendor/github.com/alecthomas/chroma/lexers/h/hexdump.go index 8b7e7bd..0893537 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/h/hexdump.go +++ b/vendor/github.com/alecthomas/chroma/lexers/h/hexdump.go @@ -6,14 +6,18 @@ import ( ) // Hexdump lexer. -var Hexdump = internal.Register(MustNewLexer( +var Hexdump = internal.Register(MustNewLazyLexer( &Config{ Name: "Hexdump", Aliases: []string{"hexdump"}, Filenames: []string{}, MimeTypes: []string{}, }, - Rules{ + hexdumpRules, +)) + +func hexdumpRules() Rules { + return Rules{ "root": { {`\n`, Text, nil}, Include("offset"), @@ -63,5 +67,5 @@ var Hexdump = internal.Register(MustNewLexer( {`\s`, Text, nil}, {`^\*`, Punctuation, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/hlb.go b/vendor/github.com/alecthomas/chroma/lexers/h/hlb.go similarity index 95% rename from vendor/github.com/alecthomas/chroma/lexers/hlb.go rename to vendor/github.com/alecthomas/chroma/lexers/h/hlb.go index 4dcf8ed..6c5f637 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/hlb.go +++ b/vendor/github.com/alecthomas/chroma/lexers/h/hlb.go @@ -1,4 +1,4 @@ -package lexers +package h import ( . "github.com/alecthomas/chroma" // nolint @@ -6,14 +6,18 @@ import ( ) // HLB lexer. -var HLB = internal.Register(MustNewLexer( +var HLB = internal.Register(MustNewLazyLexer( &Config{ Name: "HLB", Aliases: []string{"hlb"}, Filenames: []string{"*.hlb"}, MimeTypes: []string{}, }, - Rules{ + hlbRules, +)) + +func hlbRules() Rules { + return Rules{ "root": { {`(#.*)`, ByGroups(CommentSingle), nil}, {`((\b(0(b|B|o|O|x|X)[a-fA-F0-9]+)\b)|(\b(0|[1-9][0-9]*)\b))`, ByGroups(LiteralNumber), nil}, @@ -50,5 +54,5 @@ var HLB = internal.Register(MustNewLexer( {`(\n|\r|\r\n)`, Text, nil}, {`.`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/h/html.go b/vendor/github.com/alecthomas/chroma/lexers/h/html.go index 07fc27e..b9ca1e1 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/h/html.go +++ b/vendor/github.com/alecthomas/chroma/lexers/h/html.go @@ -8,7 +8,7 @@ import ( ) // HTML lexer. -var HTML = internal.Register(MustNewLexer( +var HTML = internal.Register(MustNewLazyLexer( &Config{ Name: "HTML", Aliases: []string{"html"}, @@ -18,7 +18,11 @@ var HTML = internal.Register(MustNewLexer( DotAll: true, CaseInsensitive: true, }, - Rules{ + htmlRules, +)) + +func htmlRules() Rules { + return Rules{ "root": { {`[^<&]+`, Text, nil}, {`&\S*?;`, NameEntity, nil}, @@ -55,5 +59,5 @@ var HTML = internal.Register(MustNewLexer( {`'.*?'`, LiteralString, Pop(1)}, {`[^\s>]+`, LiteralString, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/h/http.go b/vendor/github.com/alecthomas/chroma/lexers/h/http.go index 0a1264c..c515ed4 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/h/http.go +++ b/vendor/github.com/alecthomas/chroma/lexers/h/http.go @@ -8,7 +8,7 @@ import ( ) // HTTP lexer. -var HTTP = internal.Register(httpBodyContentTypeLexer(MustNewLexer( +var HTTP = internal.Register(httpBodyContentTypeLexer(MustNewLazyLexer( &Config{ Name: "HTTP", Aliases: []string{"http"}, @@ -17,10 +17,14 @@ var HTTP = internal.Register(httpBodyContentTypeLexer(MustNewLexer( NotMultiline: true, DotAll: true, }, - Rules{ + httpRules, +))) + +func httpRules() Rules { + return Rules{ "root": { - {`(GET|POST|PUT|DELETE|HEAD|OPTIONS|TRACE|PATCH|CONNECT)( +)([^ ]+)( +)(HTTP)(/)(1\.[01])(\r?\n|\Z)`, ByGroups(NameFunction, Text, NameNamespace, Text, KeywordReserved, Operator, LiteralNumber, Text), Push("headers")}, - {`(HTTP)(/)(1\.[01])( +)(\d{3})( +)([^\r\n]+)(\r?\n|\Z)`, ByGroups(KeywordReserved, Operator, LiteralNumber, Text, LiteralNumber, Text, NameException, Text), Push("headers")}, + {`(GET|POST|PUT|DELETE|HEAD|OPTIONS|TRACE|PATCH|CONNECT)( +)([^ ]+)( +)(HTTP)(/)([12]\.[01])(\r?\n|\Z)`, ByGroups(NameFunction, Text, NameNamespace, Text, KeywordReserved, Operator, LiteralNumber, Text), Push("headers")}, + {`(HTTP)(/)([12]\.[01])( +)(\d{3})( +)([^\r\n]+)(\r?\n|\Z)`, ByGroups(KeywordReserved, Operator, LiteralNumber, Text, LiteralNumber, Text, NameException, Text), Push("headers")}, }, "headers": { {`([^\s:]+)( *)(:)( *)([^\r\n]+)(\r?\n|\Z)`, EmitterFunc(httpHeaderBlock), nil}, @@ -30,17 +34,17 @@ var HTTP = internal.Register(httpBodyContentTypeLexer(MustNewLexer( "content": { {`.+`, EmitterFunc(httpContentBlock), nil}, }, - }, -))) + } +} -func httpContentBlock(groups []string, lexer Lexer) Iterator { +func httpContentBlock(groups []string, state *LexerState) Iterator { tokens := []Token{ {Generic, groups[0]}, } return Literator(tokens...) } -func httpHeaderBlock(groups []string, lexer Lexer) Iterator { +func httpHeaderBlock(groups []string, state *LexerState) Iterator { tokens := []Token{ {Name, groups[1]}, {Text, groups[2]}, @@ -52,7 +56,7 @@ func httpHeaderBlock(groups []string, lexer Lexer) Iterator { return Literator(tokens...) } -func httpContinuousHeaderBlock(groups []string, lexer Lexer) Iterator { +func httpContinuousHeaderBlock(groups []string, state *LexerState) Iterator { tokens := []Token{ {Text, groups[1]}, {Literal, groups[2]}, diff --git a/vendor/github.com/alecthomas/chroma/lexers/h/hy.go b/vendor/github.com/alecthomas/chroma/lexers/h/hy.go index 17385e8..7a07897 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/h/hy.go +++ b/vendor/github.com/alecthomas/chroma/lexers/h/hy.go @@ -6,14 +6,18 @@ import ( ) // Hy lexer. -var Hy = internal.Register(MustNewLexer( +var Hy = internal.Register(MustNewLazyLexer( &Config{ Name: "Hy", Aliases: []string{"hylang"}, Filenames: []string{"*.hy"}, MimeTypes: []string{"text/x-hy", "application/x-hy"}, }, - Rules{ + hyRules, +)) + +func hyRules() Rules { + return Rules{ "root": { {`;.*$`, CommentSingle, nil}, {`[,\s]+`, Text, nil}, @@ -47,5 +51,5 @@ var Hy = internal.Register(MustNewLexer( {`(??@^|_~:\\]).*?)$`, ByGroups(Text, CommentSingle), nil}, @@ -76,5 +80,5 @@ var Idris = internal.Register(MustNewLexer( {`\d+`, LiteralStringEscape, Pop(1)}, {`\s+\\`, LiteralStringEscape, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/i/igor.go b/vendor/github.com/alecthomas/chroma/lexers/i/igor.go index d704a4f..bbb1d72 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/i/igor.go +++ b/vendor/github.com/alecthomas/chroma/lexers/i/igor.go @@ -6,7 +6,7 @@ import ( ) // Igor lexer. -var Igor = internal.Register(MustNewLexer( +var Igor = internal.Register(MustNewLazyLexer( &Config{ Name: "Igor", Aliases: []string{"igor", "igorpro"}, @@ -14,7 +14,11 @@ var Igor = internal.Register(MustNewLexer( MimeTypes: []string{"text/ipf"}, CaseInsensitive: true, }, - Rules{ + igorRules, +)) + +func igorRules() Rules { + return Rules{ "root": { {`//.*$`, CommentSingle, nil}, {`"([^"\\]|\\.)*"`, LiteralString, nil}, @@ -28,5 +32,5 @@ var Igor = internal.Register(MustNewLexer( {`.`, Text, nil}, {`\n|\r`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/i/ini.go b/vendor/github.com/alecthomas/chroma/lexers/i/ini.go index 39b5edd..46b2ce2 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/i/ini.go +++ b/vendor/github.com/alecthomas/chroma/lexers/i/ini.go @@ -6,14 +6,18 @@ import ( ) // Ini lexer. -var Ini = internal.Register(MustNewLexer( +var Ini = internal.Register(MustNewLazyLexer( &Config{ Name: "INI", Aliases: []string{"ini", "cfg", "dosini"}, - Filenames: []string{"*.ini", "*.cfg", "*.inf", ".gitconfig"}, + Filenames: []string{"*.ini", "*.cfg", "*.inf", ".gitconfig", ".editorconfig"}, MimeTypes: []string{"text/x-ini", "text/inf"}, }, - Rules{ + iniRules, +)) + +func iniRules() Rules { + return Rules{ "root": { {`\s+`, Text, nil}, {`[;#].*`, CommentSingle, nil}, @@ -21,5 +25,5 @@ var Ini = internal.Register(MustNewLexer( {`(.*?)([ \t]*)(=)([ \t]*)(.*(?:\n[ \t].+)*)`, ByGroups(NameAttribute, Text, Operator, Text, LiteralString), nil}, {`(.+?)$`, NameAttribute, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/i/io.go b/vendor/github.com/alecthomas/chroma/lexers/i/io.go index 840feea..8b2e53a 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/i/io.go +++ b/vendor/github.com/alecthomas/chroma/lexers/i/io.go @@ -6,14 +6,18 @@ import ( ) // Io lexer. -var Io = internal.Register(MustNewLexer( +var Io = internal.Register(MustNewLazyLexer( &Config{ Name: "Io", Aliases: []string{"io"}, Filenames: []string{"*.io"}, MimeTypes: []string{"text/x-iosrc"}, }, - Rules{ + ioRules, +)) + +func ioRules() Rules { + return Rules{ "root": { {`\n`, Text, nil}, {`\s+`, Text, nil}, @@ -36,5 +40,5 @@ var Io = internal.Register(MustNewLexer( {`\+/`, CommentMultiline, Pop(1)}, {`[+/]`, CommentMultiline, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/internal/api.go b/vendor/github.com/alecthomas/chroma/lexers/internal/api.go index 08ec6ff..5c7970a 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/internal/api.go +++ b/vendor/github.com/alecthomas/chroma/lexers/internal/api.go @@ -11,6 +11,19 @@ import ( "github.com/alecthomas/chroma" ) +var ( + ignoredSuffixes = [...]string{ + // Editor backups + "~", ".bak", ".old", ".orig", + // Debian and derivatives apt/dpkg backups + ".dpkg-dist", ".dpkg-old", + // Red Hat and derivatives rpm backups + ".rpmnew", ".rpmorig", ".rpmsave", + // Build system input/template files + ".in", + } +) + // Registry of Lexers. var Registry = struct { Lexers chroma.Lexers @@ -93,6 +106,13 @@ func Match(filename string) chroma.Lexer { for _, glob := range config.Filenames { if fnmatch.Match(glob, filename, 0) { matched = append(matched, lexer) + } else { + for _, suf := range &ignoredSuffixes { + if fnmatch.Match(glob+suf, filename, 0) { + matched = append(matched, lexer) + break + } + } } } } @@ -107,6 +127,13 @@ func Match(filename string) chroma.Lexer { for _, glob := range config.AliasFilenames { if fnmatch.Match(glob, filename, 0) { matched = append(matched, lexer) + } else { + for _, suf := range &ignoredSuffixes { + if fnmatch.Match(glob+suf, filename, 0) { + matched = append(matched, lexer) + break + } + } } } } @@ -146,16 +173,19 @@ func Register(lexer chroma.Lexer) chroma.Lexer { return lexer } -// Used for the fallback lexer as well as the explicit plaintext lexer -var PlaintextRules = chroma.Rules{ - "root": []chroma.Rule{ - {`.+`, chroma.Text, nil}, - {`\n`, chroma.Text, nil}, - }, +// PlaintextRules is used for the fallback lexer as well as the explicit +// plaintext lexer. +func PlaintextRules() chroma.Rules { + return chroma.Rules{ + "root": []chroma.Rule{ + {`.+`, chroma.Text, nil}, + {`\n`, chroma.Text, nil}, + }, + } } // Fallback lexer if no other is found. -var Fallback chroma.Lexer = chroma.MustNewLexer(&chroma.Config{ +var Fallback chroma.Lexer = chroma.MustNewLazyLexer(&chroma.Config{ Name: "fallback", Filenames: []string{"*"}, }, PlaintextRules) diff --git a/vendor/github.com/alecthomas/chroma/lexers/j/j.go b/vendor/github.com/alecthomas/chroma/lexers/j/j.go index 686e53b..9a2a4e3 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/j/j.go +++ b/vendor/github.com/alecthomas/chroma/lexers/j/j.go @@ -6,14 +6,18 @@ import ( ) // J lexer. -var J = internal.Register(MustNewLexer( +var J = internal.Register(MustNewLazyLexer( &Config{ Name: "J", Aliases: []string{"j"}, Filenames: []string{"*.ijs"}, MimeTypes: []string{"text/x-j"}, }, - Rules{ + jRules, +)) + +func jRules() Rules { + return Rules{ "root": { {`#!.*$`, CommentPreproc, nil}, {`NB\..*`, CommentSingle, nil}, @@ -69,5 +73,5 @@ var J = internal.Register(MustNewLexer( {`''`, LiteralString, nil}, {`'`, LiteralString, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/j/java.go b/vendor/github.com/alecthomas/chroma/lexers/j/java.go index c6b9a76..48a9d9f 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/j/java.go +++ b/vendor/github.com/alecthomas/chroma/lexers/j/java.go @@ -6,15 +6,20 @@ import ( ) // Java lexer. -var Java = internal.Register(MustNewLexer( +var Java = internal.Register(MustNewLazyLexer( &Config{ Name: "Java", Aliases: []string{"java"}, Filenames: []string{"*.java"}, MimeTypes: []string{"text/x-java"}, DotAll: true, + EnsureNL: true, }, - Rules{ + javaRules, +)) + +func javaRules() Rules { + return Rules{ "root": { {`[^\S\n]+`, Text, nil}, {`//.*?\n`, CommentSingle, nil}, @@ -47,5 +52,5 @@ var Java = internal.Register(MustNewLexer( "import": { {`[\w.]+\*?`, NameNamespace, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/j/javascript.go b/vendor/github.com/alecthomas/chroma/lexers/j/javascript.go index 282501d..6bb3145 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/j/javascript.go +++ b/vendor/github.com/alecthomas/chroma/lexers/j/javascript.go @@ -26,18 +26,18 @@ var JavascriptRules = Rules{ {`\A#! ?/.*?\n`, CommentHashbang, nil}, {`^(?=\s|/|`, `||`, `&&`, `>`, `<`, `>=`, `≥`, `<=`, `≤`, `==`, `===`, `≡`, `!=`, `≠`, `!==`, `≢`, `.>`, `.<`, `.>=`, `.≥`, `.<=`, `.≤`, `.==`, `.!=`, `.≠`, `.=`, `.!`, `<:`, `>:`, `∈`, `∉`, `∋`, `∌`, `⊆`, `⊈`, `⊂`, `⊄`, `⊊`, `|>`, `<|`, `:`, `+`, `-`, `.+`, `.-`, `|`, `∪`, `$`, `<<`, `>>`, `>>>`, `.<<`, `.>>`, `.>>>`, `*`, `/`, `./`, `÷`, `.÷`, `%`, `⋅`, `.%`, `.*`, `\`, `.\`, `&`, `∩`, `//`, `.//`, `^`, `.^`, `::`, `.`, `+`, `-`, `!`, `√`, `∛`, `∜`), Operator, nil}, + {`[\[\](),;]`, Punctuation, nil}, + {`((?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*))(\s*)(:)((?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*))`, ByGroups(Name, Text, Operator, Name), nil}, + {`(?\d.])(:(?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*))`, LiteralStringSymbol, nil}, + {`(?<=::)(\s*)((?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*))\b(?![(\[])`, ByGroups(Text, KeywordType), nil}, + {`((?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*))(\s*)([<>]:)(\s*)((?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*))\b(?![(\[])`, ByGroups(KeywordType, Text, Operator, Text, KeywordType), nil}, + {`([<>]:)(\s*)((?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*))\b(?![(\[])`, ByGroups(Operator, Text, KeywordType), nil}, + {`\b((?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*))(\s*)([<>]:)`, ByGroups(KeywordType, Text, Operator), nil}, + {Words(``, `[²³¹ʰʲʳʷʸˡˢˣᴬᴮᴰᴱᴳᴴᴵᴶᴷᴸᴹᴺᴼᴾᴿᵀᵁᵂᵃᵇᵈᵉᵍᵏᵐᵒᵖᵗᵘᵛᵝᵞᵟᵠᵡᵢᵣᵤᵥᵦᵧᵨᵩᵪᶜᶠᶥᶦᶫᶰᶸᶻᶿ′″‴‵‶‷⁗⁰ⁱ⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ⁿ₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎ₐₑₒₓₕₖₗₘₙₚₛₜⱼⱽ]*`, `->`, `:=`, `$=`, `?`, `||`, `&&`, `:`, `$`, `::`, `=`, `+=`, `-=`, `*=`, `/=`, `//=`, `\=`, `^=`, `÷=`, `%=`, `<<=`, `>>=`, `>>>=`, `|=`, `&=`, `⊻=`, `≔`, `⩴`, `≕'`, `~`, `=>`, `→`, `↔`, `↚`, `↛`, `↞`, `↠`, `↢`, `↣`, `↦`, `↤`, `↮`, `⇎`, `⇍`, `⇏`, `⇐`, `⇒`, `⇔`, `⇴`, `⇶`, `⇷`, `⇸`, `⇹`, `⇺`, `⇻`, `⇼`, `⇽`, `⇾`, `⇿`, `⟵`, `⟶`, `⟷`, `⟹`, `⟺`, `⟻`, `⟼`, `⟽`, `⟾`, `⟿`, `⤀`, `⤁`, `⤂`, `⤃`, `⤄`, `⤅`, `⤆`, `⤇`, `⤌`, `⤍`, `⤎`, `⤏`, `⤐`, `⤑`, `⤔`, `⤕`, `⤖`, `⤗`, `⤘`, `⤝`, `⤞`, `⤟`, `⤠`, `⥄`, `⥅`, `⥆`, `⥇`, `⥈`, `⥊`, `⥋`, `⥎`, `⥐`, `⥒`, `⥓`, `⥖`, `⥗`, `⥚`, `⥛`, `⥞`, `⥟`, `⥢`, `⥤`, `⥦`, `⥧`, `⥨`, `⥩`, `⥪`, `⥫`, `⥬`, `⥭`, `⥰`, `⧴`, `⬱`, `⬰`, `⬲`, `⬳`, `⬴`, `⬵`, `⬶`, `⬷`, `⬸`, `⬹`, `⬺`, `⬻`, `⬼`, `⬽`, `⬾`, `⬿`, `⭀`, `⭁`, `⭂`, `⭃`, `⭄`, `⭇`, `⭈`, `⭉`, `⭊`, `⭋`, `⭌`, `←`, `→`, `⇜`, `⇝`, `↜`, `↝`, `↩`, `↪`, `↫`, `↬`, `↼`, `↽`, `⇀`, `⇁`, `⇄`, `⇆`, `⇇`, `⇉`, `⇋`, `⇌`, `⇚`, `⇛`, `⇠`, `⇢`, `↷`, `↶`, `↺`, `↻`, `-->`, `<--`, `<-->`, `>`, `<`, `>=`, `≥`, `<=`, `≤`, `==`, `===`, `≡`, `!=`, `≠`, `!==`, `≢`, `∈`, `∉`, `∋`, `∌`, `⊆`, `⊈`, `⊂`, `⊄`, `⊊`, `∝`, `∊`, `∍`, `∥`, `∦`, `∷`, `∺`, `∻`, `∽`, `∾`, `≁`, `≃`, `≂`, `≄`, `≅`, `≆`, `≇`, `≈`, `≉`, `≊`, `≋`, `≌`, `≍`, `≎`, `≐`, `≑`, `≒`, `≓`, `≖`, `≗`, `≘`, `≙`, `≚`, `≛`, `≜`, `≝`, `≞`, `≟`, `≣`, `≦`, `≧`, `≨`, `≩`, `≪`, `≫`, `≬`, `≭`, `≮`, `≯`, `≰`, `≱`, `≲`, `≳`, `≴`, `≵`, `≶`, `≷`, `≸`, `≹`, `≺`, `≻`, `≼`, `≽`, `≾`, `≿`, `⊀`, `⊁`, `⊃`, `⊅`, `⊇`, `⊉`, `⊋`, `⊏`, `⊐`, `⊑`, `⊒`, `⊜`, `⊩`, `⊬`, `⊮`, `⊰`, `⊱`, `⊲`, `⊳`, `⊴`, `⊵`, `⊶`, `⊷`, `⋍`, `⋐`, `⋑`, `⋕`, `⋖`, `⋗`, `⋘`, `⋙`, `⋚`, `⋛`, `⋜`, `⋝`, `⋞`, `⋟`, `⋠`, `⋡`, `⋢`, `⋣`, `⋤`, `⋥`, `⋦`, `⋧`, `⋨`, `⋩`, `⋪`, `⋫`, `⋬`, `⋭`, `⋲`, `⋳`, `⋴`, `⋵`, `⋶`, `⋷`, `⋸`, `⋹`, `⋺`, `⋻`, `⋼`, `⋽`, `⋾`, `⋿`, `⟈`, `⟉`, `⟒`, `⦷`, `⧀`, `⧁`, `⧡`, `⧣`, `⧤`, `⧥`, `⩦`, `⩧`, `⩪`, `⩫`, `⩬`, `⩭`, `⩮`, `⩯`, `⩰`, `⩱`, `⩲`, `⩳`, `⩵`, `⩶`, `⩷`, `⩸`, `⩹`, `⩺`, `⩻`, `⩼`, `⩽`, `⩾`, `⩿`, `⪀`, `⪁`, `⪂`, `⪃`, `⪄`, `⪅`, `⪆`, `⪇`, `⪈`, `⪉`, `⪊`, `⪋`, `⪌`, `⪍`, `⪎`, `⪏`, `⪐`, `⪑`, `⪒`, `⪓`, `⪔`, `⪕`, `⪖`, `⪗`, `⪘`, `⪙`, `⪚`, `⪛`, `⪜`, `⪝`, `⪞`, `⪟`, `⪠`, `⪡`, `⪢`, `⪣`, `⪤`, `⪥`, `⪦`, `⪧`, `⪨`, `⪩`, `⪪`, `⪫`, `⪬`, `⪭`, `⪮`, `⪯`, `⪰`, `⪱`, `⪲`, `⪳`, `⪴`, `⪵`, `⪶`, `⪷`, `⪸`, `⪹`, `⪺`, `⪻`, `⪼`, `⪽`, `⪾`, `⪿`, `⫀`, `⫁`, `⫂`, `⫃`, `⫄`, `⫅`, `⫆`, `⫇`, `⫈`, `⫉`, `⫊`, `⫋`, `⫌`, `⫍`, `⫎`, `⫏`, `⫐`, `⫑`, `⫒`, `⫓`, `⫔`, `⫕`, `⫖`, `⫗`, `⫘`, `⫙`, `⫷`, `⫸`, `⫹`, `⫺`, `⊢`, `⊣`, `⟂`, `<:`, `>:`, `<|`, `|>`, `…`, `⁝`, `⋮`, `⋱`, `⋰`, `⋯`, `+`, `-`, `¦`, `|`, `⊕`, `⊖`, `⊞`, `⊟`, `++`, `∪`, `∨`, `⊔`, `±`, `∓`, `∔`, `∸`, `≏`, `⊎`, `⊻`, `⊽`, `⋎`, `⋓`, `⧺`, `⧻`, `⨈`, `⨢`, `⨣`, `⨤`, `⨥`, `⨦`, `⨧`, `⨨`, `⨩`, `⨪`, `⨫`, `⨬`, `⨭`, `⨮`, `⨹`, `⨺`, `⩁`, `⩂`, `⩅`, `⩊`, `⩌`, `⩏`, `⩐`, `⩒`, `⩔`, `⩖`, `⩗`, `⩛`, `⩝`, `⩡`, `⩢`, `⩣`, `*`, `/`, `⌿`, `÷`, `%`, `&`, `⋅`, `∘`, `×`, `\`, `∩`, `∧`, `⊗`, `⊘`, `⊙`, `⊚`, `⊛`, `⊠`, `⊡`, `⊓`, `∗`, `∙`, `∤`, `⅋`, `≀`, `⊼`, `⋄`, `⋆`, `⋇`, `⋉`, `⋊`, `⋋`, `⋌`, `⋏`, `⋒`, `⟑`, `⦸`, `⦼`, `⦾`, `⦿`, `⧶`, `⧷`, `⨇`, `⨰`, `⨱`, `⨲`, `⨳`, `⨴`, `⨵`, `⨶`, `⨷`, `⨸`, `⨻`, `⨼`, `⨽`, `⩀`, `⩃`, `⩄`, `⩋`, `⩍`, `⩎`, `⩑`, `⩓`, `⩕`, `⩘`, `⩚`, `⩜`, `⩞`, `⩟`, `⩠`, `⫛`, `⊍`, `▷`, `⨝`, `⟕`, `⟖`, `⟗`, `⨟`, `//`, `>>`, `<<`, `>>>`, `^`, `↑`, `↓`, `⇵`, `⟰`, `⟱`, `⤈`, `⤉`, `⤊`, `⤋`, `⤒`, `⤓`, `⥉`, `⥌`, `⥍`, `⥏`, `⥑`, `⥔`, `⥕`, `⥘`, `⥙`, `⥜`, `⥝`, `⥠`, `⥡`, `⥣`, `⥥`, `⥮`, `⥯`, `↑`, `↓`, `!`, `¬`, `√`, `∛`, `∜`), Operator, nil}, + {Words(``, `[²³¹ʰʲʳʷʸˡˢˣᴬᴮᴰᴱᴳᴴᴵᴶᴷᴸᴹᴺᴼᴾᴿᵀᵁᵂᵃᵇᵈᵉᵍᵏᵐᵒᵖᵗᵘᵛᵝᵞᵟᵠᵡᵢᵣᵤᵥᵦᵧᵨᵩᵪᶜᶠᶥᶦᶫᶰᶸᶻᶿ′″‴‵‶‷⁗⁰ⁱ⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ⁿ₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎ₐₑₒₓₕₖₗₘₙₚₛₜⱼⱽ]*`, `.=`, `.+=`, `.-=`, `.*=`, `./=`, `.//=`, `.\=`, `.^=`, `.÷=`, `.%=`, `.<<=`, `.>>=`, `.>>>=`, `.|=`, `.&=`, `.⊻=`, `.≔`, `.⩴`, `.≕'`, `.~`, `.=>`, `.→`, `.↔`, `.↚`, `.↛`, `.↞`, `.↠`, `.↢`, `.↣`, `.↦`, `.↤`, `.↮`, `.⇎`, `.⇍`, `.⇏`, `.⇐`, `.⇒`, `.⇔`, `.⇴`, `.⇶`, `.⇷`, `.⇸`, `.⇹`, `.⇺`, `.⇻`, `.⇼`, `.⇽`, `.⇾`, `.⇿`, `.⟵`, `.⟶`, `.⟷`, `.⟹`, `.⟺`, `.⟻`, `.⟼`, `.⟽`, `.⟾`, `.⟿`, `.⤀`, `.⤁`, `.⤂`, `.⤃`, `.⤄`, `.⤅`, `.⤆`, `.⤇`, `.⤌`, `.⤍`, `.⤎`, `.⤏`, `.⤐`, `.⤑`, `.⤔`, `.⤕`, `.⤖`, `.⤗`, `.⤘`, `.⤝`, `.⤞`, `.⤟`, `.⤠`, `.⥄`, `.⥅`, `.⥆`, `.⥇`, `.⥈`, `.⥊`, `.⥋`, `.⥎`, `.⥐`, `.⥒`, `.⥓`, `.⥖`, `.⥗`, `.⥚`, `.⥛`, `.⥞`, `.⥟`, `.⥢`, `.⥤`, `.⥦`, `.⥧`, `.⥨`, `.⥩`, `.⥪`, `.⥫`, `.⥬`, `.⥭`, `.⥰`, `.⧴`, `.⬱`, `.⬰`, `.⬲`, `.⬳`, `.⬴`, `.⬵`, `.⬶`, `.⬷`, `.⬸`, `.⬹`, `.⬺`, `.⬻`, `.⬼`, `.⬽`, `.⬾`, `.⬿`, `.⭀`, `.⭁`, `.⭂`, `.⭃`, `.⭄`, `.⭇`, `.⭈`, `.⭉`, `.⭊`, `.⭋`, `.⭌`, `.←`, `.→`, `.⇜`, `.⇝`, `.↜`, `.↝`, `.↩`, `.↪`, `.↫`, `.↬`, `.↼`, `.↽`, `.⇀`, `.⇁`, `.⇄`, `.⇆`, `.⇇`, `.⇉`, `.⇋`, `.⇌`, `.⇚`, `.⇛`, `.⇠`, `.⇢`, `.↷`, `.↶`, `.↺`, `.↻`, `.-->`, `.<--`, `.<-->`, `.>`, `.<`, `.>=`, `.≥`, `.<=`, `.≤`, `.==`, `.===`, `.≡`, `.!=`, `.≠`, `.!==`, `.≢`, `.∈`, `.∉`, `.∋`, `.∌`, `.⊆`, `.⊈`, `.⊂`, `.⊄`, `.⊊`, `.∝`, `.∊`, `.∍`, `.∥`, `.∦`, `.∷`, `.∺`, `.∻`, `.∽`, `.∾`, `.≁`, `.≃`, `.≂`, `.≄`, `.≅`, `.≆`, `.≇`, `.≈`, `.≉`, `.≊`, `.≋`, `.≌`, `.≍`, `.≎`, `.≐`, `.≑`, `.≒`, `.≓`, `.≖`, `.≗`, `.≘`, `.≙`, `.≚`, `.≛`, `.≜`, `.≝`, `.≞`, `.≟`, `.≣`, `.≦`, `.≧`, `.≨`, `.≩`, `.≪`, `.≫`, `.≬`, `.≭`, `.≮`, `.≯`, `.≰`, `.≱`, `.≲`, `.≳`, `.≴`, `.≵`, `.≶`, `.≷`, `.≸`, `.≹`, `.≺`, `.≻`, `.≼`, `.≽`, `.≾`, `.≿`, `.⊀`, `.⊁`, `.⊃`, `.⊅`, `.⊇`, `.⊉`, `.⊋`, `.⊏`, `.⊐`, `.⊑`, `.⊒`, `.⊜`, `.⊩`, `.⊬`, `.⊮`, `.⊰`, `.⊱`, `.⊲`, `.⊳`, `.⊴`, `.⊵`, `.⊶`, `.⊷`, `.⋍`, `.⋐`, `.⋑`, `.⋕`, `.⋖`, `.⋗`, `.⋘`, `.⋙`, `.⋚`, `.⋛`, `.⋜`, `.⋝`, `.⋞`, `.⋟`, `.⋠`, `.⋡`, `.⋢`, `.⋣`, `.⋤`, `.⋥`, `.⋦`, `.⋧`, `.⋨`, `.⋩`, `.⋪`, `.⋫`, `.⋬`, `.⋭`, `.⋲`, `.⋳`, `.⋴`, `.⋵`, `.⋶`, `.⋷`, `.⋸`, `.⋹`, `.⋺`, `.⋻`, `.⋼`, `.⋽`, `.⋾`, `.⋿`, `.⟈`, `.⟉`, `.⟒`, `.⦷`, `.⧀`, `.⧁`, `.⧡`, `.⧣`, `.⧤`, `.⧥`, `.⩦`, `.⩧`, `.⩪`, `.⩫`, `.⩬`, `.⩭`, `.⩮`, `.⩯`, `.⩰`, `.⩱`, `.⩲`, `.⩳`, `.⩵`, `.⩶`, `.⩷`, `.⩸`, `.⩹`, `.⩺`, `.⩻`, `.⩼`, `.⩽`, `.⩾`, `.⩿`, `.⪀`, `.⪁`, `.⪂`, `.⪃`, `.⪄`, `.⪅`, `.⪆`, `.⪇`, `.⪈`, `.⪉`, `.⪊`, `.⪋`, `.⪌`, `.⪍`, `.⪎`, `.⪏`, `.⪐`, `.⪑`, `.⪒`, `.⪓`, `.⪔`, `.⪕`, `.⪖`, `.⪗`, `.⪘`, `.⪙`, `.⪚`, `.⪛`, `.⪜`, `.⪝`, `.⪞`, `.⪟`, `.⪠`, `.⪡`, `.⪢`, `.⪣`, `.⪤`, `.⪥`, `.⪦`, `.⪧`, `.⪨`, `.⪩`, `.⪪`, `.⪫`, `.⪬`, `.⪭`, `.⪮`, `.⪯`, `.⪰`, `.⪱`, `.⪲`, `.⪳`, `.⪴`, `.⪵`, `.⪶`, `.⪷`, `.⪸`, `.⪹`, `.⪺`, `.⪻`, `.⪼`, `.⪽`, `.⪾`, `.⪿`, `.⫀`, `.⫁`, `.⫂`, `.⫃`, `.⫄`, `.⫅`, `.⫆`, `.⫇`, `.⫈`, `.⫉`, `.⫊`, `.⫋`, `.⫌`, `.⫍`, `.⫎`, `.⫏`, `.⫐`, `.⫑`, `.⫒`, `.⫓`, `.⫔`, `.⫕`, `.⫖`, `.⫗`, `.⫘`, `.⫙`, `.⫷`, `.⫸`, `.⫹`, `.⫺`, `.⊢`, `.⊣`, `.⟂`, `.<:`, `.>:`, `.<|`, `.|>`, `.…`, `.⁝`, `.⋮`, `.⋱`, `.⋰`, `.⋯`, `.+`, `.-`, `.¦`, `.|`, `.⊕`, `.⊖`, `.⊞`, `.⊟`, `.++`, `.∪`, `.∨`, `.⊔`, `.±`, `.∓`, `.∔`, `.∸`, `.≏`, `.⊎`, `.⊻`, `.⊽`, `.⋎`, `.⋓`, `.⧺`, `.⧻`, `.⨈`, `.⨢`, `.⨣`, `.⨤`, `.⨥`, `.⨦`, `.⨧`, `.⨨`, `.⨩`, `.⨪`, `.⨫`, `.⨬`, `.⨭`, `.⨮`, `.⨹`, `.⨺`, `.⩁`, `.⩂`, `.⩅`, `.⩊`, `.⩌`, `.⩏`, `.⩐`, `.⩒`, `.⩔`, `.⩖`, `.⩗`, `.⩛`, `.⩝`, `.⩡`, `.⩢`, `.⩣`, `.*`, `./`, `.⌿`, `.÷`, `.%`, `.&`, `.⋅`, `.∘`, `.×`, `.\`, `.∩`, `.∧`, `.⊗`, `.⊘`, `.⊙`, `.⊚`, `.⊛`, `.⊠`, `.⊡`, `.⊓`, `.∗`, `.∙`, `.∤`, `.⅋`, `.≀`, `.⊼`, `.⋄`, `.⋆`, `.⋇`, `.⋉`, `.⋊`, `.⋋`, `.⋌`, `.⋏`, `.⋒`, `.⟑`, `.⦸`, `.⦼`, `.⦾`, `.⦿`, `.⧶`, `.⧷`, `.⨇`, `.⨰`, `.⨱`, `.⨲`, `.⨳`, `.⨴`, `.⨵`, `.⨶`, `.⨷`, `.⨸`, `.⨻`, `.⨼`, `.⨽`, `.⩀`, `.⩃`, `.⩄`, `.⩋`, `.⩍`, `.⩎`, `.⩑`, `.⩓`, `.⩕`, `.⩘`, `.⩚`, `.⩜`, `.⩞`, `.⩟`, `.⩠`, `.⫛`, `.⊍`, `.▷`, `.⨝`, `.⟕`, `.⟖`, `.⟗`, `.⨟`, `.//`, `.>>`, `.<<`, `.>>>`, `.^`, `.↑`, `.↓`, `.⇵`, `.⟰`, `.⟱`, `.⤈`, `.⤉`, `.⤊`, `.⤋`, `.⤒`, `.⤓`, `.⥉`, `.⥌`, `.⥍`, `.⥏`, `.⥑`, `.⥔`, `.⥕`, `.⥘`, `.⥙`, `.⥜`, `.⥝`, `.⥠`, `.⥡`, `.⥣`, `.⥥`, `.⥮`, `.⥯`, `.↑`, `.↓`, `.!`, `.¬`, `.√`, `.∛`, `.∜`), Operator, nil}, + {Words(``, ``, `...`, `..`), Operator, nil}, {`'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,3}|\\u[a-fA-F0-9]{1,4}|\\U[a-fA-F0-9]{1,6}|[^\\\'\n])'`, LiteralStringChar, nil}, - {`(?<=[.\w)\]])\'+`, Operator, nil}, - {`"""`, LiteralString, Push("tqstring")}, - {`"`, LiteralString, Push("string")}, - {`r"""`, LiteralStringRegex, Push("tqregex")}, - {`r"`, LiteralStringRegex, Push("regex")}, - {"`", LiteralStringBacktick, Push("command")}, - {`((?:[a-zA-Z_¡-￿]|[𐀀-􏿿])(?:[a-zA-Z_0-9¡-￿]|[𐀀-􏿿])*!*)(')?`, ByGroups(Name, Operator), nil}, - {`(@(?:[a-zA-Z_¡-￿]|[𐀀-􏿿])(?:[a-zA-Z_0-9¡-￿]|[𐀀-􏿿])*!*)(')?`, ByGroups(NameDecorator, Operator), nil}, - {`(\d+(_\d+)+\.\d*|\d*\.\d+(_\d+)+)([eEf][+-]?[0-9]+)?`, LiteralNumberFloat, nil}, - {`(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?`, LiteralNumberFloat, nil}, - {`\d+(_\d+)+[eEf][+-]?[0-9]+`, LiteralNumberFloat, nil}, - {`\d+[eEf][+-]?[0-9]+`, LiteralNumberFloat, nil}, - {`0b[01]+(_[01]+)+`, LiteralNumberBin, nil}, - {`0b[01]+`, LiteralNumberBin, nil}, - {`0o[0-7]+(_[0-7]+)+`, LiteralNumberOct, nil}, - {`0o[0-7]+`, LiteralNumberOct, nil}, - {`0x[a-fA-F0-9]+(_[a-fA-F0-9]+)+`, LiteralNumberHex, nil}, - {`0x[a-fA-F0-9]+`, LiteralNumberHex, nil}, - {`\d+(_\d+)+`, LiteralNumberInteger, nil}, - {`\d+`, LiteralNumberInteger, nil}, + {`(?<=[.\w)\]])(\'[²³¹ʰʲʳʷʸˡˢˣᴬᴮᴰᴱᴳᴴᴵᴶᴷᴸᴹᴺᴼᴾᴿᵀᵁᵂᵃᵇᵈᵉᵍᵏᵐᵒᵖᵗᵘᵛᵝᵞᵟᵠᵡᵢᵣᵤᵥᵦᵧᵨᵩᵪᶜᶠᶥᶦᶫᶰᶸᶻᶿ′″‴‵‶‷⁗⁰ⁱ⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ⁿ₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎ₐₑₒₓₕₖₗₘₙₚₛₜⱼⱽ]*)+`, Operator, nil}, + {`(raw)(""")`, ByGroups(LiteralStringAffix, LiteralString), Push("tqrawstring")}, + {`(raw)(")`, ByGroups(LiteralStringAffix, LiteralString), Push("rawstring")}, + {`(r)(""")`, ByGroups(LiteralStringAffix, LiteralStringRegex), Push("tqregex")}, + {`(r)(")`, ByGroups(LiteralStringAffix, LiteralStringRegex), Push("regex")}, + {`((?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*))?(""")`, ByGroups(LiteralStringAffix, LiteralString), Push("tqstring")}, + {`((?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*))?(")`, ByGroups(LiteralStringAffix, LiteralString), Push("string")}, + {"((?:[a-zA-Z_\u00a1-\U0010ffff][a-zA-Z_0-9!\u00a1-\U0010ffff]*))?(```)", ByGroups(LiteralStringAffix, LiteralStringBacktick), Push("tqcommand")}, + {"((?:[a-zA-Z_\u00a1-\U0010ffff][a-zA-Z_0-9!\u00a1-\U0010ffff]*))?(`)", ByGroups(LiteralStringAffix, LiteralStringBacktick), Push("command")}, + {`((?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*))(\{)`, ByGroups(KeywordType, Punctuation), Push("curly")}, + {`(where)(\s+)((?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*))`, ByGroups(Keyword, Text, KeywordType), nil}, + {`(\{)`, Punctuation, Push("curly")}, + {`(abstract[ \t]+type|primitive[ \t]+type|mutable[ \t]+struct|struct)([\s()]+)((?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*))`, ByGroups(Keyword, Text, KeywordType), nil}, + {`@(?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*)`, NameDecorator, nil}, + {Words(`@`, `[²³¹ʰʲʳʷʸˡˢˣᴬᴮᴰᴱᴳᴴᴵᴶᴷᴸᴹᴺᴼᴾᴿᵀᵁᵂᵃᵇᵈᵉᵍᵏᵐᵒᵖᵗᵘᵛᵝᵞᵟᵠᵡᵢᵣᵤᵥᵦᵧᵨᵩᵪᶜᶠᶥᶦᶫᶰᶸᶻᶿ′″‴‵‶‷⁗⁰ⁱ⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ⁿ₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎ₐₑₒₓₕₖₗₘₙₚₛₜⱼⱽ]*`, `->`, `:=`, `$=`, `?`, `||`, `&&`, `:`, `$`, `::`, `..`, `.`, `=`, `+=`, `-=`, `*=`, `/=`, `//=`, `\=`, `^=`, `÷=`, `%=`, `<<=`, `>>=`, `>>>=`, `|=`, `&=`, `⊻=`, `≔`, `⩴`, `≕'`, `~`, `=>`, `→`, `↔`, `↚`, `↛`, `↞`, `↠`, `↢`, `↣`, `↦`, `↤`, `↮`, `⇎`, `⇍`, `⇏`, `⇐`, `⇒`, `⇔`, `⇴`, `⇶`, `⇷`, `⇸`, `⇹`, `⇺`, `⇻`, `⇼`, `⇽`, `⇾`, `⇿`, `⟵`, `⟶`, `⟷`, `⟹`, `⟺`, `⟻`, `⟼`, `⟽`, `⟾`, `⟿`, `⤀`, `⤁`, `⤂`, `⤃`, `⤄`, `⤅`, `⤆`, `⤇`, `⤌`, `⤍`, `⤎`, `⤏`, `⤐`, `⤑`, `⤔`, `⤕`, `⤖`, `⤗`, `⤘`, `⤝`, `⤞`, `⤟`, `⤠`, `⥄`, `⥅`, `⥆`, `⥇`, `⥈`, `⥊`, `⥋`, `⥎`, `⥐`, `⥒`, `⥓`, `⥖`, `⥗`, `⥚`, `⥛`, `⥞`, `⥟`, `⥢`, `⥤`, `⥦`, `⥧`, `⥨`, `⥩`, `⥪`, `⥫`, `⥬`, `⥭`, `⥰`, `⧴`, `⬱`, `⬰`, `⬲`, `⬳`, `⬴`, `⬵`, `⬶`, `⬷`, `⬸`, `⬹`, `⬺`, `⬻`, `⬼`, `⬽`, `⬾`, `⬿`, `⭀`, `⭁`, `⭂`, `⭃`, `⭄`, `⭇`, `⭈`, `⭉`, `⭊`, `⭋`, `⭌`, `←`, `→`, `⇜`, `⇝`, `↜`, `↝`, `↩`, `↪`, `↫`, `↬`, `↼`, `↽`, `⇀`, `⇁`, `⇄`, `⇆`, `⇇`, `⇉`, `⇋`, `⇌`, `⇚`, `⇛`, `⇠`, `⇢`, `↷`, `↶`, `↺`, `↻`, `-->`, `<--`, `<-->`, `>`, `<`, `>=`, `≥`, `<=`, `≤`, `==`, `===`, `≡`, `!=`, `≠`, `!==`, `≢`, `∈`, `∉`, `∋`, `∌`, `⊆`, `⊈`, `⊂`, `⊄`, `⊊`, `∝`, `∊`, `∍`, `∥`, `∦`, `∷`, `∺`, `∻`, `∽`, `∾`, `≁`, `≃`, `≂`, `≄`, `≅`, `≆`, `≇`, `≈`, `≉`, `≊`, `≋`, `≌`, `≍`, `≎`, `≐`, `≑`, `≒`, `≓`, `≖`, `≗`, `≘`, `≙`, `≚`, `≛`, `≜`, `≝`, `≞`, `≟`, `≣`, `≦`, `≧`, `≨`, `≩`, `≪`, `≫`, `≬`, `≭`, `≮`, `≯`, `≰`, `≱`, `≲`, `≳`, `≴`, `≵`, `≶`, `≷`, `≸`, `≹`, `≺`, `≻`, `≼`, `≽`, `≾`, `≿`, `⊀`, `⊁`, `⊃`, `⊅`, `⊇`, `⊉`, `⊋`, `⊏`, `⊐`, `⊑`, `⊒`, `⊜`, `⊩`, `⊬`, `⊮`, `⊰`, `⊱`, `⊲`, `⊳`, `⊴`, `⊵`, `⊶`, `⊷`, `⋍`, `⋐`, `⋑`, `⋕`, `⋖`, `⋗`, `⋘`, `⋙`, `⋚`, `⋛`, `⋜`, `⋝`, `⋞`, `⋟`, `⋠`, `⋡`, `⋢`, `⋣`, `⋤`, `⋥`, `⋦`, `⋧`, `⋨`, `⋩`, `⋪`, `⋫`, `⋬`, `⋭`, `⋲`, `⋳`, `⋴`, `⋵`, `⋶`, `⋷`, `⋸`, `⋹`, `⋺`, `⋻`, `⋼`, `⋽`, `⋾`, `⋿`, `⟈`, `⟉`, `⟒`, `⦷`, `⧀`, `⧁`, `⧡`, `⧣`, `⧤`, `⧥`, `⩦`, `⩧`, `⩪`, `⩫`, `⩬`, `⩭`, `⩮`, `⩯`, `⩰`, `⩱`, `⩲`, `⩳`, `⩵`, `⩶`, `⩷`, `⩸`, `⩹`, `⩺`, `⩻`, `⩼`, `⩽`, `⩾`, `⩿`, `⪀`, `⪁`, `⪂`, `⪃`, `⪄`, `⪅`, `⪆`, `⪇`, `⪈`, `⪉`, `⪊`, `⪋`, `⪌`, `⪍`, `⪎`, `⪏`, `⪐`, `⪑`, `⪒`, `⪓`, `⪔`, `⪕`, `⪖`, `⪗`, `⪘`, `⪙`, `⪚`, `⪛`, `⪜`, `⪝`, `⪞`, `⪟`, `⪠`, `⪡`, `⪢`, `⪣`, `⪤`, `⪥`, `⪦`, `⪧`, `⪨`, `⪩`, `⪪`, `⪫`, `⪬`, `⪭`, `⪮`, `⪯`, `⪰`, `⪱`, `⪲`, `⪳`, `⪴`, `⪵`, `⪶`, `⪷`, `⪸`, `⪹`, `⪺`, `⪻`, `⪼`, `⪽`, `⪾`, `⪿`, `⫀`, `⫁`, `⫂`, `⫃`, `⫄`, `⫅`, `⫆`, `⫇`, `⫈`, `⫉`, `⫊`, `⫋`, `⫌`, `⫍`, `⫎`, `⫏`, `⫐`, `⫑`, `⫒`, `⫓`, `⫔`, `⫕`, `⫖`, `⫗`, `⫘`, `⫙`, `⫷`, `⫸`, `⫹`, `⫺`, `⊢`, `⊣`, `⟂`, `<:`, `>:`, `<|`, `|>`, `…`, `⁝`, `⋮`, `⋱`, `⋰`, `⋯`, `+`, `-`, `¦`, `|`, `⊕`, `⊖`, `⊞`, `⊟`, `++`, `∪`, `∨`, `⊔`, `±`, `∓`, `∔`, `∸`, `≏`, `⊎`, `⊻`, `⊽`, `⋎`, `⋓`, `⧺`, `⧻`, `⨈`, `⨢`, `⨣`, `⨤`, `⨥`, `⨦`, `⨧`, `⨨`, `⨩`, `⨪`, `⨫`, `⨬`, `⨭`, `⨮`, `⨹`, `⨺`, `⩁`, `⩂`, `⩅`, `⩊`, `⩌`, `⩏`, `⩐`, `⩒`, `⩔`, `⩖`, `⩗`, `⩛`, `⩝`, `⩡`, `⩢`, `⩣`, `*`, `/`, `⌿`, `÷`, `%`, `&`, `⋅`, `∘`, `×`, `\`, `∩`, `∧`, `⊗`, `⊘`, `⊙`, `⊚`, `⊛`, `⊠`, `⊡`, `⊓`, `∗`, `∙`, `∤`, `⅋`, `≀`, `⊼`, `⋄`, `⋆`, `⋇`, `⋉`, `⋊`, `⋋`, `⋌`, `⋏`, `⋒`, `⟑`, `⦸`, `⦼`, `⦾`, `⦿`, `⧶`, `⧷`, `⨇`, `⨰`, `⨱`, `⨲`, `⨳`, `⨴`, `⨵`, `⨶`, `⨷`, `⨸`, `⨻`, `⨼`, `⨽`, `⩀`, `⩃`, `⩄`, `⩋`, `⩍`, `⩎`, `⩑`, `⩓`, `⩕`, `⩘`, `⩚`, `⩜`, `⩞`, `⩟`, `⩠`, `⫛`, `⊍`, `▷`, `⨝`, `⟕`, `⟖`, `⟗`, `⨟`, `//`, `>>`, `<<`, `>>>`, `^`, `↑`, `↓`, `⇵`, `⟰`, `⟱`, `⤈`, `⤉`, `⤊`, `⤋`, `⤒`, `⤓`, `⥉`, `⥌`, `⥍`, `⥏`, `⥑`, `⥔`, `⥕`, `⥘`, `⥙`, `⥜`, `⥝`, `⥠`, `⥡`, `⥣`, `⥥`, `⥮`, `⥯`, `↑`, `↓`, `!`, `¬`, `√`, `∛`, `∜`), NameDecorator, nil}, + {Words(``, `\b`, `baremodule`, `begin`, `break`, `catch`, `ccall`, `const`, `continue`, `do`, `else`, `elseif`, `end`, `export`, `finally`, `for`, `function`, `global`, `if`, `import`, `in`, `isa`, `let`, `local`, `macro`, `module`, `quote`, `return`, `try`, `using`, `where`, `while`), Keyword, nil}, + {Words(``, `\b`, `AbstractArray`, `AbstractChannel`, `AbstractChar`, `AbstractDict`, `AbstractDisplay`, `AbstractFloat`, `AbstractIrrational`, `AbstractMatch`, `AbstractMatrix`, `AbstractPattern`, `AbstractRange`, `AbstractSet`, `AbstractString`, `AbstractUnitRange`, `AbstractVecOrMat`, `AbstractVector`, `Any`, `ArgumentError`, `Array`, `AssertionError`, `BigFloat`, `BigInt`, `BitArray`, `BitMatrix`, `BitSet`, `BitVector`, `Bool`, `BoundsError`, `CapturedException`, `CartesianIndex`, `CartesianIndices`, `Cchar`, `Cdouble`, `Cfloat`, `Channel`, `Char`, `Cint`, `Cintmax_t`, `Clong`, `Clonglong`, `Cmd`, `Colon`, `Complex`, `ComplexF16`, `ComplexF32`, `ComplexF64`, `ComposedFunction`, `CompositeException`, `Condition`, `Cptrdiff_t`, `Cshort`, `Csize_t`, `Cssize_t`, `Cstring`, `Cuchar`, `Cuint`, `Cuintmax_t`, `Culong`, `Culonglong`, `Cushort`, `Cvoid`, `Cwchar_t`, `Cwstring`, `DataType`, `DenseArray`, `DenseMatrix`, `DenseVecOrMat`, `DenseVector`, `Dict`, `DimensionMismatch`, `Dims`, `DivideError`, `DomainError`, `EOFError`, `Enum`, `ErrorException`, `Exception`, `ExponentialBackOff`, `Expr`, `Float16`, `Float32`, `Float64`, `Function`, `GlobalRef`, `HTML`, `IO`, `IOBuffer`, `IOContext`, `IOStream`, `IdDict`, `IndexCartesian`, `IndexLinear`, `IndexStyle`, `InexactError`, `InitError`, `Int`, `Int128`, `Int16`, `Int32`, `Int64`, `Int8`, `Integer`, `InterruptException`, `InvalidStateException`, `Irrational`, `KeyError`, `LinRange`, `LineNumberNode`, `LinearIndices`, `LoadError`, `MIME`, `Matrix`, `Method`, `MethodError`, `Missing`, `MissingException`, `Module`, `NTuple`, `NamedTuple`, `Nothing`, `Number`, `OrdinalRange`, `OutOfMemoryError`, `OverflowError`, `Pair`, `PartialQuickSort`, `PermutedDimsArray`, `Pipe`, `ProcessFailedException`, `Ptr`, `QuoteNode`, `Rational`, `RawFD`, `ReadOnlyMemoryError`, `Real`, `ReentrantLock`, `Ref`, `Regex`, `RegexMatch`, `RoundingMode`, `SegmentationFault`, `Set`, `Signed`, `Some`, `StackOverflowError`, `StepRange`, `StepRangeLen`, `StridedArray`, `StridedMatrix`, `StridedVecOrMat`, `StridedVector`, `String`, `StringIndexError`, `SubArray`, `SubString`, `SubstitutionString`, `Symbol`, `SystemError`, `Task`, `TaskFailedException`, `Text`, `TextDisplay`, `Timer`, `Tuple`, `Type`, `TypeError`, `TypeVar`, `UInt`, `UInt128`, `UInt16`, `UInt32`, `UInt64`, `UInt8`, `UndefInitializer`, `UndefKeywordError`, `UndefRefError`, `UndefVarError`, `Union`, `UnionAll`, `UnitRange`, `Unsigned`, `Val`, `Vararg`, `VecElement`, `VecOrMat`, `Vector`, `VersionNumber`, `WeakKeyDict`, `WeakRef`), KeywordType, nil}, + {Words(``, `\b`, `ARGS`, `C_NULL`, `DEPOT_PATH`, `ENDIAN_BOM`, `ENV`, `Inf`, `Inf16`, `Inf32`, `Inf64`, `InsertionSort`, `LOAD_PATH`, `MergeSort`, `NaN`, `NaN16`, `NaN32`, `NaN64`, `PROGRAM_FILE`, `QuickSort`, `RoundDown`, `RoundFromZero`, `RoundNearest`, `RoundNearestTiesAway`, `RoundNearestTiesUp`, `RoundToZero`, `RoundUp`, `VERSION`, `devnull`, `false`, `im`, `missing`, `nothing`, `pi`, `stderr`, `stdin`, `stdout`, `true`, `undef`, `π`, `ℯ`), NameBuiltin, nil}, + {`(?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*)`, Name, nil}, + {`(\d+((_\d+)+)?\.(?!\.)(\d+((_\d+)+)?)?|\.\d+((_\d+)+)?)([eEf][+-]?[0-9]+)?`, LiteralNumberFloat, nil}, + {`\d+((_\d+)+)?[eEf][+-]?[0-9]+`, LiteralNumberFloat, nil}, + {`0x[a-fA-F0-9]+((_[a-fA-F0-9]+)+)?(\.([a-fA-F0-9]+((_[a-fA-F0-9]+)+)?)?)?p[+-]?\d+`, LiteralNumberFloat, nil}, + {`0b[01]+((_[01]+)+)?`, LiteralNumberBin, nil}, + {`0o[0-7]+((_[0-7]+)+)?`, LiteralNumberOct, nil}, + {`0x[a-fA-F0-9]+((_[a-fA-F0-9]+)+)?`, LiteralNumberHex, nil}, + {`\d+((_\d+)+)?`, LiteralNumberInteger, nil}, + {Words(``, ``, `.`), Operator, nil}, }, "blockcomment": { {`[^=#]`, CommentMultiline, nil}, @@ -56,40 +68,67 @@ var Julia = internal.Register(MustNewLexer( {`=#`, CommentMultiline, Pop(1)}, {`[=#]`, CommentMultiline, nil}, }, - "string": { - {`"`, LiteralString, Pop(1)}, - {`\\([\\"\'$nrbtfav]|(x|u|U)[a-fA-F0-9]+|\d+)`, LiteralStringEscape, nil}, - {`\$(?:[a-zA-Z_¡-￿]|[𐀀-􏿿])(?:[a-zA-Z_0-9¡-￿]|[𐀀-􏿿])*!*`, LiteralStringInterpol, nil}, - {`(\$)(\()`, ByGroups(LiteralStringInterpol, Punctuation), Push("in-intp")}, - {`%[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]`, LiteralStringInterpol, nil}, - {`.|\s`, LiteralString, nil}, + "curly": { + {`\{`, Punctuation, Push()}, + {`\}`, Punctuation, Pop(1)}, + {`(?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*)`, KeywordType, nil}, + Include("root"), }, - "tqstring": { + "tqrawstring": { {`"""`, LiteralString, Pop(1)}, - {`\\([\\"\'$nrbtfav]|(x|u|U)[a-fA-F0-9]+|\d+)`, LiteralStringEscape, nil}, - {`\$(?:[a-zA-Z_¡-￿]|[𐀀-􏿿])(?:[a-zA-Z_0-9¡-￿]|[𐀀-􏿿])*!*`, LiteralStringInterpol, nil}, + {`([^"]|"[^"][^"])+`, LiteralString, nil}, + }, + "rawstring": { + {`"`, LiteralString, Pop(1)}, + {`\\"`, LiteralStringEscape, nil}, + {`([^"\\]|\\[^"])+`, LiteralString, nil}, + }, + "interp": { + {`\$(?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*)`, LiteralStringInterpol, nil}, {`(\$)(\()`, ByGroups(LiteralStringInterpol, Punctuation), Push("in-intp")}, - {`.|\s`, LiteralString, nil}, - }, - "regex": { - {`"`, LiteralStringRegex, Pop(1)}, - {`\\"`, LiteralStringRegex, nil}, - {`.|\s`, LiteralStringRegex, nil}, - }, - "tqregex": { - {`"""`, LiteralStringRegex, Pop(1)}, - {`.|\s`, LiteralStringRegex, nil}, - }, - "command": { - {"`", LiteralStringBacktick, Pop(1)}, - {`\$(?:[a-zA-Z_¡-￿]|[𐀀-􏿿])(?:[a-zA-Z_0-9¡-￿]|[𐀀-􏿿])*!*`, LiteralStringInterpol, nil}, - {`(\$)(\()`, ByGroups(LiteralStringInterpol, Punctuation), Push("in-intp")}, - {`.|\s`, LiteralStringBacktick, nil}, }, "in-intp": { {`\(`, Punctuation, Push()}, {`\)`, Punctuation, Pop(1)}, Include("root"), }, - }, -)) + "string": { + {`(")((?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*)|\d+)?`, ByGroups(LiteralString, LiteralStringAffix), Pop(1)}, + {`\\([\\"\'$nrbtfav]|(x|u|U)[a-fA-F0-9]+|\d+)`, LiteralStringEscape, nil}, + Include("interp"), + {`%[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]`, LiteralStringInterpol, nil}, + {`[^"$%\\]+`, LiteralString, nil}, + {`.`, LiteralString, nil}, + }, + "tqstring": { + {`(""")((?:[a-zA-Z_¡-􏿿][a-zA-Z_0-9!¡-􏿿]*)|\d+)?`, ByGroups(LiteralString, LiteralStringAffix), Pop(1)}, + {`\\([\\"\'$nrbtfav]|(x|u|U)[a-fA-F0-9]+|\d+)`, LiteralStringEscape, nil}, + Include("interp"), + {`[^"$%\\]+`, LiteralString, nil}, + {`.`, LiteralString, nil}, + }, + "regex": { + {`(")([imsxa]*)?`, ByGroups(LiteralStringRegex, LiteralStringAffix), Pop(1)}, + {`\\"`, LiteralStringRegex, nil}, + {`[^\\"]+`, LiteralStringRegex, nil}, + }, + "tqregex": { + {`(""")([imsxa]*)?`, ByGroups(LiteralStringRegex, LiteralStringAffix), Pop(1)}, + {`[^"]+`, LiteralStringRegex, nil}, + }, + "command": { + {"(`)((?:[a-zA-Z_\u00a1-\U0010ffff][a-zA-Z_0-9!\u00a1-\U0010ffff]*)|\\d+)?", ByGroups(LiteralStringBacktick, LiteralStringAffix), Pop(1)}, + {"\\\\[`$]", LiteralStringEscape, nil}, + Include("interp"), + {"[^\\\\`$]+", LiteralStringBacktick, nil}, + {`.`, LiteralStringBacktick, nil}, + }, + "tqcommand": { + {"(```)((?:[a-zA-Z_\u00a1-\U0010ffff][a-zA-Z_0-9!\u00a1-\U0010ffff]*)|\\d+)?", ByGroups(LiteralStringBacktick, LiteralStringAffix), Pop(1)}, + {`\\\$`, LiteralStringEscape, nil}, + Include("interp"), + {"[^\\\\`$]+", LiteralStringBacktick, nil}, + {`.`, LiteralStringBacktick, nil}, + }, + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/j/jungle.go b/vendor/github.com/alecthomas/chroma/lexers/j/jungle.go index 83d46a4..5dbda9f 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/j/jungle.go +++ b/vendor/github.com/alecthomas/chroma/lexers/j/jungle.go @@ -5,14 +5,18 @@ import ( "github.com/alecthomas/chroma/lexers/internal" ) -var Jungle = internal.Register(MustNewLexer( +var Jungle = internal.Register(MustNewLazyLexer( &Config{ Name: "Jungle", Aliases: []string{"jungle"}, Filenames: []string{"*.jungle"}, MimeTypes: []string{"text/x-jungle"}, }, - Rules{ + jungleRules, +)) + +func jungleRules() Rules { + return Rules{ "root": { {`[^\S\n]+`, Text, nil}, {`\n`, Text, nil}, @@ -46,5 +50,5 @@ var Jungle = internal.Register(MustNewLexer( {`[a-zA-Z_]\w*`, Name, nil}, Default(Pop(1)), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/k/kotlin.go b/vendor/github.com/alecthomas/chroma/lexers/k/kotlin.go index 56b7966..671f85e 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/k/kotlin.go +++ b/vendor/github.com/alecthomas/chroma/lexers/k/kotlin.go @@ -5,10 +5,8 @@ import ( "github.com/alecthomas/chroma/lexers/internal" ) -var kotlinIdentifier = "_A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef][A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19_\u203f-\u2040\u2054\ufe33-\ufe34\ufe4d-\ufe4f\uff3f\u00ad\u0600-\u0604\u061c\u06dd\u070f\u180e\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff\ufff9-\ufffb\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62-\u0b63\u0b82\u0bc0\u0bcd\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0cbc\u0cbf\u0cc6\u0ccc-\u0ccd\u0ce2-\u0ce3\u0d41-\u0d44\u0d4d\u0d62-\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u3099-\u309a\ua66f\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\u0903\u093b\u093e-\u0940\u0949-\u094c\u094e-\u094f\u0982-\u0983\u09be-\u09c0\u09c7-\u09c8\u09cb-\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb-\u0acc\u0b02-\u0b03\u0b3e\u0b40\u0b47-\u0b48\u0b4b-\u0b4c\u0b57\u0bbe-\u0bbf\u0bc1-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82-\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7-\u0cc8\u0cca-\u0ccb\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82-\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2-\u0df3\u0f3e-\u0f3f\u0f7f\u102b-\u102c\u1031\u1038\u103b-\u103c\u1056-\u1057\u1062-\u1064\u1067-\u106d\u1083-\u1084\u1087-\u108c\u108f\u109a-\u109c\u17b6\u17be-\u17c5\u17c7-\u17c8\u1923-\u1926\u1929-\u192b\u1930-\u1931\u1933-\u1938\u19b0-\u19c0\u19c8-\u19c9\u1a19-\u1a1a\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b44\u1b82\u1ba1\u1ba6-\u1ba7\u1baa\u1bac-\u1bad\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1bf3\u1c24-\u1c2b\u1c34-\u1c35\u1ce1\u1cf2-\u1cf3\u302e-\u302f\ua823-\ua824\ua827\ua880-\ua881\ua8b4-\ua8c3\ua952-\ua953\ua983\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\ua9c0\uaa2f-\uaa30\uaa33-\uaa34\uaa4d\uaa7b\uaaeb\uaaee-\uaaef\uaaf5\uabe3-\uabe4\uabe6-\uabe7\uabe9-\uabea\uabec]*|`@?[_A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef][A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19_\u203f-\u2040\u2054\ufe33-\ufe34\ufe4d-\ufe4f\uff3f\u00ad\u0600-\u0604\u061c\u06dd\u070f\u180e\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff\ufff9-\ufffb\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62-\u0b63\u0b82\u0bc0\u0bcd\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0cbc\u0cbf\u0cc6\u0ccc-\u0ccd\u0ce2-\u0ce3\u0d41-\u0d44\u0d4d\u0d62-\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u3099-\u309a\ua66f\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\u0903\u093b\u093e-\u0940\u0949-\u094c\u094e-\u094f\u0982-\u0983\u09be-\u09c0\u09c7-\u09c8\u09cb-\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb-\u0acc\u0b02-\u0b03\u0b3e\u0b40\u0b47-\u0b48\u0b4b-\u0b4c\u0b57\u0bbe-\u0bbf\u0bc1-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82-\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7-\u0cc8\u0cca-\u0ccb\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82-\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2-\u0df3\u0f3e-\u0f3f\u0f7f\u102b-\u102c\u1031\u1038\u103b-\u103c\u1056-\u1057\u1062-\u1064\u1067-\u106d\u1083-\u1084\u1087-\u108c\u108f\u109a-\u109c\u17b6\u17be-\u17c5\u17c7-\u17c8\u1923-\u1926\u1929-\u192b\u1930-\u1931\u1933-\u1938\u19b0-\u19c0\u19c8-\u19c9\u1a19-\u1a1a\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b44\u1b82\u1ba1\u1ba6-\u1ba7\u1baa\u1bac-\u1bad\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1bf3\u1c24-\u1c2b\u1c34-\u1c35\u1ce1\u1cf2-\u1cf3\u302e-\u302f\ua823-\ua824\ua827\ua880-\ua881\ua8b4-\ua8c3\ua952-\ua953\ua983\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\ua9c0\uaa2f-\uaa30\uaa33-\uaa34\uaa4d\uaa7b\uaaeb\uaaee-\uaaef\uaaf5\uabe3-\uabe4\uabe6-\uabe7\uabe9-\uabea\uabec" - // Kotlin lexer. -var Kotlin = internal.Register(MustNewLexer( +var Kotlin = internal.Register(MustNewLazyLexer( &Config{ Name: "Kotlin", Aliases: []string{"kotlin"}, @@ -16,7 +14,13 @@ var Kotlin = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-kotlin"}, DotAll: true, }, - Rules{ + kotlinRules, +)) + +func kotlinRules() Rules { + const kotlinIdentifier = "_A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef][A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19_\u203f-\u2040\u2054\ufe33-\ufe34\ufe4d-\ufe4f\uff3f\u00ad\u0600-\u0604\u061c\u06dd\u070f\u180e\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff\ufff9-\ufffb\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62-\u0b63\u0b82\u0bc0\u0bcd\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0cbc\u0cbf\u0cc6\u0ccc-\u0ccd\u0ce2-\u0ce3\u0d41-\u0d44\u0d4d\u0d62-\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u3099-\u309a\ua66f\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\u0903\u093b\u093e-\u0940\u0949-\u094c\u094e-\u094f\u0982-\u0983\u09be-\u09c0\u09c7-\u09c8\u09cb-\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb-\u0acc\u0b02-\u0b03\u0b3e\u0b40\u0b47-\u0b48\u0b4b-\u0b4c\u0b57\u0bbe-\u0bbf\u0bc1-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82-\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7-\u0cc8\u0cca-\u0ccb\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82-\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2-\u0df3\u0f3e-\u0f3f\u0f7f\u102b-\u102c\u1031\u1038\u103b-\u103c\u1056-\u1057\u1062-\u1064\u1067-\u106d\u1083-\u1084\u1087-\u108c\u108f\u109a-\u109c\u17b6\u17be-\u17c5\u17c7-\u17c8\u1923-\u1926\u1929-\u192b\u1930-\u1931\u1933-\u1938\u19b0-\u19c0\u19c8-\u19c9\u1a19-\u1a1a\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b44\u1b82\u1ba1\u1ba6-\u1ba7\u1baa\u1bac-\u1bad\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1bf3\u1c24-\u1c2b\u1c34-\u1c35\u1ce1\u1cf2-\u1cf3\u302e-\u302f\ua823-\ua824\ua827\ua880-\ua881\ua8b4-\ua8c3\ua952-\ua953\ua983\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\ua9c0\uaa2f-\uaa30\uaa33-\uaa34\uaa4d\uaa7b\uaaeb\uaaee-\uaaef\uaaf5\uabe3-\uabe4\uabe6-\uabe7\uabe9-\uabea\uabec]*|`@?[_A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef][A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19_\u203f-\u2040\u2054\ufe33-\ufe34\ufe4d-\ufe4f\uff3f\u00ad\u0600-\u0604\u061c\u06dd\u070f\u180e\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff\ufff9-\ufffb\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62-\u0b63\u0b82\u0bc0\u0bcd\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0cbc\u0cbf\u0cc6\u0ccc-\u0ccd\u0ce2-\u0ce3\u0d41-\u0d44\u0d4d\u0d62-\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u3099-\u309a\ua66f\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\u0903\u093b\u093e-\u0940\u0949-\u094c\u094e-\u094f\u0982-\u0983\u09be-\u09c0\u09c7-\u09c8\u09cb-\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb-\u0acc\u0b02-\u0b03\u0b3e\u0b40\u0b47-\u0b48\u0b4b-\u0b4c\u0b57\u0bbe-\u0bbf\u0bc1-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82-\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7-\u0cc8\u0cca-\u0ccb\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82-\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2-\u0df3\u0f3e-\u0f3f\u0f7f\u102b-\u102c\u1031\u1038\u103b-\u103c\u1056-\u1057\u1062-\u1064\u1067-\u106d\u1083-\u1084\u1087-\u108c\u108f\u109a-\u109c\u17b6\u17be-\u17c5\u17c7-\u17c8\u1923-\u1926\u1929-\u192b\u1930-\u1931\u1933-\u1938\u19b0-\u19c0\u19c8-\u19c9\u1a19-\u1a1a\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b44\u1b82\u1ba1\u1ba6-\u1ba7\u1baa\u1bac-\u1bad\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1bf3\u1c24-\u1c2b\u1c34-\u1c35\u1ce1\u1cf2-\u1cf3\u302e-\u302f\ua823-\ua824\ua827\ua880-\ua881\ua8b4-\ua8c3\ua952-\ua953\ua983\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\ua9c0\uaa2f-\uaa30\uaa33-\uaa34\uaa4d\uaa7b\uaaeb\uaaee-\uaaef\uaaf5\uabe3-\uabe4\uabe6-\uabe7\uabe9-\uabea\uabec" + + return Rules{ "root": { {`^\s*\[.*?\]`, NameAttribute, nil}, {`[^\S\n]+`, Text, nil}, @@ -24,32 +28,71 @@ var Kotlin = internal.Register(MustNewLexer( {`//[^\n]*\n?`, CommentSingle, nil}, {`/[*].*?[*]/`, CommentMultiline, nil}, {`\n`, Text, nil}, - {`::|!!|\?[:.]`, Operator, nil}, - {`[~!%^&*()+=|\[\]:;,.<>/?-]`, Punctuation, nil}, + {`!==|!in|!is|===`, Operator, nil}, + {`%=|&&|\*=|\+\+|\+=|--|-=|->|\.\.|\/=|::|<=|==|>=|!!|!=|\|\||\?[:.]`, Operator, nil}, + {`[~!%^&*()+=|\[\]:;,.<>\/?-]`, Punctuation, nil}, {`[{}]`, Punctuation, nil}, - {`"""[^"]*"""`, LiteralString, nil}, - {`"(\\\\|\\"|[^"\n])*["\n]`, LiteralString, nil}, + {`"""`, LiteralString, Push("rawstring")}, + {`"`, LiteralStringDouble, Push("string")}, + {`(')(\\u[0-9a-fA-F]{4})(')`, ByGroups(LiteralStringChar, LiteralStringEscape, LiteralStringChar), nil}, {`'\\.'|'[^\\]'`, LiteralStringChar, nil}, {`0[xX][0-9a-fA-F]+[Uu]?[Ll]?|[0-9]+(\.[0-9]*)?([eE][+-][0-9]+)?[fF]?[Uu]?[Ll]?`, LiteralNumber, nil}, {`(companion)(\s+)(object)`, ByGroups(Keyword, Text, Keyword), nil}, {`(class|interface|object)(\s+)`, ByGroups(Keyword, Text), Push("class")}, {`(package|import)(\s+)`, ByGroups(Keyword, Text), Push("package")}, {`(val|var)(\s+)`, ByGroups(Keyword, Text), Push("property")}, - {`(fun)(\s+)(<[^>]*>\s+)?`, ByGroups(Keyword, Text, Text), Push("function")}, - {`(abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|false|final|finally|for|fun|get|if|import|in|infix|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|true|try|val|var|vararg|when|where|while)\b`, Keyword, nil}, - {"(@?[" + kotlinIdentifier + "]*`)", Name, nil}, + {`(fun)(\s+)`, ByGroups(Keyword, Text), Push("function")}, + {`(abstract|actual|annotation|as|as\?|break|by|catch|class|companion|const|constructor|continue|crossinline|data|delegate|do|dynamic|else|enum|expect|external|false|field|file|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|it|lateinit|noinline|null|object|open|operator|out|override|package|param|private|property|protected|public|receiver|reified|return|sealed|set|setparam|super|suspend|tailrec|this|throw|true|try|typealias|typeof|val|var|vararg|when|where|while)\b`, Keyword, nil}, + {`@[` + kotlinIdentifier + `]+`, NameDecorator, nil}, + {`[` + kotlinIdentifier + `]+`, Name, nil}, }, "package": { {`\S+`, NameNamespace, Pop(1)}, }, "class": { - {"(@?[" + kotlinIdentifier + "]*`)", NameClass, Pop(1)}, + // \x60 is the back tick character (`) + {`\x60[^\x60]+?\x60`, NameClass, Pop(1)}, + {`[` + kotlinIdentifier + `]+`, NameClass, Pop(1)}, }, "property": { - {"(@?[" + kotlinIdentifier + " ]*`)", NameProperty, Pop(1)}, + {`\x60[^\x60]+?\x60`, NameProperty, Pop(1)}, + {`[` + kotlinIdentifier + `]+`, NameProperty, Pop(1)}, + }, + "generics-specification": { + {`<`, Punctuation, Push("generics-specification")}, // required for generics inside generics e.g. > + {`>`, Punctuation, Pop(1)}, + {`[,:*?]`, Punctuation, nil}, + {`(in|out|reified)`, Keyword, nil}, + {`\x60[^\x60]+?\x60`, NameClass, nil}, + {`[` + kotlinIdentifier + `]+`, NameClass, nil}, + {`\s+`, Text, nil}, }, "function": { - {"(@?[" + kotlinIdentifier + " ]*`)", NameFunction, Pop(1)}, + {`<`, Punctuation, Push("generics-specification")}, + {`\x60[^\x60]+?\x60`, NameFunction, Pop(1)}, + {`[` + kotlinIdentifier + `]+`, NameFunction, Pop(1)}, + {`\s+`, Text, nil}, }, - }, -)) + "rawstring": { + // raw strings don't allow character escaping + {`"""`, LiteralString, Pop(1)}, + {`(?:[^$"]+|\"{1,2}[^"])+`, LiteralString, nil}, + Include("string-interpol"), + // remaining dollar signs are just a string + {`\$`, LiteralString, nil}, + }, + "string": { + {`\\[tbnr'"\\\$]`, LiteralStringEscape, nil}, + {`\\u[0-9a-fA-F]{4}`, LiteralStringEscape, nil}, + {`"`, LiteralStringDouble, Pop(1)}, + Include("string-interpol"), + {`[^\n\\"$]+`, LiteralStringDouble, nil}, + // remaining dollar signs are just a string + {`\$`, LiteralStringDouble, nil}, + }, + "string-interpol": { + {`\$[` + kotlinIdentifier + `]+`, LiteralStringInterpol, nil}, + {`\${[^}\n]*}`, LiteralStringInterpol, nil}, + }, + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/l/lighttpd.go b/vendor/github.com/alecthomas/chroma/lexers/l/lighttpd.go index 799b77c..6d83298 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/l/lighttpd.go +++ b/vendor/github.com/alecthomas/chroma/lexers/l/lighttpd.go @@ -6,14 +6,18 @@ import ( ) // Lighttpd Configuration File lexer. -var Lighttpd = internal.Register(MustNewLexer( +var Lighttpd = internal.Register(MustNewLazyLexer( &Config{ Name: "Lighttpd configuration file", Aliases: []string{"lighty", "lighttpd"}, Filenames: []string{}, MimeTypes: []string{"text/x-lighttpd-conf"}, }, - Rules{ + lighttpdRules, +)) + +func lighttpdRules() Rules { + return Rules{ "root": { {`#.*\n`, CommentSingle, nil}, {`/\S*`, Name, nil}, @@ -26,5 +30,5 @@ var Lighttpd = internal.Register(MustNewLexer( {`"([^"\\]*(?:\\.[^"\\]*)*)"`, LiteralStringDouble, nil}, {`\s+`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/l/llvm.go b/vendor/github.com/alecthomas/chroma/lexers/l/llvm.go index 8f5b0b1..e9ea319 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/l/llvm.go +++ b/vendor/github.com/alecthomas/chroma/lexers/l/llvm.go @@ -6,14 +6,18 @@ import ( ) // Llvm lexer. -var Llvm = internal.Register(MustNewLexer( +var Llvm = internal.Register(MustNewLazyLexer( &Config{ Name: "LLVM", Aliases: []string{"llvm"}, Filenames: []string{"*.ll"}, MimeTypes: []string{"text/x-llvm"}, }, - Rules{ + llvmRules, +)) + +func llvmRules() Rules { + return Rules{ "root": { Include("whitespace"), {`([-a-zA-Z$._][\w\-$.]*|"[^"]*?")\s*:`, NameLabel, nil}, @@ -39,5 +43,5 @@ var Llvm = internal.Register(MustNewLexer( {Words(``, ``, `void`, `half`, `float`, `double`, `x86_fp80`, `fp128`, `ppc_fp128`, `label`, `metadata`, `token`), KeywordType, nil}, {`i[1-9]\d*`, Keyword, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/l/lua.go b/vendor/github.com/alecthomas/chroma/lexers/l/lua.go index c397de0..db574a1 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/l/lua.go +++ b/vendor/github.com/alecthomas/chroma/lexers/l/lua.go @@ -6,14 +6,18 @@ import ( ) // Lua lexer. -var Lua = internal.Register(MustNewLexer( +var Lua = internal.Register(MustNewLazyLexer( &Config{ Name: "Lua", Aliases: []string{"lua"}, Filenames: []string{"*.lua", "*.wlua"}, MimeTypes: []string{"text/x-lua", "application/x-lua"}, }, - Rules{ + luaRules, +)) + +func luaRules() Rules { + return Rules{ "root": { {`#!.*`, CommentPreproc, nil}, Default(Push("base")), @@ -71,5 +75,5 @@ var Lua = internal.Register(MustNewLexer( {`"`, LiteralStringDouble, Pop(1)}, {`[^\\"]+`, LiteralStringDouble, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/lexers.go b/vendor/github.com/alecthomas/chroma/lexers/lexers.go index 2897299..2b42921 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/lexers.go +++ b/vendor/github.com/alecthomas/chroma/lexers/lexers.go @@ -3,7 +3,7 @@ // Sub-packages contain lexer implementations. package lexers -// nolint: golint +// nolint import ( "github.com/alecthomas/chroma" _ "github.com/alecthomas/chroma/lexers/a" @@ -32,6 +32,7 @@ import ( _ "github.com/alecthomas/chroma/lexers/w" _ "github.com/alecthomas/chroma/lexers/x" _ "github.com/alecthomas/chroma/lexers/y" + _ "github.com/alecthomas/chroma/lexers/z" ) // Registry of Lexers. diff --git a/vendor/github.com/alecthomas/chroma/lexers/m/make.go b/vendor/github.com/alecthomas/chroma/lexers/m/make.go index eb9d9e6..905491a 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/m/make.go +++ b/vendor/github.com/alecthomas/chroma/lexers/m/make.go @@ -7,7 +7,7 @@ import ( ) // Makefile lexer. -var Makefile = internal.Register(MustNewLexer( +var Makefile = internal.Register(MustNewLazyLexer( &Config{ Name: "Base Makefile", Aliases: []string{"make", "makefile", "mf", "bsdmake"}, @@ -15,7 +15,11 @@ var Makefile = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-makefile"}, EnsureNL: true, }, - Rules{ + makefileRules, +)) + +func makefileRules() Rules { + return Rules{ "root": { {`^(?:[\t ]+.*\n|\n)+`, Using(Bash), nil}, {`\$[<@$+%?|*]`, Keyword, nil}, @@ -50,5 +54,5 @@ var Makefile = internal.Register(MustNewLexer( {`\n`, Text, Pop(1)}, {`.`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/m/mako.go b/vendor/github.com/alecthomas/chroma/lexers/m/mako.go index f7c140d..6f777dd 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/m/mako.go +++ b/vendor/github.com/alecthomas/chroma/lexers/m/mako.go @@ -7,14 +7,18 @@ import ( ) // Mako lexer. -var Mako = internal.Register(MustNewLexer( +var Mako = internal.Register(MustNewLazyLexer( &Config{ Name: "Mako", Aliases: []string{"mako"}, Filenames: []string{"*.mao"}, MimeTypes: []string{"application/x-mako"}, }, - Rules{ + 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}, @@ -56,5 +60,5 @@ var Mako = internal.Register(MustNewLexer( {`'.*?'`, LiteralString, Pop(1)}, {`[^\s>]+`, LiteralString, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/m/markdown.go b/vendor/github.com/alecthomas/chroma/lexers/m/markdown.go index dd78ec0..e50e470 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/m/markdown.go +++ b/vendor/github.com/alecthomas/chroma/lexers/m/markdown.go @@ -7,14 +7,18 @@ import ( ) // Markdown lexer. -var Markdown = internal.Register(DelegatingLexer(h.HTML, MustNewLexer( +var Markdown = internal.Register(DelegatingLexer(h.HTML, MustNewLazyLexer( &Config{ Name: "markdown", Aliases: []string{"md", "mkd"}, Filenames: []string{"*.md", "*.mkd", "*.markdown"}, MimeTypes: []string{"text/x-markdown"}, }, - Rules{ + markdownRules, +))) + +func markdownRules() Rules { + return Rules{ "root": { {`^(#[^#].+\n)`, ByGroups(GenericHeading), nil}, {`^(#{2,6}.+\n)`, ByGroups(GenericSubheading), nil}, @@ -23,7 +27,8 @@ var Markdown = internal.Register(DelegatingLexer(h.HTML, MustNewLexer( {`^(\s*)([0-9]+\.)( .+\n)`, ByGroups(Text, Keyword, UsingSelf("inline")), nil}, {`^(\s*>\s)(.+\n)`, ByGroups(Keyword, GenericEmph), nil}, {"^(```\\n)([\\w\\W]*?)(^```$)", ByGroups(String, Text, String), nil}, - {"^(```)(\\w+)(\\n)([\\w\\W]*?)(^```$)", + { + "^(```)(\\w+)(\\n)([\\w\\W]*?)(^```$)", UsingByGroup( internal.Get, 2, 4, @@ -35,7 +40,7 @@ var Markdown = internal.Register(DelegatingLexer(h.HTML, MustNewLexer( }, "inline": { {`\\.`, Text, nil}, - {`(\s)([*_][^*_]+[*_])(\W|\n)`, ByGroups(Text, GenericEmph, Text), nil}, + {`(\s)(\*|_)((?:(?!\2).)*)(\2)((?=\W|\n))`, ByGroups(Text, GenericEmph, GenericEmph, GenericEmph, Text), nil}, {`(\s)((\*\*|__).*?)\3((?=\W|\n))`, ByGroups(Text, GenericStrong, GenericStrong, Text), nil}, {`(\s)(~~[^~]+~~)((?=\W|\n))`, ByGroups(Text, GenericDeleted, Text), nil}, {"`[^`]+`", LiteralStringBacktick, nil}, @@ -44,5 +49,5 @@ var Markdown = internal.Register(DelegatingLexer(h.HTML, MustNewLexer( {`[^\\\s]+`, Other, nil}, {`.|\n`, Other, nil}, }, - }, -))) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/m/mason.go b/vendor/github.com/alecthomas/chroma/lexers/m/mason.go index 5c70ab0..bc48f5c 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/m/mason.go +++ b/vendor/github.com/alecthomas/chroma/lexers/m/mason.go @@ -8,7 +8,7 @@ import ( ) // Mason lexer. -var Mason = internal.Register(MustNewLexer( +var Mason = internal.Register(MustNewLazyLexer( &Config{ Name: "Mason", Aliases: []string{"mason"}, @@ -16,7 +16,11 @@ var Mason = internal.Register(MustNewLexer( MimeTypes: []string{"application/x-mason"}, Priority: 0.1, }, - Rules{ + masonRules, +)) + +func masonRules() Rules { + return Rules{ "root": { {`\s+`, Text, nil}, {`(<%doc>)(.*?)()(?s)`, ByGroups(NameTag, CommentMultiline, NameTag), nil}, @@ -39,5 +43,5 @@ var Mason = internal.Register(MustNewLexer( \Z # end of string )`, ByGroups(Using(HTML), Operator), nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/m/mathematica.go b/vendor/github.com/alecthomas/chroma/lexers/m/mathematica.go index 3d1f641..ed1ea24 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/m/mathematica.go +++ b/vendor/github.com/alecthomas/chroma/lexers/m/mathematica.go @@ -6,14 +6,18 @@ import ( ) // Mathematica lexer. -var Mathematica = internal.Register(MustNewLexer( +var Mathematica = internal.Register(MustNewLazyLexer( &Config{ Name: "Mathematica", Aliases: []string{"mathematica", "mma", "nb"}, Filenames: []string{"*.nb", "*.cdf", "*.nbp", "*.ma"}, MimeTypes: []string{"application/mathematica", "application/vnd.wolfram.mathematica", "application/vnd.wolfram.mathematica.package", "application/vnd.wolfram.cdf"}, }, - Rules{ + mathematicaRules, +)) + +func mathematicaRules() Rules { + return Rules{ "root": { {`(?s)\(\*.*?\*\)`, Comment, nil}, {"([a-zA-Z]+[A-Za-z0-9]*`)", NameNamespace, nil}, @@ -28,5 +32,5 @@ var Mathematica = internal.Register(MustNewLexer( {`".*?"`, LiteralString, nil}, {`\s+`, TextWhitespace, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/m/matlab.go b/vendor/github.com/alecthomas/chroma/lexers/m/matlab.go index 5b0baa5..4e98d69 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/m/matlab.go +++ b/vendor/github.com/alecthomas/chroma/lexers/m/matlab.go @@ -6,14 +6,18 @@ import ( ) // Matlab lexer. -var Matlab = internal.Register(MustNewLexer( +var Matlab = internal.Register(MustNewLazyLexer( &Config{ Name: "Matlab", Aliases: []string{"matlab"}, Filenames: []string{"*.m"}, MimeTypes: []string{"text/matlab"}, }, - Rules{ + matlabRules, +)) + +func matlabRules() Rules { + return Rules{ "root": { {`\n`, Text, nil}, {`^!.*`, LiteralStringOther, nil}, @@ -47,5 +51,5 @@ var Matlab = internal.Register(MustNewLexer( {`(\s*)(?:(.+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)`, ByGroups(TextWhitespace, Text, TextWhitespace, Punctuation, TextWhitespace, NameFunction, Punctuation, Text, Punctuation, TextWhitespace), Pop(1)}, {`(\s*)([a-zA-Z_]\w*)`, ByGroups(Text, NameFunction), Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/m/mcfunction.go b/vendor/github.com/alecthomas/chroma/lexers/m/mcfunction.go new file mode 100644 index 0000000..7baec6d --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/m/mcfunction.go @@ -0,0 +1,109 @@ +package m + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// mcfunction lexer. +var MCFunction = internal.Register(MustNewLazyLexer( + &Config{ + Name: "mcfunction", + Aliases: []string{"mcfunction"}, + Filenames: []string{"*.mcfunction"}, + MimeTypes: []string{}, + NotMultiline: true, + DotAll: true, + }, + func() Rules { + return Rules{ + "simplevalue": { + {`(true|false)`, KeywordConstant, nil}, + {`[01]b`, LiteralNumber, nil}, + {`-?(0|[1-9]\d*)(\.\d+[eE](\+|-)?\d+|[eE](\+|-)?\d+|\.\d+)`, LiteralNumberFloat, nil}, + {`(-?\d+)(\.\.)(-?\d+)`, ByGroups(LiteralNumberInteger, Punctuation, LiteralNumberInteger), nil}, + {`-?(0|[1-9]\d*)`, LiteralNumberInteger, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, + {`'[^']+'`, LiteralStringSingle, nil}, + {`([!#]?)(\w+)`, ByGroups(Punctuation, Text), nil}, + }, + "nbtobjectattribute": { + Include("nbtvalue"), + {`:`, Punctuation, nil}, + {`,`, Punctuation, Pop(1)}, + {`\}`, Punctuation, Pop(2)}, + }, + "nbtobjectvalue": { + {`("(\\\\|\\"|[^"])*"|[a-zA-Z0-9_]+)`, NameTag, Push("nbtobjectattribute")}, + {`\}`, Punctuation, Pop(1)}, + }, + "nbtarrayvalue": { + Include("nbtvalue"), + {`,`, Punctuation, nil}, + {`\]`, Punctuation, Pop(1)}, + }, + "nbtvalue": { + Include("simplevalue"), + {`\{`, Punctuation, Push("nbtobjectvalue")}, + {`\[`, Punctuation, Push("nbtarrayvalue")}, + }, + "argumentvalue": { + Include("simplevalue"), + {`,`, Punctuation, Pop(1)}, + {`[}\]]`, Punctuation, Pop(2)}, + }, + "argumentlist": { + {`(nbt)(={)`, ByGroups(NameAttribute, Punctuation), Push("nbtobjectvalue")}, + {`([A-Za-z0-9/_!]+)(={)`, ByGroups(NameAttribute, Punctuation), Push("argumentlist")}, + {`([A-Za-z0-9/_!]+)(=)`, ByGroups(NameAttribute, Punctuation), Push("argumentvalue")}, + Include("simplevalue"), + {`,`, Punctuation, nil}, + {`[}\]]`, Punctuation, Pop(1)}, + }, + "root": { + {`#.*?\n`, CommentSingle, nil}, + {Words(`/?`, `\b`, `ability`, `attributes`, `advancement`, + `ban`, `ban-ip`, `banlist`, `bossbar`, + `camerashake`, `classroommode`, `clear`, + `clearspawnpoint`, `clone`, `code`, `collect`, + `createagent`, `data`, `datapack`, `debug`, + `defaultgamemode`, `deop`, `destroy`, `detect`, + `detectredstone`, `difficulty`, `dropall`, + `effect`, `enchant`, `event`, `execute`, + `experience`, `fill`, `flog`, `forceload`, + `function`, `gamemode`, `gamerule`, + `geteduclientinfo`, `give`, `help`, `item`, + `immutableworld`, `kick`, `kill`, `list`, + `locate`, `locatebiome`, `loot`, `me`, `mixer`, + `mobevent`, `move`, `msg`, `music`, `op`, + `pardon`, `particle`, `playanimation`, + `playsound`, `position`, `publish`, + `raytracefog`, `recipe`, `reload`, `remove`, + `replaceitem`, `ride`, `save`, `save-all`, + `save-off`, `save-on`, `say`, `schedule`, + `scoreboard`, `seed`, `setblock`, + `setidletimeout`, `setmaxplayers`, + `setworldspawn`, `spawnpoint`, `spectate`, + `spreadplayers`, `stop`, `stopsound`, + `structure`, `summon`, `tag`, `team`, `teammsg`, + `teleport`, `tell`, `tellraw`, `testfor`, + `testforblock`, `testforblocks`, `tickingarea`, + `time`, `title`, `toggledownfall`, `tp`, + `tpagent`, `transfer`, `transferserver`, + `trigger`, `turn`, `w`, `weather`, `whitelist`, + `worldborder`, `worldbuilder`, `wsserver`, `xp`, + ), KeywordReserved, nil}, + {Words(``, ``, `@p`, `@r`, `@a`, `@e`, `@s`, `@c`, `@v`), + KeywordConstant, nil}, + {`\[`, Punctuation, Push("argumentlist")}, + {`{`, Punctuation, Push("nbtobjectvalue")}, + {`~`, NameBuiltin, nil}, + {`([a-zA-Z_]+:)?[a-zA-Z_]+\b`, Text, nil}, + {`([a-z]+)(\.)([0-9]+)\b`, ByGroups(Text, Punctuation, LiteralNumber), nil}, + {`([<>=]|<=|>=)`, Punctuation, nil}, + Include("simplevalue"), + {`\s+`, TextWhitespace, nil}, + }, + } + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/m/metal.go b/vendor/github.com/alecthomas/chroma/lexers/m/metal.go new file mode 100644 index 0000000..4a9ba2b --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/m/metal.go @@ -0,0 +1,101 @@ +package m + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// Metal lexer. +var Metal = internal.Register(MustNewLazyLexer( + &Config{ + Name: "Metal", + Aliases: []string{"metal"}, + Filenames: []string{"*.metal"}, + MimeTypes: []string{"text/x-metal"}, + EnsureNL: true, + }, + metalRules, +)) + +func metalRules() Rules { + return Rules{ + "statements": { + {Words(``, `\b`, `namespace`, `operator`, `template`, `this`, `using`, `constexpr`), Keyword, nil}, + {`(enum)\b(\s+)(class)\b(\s*)`, ByGroups(Keyword, Text, Keyword, Text), Push("classname")}, + {`(class|struct|enum|union)\b(\s*)`, ByGroups(Keyword, Text), Push("classname")}, + {`\[\[.+\]\]`, NameAttribute, nil}, + {`(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*`, LiteralNumberFloat, nil}, + {`(\d+\.\d*|\.\d+|\d+[fF])[fF]?`, LiteralNumberFloat, nil}, + {`0[xX]([0-9A-Fa-f]('?[0-9A-Fa-f]+)*)[LlUu]*`, LiteralNumberHex, nil}, + {`0('?[0-7]+)+[LlUu]*`, LiteralNumberOct, nil}, + {`0[Bb][01]('?[01]+)*[LlUu]*`, LiteralNumberBin, nil}, + {`[0-9]('?[0-9]+)*[LlUu]*`, LiteralNumberInteger, nil}, + {`\*/`, Error, nil}, + {`[~!%^&*+=|?:<>/-]`, Operator, nil}, + {`[()\[\],.]`, Punctuation, nil}, + {Words(``, `\b`, `break`, `case`, `const`, `continue`, `do`, `else`, `enum`, `extern`, `for`, `if`, `return`, `sizeof`, `static`, `struct`, `switch`, `typedef`, `union`, `while`), Keyword, nil}, + {`(bool|float|half|long|ptrdiff_t|size_t|unsigned|u?char|u?int((8|16|32|64)_t)?|u?short)\b`, KeywordType, nil}, + {`(bool|float|half|u?(char|int|long|short))(2|3|4)\b`, KeywordType, nil}, + {`packed_(float|half|long|u?(char|int|short))(2|3|4)\b`, KeywordType, nil}, + {`(float|half)(2|3|4)x(2|3|4)\b`, KeywordType, nil}, + {`atomic_u?int\b`, KeywordType, nil}, + {`(rg?(8|16)(u|s)norm|rgba(8|16)(u|s)norm|srgba8unorm|rgb10a2|rg11b10f|rgb9e5)\b`, KeywordType, nil}, + {`(array|depth(2d|cube)(_array)?|depth2d_ms(_array)?|sampler|texture_buffer|texture(1|2)d(_array)?|texture2d_ms(_array)?|texture3d|texturecube(_array)?|uniform|visible_function_table)\b`, KeywordType, nil}, + {`(true|false|NULL)\b`, NameBuiltin, nil}, + {Words(``, `\b`, `device`, `constant`, `ray_data`, `thread`, `threadgroup`, `threadgroup_imageblock`), Keyword, nil}, + {`([a-zA-Z_]\w*)(\s*)(:)(?!:)`, ByGroups(NameLabel, Text, Punctuation), nil}, + {`[a-zA-Z_]\w*`, Name, nil}, + }, + "root": { + Include("whitespace"), + {`(fragment|kernel|vertex)?((?:[\w*\s])+?(?:\s|[*]))([a-zA-Z_]\w*)(\s*\([^;]*?\))([^;{]*)(\{)`, ByGroups(Keyword, UsingSelf("root"), NameFunction, UsingSelf("root"), UsingSelf("root"), Punctuation), Push("function")}, + {`(fragment|kernel|vertex)?((?:[\w*\s])+?(?:\s|[*]))([a-zA-Z_]\w*)(\s*\([^;]*?\))([^;]*)(;)`, ByGroups(Keyword, UsingSelf("root"), NameFunction, UsingSelf("root"), UsingSelf("root"), Punctuation), nil}, + Default(Push("statement")), + }, + "classname": { + {`(\[\[.+\]\])(\s*)`, ByGroups(NameAttribute, Text), nil}, + {`[a-zA-Z_]\w*`, NameClass, Pop(1)}, + {`\s*(?=[>{])`, Text, Pop(1)}, + }, + "whitespace": { + {`^#if\s+0`, CommentPreproc, Push("if0")}, + {`^#`, CommentPreproc, Push("macro")}, + {`^(\s*(?:/[*].*?[*]/\s*)?)(#if\s+0)`, ByGroups(UsingSelf("root"), CommentPreproc), Push("if0")}, + {`^(\s*(?:/[*].*?[*]/\s*)?)(#)`, ByGroups(UsingSelf("root"), CommentPreproc), Push("macro")}, + {`\n`, Text, nil}, + {`\s+`, Text, nil}, + {`\\\n`, Text, nil}, + {`//(\n|[\w\W]*?[^\\]\n)`, CommentSingle, nil}, + {`/(\\\n)?[*][\w\W]*?[*](\\\n)?/`, CommentMultiline, nil}, + {`/(\\\n)?[*][\w\W]*`, CommentMultiline, nil}, + }, + "statement": { + Include("whitespace"), + Include("statements"), + {`[{]`, Punctuation, Push("root")}, + {`[;}]`, Punctuation, Pop(1)}, + }, + "function": { + Include("whitespace"), + Include("statements"), + {`;`, Punctuation, nil}, + {`\{`, Punctuation, Push()}, + {`\}`, Punctuation, Pop(1)}, + }, + "macro": { + {`(include)(\s*(?:/[*].*?[*]/\s*)?)([^\n]+)`, ByGroups(CommentPreproc, Text, CommentPreprocFile), nil}, + {`[^/\n]+`, CommentPreproc, nil}, + {`/[*](.|\n)*?[*]/`, CommentMultiline, nil}, + {`//.*?\n`, CommentSingle, Pop(1)}, + {`/`, CommentPreproc, nil}, + {`(?<=\\)\n`, CommentPreproc, nil}, + {`\n`, CommentPreproc, Pop(1)}, + }, + "if0": { + {`^\s*#if.*?(?=|>|!=)`, Operator, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/m/myghty.go b/vendor/github.com/alecthomas/chroma/lexers/m/myghty.go index 02a20ea..eac082c 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/m/myghty.go +++ b/vendor/github.com/alecthomas/chroma/lexers/m/myghty.go @@ -7,24 +7,28 @@ import ( ) // Myghty lexer. -var Myghty = internal.Register(MustNewLexer( +var Myghty = internal.Register(MustNewLazyLexer( &Config{ Name: "Myghty", Aliases: []string{"myghty"}, Filenames: []string{"*.myt", "autodelegate"}, MimeTypes: []string{"application/x-myghty"}, }, - Rules{ + myghtyRules, +)) + +func myghtyRules() Rules { + return Rules{ "root": { {`\s+`, Text, nil}, {`(<%(?:def|method))(\s*)(.*?)(>)(.*?)()(?s)`, ByGroups(NameTag, Text, NameFunction, NameTag, UsingSelf("root"), NameTag), nil}, - {`(<%\w+)(.*?)(>)(.*?)()(?s)`, ByGroups(NameTag, NameFunction, NameTag, Using(Python), NameTag), nil}, - {`(<&[^|])(.*?)(,.*?)?(&>)`, ByGroups(NameTag, NameFunction, Using(Python), NameTag), nil}, - {`(<&\|)(.*?)(,.*?)?(&>)(?s)`, ByGroups(NameTag, NameFunction, Using(Python), 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(Python), NameTag), nil}, + {`(<%!?)(.*?)(%>)(?s)`, ByGroups(NameTag, Using(Python2), NameTag), nil}, {`(?<=^)#[^\n]*(\n|\Z)`, Comment, nil}, - {`(?<=^)(%)([^\n]*)(\n|\Z)`, ByGroups(NameTag, Using(Python), Other), nil}, + {`(?<=^)(%)([^\n]*)(\n|\Z)`, ByGroups(NameTag, Using(Python2), Other), nil}, {`(?sx) (.+?) # anything, followed by: (?: @@ -36,5 +40,5 @@ var Myghty = internal.Register(MustNewLexer( \Z # end of string )`, ByGroups(Other, Operator), nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/m/mysql.go b/vendor/github.com/alecthomas/chroma/lexers/m/mysql.go index 9f47e32..2738628 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/m/mysql.go +++ b/vendor/github.com/alecthomas/chroma/lexers/m/mysql.go @@ -1,12 +1,19 @@ package m import ( + "regexp" + . "github.com/alecthomas/chroma" // nolint "github.com/alecthomas/chroma/lexers/internal" ) +var ( + mysqlAnalyserNameBetweenBacktickRe = regexp.MustCompile("`[a-zA-Z_]\\w*`") + mysqlAnalyserNameBetweenBracketRe = regexp.MustCompile(`\[[a-zA-Z_]\w*\]`) +) + // MySQL lexer. -var MySQL = internal.Register(MustNewLexer( +var MySQL = internal.Register(MustNewLazyLexer( &Config{ Name: "MySQL", Aliases: []string{"mysql"}, @@ -15,9 +22,31 @@ var MySQL = internal.Register(MustNewLexer( NotMultiline: true, CaseInsensitive: true, }, - Rules{ + mySQLRules, +).SetAnalyser(func(text string) float32 { + nameBetweenBacktickCount := len(mysqlAnalyserNameBetweenBacktickRe.FindAllString(text, -1)) + nameBetweenBracketCount := len(mysqlAnalyserNameBetweenBracketRe.FindAllString(text, -1)) + + var result float32 + + // Same logic as above in the TSQL analysis. + dialectNameCount := nameBetweenBacktickCount + nameBetweenBracketCount + if dialectNameCount >= 1 && nameBetweenBacktickCount >= (2*nameBetweenBracketCount) { + // Found at least twice as many `name` as [name]. + result += 0.5 + } else if nameBetweenBacktickCount > nameBetweenBracketCount { + result += 0.2 + } else if nameBetweenBacktickCount > 0 { + result += 0.1 + } + + return result +})) + +func mySQLRules() Rules { + return Rules{ "root": { - {`\s+`, Text, nil}, + {`\s+`, TextWhitespace, nil}, {`(#|--\s+).*\n?`, CommentSingle, nil}, {`/\*`, CommentMultiline, Push("multiline-comments")}, {`[0-9]+`, LiteralNumberInteger, nil}, @@ -25,11 +54,11 @@ var MySQL = internal.Register(MustNewLexer( {`((?:_[a-z0-9]+)?)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("string")}, {`((?:_[a-z0-9]+)?)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("double-string")}, {"[+*/<>=~!@#%^&|`?-]", Operator, nil}, - {`\b(tinyint|smallint|mediumint|int|integer|bigint|date|datetime|time|bit|bool|tinytext|mediumtext|longtext|text|tinyblob|mediumblob|longblob|blob|float|double|double\s+precision|real|numeric|dec|decimal|timestamp|year|char|varchar|varbinary|varcharacter|enum|set)(\b\s*)(\()?`, ByGroups(KeywordType, Text, Punctuation), nil}, + {`\b(tinyint|smallint|mediumint|int|integer|bigint|date|datetime|time|bit|bool|tinytext|mediumtext|longtext|text|tinyblob|mediumblob|longblob|blob|float|double|double\s+precision|real|numeric|dec|decimal|timestamp|year|char|varchar|varbinary|varcharacter|enum|set)(\b\s*)(\()?`, ByGroups(KeywordType, TextWhitespace, Punctuation), nil}, {`\b(add|all|alter|analyze|and|as|asc|asensitive|before|between|bigint|binary|blob|both|by|call|cascade|case|change|char|character|check|collate|column|condition|constraint|continue|convert|create|cross|current_date|current_time|current_timestamp|current_user|cursor|database|databases|day_hour|day_microsecond|day_minute|day_second|dec|decimal|declare|default|delayed|delete|desc|describe|deterministic|distinct|distinctrow|div|double|drop|dual|each|else|elseif|enclosed|escaped|exists|exit|explain|fetch|flush|float|float4|float8|for|force|foreign|from|fulltext|grant|group|having|high_priority|hour_microsecond|hour_minute|hour_second|identified|if|ignore|in|index|infile|inner|inout|insensitive|insert|int|int1|int2|int3|int4|int8|integer|interval|into|is|iterate|join|key|keys|kill|leading|leave|left|like|limit|lines|load|localtime|localtimestamp|lock|long|loop|low_priority|match|minute_microsecond|minute_second|mod|modifies|natural|no_write_to_binlog|not|numeric|on|optimize|option|optionally|or|order|out|outer|outfile|precision|primary|privileges|procedure|purge|raid0|read|reads|real|references|regexp|release|rename|repeat|replace|require|restrict|return|revoke|right|rlike|schema|schemas|second_microsecond|select|sensitive|separator|set|show|smallint|soname|spatial|specific|sql|sql_big_result|sql_calc_found_rows|sql_small_result|sqlexception|sqlstate|sqlwarning|ssl|starting|straight_join|table|terminated|then|to|trailing|trigger|undo|union|unique|unlock|unsigned|update|usage|use|user|using|utc_date|utc_time|utc_timestamp|values|varying|when|where|while|with|write|x509|xor|year_month|zerofill)\b`, Keyword, nil}, {`\b(auto_increment|engine|charset|tables)\b`, KeywordPseudo, nil}, {`(true|false|null)`, NameConstant, nil}, - {`([a-z_]\w*)(\s*)(\()`, ByGroups(NameFunction, Text, Punctuation), nil}, + {`([a-z_]\w*)(\s*)(\()`, ByGroups(NameFunction, TextWhitespace, Punctuation), nil}, {`[a-z_]\w*`, Name, nil}, {`@[a-z0-9]*[._]*[a-z0-9]*`, NameVariable, nil}, {`[;:()\[\],.]`, Punctuation, nil}, @@ -50,5 +79,5 @@ var MySQL = internal.Register(MustNewLexer( {`""`, LiteralStringDouble, nil}, {`"`, LiteralStringDouble, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/n/nasm.go b/vendor/github.com/alecthomas/chroma/lexers/n/nasm.go index d769d15..de6734e 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/n/nasm.go +++ b/vendor/github.com/alecthomas/chroma/lexers/n/nasm.go @@ -6,7 +6,7 @@ import ( ) // Nasm lexer. -var Nasm = internal.Register(MustNewLexer( +var Nasm = internal.Register(MustNewLazyLexer( &Config{ Name: "NASM", Aliases: []string{"nasm"}, @@ -14,7 +14,11 @@ var Nasm = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-nasm"}, CaseInsensitive: true, }, - Rules{ + nasmRules, +)) + +func nasmRules() Rules { + return Rules{ "root": { {`^\s*%`, CommentPreproc, Push("preproc")}, Include("whitespace"), @@ -55,5 +59,5 @@ var Nasm = internal.Register(MustNewLexer( {`seg|wrt|strict`, OperatorWord, nil}, {`byte|[dq]?word`, KeywordType, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/n/newspeak.go b/vendor/github.com/alecthomas/chroma/lexers/n/newspeak.go index 1a6a37b..c9d3ae0 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/n/newspeak.go +++ b/vendor/github.com/alecthomas/chroma/lexers/n/newspeak.go @@ -6,14 +6,18 @@ import ( ) // Newspeak lexer. -var Newspeak = internal.Register(MustNewLexer( +var Newspeak = internal.Register(MustNewLazyLexer( &Config{ Name: "Newspeak", Aliases: []string{"newspeak"}, Filenames: []string{"*.ns2"}, MimeTypes: []string{"text/x-newspeak"}, }, - Rules{ + newspeakRules, +)) + +func newspeakRules() Rules { + return Rules{ "root": { {`\b(Newsqueak2)\b`, KeywordDeclaration, nil}, {`'[^']*'`, LiteralString, nil}, @@ -51,5 +55,5 @@ var Newspeak = internal.Register(MustNewLexer( {`\s+`, Text, nil}, {`"[^"]*"`, Comment, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/n/nginx.go b/vendor/github.com/alecthomas/chroma/lexers/n/nginx.go index 840d100..6d80523 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/n/nginx.go +++ b/vendor/github.com/alecthomas/chroma/lexers/n/nginx.go @@ -6,14 +6,18 @@ import ( ) // Nginx Configuration File lexer. -var Nginx = internal.Register(MustNewLexer( +var Nginx = internal.Register(MustNewLazyLexer( &Config{ Name: "Nginx configuration file", Aliases: []string{"nginx"}, Filenames: []string{"nginx.conf"}, MimeTypes: []string{"text/x-nginx-conf"}, }, - Rules{ + nginxRules, +)) + +func nginxRules() Rules { + return Rules{ "root": { {`(include)(\s+)([^\s;]+)`, ByGroups(Keyword, Text, Name), nil}, {`[^\s;#]+`, Keyword, Push("stmt")}, @@ -43,5 +47,5 @@ var Nginx = internal.Register(MustNewLexer( {`\s+`, Text, nil}, {`[$;]`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/n/nim.go b/vendor/github.com/alecthomas/chroma/lexers/n/nim.go index b08c2f9..3f98086 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/n/nim.go +++ b/vendor/github.com/alecthomas/chroma/lexers/n/nim.go @@ -6,7 +6,7 @@ import ( ) // Nim lexer. -var Nim = internal.Register(MustNewLexer( +var Nim = internal.Register(MustNewLazyLexer( &Config{ Name: "Nim", Aliases: []string{"nim", "nimrod"}, @@ -14,7 +14,11 @@ var Nim = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-nim"}, CaseInsensitive: true, }, - Rules{ + nimRules, +)) + +func nimRules() Rules { + return Rules{ "root": { {`#\[[\s\S]*?\]#`, CommentMultiline, nil}, {`##.*$`, LiteralStringDoc, nil}, @@ -89,5 +93,5 @@ var Nim = internal.Register(MustNewLexer( {`\'i(8|16)`, LiteralNumberInteger, nil}, Default(Pop(1)), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/n/nix.go b/vendor/github.com/alecthomas/chroma/lexers/n/nix.go index 7e21dd7..874560a 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/n/nix.go +++ b/vendor/github.com/alecthomas/chroma/lexers/n/nix.go @@ -7,18 +7,22 @@ import ( "github.com/alecthomas/chroma/lexers/internal" ) -// nixb matches right boundary of a nix word. Use it instead of \b. -const nixb = `(?![a-zA-Z0-9_'-])` - // Nix lexer. -var Nix = internal.Register(MustNewLexer( +var Nix = internal.Register(MustNewLazyLexer( &Config{ Name: "Nix", Aliases: []string{"nixos", "nix"}, Filenames: []string{"*.nix"}, MimeTypes: []string{"text/x-nix"}, }, - Rules{ + nixRules, +)) + +func nixRules() Rules { + // nixb matches right boundary of a nix word. Use it instead of \b. + const nixb = `(?![a-zA-Z0-9_'-])` + + return Rules{ "root": { Include("keywords"), Include("builtins"), @@ -118,5 +122,5 @@ var Nix = internal.Register(MustNewLexer( "space": { {`[ \t\r\n]+`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/o/objectivec.go b/vendor/github.com/alecthomas/chroma/lexers/o/objectivec.go index e3d0b1c..0ae3029 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/o/objectivec.go +++ b/vendor/github.com/alecthomas/chroma/lexers/o/objectivec.go @@ -6,14 +6,18 @@ import ( ) // Objective-C lexer. -var ObjectiveC = internal.Register(MustNewLexer( +var ObjectiveC = internal.Register(MustNewLazyLexer( &Config{ Name: "Objective-C", Aliases: []string{"objective-c", "objectivec", "obj-c", "objc"}, Filenames: []string{"*.m", "*.h"}, MimeTypes: []string{"text/x-objective-c"}, }, - Rules{ + objectiveCRules, +)) + +func objectiveCRules() Rules { + return Rules{ "statements": { {`@"`, LiteralString, Push("string")}, {`@(YES|NO)`, LiteralNumber, nil}, @@ -161,5 +165,5 @@ var ObjectiveC = internal.Register(MustNewLexer( {`^\s*#endif.*?(?]*)(>)", ByGroups(Punctuation, CommentPreprocFile, Punctuation), nil}, Default(Pop(1)), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/o/org.go b/vendor/github.com/alecthomas/chroma/lexers/o/org.go index 1064eaf..00f6df4 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/o/org.go +++ b/vendor/github.com/alecthomas/chroma/lexers/o/org.go @@ -6,14 +6,18 @@ import ( ) // Org mode lexer. -var Org = internal.Register(MustNewLexer( +var Org = internal.Register(MustNewLazyLexer( &Config{ Name: "Org Mode", Aliases: []string{"org", "orgmode"}, Filenames: []string{"*.org"}, MimeTypes: []string{"text/org"}, // https://lists.gnu.org/r/emacs-orgmode/2017-09/msg00087.html }, - Rules{ + orgRules, +)) + +func orgRules() Rules { + return Rules{ "root": { {`^# .*$`, Comment, nil}, // Headings @@ -45,7 +49,8 @@ var Org = internal.Register(MustNewLexer( // - Comment Blocks {`(?i)^( *#\+begin_comment *\n)([\w\W]*?)(^ *#\+end_comment *$)`, ByGroups(Comment, Comment, Comment), nil}, // - Src Blocks - {`(?i)^( *#\+begin_src )([^ \n]+)(.*?\n)([\w\W]*?)(^ *#\+end_src *$)`, + { + `(?i)^( *#\+begin_src )([^ \n]+)(.*?\n)([\w\W]*?)(^ *#\+end_src *$)`, UsingByGroup( internal.Get, 2, 4, @@ -54,7 +59,8 @@ var Org = internal.Register(MustNewLexer( nil, }, // - Export Blocks - {`(?i)^( *#\+begin_export )(\w+)( *\n)([\w\W]*?)(^ *#\+end_export *$)`, + { + `(?i)^( *#\+begin_export )(\w+)( *\n)([\w\W]*?)(^ *#\+end_export *$)`, UsingByGroup( internal.Get, 2, 4, @@ -98,5 +104,5 @@ var Org = internal.Register(MustNewLexer( // Any other text {`.`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/pacman.go b/vendor/github.com/alecthomas/chroma/lexers/p/pacman.go index 807b67c..00c6255 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/p/pacman.go +++ b/vendor/github.com/alecthomas/chroma/lexers/p/pacman.go @@ -6,14 +6,18 @@ import ( ) // Pacmanconf lexer. -var Pacmanconf = internal.Register(MustNewLexer( +var Pacmanconf = internal.Register(MustNewLazyLexer( &Config{ Name: "PacmanConf", Aliases: []string{"pacmanconf"}, Filenames: []string{"pacman.conf"}, MimeTypes: []string{}, }, - Rules{ + pacmanconfRules, +)) + +func pacmanconfRules() Rules { + return Rules{ "root": { {`#.*$`, CommentSingle, nil}, {`^\s*\[.*?\]\s*$`, Keyword, nil}, @@ -22,5 +26,5 @@ var Pacmanconf = internal.Register(MustNewLexer( {Words(``, `\b`, `$repo`, `$arch`, `%o`, `%u`), NameVariable, nil}, {`.`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/perl.go b/vendor/github.com/alecthomas/chroma/lexers/p/perl.go index 0a2b35b..6aa338a 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/p/perl.go +++ b/vendor/github.com/alecthomas/chroma/lexers/p/perl.go @@ -6,7 +6,7 @@ import ( ) // Perl lexer. -var Perl = internal.Register(MustNewLexer( +var Perl = internal.Register(MustNewLazyLexer( &Config{ Name: "Perl", Aliases: []string{"perl", "pl"}, @@ -14,7 +14,11 @@ var Perl = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-perl", "application/x-perl"}, DotAll: true, }, - Rules{ + perlRules, +)) + +func perlRules() Rules { + return Rules{ "balanced-regex": { {`/(\\\\|\\[^\\]|[^\\/])*/[egimosx]*`, LiteralStringRegex, Pop(1)}, {`!(\\\\|\\[^\\]|[^\\!])*![egimosx]*`, LiteralStringRegex, Pop(1)}, @@ -134,5 +138,5 @@ var Perl = internal.Register(MustNewLexer( "end-part": { {`.+`, CommentPreproc, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/pig.go b/vendor/github.com/alecthomas/chroma/lexers/p/pig.go index 0dbc591..f2852c1 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/p/pig.go +++ b/vendor/github.com/alecthomas/chroma/lexers/p/pig.go @@ -6,7 +6,7 @@ import ( ) // Pig lexer. -var Pig = internal.Register(MustNewLexer( +var Pig = internal.Register(MustNewLazyLexer( &Config{ Name: "Pig", Aliases: []string{"pig"}, @@ -14,7 +14,11 @@ var Pig = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-pig"}, CaseInsensitive: true, }, - Rules{ + pigRules, +)) + +func pigRules() Rules { + return Rules{ "root": { {`\s+`, Text, nil}, {`--.*`, Comment, nil}, @@ -53,5 +57,5 @@ var Pig = internal.Register(MustNewLexer( {`(eq|gt|lt|gte|lte|neq|matches)\b`, Operator, nil}, {`(==|<=|<|>=|>|!=)`, Operator, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/pkgconfig.go b/vendor/github.com/alecthomas/chroma/lexers/p/pkgconfig.go index 0a4872e..9e02410 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/p/pkgconfig.go +++ b/vendor/github.com/alecthomas/chroma/lexers/p/pkgconfig.go @@ -6,14 +6,18 @@ import ( ) // Pkgconfig lexer. -var Pkgconfig = internal.Register(MustNewLexer( +var Pkgconfig = internal.Register(MustNewLazyLexer( &Config{ Name: "PkgConfig", Aliases: []string{"pkgconfig"}, Filenames: []string{"*.pc"}, MimeTypes: []string{}, }, - Rules{ + pkgconfigRules, +)) + +func pkgconfigRules() Rules { + return Rules{ "root": { {`#.*$`, CommentSingle, nil}, {`^(\w+)(=)`, ByGroups(NameAttribute, Operator), nil}, @@ -37,5 +41,5 @@ var Pkgconfig = internal.Register(MustNewLexer( {`[^${}#\n]+`, Text, nil}, {`.`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/plaintext.go b/vendor/github.com/alecthomas/chroma/lexers/p/plaintext.go index 7b25293..058c02a 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/p/plaintext.go +++ b/vendor/github.com/alecthomas/chroma/lexers/p/plaintext.go @@ -5,7 +5,7 @@ import ( "github.com/alecthomas/chroma/lexers/internal" ) -var Plaintext = internal.Register(MustNewLexer( +var Plaintext = internal.Register(MustNewLazyLexer( &Config{ Name: "plaintext", Aliases: []string{"text", "plain", "no-highlight"}, diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/plsql.go b/vendor/github.com/alecthomas/chroma/lexers/p/plsql.go index a6068fd..324d3fe 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/p/plsql.go +++ b/vendor/github.com/alecthomas/chroma/lexers/p/plsql.go @@ -6,7 +6,7 @@ import ( ) // Pl/Pgsql lexer. -var PLpgSQL = internal.Register(MustNewLexer( +var PLpgSQL = internal.Register(MustNewLazyLexer( &Config{ Name: "PL/pgSQL", Aliases: []string{"plpgsql"}, @@ -15,13 +15,17 @@ var PLpgSQL = internal.Register(MustNewLexer( NotMultiline: true, CaseInsensitive: true, }, - Rules{ + plpgSQLRules, +)) + +func plpgSQLRules() Rules { + return Rules{ "root": { {`\%[a-z]\w*\b`, NameBuiltin, nil}, {`:=`, Operator, nil}, {`\<\<[a-z]\w*\>\>`, NameLabel, nil}, {`\#[a-z]\w*\b`, KeywordPseudo, nil}, - {`\s+`, Text, nil}, + {`\s+`, TextWhitespace, 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}, @@ -54,5 +58,5 @@ var PLpgSQL = internal.Register(MustNewLexer( {`""`, LiteralStringName, nil}, {`"`, LiteralStringName, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/pony.go b/vendor/github.com/alecthomas/chroma/lexers/p/pony.go new file mode 100644 index 0000000..41d5682 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/p/pony.go @@ -0,0 +1,63 @@ +package p + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// Pony lexer. +var Pony = internal.Register(MustNewLazyLexer( + &Config{ + Name: "Pony", + Aliases: []string{"pony"}, + Filenames: []string{"*.pony"}, + MimeTypes: []string{}, + }, + ponyRules, +)) + +func ponyRules() Rules { + return Rules{ + "root": { + {`\n`, Text, nil}, + {`[^\S\n]+`, Text, nil}, + {`//.*\n`, CommentSingle, nil}, + {`/\*`, CommentMultiline, Push("nested_comment")}, + {`"""(?:.|\n)*?"""`, LiteralStringDoc, nil}, + {`"`, LiteralString, Push("string")}, + {`\'.*\'`, LiteralStringChar, nil}, + {`=>|[]{}:().~;,|&!^?[]`, Punctuation, nil}, + {Words(``, `\b`, `addressof`, `and`, `as`, `consume`, `digestof`, `is`, `isnt`, `not`, `or`), OperatorWord, nil}, + {`!=|==|<<|>>|[-+/*%=<>]`, Operator, nil}, + {Words(``, `\b`, `box`, `break`, `compile_error`, `compile_intrinsic`, `continue`, `do`, `else`, `elseif`, `embed`, `end`, `error`, `for`, `if`, `ifdef`, `in`, `iso`, `lambda`, `let`, `match`, `object`, `recover`, `ref`, `repeat`, `return`, `tag`, `then`, `this`, `trn`, `try`, `until`, `use`, `var`, `val`, `where`, `while`, `with`, `#any`, `#read`, `#send`, `#share`), Keyword, nil}, + {`(actor|class|struct|primitive|interface|trait|type)((?:\s)+)`, ByGroups(Keyword, Text), Push("typename")}, + {`(new|fun|be)((?:\s)+)`, ByGroups(Keyword, Text), Push("methodname")}, + {Words(``, `\b`, `U8`, `U16`, `U32`, `U64`, `ULong`, `USize`, `U128`, `Unsigned`, `Stringable`, `String`, `StringBytes`, `StringRunes`, `InputNotify`, `InputStream`, `Stdin`, `ByteSeq`, `ByteSeqIter`, `OutStream`, `StdStream`, `SourceLoc`, `I8`, `I16`, `I32`, `I64`, `ILong`, `ISize`, `I128`, `Signed`, `Seq`, `RuntimeOptions`, `Real`, `Integer`, `SignedInteger`, `UnsignedInteger`, `FloatingPoint`, `Number`, `Int`, `ReadSeq`, `ReadElement`, `Pointer`, `Platform`, `NullablePointer`, `None`, `Iterator`, `F32`, `F64`, `Float`, `Env`, `DoNotOptimise`, `DisposableActor`, `Less`, `Equal`, `Greater`, `Compare`, `HasEq`, `Equatable`, `Comparable`, `Bool`, `AsioEventID`, `AsioEventNotify`, `AsioEvent`, `Array`, `ArrayKeys`, `ArrayValues`, `ArrayPairs`, `Any`, `AmbientAuth`), KeywordType, nil}, + {`_?[A-Z]\w*`, NameClass, nil}, + {`string\(\)`, NameOther, nil}, + {`(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+`, LiteralNumberFloat, nil}, + {`0x[0-9a-fA-F]+`, LiteralNumberHex, nil}, + {`\d+`, LiteralNumberInteger, nil}, + {`(true|false)\b`, Keyword, nil}, + {`_\d*`, Name, nil}, + {`_?[a-z][\w\'_]*`, Name, nil}, + }, + "typename": { + {`(iso|trn|ref|val|box|tag)?((?:\s)*)(_?[A-Z]\w*)`, ByGroups(Keyword, Text, NameClass), Pop(1)}, + }, + "methodname": { + {`(iso|trn|ref|val|box|tag)?((?:\s)*)(_?[a-z]\w*)`, ByGroups(Keyword, Text, NameFunction), Pop(1)}, + }, + "nested_comment": { + {`[^*/]+`, CommentMultiline, nil}, + {`/\*`, CommentMultiline, Push()}, + {`\*/`, CommentMultiline, Pop(1)}, + {`[*/]`, CommentMultiline, nil}, + }, + "string": { + {`"`, LiteralString, Pop(1)}, + {`\\"`, LiteralString, nil}, + {`[^\\"]+`, LiteralString, nil}, + }, + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/postgres.go b/vendor/github.com/alecthomas/chroma/lexers/p/postgres.go index 3afa54d..8977e2c 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/p/postgres.go +++ b/vendor/github.com/alecthomas/chroma/lexers/p/postgres.go @@ -6,7 +6,7 @@ import ( ) // Postgresql Sql Dialect lexer. -var PostgreSQL = internal.Register(MustNewLexer( +var PostgreSQL = internal.Register(MustNewLazyLexer( &Config{ Name: "PostgreSQL SQL dialect", Aliases: []string{"postgresql", "postgres"}, @@ -15,13 +15,18 @@ var PostgreSQL = internal.Register(MustNewLexer( NotMultiline: true, CaseInsensitive: true, }, - Rules{ + 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)(\$)`, + { + `(?s)(DO)(\s+)(?:(LANGUAGE)?(\s+)('?)(\w+)?('?)(\s+))?(\$)([^$]*)(\$)(.*?)(\$)(\10)(\$)`, UsingByGroup( internal.Get, 6, 12, @@ -41,7 +46,8 @@ var PostgreSQL = internal.Register(MustNewLexer( {`[0-9]+`, LiteralNumberInteger, nil}, {`((?:E|U&)?)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("string")}, {`((?:U&)?)(")`, ByGroups(LiteralStringAffix, LiteralStringName), Push("quoted-ident")}, - {`(?s)(\$)([^$]*)(\$)(.*?)(\$)(\2)(\$)(\s+)(LANGUAGE)?(\s+)('?)(\w+)?('?)`, + { + `(?s)(\$)([^$]*)(\$)(.*?)(\$)(\2)(\$)(\s+)(LANGUAGE)?(\s+)('?)(\w+)?('?)`, UsingByGroup(internal.Get, 12, 4, StringHeredoc, StringHeredoc, StringHeredoc, // $tag$ @@ -73,5 +79,5 @@ var PostgreSQL = internal.Register(MustNewLexer( {`""`, LiteralStringName, nil}, {`"`, LiteralStringName, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/postscript.go b/vendor/github.com/alecthomas/chroma/lexers/p/postscript.go index 0cfa3a5..0b51ba5 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/p/postscript.go +++ b/vendor/github.com/alecthomas/chroma/lexers/p/postscript.go @@ -6,14 +6,18 @@ import ( ) // Postscript lexer. -var Postscript = internal.Register(MustNewLexer( +var Postscript = internal.Register(MustNewLazyLexer( &Config{ Name: "PostScript", Aliases: []string{"postscript", "postscr"}, Filenames: []string{"*.ps", "*.eps"}, MimeTypes: []string{"application/postscript"}, }, - Rules{ + postscriptRules, +)) + +func postscriptRules() Rules { + return Rules{ "root": { {`^%!.+\n`, CommentPreproc, nil}, {`%%.*\n`, CommentSpecial, nil}, @@ -42,5 +46,5 @@ var Postscript = internal.Register(MustNewLexer( {`[0-8]{3}|n|r|t|b|f|\\|\(|\)`, LiteralStringEscape, Pop(1)}, Default(Pop(1)), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/povray.go b/vendor/github.com/alecthomas/chroma/lexers/p/povray.go index 6f1bb52..2d870f1 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/p/povray.go +++ b/vendor/github.com/alecthomas/chroma/lexers/p/povray.go @@ -6,14 +6,18 @@ import ( ) // Povray lexer. -var Povray = internal.Register(MustNewLexer( +var Povray = internal.Register(MustNewLazyLexer( &Config{ Name: "POVRay", Aliases: []string{"pov"}, Filenames: []string{"*.pov", "*.inc"}, MimeTypes: []string{"text/x-povray"}, }, - Rules{ + povrayRules, +)) + +func povrayRules() Rules { + return Rules{ "root": { {`/\*[\w\W]*?\*/`, CommentMultiline, nil}, {`//.*\n`, CommentSingle, nil}, @@ -31,5 +35,5 @@ var Povray = internal.Register(MustNewLexer( {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, {`\s+`, Text, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/powerquery.go b/vendor/github.com/alecthomas/chroma/lexers/p/powerquery.go new file mode 100644 index 0000000..0302420 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/p/powerquery.go @@ -0,0 +1,38 @@ +package p + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// PowerQuery lexer. +var PowerQuery = internal.Register(MustNewLazyLexer( + &Config{ + Name: "PowerQuery", + Aliases: []string{"powerquery", "pq"}, + Filenames: []string{"*.pq"}, + MimeTypes: []string{"text/x-powerquery"}, + DotAll: true, + CaseInsensitive: true, + }, + powerqueryRules, +)) + +func powerqueryRules() Rules { + return Rules{ + "root": { + {`\s+`, Text, nil}, + {`//.*?\n`, CommentSingle, nil}, + {`/\*.*?\*/`, CommentMultiline, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + {`(and|as|each|else|error|false|if|in|is|let|meta|not|null|or|otherwise|section|shared|then|true|try|type)\b`, Keyword, nil}, + {`(#binary|#date|#datetime|#datetimezone|#duration|#infinity|#nan|#sections|#shared|#table|#time)\b`, KeywordType, nil}, + {`(([a-zA-Z]|_)[\w|._]*|#"[^"]+")`, Name, nil}, + {`0[xX][0-9a-fA-F][0-9a-fA-F_]*[lL]?`, LiteralNumberHex, nil}, + {`([0-9]+\.[0-9]+|\.[0-9]+)([eE][0-9]+)?`, LiteralNumberFloat, nil}, + {`[0-9]+`, LiteralNumberInteger, nil}, + {`[\(\)\[\]\{\}]`, Punctuation, nil}, + {`\.\.|\.\.\.|=>|<=|>=|<>|[@!?,;=<>\+\-\*\/&]`, Operator, nil}, + }, + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/powershell.go b/vendor/github.com/alecthomas/chroma/lexers/p/powershell.go index 10eba4f..9b7b56e 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/p/powershell.go +++ b/vendor/github.com/alecthomas/chroma/lexers/p/powershell.go @@ -6,16 +6,20 @@ import ( ) // Powershell lexer. -var Powershell = internal.Register(MustNewLexer( +var Powershell = internal.Register(MustNewLazyLexer( &Config{ Name: "PowerShell", - Aliases: []string{"powershell", "posh", "ps1", "psm1"}, - Filenames: []string{"*.ps1", "*.psm1"}, + Aliases: []string{"powershell", "posh", "ps1", "psm1", "psd1"}, + Filenames: []string{"*.ps1", "*.psm1", "*.psd1"}, MimeTypes: []string{"text/x-powershell"}, DotAll: true, CaseInsensitive: true, }, - Rules{ + powershellRules, +)) + +func powershellRules() Rules { + return Rules{ "root": { {`\(`, Punctuation, Push("child")}, {`\s+`, Text, nil}, @@ -29,9 +33,9 @@ var Powershell = internal.Register(MustNewLexer( {`"`, LiteralStringDouble, Push("string")}, {`'([^']|'')*'`, LiteralStringSingle, nil}, {`(\$|@@|@)((global|script|private|env):)?\w+`, NameVariable, nil}, + {`[a-z]\w*-[a-z]\w*\b`, NameBuiltin, nil}, {`(while|validateset|validaterange|validatepattern|validatelength|validatecount|until|trap|switch|return|ref|process|param|parameter|in|if|global:|function|foreach|for|finally|filter|end|elseif|else|dynamicparam|do|default|continue|cmdletbinding|break|begin|alias|\?|%|#script|#private|#local|#global|mandatory|parametersetname|position|valuefrompipeline|valuefrompipelinebypropertyname|valuefromremainingarguments|helpmessage|try|catch|throw)\b`, Keyword, nil}, {`-(and|as|band|bnot|bor|bxor|casesensitive|ccontains|ceq|cge|cgt|cle|clike|clt|cmatch|cne|cnotcontains|cnotlike|cnotmatch|contains|creplace|eq|exact|f|file|ge|gt|icontains|ieq|ige|igt|ile|ilike|ilt|imatch|ine|inotcontains|inotlike|inotmatch|ireplace|is|isnot|le|like|lt|match|ne|not|notcontains|notlike|notmatch|or|regex|replace|wildcard)\b`, Operator, nil}, - {`(write|where|watch|wait|use|update|unregister|unpublish|unprotect|unlock|uninstall|undo|unblock|trace|test|tee|take|sync|switch|suspend|submit|stop|step|start|split|sort|skip|show|set|send|select|search|scroll|save|revoke|resume|restore|restart|resolve|resize|reset|request|repair|rename|remove|register|redo|receive|read|push|publish|protect|pop|ping|out|optimize|open|new|move|mount|merge|measure|lock|limit|join|invoke|install|initialize|import|hide|group|grant|get|format|foreach|find|export|expand|exit|enter|enable|edit|dismount|disconnect|disable|deny|debug|cxnew|copy|convertto|convertfrom|convert|connect|confirm|compress|complete|compare|close|clear|checkpoint|block|backup|assert|approve|aggregate|add)-[a-z_]\w*\b`, NameBuiltin, nil}, {`(ac|asnp|cat|cd|cfs|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|curl|cvpa|dbp|del|diff|dir|dnsn|ebp|echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fhx|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps|gpv|group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md|measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri|rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|wget|where|wjb|write)\s`, NameBuiltin, nil}, {"\\[[a-z_\\[][\\w. `,\\[\\]]*\\]", NameConstant, nil}, {`-[a-z_]\w*`, Name, nil}, @@ -62,5 +66,5 @@ var Powershell = internal.Register(MustNewLexer( {`[^@\n]+"]`, LiteralStringHeredoc, nil}, {`.`, LiteralStringHeredoc, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/prolog.go b/vendor/github.com/alecthomas/chroma/lexers/p/prolog.go index 08b4812..a2f346b 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/p/prolog.go +++ b/vendor/github.com/alecthomas/chroma/lexers/p/prolog.go @@ -6,14 +6,18 @@ import ( ) // Prolog lexer. -var Prolog = internal.Register(MustNewLexer( +var Prolog = internal.Register(MustNewLazyLexer( &Config{ Name: "Prolog", Aliases: []string{"prolog"}, Filenames: []string{"*.ecl", "*.prolog", "*.pro", "*.pl"}, MimeTypes: []string{"text/x-prolog"}, }, - Rules{ + prologRules, +)) + +func prologRules() Rules { + return Rules{ "root": { {`/\*`, CommentMultiline, Push("nested-comment")}, {`%.*`, CommentSingle, nil}, @@ -46,5 +50,5 @@ var Prolog = internal.Register(MustNewLexer( {`[^*/]+`, CommentMultiline, nil}, {`[*/]`, CommentMultiline, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/promql.go b/vendor/github.com/alecthomas/chroma/lexers/p/promql.go new file mode 100644 index 0000000..e80b926 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/p/promql.go @@ -0,0 +1,59 @@ +package p + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// Promql lexer. +var Promql = internal.Register(MustNewLazyLexer( + &Config{ + Name: "PromQL", + Aliases: []string{"promql"}, + Filenames: []string{"*.promql"}, + MimeTypes: []string{}, + }, + promqlRules, +)) + +func promqlRules() Rules { + return Rules{ + "root": { + {`\n`, TextWhitespace, nil}, + {`\s+`, TextWhitespace, nil}, + {`,`, Punctuation, nil}, + {Words(``, `\b`, `bool`, `by`, `group_left`, `group_right`, `ignoring`, `offset`, `on`, `without`), Keyword, nil}, + {Words(``, `\b`, `sum`, `min`, `max`, `avg`, `group`, `stddev`, `stdvar`, `count`, `count_values`, `bottomk`, `topk`, `quantile`), Keyword, nil}, + {Words(``, `\b`, `abs`, `absent`, `absent_over_time`, `avg_over_time`, `ceil`, `changes`, `clamp_max`, `clamp_min`, `count_over_time`, `day_of_month`, `day_of_week`, `days_in_month`, `delta`, `deriv`, `exp`, `floor`, `histogram_quantile`, `holt_winters`, `hour`, `idelta`, `increase`, `irate`, `label_join`, `label_replace`, `ln`, `log10`, `log2`, `max_over_time`, `min_over_time`, `minute`, `month`, `predict_linear`, `quantile_over_time`, `rate`, `resets`, `round`, `scalar`, `sort`, `sort_desc`, `sqrt`, `stddev_over_time`, `stdvar_over_time`, `sum_over_time`, `time`, `timestamp`, `vector`, `year`), KeywordReserved, nil}, + {`[1-9][0-9]*[smhdwy]`, LiteralString, nil}, + {`-?[0-9]+\.[0-9]+`, LiteralNumberFloat, nil}, + {`-?[0-9]+`, LiteralNumberInteger, nil}, + {`#.*?$`, CommentSingle, nil}, + {`(\+|\-|\*|\/|\%|\^)`, Operator, nil}, + {`==|!=|>=|<=|<|>`, Operator, nil}, + {`and|or|unless`, OperatorWord, nil}, + {`[_a-zA-Z][a-zA-Z0-9_]+`, NameVariable, nil}, + {`(["\'])(.*?)(["\'])`, ByGroups(Punctuation, LiteralString, Punctuation), nil}, + {`\(`, Operator, Push("function")}, + {`\)`, Operator, nil}, + {`\{`, Punctuation, Push("labels")}, + {`\[`, Punctuation, Push("range")}, + }, + "labels": { + {`\}`, Punctuation, Pop(1)}, + {`\n`, TextWhitespace, nil}, + {`\s+`, TextWhitespace, nil}, + {`,`, Punctuation, nil}, + {`([_a-zA-Z][a-zA-Z0-9_]*?)(\s*?)(=~|!=|=|!~)(\s*?)("|')(.*?)("|')`, ByGroups(NameLabel, TextWhitespace, Operator, TextWhitespace, Punctuation, LiteralString, Punctuation), nil}, + }, + "range": { + {`\]`, Punctuation, Pop(1)}, + {`[1-9][0-9]*[smhdwy]`, LiteralString, nil}, + }, + "function": { + {`\)`, Operator, Pop(1)}, + {`\(`, Operator, Push()}, + Default(Pop(1)), + }, + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/protobuf.go b/vendor/github.com/alecthomas/chroma/lexers/p/protobuf.go index 3014013..76576cb 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/p/protobuf.go +++ b/vendor/github.com/alecthomas/chroma/lexers/p/protobuf.go @@ -6,14 +6,18 @@ import ( ) // ProtocolBuffer lexer. -var ProtocolBuffer = internal.Register(MustNewLexer( +var ProtocolBuffer = internal.Register(MustNewLazyLexer( &Config{ Name: "Protocol Buffer", Aliases: []string{"protobuf", "proto"}, Filenames: []string{"*.proto"}, MimeTypes: []string{}, }, - Rules{ + protocolBufferRules, +)) + +func protocolBufferRules() Rules { + return Rules{ "root": { {`[ \t]+`, Text, nil}, {`[,;{}\[\]()<>]`, Punctuation, nil}, @@ -49,5 +53,5 @@ var ProtocolBuffer = internal.Register(MustNewLexer( {`[a-zA-Z_]\w*`, Name, Pop(1)}, Default(Pop(1)), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/puppet.go b/vendor/github.com/alecthomas/chroma/lexers/p/puppet.go index a1db0d2..b32caed 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/p/puppet.go +++ b/vendor/github.com/alecthomas/chroma/lexers/p/puppet.go @@ -6,14 +6,18 @@ import ( ) // Puppet lexer. -var Puppet = internal.Register(MustNewLexer( +var Puppet = internal.Register(MustNewLazyLexer( &Config{ Name: "Puppet", Aliases: []string{"puppet"}, Filenames: []string{"*.pp"}, MimeTypes: []string{}, }, - Rules{ + puppetRules, +)) + +func puppetRules() Rules { + return Rules{ "root": { Include("comments"), Include("keywords"), @@ -52,5 +56,5 @@ var Puppet = internal.Register(MustNewLexer( {`"([^"])*"`, LiteralString, nil}, {`'(\\'|[^'])*'`, LiteralString, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/python.go b/vendor/github.com/alecthomas/chroma/lexers/p/python.go index 77f2c8d..b432a42 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/p/python.go +++ b/vendor/github.com/alecthomas/chroma/lexers/p/python.go @@ -6,112 +6,176 @@ import ( ) // Python lexer. -var Python = internal.Register(MustNewLexer( +var Python = internal.Register(MustNewLazyLexer( &Config{ Name: "Python", - Aliases: []string{"python", "py", "sage"}, - Filenames: []string{"*.py", "*.pyw", "*.sc", "SConstruct", "SConscript", "*.tac", "*.sage"}, - MimeTypes: []string{"text/x-python", "application/x-python"}, + Aliases: []string{"python", "py", "sage", "python3", "py3"}, + Filenames: []string{"*.py", "*.pyi", "*.pyw", "*.jy", "*.sage", "*.sc", "SConstruct", "SConscript", "*.bzl", "BUCK", "BUILD", "BUILD.bazel", "WORKSPACE", "*.tac"}, + MimeTypes: []string{"text/x-python", "application/x-python", "text/x-python3", "application/x-python3"}, }, - Rules{ + pythonRules, +)) + +func pythonRules() Rules { + const pythonIdentifier = `[A-Z_a-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶ-ͷͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮ-ٯٱ-ۓەۥ-ۦۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴ-ߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএ-ঐও-নপ-রলশ-হঽৎড়-ঢ়য়-ৡৰ-ৱৼਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽૐૠ-ૡૹଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽଡ଼-ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠ-ౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠ-ೡೱ-ೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาเ-ๆກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳱᳵ-ᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪ-ꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞹꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽ-ꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﱝﱤ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷹﹱﹳﹷﹹﹻﹽﹿ-ﻼA-Za-zヲ-ンᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ𐀀-𐀋𐀍-𐀦𐀨-𐀺𐀼-𐀽𐀿-𐁍𐁐-𐁝𐂀-𐃺𐅀-𐅴𐊀-𐊜𐊠-𐋐𐌀-𐌟𐌭-𐍊𐍐-𐍵𐎀-𐎝𐎠-𐏃𐏈-𐏏𐏑-𐏕𐐀-𐒝𐒰-𐓓𐓘-𐓻𐔀-𐔧𐔰-𐕣𐘀-𐜶𐝀-𐝕𐝠-𐝧𐠀-𐠅𐠈𐠊-𐠵𐠷-𐠸𐠼𐠿-𐡕𐡠-𐡶𐢀-𐢞𐣠-𐣲𐣴-𐣵𐤀-𐤕𐤠-𐤹𐦀-𐦷𐦾-𐦿𐨀𐨐-𐨓𐨕-𐨗𐨙-𐨵𐩠-𐩼𐪀-𐪜𐫀-𐫇𐫉-𐫤𐬀-𐬵𐭀-𐭕𐭠-𐭲𐮀-𐮑𐰀-𐱈𐲀-𐲲𐳀-𐳲𐴀-𐴣𐼀-𐼜𐼧𐼰-𐽅𑀃-𑀷𑂃-𑂯𑃐-𑃨𑄃-𑄦𑅄𑅐-𑅲𑅶𑆃-𑆲𑇁-𑇄𑇚𑇜𑈀-𑈑𑈓-𑈫𑊀-𑊆𑊈𑊊-𑊍𑊏-𑊝𑊟-𑊨𑊰-𑋞𑌅-𑌌𑌏-𑌐𑌓-𑌨𑌪-𑌰𑌲-𑌳𑌵-𑌹𑌽𑍐𑍝-𑍡𑐀-𑐴𑑇-𑑊𑒀-𑒯𑓄-𑓅𑓇𑖀-𑖮𑗘-𑗛𑘀-𑘯𑙄𑚀-𑚪𑜀-𑜚𑠀-𑠫𑢠-𑣟𑣿𑨀𑨋-𑨲𑨺𑩐𑩜-𑪃𑪆-𑪉𑪝𑫀-𑫸𑰀-𑰈𑰊-𑰮𑱀𑱲-𑲏𑴀-𑴆𑴈-𑴉𑴋-𑴰𑵆𑵠-𑵥𑵧-𑵨𑵪-𑶉𑶘𑻠-𑻲𒀀-𒎙𒐀-𒑮𒒀-𒕃𓀀-𓐮𔐀-𔙆𖠀-𖨸𖩀-𖩞𖫐-𖫭𖬀-𖬯𖭀-𖭃𖭣-𖭷𖭽-𖮏𖹀-𖹿𖼀-𖽄𖽐𖾓-𖾟𖿠-𖿡𗀀-𘟱𘠀-𘫲𛀀-𛄞𛅰-𛋻𛰀-𛱪𛱰-𛱼𛲀-𛲈𛲐-𛲙𝐀-𝑔𝑖-𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒹𝒻𝒽-𝓃𝓅-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔞-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕒-𝚥𝚨-𝛀𝛂-𝛚𝛜-𝛺𝛼-𝜔𝜖-𝜴𝜶-𝝎𝝐-𝝮𝝰-𝞈𝞊-𝞨𝞪-𝟂𝟄-𝟋𞠀-𞣄𞤀-𞥃𞸀-𞸃𞸅-𞸟𞸡-𞸢𞸤𞸧𞸩-𞸲𞸴-𞸷𞸹𞸻𞹂𞹇𞹉𞹋𞹍-𞹏𞹑-𞹒𞹔𞹗𞹙𞹛𞹝𞹟𞹡-𞹢𞹤𞹧-𞹪𞹬-𞹲𞹴-𞹷𞹹-𞹼𞹾𞺀-𞺉𞺋-𞺛𞺡-𞺣𞺥-𞺩𞺫-𞺻𠀀-𪛖𪜀-𫜴𫝀-𫠝𫠠-𬺡𬺰-𮯠丽-𪘀][0-9A-Z_a-zªµ·ºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶ-ͷͻ-ͽͿΆ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙՠ-ֈ֑-ֽֿׁ-ׂׄ-ׇׅא-תׯ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺ߽ࠀ-࠭ࡀ-࡛ࡠ-ࡪࢠ-ࢴࢶ-ࢽ࣓-ࣣ࣡-ॣ०-९ॱ-ঃঅ-ঌএ-ঐও-নপ-রলশ-হ়-ৄে-ৈো-ৎৗড়-ঢ়য়-ৣ০-ৱৼ৾ਁ-ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹ਼ਾ-ੂੇ-ੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ૹ-૿ଁ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହ଼-ୄେ-ୈୋ-୍ୖ-ୗଡ଼-ଢ଼ୟ-ୣ୦-୯ୱஂ-ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕ-ౖౘ-ౚౠ-ౣ౦-౯ಀ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕ-ೖೞೠ-ೣ೦-೯ೱ-ೲഀ-ഃഅ-ഌഎ-ഐഒ-ൄെ-ൈൊ-ൎൔ-ൗൟ-ൣ൦-൯ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲ-ෳก-ฺเ-๎๐-๙ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘-༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟፩-፱ᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲ-ᝳក-៓ៗៜ-៝០-៩᠋-᠍᠐-᠙ᠠ-ᡸᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧚ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿ᳐-᳔᳒-᳹ᴀ-᷹᷻-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿-⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙-゚ゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞹꟷ-ꠧꡀ-ꡳꢀ-ꣅ꣐-꣙꣠-ꣷꣻꣽ-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯪ꯬-꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﱝﱤ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷹ︀-️︠-︯︳-︴﹍-﹏ﹱﹳﹷﹹﹻﹽﹿ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ𐀀-𐀋𐀍-𐀦𐀨-𐀺𐀼-𐀽𐀿-𐁍𐁐-𐁝𐂀-𐃺𐅀-𐅴𐇽𐊀-𐊜𐊠-𐋐𐋠𐌀-𐌟𐌭-𐍊𐍐-𐍺𐎀-𐎝𐎠-𐏃𐏈-𐏏𐏑-𐏕𐐀-𐒝𐒠-𐒩𐒰-𐓓𐓘-𐓻𐔀-𐔧𐔰-𐕣𐘀-𐜶𐝀-𐝕𐝠-𐝧𐠀-𐠅𐠈𐠊-𐠵𐠷-𐠸𐠼𐠿-𐡕𐡠-𐡶𐢀-𐢞𐣠-𐣲𐣴-𐣵𐤀-𐤕𐤠-𐤹𐦀-𐦷𐦾-𐦿𐨀-𐨃𐨅-𐨆𐨌-𐨓𐨕-𐨗𐨙-𐨵𐨸-𐨿𐨺𐩠-𐩼𐪀-𐪜𐫀-𐫇𐫉-𐫦𐬀-𐬵𐭀-𐭕𐭠-𐭲𐮀-𐮑𐰀-𐱈𐲀-𐲲𐳀-𐳲𐴀-𐴧𐴰-𐴹𐼀-𐼜𐼧𐼰-𐽐𑀀-𑁆𑁦-𑁯𑁿-𑂺𑃐-𑃨𑃰-𑃹𑄀-𑄴𑄶-𑄿𑅄-𑅆𑅐-𑅳𑅶𑆀-𑇄𑇉-𑇌𑇐-𑇚𑇜𑈀-𑈑𑈓-𑈷𑈾𑊀-𑊆𑊈𑊊-𑊍𑊏-𑊝𑊟-𑊨𑊰-𑋪𑋰-𑋹𑌀-𑌃𑌅-𑌌𑌏-𑌐𑌓-𑌨𑌪-𑌰𑌲-𑌳𑌵-𑌹𑌻-𑍄𑍇-𑍈𑍋-𑍍𑍐𑍗𑍝-𑍣𑍦-𑍬𑍰-𑍴𑐀-𑑊𑑐-𑑙𑑞𑒀-𑓅𑓇𑓐-𑓙𑖀-𑖵𑖸-𑗀𑗘-𑗝𑘀-𑙀𑙄𑙐-𑙙𑚀-𑚷𑛀-𑛉𑜀-𑜚𑜝-𑜫𑜰-𑜹𑠀-𑠺𑢠-𑣩𑣿𑨀-𑨾𑩇𑩐-𑪃𑪆-𑪙𑪝𑫀-𑫸𑰀-𑰈𑰊-𑰶𑰸-𑱀𑱐-𑱙𑱲-𑲏𑲒-𑲧𑲩-𑲶𑴀-𑴆𑴈-𑴉𑴋-𑴶𑴺𑴼-𑴽𑴿-𑵇𑵐-𑵙𑵠-𑵥𑵧-𑵨𑵪-𑶎𑶐-𑶑𑶓-𑶘𑶠-𑶩𑻠-𑻶𒀀-𒎙𒐀-𒑮𒒀-𒕃𓀀-𓐮𔐀-𔙆𖠀-𖨸𖩀-𖩞𖩠-𖩩𖫐-𖫭𖫰-𖫴𖬀-𖬶𖭀-𖭃𖭐-𖭙𖭣-𖭷𖭽-𖮏𖹀-𖹿𖼀-𖽄𖽐-𖽾𖾏-𖾟𖿠-𖿡𗀀-𘟱𘠀-𘫲𛀀-𛄞𛅰-𛋻𛰀-𛱪𛱰-𛱼𛲀-𛲈𛲐-𛲙𛲝-𛲞𝅥-𝅩𝅭-𝅲𝅻-𝆂𝆅-𝆋𝆪-𝆭𝉂-𝉄𝐀-𝑔𝑖-𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒹𝒻𝒽-𝓃𝓅-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔞-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕒-𝚥𝚨-𝛀𝛂-𝛚𝛜-𝛺𝛼-𝜔𝜖-𝜴𝜶-𝝎𝝐-𝝮𝝰-𝞈𝞊-𝞨𝞪-𝟂𝟄-𝟋𝟎-𝟿𝨀-𝨶𝨻-𝩬𝩵𝪄𝪛-𝪟𝪡-𝪯𞀀-𞀆𞀈-𞀘𞀛-𞀡𞀣-𞀤𞀦-𞀪𞠀-𞣄𞣐-𞣖𞤀-𞥊𞥐-𞥙𞸀-𞸃𞸅-𞸟𞸡-𞸢𞸤𞸧𞸩-𞸲𞸴-𞸷𞸹𞸻𞹂𞹇𞹉𞹋𞹍-𞹏𞹑-𞹒𞹔𞹗𞹙𞹛𞹝𞹟𞹡-𞹢𞹤𞹧-𞹪𞹬-𞹲𞹴-𞹷𞹹-𞹼𞹾𞺀-𞺉𞺋-𞺛𞺡-𞺣𞺥-𞺩𞺫-𞺻𠀀-𪛖𪜀-𫜴𫝀-𫠝𫠠-𬺡𬺰-𮯠丽-𪘀󠄀-󠇯]*` + + return Rules{ "root": { {`\n`, Text, nil}, {`^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil}, {`^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil}, - {`[^\S\n]+`, Text, nil}, {`\A#!.+$`, CommentHashbang, nil}, {`#.*$`, CommentSingle, nil}, - {`[]{}:(),;[]`, Punctuation, nil}, {`\\\n`, Text, nil}, {`\\`, Text, nil}, - {`(in|is|and|or|not)\b`, OperatorWord, nil}, - {`!=|==|<<|>>|[-~+/*%=<>&^|.]`, Operator, nil}, Include("keywords"), {`(def)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("funcname")}, {`(class)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("classname")}, {`(from)((?:\s|\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("fromimport")}, {`(import)((?:\s|\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("import")}, - Include("builtins"), - Include("magicfuncs"), - Include("magicvars"), - Include("backtick"), - {`([rR]|[uUbB][rR]|[rR][uUbB])(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("tdqs")}, - {`([rR]|[uUbB][rR]|[rR][uUbB])(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("tsqs")}, - {`([rR]|[uUbB][rR]|[rR][uUbB])(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("dqs")}, - {`([rR]|[uUbB][rR]|[rR][uUbB])(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("sqs")}, + Include("expr"), + }, + "expr": { + {`(?i)(rf|fr)(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("rfstringescape", "tdqf")}, + {`(?i)(rf|fr)(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("rfstringescape", "tsqf")}, + {`(?i)(rf|fr)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("rfstringescape", "dqf")}, + {`(?i)(rf|fr)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("rfstringescape", "sqf")}, + {`([fF])(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("fstringescape", "tdqf")}, + {`([fF])(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("fstringescape", "tsqf")}, + {`([fF])(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("fstringescape", "dqf")}, + {`([fF])(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("fstringescape", "sqf")}, + {`(?i)(rb|br|r)(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("tdqs")}, + {`(?i)(rb|br|r)(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("tsqs")}, + {`(?i)(rb|br|r)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("dqs")}, + {`(?i)(rb|br|r)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("sqs")}, {`([uUbB]?)(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "tdqs")}, {`([uUbB]?)(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "tsqs")}, {`([uUbB]?)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "dqs")}, {`([uUbB]?)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "sqs")}, - Include("name"), + {`[^\S\n]+`, Text, nil}, Include("numbers"), + {`!=|==|<<|>>|:=|[-~+/*%=<>&^|.]`, Operator, nil}, + {`[]{}:(),;[]`, Punctuation, nil}, + {`(in|is|and|or|not)\b`, OperatorWord, nil}, + Include("expr-keywords"), + Include("builtins"), + Include("magicfuncs"), + Include("magicvars"), + Include("name"), + }, + "expr-inside-fstring": { + {`[{([]`, Punctuation, Push("expr-inside-fstring-inner")}, + {`(=\s*)?(\![sraf])?\}`, LiteralStringInterpol, Pop(1)}, + {`(=\s*)?(\![sraf])?:`, LiteralStringInterpol, Pop(1)}, + {`\s+`, Text, nil}, + Include("expr"), + }, + "expr-inside-fstring-inner": { + {`[{([]`, Punctuation, Push("expr-inside-fstring-inner")}, + {`[])}]`, Punctuation, Pop(1)}, + {`\s+`, Text, nil}, + Include("expr"), + }, + "expr-keywords": { + {Words(``, `\b`, `async for`, `await`, `else`, `for`, `if`, `lambda`, `yield`, `yield from`), Keyword, nil}, + {Words(``, `\b`, `True`, `False`, `None`), KeywordConstant, nil}, }, "keywords": { - {Words(``, `\b`, `assert`, `break`, `continue`, `del`, `elif`, `else`, `except`, `exec`, `finally`, `for`, `global`, `if`, `lambda`, `pass`, `print`, `raise`, `return`, `try`, `while`, `yield`, `yield from`, `as`, `with`), Keyword, nil}, + {Words(``, `\b`, `assert`, `async`, `await`, `break`, `continue`, `del`, `elif`, `else`, `except`, `finally`, `for`, `global`, `if`, `lambda`, `pass`, `raise`, `nonlocal`, `return`, `try`, `while`, `yield`, `yield from`, `as`, `with`), Keyword, nil}, + {Words(``, `\b`, `True`, `False`, `None`), KeywordConstant, nil}, }, "builtins": { - {Words(`(?=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?\}`, LiteralStringInterpol, nil}, + {`[^\\\'"%{\n]+`, LiteralStringSingle, nil}, + {`[\'"\\]`, LiteralStringSingle, nil}, + {`%|(\{{1,2})`, LiteralStringSingle, nil}, }, "strings-double": { - {`%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]`, LiteralStringInterpol, nil}, - {`[^\\\'"%\n]+`, LiteralStringDouble, nil}, + {`%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsaux%]`, LiteralStringInterpol, nil}, + {`\{((\w+)((\.\w+)|(\[[^\]]+\]))*)?(\![sra])?(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?\}`, LiteralStringInterpol, nil}, + {`[^\\\'"%{\n]+`, LiteralStringDouble, nil}, {`[\'"\\]`, LiteralStringDouble, nil}, - {`%`, LiteralStringDouble, nil}, + {`%|(\{{1,2})`, LiteralStringDouble, nil}, + }, + "dqf": { + {`"`, LiteralStringDouble, Pop(1)}, + {`\\\\|\\"|\\\n`, LiteralStringEscape, nil}, + Include("fstrings-double"), + }, + "sqf": { + {`'`, LiteralStringSingle, Pop(1)}, + {`\\\\|\\'|\\\n`, LiteralStringEscape, nil}, + Include("fstrings-single"), }, "dqs": { {`"`, LiteralStringDouble, Pop(1)}, @@ -123,6 +187,16 @@ var Python = internal.Register(MustNewLexer( {`\\\\|\\'|\\\n`, LiteralStringEscape, nil}, Include("strings-single"), }, + "tdqf": { + {`"""`, LiteralStringDouble, Pop(1)}, + Include("fstrings-double"), + {`\n`, LiteralStringDouble, nil}, + }, + "tsqf": { + {`'''`, LiteralStringSingle, Pop(1)}, + Include("fstrings-single"), + {`\n`, LiteralStringSingle, nil}, + }, "tdqs": { {`"""`, LiteralStringDouble, Pop(1)}, Include("strings-double"), @@ -133,5 +207,5 @@ var Python = internal.Register(MustNewLexer( Include("strings-single"), {`\n`, LiteralStringSingle, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/python2.go b/vendor/github.com/alecthomas/chroma/lexers/p/python2.go new file mode 100644 index 0000000..f1f6036 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/p/python2.go @@ -0,0 +1,141 @@ +package p + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// Python2 lexer. +var Python2 = internal.Register(MustNewLazyLexer( + &Config{ + Name: "Python 2", + Aliases: []string{"python2", "py2"}, + Filenames: []string{}, + MimeTypes: []string{"text/x-python2", "application/x-python2"}, + }, + python2Rules, +)) + +func python2Rules() Rules { + return Rules{ + "root": { + {`\n`, Text, nil}, + {`^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil}, + {`^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil}, + {`[^\S\n]+`, Text, nil}, + {`\A#!.+$`, CommentHashbang, nil}, + {`#.*$`, CommentSingle, nil}, + {`[]{}:(),;[]`, Punctuation, nil}, + {`\\\n`, Text, nil}, + {`\\`, Text, nil}, + {`(in|is|and|or|not)\b`, OperatorWord, nil}, + {`!=|==|<<|>>|[-~+/*%=<>&^|.]`, Operator, nil}, + Include("keywords"), + {`(def)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("funcname")}, + {`(class)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("classname")}, + {`(from)((?:\s|\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("fromimport")}, + {`(import)((?:\s|\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("import")}, + Include("builtins"), + Include("magicfuncs"), + Include("magicvars"), + Include("backtick"), + {`([rR]|[uUbB][rR]|[rR][uUbB])(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("tdqs")}, + {`([rR]|[uUbB][rR]|[rR][uUbB])(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("tsqs")}, + {`([rR]|[uUbB][rR]|[rR][uUbB])(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("dqs")}, + {`([rR]|[uUbB][rR]|[rR][uUbB])(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("sqs")}, + {`([uUbB]?)(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "tdqs")}, + {`([uUbB]?)(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "tsqs")}, + {`([uUbB]?)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "dqs")}, + {`([uUbB]?)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "sqs")}, + Include("name"), + Include("numbers"), + }, + "keywords": { + {Words(``, `\b`, `assert`, `break`, `continue`, `del`, `elif`, `else`, `except`, `exec`, `finally`, `for`, `global`, `if`, `lambda`, `pass`, `print`, `raise`, `return`, `try`, `while`, `yield`, `yield from`, `as`, `with`), Keyword, nil}, + }, + "builtins": { + {Words(`(?>|[-~+/*%=<>&^|.]`, Operator, nil}, - Include("keywords"), - {`(def)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("funcname")}, - {`(class)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("classname")}, - {`(from)((?:\s|\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("fromimport")}, - {`(import)((?:\s|\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("import")}, - Include("builtins"), - Include("magicfuncs"), - Include("magicvars"), - Include("backtick"), - {`([rR]|[uUbB][rR]|[rR][uUbB])(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("tdqs")}, - {`([rR]|[uUbB][rR]|[rR][uUbB])(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("tsqs")}, - {`([rR]|[uUbB][rR]|[rR][uUbB])(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("dqs")}, - {`([rR]|[uUbB][rR]|[rR][uUbB])(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("sqs")}, - {`([uUbB]?)(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "tdqs")}, - {`([uUbB]?)(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "tsqs")}, - {`([uUbB]?)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "dqs")}, - {`([uUbB]?)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "sqs")}, - Include("name"), - Include("numbers"), - }, - "keywords": { - {Words(``, `\b`, `assert`, `async`, `await`, `break`, `continue`, `del`, `elif`, `else`, `except`, `finally`, `for`, `global`, `if`, `lambda`, `pass`, `raise`, `nonlocal`, `return`, `try`, `while`, `yield`, `yield from`, `as`, `with`), Keyword, nil}, - {Words(``, `\b`, `True`, `False`, `None`), KeywordConstant, nil}, - }, - "builtins": { - {Words(`(?=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?\}`, LiteralStringInterpol, nil}, - {`[^\\\'"%{\n]+`, LiteralStringSingle, nil}, - {`[\'"\\]`, LiteralStringSingle, nil}, - {`%|(\{{1,2})`, LiteralStringSingle, nil}, - }, - "strings-double": { - {`%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]`, LiteralStringInterpol, nil}, - {`\{((\w+)((\.\w+)|(\[[^\]]+\]))*)?(\![sra])?(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?\}`, LiteralStringInterpol, nil}, - {`[^\\\'"%{\n]+`, LiteralStringDouble, nil}, - {`[\'"\\]`, LiteralStringDouble, nil}, - {`%|(\{{1,2})`, LiteralStringDouble, nil}, - }, - "dqs": { - {`"`, LiteralStringDouble, Pop(1)}, - {`\\\\|\\"|\\\n`, LiteralStringEscape, nil}, - Include("strings-double"), - }, - "sqs": { - {`'`, LiteralStringSingle, Pop(1)}, - {`\\\\|\\'|\\\n`, LiteralStringEscape, nil}, - Include("strings-single"), - }, - "tdqs": { - {`"""`, LiteralStringDouble, Pop(1)}, - Include("strings-double"), - {`\n`, LiteralStringDouble, nil}, - }, - "tsqs": { - {`'''`, LiteralStringSingle, Pop(1)}, - Include("strings-single"), - {`\n`, LiteralStringSingle, nil}, - }, - }, -)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/q/qbasic.go b/vendor/github.com/alecthomas/chroma/lexers/q/qbasic.go index fd47c08..1e36f86 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/q/qbasic.go +++ b/vendor/github.com/alecthomas/chroma/lexers/q/qbasic.go @@ -6,14 +6,18 @@ import ( ) // Qbasic lexer. -var Qbasic = internal.Register(MustNewLexer( +var Qbasic = internal.Register(MustNewLazyLexer( &Config{ Name: "QBasic", Aliases: []string{"qbasic", "basic"}, Filenames: []string{"*.BAS", "*.bas"}, MimeTypes: []string{"text/basic"}, }, - Rules{ + qbasicRules, +)) + +func qbasicRules() Rules { + return Rules{ "root": { {`\n+`, Text, nil}, {`\s+`, TextWhitespace, nil}, @@ -63,5 +67,5 @@ var Qbasic = internal.Register(MustNewLexer( "keywords": { {`\b(ACCESS|ALIAS|ANY|APPEND|AS|BASE|BINARY|BYVAL|CASE|CDECL|DOUBLE|ELSE|ELSEIF|ENDIF|INTEGER|IS|LIST|LOCAL|LONG|LOOP|MOD|NEXT|OFF|ON|OUTPUT|RANDOM|SIGNAL|SINGLE|STEP|STRING|THEN|TO|UNTIL|USING|WEND)\b`, Keyword, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/q/qml.go b/vendor/github.com/alecthomas/chroma/lexers/q/qml.go new file mode 100644 index 0000000..dfd3c75 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/q/qml.go @@ -0,0 +1,58 @@ +package q + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// Qml lexer. +var Qml = internal.Register(MustNewLazyLexer( + &Config{ + Name: "QML", + Aliases: []string{"qml", "qbs"}, + Filenames: []string{"*.qml", "*.qbs"}, + MimeTypes: []string{"application/x-qml", "application/x-qt.qbs+qml"}, + DotAll: true, + }, + qmlRules, +)) + +func qmlRules() Rules { + return Rules{ + "commentsandwhitespace": { + {`\s+`, Text, nil}, + {``, `role`, `state`, `sub`, `no`, + `submethod`, `subset`, `succeed`, `supersede`, `try`, `unit`, `unless`, `until`, + `use`, `when`, `while`, `with`, `without`, `export`, `native`, `repr`, `required`, `rw`, + `symbol`, `default`, `cached`, `DEPRECATED`, `dynamic`, `hidden-from-backtrace`, `nodal`, + `pure`, `raw`, `start`, `react`, `supply`, `whenever`, `also`, `rule`, `token`, `regex`, + `dynamic-scope`, `built`, `temp`, + } + + keywordsPattern := Words(`(?)`, `(>=)`, `minmax`, `notandthen`, `S`, + } + + wordOperatorsPattern := Words(`(?<=^|\b|\s)`, `(?=$|\b|\s)`, wordOperators...) + + operators := []string{ + `++`, `--`, `-`, `**`, `!`, `+`, `~`, `?`, `+^`, `~^`, `?^`, `^`, `*`, `/`, `%`, `%%`, `+&`, + `+<`, `+>`, `~&`, `~<`, `~>`, `?&`, `+|`, `+^`, `~|`, `~^`, `?`, `?|`, `?^`, `&`, `^`, + `<=>`, `^…^`, `^…`, `…^`, `…`, `...`, `...^`, `^...`, `^...^`, `..`, `..^`, `^..`, `^..^`, + `::=`, `:=`, `!=`, `==`, `<=`, `<`, `>=`, `>`, `~~`, `===`, `&&`, `||`, `|`, `^^`, `//`, + `??`, `!!`, `^fff^`, `^ff^`, `<==`, `==>`, `<<==`, `==>>`, `=>`, `=`, `<<`, `«`, `>>`, `»`, + `,`, `>>.`, `».`, `.&`, `.=`, `.^`, `.?`, `.+`, `.*`, `.`, `∘`, `∩`, `⊍`, `∪`, `⊎`, `∖`, + `⊖`, `≠`, `≤`, `≥`, `=:=`, `=~=`, `≅`, `∈`, `∉`, `≡`, `≢`, `∋`, `∌`, `⊂`, `⊄`, `⊆`, `⊈`, + `⊃`, `⊅`, `⊇`, `⊉`, `:`, `!!!`, `???`, `¯`, `×`, `÷`, `−`, `⁺`, `⁻`, + } + + operatorsPattern := Words(``, ``, operators...) + + builtinTypes := []string{ + `False`, `True`, `Order`, `More`, `Less`, `Same`, `Any`, `Array`, `Associative`, `AST`, + `atomicint`, `Attribute`, `Backtrace`, `Backtrace::Frame`, `Bag`, `Baggy`, `BagHash`, + `Blob`, `Block`, `Bool`, `Buf`, `Callable`, `CallFrame`, `Cancellation`, `Capture`, + `CArray`, `Channel`, `Code`, `compiler`, `Complex`, `ComplexStr`, `CompUnit`, + `CompUnit::PrecompilationRepository`, `CompUnit::Repository`, `Empty`, + `CompUnit::Repository::FileSystem`, `CompUnit::Repository::Installation`, `Cool`, + `CurrentThreadScheduler`, `CX::Warn`, `CX::Take`, `CX::Succeed`, `CX::Return`, `CX::Redo`, + `CX::Proceed`, `CX::Next`, `CX::Last`, `CX::Emit`, `CX::Done`, `Cursor`, `Date`, `Dateish`, + `DateTime`, `Distribution`, `Distribution::Hash`, `Distribution::Locally`, + `Distribution::Path`, `Distribution::Resource`, `Distro`, `Duration`, `Encoding`, + `Encoding::Registry`, `Endian`, `Enumeration`, `Exception`, `Failure`, `FatRat`, `Grammar`, + `Hash`, `HyperWhatever`, `Instant`, `Int`, `int`, `int16`, `int32`, `int64`, `int8`, `str`, + `IntStr`, `IO`, `IO::ArgFiles`, `IO::CatHandle`, `IO::Handle`, `IO::Notification`, + `IO::Notification::Change`, `IO::Path`, `IO::Path::Cygwin`, `IO::Path::Parts`, + `IO::Path::QNX`, `IO::Path::Unix`, `IO::Path::Win32`, `IO::Pipe`, `IO::Socket`, + `IO::Socket::Async`, `IO::Socket::Async::ListenSocket`, `IO::Socket::INET`, `IO::Spec`, + `IO::Spec::Cygwin`, `IO::Spec::QNX`, `IO::Spec::Unix`, `IO::Spec::Win32`, `IO::Special`, + `Iterable`, `Iterator`, `Junction`, `Kernel`, `Label`, `List`, `Lock`, `Lock::Async`, + `Lock::ConditionVariable`, `long`, `longlong`, `Macro`, `Map`, `Match`, + `Metamodel::AttributeContainer`, `Metamodel::C3MRO`, `Metamodel::ClassHOW`, + `Metamodel::ConcreteRoleHOW`, `Metamodel::CurriedRoleHOW`, `Metamodel::DefiniteHOW`, + `Metamodel::Documenting`, `Metamodel::EnumHOW`, `Metamodel::Finalization`, + `Metamodel::MethodContainer`, `Metamodel::Mixins`, `Metamodel::MROBasedMethodDispatch`, + `Metamodel::MultipleInheritance`, `Metamodel::Naming`, `Metamodel::Primitives`, + `Metamodel::PrivateMethodContainer`, `Metamodel::RoleContainer`, `Metamodel::RolePunning`, + `Metamodel::Stashing`, `Metamodel::Trusting`, `Metamodel::Versioning`, `Method`, `Mix`, + `MixHash`, `Mixy`, `Mu`, `NFC`, `NFD`, `NFKC`, `NFKD`, `Nil`, `Num`, `num32`, `num64`, + `Numeric`, `NumStr`, `ObjAt`, `Order`, `Pair`, `Parameter`, `Perl`, `Pod::Block`, + `Pod::Block::Code`, `Pod::Block::Comment`, `Pod::Block::Declarator`, `Pod::Block::Named`, + `Pod::Block::Para`, `Pod::Block::Table`, `Pod::Heading`, `Pod::Item`, `Pointer`, + `Positional`, `PositionalBindFailover`, `Proc`, `Proc::Async`, `Promise`, `Proxy`, + `PseudoStash`, `QuantHash`, `RaceSeq`, `Raku`, `Range`, `Rat`, `Rational`, `RatStr`, + `Real`, `Regex`, `Routine`, `Routine::WrapHandle`, `Scalar`, `Scheduler`, `Semaphore`, + `Seq`, `Sequence`, `Set`, `SetHash`, `Setty`, `Signature`, `size_t`, `Slip`, `Stash`, + `Str`, `StrDistance`, `Stringy`, `Sub`, `Submethod`, `Supplier`, `Supplier::Preserving`, + `Supply`, `Systemic`, `Tap`, `Telemetry`, `Telemetry::Instrument::Thread`, + `Telemetry::Instrument::ThreadPool`, `Telemetry::Instrument::Usage`, `Telemetry::Period`, + `Telemetry::Sampler`, `Thread`, `Test`, `ThreadPoolScheduler`, `UInt`, `uint16`, `uint32`, + `uint64`, `uint8`, `Uni`, `utf8`, `ValueObjAt`, `Variable`, `Version`, `VM`, `Whatever`, + `WhateverCode`, `WrapHandle`, `NativeCall`, + // Pragmas + `precompilation`, `experimental`, `worries`, `MONKEY-TYPING`, `MONKEY-SEE-NO-EVAL`, + `MONKEY-GUTS`, `fatal`, `lib`, `isms`, `newline`, `nqp`, `soft`, + `strict`, `trace`, `variables`, + } + + builtinTypesPattern := Words(`(? 0 { + nextOpenPos := indexAt(text, openingChars, searchPos+nChars) + nextClosePos = indexAt(text, closingChars, searchPos+nChars) + + switch { + case nextClosePos == -1: + nextClosePos = len(text) + nestingLevel = 0 + case nextOpenPos != -1 && nextOpenPos < nextClosePos: + nestingLevel++ + nChars = len(openingChars) + searchPos = nextOpenPos + default: // next_close_pos < next_open_pos + nestingLevel-- + nChars = len(closingChars) + searchPos = nextClosePos + } + } + + endPos = nextClosePos + } + + if endPos < 0 { + // if we didn't find a closer, just highlight the + // rest of the text in this class + endPos = len(text) + } + + adverbre := regexp.MustCompile(`:to\b|:heredoc\b`) + var heredocTerminator []rune + if adverbre.MatchString(string(adverbs)) { + heredocTerminator = text[state.Pos:endPos] + if len(heredocTerminator) > 0 { + endHeredocPos := indexAt(text[endPos:], heredocTerminator, 0) + nChars = len(heredocTerminator) + endPos += endHeredocPos + } else { + endPos = len(text) + } + } + + textBetweenBrackets := string(text[state.Pos:endPos]) + switch tokenClass { + case rakuPod, rakuPodDeclaration, rakuNameAttribute: + state.NamedGroups[`value`] = textBetweenBrackets + state.NamedGroups[`closing_delimiters`] = string(closingChars) + case rakuQuote: + if len(heredocTerminator) > 0 { + // Length of heredoc terminator + closing chars + `;` + heredocFristPunctuationLen := len(heredocTerminator) + len(openingChars) + 1 + + state.NamedGroups[`opening_delimiters`] = string(openingChars) + + string(text[state.Pos:state.Pos+heredocFristPunctuationLen]) + + state.NamedGroups[`value`] = + string(text[state.Pos+heredocFristPunctuationLen : endPos]) + + state.NamedGroups[`closing_delimiters`] = string(heredocTerminator) + } else { + state.NamedGroups[`value`] = textBetweenBrackets + state.NamedGroups[`closing_delimiters`] = string(closingChars) + } + default: + state.Groups = []string{state.Groups[0] + string(text[state.Pos:endPos+nChars])} + } + + state.Pos = endPos + nChars + + return nil + } + } + + // Raku rules + // Empty capture groups are placeholders and will be replaced by bracketsFinder. + // DO NOT REMOVE THEM! + return Rules{ + "root": { + Include("common"), + {`[{}();]`, Punctuation, nil}, + {`\[|\]`, Operator, nil}, + {`.+?`, Text, nil}, + }, + "common": { + {`^#![^\n]*$`, CommentHashbang, nil}, + Include("pod"), + // Multi-line, Embedded comment + { + "#`(?(?" + bracketsPattern + `)\k*)`, + CommentMultiline, + bracketsFinder(rakuMultilineComment), + }, + {`#[^\n]*$`, CommentSingle, nil}, + // /regex/ + { + `(?<=(?:^|\(|=|:|~~|\[|,|=>)\s*)(/)(?!\]|\))((?:\\\\|\\/|.)*?)((?>)(\S+?)(<<)`, ByGroups(Operator, UsingSelf("root"), Operator), nil}, + {`(»)(\S+?)(«)`, ByGroups(Operator, UsingSelf("root"), Operator), nil}, + // Hyperoperator | «*« + {`(<<)(\S+?)(<<)`, ByGroups(Operator, UsingSelf("root"), Operator), nil}, + {`(«)(\S+?)(«)`, ByGroups(Operator, UsingSelf("root"), Operator), nil}, + // Hyperoperator | »*» + {`(>>)(\S+?)(>>)`, ByGroups(Operator, UsingSelf("root"), Operator), nil}, + {`(»)(\S+?)(»)`, ByGroups(Operator, UsingSelf("root"), Operator), nil}, + // <> + {`(?>)[^\n])+?[},;] *\n)(?!(?:(?!>>).)+?>>\S+?>>)`, Punctuation, Push("<<")}, + // «quoted words» + {`(? operators | something < onething > something + { + `(?<=[$@%&]?\w[\w':-]* +)(<=?)( *[^ ]+? *)(>=?)(?= *[$@%&]?\w[\w':-]*)`, + ByGroups(Operator, UsingSelf("root"), Operator), + nil, + }, + // + { + `(?])+?)(>)(?!\s*(?:\d+|\.(?:Int|Numeric)|[$@%]\w[\w':-]*[^(]|\s+\[))`, + ByGroups(Punctuation, String, Punctuation), + nil, + }, + {`C?X::['\w:-]+`, NameException, nil}, + Include("metaoperator"), + // Pair | (key) => value + { + `(\([^)]+\))(\s*)(=>)(\s*)([^,\n]+)(,?\n*)`, + ByGroups(UsingSelf("root"), Text, Operator, Text, UsingSelf("root"), Text), + nil, + }, + // Pair | key => value + { + `(\w[\w'-]*)(\s*)(=>)(\s*)([^,\n]+)(,?\n*)`, + ByGroups(String, Text, Operator, Text, UsingSelf("root"), Text), + nil, + }, + Include("colon-pair"), + // Token + { + // Token with adverbs + `(?<=(?:^|\s)(?:regex|token|rule)(\s+))(['\w:-]+)(?=:['\w-]+` + + colonPairOpeningBrackets + `.+?` + colonPairClosingBrackets + `[({])`, + NameFunction, + Push("token", "name-adverb"), + }, + { + // Token without adverbs + `(?<=(?:^|\s)(?:regex|token|rule)(?:\s+))(['\w:-]+)`, + NameFunction, + Push("token"), + }, + // Substitution + {`(?<=^|\b|\s)(?(?:qq|q|Q))(?(?::?(?:heredoc|to|qq|ww|q|w|s|a|h|f|c|b|to|v|x))*)(?\s*)(?(?[^0-9a-zA-Z:\s])\k*)`, + EmitterFunc(quote), + bracketsFinder(rakuQuote), + }, + // Function + { + `\b(?:\w['\w:-]*)(?=:['\w-]+` + + colonPairOpeningBrackets + `.+?` + colonPairClosingBrackets + `\()`, + NameFunction, + Push("name-adverb"), + }, + {`\b(?:\w['\w:-]*)(?=\()`, NameFunction, nil}, + // Method + // Method with adverb + { + `(?(?[^\w:\s])\k*)`, + ByGroupNames(map[string]Emitter{ + `opening_delimiters`: Punctuation, + `delimiter`: nil, + }), + Mutators(Pop(1), bracketsFinder(rakuMatchRegex)), + }, + }, + "substitution": { + Include("colon-pair-attribute"), + // Substitution | s{regex} = value + { + `(?(?` + bracketsPattern + `)\k*)`, + ByGroupNames(map[string]Emitter{ + `opening_delimiters`: Punctuation, + `delimiter`: nil, + }), + Mutators(Pop(1), bracketsFinder(rakuSubstitutionSingleRegex)), + }, + // Substitution | s/regex/string/ + { + `([^\w:\s])((?:\\\\|\\/|.)*?)(\1)((?:\\\\|\\/|.)*?)(\1)`, + ByGroups( + Punctuation, UsingSelf("regex"), Punctuation, UsingSelf("qq"), Punctuation, + ), + Mutators(Pop(1), MutatorFunc(makeRegexPoppingRule)), + }, + }, + "number": { + {`0_?[0-7]+(_[0-7]+)*`, LiteralNumberOct, nil}, + {`0x[0-9A-Fa-f]+(_[0-9A-Fa-f]+)*`, LiteralNumberHex, nil}, + {`0b[01]+(_[01]+)*`, LiteralNumberBin, nil}, + { + `(?i)(\d*(_\d*)*\.\d+(_\d*)*|\d+(_\d*)*\.\d+(_\d*)*)(e[+-]?\d+)?`, + LiteralNumberFloat, + nil, + }, + {`(?i)\d+(_\d*)*e[+-]?\d+(_\d*)*`, LiteralNumberFloat, nil}, + {`(?<=\d+)i`, NameConstant, nil}, + {`\d+(_\d+)*`, LiteralNumberInteger, nil}, + }, + "name-adverb": { + Include("colon-pair-attribute-keyvalue"), + Default(Pop(1)), + }, + "colon-pair": { + // :key(value) + {colonPairPattern, colonPair(String), bracketsFinder(rakuNameAttribute)}, + // :123abc + { + `(:)(\d+)(\w[\w'-]*)(\s*[,;)]?\s*$)`, + ByGroups(Punctuation, UsingSelf("number"), String, Text), + nil, + }, + // :key + {`(:!?)(\w[\w'-]*)`, ByGroups(Punctuation, String), nil}, + {`\s+`, Text, nil}, + }, + "colon-pair-attribute": { + // :key(value) + {colonPairPattern, colonPair(NameAttribute), bracketsFinder(rakuNameAttribute)}, + // :123abc + { + `(:)(\d+)(\w+)(\s*[,;)]?\s*$)`, + ByGroups(Punctuation, UsingSelf("number"), NameAttribute, Text), + nil, + }, + // :key + {`(:!?)(\w[\w'-]*)`, ByGroups(Punctuation, NameAttribute), nil}, + {`\s+`, Text, nil}, + }, + "colon-pair-attribute-keyvalue": { + // :key(value) + {colonPairPattern, colonPair(NameAttribute), bracketsFinder(rakuNameAttribute)}, + }, + "escape-qq": { + { + `(? + { + `(?)`, + ByGroups(Punctuation, Operator, Punctuation, UsingSelf("root"), Punctuation), + nil, + }, + // {code} + {`(?>|»|\+|\*\*|\*|\?|=|~|<~~>`, Operator, nil}, + // Anchors + {`\^\^|\^|\$\$|\$`, NameEntity, nil}, + {`\.`, NameEntity, nil}, + {`#[^\n]*\n`, CommentSingle, nil}, + // Lookaround + { + `(?)`, + ByGroups(Punctuation, Operator, OperatorWord, Punctuation), + nil, + }, + // <$variable> + { + `(?)`, + ByGroups(Punctuation, NameVariable, Punctuation), + nil, + }, + // Capture markers + {`(?`, Operator, nil}, + {`(?)`, Punctuation, Pop(1)}, + {`(?`, Punctuation, Pop(1)}, + Include("regex-class-builtin"), + Include("variable"), + // | | + { + `(?:(\w[\w-:]*)(=\.?))?(&?\w[\w'-:]+?)(\(.+?\))?(?=>)`, + ByGroups( + NameVariable, Operator, NameFunction, UsingSelf("root"), + ), + nil, + }, + // + { + `(&?\w[\w':-]*?)(:)((?:.*?(?:\$<\w[\w':-]*>)?.*?)*?)(?=>)`, + ByGroups( + NameFunction, Punctuation, UsingSelf("root"), + ), + nil, + }, + Include("colon-pair-attribute"), + {`(?] + { + `\b([RZX]+)\b(\[)([^\s\]]+?)(\])`, + ByGroups(OperatorWord, Punctuation, UsingSelf("root"), Punctuation), + nil, + }, + // Z=> + {`\b([RZX]+)\b([^\s\]]+)`, ByGroups(OperatorWord, UsingSelf("operator")), nil}, + }, + "operator": { + // Word Operator + {wordOperatorsPattern, OperatorWord, nil}, + // Operator + {operatorsPattern, Operator, nil}, + }, + "pod": { + // Single-line pod declaration + {`(#[|=])\s`, Keyword, Push("pod-single")}, + // Multi-line pod declaration + { + "(?#[|=])(?(?" + bracketsPattern + `)\k*)(?)(?)`, + ByGroupNames( + map[string]Emitter{ + `keyword`: Keyword, + `opening_delimiters`: Punctuation, + `delimiter`: nil, + `value`: UsingSelf("pod-begin"), + `closing_delimiters`: Punctuation, + }), + bracketsFinder(rakuPodDeclaration), + }, + Include("pod-blocks"), + }, + "pod-blocks": { + // =begin code + { + `(?<=^ *)(? *)(?=begin)(? +)(?code)(?[^\n]*)(?.*?)(?^\k)(?=end)(? +)\k`, + EmitterFunc(podCode), + nil, + }, + // =begin + { + `(?<=^ *)(? *)(?=begin)(? +)(?!code)(?\w[\w'-]*)(?[^\n]*)(?)(?)`, + ByGroupNames( + map[string]Emitter{ + `ws`: Comment, + `keyword`: Keyword, + `ws2`: StringDoc, + `name`: Keyword, + `config`: EmitterFunc(podConfig), + `value`: UsingSelf("pod-begin"), + `closing_delimiters`: Keyword, + }), + bracketsFinder(rakuPod), + }, + // =for ... + { + `(?<=^ *)(? *)(?=(?:for|defn))(? +)(?\w[\w'-]*)(?[^\n]*\n)`, + ByGroups(Comment, Keyword, StringDoc, Keyword, EmitterFunc(podConfig)), + Push("pod-paragraph"), + }, + // =config + { + `(?<=^ *)(? *)(?=config)(? +)(?\w[\w'-]*)(?[^\n]*\n)`, + ByGroups(Comment, Keyword, StringDoc, Keyword, EmitterFunc(podConfig)), + nil, + }, + // =alias + { + `(?<=^ *)(? *)(?=alias)(? +)(?\w[\w'-]*)(?[^\n]*\n)`, + ByGroups(Comment, Keyword, StringDoc, Keyword, StringDoc), + nil, + }, + // =encoding + { + `(?<=^ *)(? *)(?=encoding)(? +)(?[^\n]+)`, + ByGroups(Comment, Keyword, StringDoc, Name), + nil, + }, + // =para ... + { + `(?<=^ *)(? *)(?=(?:para|table|pod))(?(? *)(?=head\d+)(? *)(?#?)`, + ByGroups(Comment, Keyword, GenericHeading, Keyword), + Push("pod-single-heading"), + }, + // =item ... + { + `(?<=^ *)(? *)(?=(?:item\d*|comment|data|[A-Z]+))(? *)(?#?)`, + ByGroups(Comment, Keyword, StringDoc, Keyword), + Push("pod-single"), + }, + { + `(?<=^ *)(? *)(?=finish)(?[^\n]*)`, + ByGroups(Comment, Keyword, EmitterFunc(podConfig)), + Push("pod-finish"), + }, + // ={custom} ... + { + `(?<=^ *)(? *)(?=\w[\w'-]*)(? *)(?#?)`, + ByGroups(Comment, Name, StringDoc, Keyword), + Push("pod-single"), + }, + // = podconfig + { + `(?<=^ *)(? *=)(? *)(?(?::\w[\w'-]*(?:` + colonPairOpeningBrackets + `.+?` + + colonPairClosingBrackets + `) *)*\n)`, + ByGroups(Keyword, StringDoc, EmitterFunc(podConfig)), + nil, + }, + }, + "pod-begin": { + Include("pod-blocks"), + Include("pre-pod-formatter"), + {`.+?`, StringDoc, nil}, + }, + "pod-paragraph": { + {`\n\s*?\n`, StringDoc, Pop(1)}, + Include("pre-pod-formatter"), + {`.+?`, StringDoc, nil}, + }, + "pod-single": { + {`\n`, StringDoc, Pop(1)}, + Include("pre-pod-formatter"), + {`.+?`, StringDoc, nil}, + }, + "pod-single-heading": { + {`\n`, GenericHeading, Pop(1)}, + Include("pre-pod-formatter"), + {`.+?`, GenericHeading, nil}, + }, + "pod-finish": { + {`\z`, nil, Pop(1)}, + Include("pre-pod-formatter"), + {`.+?`, StringDoc, nil}, + }, + "pre-pod-formatter": { + // C, B, ... + { + `(?[CBIUDTKRPAELZVMSXN])(?<+|«)`, + ByGroups(Keyword, Punctuation), + Mutators( + bracketsFinder(rakuPodFormatter), + Push("pod-formatter"), MutatorFunc(podFormatter), + ), + }, + }, + "pod-formatter": { + // Placeholder rule, will be replaced by podFormatter. DO NOT REMOVE! + {`>`, Punctuation, Pop(1)}, + Include("pre-pod-formatter"), + // Placeholder rule, will be replaced by podFormatter. DO NOT REMOVE! + {`.+?`, StringOther, nil}, + }, + "variable": { + {variablePattern, NameVariable, Push("name-adverb")}, + {globalVariablePattern, NameVariableGlobal, Push("name-adverb")}, + {`[$@](?:<.*?>)+`, NameVariable, nil}, + {`\$/`, NameVariable, nil}, + {`\$!`, NameVariable, nil}, + {`[$@%]`, NameVariable, nil}, + }, + "single-quote": { + {`(?>(?!\s*(?:\d+|\.(?:Int|Numeric)|[$@%][\w':-]+|\s+\[))`, Punctuation, Pop(1)}, + Include("ww"), + }, + "«": { + {`»(?!\s*(?:\d+|\.(?:Int|Numeric)|[$@%][\w':-]+|\s+\[))`, Punctuation, Pop(1)}, + Include("ww"), + }, + "ww": { + Include("single-quote"), + Include("qq"), + }, + "qq": { + Include("qq-variable"), + // Function with adverb + { + `\w[\w:'-]+(?=:['\w-]+` + + colonPairOpeningBrackets + `.+?` + colonPairClosingBrackets + `\()`, + NameFunction, + Push("qq-function", "name-adverb"), + }, + // Function without adverb + {`\w[\w:'-]+(?=\((?!"))`, NameFunction, Push("qq-function")}, + Include("closure"), + Include("escape-hexadecimal"), + Include("escape-c-name"), + Include("escape-qq"), + {`.+?`, StringDouble, nil}, + }, + "qq-function": { + {`(\([^"]*?\))`, UsingSelf("root"), nil}, + Default(Pop(1)), + }, + "qq-variable": { + { + `(?>|<.*?>|«.*?»)+`, UsingSelf("root"), nil}, + // Method + { + `(\.)([^(\s]+)(\([^"]*?\))`, + ByGroups(Operator, NameFunction, UsingSelf("root")), + nil, + }, + Default(Pop(1)), + }, + "Q": { + Include("escape-qq"), + {`.+?`, String, nil}, + }, + "Q-closure": { + Include("escape-qq"), + Include("closure"), + {`.+?`, String, nil}, + }, + "Q-variable": { + Include("escape-qq"), + Include("qq-variable"), + {`.+?`, String, nil}, + }, + "closure": { + {`(? -1 { + idx = utf8.RuneCountInString(text[:idx]) + idx += pos + } + + return idx +} + +// Tells if an array of string contains a string +func contains(s []string, e string) bool { + for _, value := range s { + if value == e { + return true + } + } + return false +} + +type RakuFormatterRules struct { + pop, formatter *CompiledRule +} + +// Pop from the pod_formatter_stack and reformat the pod code +func podFormatterPopper(state *LexerState) error { + stack, ok := state.Get("pod_formatter_stack").([]RakuFormatterRules) + + if ok && len(stack) > 0 { + // Pop from stack + stack = stack[:len(stack)-1] + state.Set("pod_formatter_stack", stack) + // Call podFormatter to use the last formatter rules + err := podFormatter(state) + if err != nil { + panic(err) + } + } + + return nil +} + +// Use the rules from pod_formatter_stack to format the pod code +func podFormatter(state *LexerState) error { + stack, ok := state.Get("pod_formatter_stack").([]RakuFormatterRules) + if ok && len(stack) > 0 { + rules := stack[len(stack)-1] + state.Rules["pod-formatter"][0] = rules.pop + state.Rules["pod-formatter"][len(state.Rules["pod-formatter"])-1] = rules.formatter + } + + return nil +} + +type RulePosition int + +const ( + topRule RulePosition = iota + 1000 + bottomRule +) + +type RuleMakingConfig struct { + delimiter []rune + pattern string + tokenType TokenType + mutator Mutator + rulePosition RulePosition + state *LexerState + stateName string + pushToStack bool + numberOfDelimiterChars int +} + +// Makes compiled rules and returns them, If rule position is given, rules are added to the state +// If pushToStack is true, state name will be added to the state stack +func makeRuleAndPushMaybe(config RuleMakingConfig) *CompiledRule { + var rePattern string + if len(config.delimiter) > 0 { + delimiter := strings.Repeat(string(config.delimiter), config.numberOfDelimiterChars) + rePattern = regexp2.Escape(delimiter) + } else { + rePattern = config.pattern + } + regex := regexp2.MustCompile(rePattern, regexp2.None) + + cRule := &CompiledRule{ + Rule: Rule{rePattern, config.tokenType, config.mutator}, + Regexp: regex, + } + state := config.state + stateName := config.stateName + switch config.rulePosition { + case topRule: + state.Rules[stateName] = + append([]*CompiledRule{cRule}, state.Rules[stateName][1:]...) + case bottomRule: + state.Rules[stateName] = + append(state.Rules[stateName][:len(state.Rules[stateName])-1], cRule) + } + + // Push state name to stack if asked + if config.pushToStack { + state.Stack = append(state.Stack, config.stateName) + } + + return cRule +} + +// Used when the regex knows its own delimiter and uses `UsingSelf("regex")`, +// it only puts a placeholder rule at the top of "regex" state +func makeRegexPoppingRule(state *LexerState) error { + makeRuleAndPushMaybe(RuleMakingConfig{ + pattern: `^$`, + rulePosition: topRule, + state: state, + stateName: "regex", + }) + + return nil +} + +// Emitter for colon pairs, changes token state based on key and brackets +func colonPair(tokenClass TokenType) Emitter { + return EmitterFunc(func(groups []string, state *LexerState) Iterator { + iterators := []Iterator{} + tokens := []Token{ + {Punctuation, state.NamedGroups[`colon`]}, + {Punctuation, state.NamedGroups[`opening_delimiters`]}, + {Punctuation, state.NamedGroups[`closing_delimiters`]}, + } + + // Append colon + iterators = append(iterators, Literator(tokens[0])) + + if tokenClass == NameAttribute { + iterators = append(iterators, Literator(Token{NameAttribute, state.NamedGroups[`key`]})) + } else { + var keyTokenState string + keyre := regexp.MustCompile(`^\d+$`) + if keyre.MatchString(state.NamedGroups[`key`]) { + keyTokenState = "common" + } else { + keyTokenState = "Q" + } + + // Use token state to Tokenise key + if keyTokenState != "" { + iterator, err := state.Lexer.Tokenise( + &TokeniseOptions{ + State: keyTokenState, + Nested: true, + }, state.NamedGroups[`key`]) + + if err != nil { + panic(err) + } else { + // Append key + iterators = append(iterators, iterator) + } + } + } + + // Append punctuation + iterators = append(iterators, Literator(tokens[1])) + + var valueTokenState string + + switch state.NamedGroups[`opening_delimiters`] { + case "(", "{", "[": + valueTokenState = "root" + case "<<", "«": + valueTokenState = "ww" + case "<": + valueTokenState = "Q" + } + + // Use token state to Tokenise value + if valueTokenState != "" { + iterator, err := state.Lexer.Tokenise( + &TokeniseOptions{ + State: valueTokenState, + Nested: true, + }, state.NamedGroups[`value`]) + + if err != nil { + panic(err) + } else { + // Append value + iterators = append(iterators, iterator) + } + } + // Append last punctuation + iterators = append(iterators, Literator(tokens[2])) + + return Concaterator(iterators...) + }) +} + +// Emitter for quoting constructs, changes token state based on quote name and adverbs +func quote(groups []string, state *LexerState) Iterator { + keyword := state.NamedGroups[`keyword`] + adverbsStr := state.NamedGroups[`adverbs`] + iterators := []Iterator{} + tokens := []Token{ + {Keyword, keyword}, + {StringAffix, adverbsStr}, + {Text, state.NamedGroups[`ws`]}, + {Punctuation, state.NamedGroups[`opening_delimiters`]}, + {Punctuation, state.NamedGroups[`closing_delimiters`]}, + } + + // Append all tokens before dealing with the main string + iterators = append(iterators, Literator(tokens[:4]...)) + + var tokenStates []string + + // Set tokenStates based on adverbs + adverbs := strings.Split(adverbsStr, ":") + for _, adverb := range adverbs { + switch adverb { + case "c", "closure": + tokenStates = append(tokenStates, "Q-closure") + case "qq": + tokenStates = append(tokenStates, "qq") + case "ww": + tokenStates = append(tokenStates, "ww") + case "s", "scalar", "a", "array", "h", "hash", "f", "function": + tokenStates = append(tokenStates, "Q-variable") + } + } + + var tokenState string + + switch { + case keyword == "qq" || contains(tokenStates, "qq"): + tokenState = "qq" + case adverbsStr == "ww" || contains(tokenStates, "ww"): + tokenState = "ww" + case contains(tokenStates, "Q-closure") && contains(tokenStates, "Q-variable"): + tokenState = "qq" + case contains(tokenStates, "Q-closure"): + tokenState = "Q-closure" + case contains(tokenStates, "Q-variable"): + tokenState = "Q-variable" + default: + tokenState = "Q" + } + + iterator, err := state.Lexer.Tokenise( + &TokeniseOptions{ + State: tokenState, + Nested: true, + }, state.NamedGroups[`value`]) + + if err != nil { + panic(err) + } else { + iterators = append(iterators, iterator) + } + + // Append the last punctuation + iterators = append(iterators, Literator(tokens[4])) + + return Concaterator(iterators...) +} + +// Emitter for pod config, tokenises the properties with "colon-pair-attribute" state +func podConfig(groups []string, state *LexerState) Iterator { + // Tokenise pod config + iterator, err := state.Lexer.Tokenise( + &TokeniseOptions{ + State: "colon-pair-attribute", + Nested: true, + }, groups[0]) + + if err != nil { + panic(err) + } else { + return iterator + } +} + +// Emitter for pod code, tokenises the code based on the lang specified +func podCode(groups []string, state *LexerState) Iterator { + iterators := []Iterator{} + tokens := []Token{ + {Comment, state.NamedGroups[`ws`]}, + {Keyword, state.NamedGroups[`keyword`]}, + {Keyword, state.NamedGroups[`ws2`]}, + {Keyword, state.NamedGroups[`name`]}, + {StringDoc, state.NamedGroups[`value`]}, + {Comment, state.NamedGroups[`ws3`]}, + {Keyword, state.NamedGroups[`end_keyword`]}, + {Keyword, state.NamedGroups[`ws4`]}, + {Keyword, state.NamedGroups[`name`]}, + } + + // Append all tokens before dealing with the pod config + iterators = append(iterators, Literator(tokens[:4]...)) + + // Tokenise pod config + iterators = append(iterators, podConfig([]string{state.NamedGroups[`config`]}, state)) + + langMatch := regexp.MustCompile(`:lang\W+(\w+)`).FindStringSubmatch(state.NamedGroups[`config`]) + var lang string + if len(langMatch) > 1 { + lang = langMatch[1] + } + + // Tokenise code based on lang property + sublexer := internal.Get(lang) + if sublexer != nil { + iterator, err := sublexer.Tokenise(nil, state.NamedGroups[`value`]) + + if err != nil { + panic(err) + } else { + iterators = append(iterators, iterator) + } + } else { + iterators = append(iterators, Literator(tokens[4])) + } + + // Append the rest of the tokens + iterators = append(iterators, Literator(tokens[5:]...)) + + return Concaterator(iterators...) +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/r/reasonml.go b/vendor/github.com/alecthomas/chroma/lexers/r/reasonml.go index 0bceb18..0ade569 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/r/reasonml.go +++ b/vendor/github.com/alecthomas/chroma/lexers/r/reasonml.go @@ -6,14 +6,18 @@ import ( ) // Reasonml lexer. -var Reasonml = internal.Register(MustNewLexer( +var Reasonml = internal.Register(MustNewLazyLexer( &Config{ Name: "ReasonML", Aliases: []string{"reason", "reasonml"}, Filenames: []string{"*.re", "*.rei"}, MimeTypes: []string{"text/x-reasonml"}, }, - Rules{ + reasonmlRules, +)) + +func reasonmlRules() Rules { + return Rules{ "escape-sequence": { {`\\[\\"\'ntbr]`, LiteralStringEscape, nil}, {`\\[0-9]{3}`, LiteralStringEscape, nil}, @@ -63,5 +67,5 @@ var Reasonml = internal.Register(MustNewLexer( {`[a-z_][\w\']*`, Name, Pop(1)}, Default(Pop(1)), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/r/regedit.go b/vendor/github.com/alecthomas/chroma/lexers/r/regedit.go index 7ee9cb5..6177234 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/r/regedit.go +++ b/vendor/github.com/alecthomas/chroma/lexers/r/regedit.go @@ -6,14 +6,18 @@ import ( ) // Reg lexer. -var Reg = internal.Register(MustNewLexer( +var Reg = internal.Register(MustNewLazyLexer( &Config{ Name: "reg", Aliases: []string{"registry"}, Filenames: []string{"*.reg"}, MimeTypes: []string{"text/x-windows-registry"}, }, - Rules{ + regRules, +)) + +func regRules() Rules { + return Rules{ "root": { {`Windows Registry Editor.*`, Text, nil}, {`\s+`, Text, nil}, @@ -28,5 +32,5 @@ var Reg = internal.Register(MustNewLexer( {`.+`, LiteralString, Pop(1)}, Default(Pop(1)), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/r/rexx.go b/vendor/github.com/alecthomas/chroma/lexers/r/rexx.go index 1f5550a..38ca768 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/r/rexx.go +++ b/vendor/github.com/alecthomas/chroma/lexers/r/rexx.go @@ -6,7 +6,7 @@ import ( ) // Rexx lexer. -var Rexx = internal.Register(MustNewLexer( +var Rexx = internal.Register(MustNewLazyLexer( &Config{ Name: "Rexx", Aliases: []string{"rexx", "arexx"}, @@ -15,7 +15,11 @@ var Rexx = internal.Register(MustNewLexer( NotMultiline: true, CaseInsensitive: true, }, - Rules{ + rexxRules, +)) + +func rexxRules() Rules { + return Rules{ "root": { {`\s`, TextWhitespace, nil}, {`/\*`, CommentMultiline, Push("comment")}, @@ -55,5 +59,5 @@ var Rexx = internal.Register(MustNewLexer( {`\*/`, CommentMultiline, Pop(1)}, {`\*`, CommentMultiline, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/r/rst.go b/vendor/github.com/alecthomas/chroma/lexers/r/rst.go index f09dad0..2a87479 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/r/rst.go +++ b/vendor/github.com/alecthomas/chroma/lexers/r/rst.go @@ -8,14 +8,18 @@ import ( ) // Restructuredtext lexer. -var Restructuredtext = internal.Register(MustNewLexer( +var Restructuredtext = internal.Register(MustNewLazyLexer( &Config{ Name: "reStructuredText", Aliases: []string{"rst", "rest", "restructuredtext"}, Filenames: []string{"*.rst", "*.rest"}, MimeTypes: []string{"text/x-rst", "text/prs.fallenstein.rst"}, }, - Rules{ + restructuredtextRules, +)) + +func restructuredtextRules() Rules { + return Rules{ "root": { {"^(=+|-+|`+|:+|\\.+|\\'+|\"+|~+|\\^+|_+|\\*+|\\++|#+)([ \\t]*\\n)(.+)(\\n)(\\1)(\\n)", ByGroups(GenericHeading, Text, GenericHeading, Text, GenericHeading, Text), nil}, {"^(\\S.*)(\\n)(={3,}|-{3,}|`{3,}|:{3,}|\\.{3,}|\\'{3,}|\"{3,}|~{3,}|\\^{3,}|_{3,}|\\*{3,}|\\+{3,}|#{3,})(\\n)", ByGroups(GenericHeading, Text, GenericHeading, Text), nil}, @@ -56,10 +60,10 @@ var Restructuredtext = internal.Register(MustNewLexer( {"``((?=$)|(?=[-/:.,; \\n\\x00\\\u2010\\\u2011\\\u2012\\\u2013\\\u2014\\\u00a0\\'\\\"\\)\\]\\}\\>\\\u2019\\\u201d\\\u00bb\\!\\?]))", LiteralString, Pop(1)}, {"`", LiteralString, nil}, }, - }, -)) + } +} -func rstCodeBlock(groups []string, lexer Lexer) Iterator { +func rstCodeBlock(groups []string, state *LexerState) Iterator { iterators := []Iterator{} tokens := []Token{ {Punctuation, groups[1]}, @@ -71,7 +75,7 @@ func rstCodeBlock(groups []string, lexer Lexer) Iterator { {Text, groups[7]}, } code := strings.Join(groups[8:], "") - lexer = internal.Get(groups[6]) + lexer := internal.Get(groups[6]) if lexer == nil { tokens = append(tokens, Token{String, code}) iterators = append(iterators, Literator(tokens...)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/r/ruby.go b/vendor/github.com/alecthomas/chroma/lexers/r/ruby.go index 6af8db2..296cae9 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/r/ruby.go +++ b/vendor/github.com/alecthomas/chroma/lexers/r/ruby.go @@ -6,7 +6,7 @@ import ( ) // Ruby lexer. -var Ruby = internal.Register(MustNewLexer( +var Ruby = internal.Register(MustNewLazyLexer( &Config{ Name: "Ruby", Aliases: []string{"rb", "ruby", "duby"}, @@ -14,7 +14,11 @@ var Ruby = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-ruby", "application/x-ruby"}, DotAll: true, }, - Rules{ + rubyRules, +)) + +func rubyRules() Rules { + return Rules{ "root": { {`\A#!.+?$`, CommentHashbang, nil}, {`#.*?$`, CommentSingle, nil}, @@ -39,7 +43,7 @@ var Ruby = internal.Register(MustNewLexer( {`(0_?[0-7]+(?:_[0-7]+)*)(\s*)([/?])?`, ByGroups(LiteralNumberOct, Text, Operator), nil}, {`(0x[0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*)(\s*)([/?])?`, ByGroups(LiteralNumberHex, Text, Operator), nil}, {`(0b[01]+(?:_[01]+)*)(\s*)([/?])?`, ByGroups(LiteralNumberBin, Text, Operator), nil}, - {`([\d]+(?:_\d+)*)(\s*)([/?])?`, ByGroups(LiteralNumberInteger, Text, Operator), nil}, + {`([\d]+(?:[_e]\d+)*)(\s*)([/?])?`, ByGroups(LiteralNumberInteger, Text, Operator), nil}, {`@@[a-zA-Z_]\w*`, NameVariableClass, nil}, {`@[a-zA-Z_]\w*`, NameVariableInstance, nil}, {`\$\w+`, NameVariableGlobal, nil}, @@ -246,5 +250,5 @@ var Ruby = internal.Register(MustNewLexer( {`[\\#<>]`, LiteralStringRegex, nil}, {`[^\\#<>]+`, LiteralStringRegex, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/r/rust.go b/vendor/github.com/alecthomas/chroma/lexers/r/rust.go index 191d1be..25d42e5 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/r/rust.go +++ b/vendor/github.com/alecthomas/chroma/lexers/r/rust.go @@ -6,7 +6,7 @@ import ( ) // Rust lexer. -var Rust = internal.Register(MustNewLexer( +var Rust = internal.Register(MustNewLazyLexer( &Config{ Name: "Rust", Aliases: []string{"rust"}, @@ -14,7 +14,11 @@ var Rust = internal.Register(MustNewLexer( MimeTypes: []string{"text/rust"}, EnsureNL: true, }, - Rules{ + rustRules, +)) + +func rustRules() Rules { + return Rules{ "root": { {`#![^[\r\n].*$`, CommentPreproc, nil}, Default(Push("base")), @@ -28,18 +32,18 @@ var Rust = internal.Register(MustNewLexer( {`/\*\*(\n|[^/*])`, LiteralStringDoc, Push("doccomment")}, {`/\*!`, LiteralStringDoc, Push("doccomment")}, {`/\*`, CommentMultiline, Push("comment")}, - {`r#*"(?:\\.|[^\\\r\n;])*"#*`, LiteralString, nil}, - {`"(?:\\.|[^\\\r\n"])*"`, LiteralString, nil}, + {`r#*"(?:\\.|[^\\;])*"#*`, LiteralString, nil}, + {`"(?:\\.|[^\\"])*"`, LiteralString, nil}, {`\$([a-zA-Z_]\w*|\(,?|\),?|,?)`, CommentPreproc, nil}, - {Words(``, `\b`, `as`, `box`, `const`, `crate`, `else`, `extern`, `for`, `if`, `impl`, `in`, `loop`, `match`, `move`, `mut`, `pub`, `ref`, `return`, `static`, `super`, `trait`, `unsafe`, `use`, `where`, `while`), Keyword, nil}, - {Words(``, `\b`, `abstract`, `alignof`, `become`, `do`, `final`, `macro`, `offsetof`, `override`, `priv`, `proc`, `pure`, `sizeof`, `typeof`, `unsized`, `virtual`, `yield`), KeywordReserved, nil}, + {Words(``, `\b`, `as`, `async`, `await`, `const`, `crate`, `else`, `extern`, `for`, `if`, `impl`, `in`, `loop`, `match`, `move`, `mut`, `pub`, `ref`, `return`, `static`, `super`, `trait`, `unsafe`, `use`, `where`, `while`), Keyword, nil}, + {Words(``, `\b`, `abstract`, `become`, `box`, `do`, `final`, `macro`, `override`, `priv`, `try`, `typeof`, `unsized`, `virtual`, `yield`), KeywordReserved, nil}, {`(true|false)\b`, KeywordConstant, nil}, {`mod\b`, Keyword, Push("modname")}, {`let\b`, KeywordDeclaration, nil}, {`fn\b`, Keyword, Push("funcname")}, {`(struct|enum|type|union)\b`, Keyword, Push("typename")}, {`(default)(\s+)(type|fn)\b`, ByGroups(Keyword, Text, Keyword), nil}, - {Words(``, `\b`, `u8`, `u16`, `u32`, `u64`, `i8`, `i16`, `i32`, `i64`, `usize`, `isize`, `f32`, `f64`, `str`, `bool`), KeywordType, nil}, + {Words(``, `\b`, `u8`, `u16`, `u32`, `u64`, `u128`, `i8`, `i16`, `i32`, `i64`, `i128`, `usize`, `isize`, `f32`, `f64`, `str`, `bool`), KeywordType, nil}, {`self\b`, NameBuiltinPseudo, nil}, {Words(``, `\b`, `Copy`, `Send`, `Sized`, `Sync`, `Drop`, `Fn`, `FnMut`, `FnOnce`, `Box`, `ToOwned`, `Clone`, `PartialEq`, `PartialOrd`, `Eq`, `Ord`, `AsRef`, `AsMut`, `Into`, `From`, `Default`, `Iterator`, `Extend`, `IntoIterator`, `DoubleEndedIterator`, `ExactSizeIterator`, `Option`, `Some`, `None`, `Result`, `Ok`, `Err`, `SliceConcatExt`, `String`, `ToString`, `Vec`), NameBuiltin, nil}, {`::\b`, Text, nil}, @@ -131,5 +135,5 @@ var Rust = internal.Register(MustNewLexer( {`\);?`, CommentPreproc, Pop(1)}, {`[^")]+`, CommentPreproc, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/sas.go b/vendor/github.com/alecthomas/chroma/lexers/s/sas.go index 47a67ed..016a91b 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/sas.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/sas.go @@ -6,7 +6,7 @@ import ( ) // Sas lexer. -var Sas = internal.Register(MustNewLexer( +var Sas = internal.Register(MustNewLazyLexer( &Config{ Name: "SAS", Aliases: []string{"sas"}, @@ -14,7 +14,11 @@ var Sas = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-sas", "text/sas", "application/x-sas"}, CaseInsensitive: true, }, - Rules{ + sasRules, +)) + +func sasRules() Rules { + return Rules{ "root": { Include("comments"), Include("proc-data"), @@ -90,5 +94,5 @@ var Sas = internal.Register(MustNewLexer( "special": { {`(null|missing|_all_|_automatic_|_character_|_n_|_infile_|_name_|_null_|_numeric_|_user_|_webout_)`, KeywordConstant, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/sass.go b/vendor/github.com/alecthomas/chroma/lexers/s/sass.go index 6200f6a..1b73377 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/sass.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/sass.go @@ -6,7 +6,7 @@ import ( ) // Sass lexer. -var Sass = internal.Register(MustNewLexer( +var Sass = internal.Register(MustNewLazyLexer( &Config{ Name: "Sass", Aliases: []string{"sass"}, @@ -14,7 +14,11 @@ var Sass = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-sass"}, CaseInsensitive: true, }, - Rules{ + sassRules, +)) + +func sassRules() Rules { + return Rules{ // "root": { // }, "root": { @@ -140,5 +144,5 @@ var Sass = internal.Register(MustNewLexer( {`(from|to|through)`, OperatorWord, nil}, Include("value"), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/scala.go b/vendor/github.com/alecthomas/chroma/lexers/s/scala.go index 20932de..2885d01 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/scala.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/scala.go @@ -7,15 +7,8 @@ import ( "github.com/alecthomas/chroma/lexers/internal" ) -var ( - scalaOp = "[-~\\^\\*!%&\\\\<>\\|+=:/?@\xa6-\xa7\xa9\xac\xae\xb0-\xb1\xb6\xd7\xf7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+" - scalaUpper = "[A-Z\\$_\xc0-\xd6\xd8-\xde\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038f\u0391-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0531-\u0556\u10a0-\u10c5\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59-\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c6f\u2c72\u2c75\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\uff21-\uff3a]" - scalaLetter = `[a-zA-Z\\$_ªµºÀ-ÖØ-öø-ʯͰ-ͳͶ-ͷͻ-ͽΆΈ-ϵϷ-ҁҊ-Ֆա-ևא-ײء-ؿف-يٮ-ٯٱ-ۓەۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪऄ-हऽॐक़-ॡॲ-ॿঅ-হঽৎড়-ৡৰ-ৱਅ-ਹਖ਼-ਫ਼ੲ-ੴઅ-હઽૐ-ૡଅ-ହଽଡ଼-ୡୱஃ-ஹௐఅ-ఽౘ-ౡಅ-ಹಽೞ-ೡഅ-ഽൠ-ൡൺ-ൿඅ-ෆก-ะา-ำเ-ๅກ-ະາ-ຳຽ-ໄໜ-ༀཀ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჺᄀ-ፚᎀ-ᎏᎠ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝰក-ឳៜᠠ-ᡂᡄ-ᢨᢪ-ᤜᥐ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱷᴀ-ᴫᵢ-ᵷᵹ-ᶚḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⱼⲀ-ⳤⴀ-ⵥⶀ-ⷞ〆-〇〡-〩〸-〺〼ぁ-ゖゟァ-ヺヿ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-ꀔꀖ-ꒌꔀ-ꘋꘐ-ꘟꘪ-ꙮꚀ-ꚗꜢ-ꝯꝱ-ꞇꞋ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가-힣豈-יִײַ-ﬨשׁ-ﴽﵐ-ﷻﹰ-ﻼA-Za-zヲ-ッア-ンᅠ-ᅵ]` - scalaIDRest = fmt.Sprintf(`%s(?:%s|[0-9])*(?:(?<=_)%s)?`, scalaLetter, scalaLetter, scalaOp) -) - // Scala lexer. -var Scala = internal.Register(MustNewLexer( +var Scala = internal.Register(MustNewLazyLexer( &Config{ Name: "Scala", Aliases: []string{"scala"}, @@ -23,7 +16,18 @@ var Scala = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-scala"}, DotAll: true, }, - Rules{ + scalaRules, +)) + +func scalaRules() Rules { + var ( + scalaOp = "[-~\\^\\*!%&\\\\<>\\|+=:/?@\xa6-\xa7\xa9\xac\xae\xb0-\xb1\xb6\xd7\xf7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+" + scalaUpper = "[A-Z\\$_\xc0-\xd6\xd8-\xde\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038f\u0391-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0531-\u0556\u10a0-\u10c5\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59-\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c6f\u2c72\u2c75\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\uff21-\uff3a]" + scalaLetter = `[a-zA-Z\\$_ªµºÀ-ÖØ-öø-ʯͰ-ͳͶ-ͷͻ-ͽΆΈ-ϵϷ-ҁҊ-Ֆա-ևא-ײء-ؿف-يٮ-ٯٱ-ۓەۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪऄ-हऽॐक़-ॡॲ-ॿঅ-হঽৎড়-ৡৰ-ৱਅ-ਹਖ਼-ਫ਼ੲ-ੴઅ-હઽૐ-ૡଅ-ହଽଡ଼-ୡୱஃ-ஹௐఅ-ఽౘ-ౡಅ-ಹಽೞ-ೡഅ-ഽൠ-ൡൺ-ൿඅ-ෆก-ะา-ำเ-ๅກ-ະາ-ຳຽ-ໄໜ-ༀཀ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჺᄀ-ፚᎀ-ᎏᎠ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝰក-ឳៜᠠ-ᡂᡄ-ᢨᢪ-ᤜᥐ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱷᴀ-ᴫᵢ-ᵷᵹ-ᶚḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⱼⲀ-ⳤⴀ-ⵥⶀ-ⷞ〆-〇〡-〩〸-〺〼ぁ-ゖゟァ-ヺヿ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-ꀔꀖ-ꒌꔀ-ꘋꘐ-ꘟꘪ-ꙮꚀ-ꚗꜢ-ꝯꝱ-ꞇꞋ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가-힣豈-יִײַ-ﬨשׁ-ﴽﵐ-ﷻﹰ-ﻼA-Za-zヲ-ッア-ンᅠ-ᅵ]` + scalaIDRest = fmt.Sprintf(`%s(?:%s|[0-9])*(?:(?<=_)%s)?`, scalaLetter, scalaLetter, scalaOp) + ) + + return Rules{ "root": { {`(class|trait|object)(\s+)`, ByGroups(Keyword, Text), Push("class")}, {`[^\S\n]+`, Text, nil}, @@ -108,5 +112,5 @@ var Scala = internal.Register(MustNewLexer( {`\{`, LiteralStringInterpol, Push()}, Include("root"), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/scheme.go b/vendor/github.com/alecthomas/chroma/lexers/s/scheme.go index b721d68..d2f177e 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/scheme.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/scheme.go @@ -8,14 +8,18 @@ import ( // nolint // Scheme lexer. -var SchemeLang = internal.Register(MustNewLexer( +var SchemeLang = internal.Register(MustNewLazyLexer( &Config{ Name: "Scheme", Aliases: []string{"scheme", "scm"}, Filenames: []string{"*.scm", "*.ss"}, MimeTypes: []string{"text/x-scheme", "application/x-scheme"}, }, - Rules{ + schemeLangRules, +)) + +func schemeLangRules() Rules { + return Rules{ "root": { {`;.*$`, CommentSingle, nil}, {`#\|`, CommentMultiline, Push("multiline-comment")}, @@ -49,5 +53,5 @@ var SchemeLang = internal.Register(MustNewLexer( {`\)`, Comment, Pop(1)}, {`[^()]+`, Comment, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/scilab.go b/vendor/github.com/alecthomas/chroma/lexers/s/scilab.go index 87fa66c..f816492 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/scilab.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/scilab.go @@ -6,14 +6,18 @@ import ( ) // Scilab lexer. -var Scilab = internal.Register(MustNewLexer( +var Scilab = internal.Register(MustNewLazyLexer( &Config{ Name: "Scilab", Aliases: []string{"scilab"}, Filenames: []string{"*.sci", "*.sce", "*.tst"}, MimeTypes: []string{"text/scilab"}, }, - Rules{ + scilabRules, +)) + +func scilabRules() Rules { + return Rules{ "root": { {`//.*?$`, CommentSingle, nil}, {`^\s*function`, Keyword, Push("deffunc")}, @@ -40,5 +44,5 @@ var Scilab = internal.Register(MustNewLexer( {`(\s*)(?:(.+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)`, ByGroups(TextWhitespace, Text, TextWhitespace, Punctuation, TextWhitespace, NameFunction, Punctuation, Text, Punctuation, TextWhitespace), Pop(1)}, {`(\s*)([a-zA-Z_]\w*)`, ByGroups(Text, NameFunction), Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/scss.go b/vendor/github.com/alecthomas/chroma/lexers/s/scss.go index 48195de..e489ade 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/scss.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/scss.go @@ -6,7 +6,7 @@ import ( ) // Scss lexer. -var Scss = internal.Register(MustNewLexer( +var Scss = internal.Register(MustNewLazyLexer( &Config{ Name: "SCSS", Aliases: []string{"scss"}, @@ -16,24 +16,47 @@ var Scss = internal.Register(MustNewLexer( DotAll: true, CaseInsensitive: true, }, - Rules{ + scssRules, +)) + +func scssRules() Rules { + cssProperties := []string{`src`, `align-content`, `align-items`, `align-self`, `all`, `animation`, `animation-delay`, `animation-direction`, `animation-duration`, `animation-fill-mode`, `animation-iteration-count`, `animation-name`, `animation-play-state`, `animation-timing-function`, `appearance`, `aspect-ratio`, `backface-visibility`, `background`, `background-attachment`, `background-blend-mode`, `background-clip`, `background-color`, `background-image`, `background-origin`, `background-position`, `background-repeat`, `background-size`, `block-size`, `border`, `border-block`, `border-block-color`, `border-block-end`, `border-block-end-color`, `border-block-end-style`, `border-block-end-width`, `border-block-start`, `border-block-start-color`, `border-block-start-style`, `border-block-start-width`, `border-block-style`, `border-block-width`, `border-bottom`, `border-bottom-color`, `border-bottom-left-radius`, `border-bottom-right-radius`, `border-bottom-style`, `border-bottom-width`, `border-collapse`, `border-color`, `border-end-end-radius`, `border-end-start-radius`, `border-image`, `border-image-outset`, `border-image-repeat`, `border-image-slice`, `border-image-source`, `border-image-width`, `border-inline`, `border-inline-color`, `border-inline-end`, `border-inline-end-color`, `border-inline-end-style`, `border-inline-end-width`, `border-inline-start`, `border-inline-start-color`, `border-inline-start-style`, `border-inline-start-width`, `border-inline-style`, `border-inline-width`, `border-left`, `border-left-color`, `border-left-style`, `border-left-width`, `border-radius`, `border-right`, `border-right-color`, `border-right-style`, `border-right-width`, `border-spacing`, `border-start-end-radius`, `border-start-start-radius`, `border-style`, `border-top`, `border-top-color`, `border-top-left-radius`, `border-top-right-radius`, `border-top-style`, `border-top-width`, `border-width`, `bottom`, `box-decoration-break`, `box-shadow`, `box-sizing`, `break-after`, `break-before`, `break-inside`, `caption-side`, `caret-color`, `clear`, `clip`, `clip-path`, `color`, `color-adjust`, `column-count`, `column-fill`, `column-gap`, `column-rule`, `column-rule-color`, `column-rule-style`, `column-rule-width`, `column-span`, `column-width`, `columns`, `content`, `content-visibility`, `counter-increment`, `counter-reset`, `counter-set`, `cursor`, `direction`, `display`, `empty-cells`, `filter`, `flex`, `flex-basis`, `flex-direction`, `flex-flow`, `flex-grow`, `flex-shrink`, `flex-wrap`, `float`, `font`, `font-family`, `font-feature-settings`, `font-kerning`, `font-language-override`, `font-optical-sizing`, `font-size`, `font-size-adjust`, `font-stretch`, `font-style`, `font-synthesis`, `font-variant`, `font-variant-caps`, `font-variant-east-asian`, `font-variant-emoji`, `font-variant-ligatures`, `font-variant-numeric`, `font-variant-position`, `font-weight`, `footnote-display`, `footnote-policy`, `forced-color-adjust`, `gap`, `grid`, `grid-area`, `grid-auto-columns`, `grid-auto-flow`, `grid-auto-rows`, `grid-column`, `grid-column-end`, `grid-column-start`, `grid-row`, `grid-row-end`, `grid-row-start`, `grid-template`, `grid-template-areas`, `grid-template-columns`, `grid-template-rows`, `hanging-punctuation`, `height`, `hyphens`, `image-orientation`, `image-rendering`, `image-resolution`, `initial-letter`, `initial-letter-align`, `initial-letter-wrap`, `inline-size`, `inline-sizing`, `inset`, `inset-block`, `inset-block-end`, `inset-block-start`, `inset-inline`, `inset-inline-end`, `inset-inline-start`, `isolation`, `justify-content`, `justify-items`, `justify-self`, `left`, `letter-spacing`, `lighting-color`, `line-break`, `line-clamp`, `line-grid`, `line-height`, `line-padding`, `line-snap`, `list-style`, `list-style-image`, `list-style-position`, `list-style-type`, `margin`, `margin-block`, `margin-block-end`, `margin-block-start`, `margin-bottom`, `margin-break`, `margin-inline`, `margin-inline-end`, `margin-inline-start`, `margin-left`, `margin-right`, `margin-top`, `margin-trim`, `mask`, `mask-border`, `mask-border-mode`, `mask-border-repeat`, `mask-border-slice`, `mask-border-source`, `mask-border-width`, `mask-clip`, `mask-composite`, `mask-image`, `mask-mode`, `mask-origin`, `mask-position`, `mask-repeat`, `mask-size`, `mask-type`, `max-block-size`, `max-height`, `max-lines`, `max-width`, `min-height`, `min-width`, `mix-blend-mode`, `nav-down`, `nav-left`, `nav-right`, `nav-up`, `object-fit`, `object-position`, `offset`, `offset-anchor`, `offset-distance`, `offset-path`, `offset-position`, `offset-rotate`, `opacity`, `order`, `orphans`, `outline`, `outline-color`, `outline-offset`, `outline-style`, `outline-width`, `overflow`, `overflow-anchor`, `overflow-block`, `overflow-clip-margin`, `overflow-inline`, `overflow-wrap`, `overflow-x`, `overflow-y`, `overscroll-behavior`, `overscroll-behavior-block`, `overscroll-behavior-inline`, `overscroll-behavior-x`, `overscroll-behavior-y`, `padding`, `padding-block`, `padding-block-end`, `padding-block-start`, `padding-bottom`, `padding-inline`, `padding-inline-end`, `padding-inline-start`, `padding-left`, `padding-right`, `padding-top`, `page`, `page-break-after`, `page-break-before`, `page-break-inside`, `page-orientation`, `perspective`, `perspective-origin`, `place-content`, `place-items`, `place-self`, `pointer-events`, `position`, `quotes`, `resize`, `right`, `rotate`, `row-gap`, `scale`, `scroll-behavior`, `scroll-margin`, `scroll-margin-block`, `scroll-margin-block-end`, `scroll-margin-block-start`, `scroll-margin-bottom`, `scroll-margin-inline`, `scroll-margin-inline-end`, `scroll-margin-inline-start`, `scroll-margin-left`, `scroll-margin-right`, `scroll-margin-top`, `scroll-padding`, `scroll-padding-block`, `scroll-padding-block-end`, `scroll-padding-block-start`, `scroll-padding-bottom`, `scroll-padding-inline`, `scroll-padding-inline-end`, `scroll-padding-inline-start`, `scroll-padding-left`, `scroll-padding-right`, `scroll-padding-top`, `scroll-snap-align`, `scroll-snap-stop`, `scroll-snap-type`, `scrollbar-color`, `scrollbar-gutter`, `scrollbar-width`, `shape-image-threshold`, `shape-inside`, `shape-margin`, `shape-outside`, `shape-padding`, `spatial-navigation-action`, `spatial-navigation-contain`, `spatial-navigation-function`, `string-set`, `tab-size`, `table-layout`, `text-align`, `text-align-all`, `text-align-last`, `text-combine-upright`, `text-decoration`, `text-decoration-color`, `text-decoration-line`, `text-decoration-skip`, `text-decoration-style`, `text-decoration-thickness`, `text-emphasis`, `text-emphasis-position`, `text-emphasis-style`, `text-group-align`, `text-indent`, `text-justify`, `text-orientation`, `text-overflow`, `text-rendering`, `text-shadow`, `text-size-adjust`, `text-space-trim`, `text-spacing`, `text-transform`, `text-underline-offset`, `text-underline-position`, `text-wrap`, `top`, `touch-action`, `transform`, `transform-box`, `transform-origin`, `transform-style`, `transition`, `transition-delay`, `transition-duration`, `transition-property`, `transition-timing-function`, `translate`, `unicode-bidi`, `user-select`, `vertical-align`, `visibility`, `white-space`, `widows`, `width`, `will-change`, `word-break`, `word-spacing`, `word-wrap`, `wrap-after`, `wrap-before`, `wrap-flow`, `wrap-inside`, `wrap-through`, `writing-mode`, `z-index`} + + cssPropertyValues := []string{ + `stretch`, `flex-start`, `flex-end`, `center`, `space-between`, `space-around`, `normal`, `baseline`, `first`, `last`, `space-evenly`, `start`, `end`, `safe`, `unsafe`, `self-start`, `self-end`, `auto`, `initial`, `inherit`, `unset`, `revert`, `reverse`, `alternate-reverse`, `alternate`, `none`, `forwards`, `both`, `backwards`, `infinite`, `running`, `paused`, `ease`, `linear`, `step-start`, `step-end`, `ease-in`, `ease-out`, `ease-in-out`, `cubic-bezier`, `textfield`, `menulist-button`, `searchfield`, `textarea`, `push-button`, `slider-horizontal`, `checkbox`, `radio`, `square-button`, `menulist`, `listbox`, `meter`, `progress-bar`, `button`, `visible`, `hidden`, `scroll`, `fixed`, `local`, `multiply`, `screen`, `overlay`, `darken`, `lighten`, `color-dodge`, `color-burn`, `hard-light`, `soft-light`, `difference`, `exclusion`, `hue`, `saturation`, `color`, `luminosity`, `border-box`, `padding-box`, `content-box`, `text`, `transparent`, `currentColor`, `url`, `element`, `image`, `image-set`, `cross-fade`, `top`, `bottom`, `left`, `right`, `repeat`, `no-repeat`, `space`, `round`, `repeat-y`, `repeat-x`, `cover`, `contain`, `max-content`, `min-content`, `available`, `fit-content`, `dotted`, `dashed`, `solid`, `double`, `groove`, `ridge`, `inset`, `outset`, `medium`, `thin`, `thick`, `separate`, `collapse`, `slice`, `clone`, `avoid`, `always`, `all`, `avoid-page`, `page`, `recto`, `verso`, `avoid-column`, `column`, `avoid-region`, `region`, `inline-start`, `inline-end`, `rect`, `circle`, `ellipse`, `polygon`, `path`, `margin-box`, `fill-box`, `stroke-box`, `view-box`, `economy`, `exact`, `balance`, `balance-all`, `open-quote`, `close-quote`, `no-open-quote`, `no-close-quote`, `contents`, `attr`, `target-counter`, `target-text`, `leader`, `default`, `context-menu`, `help`, `pointer`, `progress`, `wait`, `cell`, `crosshair`, `vertical-text`, `alias`, `copy`, `move`, `no-drop`, `not-allowed`, `grab`, `grabbing`, `all-scroll`, `col-resize`, `row-resize`, `n-resize`, `s-resize`, `w-resize`, `ne-resize`, `nw-resize`, `se-resize`, `sw-resize`, `ew-resize`, `ns-resize`, `nesw-resize`, `nwse-resize`, `zoom-in`, `zoom-out`, `ltr`, `rtl`, `inline`, `block`, `inline-block`, `inline-table`, `run-in`, `flow`, `flow-root`, `table`, `flex`, `grid`, `ruby`, `list-item`, `table-row-group`, `table-header-group`, `table-footer-group`, `table-row`, `table-cell`, `table-column-group`, `table-column`, `table-caption`, `ruby-base`, `ruby-text`, `ruby-base-container`, `ruby-text-container`, `inline-flex`, `inline-grid`, `show`, `hide`, `url;`, `blur`, `brightness`, `contrast`, `drop-shadow`, `grayscale`, `hue-rotate`, `invert`, `opacity`, `saturate`, `sepia`, `content`, `row`, `row-reverse`, `column-reverse`, `nowrap`, `wrap`, `wrap-reverse`, `block-start`, `block-end`, `caption`, `icon`, `menu`, `message-box`, `small-caption`, `status-bar`, `serif`, `sans-serif`, `cursive`, `fantasy`, `monospace`, `system-ui`, `emoji`, `math`, `fangsong`, `ui-serif`, `ui-sans-serif`, `ui-monospace`, `ui-rounded`, `xx-small`, `x-small`, `small`, `large`, `x-large`, `xx-large`, `xxx-large`, `smaller`, `larger`, `semi-condensed`, `condensed`, `extra-condensed`, `ultra-condensed`, `semi-expanded`, `expanded`, `extra-expanded`, `ultra-expanded`, `italic`, `weight`, `style`, `small-caps`, `all-small-caps`, `petite-caps`, `all-petite-caps`, `unicase`, `titling-caps`, `jis78`, `jis83`, `jis90`, `jis04`, `simplified`, `traditional`, `full-width`, `proportional-width`, `unicode`, `common-ligatures`, `no-common-ligatures`, `discretionary-ligatures`, `no-discretionary-ligatures`, `historical-ligatures`, `no-historical-ligatures`, `contextual`, `no-contextual`, `ordinal`, `slashed-zero`, `lining-nums`, `oldstyle-nums`, `proportional-nums`, `tabular-nums`, `diagonal-fractions`, `stacked-fractions`, `sub`, `super`, `bold`, `lighter`, `bolder`, `line`, `auto‑flow`, `minmax`, `auto;`, `dense`, `subgrid`, `masonry`, `force-end`, `allow-end`, `manual`, `from-image`, `smooth`, `high-quality`, `crisp-edges`, `pixelated`, `snap`, `alphabetic`, `ideographic`, `hebrew`, `hanging`, `isolate`, `legacy`, `white`, `strict`, `loose`, `anywhere`, `match-parent`, `create`, `outside`, `inside`, `disc`, `square`, `decimal`, `symbols`, `cjk-decimal`, `decimal-leading-zero`, `lower-roman`, `upper-roman`, `lower-greek`, `lower-alpha`, `lower-latin`, `upper-alpha`, `upper-latin`, `arabic-indic`, `armenian`, `bengali`, `cambodian`, `cjk-earthly-branch`, `cjk-heavenly-stem`, `cjk-ideographic`, `devanagari`, `ethiopic-numeric`, `georgian`, `gujarati`, `gurmukhi`, `hiragana`, `hiragana-iroha`, `japanese-formal`, `japanese-informal`, `kannada`, `katakana`, `katakana-iroha`, `khmer`, `korean-hangul-formal`, `korean-hanja-formal`, `korean-hanja-informal`, `lao`, `lower-armenian`, `malayalam`, `mongolian`, `myanmar`, `oriya`, `persian`, `simp-chinese-formal`, `simp-chinese-informal`, `tamil`, `telugu`, `thai`, `tibetan`, `trad-chinese-formal`, `trad-chinese-informal`, `upper-armenian`, `disclosure-open`, `disclosure-closed`, `keep`, `discard`, `in-flow`, `alpha`, `luminance`, `no-clip`, `add`, `subtract`, `intersect`, `exclude`, `match-source`, `current`, `fill`, `scale-down`, `ray`, `clip`, `break-word`, `upright`, `rotate-left`, `rotate-right`, `static`, `relative`, `absolute`, `sticky`, `horizontal`, `vertical`, `x`, `y`, `z`, `mandatory`, `proximity`, `dark`, `light`, `stable`, `force`, `outside-shape`, `display`, `focus`, `justify`, `justify-all`, `underline`, `overline`, `line-through`, `blink`, `spelling-error`, `grammar-error`, `wavy`, `from-font`, `over`, `under`, `filled`, `open`, `dot`, `double-circle`, `triangle`, `sesame`, `inter-word`, `inter-character`, `mixed`, `sideways`, `ellipsis`, `optimizeSpeed`, `optimizeLegibility`, `geometricPrecision`, `trim-inner`, `discard-before`, `discard-after`, `trim-start`, `space-start`, `space-first`, `trim-end`, `space-end`, `trim-adjacent`, `space-adjacent`, `no-compress`, `ideograph-alpha`, `ideograph-numeric`, `punctuation`, `capitalize`, `uppercase`, `lowercase`, `full-size-kana`, `pretty`, `pan-x`, `pan-left`, `pan-right`, `pan-y`, `pan-up`, `pan-down`, `manipulation`, `matrix`, `matrix3d`, `translate`, `translateX`, `translateY`, `translate3d`, `translateZ`, `scale`, `scaleX`, `scaleY`, `scaleZ`, `rotate`, `rotate3d`, `rotateX`, `rotateY`, `rotateZ`, `perspective`, `skew`, `skewX`, `skewY`, `flat`, `preserve-3d`, `border-bottom`, `embed`, `bidi-override`, `isolate-override`, `plaintext`, `middle`, `text-top`, `text-bottom`, `pre`, `pre-wrap`, `pre-line`, `scroll-position`, `transform`, `width`, `keep-all`, `break-all`, `avoid-line`, `avoid-flex`, `minimum`, `maximum`, `clear`, `horizontal-tb`, `vertical-rl`, `vertical-lr`, `sideways-rl`, `sideways-lr`, + } + + cssColorNames := []string{`AliceBlue`, `AntiqueWhite`, `Aqua`, `Aquamarine`, `Azure`, `Beige`, `Bisque`, `Black`, `BlanchedAlmond`, `Blue`, `BlueViolet`, `Brown`, `BurlyWood`, `CadetBlue`, `Chartreuse`, `Chocolate`, `Coral`, `CornflowerBlue`, `Cornsilk`, `Crimson`, `Cyan`, `DarkBlue`, `DarkCyan`, `DarkGoldenRod`, `DarkGray`, `DarkGrey`, `DarkGreen`, `DarkKhaki`, `DarkMagenta`, `DarkOliveGreen`, `DarkOrange`, `DarkOrchid`, `DarkRed`, `DarkSalmon`, `DarkSeaGreen`, `DarkSlateBlue`, `DarkSlateGray`, `DarkSlateGrey`, `DarkTurquoise`, `DarkViolet`, `DeepPink`, `DeepSkyBlue`, `DimGray`, `DimGrey`, `DodgerBlue`, `FireBrick`, `FloralWhite`, `ForestGreen`, `Fuchsia`, `Gainsboro`, `GhostWhite`, `Gold`, `GoldenRod`, `Gray`, `Grey`, `Green`, `GreenYellow`, `HoneyDew`, `HotPink`, `IndianRed`, `Indigo`, `Ivory`, `Khaki`, `Lavender`, `LavenderBlush`, `LawnGreen`, `LemonChiffon`, `LightBlue`, `LightCoral`, `LightCyan`, `LightGoldenRodYellow`, `LightGray`, `LightGrey`, `LightGreen`, `LightPink`, `LightSalmon`, `LightSeaGreen`, `LightSkyBlue`, `LightSlateGray`, `LightSlateGrey`, `LightSteelBlue`, `LightYellow`, `Lime`, `LimeGreen`, `Linen`, `Magenta`, `Maroon`, `MediumAquaMarine`, `MediumBlue`, `MediumOrchid`, `MediumPurple`, `MediumSeaGreen`, `MediumSlateBlue`, `MediumSpringGreen`, `MediumTurquoise`, `MediumVioletRed`, `MidnightBlue`, `MintCream`, `MistyRose`, `Moccasin`, `NavajoWhite`, `Navy`, `OldLace`, `Olive`, `OliveDrab`, `Orange`, `OrangeRed`, `Orchid`, `PaleGoldenRod`, `PaleGreen`, `PaleTurquoise`, `PaleVioletRed`, `PapayaWhip`, `PeachPuff`, `Peru`, `Pink`, `Plum`, `PowderBlue`, `Purple`, `RebeccaPurple`, `Red`, `RosyBrown`, `RoyalBlue`, `SaddleBrown`, `Salmon`, `SandyBrown`, `SeaGreen`, `SeaShell`, `Sienna`, `Silver`, `SkyBlue`, `SlateBlue`, `SlateGray`, `SlateGrey`, `Snow`, `SpringGreen`, `SteelBlue`, `Tan`, `Teal`, `Thistle`, `Tomato`, `Turquoise`, `Violet`, `Wheat`, `White`, `WhiteSmoke`, `Yellow`, `YellowGreen`} + + const cssPropertyPattern = `(?|+=@:,./?-]+`, Operator, nil}, {`[\[\]()]+`, Punctuation, nil}, @@ -76,15 +100,16 @@ var Scss = internal.Register(MustNewLexer( {`[ \t]+`, Text, nil}, {`\:`, NameDecorator, Push("pseudo-class")}, {`\.`, NameClass, Push("class")}, - {`\#`, NameNamespace, Push("id")}, - {`[\w-]+`, NameTag, nil}, {`#\{`, LiteralStringInterpol, Push("interpolation")}, + {`\#`, NameNamespace, Push("id")}, {`&`, Keyword, nil}, {`[~^*!&\[\]()<>|+=@:,./?-]`, Operator, nil}, + {`(%)([\w-]+)`, ByGroups(Operator, NameClass), nil}, {`"`, LiteralStringDouble, Push("string-double")}, {`'`, LiteralStringSingle, Push("string-single")}, {`\n`, Text, nil}, {`[;{}]`, Punctuation, Pop(1)}, + {`[\w-]+`, NameTag, nil}, }, "string-double": { {`(\\.|#(?=[^\n{])|[^\n"#])+`, LiteralStringDouble, nil}, @@ -120,5 +145,9 @@ var Scss = internal.Register(MustNewLexer( {`(from|to|through)`, OperatorWord, nil}, Include("value"), }, - }, -)) + "each": { + {`in`, OperatorWord, nil}, + Include("value"), + }, + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/smalltalk.go b/vendor/github.com/alecthomas/chroma/lexers/s/smalltalk.go index db64707..b4143d0 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/smalltalk.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/smalltalk.go @@ -6,14 +6,18 @@ import ( ) // Smalltalk lexer. -var Smalltalk = internal.Register(MustNewLexer( +var Smalltalk = internal.Register(MustNewLazyLexer( &Config{ Name: "Smalltalk", Aliases: []string{"smalltalk", "squeak", "st"}, Filenames: []string{"*.st"}, MimeTypes: []string{"text/x-smalltalk"}, }, - Rules{ + smalltalkRules, +)) + +func smalltalkRules() Rules { + return Rules{ "root": { {`(<)(\w+:)(.*?)(>)`, ByGroups(Text, Keyword, Text, Text), nil}, Include("squeak fileout"), @@ -95,5 +99,5 @@ var Smalltalk = internal.Register(MustNewLexer( {`(!\n)(\].*)(! !)$`, ByGroups(Keyword, Text, Keyword), nil}, {`! !$`, Keyword, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/smarty.go b/vendor/github.com/alecthomas/chroma/lexers/s/smarty.go index c364ffa..566efbb 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/smarty.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/smarty.go @@ -7,7 +7,7 @@ import ( ) // Smarty lexer. -var Smarty = internal.Register(MustNewLexer( +var Smarty = internal.Register(MustNewLazyLexer( &Config{ Name: "Smarty", Aliases: []string{"smarty"}, @@ -15,7 +15,11 @@ var Smarty = internal.Register(MustNewLexer( MimeTypes: []string{"application/x-smarty"}, DotAll: true, }, - Rules{ + smartyRules, +)) + +func smartyRules() Rules { + return Rules{ "root": { {`[^{]+`, Other, nil}, {`(\{)(\*.*?\*)(\})`, ByGroups(CommentPreproc, Comment, CommentPreproc), nil}, @@ -36,5 +40,5 @@ var Smarty = internal.Register(MustNewLexer( {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, {`[a-zA-Z_]\w*`, NameAttribute, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/sml.go b/vendor/github.com/alecthomas/chroma/lexers/s/sml.go index f716d92..c795ea8 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/sml.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/sml.go @@ -6,14 +6,18 @@ import ( ) // Standard ML lexer. -var StandardML = internal.Register(MustNewLexer( +var StandardML = internal.Register(MustNewLazyLexer( &Config{ Name: "Standard ML", Aliases: []string{"sml"}, Filenames: []string{"*.sml", "*.sig", "*.fun"}, MimeTypes: []string{"text/x-standardml", "application/x-standardml"}, }, - Rules{ + standardMLRules, +)) + +func standardMLRules() Rules { + return Rules{ "whitespace": { {`\s+`, Text, nil}, {`\(\*`, CommentMultiline, Push("comment")}, @@ -196,5 +200,5 @@ var StandardML = internal.Register(MustNewLexer( {`\*\)`, CommentMultiline, Pop(1)}, {`[(*)]`, CommentMultiline, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/snobol.go b/vendor/github.com/alecthomas/chroma/lexers/s/snobol.go index c999b50..4529034 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/snobol.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/snobol.go @@ -6,14 +6,18 @@ import ( ) // Snobol lexer. -var Snobol = internal.Register(MustNewLexer( +var Snobol = internal.Register(MustNewLazyLexer( &Config{ Name: "Snobol", Aliases: []string{"snobol"}, Filenames: []string{"*.snobol"}, MimeTypes: []string{"text/x-snobol"}, }, - Rules{ + snobolRules, +)) + +func snobolRules() Rules { + return Rules{ "root": { {`\*.*\n`, Comment, nil}, {`[+.] `, Punctuation, Push("statement")}, @@ -44,5 +48,5 @@ var Snobol = internal.Register(MustNewLexer( "heredoc": { {`.*\n`, LiteralStringHeredoc, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/solidity.go b/vendor/github.com/alecthomas/chroma/lexers/s/solidity.go index d7cf0f9..62a3a40 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/solidity.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/solidity.go @@ -6,7 +6,7 @@ import ( ) // Solidity lexer. -var Solidity = internal.Register(MustNewLexer( +var Solidity = internal.Register(MustNewLazyLexer( &Config{ Name: "Solidity", Aliases: []string{"sol", "solidity"}, @@ -14,7 +14,11 @@ var Solidity = internal.Register(MustNewLexer( MimeTypes: []string{}, DotAll: true, }, - Rules{ + solidityRules, +)) + +func solidityRules() Rules { + return Rules{ "assembly": { Include("comments"), Include("numbers"), @@ -35,17 +39,16 @@ var Solidity = internal.Register(MustNewLexer( {`/[*][\w\W]*`, CommentMultiline, nil}, }, "keywords-other": { - {Words(``, `\b`, `for`, `in`, `while`, `do`, `break`, `return`, `returns`, `continue`, `if`, `else`, `throw`, `new`, `delete`), Keyword, nil}, + {Words(``, `\b`, `for`, `in`, `while`, `do`, `break`, `return`, `returns`, `continue`, `if`, `else`, `try`, `catch`, `throw`, `_`, `new`, `delete`, `is`, `as`, `from`, `memory`, `storage`), Keyword, nil}, {`assembly\b`, Keyword, Push("assembly")}, - {Words(``, `\b`, `contract`, `interface`, `enum`, `event`, `function`, `library`, `mapping`, `modifier`, `struct`, `var`), KeywordDeclaration, nil}, + {`(contract|interface|enum|event|struct)(\s+)([a-zA-Z_]\w*)`, ByGroups(KeywordDeclaration, Text, NameClass), nil}, + {`(function|modifier)(\s+)([a-zA-Z_]\w*)`, ByGroups(KeywordDeclaration, Text, NameFunction), nil}, + {Words(``, `\b`, `contract`, `interface`, `enum`, `event`, `constructor`, `function`, `library`, `mapping`, `modifier`, `struct`, `var`), KeywordDeclaration, nil}, + {Words(``, `\b`, `abstract`, `external`, `internal`, `private`, `public`), Keyword, nil}, + {Words(``, `\b`, `anonymous`, `constant`, `immutable`, `indexed`, `override`, `payable`, `pure`, `view`, `virtual`), Keyword, nil}, {`(import|using)\b`, KeywordNamespace, nil}, - {`pragma (solidity|experimental)\b`, KeywordReserved, nil}, - {`(_|as|constant|default|from|is)\b`, KeywordReserved, nil}, - {`payable\b`, KeywordReserved, nil}, - {`(memory|storage)\b`, KeywordReserved, nil}, - {`(external|internal|private|public)\b`, KeywordReserved, nil}, - {`(anonymous|indexed)\b`, KeywordReserved, nil}, - {`(abstract|pure|static|view)\b`, KeywordReserved, nil}, + {`pragma (solidity|experimental)\b`, Keyword, nil}, + {Words(``, `\b`, `after`, `alias`, `apply`, `auto`, `case`, `copyof`, `default`, `define`, `final`, `implements`, `inline`, `let`, `macro`, `match`, `mutable`, `null`, `of`, `partial`, `promise`, `reference`, `relocatable`, `sealed`, `sizeof`, `static`, `supports`, `switch`, `typedef`, `typeof`, `unchecked`), KeywordReserved, nil}, {`(true|false)\b`, KeywordConstant, nil}, {`(wei|finney|szabo|ether)\b`, KeywordConstant, nil}, {`(seconds|minutes|hours|days|weeks|years)\b`, KeywordConstant, nil}, @@ -95,16 +98,21 @@ var Solidity = internal.Register(MustNewLexer( {`\+\+|--|\*\*|\?|:|~|&&|\|\||=>|==?|!=?|(<<|>>>?|[-<>+*%&|^/])=?`, Operator, nil}, {`[{(\[;,]`, Punctuation, nil}, {`[})\].]`, Punctuation, nil}, - {`(block|msg|now|this|super|tx)\b`, NameBuiltin, nil}, - {`(sender|origin)\b`, NameBuiltin, nil}, - {`(gas|value)\b`, NameBuiltin, nil}, + {`(abi|block|msg|tx)\b`, NameBuiltin, nil}, + {`(?!abi\.)(decode|encode|encodePacked|encodeWithSelector|encodeWithSignature|encodeWithSelector)\b`, NameBuiltin, nil}, + {`(?!block\.)(chainid|coinbase|difficulty|gaslimit|number|timestamp)\b`, NameBuiltin, nil}, + {`(?!msg\.)(data|gas|sender|value)\b`, NameBuiltin, nil}, + {`(?!tx\.)(gasprice|origin)\b`, NameBuiltin, nil}, + {`(type)(\()([a-zA-Z_]\w*)(\))`, ByGroups(NameBuiltin, Punctuation, NameClass, Punctuation), nil}, + {`(?!type\([a-zA-Z_]\w*\)\.)(creationCode|interfaceId|max|min|name|runtimeCode)\b`, NameBuiltin, nil}, + {`(now|this|super|gasleft)\b`, NameBuiltin, nil}, {`(selfdestruct|suicide)\b`, NameBuiltin, nil}, - {`(balance|send|transfer)\b`, NameBuiltin, nil}, + {`(?!0x[0-9a-fA-F]+\.)(balance|code|codehash|send|transfer)\b`, NameBuiltin, nil}, {`(assert|revert|require)\b`, NameBuiltin, nil}, {`(call|callcode|delegatecall)\b`, NameBuiltin, nil}, {`selector\b`, NameBuiltin, nil}, - {`(addmod|ecrecover|keccak256|mulmod|ripemd160|sha256|sha3)\b`, NameFunction, nil}, + {`(addmod|blockhash|ecrecover|keccak256|mulmod|ripemd160|sha256|sha3)\b`, NameBuiltin, nil}, {`[a-zA-Z_]\w*`, Name, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/sparql.go b/vendor/github.com/alecthomas/chroma/lexers/s/sparql.go index 47a1716..eef73d9 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/sparql.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/sparql.go @@ -6,14 +6,18 @@ import ( ) // Sparql lexer. -var Sparql = internal.Register(MustNewLexer( +var Sparql = internal.Register(MustNewLazyLexer( &Config{ Name: "SPARQL", Aliases: []string{"sparql"}, Filenames: []string{"*.rq", "*.sparql"}, MimeTypes: []string{"application/sparql-query"}, }, - Rules{ + sparqlRules, +)) + +func sparqlRules() Rules { + return Rules{ "root": { {`\s+`, Text, nil}, {`((?i)select|construct|describe|ask|where|filter|group\s+by|minus|distinct|reduced|from\s+named|from|order\s+by|desc|asc|limit|offset|bindings|load|clear|drop|create|add|move|copy|insert\s+data|delete\s+data|delete\s+where|delete|insert|using\s+named|using|graph|default|named|all|optional|service|silent|bind|union|not\s+in|in|as|having|to|prefix|base)\b`, Keyword, nil}, @@ -65,5 +69,5 @@ var Sparql = internal.Register(MustNewLexer( {`\^\^`, Operator, Pop(2)}, Default(Pop(2)), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/sql.go b/vendor/github.com/alecthomas/chroma/lexers/s/sql.go index 6f4e3e0..fb8c8ed 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/sql.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/sql.go @@ -6,7 +6,7 @@ import ( ) // SQL lexer. -var SQL = internal.Register(MustNewLexer( +var SQL = internal.Register(MustNewLazyLexer( &Config{ Name: "SQL", Aliases: []string{"sql"}, @@ -15,9 +15,13 @@ var SQL = internal.Register(MustNewLexer( NotMultiline: true, CaseInsensitive: true, }, - Rules{ + sqlRules, +)) + +func sqlRules() Rules { + return Rules{ "root": { - {`\s+`, Text, nil}, + {`\s+`, TextWhitespace, nil}, {`--.*\n?`, CommentSingle, nil}, {`/\*`, CommentMultiline, Push("multiline-comments")}, {`'`, LiteralStringSingle, Push("string")}, @@ -45,5 +49,5 @@ var SQL = internal.Register(MustNewLexer( {`""`, LiteralStringDouble, nil}, {`"`, LiteralStringDouble, Pop(1)}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/squid.go b/vendor/github.com/alecthomas/chroma/lexers/s/squid.go index 1f16190..b4da3da 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/squid.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/squid.go @@ -6,7 +6,7 @@ import ( ) // Squidconf lexer. -var Squidconf = internal.Register(MustNewLexer( +var Squidconf = internal.Register(MustNewLazyLexer( &Config{ Name: "SquidConf", Aliases: []string{"squidconf", "squid.conf", "squid"}, @@ -15,7 +15,11 @@ var Squidconf = internal.Register(MustNewLexer( NotMultiline: true, CaseInsensitive: true, }, - Rules{ + squidconfRules, +)) + +func squidconfRules() Rules { + return Rules{ "root": { {`\s+`, TextWhitespace, nil}, {`#`, Comment, Push("comment")}, @@ -34,5 +38,5 @@ var Squidconf = internal.Register(MustNewLexer( {`.+`, Comment, Pop(1)}, Default(Pop(1)), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/stylus.go b/vendor/github.com/alecthomas/chroma/lexers/s/stylus.go new file mode 100644 index 0000000..159077f --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/s/stylus.go @@ -0,0 +1,66 @@ +package s + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// Stylus lexer. +var Stylus = internal.Register(MustNewLazyLexer( + &Config{ + Name: "Stylus", + Aliases: []string{"stylus"}, + Filenames: []string{"*.styl"}, + MimeTypes: []string{"text/x-styl"}, + CaseInsensitive: true, + }, + stylusRules, +)) + +func stylusRules() Rules { + return Rules{ + // "root": { + // }, + "root": { + {`([ \t]*\n|\s+)`, Text, nil}, + {`[!$][\w-]+`, NameVariable, nil}, + {`@[\w-]+`, KeywordPseudo, Push("atrule")}, + {`(\.)([\w-]+)`, ByGroups(Punctuation, NameClass), nil}, + {`for|if|else if|else|unless|return|\&`, Keyword, nil}, + {`([\w-]+)(\()`, ByGroups(NameDecorator, Punctuation), Push("function-start")}, + {`(\+)([\w-]+)(\(\))`, ByGroups(Keyword, NameDecorator, Punctuation), nil}, + {Words(``, ``, `-ms-`, `mso-`, `-moz-`, `-o-`, `-xv-`, `-atsc-`, `-wap-`, `-khtml-`, `-webkit-`, `prince-`, `-ah-`, `-hp-`, `-ro-`, `-rim-`, `-tc-`), NameProperty, nil}, + {`\b(align-content|align-items|align-self|alignment-baseline|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|appearance|azimuth|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|baseline-shift|bookmark-label|bookmark-level|bookmark-state|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-boundary|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-decoration-break|box-shadow|box-sizing|box-snap|box-suppress|break-after|break-before|break-inside|caption-side|caret|caret-animation|caret-color|caret-shape|chains|clear|clip|clip-path|clip-rule|color|color-interpolation-filters|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|counter-set|crop|cue|cue-after|cue-before|cursor|direction|display|dominant-baseline|elevation|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|float-defer|float-offset|float-reference|flood-color|flood-opacity|flow|flow-from|flow-into|font|font-family|font-feature-settings|font-kerning|font-language-override|font-size|font-size-adjust|font-stretch|font-style|font-synthesis|font-variant|font-variant-alternates|font-variant-caps|font-variant-east-asian|font-variant-ligatures|font-variant-numeric|font-variant-position|font-weight|footnote-display|footnote-policy|glyph-orientation-vertical|grid|grid-area|grid-auto-columns|grid-auto-flow|grid-auto-rows|grid-column|grid-column-end|grid-column-gap|grid-column-start|grid-gap|grid-row|grid-row-end|grid-row-gap|grid-row-start|grid-template|grid-template-areas|grid-template-columns|grid-template-rows|hanging-punctuation|height|hyphenate-character|hyphenate-limit-chars|hyphenate-limit-last|hyphenate-limit-lines|hyphenate-limit-zone|hyphens|image-orientation|image-resolution|initial-letter|initial-letter-align|initial-letter-wrap|isolation|justify-content|justify-items|justify-self|left|letter-spacing|lighting-color|line-break|line-grid|line-height|line-snap|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|marker-side|marquee-direction|marquee-loop|marquee-speed|marquee-style|mask|mask-border|mask-border-mode|mask-border-outset|mask-border-repeat|mask-border-slice|mask-border-source|mask-border-width|mask-clip|mask-composite|mask-image|mask-mode|mask-origin|mask-position|mask-repeat|mask-size|mask-type|max-height|max-lines|max-width|min-height|min-width|mix-blend-mode|motion|motion-offset|motion-path|motion-rotation|move-to|nav-down|nav-left|nav-right|nav-up|object-fit|object-position|offset-after|offset-before|offset-end|offset-start|opacity|order|orphans|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-style|overflow-wrap|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page|page-break-after|page-break-before|page-break-inside|page-policy|pause|pause-after|pause-before|perspective|perspective-origin|pitch|pitch-range|play-during|polar-angle|polar-distance|position|presentation-level|quotes|region-fragment|resize|rest|rest-after|rest-before|richness|right|rotation|rotation-point|ruby-align|ruby-merge|ruby-position|running|scroll-snap-coordinate|scroll-snap-destination|scroll-snap-points-x|scroll-snap-points-y|scroll-snap-type|shape-image-threshold|shape-inside|shape-margin|shape-outside|size|speak|speak-as|speak-header|speak-numeral|speak-punctuation|speech-rate|stress|string-set|tab-size|table-layout|text-align|text-align-last|text-combine-upright|text-decoration|text-decoration-color|text-decoration-line|text-decoration-skip|text-decoration-style|text-emphasis|text-emphasis-color|text-emphasis-position|text-emphasis-style|text-indent|text-justify|text-orientation|text-overflow|text-shadow|text-space-collapse|text-space-trim|text-spacing|text-transform|text-underline-position|text-wrap|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch|voice-range|voice-rate|voice-stress|voice-volume|volume|white-space|widows|width|will-change|word-break|word-spacing|word-wrap|wrap-after|wrap-before|wrap-flow|wrap-inside|wrap-through|writing-mode|z-index)\b(\:)?`, ByGroups(NameProperty, Punctuation), Push("values")}, + {`\b(a|abbr|acronym|address|applet|area|article|aside|audio|b|base(?:front)?|bd(?:i|o)|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|data|datalist|d(?:d|l|t)|del|details|dfn|dialog|dir|div|em(?:bed)?|fieldset|fig(?:caption|ure)|font|footer|form|frame(?:set)?|h[1-6]+|head(?:er)?|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|main|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|r(?:p|t|uby)|s|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|svg|table|tbody|td|template|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video|wbr)\b`, NameTag, nil}, + {Words(`\b`, `\b`, `above`, `aural`, `behind`, `bidi-override`, `center-left`, `center-right`, `cjk-ideographic`, `continuous`, `crop`, `cross`, `embed`, `far-left`, `far-right`, `fast`, `faster`, `hebrew`, `high`, `higher`, `hiragana`, `hiragana-iroha`, `katakana`, `katakana-iroha`, `landscape`, `left-side`, `leftwards`, `level`, `loud`, `low`, `lower`, `message-box`, `middle`, `mix`, `narrower`, `once`, `portrait`, `right-side`, `rightwards`, `silent`, `slow`, `slower`, `small-caption`, `soft`, `spell-out`, `status-bar`, `super`, `text-bottom`, `text-top`, `wider`, `x-fast`, `x-high`, `x-loud`, `x-low`, `x-soft`, `yes`, `pre`, `pre-wrap`, `pre-line`), KeywordConstant, nil}, + {Words(`\b`, `\b`, `aliceblue`, `antiquewhite`, `aqua`, `aquamarine`, `azure`, `beige`, `bisque`, `black`, `blanchedalmond`, `blue`, `blueviolet`, `brown`, `burlywood`, `cadetblue`, `chartreuse`, `chocolate`, `coral`, `cornflowerblue`, `cornsilk`, `crimson`, `cyan`, `darkblue`, `darkcyan`, `darkgoldenrod`, `darkgray`, `darkgreen`, `darkgrey`, `darkkhaki`, `darkmagenta`, `darkolivegreen`, `darkorange`, `darkorchid`, `darkred`, `darksalmon`, `darkseagreen`, `darkslateblue`, `darkslategray`, `darkslategrey`, `darkturquoise`, `darkviolet`, `deeppink`, `deepskyblue`, `dimgray`, `dimgrey`, `dodgerblue`, `firebrick`, `floralwhite`, `forestgreen`, `fuchsia`, `gainsboro`, `ghostwhite`, `gold`, `goldenrod`, `gray`, `green`, `greenyellow`, `grey`, `honeydew`, `hotpink`, `indianred`, `indigo`, `ivory`, `khaki`, `lavender`, `lavenderblush`, `lawngreen`, `lemonchiffon`, `lightblue`, `lightcoral`, `lightcyan`, `lightgoldenrodyellow`, `lightgray`, `lightgreen`, `lightgrey`, `lightpink`, `lightsalmon`, `lightseagreen`, `lightskyblue`, `lightslategray`, `lightslategrey`, `lightsteelblue`, `lightyellow`, `lime`, `limegreen`, `linen`, `magenta`, `maroon`, `mediumaquamarine`, `mediumblue`, `mediumorchid`, `mediumpurple`, `mediumseagreen`, `mediumslateblue`, `mediumspringgreen`, `mediumturquoise`, `mediumvioletred`, `midnightblue`, `mintcream`, `mistyrose`, `moccasin`, `navajowhite`, `navy`, `oldlace`, `olive`, `olivedrab`, `orange`, `orangered`, `orchid`, `palegoldenrod`, `palegreen`, `paleturquoise`, `palevioletred`, `papayawhip`, `peachpuff`, `peru`, `pink`, `plum`, `powderblue`, `purple`, `rebeccapurple`, `red`, `rosybrown`, `royalblue`, `saddlebrown`, `salmon`, `sandybrown`, `seagreen`, `seashell`, `sienna`, `silver`, `skyblue`, `slateblue`, `slategray`, `slategrey`, `snow`, `springgreen`, `steelblue`, `tan`, `teal`, `thistle`, `tomato`, `turquoise`, `violet`, `wheat`, `white`, `whitesmoke`, `yellow`, `yellowgreen`, `transparent`), KeywordConstant, nil}, + {`(\{|\}|\(|\)|\[|\]|,|:|;)`, Punctuation, nil}, + {`(\.|\!|\-|\+|\~|\*\*|\*|\/|\%|\.\.\.|\.\.|\<\=|\>\=|\<|\>|\=\=|\!\=|\&\&|\|\||\=|\:\=|\?\=|\+\=|\-\=|\*\=|\/\=|\%\=|\?|\:)`, Operator, nil}, + {`\b(and|if unless|in|is|is a|is defined|is not|isnt|or|not)\b`, OperatorWord, nil}, + {`(\#[a-f0-9]{3,6})`, LiteralNumberHex, nil}, + {`\n`, Text, nil}, + }, + "inline-comment": { + {`\*/`, Comment, Pop(1)}, + }, + "atrule": { + {`\{`, Punctuation, Push("atcontent")}, + {`$`, Punctuation, Pop(1)}, + Include("root"), + }, + "atcontent": { + Include("root"), + {`\}`, Punctuation, Pop(2)}, + }, + "function-start": { + {`\)`, Punctuation, Pop(1)}, + Include("root"), + }, + "values": { + {`\s+`, Text, nil}, + {`(\#[a-f0-9]{3,6})`, LiteralNumberHex, nil}, + {Words(`\b`, `\b`, `absolute`, `alias`, `all`, `all-petite-caps`, `all-scroll`, `all-small-caps`, `allow-end`, `alpha`, `alternate`, `alternate-reverse`, `always`, `armenian`, `auto`, `avoid`, `avoid-column`, `avoid-page`, `backwards`, `balance`, `baseline`, `below`, `blink`, `block`, `bold`, `bolder`, `border-box`, `both`, `bottom`, `box-decoration`, `break-word`, `capitalize`, `cell`, `center`, `circle`, `clip`, `clone`, `close-quote`, `col-resize`, `collapse`, `color`, `color-burn`, `color-dodge`, `column`, `column-reverse`, `compact`, `condensed`, `contain`, `container`, `content-box`, `context-menu`, `copy`, `cover`, `crisp-edges`, `crosshair`, `currentColor`, `cursive`, `darken`, `dashed`, `decimal`, `decimal-leading-zero`, `default`, `descendants`, `difference`, `digits`, `disc`, `distribute`, `dot`, `dotted`, `double`, `double-circle`, `e-resize`, `each-line`, `ease`, `ease-in`, `ease-in-out`, `ease-out`, `edges`, `ellipsis`, `end`, `ew-resize`, `exclusion`, `expanded`, `extra-condensed`, `extra-expanded`, `fantasy`, `fill`, `fill-box`, `filled`, `first`, `fixed`, `flat`, `flex`, `flex-end`, `flex-start`, `flip`, `force-end`, `forwards`, `from-image`, `full-width`, `geometricPrecision`, `georgian`, `groove`, `hanging`, `hard-light`, `help`, `hidden`, `hide`, `horizontal`, `hue`, `icon`, `infinite`, `inherit`, `initial`, `ink`, `inline`, `inline-block`, `inline-flex`, `inline-table`, `inset`, `inside`, `inter-word`, `invert`, `isolate`, `italic`, `justify`, `large`, `larger`, `last`, `left`, `lighten`, `lighter`, `line-through`, `linear`, `list-item`, `local`, `loose`, `lower-alpha`, `lower-greek`, `lower-latin`, `lower-roman`, `lowercase`, `ltr`, `luminance`, `luminosity`, `mandatory`, `manipulation`, `manual`, `margin-box`, `match-parent`, `medium`, `mixed`, `monospace`, `move`, `multiply`, `n-resize`, `ne-resize`, `nesw-resize`, `no-close-quote`, `no-drop`, `no-open-quote`, `no-repeat`, `none`, `normal`, `not-allowed`, `nowrap`, `ns-resize`, `nw-resize`, `nwse-resize`, `objects`, `oblique`, `off`, `on`, `open`, `open-quote`, `optimizeLegibility`, `optimizeSpeed`, `outset`, `outside`, `over`, `overlay`, `overline`, `padding-box`, `page`, `pan-down`, `pan-left`, `pan-right`, `pan-up`, `pan-x`, `pan-y`, `paused`, `petite-caps`, `pixelated`, `pointer`, `preserve-3d`, `progress`, `proximity`, `relative`, `repeat`, `repeat no-repeat`, `repeat-x`, `repeat-y`, `reverse`, `ridge`, `right`, `round`, `row`, `row-resize`, `row-reverse`, `rtl`, `ruby`, `ruby-base`, `ruby-base-container`, `ruby-text`, `ruby-text-container`, `run-in`, `running`, `s-resize`, `sans-serif`, `saturation`, `scale-down`, `screen`, `scroll`, `se-resize`, `semi-condensed`, `semi-expanded`, `separate`, `serif`, `sesame`, `show`, `sideways`, `sideways-left`, `sideways-right`, `slice`, `small`, `small-caps`, `smaller`, `smooth`, `snap`, `soft-light`, `solid`, `space`, `space-around`, `space-between`, `spaces`, `square`, `start`, `static`, `step-end`, `step-start`, `sticky`, `stretch`, `strict`, `stroke-box`, `style`, `sw-resize`, `table`, `table-caption`, `table-cell`, `table-column`, `table-column-group`, `table-footer-group`, `table-header-group`, `table-row`, `table-row-group`, `text`, `thick`, `thin`, `titling-caps`, `to`, `top`, `triangle`, `ultra-condensed`, `ultra-expanded`, `under`, `underline`, `unicase`, `unset`, `upper-alpha`, `upper-latin`, `upper-roman`, `uppercase`, `upright`, `use-glyph-orientation`, `vertical`, `vertical-text`, `view-box`, `visible`, `w-resize`, `wait`, `wavy`, `weight`, `weight style`, `wrap`, `wrap-reverse`, `x-large`, `x-small`, `xx-large`, `xx-small`, `zoom-in`, `zoom-out`), KeywordConstant, nil}, + {`\;?`, Punctuation, Pop(1)}, + }, + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/svelte.go b/vendor/github.com/alecthomas/chroma/lexers/s/svelte.go new file mode 100644 index 0000000..1f91a21 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/s/svelte.go @@ -0,0 +1,73 @@ +package s + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/h" + "github.com/alecthomas/chroma/lexers/internal" + "github.com/alecthomas/chroma/lexers/t" +) + +// Svelte lexer. +var Svelte = internal.Register(DelegatingLexer(h.HTML, MustNewLazyLexer( + &Config{ + Name: "Svelte", + Aliases: []string{"svelte"}, + Filenames: []string{"*.svelte"}, + MimeTypes: []string{"application/x-svelte"}, + DotAll: true, + }, + svelteRules, +))) + +func svelteRules() Rules { + return Rules{ + "root": { + // Let HTML handle the comments, including comments containing script and style tags + {``, Other, Pop(1)}, + {`.+?`, Other, nil}, + }, + "templates": { + {`}`, Punctuation, Pop(1)}, + // Let TypeScript handle strings and the curly braces inside them + {`(?\"{}|^`\\\\\\x00-\\x20]*>)(\\s*)(\\.?)", ByGroups(Keyword, TextWhitespace, NameVariable, TextWhitespace, Punctuation), nil}, @@ -63,5 +67,5 @@ var Turtle = internal.Register(MustNewLexer( {`(\^\^)((?:[a-z][\w-]*)?\:)([a-z][\w-]*)`, ByGroups(Operator, GenericEmph, GenericEmph), Pop(2)}, Default(Pop(2)), }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/t/twig.go b/vendor/github.com/alecthomas/chroma/lexers/t/twig.go index 56aa9b9..0e0c1f1 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/t/twig.go +++ b/vendor/github.com/alecthomas/chroma/lexers/t/twig.go @@ -6,7 +6,7 @@ import ( ) // Twig lexer. -var Twig = internal.Register(MustNewLexer( +var Twig = internal.Register(MustNewLazyLexer( &Config{ Name: "Twig", Aliases: []string{"twig"}, @@ -14,7 +14,11 @@ var Twig = internal.Register(MustNewLexer( MimeTypes: []string{"application/x-twig"}, DotAll: true, }, - Rules{ + twigRules, +)) + +func twigRules() Rules { + return Rules{ "root": { {`[^{]+`, Other, nil}, {`\{\{`, CommentPreproc, Push("var")}, @@ -50,5 +54,5 @@ var Twig = internal.Register(MustNewLexer( Include("varnames"), {`.`, Punctuation, nil}, }, - }, -)) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/t/typescript.go b/vendor/github.com/alecthomas/chroma/lexers/t/typescript.go index 3b425ed..0625bb0 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/t/typescript.go +++ b/vendor/github.com/alecthomas/chroma/lexers/t/typescript.go @@ -6,7 +6,7 @@ import ( ) // TypeScript lexer. -var TypeScript = internal.Register(MustNewLexer( +var TypeScript = internal.Register(MustNewLazyLexer( &Config{ Name: "TypeScript", Aliases: []string{"ts", "tsx", "typescript"}, @@ -15,7 +15,11 @@ var TypeScript = internal.Register(MustNewLexer( DotAll: true, EnsureNL: true, }, - Rules{ + typeScriptRules, +)) + +func typeScriptRules() Rules { + return Rules{ "commentsandwhitespace": { {`\s+`, Text, nil}, {`