From 421e605e0cdefd68ab3b7f11a624229138485e20 Mon Sep 17 00:00:00 2001 From: momori-nakano Date: Mon, 18 Sep 2023 18:46:08 -0700 Subject: [PATCH] Add custom highlighter for rehype-pretty-code To make rehype-pretty-code work properly, shiki files need to be included in production environment on Vercel. By reading shiki files, Vercel becomes aware that those files should be included. https://github.com/vercel/next.js/issues/52711#issuecomment-1674254848 --- src/lib/mdToHtml.ts | 3 +- src/lib/shiki/languages/abap.tmLanguage.json | 378 + .../languages/actionscript-3.tmLanguage.json | 949 + src/lib/shiki/languages/ada.tmLanguage.json | 3871 ++++ .../shiki/languages/apache.tmLanguage.json | 562 + src/lib/shiki/languages/apex.tmLanguage.json | 3199 +++ src/lib/shiki/languages/apl.tmLanguage.json | 1468 ++ .../languages/applescript.tmLanguage.json | 1403 ++ src/lib/shiki/languages/ara.tmLanguage.json | 425 + src/lib/shiki/languages/asm.tmLanguage.json | 1735 ++ src/lib/shiki/languages/astro.tmLanguage.json | 773 + src/lib/shiki/languages/awk.tmLanguage.json | 386 + .../shiki/languages/ballerina.tmLanguage.json | 3784 ++++ src/lib/shiki/languages/bat.tmLanguage.json | 788 + .../shiki/languages/beancount.tmLanguage.json | 829 + src/lib/shiki/languages/berry.tmLanguage.json | 166 + .../shiki/languages/bibtex.tmLanguage.json | 401 + src/lib/shiki/languages/bicep.tmLanguage.json | 236 + src/lib/shiki/languages/blade.tmLanguage.json | 3867 ++++ src/lib/shiki/languages/c.tmLanguage.json | 3555 ++++ .../shiki/languages/cadence.tmLanguage.json | 738 + .../shiki/languages/clarity.tmLanguage.json | 878 + .../shiki/languages/clojure.tmLanguage.json | 431 + src/lib/shiki/languages/cmake.tmLanguage.json | 139 + src/lib/shiki/languages/cobol.tmLanguage.json | 1121 ++ .../shiki/languages/codeql.tmLanguage.json | 1490 ++ .../shiki/languages/coffee.tmLanguage.json | 1316 ++ .../shiki/languages/cpp-macro.tmLanguage.json | 9366 +++++++++ src/lib/shiki/languages/cpp.tmLanguage.json | 16474 ++++++++++++++++ .../shiki/languages/crystal.tmLanguage.json | 1868 ++ .../shiki/languages/csharp.tmLanguage.json | 5651 ++++++ src/lib/shiki/languages/css.tmLanguage.json | 1865 ++ src/lib/shiki/languages/cue.tmLanguage.json | 1126 ++ .../shiki/languages/cypher.tmLanguage.json | 349 + src/lib/shiki/languages/d.tmLanguage.json | 3180 +++ src/lib/shiki/languages/dart.tmLanguage.json | 528 + src/lib/shiki/languages/dax.tmLanguage.json | 185 + src/lib/shiki/languages/diff.tmLanguage.json | 160 + .../shiki/languages/docker.tmLanguage.json | 102 + .../languages/dream-maker.tmLanguage.json | 636 + .../shiki/languages/elixir.tmLanguage.json | 1013 + src/lib/shiki/languages/elm.tmLanguage.json | 748 + src/lib/shiki/languages/erb.tmLanguage.json | 153 + .../shiki/languages/erlang.tmLanguage.json | 1753 ++ src/lib/shiki/languages/fish.tmLanguage.json | 189 + .../shiki/languages/fsharp.tmLanguage.json | 1835 ++ .../languages/gdresource.tmLanguage.json | 326 + .../shiki/languages/gdscript.tmLanguage.json | 883 + .../shiki/languages/gdshader.tmLanguage.json | 403 + .../shiki/languages/gherkin.tmLanguage.json | 132 + .../languages/git-commit.tmLanguage.json | 90 + .../languages/git-rebase.tmLanguage.json | 61 + .../languages/glimmer-js.tmLanguage.json | 98 + .../languages/glimmer-ts.tmLanguage.json | 98 + src/lib/shiki/languages/glsl.tmLanguage.json | 58 + .../shiki/languages/gnuplot.tmLanguage.json | 887 + src/lib/shiki/languages/go.tmLanguage.json | 1017 + .../shiki/languages/graphql.tmLanguage.json | 1289 ++ .../shiki/languages/groovy.tmLanguage.json | 1383 ++ src/lib/shiki/languages/hack.tmLanguage.json | 2645 +++ src/lib/shiki/languages/haml.tmLanguage.json | 596 + .../languages/handlebars.tmLanguage.json | 852 + .../shiki/languages/haskell.tmLanguage.json | 2428 +++ src/lib/shiki/languages/hcl.tmLanguage.json | 780 + src/lib/shiki/languages/hjson.tmLanguage.json | 819 + src/lib/shiki/languages/hlsl.tmLanguage.json | 217 + src/lib/shiki/languages/html.tmLanguage.json | 2643 +++ src/lib/shiki/languages/http.tmLanguage.json | 297 + src/lib/shiki/languages/imba.tmLanguage.json | 2693 +++ src/lib/shiki/languages/ini.tmLanguage.json | 113 + src/lib/shiki/languages/java.tmLanguage.json | 1894 ++ .../languages/javascript.tmLanguage.json | 5989 ++++++ .../languages/jinja-html.tmLanguage.json | 16 + src/lib/shiki/languages/jinja.tmLanguage.json | 345 + src/lib/shiki/languages/jison.tmLanguage.json | 712 + src/lib/shiki/languages/json.tmLanguage.json | 213 + src/lib/shiki/languages/json5.tmLanguage.json | 241 + src/lib/shiki/languages/jsonc.tmLanguage.json | 213 + src/lib/shiki/languages/jsonl.tmLanguage.json | 213 + .../shiki/languages/jsonnet.tmLanguage.json | 211 + src/lib/shiki/languages/jssm.tmLanguage.json | 156 + src/lib/shiki/languages/jsx.tmLanguage.json | 5989 ++++++ src/lib/shiki/languages/julia.tmLanguage.json | 983 + .../shiki/languages/kotlin.tmLanguage.json | 577 + src/lib/shiki/languages/kusto.tmLanguage.json | 684 + src/lib/shiki/languages/latex.tmLanguage.json | 2359 +++ src/lib/shiki/languages/less.tmLanguage.json | 542 + .../shiki/languages/liquid.tmLanguage.json | 987 + src/lib/shiki/languages/lisp.tmLanguage.json | 117 + src/lib/shiki/languages/logo.tmLanguage.json | 56 + src/lib/shiki/languages/lua.tmLanguage.json | 942 + src/lib/shiki/languages/make.tmLanguage.json | 634 + .../shiki/languages/markdown.tmLanguage.json | 3076 +++ src/lib/shiki/languages/marko.tmLanguage.json | 1342 ++ .../shiki/languages/matlab.tmLanguage.json | 1130 ++ src/lib/shiki/languages/mdc.tmLanguage.json | 579 + src/lib/shiki/languages/mdx.tmLanguage.json | 5627 ++++++ .../shiki/languages/mermaid.tmLanguage.json | 1343 ++ src/lib/shiki/languages/mojo.tmLanguage.json | 4131 ++++ .../shiki/languages/narrat.tmLanguage.json | 227 + .../shiki/languages/nextflow.tmLanguage.json | 299 + src/lib/shiki/languages/nginx.tmLanguage.json | 2122 ++ src/lib/shiki/languages/nim.tmLanguage.json | 1521 ++ src/lib/shiki/languages/nix.tmLanguage.json | 1198 ++ .../languages/objective-c.tmLanguage.json | 3755 ++++ .../languages/objective-cpp.tmLanguage.json | 7247 +++++++ src/lib/shiki/languages/ocaml.tmLanguage.json | 2961 +++ .../shiki/languages/pascal.tmLanguage.json | 145 + src/lib/shiki/languages/perl.tmLanguage.json | 2977 +++ .../shiki/languages/php-html.tmLanguage.json | 98 + src/lib/shiki/languages/php.tmLanguage.json | 4030 ++++ src/lib/shiki/languages/plsql.tmLanguage.json | 232 + .../shiki/languages/postcss.tmLanguage.json | 374 + .../languages/powerquery.tmLanguage.json | 346 + .../languages/powershell.tmLanguage.json | 1029 + .../shiki/languages/prisma.tmLanguage.json | 441 + .../shiki/languages/prolog.tmLanguage.json | 296 + src/lib/shiki/languages/proto.tmLanguage.json | 504 + src/lib/shiki/languages/pug.tmLanguage.json | 1038 + .../shiki/languages/puppet.tmLanguage.json | 774 + .../languages/purescript.tmLanguage.json | 886 + .../shiki/languages/python.tmLanguage.json | 4213 ++++ src/lib/shiki/languages/r.tmLanguage.json | 642 + src/lib/shiki/languages/raku.tmLanguage.json | 315 + src/lib/shiki/languages/razor.tmLanguage.json | 1809 ++ src/lib/shiki/languages/reg.tmLanguage.json | 133 + src/lib/shiki/languages/rel.tmLanguage.json | 200 + src/lib/shiki/languages/riscv.tmLanguage.json | 294 + src/lib/shiki/languages/rst.tmLanguage.json | 740 + src/lib/shiki/languages/ruby.tmLanguage.json | 2775 +++ src/lib/shiki/languages/rust.tmLanguage.json | 1170 ++ src/lib/shiki/languages/sas.tmLanguage.json | 301 + src/lib/shiki/languages/sass.tmLanguage.json | 615 + src/lib/shiki/languages/scala.tmLanguage.json | 1312 ++ .../shiki/languages/scheme.tmLanguage.json | 381 + src/lib/shiki/languages/scss.tmLanguage.json | 1879 ++ .../shiki/languages/shaderlab.tmLanguage.json | 204 + .../languages/shellscript.tmLanguage.json | 2009 ++ .../languages/shellsession.tmLanguage.json | 30 + .../shiki/languages/smalltalk.tmLanguage.json | 239 + .../shiki/languages/solidity.tmLanguage.json | 1208 ++ .../shiki/languages/sparql.tmLanguage.json | 40 + .../shiki/languages/splunk.tmLanguage.json | 87 + src/lib/shiki/languages/sql.tmLanguage.json | 635 + .../languages/ssh-config.tmLanguage.json | 84 + src/lib/shiki/languages/stata.tmLanguage.json | 3045 +++ .../shiki/languages/stylus.tmLanguage.json | 1202 ++ .../shiki/languages/svelte.tmLanguage.json | 1161 ++ src/lib/shiki/languages/swift.tmLanguage.json | 3303 ++++ .../languages/system-verilog.tmLanguage.json | 1055 + src/lib/shiki/languages/tasl.tmLanguage.json | 290 + src/lib/shiki/languages/tcl.tmLanguage.json | 290 + src/lib/shiki/languages/tex.tmLanguage.json | 280 + src/lib/shiki/languages/toml.tmLanguage.json | 430 + src/lib/shiki/languages/tsx.tmLanguage.json | 5989 ++++++ .../shiki/languages/turtle.tmLanguage.json | 257 + src/lib/shiki/languages/twig.tmLanguage.json | 1372 ++ .../languages/typescript.tmLanguage.json | 5740 ++++++ src/lib/shiki/languages/v.tmLanguage.json | 994 + src/lib/shiki/languages/vb.tmLanguage.json | 238 + .../shiki/languages/verilog.tmLanguage.json | 303 + src/lib/shiki/languages/vhdl.tmLanguage.json | 1436 ++ src/lib/shiki/languages/viml.tmLanguage.json | 441 + .../shiki/languages/vue-html.tmLanguage.json | 558 + src/lib/shiki/languages/vue.tmLanguage.json | 1237 ++ src/lib/shiki/languages/vyper.tmLanguage.json | 5420 +++++ src/lib/shiki/languages/wasm.tmLanguage.json | 830 + .../shiki/languages/wenyan.tmLanguage.json | 129 + src/lib/shiki/languages/wgsl.tmLanguage.json | 390 + .../shiki/languages/wolfram.tmLanguage.json | 2363 +++ src/lib/shiki/languages/xml.tmLanguage.json | 387 + src/lib/shiki/languages/xsl.tmLanguage.json | 94 + src/lib/shiki/languages/yaml.tmLanguage.json | 621 + .../shiki/languages/zenscript.tmLanguage.json | 254 + src/lib/shiki/languages/zig.tmLanguage.json | 309 + src/lib/shiki/themes/css-variables.json | 186 + src/lib/shiki/themes/dark-plus.json | 575 + src/lib/shiki/themes/dracula-soft.json | 1049 + src/lib/shiki/themes/dracula.json | 1049 + src/lib/shiki/themes/github-dark-dimmed.json | 597 + src/lib/shiki/themes/github-dark.json | 501 + src/lib/shiki/themes/github-light.json | 497 + src/lib/shiki/themes/hc_light.json | 566 + src/lib/shiki/themes/light-plus.json | 603 + .../shiki/themes/material-theme-darker.json | 815 + .../shiki/themes/material-theme-lighter.json | 815 + .../shiki/themes/material-theme-ocean.json | 815 + .../themes/material-theme-palenight.json | 815 + src/lib/shiki/themes/material-theme.json | 815 + src/lib/shiki/themes/min-dark.json | 294 + src/lib/shiki/themes/min-light.json | 305 + src/lib/shiki/themes/monokai.json | 477 + src/lib/shiki/themes/nord.json | 1402 ++ src/lib/shiki/themes/one-dark-pro.json | 2107 ++ src/lib/shiki/themes/poimandres.json | 1218 ++ src/lib/shiki/themes/rose-pine-dawn.json | 675 + src/lib/shiki/themes/rose-pine-moon.json | 675 + src/lib/shiki/themes/rose-pine.json | 675 + src/lib/shiki/themes/slack-dark.json | 564 + src/lib/shiki/themes/slack-ochin.json | 475 + src/lib/shiki/themes/solarized-dark.json | 396 + src/lib/shiki/themes/solarized-light.json | 388 + src/lib/shiki/themes/vitesse-dark.json | 1091 + src/lib/shiki/themes/vitesse-light.json | 1089 + src/lib/shikiHilighter.ts | 32 + 205 files changed, 259974 insertions(+), 1 deletion(-) create mode 100644 src/lib/shiki/languages/abap.tmLanguage.json create mode 100644 src/lib/shiki/languages/actionscript-3.tmLanguage.json create mode 100644 src/lib/shiki/languages/ada.tmLanguage.json create mode 100644 src/lib/shiki/languages/apache.tmLanguage.json create mode 100644 src/lib/shiki/languages/apex.tmLanguage.json create mode 100644 src/lib/shiki/languages/apl.tmLanguage.json create mode 100644 src/lib/shiki/languages/applescript.tmLanguage.json create mode 100644 src/lib/shiki/languages/ara.tmLanguage.json create mode 100644 src/lib/shiki/languages/asm.tmLanguage.json create mode 100644 src/lib/shiki/languages/astro.tmLanguage.json create mode 100644 src/lib/shiki/languages/awk.tmLanguage.json create mode 100644 src/lib/shiki/languages/ballerina.tmLanguage.json create mode 100644 src/lib/shiki/languages/bat.tmLanguage.json create mode 100644 src/lib/shiki/languages/beancount.tmLanguage.json create mode 100644 src/lib/shiki/languages/berry.tmLanguage.json create mode 100644 src/lib/shiki/languages/bibtex.tmLanguage.json create mode 100644 src/lib/shiki/languages/bicep.tmLanguage.json create mode 100644 src/lib/shiki/languages/blade.tmLanguage.json create mode 100644 src/lib/shiki/languages/c.tmLanguage.json create mode 100644 src/lib/shiki/languages/cadence.tmLanguage.json create mode 100644 src/lib/shiki/languages/clarity.tmLanguage.json create mode 100644 src/lib/shiki/languages/clojure.tmLanguage.json create mode 100644 src/lib/shiki/languages/cmake.tmLanguage.json create mode 100644 src/lib/shiki/languages/cobol.tmLanguage.json create mode 100644 src/lib/shiki/languages/codeql.tmLanguage.json create mode 100644 src/lib/shiki/languages/coffee.tmLanguage.json create mode 100644 src/lib/shiki/languages/cpp-macro.tmLanguage.json create mode 100644 src/lib/shiki/languages/cpp.tmLanguage.json create mode 100644 src/lib/shiki/languages/crystal.tmLanguage.json create mode 100644 src/lib/shiki/languages/csharp.tmLanguage.json create mode 100644 src/lib/shiki/languages/css.tmLanguage.json create mode 100644 src/lib/shiki/languages/cue.tmLanguage.json create mode 100644 src/lib/shiki/languages/cypher.tmLanguage.json create mode 100644 src/lib/shiki/languages/d.tmLanguage.json create mode 100644 src/lib/shiki/languages/dart.tmLanguage.json create mode 100644 src/lib/shiki/languages/dax.tmLanguage.json create mode 100644 src/lib/shiki/languages/diff.tmLanguage.json create mode 100644 src/lib/shiki/languages/docker.tmLanguage.json create mode 100644 src/lib/shiki/languages/dream-maker.tmLanguage.json create mode 100644 src/lib/shiki/languages/elixir.tmLanguage.json create mode 100644 src/lib/shiki/languages/elm.tmLanguage.json create mode 100644 src/lib/shiki/languages/erb.tmLanguage.json create mode 100644 src/lib/shiki/languages/erlang.tmLanguage.json create mode 100644 src/lib/shiki/languages/fish.tmLanguage.json create mode 100644 src/lib/shiki/languages/fsharp.tmLanguage.json create mode 100644 src/lib/shiki/languages/gdresource.tmLanguage.json create mode 100644 src/lib/shiki/languages/gdscript.tmLanguage.json create mode 100644 src/lib/shiki/languages/gdshader.tmLanguage.json create mode 100644 src/lib/shiki/languages/gherkin.tmLanguage.json create mode 100644 src/lib/shiki/languages/git-commit.tmLanguage.json create mode 100644 src/lib/shiki/languages/git-rebase.tmLanguage.json create mode 100644 src/lib/shiki/languages/glimmer-js.tmLanguage.json create mode 100644 src/lib/shiki/languages/glimmer-ts.tmLanguage.json create mode 100644 src/lib/shiki/languages/glsl.tmLanguage.json create mode 100644 src/lib/shiki/languages/gnuplot.tmLanguage.json create mode 100644 src/lib/shiki/languages/go.tmLanguage.json create mode 100644 src/lib/shiki/languages/graphql.tmLanguage.json create mode 100644 src/lib/shiki/languages/groovy.tmLanguage.json create mode 100644 src/lib/shiki/languages/hack.tmLanguage.json create mode 100644 src/lib/shiki/languages/haml.tmLanguage.json create mode 100644 src/lib/shiki/languages/handlebars.tmLanguage.json create mode 100644 src/lib/shiki/languages/haskell.tmLanguage.json create mode 100644 src/lib/shiki/languages/hcl.tmLanguage.json create mode 100644 src/lib/shiki/languages/hjson.tmLanguage.json create mode 100644 src/lib/shiki/languages/hlsl.tmLanguage.json create mode 100644 src/lib/shiki/languages/html.tmLanguage.json create mode 100644 src/lib/shiki/languages/http.tmLanguage.json create mode 100644 src/lib/shiki/languages/imba.tmLanguage.json create mode 100644 src/lib/shiki/languages/ini.tmLanguage.json create mode 100644 src/lib/shiki/languages/java.tmLanguage.json create mode 100644 src/lib/shiki/languages/javascript.tmLanguage.json create mode 100644 src/lib/shiki/languages/jinja-html.tmLanguage.json create mode 100644 src/lib/shiki/languages/jinja.tmLanguage.json create mode 100644 src/lib/shiki/languages/jison.tmLanguage.json create mode 100644 src/lib/shiki/languages/json.tmLanguage.json create mode 100644 src/lib/shiki/languages/json5.tmLanguage.json create mode 100644 src/lib/shiki/languages/jsonc.tmLanguage.json create mode 100644 src/lib/shiki/languages/jsonl.tmLanguage.json create mode 100644 src/lib/shiki/languages/jsonnet.tmLanguage.json create mode 100644 src/lib/shiki/languages/jssm.tmLanguage.json create mode 100644 src/lib/shiki/languages/jsx.tmLanguage.json create mode 100644 src/lib/shiki/languages/julia.tmLanguage.json create mode 100644 src/lib/shiki/languages/kotlin.tmLanguage.json create mode 100644 src/lib/shiki/languages/kusto.tmLanguage.json create mode 100644 src/lib/shiki/languages/latex.tmLanguage.json create mode 100644 src/lib/shiki/languages/less.tmLanguage.json create mode 100644 src/lib/shiki/languages/liquid.tmLanguage.json create mode 100644 src/lib/shiki/languages/lisp.tmLanguage.json create mode 100644 src/lib/shiki/languages/logo.tmLanguage.json create mode 100644 src/lib/shiki/languages/lua.tmLanguage.json create mode 100644 src/lib/shiki/languages/make.tmLanguage.json create mode 100644 src/lib/shiki/languages/markdown.tmLanguage.json create mode 100644 src/lib/shiki/languages/marko.tmLanguage.json create mode 100644 src/lib/shiki/languages/matlab.tmLanguage.json create mode 100644 src/lib/shiki/languages/mdc.tmLanguage.json create mode 100644 src/lib/shiki/languages/mdx.tmLanguage.json create mode 100644 src/lib/shiki/languages/mermaid.tmLanguage.json create mode 100644 src/lib/shiki/languages/mojo.tmLanguage.json create mode 100644 src/lib/shiki/languages/narrat.tmLanguage.json create mode 100644 src/lib/shiki/languages/nextflow.tmLanguage.json create mode 100644 src/lib/shiki/languages/nginx.tmLanguage.json create mode 100644 src/lib/shiki/languages/nim.tmLanguage.json create mode 100644 src/lib/shiki/languages/nix.tmLanguage.json create mode 100644 src/lib/shiki/languages/objective-c.tmLanguage.json create mode 100644 src/lib/shiki/languages/objective-cpp.tmLanguage.json create mode 100644 src/lib/shiki/languages/ocaml.tmLanguage.json create mode 100644 src/lib/shiki/languages/pascal.tmLanguage.json create mode 100644 src/lib/shiki/languages/perl.tmLanguage.json create mode 100644 src/lib/shiki/languages/php-html.tmLanguage.json create mode 100644 src/lib/shiki/languages/php.tmLanguage.json create mode 100644 src/lib/shiki/languages/plsql.tmLanguage.json create mode 100644 src/lib/shiki/languages/postcss.tmLanguage.json create mode 100644 src/lib/shiki/languages/powerquery.tmLanguage.json create mode 100644 src/lib/shiki/languages/powershell.tmLanguage.json create mode 100644 src/lib/shiki/languages/prisma.tmLanguage.json create mode 100644 src/lib/shiki/languages/prolog.tmLanguage.json create mode 100644 src/lib/shiki/languages/proto.tmLanguage.json create mode 100644 src/lib/shiki/languages/pug.tmLanguage.json create mode 100644 src/lib/shiki/languages/puppet.tmLanguage.json create mode 100644 src/lib/shiki/languages/purescript.tmLanguage.json create mode 100644 src/lib/shiki/languages/python.tmLanguage.json create mode 100644 src/lib/shiki/languages/r.tmLanguage.json create mode 100644 src/lib/shiki/languages/raku.tmLanguage.json create mode 100644 src/lib/shiki/languages/razor.tmLanguage.json create mode 100644 src/lib/shiki/languages/reg.tmLanguage.json create mode 100644 src/lib/shiki/languages/rel.tmLanguage.json create mode 100644 src/lib/shiki/languages/riscv.tmLanguage.json create mode 100644 src/lib/shiki/languages/rst.tmLanguage.json create mode 100644 src/lib/shiki/languages/ruby.tmLanguage.json create mode 100644 src/lib/shiki/languages/rust.tmLanguage.json create mode 100644 src/lib/shiki/languages/sas.tmLanguage.json create mode 100644 src/lib/shiki/languages/sass.tmLanguage.json create mode 100644 src/lib/shiki/languages/scala.tmLanguage.json create mode 100644 src/lib/shiki/languages/scheme.tmLanguage.json create mode 100644 src/lib/shiki/languages/scss.tmLanguage.json create mode 100644 src/lib/shiki/languages/shaderlab.tmLanguage.json create mode 100644 src/lib/shiki/languages/shellscript.tmLanguage.json create mode 100644 src/lib/shiki/languages/shellsession.tmLanguage.json create mode 100644 src/lib/shiki/languages/smalltalk.tmLanguage.json create mode 100644 src/lib/shiki/languages/solidity.tmLanguage.json create mode 100644 src/lib/shiki/languages/sparql.tmLanguage.json create mode 100644 src/lib/shiki/languages/splunk.tmLanguage.json create mode 100644 src/lib/shiki/languages/sql.tmLanguage.json create mode 100644 src/lib/shiki/languages/ssh-config.tmLanguage.json create mode 100644 src/lib/shiki/languages/stata.tmLanguage.json create mode 100644 src/lib/shiki/languages/stylus.tmLanguage.json create mode 100644 src/lib/shiki/languages/svelte.tmLanguage.json create mode 100644 src/lib/shiki/languages/swift.tmLanguage.json create mode 100644 src/lib/shiki/languages/system-verilog.tmLanguage.json create mode 100644 src/lib/shiki/languages/tasl.tmLanguage.json create mode 100644 src/lib/shiki/languages/tcl.tmLanguage.json create mode 100644 src/lib/shiki/languages/tex.tmLanguage.json create mode 100644 src/lib/shiki/languages/toml.tmLanguage.json create mode 100644 src/lib/shiki/languages/tsx.tmLanguage.json create mode 100644 src/lib/shiki/languages/turtle.tmLanguage.json create mode 100644 src/lib/shiki/languages/twig.tmLanguage.json create mode 100644 src/lib/shiki/languages/typescript.tmLanguage.json create mode 100644 src/lib/shiki/languages/v.tmLanguage.json create mode 100644 src/lib/shiki/languages/vb.tmLanguage.json create mode 100644 src/lib/shiki/languages/verilog.tmLanguage.json create mode 100644 src/lib/shiki/languages/vhdl.tmLanguage.json create mode 100644 src/lib/shiki/languages/viml.tmLanguage.json create mode 100644 src/lib/shiki/languages/vue-html.tmLanguage.json create mode 100644 src/lib/shiki/languages/vue.tmLanguage.json create mode 100644 src/lib/shiki/languages/vyper.tmLanguage.json create mode 100644 src/lib/shiki/languages/wasm.tmLanguage.json create mode 100644 src/lib/shiki/languages/wenyan.tmLanguage.json create mode 100644 src/lib/shiki/languages/wgsl.tmLanguage.json create mode 100644 src/lib/shiki/languages/wolfram.tmLanguage.json create mode 100644 src/lib/shiki/languages/xml.tmLanguage.json create mode 100644 src/lib/shiki/languages/xsl.tmLanguage.json create mode 100644 src/lib/shiki/languages/yaml.tmLanguage.json create mode 100644 src/lib/shiki/languages/zenscript.tmLanguage.json create mode 100644 src/lib/shiki/languages/zig.tmLanguage.json create mode 100644 src/lib/shiki/themes/css-variables.json create mode 100644 src/lib/shiki/themes/dark-plus.json create mode 100644 src/lib/shiki/themes/dracula-soft.json create mode 100644 src/lib/shiki/themes/dracula.json create mode 100644 src/lib/shiki/themes/github-dark-dimmed.json create mode 100644 src/lib/shiki/themes/github-dark.json create mode 100644 src/lib/shiki/themes/github-light.json create mode 100644 src/lib/shiki/themes/hc_light.json create mode 100644 src/lib/shiki/themes/light-plus.json create mode 100644 src/lib/shiki/themes/material-theme-darker.json create mode 100644 src/lib/shiki/themes/material-theme-lighter.json create mode 100644 src/lib/shiki/themes/material-theme-ocean.json create mode 100644 src/lib/shiki/themes/material-theme-palenight.json create mode 100644 src/lib/shiki/themes/material-theme.json create mode 100644 src/lib/shiki/themes/min-dark.json create mode 100644 src/lib/shiki/themes/min-light.json create mode 100644 src/lib/shiki/themes/monokai.json create mode 100644 src/lib/shiki/themes/nord.json create mode 100644 src/lib/shiki/themes/one-dark-pro.json create mode 100644 src/lib/shiki/themes/poimandres.json create mode 100644 src/lib/shiki/themes/rose-pine-dawn.json create mode 100644 src/lib/shiki/themes/rose-pine-moon.json create mode 100644 src/lib/shiki/themes/rose-pine.json create mode 100644 src/lib/shiki/themes/slack-dark.json create mode 100644 src/lib/shiki/themes/slack-ochin.json create mode 100644 src/lib/shiki/themes/solarized-dark.json create mode 100644 src/lib/shiki/themes/solarized-light.json create mode 100644 src/lib/shiki/themes/vitesse-dark.json create mode 100644 src/lib/shiki/themes/vitesse-light.json create mode 100644 src/lib/shikiHilighter.ts diff --git a/src/lib/mdToHtml.ts b/src/lib/mdToHtml.ts index f6b32d6..999b31b 100644 --- a/src/lib/mdToHtml.ts +++ b/src/lib/mdToHtml.ts @@ -1,4 +1,5 @@ import rehypeMermaid from "./rehypeMermaid"; +import getHighlighter from "@/lib/shikiHilighter" import { remark } from "remark"; import remarkGfm from "remark-gfm"; @@ -28,7 +29,7 @@ const mdToHtml: (md: string) => Promise = async (md) => { .use(rehypeSlug) .use(rehypeAutolinkHeadings, { behavior: "wrap" }) .use(rehypeMermaid) - .use(rehypePrettyCode) + .use(rehypePrettyCode, { getHighlighter }) .use(rehypeStringify) .process(md); return result.toString(); diff --git a/src/lib/shiki/languages/abap.tmLanguage.json b/src/lib/shiki/languages/abap.tmLanguage.json new file mode 100644 index 0000000..fcc758f --- /dev/null +++ b/src/lib/shiki/languages/abap.tmLanguage.json @@ -0,0 +1,378 @@ +{ + "fileTypes": ["abap", "ABAP"], + "foldingStartMarker": "/\\*\\*|\\{\\s*$", + "foldingStopMarker": "\\*\\*/|^\\s*\\}", + "keyEquivalent": "^~A", + "name": "abap", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.comment.abap" + } + }, + "match": "^\\*.*\\n?", + "name": "comment.line.full.abap" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.comment.abap" + } + }, + "match": "\".*\\n?", + "name": "comment.line.partial.abap" + }, + { + "match": "(?|=>))([a-z_\\/][a-z_0-9\\/]*)(?=\\s+(?:=|\\+=|-=|\\*=|\\/=|&&=|&=)\\s+)", + "name": "variable.other.abap" + }, + { + "match": "\\b[0-9]+(\\b|\\.|,)", + "name": "constant.numeric.abap" + }, + { + "match": "(?ix)(^|\\s+)((PUBLIC|PRIVATE|PROTECTED)\\sSECTION)(?=\\s+|:|\\.)", + "name": "storage.modifier.class.abap" + }, + { + "begin": "(?]*)+(?=\\s+|\\.)", + "captures": { + "1": { + "name": "storage.modifier.method.abap" + } + } + }, + { + "begin": "(?=[A-Za-z_][A-Za-z0-9_]*)", + "end": "(?![A-Za-z0-9_])", + "patterns": [ + { + "include": "#generic_names" + } + ] + } + ] + }, + { + "begin": "(?ix)^\\s*(INTERFACE)\\s([a-z_\\/][a-z_0-9\\/]*)", + "beginCaptures": { + "1": { + "name": "storage.type.block.abap" + }, + "2": { + "name": "entity.name.type.abap" + } + }, + "end": "\\s*\\.\\s*\\n?", + "patterns": [ + { + "match": "(?ix)(?<=^|\\s)(DEFERRED|PUBLIC)(?=\\s+|\\.)", + "name": "storage.modifier.method.abap" + } + ] + }, + { + "begin": "(?ix)^\\s*(FORM)\\s([a-z_\\/][a-z_0-9\\/\\-\\?]*)", + "beginCaptures": { + "1": { + "name": "storage.type.block.abap" + }, + "2": { + "name": "entity.name.type.abap" + } + }, + "end": "\\s*\\.\\s*\\n?", + "patterns": [ + { + "match": "(?ix)(?<=^|\\s)(USING|TABLES|CHANGING|RAISING|IMPLEMENTATION|DEFINITION)(?=\\s+|\\.)", + "name": "storage.modifier.form.abap" + }, + { + "include": "#abaptypes" + }, + { + "include": "#keywords_followed_by_braces" + } + ] + }, + { + "match": "(?i)(endclass|endmethod|endform|endinterface)", + "name": "storage.type.block.end.abap" + }, + { + "match": "(?i)(<[A-Za-z_][A-Za-z0-9_]*>)", + "name": "variable.other.field.symbol.abap" + }, + { + "include": "#keywords" + }, + { + "include": "#abap_constants" + }, + { + "include": "#reserved_names" + }, + { + "include": "#operators" + }, + { + "include": "#builtin_functions" + }, + { + "include": "#abaptypes" + }, + { + "include": "#system_fields" + }, + { + "include": "#sql_functions" + }, + { + "include": "#sql_types" + } + ], + "repository": { + "abap_constants": { + "match": "(?ix)(?<=\\s)(initial|null|space|abap_true|abap_false|abap_undefined|table_line|\n\t\t\t\t%_final|%_hints|%_predefined|col_background|col_group|col_heading|col_key|col_negative|col_normal|col_positive|col_total|\n\t\t\t\tadabas|as400|db2|db6|hdb|oracle|sybase|mssqlnt|pos_low|pos_high)(?=\\s|\\.|,)", + "name": "constant.language.abap" + }, + "reserved_names": { + "match": "(?ix)(?<=\\s)(me|super)(?=\\s|\\.|,|->)", + "name": "constant.language.abap" + }, + "abaptypes": { + "patterns": [ + { + "match": "(?ix)\\s(abap_bool|string|xstring|any|clike|csequence|numeric|xsequence|decfloat|decfloat16|decfloat34|utclong|simple|int8|c|n|i|p|f|d|t|x)(?=\\s|\\.|,)", + "name": "support.type.abap" + }, + { + "match": "(?ix)\\s(TYPE|REF|TO|LIKE|LINE|OF|STRUCTURE|STANDARD|SORTED|HASHED|INDEX|TABLE|WITH|UNIQUE|NON-UNIQUE|SECONDARY|DEFAULT|KEY)(?=\\s|\\.|,)", + "name": "keyword.control.simple.abap" + } + ] + }, + "arithmetic_operator": { + "match": "(?i)(?<=\\s)(\\+|\\-|\\*|\\*\\*|\\/|%|DIV|MOD|BIT-AND|BIT-OR|BIT-XOR|BIT-NOT)(?=\\s)", + "name": "keyword.control.simple.abap" + }, + "comparison_operator": { + "match": "(?i)(?<=\\s)(<|>|<\\=|>\\=|\\=|<>|eq|ne|lt|le|gt|ge|cs|cp|co|cn|ca|na|ns|np|byte-co|byte-cn|byte-ca|byte-na|byte-cs|byte-ns|o|z|m)(?=\\s)", + "name": "keyword.control.simple.abap" + }, + "control_keywords": { + "match": "(?ix)(^|\\s)(\n\t at|case|catch|continue|do|elseif|else|endat|endcase|endcatch|enddo|endif|\n\t endloop|endon|endtry|endwhile|if|loop|on|raise|try|while)(?=\\s|\\.|:)", + "name": "keyword.control.flow.abap" + }, + "generic_names": { + "match": "[A-Za-z_][A-Za-z0-9_]*" + }, + "keywords": { + "patterns": [ + { + "include": "#main_keywords" + }, + { + "include": "#text_symbols" + }, + { + "include": "#control_keywords" + }, + { + "include": "#keywords_followed_by_braces" + } + ] + }, + "logical_operator": { + "match": "(?i)(?<=\\s)(not|or|and)(?=\\s)", + "name": "keyword.control.simple.abap" + }, + "system_fields": { + "match": "(?ix)\\b(sy)-(abcde|batch|binpt|calld|callr|colno|cpage|cprog|cucol|curow|datar|datlo|datum|dayst|dbcnt|dbnam|dbsysc|dyngr|dynnr|fdayw|fdpos|host|index|langu|ldbpg|lilli|linct|linno|linsz|lisel|listi|loopc|lsind|macol|mandt|marow|modno|msgid|msgli|msgno|msgty|msgv[1-4]|opsysc|pagno|pfkey|repid|saprl|scols|slset|spono|srows|staco|staro|stepl|subrc|sysid|tabix|tcode|tfill|timlo|title|tleng|tvar[0-9]|tzone|ucomm|uline|uname|uzeit|vline|wtitl|zonlo)(?=\\.|\\s)", + "captures": { + "1": { + "name": "variable.language.abap" + }, + "2": { + "name": "variable.language.abap" + } + } + }, + "main_keywords": { + "match": "(?ix)(?<=^|\\s)(\nabap-source|\nabstract|\naccept|\naccepting|\naccess|\naccording|\naction|\nactivation|\nactual|\nadd|\nadd-corresponding|\nadjacent|\nalias|\naliases|\nalign|\nall|\nallocate|\nalpha|\namdp|\nanalysis|\nanalyzer|\nappend|\nappending|\napplication|\narchive|\narea|\narithmetic|\nas|\nascending|\nassert|\nassign|\nassigned|\nassigning|\nassociation|\nasynchronous|\nat|\nattributes|\nauthority|\nauthority-check|\nauthorization|\nauto|\nback|\nbackground|\nbackward|\nbadi|\nbase|\nbefore|\nbegin|\nbehavior|\nbetween|\nbinary|\nbit|\nblank|\nblanks|\nblock|\nblocks|\nbound|\nboundaries|\nbounds|\nboxed|\nbreak|\nbreak-point|\nbuffer|\nby|\nbypassing|\nbyte|\nbyte-order|\ncall|\ncalling|\ncast|\ncasting|\ncds|\ncenter|\ncentered|\nchange|\nchanging|\nchannels|\nchar-to-hex|\ncharacter|\ncheck|\ncheckbox|\ncid|\ncircular|\nclass|\nclass-data|\nclass-events|\nclass-method|\nclass-methods|\nclass-pool|\ncleanup|\nclear|\nclient|\nclients|\nclock|\nclone|\nclose|\ncnt|\ncode|\ncollect|\ncolor|\ncolumn|\ncomment|\ncomments|\ncommit|\ncommon|\ncommunication|\ncomparing|\ncomponent|\ncomponents|\ncompression|\ncompute|\nconcatenate|\ncond|\ncondense|\ncondition|\nconnection|\nconstant|\nconstants|\ncontext|\ncontexts|\ncontrol|\ncontrols|\nconv|\nconversion|\nconvert|\ncopy|\ncorresponding|\ncount|\ncountry|\ncover|\ncreate|\ncurrency|\ncurrent|\ncursor|\ncustomer-function|\ndata|\ndatabase|\ndatainfo|\ndataset|\ndate|\ndaylight|\nddl|\ndeallocate|\ndecimals|\ndeclarations|\ndeep|\ndefault|\ndeferred|\ndefine|\ndelete|\ndeleting|\ndemand|\ndescending|\ndescribe|\ndestination|\ndetail|\ndetermine|\ndialog|\ndid|\ndirectory|\ndiscarding|\ndisplay|\ndisplay-mode|\ndistance|\ndistinct|\ndivide|\ndivide-corresponding|\ndummy|\nduplicate|\nduplicates|\nduration|\nduring|\ndynpro|\nedit|\neditor-call|\nempty|\nenabled|\nenabling|\nencoding|\nend|\nend-enhancement-section|\nend-of-definition|\nend-of-page|\nend-of-selection|\nend-test-injection|\nend-test-seam|\nendenhancement|\nendexec|\nendfunction|\nendian|\nending|\nendmodule|\nendprovide|\nendselect|\nendwith|\nengineering|\nenhancement|\nenhancement-point|\nenhancement-section|\nenhancements|\nentities|\nentity|\nentries|\nentry|\nenum|\nenvironment|\nequiv|\nerrors|\nescape|\nescaping|\nevent|\nevents|\nexact|\nexcept|\nexception|\nexception-table|\nexceptions|\nexcluding|\nexec|\nexecute|\nexists|\nexit|\nexit-command|\nexpanding|\nexplicit|\nexponent|\nexport|\nexporting|\nextended|\nextension|\nextract|\nfail|\nfailed|\nfeatures|\nfetch|\nfield|\nfield-groups|\nfield-symbols|\nfields|\nfile|\nfill|\nfilter|\nfilters|\nfinal|\nfind|\nfirst|\nfirst-line|\nfixed-point|\nflush|\nfollowing|\nfor|\nformat|\nforward|\nfound|\nframe|\nframes|\nfree|\nfrom|\nfull|\nfunction|\nfunction-pool|\ngenerate|\nget|\ngiving|\ngraph|\ngroup|\ngroups|\nhandle|\nhandler|\nhashed|\nhaving|\nheader|\nheaders|\nheading|\nhelp-id|\nhelp-request|\nhide|\nhint|\nhold|\nhotspot|\nicon|\nid|\nidentification|\nidentifier|\nignore|\nignoring|\nimmediately|\nimplemented|\nimplicit|\nimport|\nimporting|\nin|\ninactive|\nincl|\ninclude|\nincludes|\nincrement|\nindex|\nindex-line|\nindicators|\ninfotypes|\ninheriting|\ninit|\ninitial|\ninitialization|\ninner|\ninput|\ninsert|\ninstance|\ninstances|\nintensified|\ninterface|\ninterface-pool|\ninterfaces|\ninternal|\nintervals|\ninto|\ninverse|\ninverted-date|\nis|\niso|\njob|\njoin|\nkeep|\nkeeping|\nkernel|\nkey|\nkeys|\nkeywords|\nkind|\nlanguage|\nlast|\nlate|\nlayout|\nleading|\nleave|\nleft|\nleft-justified|\nleftplus|\nleftspace|\nlegacy|\nlength|\nlet|\nlevel|\nlevels|\nlike|\nline|\nline-count|\nline-selection|\nline-size|\nlinefeed|\nlines|\nlink|\nlist|\nlist-processing|\nlistbox|\nload|\nload-of-program|\nlocal|\nlocale|\nlock|\nlocks|\nlog-point|\nlogical|\nlower|\nmapped|\nmapping|\nmargin|\nmark|\nmask|\nmatch|\nmatchcode|\nmaximum|\nmembers|\nmemory|\nmesh|\nmessage|\nmessage-id|\nmessages|\nmessaging|\nmethod|\nmethods|\nmode|\nmodif|\nmodifier|\nmodify|\nmodule|\nmove|\nmove-corresponding|\nmultiply|\nmultiply-corresponding|\nname|\nnametab|\nnative|\nnested|\nnesting|\nnew|\nnew-line|\nnew-page|\nnew-section|\nnext|\nno|\nno-display|\nno-extension|\nno-gap|\nno-gaps|\nno-grouping|\nno-heading|\nno-scrolling|\nno-sign|\nno-title|\nno-zero|\nnodes|\nnon-unicode|\nnon-unique|\nnumber|\nobject|\nobjects|\nobjmgr|\nobligatory|\noccurence|\noccurences|\noccurrence|\noccurrences|\noccurs|\nof|\noffset|\non|\nonly|\nopen|\noptional|\noption|\noptions|\norder|\nothers|\nout|\nouter|\noutput|\noutput-length|\noverflow|\noverlay|\npack|\npackage|\npad|\npadding|\npage|\nparameter|\nparameter-table|\nparameters|\npart|\npartially|\npcre|\nperform|\nperforming|\npermissions|\npf-status|\nplaces|\npool|\nposition|\npragmas|\npreceeding|\nprecompiled|\npreferred|\npreserving|\nprimary|\nprint|\nprint-control|\nprivate|\nprivileged|\nprocedure|\nprogram|\nproperty|\nprotected|\nprovide|\npush|\npushbutton|\nput|\nquery|\nqueue-only|\nqueueonly|\nquickinfo|\nradiobutton|\nraising|\nrange|\nranges|\nread|\nread-only|\nreceive|\nreceived|\nreceiving|\nredefinition|\nreduce|\nref|\nreference|\nrefresh|\nregex|\nreject|\nrenaming|\nreplace|\nreplacement|\nreplacing|\nreport|\nreported|\nrequest|\nrequested|\nrequired|\nreserve|\nreset|\nresolution|\nrespecting|\nresponse|\nrestore|\nresult|\nresults|\nresumable|\nresume|\nretry|\nreturn|\nreturning|\nright|\nright-justified|\nrightplus|\nrightspace|\nrollback|\nrows|\nrp-provide-from-last|\nrun|\nsap|\nsap-spool|\nsave|\nsaving|\nscale_preserving|\nscale_preserving_scientific|\nscan|\nscientific|\nscientific_with_leading_zero|\nscreen|\nscroll|\nscroll-boundary|\nscrolling|\nsearch|\nseconds|\nsection|\nselect|\nselect-options|\nselection|\nselection-screen|\nselection-set|\nselection-sets|\nselection-table|\nselections|\nsend|\nseparate|\nseparated|\nsession|\nset|\nshared|\nshift|\nshortdump|\nshortdump-id|\nsign|\nsign_as_postfix|\nsimple|\nsimulation|\nsingle|\nsize|\nskip|\nskipping|\nsmart|\nsome|\nsort|\nsortable|\nsorted|\nsource|\nspecified|\nsplit|\nspool|\nspots|\nsql|\nstable|\nstamp|\nstandard|\nstart-of-selection|\nstarting|\nstate|\nstatement|\nstatements|\nstatic|\nstatics|\nstatusinfo|\nstep|\nstep-loop|\nstop|\nstructure|\nstructures|\nstyle|\nsubkey|\nsubmatches|\nsubmit|\nsubroutine|\nsubscreen|\nsubstring|\nsubtract|\nsubtract-corresponding|\nsuffix|\nsum|\nsummary|\nsupplied|\nsupply|\nsuppress|\nswitch|\nsymbol|\nsyntax-check|\nsyntax-trace|\nsystem-call|\nsystem-exceptions|\ntab|\ntabbed|\ntable|\ntables|\ntableview|\ntabstrip|\ntarget|\ntask|\ntasks|\ntest|\ntest-injection|\ntest-seam|\ntesting|\ntext|\ntextpool|\nthen|\nthrow|\ntime|\ntimes|\ntimestamp|\ntimezone|\ntitle|\ntitlebar|\nto|\ntokens|\ntop-lines|\ntop-of-page|\ntrace-file|\ntrace-table|\ntrailing|\ntransaction|\ntransfer|\ntransformation|\ntranslate|\ntransporting|\ntrmac|\ntruncate|\ntruncation|\ntype|\ntype-pool|\ntype-pools|\ntypes|\nuline|\nunassign|\nunbounded|\nunder|\nunicode|\nunion|\nunique|\nunit|\nunix|\nunpack|\nuntil|\nunwind|\nup|\nupdate|\nupper|\nuser|\nuser-command|\nusing|\nutf-8|\nuuid|\nvalid|\nvalidate|\nvalue|\nvalue-request|\nvalues|\nvary|\nvarying|\nversion|\nvia|\nvisible|\nwait|\nwhen|\nwhere|\nwidth|\nwindow|\nwindows|\nwith|\nwith-heading|\nwith-title|\nwithout|\nword|\nwork|\nworkspace|\nwrite|\nxml|\nxsd|\nyes|\nzero|\nzone\n\t\t \t)(?=\\s|\\.|:|,)", + "name": "keyword.control.simple.abap" + }, + "text_symbols": { + "match": "(?ix)(?<=^|\\s)(text)-([A-Z0-9]{1,3})(?=\\s|\\.|:|,)", + "captures": { + "1": { + "name": "keyword.control.simple.abap" + }, + "2": { + "name": "constant.numeric.abap" + } + } + }, + "keywords_followed_by_braces": { + "match": "(?ix)\\b(data|value|field-symbol|final|reference|resumable)\\((?)\\)", + "captures": { + "1": { + "name": "keyword.control.simple.abap" + }, + "2": { + "name": "variable.other.abap" + } + } + }, + "operators": { + "patterns": [ + { + "include": "#other_operator" + }, + { + "include": "#arithmetic_operator" + }, + { + "include": "#comparison_operator" + }, + { + "include": "#logical_operator" + } + ] + }, + "other_operator": { + "match": "(?<=\\s)(&&|&|\\?=|\\+=|-=|\\/=|\\*=|&&=|&=)(?=\\s)", + "name": "keyword.control.simple.abap" + }, + "builtin_functions": { + "match": "(?ix)(?<=\\s)(abs|sign|ceil|floor|trunc|frac|acos|asin|atan|cos|sin|tan|cosh|sinh|tanh|exp|log|log10|sqrt|strlen|xstrlen|charlen|lines|numofchar|dbmaxlen|round|rescale|nmax|nmin|cmax|cmin|boolc|boolx|xsdbool|contains|contains_any_of|contains_any_not_of|matches|line_exists|ipow|char_off|count|count_any_of|count_any_not_of|distance|condense|concat_lines_of|escape|find|find_end|find_any_of|find_any_not_of|insert|match|repeat|replace|reverse|segment|shift_left|shift_right|substring|substring_after|substring_from|substring_before|substring_to|to_upper|to_lower|to_mixed|from_mixed|translate|bit-set|line_index)(?=\\()", + "name": "entity.name.function.builtin.abap" + }, + "sql_types": { + "match": "(?ix)(?<=\\s)(char|clnt|cuky|curr|datn|dats|dec|decfloat16|decfloat34|fltp|int1|int2|int4|int8|lang|numc|quan|raw|sstring|timn|tims|unit|utclong)(?=\\s|\\(|\\))", + "name": "entity.name.type.sql.abap" + }, + "sql_functions": { + "match": "(?ix)(?<=\\s)(\nabap_system_timezone|\nabap_user_timezone|\nabs|\nadd_days|\nadd_months|\nallow_precision_loss|\nas_geo_json|\navg|\nbintohex|\ncast|\nceil|\ncoalesce|\nconcat_with_space|\nconcat|\ncorr_spearman|\ncorr|\ncount|\ncurrency_conversion|\ndatn_add_days|\ndatn_add_months|\ndatn_days_between|\ndats_add_days|\ndats_add_months|\ndats_days_between|\ndats_from_datn|\ndats_is_valid|\ndats_tims_to_tstmp|\ndats_to_datn|\ndayname|\ndays_between|\ndense_rank|\ndivision|\ndiv|\nextract_day|\nextract_hour|\nextract_minute|\nextract_month|\nextract_second|\nextract_year|\nfirst_value|\nfloor|\ngrouping|\nhextobin|\ninitcap|\ninstr|\nis_valid|\nlag|\nlast_value|\nlead|\nleft|\nlength|\nlike_regexpr|\nlocate_regexpr_after|\nlocate_regexpr|\nlocate|\nlower|\nlpad|\nltrim|\nmax|\nmedian|\nmin|\nmod|\nmonthname|\nntile|\noccurrences_regexpr|\nover|\nproduct|\nrank|\nreplace_regexpr|\nreplace|\nrigth|\nround|\nrow_number|\nrpad|\nrtrim|\nstddev|\nstring_agg|\nsubstring_regexpr|\nsubstring|\nsum|\ntims_from_timn|\ntims_is_valid|\ntims_to_timn|\nto_blob|\nto_clob|\ntstmp_add_seconds|\ntstmp_current_utctimestamp|\ntstmp_is_valid|\ntstmp_seconds_between|\ntstmp_to_dats|\ntstmp_to_dst|\ntstmp_to_tims|\ntstmpl_from_utcl|\ntstmpl_to_utcl|\nunit_conversion|\nupper|\nutcl_add_seconds|\nutcl_current|\nutcl_seconds_between|\nuuid|\nvar|\nweekday\n )(?=\\()", + "name": "entity.name.function.sql.abap" + } + }, + "scopeName": "source.abap", + "uuid": "0357FFB4-EFFF-4DE9-8371-B0F9C8DF1B21" +} diff --git a/src/lib/shiki/languages/actionscript-3.tmLanguage.json b/src/lib/shiki/languages/actionscript-3.tmLanguage.json new file mode 100644 index 0000000..75210d9 --- /dev/null +++ b/src/lib/shiki/languages/actionscript-3.tmLanguage.json @@ -0,0 +1,949 @@ +{ + "fileTypes": ["as"], + "name": "actionscript-3", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#package" + }, + { + "include": "#class" + }, + { + "include": "#interface" + }, + { + "include": "#namespace_declaration" + }, + { + "include": "#import" + }, + { + "include": "#mxml" + }, + { + "include": "#strings" + }, + { + "include": "#regexp" + }, + { + "include": "#variable_declaration" + }, + { + "include": "#numbers" + }, + { + "include": "#primitive_types" + }, + { + "include": "#primitive_error_types" + }, + { + "include": "#dynamic_type" + }, + { + "include": "#primitive_functions" + }, + { + "include": "#language_constants" + }, + { + "include": "#language_variables" + }, + { + "include": "#guess_type" + }, + { + "include": "#guess_constant" + }, + { + "include": "#other_operators" + }, + { + "include": "#arithmetic_operators" + }, + { + "include": "#logical_operators" + }, + { + "include": "#array_access_operators" + }, + { + "include": "#vector_creation_operators" + }, + { + "include": "#control_keywords" + }, + { + "include": "#other_keywords" + }, + { + "include": "#use_namespace" + }, + { + "include": "#functions" + } + ], + "repository": { + "arithmetic_operators": { + "match": "(\\+|\\-|/|%|(?)?)|(\\*)))?(?:\\s*(=))?", + "end": ",|(?=\\))", + "beginCaptures": { + "1": { + "name": "keyword.operator.actionscript.3" + }, + "2": { + "name": "variable.parameter.actionscript.3" + }, + "3": { + "name": "keyword.operator.actionscript.3" + }, + "4": { + "name": "support.type.actionscript.3" + }, + "5": { + "name": "support.type.actionscript.3" + }, + "6": { + "name": "support.type.actionscript.3" + }, + "7": { + "name": "keyword.operator.actionscript.3" + } + }, + "patterns": [ + { + "include": "#strings" + }, + { + "include": "#numbers" + }, + { + "include": "#language_constants" + }, + { + "include": "#comments" + }, + { + "include": "#primitive_types" + }, + { + "include": "#primitive_error_types" + }, + { + "include": "#dynamic_type" + }, + { + "include": "#guess_type" + }, + { + "include": "#guess_constant" + } + ] + }, + "functions": { + "begin": "(?x) \\b(function)\\b (?:\\s+\\b(get|set)\\b\\s+)? \\s* ([a-zA-Z0-9_\\$]+\\b)?", + "beginCaptures": { + "1": { + "name": "storage.type.function.actionscript.3" + }, + "2": { + "name": "storage.modifier.actionscript.3" + }, + "3": { + "name": "entity.name.function.actionscript.3" + } + }, + "end": "($|;|(?=\\{))", + "name": "meta.function.actionscript.3", + "patterns": [ + { + "include": "#function_arguments" + }, + { + "include": "#return_type" + }, + { + "include": "#comments" + } + ] + }, + "guess_constant": { + "captures": { + "1": { + "name": "constant.other.actionscript.3" + } + }, + "comment": "Following convention, let's guess that anything in all caps/digits (possible underscores) is a constant.", + "match": "\\b([A-Z\\$][A-Z0-9_]+)\\b" + }, + "guess_type": { + "captures": { + "1": { + "name": "support.type.actionscript.3" + } + }, + "comment": "Following convention, let's guess that any word starting with one or more capital letters (that contains at least some lower-case letters so that constants aren't detected) refers to a class/type. May be fully-qualified.", + "match": "\\b((?:[A-Za-z0-9_\\$]+\\.)*[A-Z][A-Z0-9]*[a-z]+[A-Za-z0-9_\\$]*)\\b" + }, + "implements": { + "captures": { + "1": { + "name": "keyword.other.actionscript.3" + }, + "2": { + "name": "entity.other.inherited-class.actionscript.3" + }, + "3": { + "name": "entity.other.inherited-class.actionscript.3" + } + }, + "match": "(?x) \\b(implements)\\b \\s+ ([\\.\\w]+) \\s* (?:, \\s* ([\\.\\w]+))* \\s*", + "name": "meta.implements.actionscript.3" + }, + "import": { + "captures": { + "2": { + "name": "keyword.control.import.actionscript.3" + }, + "3": { + "name": "support.type.actionscript.3" + } + }, + "match": "(?x) (^|\\s+|;) \\b(import)\\b \\s+ ([A-Za-z0-9\\$_\\.]+(?:\\.\\*)?) \\s* (?=;|$)", + "name": "meta.import.actionscript.3" + }, + "interface": { + "begin": "(?x) (^|\\s+|;) (\\b(internal|public)\\b\\s+)? (?=\\binterface\\b)", + "beginCaptures": { + "3": { + "name": "storage.modifier.actionscript.3" + } + }, + "end": "\\}", + "name": "meta.interface.actionscript.3", + "patterns": [ + { + "include": "#interface_declaration" + }, + { + "include": "#metadata" + }, + { + "include": "#functions" + }, + { + "include": "#comments" + } + ] + }, + "interface_declaration": { + "begin": "(?x) \\b(interface)\\b \\s+ ([\\.\\w]+)", + "beginCaptures": { + "1": { + "name": "storage.type.interface.actionscript.3" + }, + "2": { + "name": "entity.name.class.actionscript.3" + } + }, + "end": "\\{", + "name": "meta.class_declaration.actionscript.3", + "patterns": [ + { + "include": "#extends" + }, + { + "include": "#comments" + } + ] + }, + "language_constants": { + "match": "\\b(true|false|null|Infinity|-Infinity|NaN|undefined)\\b", + "name": "constant.language.actionscript.3" + }, + "language_variables": { + "match": "\\b(super|this|arguments)\\b", + "name": "variable.language.actionscript.3" + }, + "logical_operators": { + "match": "(&|<|~|\\||>|\\^|!|\\?)", + "name": "keyword.operator.actionscript.3" + }, + "metadata_info": { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#strings" + }, + { + "captures": { + "1": { + "name": "variable.parameter.actionscript.3" + }, + "2": { + "name": "keyword.operator.actionscript.3" + } + }, + "match": "(\\w+)\\s*(=)" + } + ] + }, + "method": { + "begin": "(?x) (^|\\s+) ((\\w+)\\s+)? ((\\w+)\\s+)? ((\\w+)\\s+)? ((\\w+)\\s+)? (?=\\bfunction\\b)", + "beginCaptures": { + "3": { + "name": "storage.modifier.actionscript.3" + }, + "5": { + "name": "storage.modifier.actionscript.3" + }, + "7": { + "name": "storage.modifier.actionscript.3" + }, + "8": { + "name": "storage.modifier.actionscript.3" + } + }, + "end": "(?<=(;|\\}))", + "name": "meta.method.actionscript.3", + "patterns": [ + { + "include": "#functions" + }, + { + "include": "#code_block" + } + ] + }, + "mxml": { + "begin": "", + "name": "meta.cdata.actionscript.3", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#import" + }, + { + "include": "#metadata" + }, + { + "include": "#class" + }, + { + "include": "#namespace_declaration" + }, + { + "include": "#use_namespace" + }, + { + "include": "#class_declaration" + }, + { + "include": "#method" + }, + { + "include": "#comments" + }, + { + "include": "#strings" + }, + { + "include": "#regexp" + }, + { + "include": "#numbers" + }, + { + "include": "#primitive_types" + }, + { + "include": "#primitive_error_types" + }, + { + "include": "#dynamic_type" + }, + { + "include": "#primitive_functions" + }, + { + "include": "#language_constants" + }, + { + "include": "#language_variables" + }, + { + "include": "#other_keywords" + }, + { + "include": "#guess_type" + }, + { + "include": "#guess_constant" + }, + { + "include": "#other_operators" + }, + { + "include": "#arithmetic_operators" + }, + { + "include": "#array_access_operators" + }, + { + "include": "#vector_creation_operators" + }, + { + "include": "#variable_declaration" + } + ] + }, + "numbers": { + "match": "\\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)?\\b", + "name": "constant.numeric.actionscript.3" + }, + "object_literal": { + "begin": "\\{", + "end": "\\}", + "name": "meta.object_literal.actionscript.3", + "patterns": [ + { + "include": "#object_literal" + }, + { + "include": "#comments" + }, + { + "include": "#strings" + }, + { + "include": "#regexp" + }, + { + "include": "#numbers" + }, + { + "include": "#primitive_types" + }, + { + "include": "#primitive_error_types" + }, + { + "include": "#dynamic_type" + }, + { + "include": "#primitive_functions" + }, + { + "include": "#language_constants" + }, + { + "include": "#language_variables" + }, + { + "include": "#guess_type" + }, + { + "include": "#guess_constant" + }, + { + "include": "#array_access_operators" + }, + { + "include": "#vector_creation_operators" + }, + { + "include": "#functions" + } + ] + }, + "other_keywords": { + "match": "\\b(as|delete|in|instanceof|is|native|new|to|typeof)\\b", + "name": "keyword.other.actionscript.3" + }, + "other_operators": { + "match": "(\\.|=)", + "name": "keyword.operator.actionscript.3" + }, + "package": { + "begin": "(^|\\s+)(package)\\b", + "beginCaptures": { + "2": { + "name": "keyword.other.actionscript.3" + } + }, + "end": "\\}", + "name": "meta.package.actionscript.3", + "patterns": [ + { + "include": "#package_name" + }, + { + "include": "#variable_declaration" + }, + { + "include": "#method" + }, + { + "include": "#comments" + }, + { + "include": "#return_type" + }, + { + "include": "#import" + }, + { + "include": "#use_namespace" + }, + { + "include": "#strings" + }, + { + "include": "#numbers" + }, + { + "include": "#language_constants" + }, + { + "include": "#metadata" + }, + { + "include": "#class" + }, + { + "include": "#interface" + }, + { + "include": "#namespace_declaration" + } + ] + }, + "package_name": { + "begin": "(?<=package)\\s+([\\w\\._]*)\\b", + "end": "\\{", + "name": "meta.package_name.actionscript.3" + }, + "primitive_types": { + "captures": { + "1": { + "name": "support.class.builtin.actionscript.3" + } + }, + "match": "\\b(Array|Boolean|Class|Date|Function|int|JSON|Math|Namespace|Number|Object|QName|RegExp|String|uint|Vector|XML|XMLList|\\*(?<=a))\\b" + }, + "primitive_error_types": { + "captures": { + "1": { + "name": "support.class.error.actionscript.3" + } + }, + "match": "\\b((Argument|Definition|Eval|Internal|Range|Reference|Security|Syntax|Type|URI|Verify)?Error)\\b" + }, + "primitive_functions": { + "captures": { + "1": { + "name": "support.function.actionscript.3" + } + }, + "match": "\\b(decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|isFinite|isNaN|isXMLName|parseFloat|parseInt|trace|unescape)(?=\\s*\\()" + }, + "regexp": { + "begin": "(?<=[=(:,\\[]|^|return|&&|\\|\\||!)\\s*(/)(?![/*+{}?])", + "end": "$|(/)[igm]*", + "name": "string.regex.actionscript.3", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.actionscript.3" + }, + { + "match": "\\[(\\\\\\]|[^\\]])*\\]", + "name": "constant.character.class.actionscript.3" + } + ] + }, + "return_type": { + "captures": { + "1": { + "name": "keyword.operator.actionscript.3" + }, + "2": { + "name": "support.type.actionscript.3" + }, + "3": { + "name": "support.type.actionscript.3" + }, + "4": { + "name": "support.type.actionscript.3" + } + }, + "match": "(\\:)\\s*(?:([A-Za-z\\$][A-Za-z0-9_\\$]+(?:\\.[A-Za-z\\$][A-Za-z0-9_\\$]+)*)(?:\\.<([A-Za-z\\$][A-Za-z0-9_\\$]+(?:\\.[A-Za-z\\$][A-Za-z0-9_\\$]+)*)>)?)|(\\*)" + }, + "strings": { + "patterns": [ + { + "begin": "\"", + "end": "\"", + "name": "string.quoted.double.actionscript.3", + "patterns": [ + { + "include": "#escapes" + } + ] + }, + { + "begin": "'", + "end": "'", + "name": "string.quoted.single.actionscript.3", + "patterns": [ + { + "include": "#escapes" + } + ] + } + ] + }, + "metadata": { + "begin": "\\[\\s*\\b(\\w+)\\b", + "beginCaptures": { + "1": { + "name": "keyword.other.actionscript.3" + } + }, + "end": "\\]", + "name": "meta.metadata_info.actionscript.3", + "patterns": [ + { + "include": "#metadata_info" + } + ] + }, + "use_namespace": { + "captures": { + "2": { + "name": "keyword.other.actionscript.3" + }, + "3": { + "name": "keyword.other.actionscript.3" + }, + "4": { + "name": "storage.modifier.actionscript.3" + } + }, + "match": "(?x) (^|\\s+|;) (use\\s+)? (namespace) \\s+ (\\w+) \\s* (;|$)" + }, + "variable_declaration": { + "captures": { + "2": { + "name": "storage.modifier.actionscript.3" + }, + "4": { + "name": "storage.modifier.actionscript.3" + }, + "6": { + "name": "storage.modifier.actionscript.3" + }, + "7": { + "name": "storage.modifier.actionscript.3" + }, + "8": { + "name": "keyword.operator.actionscript.3" + } + }, + "match": "(?x) ((static)\\s+)? ((\\w+)\\s+)? ((static)\\s+)? (const|var) \\s+ (?:[A-Za-z0-9_\\$]+)(?:\\s*(:))?", + "name": "meta.variable_declaration.actionscript.3" + }, + "vector_creation_operators": { + "match": "(<|>)", + "name": "keyword.operator.actionscript.3" + } + }, + "scopeName": "source.actionscript.3", + "uuid": "aa6f75ba-ab10-466e-8c6f-28c69aca1e9d" +} diff --git a/src/lib/shiki/languages/ada.tmLanguage.json b/src/lib/shiki/languages/ada.tmLanguage.json new file mode 100644 index 0000000..2c7ddf5 --- /dev/null +++ b/src/lib/shiki/languages/ada.tmLanguage.json @@ -0,0 +1,3871 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "ada", + "patterns": [ + { + "include": "#library_unit" + }, + { + "include": "#comment" + }, + { + "include": "#use_clause" + }, + { + "include": "#with_clause" + }, + { + "include": "#pragma" + }, + { + "include": "#keyword" + } + ], + "repository": { + "abort_statement": { + "name": "meta.statement.abort.ada", + "begin": "(?i)\\babort\\b", + "end": ";", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "name": "punctuation.ada", + "match": "," + }, + { + "name": "entity.name.task.ada", + "match": "\\b(\\w|\\d|\\.|_)+\\b" + } + ] + }, + "accept_statement": { + "name": "meta.statement.accept.ada", + "begin": "(?i)\\b(accept)\\s+((?:\\w|\\d|\\.|_)+)\\b", + "end": "(?i)(?:\\b(end)\\s*(\\s\\2)?\\s*)?(;)", + "beginCaptures": { + "1": { + "name": "keyword.control.ada" + }, + "2": { + "name": "entity.name.accept.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.control.ada" + }, + "2": { + "name": "entity.name.accept.ada" + }, + "3": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bdo\\b", + "end": "(?i)\\b(?=end)\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "patterns": [ + { + "include": "#statement" + } + ] + }, + { + "include": "#parameter_profile" + } + ] + }, + "access_definition": { + "name": "meta.declaration.access.definition.ada", + "match": "(?i)(not\\s+null\\s+)?(access)\\s+(constant\\s+)?((?:\\w|\\d|\\.|_)+)\\b", + "captures": { + "1": { + "name": "storage.visibility.ada" + }, + "2": { + "name": "storage.visibility.ada" + }, + "3": { + "name": "storage.modifier.ada" + }, + "4": { + "name": "entity.name.type.ada" + } + } + }, + "access_type_definition": { + "name": "meta.declaration.type.definition.access.ada", + "begin": "(?i)\\b(not\\s+null\\s+)?(access)\\b", + "end": "(?i)(?=(with|;))", + "beginCaptures": { + "1": { + "name": "storage.visibility.ada" + }, + "2": { + "name": "storage.visibility.ada" + } + }, + "patterns": [ + { + "name": "storage.visibility.ada", + "match": "(?i)\\ball\\b" + }, + { + "name": "storage.modifier.ada", + "match": "(?i)\\bconstant\\b" + }, + { + "include": "#subtype_mark" + } + ] + }, + "actual_parameter_part": { + "begin": "\\(", + "end": "\\)", + "captures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "name": "punctuation.ada", + "match": "," + }, + { + "include": "#parameter_association" + } + ] + }, + "adding_operator": { + "name": "keyword.operator.adding.ada", + "match": "(\\+|-|\\&)" + }, + "array_aggregate": { + "name": "meta.definition.array.aggregate.ada", + "begin": "\\(", + "end": "\\)", + "captures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "name": "punctuation.ada", + "match": "," + }, + { + "include": "#positional_array_aggregate" + }, + { + "include": "#array_component_association" + } + ] + }, + "array_component_association": { + "name": "meta.definition.array.aggregate.component.ada", + "match": "(?i)\\b([^(=>)]*)\\s*(=>)\\s*([^,\\)]+)", + "captures": { + "1": { + "name": "variable.name.ada" + }, + "2": { + "name": "keyword.other.ada" + }, + "3": { + "patterns": [ + { + "name": "keyword.modifier.unknown.ada", + "match": "<>" + }, + { + "include": "#expression" + } + ] + } + } + }, + "array_dimensions": { + "name": "meta.declaration.type.definition.array.dimensions.ada", + "begin": "\\(", + "end": "\\)", + "captures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "name": "punctuation.ada", + "match": "," + }, + { + "name": "storage.modifier.ada", + "match": "(?i)\\brange\\b" + }, + { + "name": "keyword.modifier.unknown.ada", + "match": "<>" + }, + { + "name": "keyword.ada", + "match": "\\.\\." + }, + { + "include": "#expression" + }, + { + "patterns": [ + { + "include": "#subtype_mark" + } + ] + } + ] + }, + "array_type_definition": { + "name": "meta.declaration.type.definition.array.ada", + "begin": "(?i)\\barray\\b", + "end": "(?i)(?=(with|;))", + "beginCaptures": { + "0": { + "name": "storage.modifier.ada" + } + }, + "patterns": [ + { + "include": "#array_dimensions" + }, + { + "name": "storage.modifier.ada", + "match": "(?i)\\bof\\b" + }, + { + "name": "storage.visibility.ada", + "match": "(?i)\\baliased\\b" + }, + { + "include": "#access_definition" + }, + { + "include": "#subtype_mark" + } + ] + }, + "aspect_clause": { + "name": "meta.aspect.clause.ada", + "begin": "(?i)\\b(for)\\b", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "patterns": [ + { + "include": "#subtype_mark" + } + ] + }, + "3": { + "name": "punctuation.ada" + }, + "5": { + "name": "keyword.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\buse\\b", + "end": "(?=;)", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "include": "#record_representation_clause" + }, + { + "include": "#array_aggregate" + }, + { + "include": "#expression" + } + ] + }, + { + "begin": "(?i)(?<=for)", + "end": "(?i)(?=use)", + "captures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "match": "((?:\\w|\\d|_)+)('((?:\\w|\\d|_)+))?", + "captures": { + "1": { + "patterns": [ + { + "include": "#subtype_mark" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#attribute" + } + ] + } + } + } + ] + } + ] + }, + "aspect_definition": { + "name": "meta.aspect.definition.ada", + "begin": "=>", + "end": "(?i)(?=(,|;|\\bis\\b))", + "beginCaptures": { + "0": { + "name": "keyword.other.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "aspect_mark": { + "name": "meta.aspect.mark.ada", + "match": "(?i)\\b((?:\\w|\\d|\\.|_)+)(?:(')(class))?\\b", + "captures": { + "1": { + "name": "keyword.control.directive.ada" + }, + "2": { + "name": "punctuation.ada" + }, + "3": { + "name": "entity.other.attribute-name.ada" + } + } + }, + "aspect_specification": { + "name": "meta.aspect.specification.ada", + "begin": "(?i)\\bwith\\b", + "end": "(?i)(?=(;|\\bis\\b))", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "name": "punctuation.ada", + "match": "," + }, + { + "match": "(?i)\\b(null)\\s+(record)\\b", + "captures": { + "1": { + "name": "storage.modifier.ada" + }, + "2": { + "name": "storage.modifier.ada" + } + } + }, + { + "begin": "(?i)\\brecord\\b", + "end": "(?i)\\b(end)\\s+(record)\\b", + "beginCaptures": { + "0": { + "name": "storage.modifier.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "storage.modifier.ada" + } + }, + "patterns": [ + { + "include": "#component_item" + } + ] + }, + { + "match": "(?i)\\bprivate\\b", + "captures": { + "0": { + "name": "storage.visibility.ada" + } + } + }, + { + "include": "#aspect_definition" + }, + { + "include": "#aspect_mark" + }, + { + "include": "#comment" + } + ] + }, + "assignment_statement": { + "name": "meta.statement.assignment.ada", + "begin": "\\b((?:\\w|\\d|\\.|_|\\(|\\)|\"|'|\\s)+)\\s*(:=)", + "end": ";", + "beginCaptures": { + "1": { + "patterns": [ + { + "match": "((?:\\w|\\d|\\.|_)+)", + "name": "variable.name.ada" + }, + { + "begin": "\\(", + "end": "\\)", + "captures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + } + ] + }, + "2": { + "name": "keyword.operator.new.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "include": "#expression" + }, + { + "include": "#comment" + } + ] + }, + "attribute": { + "name": "meta.attribute.ada", + "match": "(')((?:\\w|\\d|_)+)\\b", + "captures": { + "1": { + "name": "punctuation.ada" + }, + "2": { + "name": "entity.other.attribute-name.ada" + } + } + }, + "based_literal": { + "name": "constant.numeric.ada", + "match": "(?i)(\\d(?:(_)?\\d)*#)[0-9a-f](?:(_)?[0-9a-f])*(?:(\\.)[0-9a-f](?:(_)?[0-9a-f])*)?(#)([eE](?:\\+|\\-)?\\d(?:_?\\d)*)?", + "captures": { + "1": { + "name": "constant.numeric.base.ada" + }, + "2": { + "name": "punctuation.ada" + }, + "3": { + "name": "punctuation.ada" + }, + "4": { + "name": "punctuation.radix-point.ada" + }, + "5": { + "name": "punctuation.ada" + }, + "6": { + "name": "constant.numeric.base.ada" + }, + "7": { + "patterns": [ + { + "include": "#exponent_part" + } + ] + } + } + }, + "basic_declarative_item": { + "patterns": [ + { + "include": "#basic_declaration" + }, + { + "include": "#aspect_clause" + }, + { + "include": "#use_clause" + }, + { + "include": "#keyword" + } + ] + }, + "basic_declaration": { + "patterns": [ + { + "include": "#type_declaration" + }, + { + "include": "#subtype_declaration" + }, + { + "include": "#exception_declaration" + }, + { + "include": "#object_declaration" + }, + { + "include": "#single_protected_declaration" + }, + { + "include": "#single_task_declaration" + }, + { + "include": "#subprogram_specification" + }, + { + "include": "#package_declaration" + }, + { + "include": "#pragma" + }, + { + "include": "#comment" + } + ] + }, + "block_statement": { + "name": "meta.statement.block.ada", + "begin": "(?i)\\bdeclare\\b", + "end": "(?i)\\b(end)(\\s+(?:\\w|\\d|_)+)?\\s*(;)", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "entity.name.label.ada" + }, + "3": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)(?<=declare)", + "end": "(?i)\\bbegin\\b", + "endCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "include": "#body" + }, + { + "include": "#basic_declarative_item" + } + ] + }, + { + "begin": "(?i)(?<=begin)", + "end": "(?i)(?=end)", + "patterns": [ + { + "include": "#statement" + } + ] + } + ] + }, + "body": { + "patterns": [ + { + "include": "#subprogram_body" + }, + { + "include": "#package_body" + }, + { + "include": "#task_body" + }, + { + "include": "#protected_body" + } + ] + }, + "case_statement": { + "name": "meta.statement.case.ada", + "begin": "(?i)\\bcase\\b", + "end": "(?i)\\b(end)\\s+(case)\\s*(;)", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.control.ada" + }, + "2": { + "name": "keyword.control.ada" + }, + "3": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)(?<=case)\\b", + "end": "(?i)\\bis\\b", + "endCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "meta.statement.case.alternative.ada", + "begin": "(?i)\\bwhen\\b", + "end": "=>", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "name": "keyword.modifier.unknown.ada", + "match": "(?i)\\bothers\\b" + }, + { + "name": "punctuation.ada", + "match": "\\|" + }, + { + "include": "#expression" + } + ] + }, + { + "include": "#statement" + } + ] + }, + "character_literal": { + "name": "string.quoted.single.ada", + "match": "'.'", + "captures": { + "0": { + "patterns": [ + { + "name": "punctuation.definition.string.ada", + "match": "'" + } + ] + } + } + }, + "comment": { + "patterns": [ + { + "include": "#preprocessor" + }, + { + "include": "#comment-section" + }, + { + "include": "#comment-doc" + }, + { + "include": "#comment-line" + } + ] + }, + "comment-doc": { + "name": "comment.block.documentation.ada", + "match": "(--)\\s*(@)(\\w+)\\s+(.*)$", + "captures": { + "1": { + "name": "comment.line.double-dash.ada" + }, + "2": { + "name": "punctuation.definition.tag.ada" + }, + "3": { + "name": "entity.name.tag.ada" + }, + "4": { + "name": "comment.line.double-dash.ada" + } + } + }, + "comment-line": { + "name": "comment.line.double-dash.ada", + "match": "--.*$" + }, + "comment-section": { + "name": "comment.line.double-dash.ada", + "match": "--\\s*([^-].*?[^-])\\s*--\\s*$", + "captures": { + "1": { + "name": "entity.name.section.ada" + } + } + }, + "component_clause": { + "name": "meta.aspect.clause.record.representation.component.ada", + "begin": "(?i)\\b((?:\\w|\\d|_)+)\\b", + "beginCaptures": { + "0": { + "name": "variable.name.ada" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bat\\b", + "end": "(?i)\\b(?=range)\\b", + "beginCaptures": { + "0": { + "name": "storage.modifier.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "include": "#range_constraint" + } + ] + }, + "component_declaration": { + "name": "meta.declaration.type.definition.record.component.ada", + "begin": "(?i)\\b((?:\\w|\\d|_)+(?:\\s*,\\s*(?:\\w|\\d|_)+)?)\\s*(:)", + "end": ";", + "beginCaptures": { + "1": { + "patterns": [ + { + "name": "punctuation.ada", + "match": "," + }, + { + "name": "variable.name.ada", + "match": "\\b(\\w|\\d|_)+\\b" + } + ] + }, + "2": { + "name": "punctuation.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "patterns": [ + { + "name": "keyword.operator.new.ada", + "match": ":=" + }, + { + "include": "#expression" + } + ] + }, + { + "include": "#component_definition" + } + ] + }, + "component_definition": { + "patterns": [ + { + "name": "storage.visibility.ada", + "match": "(?i)\\baliased\\b" + }, + { + "name": "storage.modifier.ada", + "match": "(?i)\\brange\\b" + }, + { + "name": "keyword.ada", + "match": "\\.\\." + }, + { + "include": "#access_definition" + }, + { + "include": "#subtype_mark" + } + ] + }, + "component_item": { + "patterns": [ + { + "include": "#component_declaration" + }, + { + "include": "#variant_part" + }, + { + "include": "#comment" + }, + { + "include": "#aspect_clause" + }, + { + "match": "(?i)\\b(null)\\s*(;)", + "captures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "punctuation.ada" + } + } + } + ] + }, + "composite_constraint": { + "name": "meta.declaration.constraint.composite.ada", + "begin": "\\(", + "end": "\\)", + "captures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "name": "punctuation.ada", + "match": "," + }, + { + "name": "keyword.ada", + "match": "\\.\\." + }, + { + "match": "(?i)\\b((?:\\w|\\d|_)+)\\s*(=>)\\s*([^,\\)])+\\b", + "captures": { + "1": { + "name": "variable.name.ada" + }, + "2": { + "name": "keyword.other.ada" + }, + "3": { + "patterns": [ + { + "include": "#expression" + } + ] + } + } + }, + { + "include": "#expression" + } + ] + }, + "decimal_literal": { + "name": "constant.numeric.ada", + "match": "\\d(?:(_)?\\d)*(?:(\\.)\\d(?:(_)?\\d)*)?([eE](?:\\+|\\-)?\\d(?:_?\\d)*)?", + "captures": { + "1": { + "name": "punctuation.ada" + }, + "2": { + "name": "punctuation.radix-point.ada" + }, + "3": { + "name": "punctuation.ada" + }, + "4": { + "patterns": [ + { + "include": "#exponent_part" + } + ] + } + } + }, + "declarative_item": { + "patterns": [ + { + "include": "#body" + }, + { + "include": "#basic_declarative_item" + } + ] + }, + "delay_statement": { + "patterns": [ + { + "include": "#delay_until_statement" + }, + { + "include": "#delay_relative_statement" + } + ] + }, + "delay_until_statement": { + "name": "meta.statement.delay.until.ada", + "begin": "(?i)\\b(delay)\\s+(until)\\b", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.control.ada" + }, + "2": { + "name": "keyword.control.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "delay_relative_statement": { + "begin": "(?i)\\b(delay)\\b", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.control.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "derived_type_definition": { + "name": "meta.declaration.type.definition.derived.ada", + "patterns": [ + { + "begin": "(?i)\\bnew\\b", + "beginCaptures": { + "0": { + "name": "storage.modifier.ada" + } + }, + "end": "(?i)(?=(\\bwith\\b|;))", + "patterns": [ + { + "name": "storage.modifier.ada", + "match": "(?i)\\band\\b" + }, + { + "include": "#subtype_mark" + } + ] + }, + { + "name": "storage.modifier.ada", + "match": "(?i)\\b(abstract|and|limited|tagged)\\b" + }, + { + "name": "storage.visibility.ada", + "match": "(?i)\\bprivate\\b" + }, + { + "include": "#subtype_mark" + } + ] + }, + "discriminant_specification": { + "begin": "(?i)\\b((?:\\w|\\d|_)+(?:\\s*,\\s*(?:\\w|\\d|_)+)?)\\s*(:)", + "end": "(?=(;|\\)))", + "beginCaptures": { + "1": { + "patterns": [ + { + "name": "punctuation.ada", + "match": "," + }, + { + "name": "variable.name.ada", + "match": "\\b(\\w|\\d|_)+\\b" + } + ] + }, + "2": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": ":=", + "end": "(?=(;|\\)))", + "beginCaptures": { + "0": { + "name": "keyword.operator.new.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "match": "(?i)(not\\s+null\\s+)?((?:\\w|\\d|\\.|_)+)\\b", + "captures": { + "1": { + "name": "storage.visibility.ada" + }, + "2": { + "patterns": [ + { + "include": "#subtype_mark" + } + ] + } + } + }, + { + "include": "#access_definition" + } + ] + }, + "entry_body": { + "begin": "(?i)\\b(entry)\\s+((?:\\w|\\d|_)+)\\b", + "end": "(?i)\\b(end)\\s*(\\s\\2)\\s*(;)", + "beginCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "entity.name.entry.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "entity.name.entry.ada" + }, + "3": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bis\\b", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "end": "(?i)\\b(?=begin)\\b", + "patterns": [ + { + "include": "#declarative_item" + } + ] + }, + { + "begin": "(?i)\\bbegin\\b", + "end": "(?i)\\b(?=end)\\b", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "include": "#statement" + } + ] + }, + { + "begin": "(?i)\\bwhen\\b", + "end": "(?i)\\b(?=is)\\b", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "include": "#parameter_profile" + } + ] + }, + "entry_declaration": { + "begin": "(?i)\\b(?:(not)?\\s+(overriding)\\s+)?(entry)\\s+((?:\\w|\\d|_)+)\\b", + "end": ";", + "beginCaptures": { + "1": { + "name": "storage.modifier.ada" + }, + "2": { + "name": "storage.modifier.ada" + }, + "3": { + "name": "keyword.ada" + }, + "4": { + "name": "entity.name.entry.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "include": "#parameter_profile" + } + ] + }, + "enumeration_type_definition": { + "name": "meta.declaration.type.definition.enumeration.ada", + "begin": "\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "name": "punctuation.ada", + "match": "," + }, + { + "name": "variable.name.ada", + "match": "\\b(\\w|\\d|_)+\\b" + }, + { + "include": "#comment" + } + ] + }, + "exception_declaration": { + "name": "meta.declaration.exception.ada", + "begin": "(?i)\\b((?:\\w|\\d|_)+(?:\\s*,\\s*(?:\\w|\\d|_)+)?)\\s*(:)\\s*(exception)", + "beginCaptures": { + "1": { + "patterns": [ + { + "name": "punctuation.ada", + "match": "," + }, + { + "name": "entity.name.exception.ada", + "match": "\\b(\\w|\\d|_)+\\b" + } + ] + }, + "2": { + "name": "punctuation.ada" + }, + "3": { + "name": "storage.type.ada" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "match": "(?i)\\b(renames)\\s+((\\w|\\d|_|\\.)+)", + "name": "entity.name.exception.ada" + } + ] + }, + "exit_statement": { + "name": "meta.statement.exit.ada", + "begin": "(?i)\\bexit\\b", + "end": ";", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bwhen\\b", + "end": "(?=;)", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "match": "(?:\\w|\\d|_)+", + "name": "entity.name.label.ada" + } + ] + }, + "exponent_part": { + "match": "([eE])(\\+|\\-)?\\d(?:(_)?\\d)*", + "captures": { + "1": { + "name": "punctuation.exponent-mark.ada" + }, + "2": { + "name": "keyword.operator.unary.ada" + }, + "3": { + "name": "punctuation.ada" + } + } + }, + "expression": { + "name": "meta.expression.ada", + "patterns": [ + { + "match": "(?i)\\bnull\\b", + "name": "constant.language.ada" + }, + { + "match": "=>(\\+)?", + "name": "keyword.other.ada" + }, + { + "begin": "\\(", + "end": "\\)", + "captures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "match": ",", + "name": "punctuation.ada" + }, + { + "match": "\\.\\.", + "name": "keyword.ada" + }, + { + "include": "#value" + }, + { + "include": "#attribute" + }, + { + "include": "#comment" + }, + { + "include": "#operator" + }, + { + "match": "(?i)\\b(and|or|xor)\\b", + "name": "keyword.ada" + }, + { + "match": "(?i)\\b(if|then|else|elsif|in|for|(?", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "endCaptures": { + "0": { + "name": "keyword.other.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "handled_sequence_of_statements": { + "patterns": [ + { + "name": "meta.handler.exception.ada", + "begin": "(?i)\\bexception\\b", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "end": "(?i)\\b(?=end)\\b", + "patterns": [ + { + "begin": "(?i)\\bwhen\\b", + "end": "=>", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "endCaptures": { + "0": { + "name": "keyword.other.ada" + } + }, + "patterns": [ + { + "match": "\\b((?:\\w|\\d|\\.|_)+)\\s*(:)", + "captures": { + "1": { + "name": "variable.name.ada" + }, + "2": { + "name": "punctuation.ada" + } + } + }, + { + "match": "\\|", + "name": "punctuation.ada" + }, + { + "match": "(?i)\\bothers\\b", + "name": "keyword.ada" + }, + { + "match": "(?:\\w|\\d|\\.|_)+", + "name": "entity.name.exception.ada" + } + ] + }, + { + "include": "#statement" + } + ] + }, + { + "include": "#statement" + } + ] + }, + "highest_precedence_operator": { + "name": "keyword.operator.highest-precedence.ada", + "match": "(?i)(\\*\\*|\\babs\\b|\\bnot\\b)" + }, + "if_statement": { + "name": "meta.statement.if.ada", + "begin": "(?i)\\bif\\b", + "end": "(?i)\\b(end)\\s+(if)\\s*(;)", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.control.ada" + }, + "2": { + "name": "keyword.control.ada" + }, + "3": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\belsif\\b", + "end": "(?i)(?:(?" + }, + { + "name": "keyword.operator.arithmetic.ada", + "match": "(\\+|-|\\*|/)" + }, + { + "name": "keyword.operator.assignment.ada", + "match": ":=" + }, + { + "name": "keyword.operator.logic.ada", + "match": "(=|/=|<|>|<=|>=)" + }, + { + "name": "keyword.operator.concatenation.ada", + "match": "\\&" + } + ] + }, + "known_discriminant_part": { + "name": "meta.declaration.type.discriminant.ada", + "begin": "\\(", + "end": "\\)", + "captures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "name": "punctuation.ada", + "match": ";" + }, + { + "include": "#discriminant_specification" + } + ] + }, + "label": { + "name": "meta.label.ada", + "match": "(<<)?((?:\\w|\\d|_)+)\\s*(:[^=]|>>)", + "captures": { + "1": { + "name": "punctuation.label.ada" + }, + "2": { + "name": "entity.name.label.ada" + }, + "3": { + "name": "punctuation.label.ada" + } + } + }, + "library_unit": { + "name": "meta.library.unit.ada", + "patterns": [ + { + "include": "#package_body" + }, + { + "include": "#package_specification" + }, + { + "include": "#subprogram_body" + } + ] + }, + "loop_statement": { + "patterns": [ + { + "include": "#simple_loop_statement" + }, + { + "include": "#while_loop_statement" + }, + { + "include": "#for_loop_statement" + } + ] + }, + "modular_type_definition": { + "begin": "(?i)\\b(mod)\\b", + "end": "(?i)(?=(with|;))", + "beginCaptures": { + "1": { + "name": "storage.modifier.ada" + } + }, + "patterns": [ + { + "name": "keyword.modifier.unknown.ada", + "match": "<>" + }, + { + "include": "#expression" + } + ] + }, + "multiplying_operator": { + "name": "keyword.operator.multiplying.ada", + "match": "(?i)(\\*|/|\\bmod\\b|\\brem\\b)" + }, + "null_statement": { + "name": "meta.statement.null.ada", + "match": "(?i)\\b(null)\\s*(;)", + "captures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "punctuation.ada" + } + } + }, + "object_declaration": { + "name": "meta.declaration.object.ada", + "begin": "(?i)\\b((?:\\w|\\d|_)+(?:\\s*,\\s*(?:\\w|\\d|_)+)*)\\s*(:)", + "end": "(;)", + "beginCaptures": { + "1": { + "patterns": [ + { + "name": "punctuation.ada", + "match": "," + }, + { + "name": "variable.name.ada", + "match": "\\b(\\w|\\d|_)+\\b" + } + ] + }, + "2": { + "name": "punctuation.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?<=:)", + "end": "(?:(?=;)|(:=)|(\\brenames\\b))", + "endCaptures": { + "1": { + "name": "keyword.operator.new.ada" + }, + "2": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "name": "storage.modifier.ada", + "match": "(?i)\\bconstant\\b" + }, + { + "name": "storage.visibility.ada", + "match": "(?i)\\baliased\\b" + }, + { + "include": "#aspect_specification" + }, + { + "include": "#subtype_mark" + } + ] + }, + { + "begin": "(?<=:=)", + "end": "(?=;)", + "patterns": [ + { + "include": "#aspect_specification" + }, + { + "include": "#expression" + } + ] + }, + { + "begin": "(?<=renames)", + "end": "(?=;)", + "patterns": [ + { + "include": "#aspect_specification" + } + ] + } + ] + }, + "operator": { + "patterns": [ + { + "include": "#highest_precedence_operator" + }, + { + "include": "#multiplying_operator" + }, + { + "include": "#adding_operator" + }, + { + "include": "#relational_operator" + }, + { + "include": "#logical_operator" + } + ] + }, + "package_body": { + "name": "meta.declaration.package.body.ada", + "begin": "(?i)\\b(package)\\s+(body)\\s+((?:\\w|\\d|\\.|_)+)\\b", + "end": "(?i)\\b(end)\\s+(\\3)\\s*(;)", + "beginCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "keyword.ada" + }, + "3": { + "patterns": [ + { + "include": "#package_mark" + } + ] + } + }, + "endCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "patterns": [ + { + "include": "#package_mark" + } + ] + }, + "3": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bbegin\\b", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "end": "(?i)\\b(?=end)\\b", + "patterns": [ + { + "include": "#handled_sequence_of_statements" + } + ] + }, + { + "begin": "(?i)\\bis\\b", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "end": "(?i)(?=(\\bbegin\\b|\\bend\\b))", + "patterns": [ + { + "match": "(?i)\\bprivate\\b", + "name": "keyword.ada" + }, + { + "include": "#declarative_item" + }, + { + "include": "#comment" + } + ] + }, + { + "include": "#aspect_specification" + } + ] + }, + "package_declaration": { + "patterns": [ + { + "include": "#package_specification" + } + ] + }, + "package_mark": { + "name": "entity.name.package.ada", + "match": "\\b(\\w|\\d|\\.|_)+\\b" + }, + "package_specification": { + "name": "meta.declaration.package.specification.ada", + "begin": "(?i)\\b(package)\\s+((?:\\w|\\d|\\.|_)+)\\b", + "end": "(?i)(?:\\b(end)\\s+(\\2)\\s*)?(;)", + "beginCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "patterns": [ + { + "include": "#package_mark" + } + ] + } + }, + "endCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "patterns": [ + { + "include": "#package_mark" + } + ] + }, + "3": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bis\\b", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "end": "(?=(end|;))", + "patterns": [ + { + "name": "meta.declaration.package.generic.ada", + "begin": "(?i)\\bnew\\b", + "beginCaptures": { + "0": { + "name": "keyword.operator.new.ada" + } + }, + "end": "(?=;)", + "patterns": [ + { + "include": "#package_mark" + }, + { + "include": "#actual_parameter_part" + } + ] + }, + { + "match": "(?i)\\bprivate\\b", + "name": "keyword.ada" + }, + { + "include": "#basic_declarative_item" + }, + { + "include": "#comment" + } + ] + }, + { + "include": "#aspect_specification" + } + ] + }, + "parameter_association": { + "patterns": [ + { + "match": "((?:\\w|\\d|_)+)\\s*(=>)", + "captures": { + "1": { + "name": "variable.parameter.ada" + }, + "2": { + "name": "keyword.other.ada" + } + } + }, + { + "include": "#expression" + } + ] + }, + "parameter_profile": { + "begin": "\\(", + "end": "\\)", + "captures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "name": "punctuation.ada", + "match": ";" + }, + { + "include": "#parameter_specification" + } + ] + }, + "parameter_specification": { + "patterns": [ + { + "name": "meta.type.annotation.ada", + "begin": ":(?!=)", + "end": "(?=[:;)])", + "beginCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "name": "keyword.ada", + "match": "(?i)\\b(in|out)\\b" + }, + { + "include": "#subtype_mark" + } + ] + }, + { + "begin": ":=", + "end": "(?=[:;)])", + "beginCaptures": { + "0": { + "name": "keyword.operator.new.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "punctuation.ada", + "match": "," + }, + { + "name": "variable.parameter.ada", + "match": "\\b(?:\\w|\\d|\\.|_)+\\b" + }, + { + "include": "#comment" + } + ] + }, + "pragma": { + "name": "meta.pragma.ada", + "begin": "(?i)\\b(pragma)\\s+((?:\\w|\\d|_)+)\\b", + "end": "(;)", + "beginCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "keyword.control.directive.ada" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "preprocessor": { + "name": "meta.preprocessor.ada", + "patterns": [ + { + "match": "^\\s*(#)(if|elsif)\\s+(.*)$", + "captures": { + "1": { + "name": "punctuation.definition.directive.ada" + }, + "2": { + "name": "keyword.control.directive.conditional.ada" + }, + "3": { + "patterns": [ + { + "include": "#expression" + } + ] + } + } + }, + { + "match": "^\\s*(#)(end if)(;)", + "captures": { + "1": { + "name": "punctuation.definition.directive.ada" + }, + "2": { + "name": "keyword.control.directive.conditional" + }, + "3": { + "name": "punctuation.ada" + } + } + }, + { + "match": "^\\s*(#)(else)", + "captures": { + "1": { + "name": "punctuation.definition.directive.ada" + }, + "2": { + "name": "keyword.control.directive.conditional" + } + } + } + ] + }, + "procedure_body": { + "name": "meta.declaration.procedure.body.ada", + "begin": "(?i)\\b(overriding\\s+)?(procedure)\\s+((?:\\w|\\d|\\.|_)+)\\b", + "end": "(?i)(?:\\b(end)\\s+(\\3)\\s*)?(;)", + "beginCaptures": { + "1": { + "name": "storage.visibility.ada" + }, + "2": { + "name": "keyword.ada" + }, + "3": { + "name": "entity.name.function.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "entity.name.function.ada" + }, + "3": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bis\\b", + "end": "(?i)(?=(with|begin|;))", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "name": "meta.declaration.package.generic.ada", + "begin": "(?i)\\bnew\\b", + "beginCaptures": { + "0": { + "name": "keyword.operator.new.ada" + } + }, + "end": "(?=;)", + "patterns": [ + { + "match": "((?:\\w|\\d|\\.|_)+)", + "name": "entity.name.function.ada" + }, + { + "include": "#actual_parameter_part" + } + ] + }, + { + "match": "(?i)\\b(null|abstract)\\b", + "name": "storage.modifier.ada" + }, + { + "include": "#declarative_item" + } + ] + }, + { + "begin": "(?i)\\bbegin\\b", + "end": "(?i)(?=\\bend\\b)", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "include": "#handled_sequence_of_statements" + } + ] + }, + { + "include": "#subprogram_renaming_declaration" + }, + { + "include": "#aspect_specification" + }, + { + "include": "#parameter_profile" + }, + { + "include": "#comment" + } + ] + }, + "procedure_call_statement": { + "name": "meta.statement.call.ada", + "begin": "(?i)\\b((?:\\w|\\d|_|\\.)+)\\b", + "end": ";", + "beginCaptures": { + "1": { + "name": "entity.name.function.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "include": "#attribute" + }, + { + "include": "#actual_parameter_part" + }, + { + "include": "#comment" + } + ] + }, + "procedure_specification": { + "patterns": [ + { + "include": "#procedure_body" + } + ] + }, + "protected_body": { + "name": "meta.declaration.procedure.body.ada", + "begin": "(?i)\\b(protected)\\s+(body)\\s+((?:\\w|\\d|\\.|_)+)\\b", + "end": "(?i)(?:\\b(end)\\s*(\\s\\3)\\s*)(;)", + "beginCaptures": { + "1": { + "name": "storage.modifier.ada" + }, + "2": { + "name": "keyword.ada" + }, + "3": { + "name": "entity.name.body.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "entity.name.body.ada" + }, + "3": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bis\\b", + "end": "(?i)\\b(?=end)\\b", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "include": "#protected_operation_item" + } + ] + } + ] + }, + "protected_element_declaration": { + "patterns": [ + { + "include": "#subprogram_specification" + }, + { + "include": "#aspect_clause" + }, + { + "include": "#entry_declaration" + }, + { + "include": "#component_declaration" + }, + { + "include": "#pragma" + } + ] + }, + "protected_operation_item": { + "patterns": [ + { + "include": "#subprogram_specification" + }, + { + "include": "#subprogram_body" + }, + { + "include": "#aspect_clause" + }, + { + "include": "#entry_body" + } + ] + }, + "positional_array_aggregate": { + "name": "meta.definition.array.aggregate.positional.ada", + "patterns": [ + { + "match": "(?i)\\b(others)\\s*(=>)\\s*([^,\\)]+)", + "captures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "keyword.other.ada" + }, + "3": { + "patterns": [ + { + "name": "keyword.modifier.unknown.ada", + "match": "<>" + }, + { + "include": "#expression" + } + ] + } + } + }, + { + "include": "#expression" + } + ] + }, + "raise_statement": { + "name": "meta.statement.raise.ada", + "begin": "(?i)\\braise\\b", + "end": ";", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bwith\\b", + "end": "(?=;)", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "entity.name.exception.ada", + "match": "\\b(\\w|\\d|\\.|_)+\\b" + } + ] + }, + "raise_expression": { + "name": "meta.expression.raise.ada", + "begin": "(?i)\\braise\\b", + "end": "(?=;)", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bwith\\b", + "end": "(?=(;|\\))", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "entity.name.exception.ada", + "match": "\\b(\\w|\\d|_)+\\b" + } + ] + }, + "range_constraint": { + "begin": "(?i)\\brange\\b", + "end": "(?=(\\bwith\\b|;))", + "beginCaptures": { + "0": { + "name": "storage.modifier.ada" + } + }, + "patterns": [ + { + "name": "keyword.ada", + "match": "\\.\\." + }, + { + "name": "keyword.modifier.unknown.ada", + "match": "<>" + }, + { + "include": "#expression" + } + ] + }, + "relational_operator": { + "name": "keyword.operator.relational.ada", + "match": "(=|/=|<|<=|>|>=)" + }, + "record_representation_clause": { + "name": "meta.aspect.clause.record.representation.ada", + "begin": "(?i)\\b(record)\\b", + "end": "(?i)\\b(end)\\s+(record)\\b", + "beginCaptures": { + "1": { + "name": "storage.modifier.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "storage.modifier.ada" + } + }, + "patterns": [ + { + "include": "#component_clause" + }, + { + "include": "#comment" + } + ] + }, + "real_type_definition": { + "name": "meta.declaration.type.definition.real-type.ada", + "patterns": [ + { + "include": "#scalar_constraint" + } + ] + }, + "record_type_definition": { + "patterns": [ + { + "name": "meta.declaration.type.definition.record.null.ada", + "match": "(?i)\\b(?:(abstract)\\s+)?(?:(tagged)\\s+)?(?:(limited)\\s+)?(null)\\s+(record)\\b", + "captures": { + "1": { + "name": "storage.modifier.ada" + }, + "2": { + "name": "storage.modifier.ada" + }, + "3": { + "name": "storage.modifier.ada" + }, + "4": { + "name": "storage.modifier.ada" + }, + "5": { + "name": "storage.modifier.ada" + } + }, + "patterns": [ + { + "include": "#component_item" + } + ] + }, + { + "name": "meta.declaration.type.definition.record.ada", + "begin": "(?i)\\b(?:(abstract)\\s+)?(?:(tagged)\\s+)?(?:(limited)\\s+)?(record)\\b", + "end": "(?i)\\b(end)\\s+(record)\\b", + "beginCaptures": { + "1": { + "name": "storage.modifier.ada" + }, + "2": { + "name": "storage.modifier.ada" + }, + "3": { + "name": "storage.modifier.ada" + }, + "4": { + "name": "storage.modifier.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "storage.modifier.ada" + } + }, + "patterns": [ + { + "include": "#component_item" + } + ] + } + ] + }, + "regular_type_declaration": { + "name": "meta.declaration.type.definition.regular.ada", + "begin": "(?i)\\b(type)\\b", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bis\\b", + "end": "(?i)(?=(with(?!\\s+(private))|;))", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "include": "#type_definition" + } + ] + }, + { + "begin": "(?i)\\b(?<=type)\\b", + "end": "(?i)(?=(is|;))", + "patterns": [ + { + "include": "#known_discriminant_part" + }, + { + "include": "#subtype_mark" + } + ] + }, + { + "include": "#aspect_specification" + } + ] + }, + "requeue_statement": { + "name": "meta.statement.requeue.ada", + "begin": "(?i)\\brequeue\\b", + "end": ";", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "name": "keyword.control.ada", + "match": "(?i)\\b(with|abort)\\b" + }, + { + "name": "entity.name.function.ada", + "match": "\\b(\\w|\\d|\\.|_)+\\b" + } + ] + }, + "result_profile": { + "begin": "(?i)\\breturn\\b", + "end": "(?=(is|with|renames|;))", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "include": "#subtype_mark" + } + ] + }, + "return_statement": { + "name": "meta.statement.return.ada", + "begin": "(?i)\\breturn\\b", + "end": ";", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bdo\\b", + "end": "(?i)\\b(end)\\s+(return)\\s*(?=;)", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.control.ada" + }, + "2": { + "name": "keyword.control.ada" + } + }, + "patterns": [ + { + "include": "#label" + }, + { + "include": "#statement" + } + ] + }, + { + "match": "\\b((?:\\w|\\d|_)+)\\s*(:)\\s*((?:\\w|\\d|\\.|_)+)\\b", + "captures": { + "1": { + "name": "variable.name.ada" + }, + "2": { + "name": "punctuation.ada" + }, + "3": { + "name": "entity.name.type.ada" + } + } + }, + { + "match": ":=", + "name": "keyword.operator.new.ada" + }, + { + "include": "#expression" + } + ] + }, + "scalar_constraint": { + "name": "meta.declaration.constraint.scalar.ada", + "patterns": [ + { + "begin": "(?i)\\b(digits|delta)\\b", + "end": "(?i)(?=\\brange\\b|\\bdigits\\b|\\bwith\\b|;)", + "beginCaptures": { + "1": { + "name": "storage.modifier.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "include": "#range_constraint" + }, + { + "include": "#expression" + } + ] + }, + "select_alternative": { + "patterns": [ + { + "begin": "(?i)\\bterminate\\b", + "end": ";", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + } + }, + { + "include": "#statement" + } + ] + }, + "select_statement": { + "name": "meta.statement.select.ada", + "begin": "(?i)\\bselect\\b", + "end": "(?i)\\b(end)\\s+(select)\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.control.ada" + }, + "2": { + "name": "keyword.control.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\b(?:(or)|(?<=select))\\b", + "end": "(?i)\\b(?=(or|else|end))\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.ada" + } + }, + "patterns": [ + { + "include": "#guard" + }, + { + "include": "#select_alternative" + } + ] + }, + { + "begin": "(?i)\\belse\\b", + "end": "(?i)\\b(?=end)\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "patterns": [ + { + "include": "#statement" + } + ] + } + ] + }, + "signed_integer_type_definition": { + "patterns": [ + { + "include": "#range_constraint" + } + ] + }, + "simple_loop_statement": { + "name": "meta.statement.loop.ada", + "begin": "(?i)\\bloop\\b", + "end": "(?i)\\b(end)\\s+(loop)(\\s+(?:\\w|\\d|_)+)?\\s*(;)", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.control.ada" + }, + "2": { + "name": "keyword.control.ada" + }, + "3": { + "name": "entity.name.label.ada" + }, + "4": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "include": "#statement" + } + ] + }, + "single_protected_declaration": { + "name": "meta.declaration.protected.ada", + "begin": "(?i)\\b(protected)\\s+((?:\\w|\\d|_)+)\\b", + "end": "(?i)(?:\\b(end)\\s*(\\s\\2)?\\s*)?(;)", + "beginCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "entity.name.protected.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "entity.name.protected.ada" + }, + "3": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bis\\b", + "end": "(?i)(?=(\\bend\\b|;))", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bnew\\b", + "end": "(?i)\\bwith\\b", + "captures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "match": "(?i)\\band\\b", + "name": "keyword.ada" + }, + { + "include": "#subtype_mark" + }, + { + "include": "#comment" + } + ] + }, + { + "match": "(?i)\\bprivate\\b", + "name": "keyword.ada" + }, + { + "include": "#protected_element_declaration" + }, + { + "include": "#comment" + } + ] + }, + { + "include": "#comment" + } + ] + }, + "single_task_declaration": { + "begin": "(?i)\\b(task)\\s+((?:\\w|\\d|_)+)\\b", + "end": "(?i)(?:\\b(end)\\s*(\\s\\2)?\\s*)?(;)", + "beginCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "entity.name.task.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "entity.name.task.ada" + }, + "3": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bis\\b", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "end": "(?i)\\b(?=end)\\b", + "patterns": [ + { + "begin": "(?i)\\bnew\\b", + "end": "(?i)\\bwith\\b", + "captures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "match": "(?i)\\band\\b", + "name": "keyword.ada" + }, + { + "include": "#subtype_mark" + }, + { + "include": "#comment" + } + ] + }, + { + "match": "(?i)\\bprivate\\b", + "name": "keyword.ada" + }, + { + "include": "#task_item" + }, + { + "include": "#comment" + } + ] + }, + { + "include": "#comment" + } + ] + }, + "statement": { + "patterns": [ + { + "begin": "(?i)\\bbegin\\b", + "end": "(?i)\\b(end)\\s*(;)", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "include": "#handled_sequence_of_statements" + } + ] + }, + { + "include": "#label" + }, + { + "include": "#null_statement" + }, + { + "include": "#return_statement" + }, + { + "include": "#assignment_statement" + }, + { + "include": "#exit_statement" + }, + { + "include": "#goto_statement" + }, + { + "include": "#requeue_statement" + }, + { + "include": "#delay_statement" + }, + { + "include": "#abort_statement" + }, + { + "include": "#raise_statement" + }, + { + "include": "#if_statement" + }, + { + "include": "#case_statement" + }, + { + "include": "#loop_statement" + }, + { + "include": "#block_statement" + }, + { + "include": "#select_statement" + }, + { + "include": "#accept_statement" + }, + { + "include": "#pragma" + }, + { + "include": "#procedure_call_statement" + }, + { + "include": "#comment" + } + ] + }, + "string_literal": { + "name": "string.quoted.double.ada", + "match": "(\").*?(\")", + "captures": { + "1": { + "name": "punctuation.definition.string.ada" + }, + "2": { + "name": "punctuation.definition.string.ada" + } + } + }, + "subprogram_body": { + "name": "meta.declaration.subprogram.body.ada", + "patterns": [ + { + "include": "#procedure_body" + }, + { + "include": "#function_body" + } + ] + }, + "subprogram_renaming_declaration": { + "begin": "(?i)\\brenames\\b", + "end": "(?=(with|;))", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "match": "(?:\\w|\\d|_|\\.)+", + "name": "entity.name.function.ada" + } + ] + }, + "subprogram_specification": { + "name": "meta.declaration.subprogram.specification.ada", + "patterns": [ + { + "include": "#procedure_specification" + }, + { + "include": "#function_specification" + } + ] + }, + "subtype_declaration": { + "name": "meta.declaration.subtype.ada", + "begin": "(?i)\\bsubtype\\b", + "end": ";", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bis\\b", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "end": "(?=;)", + "patterns": [ + { + "name": "storage.modifier.ada", + "match": "(?i)\\b(not\\s+null)\\b" + }, + { + "include": "#composite_constraint" + }, + { + "include": "#aspect_specification" + }, + { + "include": "#subtype_indication" + } + ] + }, + { + "begin": "(?i)(?<=subtype)", + "end": "(?i)\\b(?=is)\\b", + "patterns": [ + { + "include": "#subtype_mark" + } + ] + } + ] + }, + "subtype_indication": { + "name": "meta.declaration.indication.subtype.ada", + "patterns": [ + { + "include": "#scalar_constraint" + }, + { + "include": "#subtype_mark" + } + ] + }, + "subtype_mark": { + "patterns": [ + { + "name": "storage.visibility.ada", + "match": "(?i)\\b(access|aliased|not\\s+null|constant)\\b" + }, + { + "include": "#attribute" + }, + { + "include": "#actual_parameter_part" + }, + { + "begin": "(?i)\\b(procedure|function)\\b", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "end": "(?=(;|\\)))", + "patterns": [ + { + "include": "#parameter_profile" + }, + { + "begin": "(?i)\\breturn\\b", + "end": "(?=(;|\\)))", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "include": "#subtype_mark" + } + ] + } + ] + }, + { + "name": "entity.name.type.ada", + "match": "\\b(?:\\w|\\d|\\.|_)+\\b", + "captures": { + "0": { + "patterns": [ + { + "name": "punctuation.ada", + "match": "[_.]" + } + ] + } + } + }, + { + "include": "#comment" + } + ] + }, + "task_body": { + "name": "meta.declaration.task.body.ada", + "begin": "(?i)\\b(task)\\s+(body)\\s+((\\w|\\d|\\.|_)+)\\b", + "end": "(?i)(?:\\b(end)\\s*(?:\\s(\\3))?\\s*)?(;)", + "beginCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "keyword.ada" + }, + "3": { + "name": "entity.name.task.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "entity.name.task.ada" + }, + "3": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\bbegin\\b", + "end": "(?i)(?=end)", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "include": "#handled_sequence_of_statements" + } + ] + }, + { + "include": "#aspect_specification" + }, + { + "begin": "(?i)\\bis\\b", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "end": "(?i)(?=(with|begin))", + "patterns": [ + { + "include": "#declarative_item" + } + ] + } + ] + }, + "task_item": { + "patterns": [ + { + "include": "#aspect_clause" + }, + { + "include": "#entry_declaration" + } + ] + }, + "task_type_declaration": { + "name": "meta.declaration.type.task.ada", + "begin": "(?i)\\b(task)\\s+(type)\\s+((\\w|\\d|\\.|_)+)\\b", + "end": "(?i)(?:\\b(end)\\s*(?:\\s(\\3))?\\s*)?(;)", + "beginCaptures": { + "1": { + "name": "storage.modifier.ada" + }, + "2": { + "name": "keyword.ada" + }, + "3": { + "name": "entity.name.task.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "entity.name.task.ada" + }, + "3": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "include": "#known_discriminant_part" + }, + { + "begin": "(?i)\\bis\\b", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "end": "(?i)\\b(?=end)\\b", + "patterns": [ + { + "begin": "(?i)\\bnew\\b", + "end": "(?i)\\bwith\\b", + "captures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "match": "(?i)\\band\\b", + "name": "keyword.ada" + }, + { + "include": "#subtype_mark" + }, + { + "include": "#comment" + } + ] + }, + { + "match": "(?i)\\bprivate\\b", + "name": "keyword.ada" + }, + { + "include": "#task_item" + }, + { + "include": "#comment" + } + ] + }, + { + "include": "#comment" + } + ] + }, + "type_declaration": { + "name": "meta.declaration.type.ada", + "patterns": [ + { + "include": "#full_type_declaration" + } + ] + }, + "type_definition": { + "name": "meta.declaration.type.definition.ada", + "patterns": [ + { + "include": "#enumeration_type_definition" + }, + { + "include": "#integer_type_definition" + }, + { + "include": "#real_type_definition" + }, + { + "include": "#array_type_definition" + }, + { + "include": "#record_type_definition" + }, + { + "include": "#access_type_definition" + }, + { + "include": "#interface_type_definition" + }, + { + "include": "#derived_type_definition" + } + ] + }, + "use_clause": { + "name": "meta.context.use.ada", + "patterns": [ + { + "include": "#use_type_clause" + }, + { + "include": "#use_package_clause" + } + ] + }, + "use_package_clause": { + "name": "meta.context.use.package.ada", + "begin": "(?i)\\buse\\b", + "end": ";", + "beginCaptures": { + "0": { + "name": "keyword.other.using.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "name": "punctuation.ada", + "match": "," + }, + { + "include": "#package_mark" + } + ] + }, + "use_type_clause": { + "name": "meta.context.use.type.ada", + "begin": "(?i)\\b(use)\\s+(?:(all)\\s+)?(type)\\b", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.other.using.ada" + }, + "2": { + "name": "keyword.modifier.ada" + }, + "3": { + "name": "keyword.modifier.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "name": "punctuation.ada", + "match": "," + }, + { + "include": "#subtype_mark" + } + ] + }, + "value": { + "patterns": [ + { + "include": "#based_literal" + }, + { + "include": "#decimal_literal" + }, + { + "include": "#character_literal" + }, + { + "include": "#string_literal" + } + ] + }, + "variant_part": { + "name": "meta.declaration.variant.ada", + "begin": "(?i)\\bcase\\b", + "end": "(?i)\\b(end)\\s+(case);", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.ada" + }, + "2": { + "name": "keyword.ada" + }, + "3": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)\\b(?<=case)\\b", + "end": "(?i)\\bis\\b", + "endCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "patterns": [ + { + "match": "(?:\\w|\\d|_)+", + "name": "variable.name.ada" + }, + { + "include": "#comment" + } + ] + }, + { + "begin": "(?i)\\b(?<=is)\\b", + "end": "(?i)\\b(?=end)\\b", + "patterns": [ + { + "begin": "(?i)\\bwhen\\b", + "end": "=>", + "beginCaptures": { + "0": { + "name": "keyword.ada" + } + }, + "endCaptures": { + "0": { + "name": "keyword.other.ada" + } + }, + "patterns": [ + { + "match": "\\|", + "name": "punctuation.ada" + }, + { + "match": "(?i)\\bothers\\b", + "name": "keyword.ada" + }, + { + "include": "#expression" + } + ] + }, + { + "include": "#component_item" + } + ] + } + ] + }, + "while_loop_statement": { + "name": "meta.statement.loop.while.ada", + "begin": "(?i)\\bwhile\\b", + "end": "(?i)\\b(end)\\s+(loop)(\\s+(?:\\w|\\d|_)+)?\\s*(;)", + "beginCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "endCaptures": { + "1": { + "name": "keyword.control.ada" + }, + "2": { + "name": "keyword.control.ada" + }, + "3": { + "name": "entity.name.label.ada" + }, + "4": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "begin": "(?i)(?<=while)\\b", + "end": "(?i)\\bloop\\b", + "endCaptures": { + "0": { + "name": "keyword.control.ada" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "include": "#statement" + } + ] + }, + "with_clause": { + "name": "meta.context.with.ada", + "begin": "(?i)\\b(?:(limited)\\s+)?(?:(private)\\s+)?(with)\\b", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.modifier.ada" + }, + "2": { + "name": "storage.visibility.ada" + }, + "3": { + "name": "keyword.other.using.ada" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.ada" + } + }, + "patterns": [ + { + "name": "punctuation.ada", + "match": "," + }, + { + "include": "#package_mark" + } + ] + } + }, + "scopeName": "source.ada" +} diff --git a/src/lib/shiki/languages/apache.tmLanguage.json b/src/lib/shiki/languages/apache.tmLanguage.json new file mode 100644 index 0000000..0ed1954 --- /dev/null +++ b/src/lib/shiki/languages/apache.tmLanguage.json @@ -0,0 +1,562 @@ +{ + "fileTypes": [ + "conf", + "CONF", + "envvars", + "htaccess", + "HTACCESS", + "htgroups", + "HTGROUPS", + "htpasswd", + "HTPASSWD", + ".htaccess", + ".HTACCESS", + ".htgroups", + ".HTGROUPS", + ".htpasswd", + ".HTPASSWD" + ], + "name": "apache", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.comment.apacheconf" + } + }, + "match": "^(\\s)*(#).*$\\n?", + "name": "comment.line.hash.ini" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.tag.apacheconf" + }, + "2": { + "name": "entity.tag.apacheconf" + }, + "4": { + "name": "string.value.apacheconf" + }, + "5": { + "name": "punctuation.definition.tag.apacheconf" + } + }, + "match": "(<)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost|Macro|If|Else|ElseIf)(\\s(.+?))?(>)" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.tag.apacheconf" + }, + "2": { + "name": "entity.tag.apacheconf" + }, + "3": { + "name": "punctuation.definition.tag.apacheconf" + } + }, + "match": "()" + }, + { + "captures": { + "3": { + "name": "string.regexp.apacheconf" + }, + "4": { + "name": "string.replacement.apacheconf" + } + }, + "match": "(?<=(Rewrite(Rule|Cond)))\\s+(.+?)\\s+(.+?)($|\\s)" + }, + { + "captures": { + "2": { + "name": "entity.status.apacheconf" + }, + "3": { + "name": "string.regexp.apacheconf" + }, + "5": { + "name": "string.path.apacheconf" + } + }, + "match": "(?<=RedirectMatch)(\\s+(\\d\\d\\d|permanent|temp|seeother|gone))?\\s+(.+?)\\s+((.+?)($|\\s))?" + }, + { + "captures": { + "2": { + "name": "entity.status.apacheconf" + }, + "3": { + "name": "string.path.apacheconf" + }, + "5": { + "name": "string.path.apacheconf" + } + }, + "match": "(?<=Redirect)(\\s+(\\d\\d\\d|permanent|temp|seeother|gone))?\\s+(.+?)\\s+((.+?)($|\\s))?" + }, + { + "captures": { + "1": { + "name": "string.regexp.apacheconf" + }, + "3": { + "name": "string.path.apacheconf" + } + }, + "match": "(?<=ScriptAliasMatch|AliasMatch)\\s+(.+?)\\s+((.+?)\\s)?" + }, + { + "captures": { + "1": { + "name": "string.path.apacheconf" + }, + "3": { + "name": "string.path.apacheconf" + } + }, + "match": "(?<=RedirectPermanent|RedirectTemp|ScriptAlias|Alias)\\s+(.+?)\\s+((.+?)($|\\s))?" + }, + { + "captures": { + "1": { + "name": "keyword.core.apacheconf" + } + }, + "match": "\\b(AcceptPathInfo|AccessFileName|AddDefaultCharset|AddOutputFilterByType|AllowEncodedSlashes|AllowOverride|AuthName|AuthType|CGIMapExtension|ContentDigest|DefaultType|Define|DocumentRoot|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|FileETag|ForceType|HostnameLookups|IdentityCheck|Include(Optional)?|KeepAlive|KeepAliveTimeout|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine|LimitXMLRequestBody|LogLevel|MaxKeepAliveRequests|Mutex|NameVirtualHost|Options|Require|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScriptInterpreterSource|ServerAdmin|ServerAlias|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetHandler|SetInputFilter|SetOutputFilter|Time(O|o)ut|TraceEnable|UseCanonicalName|Use|ErrorLogFormat|GlobalLog|PHPIniDir|SSLHonorCipherOrder|SSLCompression|SSLUseStapling|SSLStapling\\w+|SSLCARevocationCheck|SSLSRPVerifierFile|SSLSessionTickets|RequestReadTimeout|ProxyHTML\\w+|MaxRanges)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.mpm.apacheconf" + } + }, + "match": "\\b(AcceptMutex|AssignUserID|BS2000Account|ChildPerUserID|CoreDumpDirectory|EnableExceptionHook|Group|Listen|ListenBacklog|LockFile|MaxClients|MaxConnectionsPerChild|MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxRequestWorkers|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MinSpareServers|MinSpareThreads|NumServers|PidFile|ReceiveBufferSize|ScoreBoardFile|SendBufferSize|ServerLimit|StartServers|StartThreads|ThreadLimit|ThreadsPerChild|ThreadStackSize|User|Win32DisableAcceptEx)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.access.apacheconf" + } + }, + "match": "\\b(Allow|Deny|Order)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.actions.apacheconf" + } + }, + "match": "\\b(Action|Script)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.alias.apacheconf" + } + }, + "match": "\\b(Alias|AliasMatch|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ScriptAlias|ScriptAliasMatch)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.auth.apacheconf" + } + }, + "match": "\\b(AuthAuthoritative|AuthGroupFile|AuthUserFile|AuthBasicProvider|AuthBasicFake|AuthBasicAuthoritative|AuthBasicUseDigestAlgorithm)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.auth_anon.apacheconf" + } + }, + "match": "\\b(Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID|Anonymous_VerifyEmail)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.auth_dbm.apacheconf" + } + }, + "match": "\\b(AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.auth_digest.apacheconf" + } + }, + "match": "\\b(AuthDigestAlgorithm|AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize|AuthDigestProvider)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.auth_ldap.apacheconf" + } + }, + "match": "\\b(AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases|AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.autoindex.apacheconf" + } + }, + "match": "\\b(AddAlt|AddAltByEncoding|AddAltByType|AddDescription|AddIcon|AddIconByEncoding|AddIconByType|DefaultIcon|HeaderName|IndexIgnore|IndexOptions|IndexOrderDefault|IndexStyleSheet|IndexHeadInsert|ReadmeName)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.filter.apacheconf" + } + }, + "match": "\\b(BalancerMember|BalancerGrowth|BalancerPersist|BalancerInherit)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.cache.apacheconf" + } + }, + "match": "\\b(CacheDefaultExpire|CacheDisable|CacheEnable|CacheForceCompletion|CacheIgnoreCacheControl|CacheIgnoreHeaders|CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.cern_meta.apacheconf" + } + }, + "match": "\\b(MetaDir|MetaFiles|MetaSuffix)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.cgi.apacheconf" + } + }, + "match": "\\b(ScriptLog|ScriptLogBuffer|ScriptLogLength)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.cgid.apacheconf" + } + }, + "match": "\\b(ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.charset_lite.apacheconf" + } + }, + "match": "\\b(CharsetDefault|CharsetOptions|CharsetSourceEnc)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.dav.apacheconf" + } + }, + "match": "\\b(Dav|DavDepthInfinity|DavMinTimeout|DavLockDB)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.deflate.apacheconf" + } + }, + "match": "\\b(DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.dir.apacheconf" + } + }, + "match": "\\b(DirectoryIndex|DirectorySlash|FallbackResource)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.disk_cache.apacheconf" + } + }, + "match": "\\b(CacheDirLength|CacheDirLevels|CacheExpiryCheck|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheMaxFileSize|CacheMinFileSize|CacheRoot|CacheSize|CacheTimeMargin)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.dumpio.apacheconf" + } + }, + "match": "\\b(DumpIOInput|DumpIOOutput)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.env.apacheconf" + } + }, + "match": "\\b(PassEnv|SetEnv|UnsetEnv)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.expires.apacheconf" + } + }, + "match": "\\b(ExpiresActive|ExpiresByType|ExpiresDefault)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.ext_filter.apacheconf" + } + }, + "match": "\\b(ExtFilterDefine|ExtFilterOptions)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.file_cache.apacheconf" + } + }, + "match": "\\b(CacheFile|MMapFile)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.filter.apacheconf" + } + }, + "match": "\\b(AddOutputFilterByType|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.headers.apacheconf" + } + }, + "match": "\\b(Header|RequestHeader)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.imap.apacheconf" + } + }, + "match": "\\b(ImapBase|ImapDefault|ImapMenu)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.include.apacheconf" + } + }, + "match": "\\b(SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|XBitHack)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.isapi.apacheconf" + } + }, + "match": "\\b(ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.ldap.apacheconf" + } + }, + "match": "\\b(LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize|LDAPTrustedCA|LDAPTrustedCAType)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.log.apacheconf" + } + }, + "match": "\\b(BufferedLogs|CookieLog|CustomLog|LogFormat|TransferLog|ForensicLog)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.mem_cache.apacheconf" + } + }, + "match": "\\b(MCacheMaxObjectCount|MCacheMaxObjectSize|MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.mime.apacheconf" + } + }, + "match": "\\b(AddCharset|AddEncoding|AddHandler|AddInputFilter|AddLanguage|AddOutputFilter|AddType|DefaultLanguage|ModMimeUsePathInfo|MultiviewsMatch|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|TypesConfig)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.misc.apacheconf" + } + }, + "match": "\\b(ProtocolEcho|Example|AddModuleInfo|MimeMagicFile|CheckSpelling|ExtendedStatus|SuexecUserGroup|UserDir)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.negotiation.apacheconf" + } + }, + "match": "\\b(CacheNegotiatedDocs|ForceLanguagePriority|LanguagePriority)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.nw_ssl.apacheconf" + } + }, + "match": "\\b(NWSSLTrustedCerts|NWSSLUpgradeable|SecureListen)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.proxy.apacheconf" + } + }, + "match": "\\b(AllowCONNECT|NoProxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyFtpDirCharset|ProxyIOBufferSize|ProxyMaxForwards|ProxyPass|ProxyPassMatch|ProxyPassReverse|ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.rewrite.apacheconf" + } + }, + "match": "\\b(RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.setenvif.apacheconf" + } + }, + "match": "\\b(BrowserMatch|BrowserMatchNoCase|SetEnvIf|SetEnvIfNoCase)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.so.apacheconf" + } + }, + "match": "\\b(LoadFile|LoadModule)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.ssl.apacheconf" + } + }, + "match": "\\b(SSLCACertificateFile|SSLCACertificatePath|SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions|SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite|SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire|SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth|SSLInsecureRenegotiation|SSLOpenSSLConfCmd)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.substitute.apacheconf" + } + }, + "match": "\\b(Substitute|SubstituteInheritBefore|SubstituteMaxLineLength)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.usertrack.apacheconf" + } + }, + "match": "\\b(CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.vhost_alias.apacheconf" + } + }, + "match": "\\b(VirtualDocumentRoot|VirtualDocumentRootIP|VirtualScriptAlias|VirtualScriptAliasIP)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.php.apacheconf" + }, + "3": { + "name": "entity.property.apacheconf" + }, + "5": { + "name": "string.value.apacheconf" + } + }, + "match": "\\b(php_value|php_flag|php_admin_value|php_admin_flag)\\b(\\s+(.+?)(\\s+(\".+?\"|.+?))?)?\\s" + }, + { + "captures": { + "1": { + "name": "punctuation.variable.apacheconf" + }, + "3": { + "name": "variable.env.apacheconf" + }, + "4": { + "name": "variable.misc.apacheconf" + }, + "5": { + "name": "punctuation.variable.apacheconf" + } + }, + "match": "(%\\{)((HTTP_USER_AGENT|HTTP_REFERER|HTTP_COOKIE|HTTP_FORWARDED|HTTP_HOST|HTTP_PROXY_CONNECTION|HTTP_ACCEPT|REMOTE_ADDR|REMOTE_HOST|REMOTE_PORT|REMOTE_USER|REMOTE_IDENT|REQUEST_METHOD|SCRIPT_FILENAME|PATH_INFO|QUERY_STRING|AUTH_TYPE|DOCUMENT_ROOT|SERVER_ADMIN|SERVER_NAME|SERVER_ADDR|SERVER_PORT|SERVER_PROTOCOL|SERVER_SOFTWARE|TIME_YEAR|TIME_MON|TIME_DAY|TIME_HOUR|TIME_MIN|TIME_SEC|TIME_WDAY|TIME|API_VERSION|THE_REQUEST|REQUEST_URI|REQUEST_FILENAME|IS_SUBREQ|HTTPS)|(.*?))(\\})" + }, + { + "captures": { + "1": { + "name": "entity.mime-type.apacheconf" + } + }, + "match": "\\b((text|image|application|video|audio)/.+?)\\s" + }, + { + "captures": { + "1": { + "name": "entity.helper.apacheconf" + } + }, + "match": "\\b(?i)(export|from|unset|set|on|off)\\b" + }, + { + "captures": { + "1": { + "name": "constant.numeric.integer.decimal.apacheconf" + } + }, + "match": "\\b(\\d+)\\b" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.flag.apacheconf" + }, + "2": { + "name": "string.flag.apacheconf" + }, + "3": { + "name": "punctuation.definition.flag.apacheconf" + } + }, + "match": "\\s(\\[)(.*?)(\\])\\s" + } + ], + "scopeName": "source.apacheconf", + "uuid": "8747d9e4-b308-4fc2-9aa1-66b6919bc7b9" +} diff --git a/src/lib/shiki/languages/apex.tmLanguage.json b/src/lib/shiki/languages/apex.tmLanguage.json new file mode 100644 index 0000000..e3ce90d --- /dev/null +++ b/src/lib/shiki/languages/apex.tmLanguage.json @@ -0,0 +1,3199 @@ +{ + "name": "apex", + "scopeName": "source.apex", + "fileTypes": ["apex", "cls", "trigger"], + "uuid": "F5FC6824-F257-43B1-B53A-14E1CCD18631", + "patterns": [ + { + "include": "#javadoc-comment" + }, + { + "include": "#comment" + }, + { + "include": "#directives" + }, + { + "include": "#declarations" + }, + { + "include": "#script-top-level" + } + ], + "repository": { + "directives": { + "patterns": [ + { + "include": "#punctuation-semicolon" + } + ] + }, + "declarations": { + "patterns": [ + { + "include": "#type-declarations" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "script-top-level": { + "patterns": [ + { + "include": "#method-declaration" + }, + { + "include": "#statement" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "type-declarations": { + "patterns": [ + { + "include": "#javadoc-comment" + }, + { + "include": "#comment" + }, + { + "include": "#annotation-declaration" + }, + { + "include": "#storage-modifier" + }, + { + "include": "#sharing-modifier" + }, + { + "include": "#class-declaration" + }, + { + "include": "#enum-declaration" + }, + { + "include": "#interface-declaration" + }, + { + "include": "#trigger-declaration" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "class-or-trigger-members": { + "patterns": [ + { + "include": "#javadoc-comment" + }, + { + "include": "#comment" + }, + { + "include": "#storage-modifier" + }, + { + "include": "#sharing-modifier" + }, + { + "include": "#type-declarations" + }, + { + "include": "#field-declaration" + }, + { + "include": "#property-declaration" + }, + { + "include": "#indexer-declaration" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#constructor-declaration" + }, + { + "include": "#method-declaration" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "interface-members": { + "patterns": [ + { + "include": "#javadoc-comment" + }, + { + "include": "#comment" + }, + { + "include": "#property-declaration" + }, + { + "include": "#indexer-declaration" + }, + { + "include": "#method-declaration" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "statement": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#while-statement" + }, + { + "include": "#do-statement" + }, + { + "include": "#for-statement" + }, + { + "include": "#switch-statement" + }, + { + "include": "#when-else-statement" + }, + { + "include": "#when-sobject-statement" + }, + { + "include": "#when-statement" + }, + { + "include": "#when-multiple-statement" + }, + { + "include": "#if-statement" + }, + { + "include": "#else-part" + }, + { + "include": "#goto-statement" + }, + { + "include": "#return-statement" + }, + { + "include": "#break-or-continue-statement" + }, + { + "include": "#throw-statement" + }, + { + "include": "#try-statement" + }, + { + "include": "#soql-query-expression" + }, + { + "include": "#local-declaration" + }, + { + "include": "#block" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "expression": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#merge-expression" + }, + { + "include": "#support-expression" + }, + { + "include": "#throw-expression" + }, + { + "include": "#this-expression" + }, + { + "include": "#trigger-context-declaration" + }, + { + "include": "#conditional-operator" + }, + { + "include": "#expression-operators" + }, + { + "include": "#soql-query-expression" + }, + { + "include": "#object-creation-expression" + }, + { + "include": "#array-creation-expression" + }, + { + "include": "#invocation-expression" + }, + { + "include": "#member-access-expression" + }, + { + "include": "#element-access-expression" + }, + { + "include": "#cast-expression" + }, + { + "include": "#literal" + }, + { + "include": "#parenthesized-expression" + }, + { + "include": "#initializer-expression" + }, + { + "include": "#identifier" + } + ] + }, + "annotation-declaration": { + "begin": "([@][_[:alpha:]]+)\\b", + "beginCaptures": { + "1": { + "name": "storage.type.annotation.apex" + } + }, + "end": "(?<=\\)|$)", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.apex" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.apex" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "include": "#statement" + } + ] + }, + "support-expression": { + "begin": "(?x)\n(ApexPages|Database|DMLException|Exception|PageReference|Savepoint|SchedulableContext|Schema|SObject|System|Test)(?=\\.|\\s) # supported apex namespaces", + "beginCaptures": { + "1": { + "name": "support.class.apex" + } + }, + "end": "(?<=\\)|$)|(?=\\})|(?=;)|(?=\\)|(?=\\]))|(?=\\,)", + "patterns": [ + { + "include": "#support-type" + }, + { + "match": "(?:(\\.))([[:alpha:]]*)(?=\\()", + "captures": { + "1": { + "name": "punctuation.accessor.apex" + }, + "2": { + "name": "support.function.apex" + } + } + }, + { + "match": "(?:(\\.))([[:alpha:]]+)", + "captures": { + "1": { + "name": "punctuation.accessor.apex" + }, + "2": { + "name": "support.type.apex" + } + } + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.apex" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.apex" + } + }, + "patterns": [ + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + } + ] + }, + { + "include": "#comment" + }, + { + "include": "#statement" + } + ] + }, + "support-type": { + "name": "support.apex", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#support-class" + }, + { + "include": "#support-functions" + }, + { + "include": "#support-name" + } + ] + }, + "support-class": { + "match": "\\b(ApexPages|Database|DMLException|Exception|PageReference|Savepoint|SchedulableContext|Schema|SObject|System|Test)\\b", + "captures": { + "1": { + "name": "support.class.apex" + } + } + }, + "support-functions": { + "match": "\\b(delete|execute|finish|insert|start|undelete|update|upsert)\\b", + "captures": { + "1": { + "name": "support.function.apex" + } + } + }, + "support-name": { + "patterns": [ + { + "match": "(\\.)\\s*([[:alpha:]]*)(?=\\()", + "captures": { + "1": { + "name": "punctuation.accessor.apex" + }, + "2": { + "name": "support.function.apex" + } + } + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.apex" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.apex" + } + }, + "patterns": [ + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + } + ] + }, + { + "match": "(\\.)\\s*([_[:alpha:]]*)", + "captures": { + "1": { + "name": "punctuation.accessor.apex" + }, + "2": { + "name": "support.type.apex" + } + } + } + ] + }, + "support-arguments": { + "begin": "<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.begin.apex" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.end.apex" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#support-type" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "merge-expression": { + "begin": "(merge)\\b\\s+", + "beginCaptures": { + "1": { + "name": "support.function.apex" + } + }, + "end": "(?<=\\;)", + "patterns": [ + { + "include": "#object-creation-expression" + }, + { + "include": "#merge-type-statement" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "merge-type-statement": { + "match": "([_[:alpha:]]*)\\b\\s+([_[:alpha:]]*)\\b\\s*(\\;)", + "captures": { + "1": { + "name": "variable.other.readwrite.apex" + }, + "2": { + "name": "variable.other.readwrite.apex" + }, + "3": { + "name": "punctuation.terminator.statement.apex" + } + } + }, + "sharing-modifier": { + "name": "sharing.modifier.apex", + "match": "(?", + "endCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.end.apex" + } + }, + "patterns": [ + { + "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\b", + "captures": { + "1": { + "name": "entity.name.type.type-parameter.apex" + } + } + }, + { + "include": "#comment" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "field-declaration": { + "begin": "(?x)\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)\\s* # first field name\n(?!=>|==)(?=,|;|=|$)", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#support-type" + }, + { + "include": "#type" + } + ] + }, + "5": { + "name": "entity.name.variable.field.apex" + } + }, + "end": "(?=;)", + "patterns": [ + { + "name": "entity.name.variable.field.apex", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#class-or-trigger-members" + } + ] + }, + "property-declaration": { + "begin": "(?x)\n(?!.*\\b(?:class|interface|enum)\\b)\\s*\n(?\n (?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g)\\s*\n(?=\\{|=>|$)", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "6": { + "patterns": [ + { + "include": "#type" + }, + { + "include": "#punctuation-accessor" + } + ] + }, + "7": { + "name": "entity.name.variable.property.apex" + } + }, + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#property-accessors" + }, + { + "include": "#expression-body" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#class-or-trigger-members" + } + ] + }, + "indexer-declaration": { + "begin": "(?x)\n(?\n (?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?this)\\s*\n(?=\\[)", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "6": { + "patterns": [ + { + "include": "#type" + }, + { + "include": "#punctuation-accessor" + } + ] + }, + "7": { + "name": "keyword.other.this.apex" + } + }, + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#property-accessors" + }, + { + "include": "#expression-body" + }, + { + "include": "#variable-initializer" + } + ] + }, + "property-accessors": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.apex" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.apex" + } + }, + "patterns": [ + { + "name": "storage.modifier.apex", + "match": "\\b(private|protected)\\b" + }, + { + "name": "keyword.other.get.apex", + "match": "\\b(get)\\b" + }, + { + "name": "keyword.other.set.apex", + "match": "\\b(set)\\b" + }, + { + "include": "#comment" + }, + { + "include": "#expression-body" + }, + { + "include": "#block" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "method-declaration": { + "begin": "(?x)\n(?\n (?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#support-type" + }, + { + "include": "#type" + } + ] + }, + "6": { + "patterns": [ + { + "include": "#type" + }, + { + "include": "#punctuation-accessor" + } + ] + }, + "7": { + "patterns": [ + { + "include": "#support-type" + }, + { + "include": "#method-name-custom" + } + ] + }, + "8": { + "patterns": [ + { + "include": "#type-parameter-list" + } + ] + } + }, + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#expression-body" + }, + { + "include": "#block" + } + ] + }, + "method-name-custom": { + "name": "entity.name.function.apex", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + }, + "constructor-declaration": { + "begin": "(?=@?[_[:alpha:]][_[:alnum:]]*\\s*\\()", + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\b", + "captures": { + "1": { + "name": "entity.name.function.apex" + } + } + }, + { + "begin": "(:)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.colon.apex" + } + }, + "end": "(?=\\{|=>)", + "patterns": [ + { + "include": "#constructor-initializer" + } + ] + }, + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#comment" + }, + { + "include": "#expression-body" + }, + { + "include": "#block" + } + ] + }, + "constructor-initializer": { + "begin": "\\b(?:(this))\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.this.apex" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#argument-list" + } + ] + }, + "block": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.apex" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.apex" + } + }, + "patterns": [ + { + "include": "#statement" + } + ] + }, + "variable-initializer": { + "begin": "(?)", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.apex" + } + }, + "end": "(?=[,\\)\\];}])", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "expression-body": { + "begin": "=>", + "beginCaptures": { + "0": { + "name": "keyword.operator.arrow.apex" + } + }, + "end": "(?=[,\\);}])", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "goto-statement": { + "begin": "(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?:(\\g)\\b)?", + "captures": { + "1": { + "patterns": [ + { + "include": "#support-type" + }, + { + "include": "#type" + } + ] + }, + "5": { + "name": "entity.name.variable.local.apex" + } + } + } + ] + }, + { + "include": "#comment" + }, + { + "include": "#block" + } + ] + }, + "local-declaration": { + "patterns": [ + { + "include": "#local-constant-declaration" + }, + { + "include": "#local-variable-declaration" + } + ] + }, + "local-variable-declaration": { + "begin": "(?x)\n(?:\n (?:(\\bref)\\s+)?(\\bvar\\b)| # ref local\n (?\n (?:\n (?:ref\\s+)? # ref local\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=|\\))", + "beginCaptures": { + "1": { + "name": "storage.modifier.apex" + }, + "2": { + "name": "keyword.other.var.apex" + }, + "3": { + "patterns": [ + { + "include": "#support-type" + }, + { + "include": "#type" + } + ] + }, + "7": { + "name": "entity.name.variable.local.apex" + } + }, + "end": "(?=;|\\))", + "patterns": [ + { + "name": "entity.name.variable.local.apex", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + } + ] + }, + "local-constant-declaration": { + "begin": "(?x)\n(?\\b(?:const)\\b)\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=)", + "beginCaptures": { + "1": { + "name": "storage.modifier.apex" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "6": { + "name": "entity.name.variable.local.apex" + } + }, + "end": "(?=;)", + "patterns": [ + { + "name": "entity.name.variable.local.apex", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + } + ] + }, + "throw-expression": { + "match": "(?>=|\\|=" + }, + { + "name": "keyword.operator.bitwise.shift.apex", + "match": "<<|>>" + }, + { + "name": "keyword.operator.comparison.apex", + "match": "==|!=" + }, + { + "name": "keyword.operator.relational.apex", + "match": "<=|>=|<|>" + }, + { + "name": "keyword.operator.logical.apex", + "match": "\\!|&&|\\|\\|" + }, + { + "name": "keyword.operator.bitwise.apex", + "match": "\\&|~|\\^|\\|" + }, + { + "name": "keyword.operator.assignment.apex", + "match": "\\=" + }, + { + "name": "keyword.operator.decrement.apex", + "match": "--" + }, + { + "name": "keyword.operator.increment.apex", + "match": "\\+\\+" + }, + { + "name": "keyword.operator.arithmetic.apex", + "match": "%|\\*|/|-|\\+" + } + ] + }, + "conditional-operator": { + "begin": "(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(\\))(?=\\s*@?[_[:alnum:]\\(])", + "captures": { + "1": { + "name": "punctuation.parenthesis.open.apex" + }, + "2": { + "patterns": [ + { + "include": "#support-type" + }, + { + "include": "#type" + } + ] + }, + "6": { + "name": "punctuation.parenthesis.close.apex" + } + } + }, + "this-expression": { + "match": "\\b(?:(this))\\b", + "captures": { + "1": { + "name": "keyword.other.this.apex" + } + } + }, + "invocation-expression": { + "begin": "(?x)\n(?:(\\??\\.)\\s*)? # safe navigator or accessor\n(@?[_[:alpha:]][_[:alnum:]]*)\\s* # method name\n(?\\s*<([^<>]|\\g)+>\\s*)?\\s* # type arguments\n(?=\\() # open paren of argument list", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#punctuation-accessor" + }, + { + "include": "#operator-safe-navigation" + } + ] + }, + "2": { + "name": "entity.name.function.apex" + }, + "3": { + "patterns": [ + { + "include": "#type-arguments" + } + ] + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#argument-list" + } + ] + }, + "element-access-expression": { + "begin": "(?x)\n(?:(\\??\\.)\\s*)? # safe navigator or accessor\n(?:(@?[_[:alpha:]][_[:alnum:]]*)\\s*)? # property name\n(?:(\\?)\\s*)? # null-conditional operator?\n(?=\\[) # open bracket of argument list", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#punctuation-accessor" + }, + { + "include": "#operator-safe-navigation" + } + ] + }, + "2": { + "name": "variable.other.object.property.apex" + }, + "3": { + "name": "keyword.operator.null-conditional.apex" + } + }, + "end": "(?<=\\])(?!\\s*\\[)", + "patterns": [ + { + "include": "#bracketed-argument-list" + } + ] + }, + "member-access-expression": { + "patterns": [ + { + "match": "(?x)\n(\\??\\.)\\s* # safe navigator or accessor\n(@?[_[:alpha:]][_[:alnum:]]*)\\s* # property name\n(?![_[:alnum:]]|\\(|(\\?)?\\[|<) # next character is not alpha-numeric, nor a (, [, or <. Also, test for ?[", + "captures": { + "1": { + "patterns": [ + { + "include": "#punctuation-accessor" + }, + { + "include": "#operator-safe-navigation" + } + ] + }, + "2": { + "name": "variable.other.object.property.apex" + } + } + }, + { + "match": "(?x)\n(\\??\\.)?\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\n(?\\s*<([^<>]|\\g)+>\\s*)\n(?=\n (\\s*\\?)?\n \\s*\\.\\s*@?[_[:alpha:]][_[:alnum:]]*\n)", + "captures": { + "1": { + "patterns": [ + { + "include": "#punctuation-accessor" + }, + { + "include": "#operator-safe-navigation" + } + ] + }, + "2": { + "name": "variable.other.object.apex" + }, + "3": { + "patterns": [ + { + "include": "#type-arguments" + } + ] + } + } + }, + { + "match": "(?x)\n(@?[_[:alpha:]][_[:alnum:]]*)\n(?=\n (\\s*\\?)?\n \\s*\\.\\s*@?[_[:alpha:]][_[:alnum:]]*\n)", + "captures": { + "1": { + "name": "variable.other.object.apex" + } + } + } + ] + }, + "object-creation-expression": { + "patterns": [ + { + "include": "#object-creation-expression-with-parameters" + }, + { + "include": "#object-creation-expression-with-no-parameters" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "object-creation-expression-with-parameters": { + "begin": "(?x)\n(delete|insert|undelete|update|upsert)?\n\\s*(new)\\s+\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\()", + "beginCaptures": { + "1": { + "name": "support.function.apex" + }, + "2": { + "name": "keyword.control.new.apex" + }, + "3": { + "patterns": [ + { + "include": "#support-type" + }, + { + "include": "#type" + } + ] + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#argument-list" + } + ] + }, + "object-creation-expression-with-no-parameters": { + "match": "(?x)\n(delete|insert|undelete|update|upsert)?\n\\s*(new)\\s+\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\{|$)", + "captures": { + "1": { + "name": "support.function.apex" + }, + "2": { + "name": "keyword.control.new.apex" + }, + "3": { + "patterns": [ + { + "include": "#support-type" + }, + { + "include": "#type" + } + ] + } + } + }, + "array-creation-expression": { + "begin": "(?x)\n\\b(new)\\b\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\\s*\n(?=\\[)", + "beginCaptures": { + "1": { + "name": "keyword.control.new.apex" + }, + "2": { + "patterns": [ + { + "include": "#support-type" + }, + { + "include": "#type" + } + ] + } + }, + "end": "(?<=\\])", + "patterns": [ + { + "include": "#bracketed-argument-list" + } + ] + }, + "parenthesized-parameter-list": { + "begin": "(\\()", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.apex" + } + }, + "end": "(\\))", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.apex" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#parameter" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#variable-initializer" + } + ] + }, + "parameter": { + "match": "(?x)\n(?:(?:\\b(this)\\b)\\s+)?\n(?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)", + "captures": { + "1": { + "name": "storage.modifier.apex" + }, + "2": { + "patterns": [ + { + "include": "#support-type" + }, + { + "include": "#type" + } + ] + }, + "6": { + "name": "entity.name.variable.parameter.apex" + } + } + }, + "argument-list": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.apex" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.apex" + } + }, + "patterns": [ + { + "include": "#named-argument" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "bracketed-argument-list": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.squarebracket.open.apex" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.squarebracket.close.apex" + } + }, + "patterns": [ + { + "include": "#soql-query-expression" + }, + { + "include": "#named-argument" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "named-argument": { + "begin": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(:)", + "beginCaptures": { + "1": { + "name": "entity.name.variable.parameter.apex" + }, + "2": { + "name": "punctuation.separator.colon.apex" + } + }, + "end": "(?=(,|\\)|\\]))", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "type": { + "name": "meta.type.apex", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-builtin" + }, + { + "include": "#type-name" + }, + { + "include": "#type-arguments" + }, + { + "include": "#type-array-suffix" + }, + { + "include": "#type-nullable-suffix" + } + ] + }, + "type-builtin": { + "match": "\\b(Blob|Boolean|byte|Date|Datetime|Decimal|Double|ID|Integer|Long|Object|String|Time|void)\\b", + "captures": { + "1": { + "name": "keyword.type.apex" + } + } + }, + "type-name": { + "patterns": [ + { + "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(\\.)", + "captures": { + "1": { + "name": "storage.type.apex" + }, + "2": { + "name": "punctuation.accessor.apex" + } + } + }, + { + "match": "(\\.)\\s*(@?[_[:alpha:]][_[:alnum:]]*)", + "captures": { + "1": { + "name": "punctuation.accessor.apex" + }, + "2": { + "name": "storage.type.apex" + } + } + }, + { + "name": "storage.type.apex", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + } + ] + }, + "type-arguments": { + "begin": "<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.begin.apex" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.end.apex" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#support-type" + }, + { + "include": "#type" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "type-array-suffix": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.squarebracket.open.apex" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.squarebracket.close.apex" + } + }, + "patterns": [ + { + "include": "#punctuation-comma" + } + ] + }, + "type-nullable-suffix": { + "match": "\\?", + "captures": { + "0": { + "name": "punctuation.separator.question-mark.apex" + } + } + }, + "operator-assignment": { + "name": "keyword.operator.assignment.apex", + "match": "(?)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.apex" + } + }, + "patterns": [ + { + "include": "#xml-attribute" + } + ] + }, + "xml-attribute": { + "patterns": [ + { + "match": "(?x)\n(?:^|\\s+)\n(\n (?:\n ([-_[:alnum:]]+)\n (:)\n )?\n ([-_[:alnum:]]+)\n)\n(=)", + "captures": { + "1": { + "name": "entity.other.attribute-name.apex" + }, + "2": { + "name": "entity.other.attribute-name.namespace.apex" + }, + "3": { + "name": "punctuation.separator.colon.apex" + }, + "4": { + "name": "entity.other.attribute-name.localname.apex" + }, + "5": { + "name": "punctuation.separator.equals.apex" + } + } + }, + { + "include": "#xml-string" + } + ] + }, + "xml-cdata": { + "name": "string.unquoted.cdata.apex", + "begin": "", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.apex" + } + } + }, + "xml-string": { + "patterns": [ + { + "name": "string.quoted.single.apex", + "begin": "\\'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.apex" + } + }, + "end": "\\'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.apex" + } + }, + "patterns": [ + { + "include": "#xml-character-entity" + } + ] + }, + { + "name": "string.quoted.double.apex", + "begin": "\\\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.stringdoublequote.begin.apex" + } + }, + "end": "\\\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.stringdoublequote.end.apex" + } + }, + "patterns": [ + { + "include": "#xml-character-entity" + } + ] + } + ] + }, + "xml-character-entity": { + "patterns": [ + { + "name": "constant.character.entity.apex", + "match": "(?x)\n(&)\n(\n (?:[[:alpha:]:_][[:alnum:]:_.-]*)|\n (?:\\#[[:digit:]]+)|\n (?:\\#x[[:xdigit:]]+)\n)\n(;)", + "captures": { + "1": { + "name": "punctuation.definition.constant.apex" + }, + "3": { + "name": "punctuation.definition.constant.apex" + } + } + }, + { + "name": "invalid.illegal.bad-ampersand.apex", + "match": "&" + } + ] + }, + "xml-comment": { + "name": "comment.block.apex", + "begin": "", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.apex" + } + } + } + } +} diff --git a/src/lib/shiki/languages/apl.tmLanguage.json b/src/lib/shiki/languages/apl.tmLanguage.json new file mode 100644 index 0000000..4308635 --- /dev/null +++ b/src/lib/shiki/languages/apl.tmLanguage.json @@ -0,0 +1,1468 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "apl", + "scopeName": "source.apl", + "fileTypes": ["apl", "apla", "aplc", "aplf", "apli", "apln", "aplo", "dyalog", "dyapp", "mipage"], + "firstLineMatch": "(?x)\n# APL symbols\n[⌶-⍺]\n|\n\n# Hashbang\n^\\#!.*(?:\\s|\\/|(?<=!)\\b)\n\t(?:gnu[-._]?apl|aplx?|dyalog)\n(?:$|\\s)\n|\n\n# Modeline\n(?i:\n\t# Emacs\n\t-\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)\n\t\tapl\n\t(?=[\\s;]|(?]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s* set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=\n\t\tapl\n\t(?=\\s|:|$)\n)", + "foldingStartMarker": "{", + "foldingStopMarker": "}", + "patterns": [ + { + "match": "\\A#!.*$", + "name": "comment.line.shebang.apl" + }, + { + "include": "#heredocs" + }, + { + "include": "#main" + }, + { + "contentName": "text.embedded.apl", + "begin": "^\\s*((\\))OFF|(\\])NEXTFILE)\\b(.*)$", + "end": "(?=N)A", + "beginCaptures": { + "1": { + "name": "entity.name.command.eof.apl" + }, + "2": { + "name": "punctuation.definition.command.apl" + }, + "3": { + "name": "punctuation.definition.command.apl" + }, + "4": { + "patterns": [ + { + "include": "#comment" + } + ] + } + } + }, + { + "name": "meta.round.bracketed.group.apl", + "patterns": [ + { + "include": "#main" + } + ], + "begin": "\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "punctuation.round.bracket.begin.apl" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.round.bracket.end.apl" + } + } + }, + { + "name": "meta.square.bracketed.group.apl", + "patterns": [ + { + "include": "#main" + } + ], + "begin": "\\[", + "end": "\\]", + "beginCaptures": { + "0": { + "name": "punctuation.square.bracket.begin.apl" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.square.bracket.end.apl" + } + } + }, + { + "name": "meta.system.command.apl", + "begin": "^\\s*((\\))\\S+)", + "end": "$", + "beginCaptures": { + "1": { + "name": "entity.name.command.apl" + }, + "2": { + "name": "punctuation.definition.command.apl" + } + }, + "patterns": [ + { + "include": "#command-arguments" + }, + { + "include": "#command-switches" + }, + { + "include": "#main" + } + ] + }, + { + "name": "meta.user.command.apl", + "begin": "^\\s*((\\])\\S+)", + "end": "$", + "beginCaptures": { + "1": { + "name": "entity.name.command.apl" + }, + "2": { + "name": "punctuation.definition.command.apl" + } + }, + "patterns": [ + { + "include": "#command-arguments" + }, + { + "include": "#command-switches" + }, + { + "include": "#main" + } + ] + } + ], + "repository": { + "main": { + "patterns": [ + { + "include": "#class" + }, + { + "include": "#definition" + }, + { + "include": "#comment" + }, + { + "include": "#label" + }, + { + "include": "#sck" + }, + { + "include": "#strings" + }, + { + "include": "#number" + }, + { + "include": "#lambda" + }, + { + "include": "#sysvars" + }, + { + "include": "#symbols" + }, + { + "include": "#name" + } + ] + }, + "comment": { + "patterns": [ + { + "name": "comment.line.apl", + "begin": "⍝", + "end": "$", + "captures": { + "0": { + "name": "punctuation.definition.comment.apl" + } + } + } + ] + }, + "number": { + "patterns": [ + { + "name": "constant.numeric.apl", + "match": "¯?[0-9][¯0-9A-Za-z]*(?:\\.[¯0-9Ee][¯0-9A-Za-z]*)*|¯?\\.[0-9Ee][¯0-9A-Za-z]*" + } + ] + }, + "strings": { + "patterns": [ + { + "name": "string.quoted.single.apl", + "begin": "'", + "end": "'|$", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.apl" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.apl" + } + }, + "patterns": [ + { + "match": "[^']*[^'\\n\\r\\\\]$", + "name": "invalid.illegal.string.apl" + } + ] + }, + { + "name": "string.quoted.double.apl", + "begin": "\"", + "end": "\"|$", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.apl" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.apl" + } + }, + "patterns": [ + { + "match": "[^\"]*[^\"\\n\\r\\\\]$", + "name": "invalid.illegal.string.apl" + } + ] + } + ] + }, + "name": { + "patterns": [ + { + "name": "variable.other.readwrite.apl", + "match": "(?x)\n[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]\n[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]*" + } + ] + }, + "label": { + "patterns": [ + { + "name": "meta.label.apl", + "match": "(?x)\n^\\s*\n(\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]*\n)\n(:)", + "captures": { + "1": { + "name": "entity.label.name.apl" + }, + "2": { + "name": "punctuation.definition.label.end.apl" + } + } + } + ] + }, + "symbols": { + "patterns": [ + { + "match": "(?<=\\s)←(?=\\s|$)", + "name": "keyword.spaced.operator.assignment.apl" + }, + { + "match": "(?<=\\s)→(?=\\s|$)", + "name": "keyword.spaced.control.goto.apl" + }, + { + "match": "(?<=\\s)≡(?=\\s|$)", + "name": "keyword.spaced.operator.identical.apl" + }, + { + "match": "(?<=\\s)≢(?=\\s|$)", + "name": "keyword.spaced.operator.not-identical.apl" + }, + { + "match": "\\+", + "name": "keyword.operator.plus.apl" + }, + { + "match": "[-−]", + "name": "keyword.operator.minus.apl" + }, + { + "match": "×", + "name": "keyword.operator.times.apl" + }, + { + "match": "÷", + "name": "keyword.operator.divide.apl" + }, + { + "match": "⌊", + "name": "keyword.operator.floor.apl" + }, + { + "match": "⌈", + "name": "keyword.operator.ceiling.apl" + }, + { + "match": "[∣|]", + "name": "keyword.operator.absolute.apl" + }, + { + "match": "[⋆*]", + "name": "keyword.operator.exponent.apl" + }, + { + "match": "⍟", + "name": "keyword.operator.logarithm.apl" + }, + { + "match": "○", + "name": "keyword.operator.circle.apl" + }, + { + "match": "!", + "name": "keyword.operator.factorial.apl" + }, + { + "match": "∧", + "name": "keyword.operator.and.apl" + }, + { + "match": "∨", + "name": "keyword.operator.or.apl" + }, + { + "match": "⍲", + "name": "keyword.operator.nand.apl" + }, + { + "match": "⍱", + "name": "keyword.operator.nor.apl" + }, + { + "match": "<", + "name": "keyword.operator.less.apl" + }, + { + "match": "≤", + "name": "keyword.operator.less-or-equal.apl" + }, + { + "match": "=", + "name": "keyword.operator.equal.apl" + }, + { + "match": "≥", + "name": "keyword.operator.greater-or-equal.apl" + }, + { + "match": ">", + "name": "keyword.operator.greater.apl" + }, + { + "match": "≠", + "name": "keyword.operator.not-equal.apl" + }, + { + "match": "[∼~]", + "name": "keyword.operator.tilde.apl" + }, + { + "match": "\\?", + "name": "keyword.operator.random.apl" + }, + { + "match": "[∊∈]", + "name": "keyword.operator.member-of.apl" + }, + { + "match": "⍷", + "name": "keyword.operator.find.apl" + }, + { + "match": ",", + "name": "keyword.operator.comma.apl" + }, + { + "match": "⍪", + "name": "keyword.operator.comma-bar.apl" + }, + { + "match": "⌷", + "name": "keyword.operator.squad.apl" + }, + { + "match": "⍳", + "name": "keyword.operator.iota.apl" + }, + { + "match": "⍴", + "name": "keyword.operator.rho.apl" + }, + { + "match": "↑", + "name": "keyword.operator.take.apl" + }, + { + "match": "↓", + "name": "keyword.operator.drop.apl" + }, + { + "match": "⊣", + "name": "keyword.operator.left.apl" + }, + { + "match": "⊢", + "name": "keyword.operator.right.apl" + }, + { + "match": "⊤", + "name": "keyword.operator.encode.apl" + }, + { + "match": "⊥", + "name": "keyword.operator.decode.apl" + }, + { + "match": "\\/", + "name": "keyword.operator.slash.apl" + }, + { + "match": "⌿", + "name": "keyword.operator.slash-bar.apl" + }, + { + "match": "\\x5C", + "name": "keyword.operator.backslash.apl" + }, + { + "match": "⍀", + "name": "keyword.operator.backslash-bar.apl" + }, + { + "match": "⌽", + "name": "keyword.operator.rotate-last.apl" + }, + { + "match": "⊖", + "name": "keyword.operator.rotate-first.apl" + }, + { + "match": "⍉", + "name": "keyword.operator.transpose.apl" + }, + { + "match": "⍋", + "name": "keyword.operator.grade-up.apl" + }, + { + "match": "⍒", + "name": "keyword.operator.grade-down.apl" + }, + { + "match": "⌹", + "name": "keyword.operator.quad-divide.apl" + }, + { + "match": "≡", + "name": "keyword.operator.identical.apl" + }, + { + "match": "≢", + "name": "keyword.operator.not-identical.apl" + }, + { + "match": "⊂", + "name": "keyword.operator.enclose.apl" + }, + { + "match": "⊃", + "name": "keyword.operator.pick.apl" + }, + { + "match": "∩", + "name": "keyword.operator.intersection.apl" + }, + { + "match": "∪", + "name": "keyword.operator.union.apl" + }, + { + "match": "⍎", + "name": "keyword.operator.hydrant.apl" + }, + { + "match": "⍕", + "name": "keyword.operator.thorn.apl" + }, + { + "match": "⊆", + "name": "keyword.operator.underbar-shoe-left.apl" + }, + { + "match": "⍸", + "name": "keyword.operator.underbar-iota.apl" + }, + { + "match": "¨", + "name": "keyword.operator.each.apl" + }, + { + "match": "⍤", + "name": "keyword.operator.rank.apl" + }, + { + "match": "⌸", + "name": "keyword.operator.quad-equal.apl" + }, + { + "match": "⍨", + "name": "keyword.operator.commute.apl" + }, + { + "match": "⍣", + "name": "keyword.operator.power.apl" + }, + { + "match": "\\.", + "name": "keyword.operator.dot.apl" + }, + { + "match": "∘", + "name": "keyword.operator.jot.apl" + }, + { + "match": "⍠", + "name": "keyword.operator.quad-colon.apl" + }, + { + "match": "&", + "name": "keyword.operator.ampersand.apl" + }, + { + "match": "⌶", + "name": "keyword.operator.i-beam.apl" + }, + { + "match": "⌺", + "name": "keyword.operator.quad-diamond.apl" + }, + { + "match": "@", + "name": "keyword.operator.at.apl" + }, + { + "match": "◊", + "name": "keyword.operator.lozenge.apl" + }, + { + "match": ";", + "name": "keyword.operator.semicolon.apl" + }, + { + "match": "¯", + "name": "keyword.operator.high-minus.apl" + }, + { + "match": "←", + "name": "keyword.operator.assignment.apl" + }, + { + "match": "→", + "name": "keyword.control.goto.apl" + }, + { + "match": "⍬", + "name": "constant.language.zilde.apl" + }, + { + "match": "⋄", + "name": "keyword.operator.diamond.apl" + }, + { + "match": "⍫", + "name": "keyword.operator.lock.apl" + }, + { + "match": "⎕", + "name": "keyword.operator.quad.apl" + }, + { + "match": "##", + "name": "constant.language.namespace.parent.apl" + }, + { + "match": "#", + "name": "constant.language.namespace.root.apl" + }, + { + "match": "⌻", + "name": "keyword.operator.quad-jot.apl" + }, + { + "match": "⌼", + "name": "keyword.operator.quad-circle.apl" + }, + { + "match": "⌾", + "name": "keyword.operator.circle-jot.apl" + }, + { + "match": "⍁", + "name": "keyword.operator.quad-slash.apl" + }, + { + "match": "⍂", + "name": "keyword.operator.quad-backslash.apl" + }, + { + "match": "⍃", + "name": "keyword.operator.quad-less.apl" + }, + { + "match": "⍄", + "name": "keyword.operator.greater.apl" + }, + { + "match": "⍅", + "name": "keyword.operator.vane-left.apl" + }, + { + "match": "⍆", + "name": "keyword.operator.vane-right.apl" + }, + { + "match": "⍇", + "name": "keyword.operator.quad-arrow-left.apl" + }, + { + "match": "⍈", + "name": "keyword.operator.quad-arrow-right.apl" + }, + { + "match": "⍊", + "name": "keyword.operator.tack-down.apl" + }, + { + "match": "⍌", + "name": "keyword.operator.quad-caret-down.apl" + }, + { + "match": "⍍", + "name": "keyword.operator.quad-del-up.apl" + }, + { + "match": "⍏", + "name": "keyword.operator.vane-up.apl" + }, + { + "match": "⍐", + "name": "keyword.operator.quad-arrow-up.apl" + }, + { + "match": "⍑", + "name": "keyword.operator.tack-up.apl" + }, + { + "match": "⍓", + "name": "keyword.operator.quad-caret-up.apl" + }, + { + "match": "⍔", + "name": "keyword.operator.quad-del-down.apl" + }, + { + "match": "⍖", + "name": "keyword.operator.vane-down.apl" + }, + { + "match": "⍗", + "name": "keyword.operator.quad-arrow-down.apl" + }, + { + "match": "⍘", + "name": "keyword.operator.underbar-quote.apl" + }, + { + "match": "⍚", + "name": "keyword.operator.underbar-diamond.apl" + }, + { + "match": "⍛", + "name": "keyword.operator.underbar-jot.apl" + }, + { + "match": "⍜", + "name": "keyword.operator.underbar-circle.apl" + }, + { + "match": "⍞", + "name": "keyword.operator.quad-quote.apl" + }, + { + "match": "⍡", + "name": "keyword.operator.dotted-tack-up.apl" + }, + { + "match": "⍢", + "name": "keyword.operator.dotted-del.apl" + }, + { + "match": "⍥", + "name": "keyword.operator.dotted-circle.apl" + }, + { + "match": "⍦", + "name": "keyword.operator.stile-shoe-up.apl" + }, + { + "match": "⍧", + "name": "keyword.operator.stile-shoe-left.apl" + }, + { + "match": "⍩", + "name": "keyword.operator.dotted-greater.apl" + }, + { + "match": "⍭", + "name": "keyword.operator.stile-tilde.apl" + }, + { + "match": "⍮", + "name": "keyword.operator.underbar-semicolon.apl" + }, + { + "match": "⍯", + "name": "keyword.operator.quad-not-equal.apl" + }, + { + "match": "⍰", + "name": "keyword.operator.quad-question.apl" + } + ] + }, + "definition": { + "patterns": [ + { + "name": "meta.function.apl", + "begin": "(?x) ^\\s*? (?# 1: keyword.operator.nabla.apl) (∇) (?: \\s* (?: (?# 2: entity.function.return-value.apl) ( [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* ) | \\s* (?# 3: entity.function.return-value.shy.apl) ( (\\{) (?# 4: punctuation.definition.return-value.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\}) (?# 5: punctuation.definition.return-value.end.apl) | (\\() (?# 6: punctuation.definition.return-value.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\)) (?# 7: punctuation.definition.return-value.end.apl) | (\\(\\s*\\{) (?# 8: punctuation.definition.return-value.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\}\\s*\\)) (?# 9: punctuation.definition.return-value.end.apl) | (\\{\\s*\\() (?# 10: punctuation.definition.return-value.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\)\\s*\\}) (?# 11: punctuation.definition.return-value.end.apl) ) \\s* ) \\s* (?# 12: keyword.operator.assignment.apl) (←) )? \\s* (?: (?# MONADIC) (?: (?# 13: entity.function.name.apl) ( [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* ) \\s* (?# 14: entity.function.axis.apl) ( (?# 15: punctuation.definition.axis.begin.apl) (\\[) \\s* (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* (?# 16: invalid.illegal.extra-characters.apl) (.*?) | (?# 17: invalid.illegal.apl) ([^\\]]*) ) \\s* (?# 18: punctuation.definition.axis.end.apl) (\\]) )? \\s*? (?# 19: entity.function.arguments.right.apl) ( (?<=\\s|\\]) [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* | (\\() (?# 20: punctuation.definition.arguments.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\)) (?# 21: punctuation.definition.arguments.end.apl) ) \\s* (?=;|$) ) | (?# DYADIC/AMBIVALENT) (?#==================) (?: (?# 22: entity.function.arguments.left.apl) ( [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s+ ) | (?# 23: entity.function.arguments.left.optional.apl) ( (\\{) (?# 24: punctuation.definition.arguments.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\}) (?# 25: punctuation.definition.arguments.end.apl) | (\\(\\s*\\{) (?# 26: punctuation.definition.arguments.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\}\\s*\\)) (?# 27: punctuation.definition.arguments.end.apl) | (\\{\\s*\\() (?# 28: punctuation.definition.arguments.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\)\\s*\\}) (?# 29: punctuation.definition.arguments.end.apl) ) )? \\s* (?: (?# 30: entity.function.name.apl) ( [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* ) \\s* (?# 31: entity.function.axis.apl) ( (?# 32: punctuation.definition.axis.begin.apl) (\\[) \\s* (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* (?# 33: invalid.illegal.extra-characters.apl) (.*?) | (?# 34: invalid.illegal.apl) ([^\\]]*) ) \\s* (?# 35: punctuation.definition.axis.end.apl) (\\]) )? | (?# 36: entity.function.operands.apl) ( (?# 37: punctuation.definition.operands.begin.apl) (\\() (?# 38: entity.function.operands.left.apl) ( \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* )? \\s* (?# 39: entity.function.name.apl) ( [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* ) \\s*? (?# 40: entity.function.axis.apl) ( (?# 41: punctuation.definition.axis.begin.apl) (\\[) \\s* (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* (?# 42: invalid.illegal.extra-characters.apl) (.*?) | (?# 43: invalid.illegal.apl) ([^\\]]*) ) \\s* (?# 44: punctuation.definition.axis.end.apl) (\\]) )? \\s* (?# 45: entity.function.operands.right.apl) ( [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )? (?# 46: punctuation.definition.operands.end.apl) (\\)) ) ) \\s* (?# 47: entity.function.arguments.right.apl) ( (?<=\\s|\\]) [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* | \\s* (\\() (?# 48: punctuation.definition.arguments.begin.apl) (?: \\s* [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )* (\\)) (?# 49: punctuation.definition.arguments.end.apl) )? (?#==================) ) \\s* (?# 50: invalid.illegal.arguments.right.apl) ([^;]+)? (?# 51: entity.function.local-variables.apl) ( (?# 52: Include “;”) ( (?> \\s* ; (?: \\s* [⎕A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ] [A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]* \\s* )+ )+ ) | (?# 53: invalid.illegal.local-variables.apl) ([^⍝]+) )? \\s* (?# 54: comment.line.apl) (⍝.*)? $", + "end": "^\\s*?(?:(∇)|(⍫))\\s*?(⍝.*?)?$", + "patterns": [ + { + "name": "entity.function.definition.apl", + "match": "(?x)\n^\\s*\n(\n\t(?>\n\t\t;\n\t\t(?:\n\t\t\t\\s*\n\t\t\t[⎕A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]\n\t\t\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]*\n\t\t\t\\s*\n\t\t)+\n\t)+\n)", + "captures": { + "0": { + "name": "entity.function.local-variables.apl" + }, + "1": { + "patterns": [ + { + "name": "punctuation.separator.apl", + "match": ";" + } + ] + } + } + }, + { + "include": "$self" + } + ], + "beginCaptures": { + "0": { + "name": "entity.function.definition.apl" + }, + "1": { + "name": "keyword.operator.nabla.apl" + }, + "2": { + "name": "entity.function.return-value.apl" + }, + "3": { + "name": "entity.function.return-value.shy.apl" + }, + "4": { + "name": "punctuation.definition.return-value.begin.apl" + }, + "5": { + "name": "punctuation.definition.return-value.end.apl" + }, + "6": { + "name": "punctuation.definition.return-value.begin.apl" + }, + "7": { + "name": "punctuation.definition.return-value.end.apl" + }, + "8": { + "name": "punctuation.definition.return-value.begin.apl" + }, + "9": { + "name": "punctuation.definition.return-value.end.apl" + }, + "10": { + "name": "punctuation.definition.return-value.begin.apl" + }, + "11": { + "name": "punctuation.definition.return-value.end.apl" + }, + "12": { + "name": "keyword.operator.assignment.apl" + }, + "13": { + "name": "entity.function.name.apl", + "patterns": [ + { + "include": "#embolden" + } + ] + }, + "14": { + "name": "entity.function.axis.apl" + }, + "15": { + "name": "punctuation.definition.axis.begin.apl" + }, + "16": { + "name": "invalid.illegal.extra-characters.apl" + }, + "17": { + "name": "invalid.illegal.apl" + }, + "18": { + "name": "punctuation.definition.axis.end.apl" + }, + "19": { + "name": "entity.function.arguments.right.apl" + }, + "20": { + "name": "punctuation.definition.arguments.begin.apl" + }, + "21": { + "name": "punctuation.definition.arguments.end.apl" + }, + "22": { + "name": "entity.function.arguments.left.apl" + }, + "23": { + "name": "entity.function.arguments.left.optional.apl" + }, + "24": { + "name": "punctuation.definition.arguments.begin.apl" + }, + "25": { + "name": "punctuation.definition.arguments.end.apl" + }, + "26": { + "name": "punctuation.definition.arguments.begin.apl" + }, + "27": { + "name": "punctuation.definition.arguments.end.apl" + }, + "28": { + "name": "punctuation.definition.arguments.begin.apl" + }, + "29": { + "name": "punctuation.definition.arguments.end.apl" + }, + "30": { + "name": "entity.function.name.apl", + "patterns": [ + { + "include": "#embolden" + } + ] + }, + "31": { + "name": "entity.function.axis.apl" + }, + "32": { + "name": "punctuation.definition.axis.begin.apl" + }, + "33": { + "name": "invalid.illegal.extra-characters.apl" + }, + "34": { + "name": "invalid.illegal.apl" + }, + "35": { + "name": "punctuation.definition.axis.end.apl" + }, + "36": { + "name": "entity.function.operands.apl" + }, + "37": { + "name": "punctuation.definition.operands.begin.apl" + }, + "38": { + "name": "entity.function.operands.left.apl" + }, + "39": { + "name": "entity.function.name.apl", + "patterns": [ + { + "include": "#embolden" + } + ] + }, + "40": { + "name": "entity.function.axis.apl" + }, + "41": { + "name": "punctuation.definition.axis.begin.apl" + }, + "42": { + "name": "invalid.illegal.extra-characters.apl" + }, + "43": { + "name": "invalid.illegal.apl" + }, + "44": { + "name": "punctuation.definition.axis.end.apl" + }, + "45": { + "name": "entity.function.operands.right.apl" + }, + "46": { + "name": "punctuation.definition.operands.end.apl" + }, + "47": { + "name": "entity.function.arguments.right.apl" + }, + "48": { + "name": "punctuation.definition.arguments.begin.apl" + }, + "49": { + "name": "punctuation.definition.arguments.end.apl" + }, + "50": { + "name": "invalid.illegal.arguments.right.apl" + }, + "51": { + "name": "entity.function.local-variables.apl" + }, + "52": { + "patterns": [ + { + "name": "punctuation.separator.apl", + "match": ";" + } + ] + }, + "53": { + "name": "invalid.illegal.local-variables.apl" + }, + "54": { + "name": "comment.line.apl" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.nabla.apl" + }, + "2": { + "name": "keyword.operator.lock.apl" + }, + "3": { + "name": "comment.line.apl" + } + } + } + ] + }, + "embolden": { + "patterns": [ + { + "name": "markup.bold.identifier.apl", + "match": ".+" + } + ] + }, + "lambda": { + "name": "meta.lambda.function.apl", + "begin": "\\{", + "end": "\\}", + "beginCaptures": { + "0": { + "name": "punctuation.definition.lambda.begin.apl" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.lambda.end.apl" + } + }, + "patterns": [ + { + "include": "#main" + }, + { + "include": "#lambda-variables" + } + ] + }, + "lambda-variables": { + "patterns": [ + { + "match": "⍺⍺", + "name": "constant.language.lambda.operands.left.apl" + }, + { + "match": "⍵⍵", + "name": "constant.language.lambda.operands.right.apl" + }, + { + "match": "[⍺⍶]", + "name": "constant.language.lambda.arguments.left.apl" + }, + { + "match": "[⍵⍹]", + "name": "constant.language.lambda.arguments.right.apl" + }, + { + "match": "χ", + "name": "constant.language.lambda.arguments.axis.apl" + }, + { + "match": "∇∇", + "name": "constant.language.lambda.operands.self.operator.apl" + }, + { + "match": "∇", + "name": "constant.language.lambda.operands.self.function.apl" + }, + { + "match": "λ", + "name": "constant.language.lambda.symbol.apl" + } + ] + }, + "sysvars": { + "patterns": [ + { + "match": "(?:(⎕)|(⍞))[A-Za-z]*", + "name": "support.system.variable.apl", + "captures": { + "1": { + "name": "punctuation.definition.quad.apl" + }, + "2": { + "name": "punctuation.definition.quad-quote.apl" + } + } + } + ] + }, + "command-arguments": { + "patterns": [ + { + "name": "variable.parameter.argument.apl", + "begin": "\\b(?=\\S)", + "end": "\\b(?=\\s)", + "patterns": [ + { + "include": "#main" + } + ] + } + ] + }, + "command-switches": { + "patterns": [ + { + "name": "variable.parameter.switch.apl", + "begin": "(?x)\n(?<=\\s)(-)\n(\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]*\n)\n(=)", + "end": "\\b(?=\\s)", + "beginCaptures": { + "1": { + "name": "punctuation.delimiter.switch.apl" + }, + "2": { + "name": "entity.name.switch.apl" + }, + "3": { + "name": "punctuation.assignment.switch.apl" + } + }, + "patterns": [ + { + "include": "#main" + } + ] + }, + { + "name": "variable.parameter.switch.apl", + "match": "(?x)\n(?<=\\s)(-)\n(\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]*\n)\n(?!=)", + "captures": { + "1": { + "name": "punctuation.delimiter.switch.apl" + }, + "2": { + "name": "entity.name.switch.apl" + } + } + } + ] + }, + "sck": { + "patterns": [ + { + "name": "keyword.control.sck.apl", + "match": "(?<=\\s|^)(:)[A-Za-z]+", + "captures": { + "1": { + "name": "punctuation.definition.sck.begin.apl" + } + } + } + ] + }, + "class": { + "patterns": [ + { + "begin": "(?x)\n(?<=\\s|^)\n((:)Class)\n\\s+\n(\n\t'[^']*'?\n\t|\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]*\n)\n\\s*\n(\n\t(:)\n\t\\s*\n\t(?:\n\t\t(\n\t\t\t'[^']*'?\n\t\t\t|\n\t\t\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]\n\t\t\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]*\n\t\t)\n\t\t\\s*\n\t)?\n)?\n(.*?)$", + "end": "(?<=\\s|^)((:)EndClass)(?=\\b)", + "beginCaptures": { + "0": { + "name": "meta.class.apl" + }, + "1": { + "name": "keyword.control.class.apl" + }, + "2": { + "name": "punctuation.definition.class.apl" + }, + "3": { + "name": "entity.name.type.class.apl", + "patterns": [ + { + "include": "#strings" + } + ] + }, + "4": { + "name": "entity.other.inherited-class.apl" + }, + "5": { + "name": "punctuation.separator.inheritance.apl" + }, + "6": { + "patterns": [ + { + "include": "#strings" + } + ] + }, + "7": { + "name": "entity.other.class.interfaces.apl", + "patterns": [ + { + "include": "#csv" + } + ] + } + }, + "endCaptures": { + "1": { + "name": "keyword.control.class.apl" + }, + "2": { + "name": "punctuation.definition.class.apl" + } + }, + "patterns": [ + { + "name": "meta.field.apl", + "begin": "(?<=\\s|^)(:)Field(?=\\s)", + "end": "\\s*(←.*)?(?:$|(?=⍝))", + "beginCaptures": { + "0": { + "name": "keyword.control.field.apl" + }, + "1": { + "name": "punctuation.definition.field.apl" + } + }, + "endCaptures": { + "0": { + "name": "entity.other.initial-value.apl" + }, + "1": { + "patterns": [ + { + "include": "#main" + } + ] + } + }, + "patterns": [ + { + "name": "storage.modifier.access.public.apl", + "match": "(?<=\\s|^)Public(?=\\s|$)" + }, + { + "name": "storage.modifier.access.private.apl", + "match": "(?<=\\s|^)Private(?=\\s|$)" + }, + { + "name": "storage.modifier.shared.apl", + "match": "(?<=\\s|^)Shared(?=\\s|$)" + }, + { + "name": "storage.modifier.instance.apl", + "match": "(?<=\\s|^)Instance(?=\\s|$)" + }, + { + "name": "storage.modifier.readonly.apl", + "match": "(?<=\\s|^)ReadOnly(?=\\s|$)" + }, + { + "name": "entity.name.type.apl", + "match": "(?x)\n(\n\t'[^']*'?\n\t|\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]\n\t[A-Z_a-zÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ¯0-9]*\n)", + "captures": { + "1": { + "patterns": [ + { + "include": "#strings" + } + ] + } + } + } + ] + }, + { + "include": "$self" + } + ] + } + ] + }, + "csv": { + "patterns": [ + { + "match": ",", + "name": "punctuation.separator.apl" + }, + { + "include": "$self" + } + ] + }, + "heredocs": { + "patterns": [ + { + "name": "meta.heredoc.apl", + "begin": "^.*?⎕INP\\s+('|\")((?i).*?HTML?.*?|END-OF-⎕INP)\\1.*$", + "end": "^.*?\\2.*?$", + "beginCaptures": { + "0": { + "patterns": [ + { + "include": "#main" + } + ] + } + }, + "endCaptures": { + "0": { + "name": "constant.other.apl" + } + }, + "contentName": "text.embedded.html.basic", + "patterns": [ + { + "include": "text.html.basic" + }, + { + "include": "#embedded-apl" + } + ] + }, + { + "name": "meta.heredoc.apl", + "begin": "^.*?⎕INP\\s+('|\")((?i).*?(?:XML|XSLT|SVG|RSS).*?)\\1.*$", + "end": "^.*?\\2.*?$", + "beginCaptures": { + "0": { + "patterns": [ + { + "include": "#main" + } + ] + } + }, + "endCaptures": { + "0": { + "name": "constant.other.apl" + } + }, + "contentName": "text.embedded.xml", + "patterns": [ + { + "include": "text.xml" + }, + { + "include": "#embedded-apl" + } + ] + }, + { + "name": "meta.heredoc.apl", + "begin": "^.*?⎕INP\\s+('|\")((?i).*?(?:CSS|stylesheet).*?)\\1.*$", + "end": "^.*?\\2.*?$", + "beginCaptures": { + "0": { + "patterns": [ + { + "include": "#main" + } + ] + } + }, + "endCaptures": { + "0": { + "name": "constant.other.apl" + } + }, + "contentName": "source.embedded.css", + "patterns": [ + { + "include": "source.css" + }, + { + "include": "#embedded-apl" + } + ] + }, + { + "name": "meta.heredoc.apl", + "begin": "^.*?⎕INP\\s+('|\")((?i).*?(?:JS(?!ON)|(?:ECMA|J|Java).?Script).*?)\\1.*$", + "end": "^.*?\\2.*?$", + "beginCaptures": { + "0": { + "patterns": [ + { + "include": "#main" + } + ] + } + }, + "endCaptures": { + "0": { + "name": "constant.other.apl" + } + }, + "contentName": "source.embedded.js", + "patterns": [ + { + "include": "source.js" + }, + { + "include": "#embedded-apl" + } + ] + }, + { + "name": "meta.heredoc.apl", + "begin": "^.*?⎕INP\\s+('|\")((?i).*?(?:JSON).*?)\\1.*$", + "end": "^.*?\\2.*?$", + "beginCaptures": { + "0": { + "patterns": [ + { + "include": "#main" + } + ] + } + }, + "endCaptures": { + "0": { + "name": "constant.other.apl" + } + }, + "contentName": "source.embedded.json", + "patterns": [ + { + "include": "source.json" + }, + { + "include": "#embedded-apl" + } + ] + }, + { + "name": "meta.heredoc.apl", + "begin": "^.*?⎕INP\\s+('|\")(?i)((?:Raw|Plain)?\\s*Te?xt)\\1.*$", + "end": "^.*?\\2.*?$", + "beginCaptures": { + "0": { + "patterns": [ + { + "include": "#main" + } + ] + } + }, + "endCaptures": { + "0": { + "name": "constant.other.apl" + } + }, + "contentName": "text.embedded.plain", + "patterns": [ + { + "include": "#embedded-apl" + } + ] + }, + { + "name": "meta.heredoc.apl", + "begin": "^.*?⎕INP\\s+('|\")(.*?)\\1.*$", + "end": "^.*?\\2.*?$", + "beginCaptures": { + "0": { + "patterns": [ + { + "include": "#main" + } + ] + } + }, + "endCaptures": { + "0": { + "name": "constant.other.apl" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "embedded-apl": { + "patterns": [ + { + "name": "meta.embedded.block.apl", + "begin": "(?i)(<(\\?|%)(?:apl(?=\\s+)|=))", + "end": "(?<=\\s)(\\2>)", + "patterns": [ + { + "include": "#main" + } + ], + "beginCaptures": { + "1": { + "name": "punctuation.section.embedded.begin.apl" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.section.embedded.end.apl" + } + } + } + ] + } + } +} diff --git a/src/lib/shiki/languages/applescript.tmLanguage.json b/src/lib/shiki/languages/applescript.tmLanguage.json new file mode 100644 index 0000000..9815ca7 --- /dev/null +++ b/src/lib/shiki/languages/applescript.tmLanguage.json @@ -0,0 +1,1403 @@ +{ + "fileTypes": ["applescript", "scpt", "script editor"], + "firstLineMatch": "^#!.*(osascript)", + "keyEquivalent": "^~A", + "name": "applescript", + "patterns": [ + { + "include": "#blocks" + }, + { + "include": "#inline" + } + ], + "repository": { + "attributes.considering-ignoring": { + "patterns": [ + { + "match": ",", + "name": "punctuation.separator.array.attributes.applescript" + }, + { + "match": "\\b(and)\\b", + "name": "keyword.control.attributes.and.applescript" + }, + { + "match": "\\b(?i:case|diacriticals|hyphens|numeric\\s+strings|punctuation|white\\s+space)\\b", + "name": "constant.other.attributes.text.applescript" + }, + { + "match": "\\b(?i:application\\s+responses)\\b", + "name": "constant.other.attributes.application.applescript" + } + ] + }, + "blocks": { + "patterns": [ + { + "begin": "^\\s*(script)\\s+(\\w+)", + "beginCaptures": { + "1": { + "name": "keyword.control.script.applescript" + }, + "2": { + "name": "entity.name.type.script-object.applescript" + } + }, + "end": "^\\s*(end(?:\\s+script)?)(?=\\s*(--.*?)?$)", + "endCaptures": { + "1": { + "name": "keyword.control.script.applescript" + } + }, + "name": "meta.block.script.applescript", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "^(?x)\n\t\t\t\t\t\t\\s*(to|on)\\s+ \t\t\t\t\t# \"on\" or \"to\"\n\t\t\t\t\t\t(\\w+)\t\t\t\t\t\t\t# function name\n\t\t\t\t\t\t(\\()\t\t\t\t\t\t\t# opening paren\n\t\t\t\t\t\t\t((?:[\\s,:\\{\\}]*(?:\\w+)?)*)\t# parameters\n\t\t\t\t\t\t(\\))\t\t\t\t\t\t\t# closing paren\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.control.function.applescript" + }, + "2": { + "name": "entity.name.function.handler.applescript" + }, + "3": { + "name": "punctuation.definition.parameters.begin.applescript" + }, + "4": { + "name": "variable.parameter.handler.applescript" + }, + "5": { + "name": "punctuation.definition.parameters.end.applescript" + } + }, + "comment": "\n\t\t\t\t\t\tThis is not a very well-designed rule. For now,\n\t\t\t\t\t\twe can leave it like this though, as it sorta works.\n\t\t\t\t\t", + "end": "^\\s*(end)(?:\\s+(\\2))?(?=\\s*(--.*?)?$)", + "endCaptures": { + "1": { + "name": "keyword.control.function.applescript" + } + }, + "name": "meta.function.positional.applescript", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "^(?x)\n\t\t\t\t\t\t\\s*(to|on)\\s+ \t\t\t\t\t# \"on\" or \"to\"\n\t\t\t\t\t\t(\\w+)\t\t\t\t\t\t\t# function name\n\t\t\t\t\t\t(?:\\s+\n\t\t\t\t\t\t\t(of|in)\\s+\t\t\t\t\t# \"of\" or \"in\"\n\t\t\t\t\t\t\t(\\w+)\t\t\t\t\t\t# direct parameter\n\t\t\t\t\t\t)?\n\t\t\t\t\t\t(?=\\s+(above|against|apart\\s+from|around|aside\\s+from|at|below|beneath|beside|between|by|for|from|instead\\s+of|into|on|onto|out\\s+of|over|thru|under)\\b)\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.control.function.applescript" + }, + "2": { + "name": "entity.name.function.handler.applescript" + }, + "3": { + "name": "keyword.control.function.applescript" + }, + "4": { + "name": "variable.parameter.handler.direct.applescript" + } + }, + "comment": "TODO: match `given` parameters", + "end": "^\\s*(end)(?:\\s+(\\2))?(?=\\s*(--.*?)?$)", + "endCaptures": { + "1": { + "name": "keyword.control.function.applescript" + } + }, + "name": "meta.function.prepositional.applescript", + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.control.preposition.applescript" + }, + "2": { + "name": "variable.parameter.handler.applescript" + } + }, + "match": "\\b(?i:above|against|apart\\s+from|around|aside\\s+from|at|below|beneath|beside|between|by|for|from|instead\\s+of|into|on|onto|out\\s+of|over|thru|under)\\s+(\\w+)\\b" + }, + { + "include": "$self" + } + ] + }, + { + "begin": "^(?x)\n\t\t\t\t\t\t\\s*(to|on)\\s+ \t\t\t\t\t# \"on\" or \"to\"\n\t\t\t\t\t\t(\\w+)\t\t\t\t\t\t\t# function name\n\t\t\t\t\t\t(?=\\s*(--.*?)?$)\t\t\t\t# nothing else\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.control.function.applescript" + }, + "2": { + "name": "entity.name.function.handler.applescript" + } + }, + "end": "^\\s*(end)(?:\\s+(\\2))?(?=\\s*(--.*?)?$)", + "endCaptures": { + "1": { + "name": "keyword.control.function.applescript" + } + }, + "name": "meta.function.parameterless.applescript", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "#blocks.tell" + }, + { + "include": "#blocks.repeat" + }, + { + "include": "#blocks.statement" + }, + { + "include": "#blocks.other" + } + ] + }, + "blocks.other": { + "patterns": [ + { + "begin": "^\\s*(considering)\\b", + "end": "^\\s*(end(?:\\s+considering)?)(?=\\s*(--.*?)?$)", + "name": "meta.block.considering.applescript", + "patterns": [ + { + "begin": "(?<=considering)", + "end": "(?|<|≥|>=|≤|<=)", + "name": "keyword.operator.comparison.applescript" + }, + { + "match": "(?ix)\\b\n\t\t\t\t\t\t(and|or|div|mod|as|not\n\t\t\t\t\t\t|(a\\s+)?(ref(\\s+to)?|reference\\s+to)\n\t\t\t\t\t\t|equal(s|\\s+to)|contains?|comes\\s+(after|before)|(start|begin|end)s?\\s+with\n\t\t\t\t\t\t)\n\t\t\t\t\t\\b", + "name": "keyword.operator.word.applescript" + }, + { + "comment": "In double quotes so we can use a single quote in the keywords.", + "match": "(?ix)\\b\n\t\t\t\t\t\t(is(n't|\\s+not)?(\\s+(equal(\\s+to)?|(less|greater)\\s+than(\\s+or\\s+equal(\\s+to)?)?|in|contained\\s+by))?\n\t\t\t\t\t\t|does(n't|\\s+not)\\s+(equal|come\\s+(before|after)|contain)\n\t\t\t\t\t\t)\n\t\t\t\t\t\\b", + "name": "keyword.operator.word.applescript" + }, + { + "match": "\\b(?i:some|every|whose|where|that|id|index|\\d+(st|nd|rd|th)|first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|last|front|back|middle|named|beginning|end|from|to|thr(u|ough)|before|(front|back|beginning|end)\\s+of|after|behind|in\\s+(front|back|beginning|end)\\s+of)\\b", + "name": "keyword.operator.reference.applescript" + }, + { + "match": "\\b(?i:continue|return|exit(\\s+repeat)?)\\b", + "name": "keyword.control.loop.applescript" + }, + { + "match": "\\b(?i:about|above|after|against|and|apart\\s+from|around|as|aside\\s+from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|contain|contains|contains|copy|div|does|eighth|else|end|equal|equals|error|every|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead\\s+of|into|is|it|its|last|local|me|middle|mod|my|ninth|not|of|on|onto|or|out\\s+of|over|prop|property|put|ref|reference|repeat|returning|script|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\\b", + "name": "keyword.other.applescript" + } + ] + }, + "built-in.punctuation": { + "patterns": [ + { + "match": "¬", + "name": "punctuation.separator.continuation.line.applescript" + }, + { + "comment": "the : in property assignments", + "match": ":", + "name": "punctuation.separator.key-value.property.applescript" + }, + { + "comment": "the parentheses in groups", + "match": "[()]", + "name": "punctuation.section.group.applescript" + } + ] + }, + "built-in.support": { + "patterns": [ + { + "match": "\\b(?i:POSIX\\s+path|frontmost|id|name|running|version|days?|weekdays?|months?|years?|time|date\\s+string|time\\s+string|length|rest|reverse|items?|contents|quoted\\s+form|characters?|paragraphs?|words?)\\b", + "name": "support.function.built-in.property.applescript" + }, + { + "match": "\\b(?i:activate|log|clipboard\\s+info|set\\s+the\\s+clipboard\\s+to|the\\s+clipboard|info\\s+for|list\\s+(disks|folder)|mount\\s+volume|path\\s+to(\\s+resource)?|close\\s+access|get\\s+eof|open\\s+for\\s+access|read|set\\s+eof|write|open\\s+location|current\\s+date|do\\s+shell\\s+script|get\\s+volume\\s+settings|random\\s+number|round|set\\s+volume|system\\s+(attribute|info)|time\\s+to\\s+GMT|load\\s+script|run\\s+script|scripting\\s+components|store\\s+script|copy|count|get|launch|run|set|ASCII\\s+(character|number)|localized\\s+string|offset|summarize|beep|choose\\s+(application|color|file(\\s+name)?|folder|from\\s+list|remote\\s+application|URL)|delay|display\\s+(alert|dialog)|say)\\b", + "name": "support.function.built-in.command.applescript" + }, + { + "match": "\\b(?i:get|run)\\b", + "name": "support.function.built-in.applescript" + }, + { + "match": "\\b(?i:anything|data|text|upper\\s+case|propert(y|ies))\\b", + "name": "support.class.built-in.applescript" + }, + { + "match": "\\b(?i:alias|class)(es)?\\b", + "name": "support.class.built-in.applescript" + }, + { + "match": "\\b(?i:app(lication)?|boolean|character|constant|date|event|file(\\s+specification)?|handler|integer|item|keystroke|linked\\s+list|list|machine|number|picture|preposition|POSIX\\s+file|real|record|reference(\\s+form)?|RGB\\s+color|script|sound|text\\s+item|type\\s+class|vector|writing\\s+code(\\s+info)?|zone|((international|styled(\\s+(Clipboard|Unicode))?|Unicode)\\s+)?text|((C|encoded|Pascal)\\s+)?string)s?\\b", + "name": "support.class.built-in.applescript" + }, + { + "match": "(?ix)\\b\n\t\t\t\t\t\t(\t(cubic\\s+(centi)?|square\\s+(kilo)?|centi|kilo)met(er|re)s\n\t\t\t\t\t\t|\tsquare\\s+(yards|feet|miles)|cubic\\s+(yards|feet|inches)|miles|inches\n\t\t\t\t\t\t|\tlit(re|er)s|gallons|quarts\n\t\t\t\t\t\t|\t(kilo)?grams|ounces|pounds\n\t\t\t\t\t\t|\tdegrees\\s+(Celsius|Fahrenheit|Kelvin)\n\t\t\t\t\t\t)\n\t\t\t\t\t\\b", + "name": "support.class.built-in.unit.applescript" + }, + { + "match": "\\b(?i:seconds|minutes|hours|days)\\b", + "name": "support.class.built-in.time.applescript" + } + ] + }, + "comments": { + "patterns": [ + { + "begin": "^\\s*(#!)", + "captures": { + "1": { + "name": "punctuation.definition.comment.applescript" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.applescript" + }, + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.applescript" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.applescript" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.applescript" + } + ] + }, + { + "begin": "(^[ \\t]+)?(?=--)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.applescript" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "--", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.applescript" + } + }, + "end": "\\n", + "name": "comment.line.double-dash.applescript" + } + ] + }, + { + "begin": "\\(\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.applescript" + } + }, + "end": "\\*\\)", + "name": "comment.block.applescript", + "patterns": [ + { + "include": "#comments.nested" + } + ] + } + ] + }, + "comments.nested": { + "patterns": [ + { + "begin": "\\(\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.applescript" + } + }, + "end": "\\*\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.applescript" + } + }, + "name": "comment.block.applescript", + "patterns": [ + { + "include": "#comments.nested" + } + ] + } + ] + }, + "data-structures": { + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.applescript" + } + }, + "comment": "We cannot necessarily distinguish \"records\" from \"arrays\", and so this could be either.", + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.applescript" + } + }, + "name": "meta.array.applescript", + "patterns": [ + { + "captures": { + "1": { + "name": "constant.other.key.applescript" + }, + "2": { + "name": "meta.identifier.applescript" + }, + "3": { + "name": "punctuation.definition.identifier.applescript" + }, + "4": { + "name": "punctuation.definition.identifier.applescript" + }, + "5": { + "name": "punctuation.separator.key-value.applescript" + } + }, + "match": "(\\w+|((\\|)[^|\\n]*(\\|)))\\s*(:)" + }, + { + "match": ":", + "name": "punctuation.separator.key-value.applescript" + }, + { + "match": ",", + "name": "punctuation.separator.array.applescript" + }, + { + "include": "#inline" + } + ] + }, + { + "begin": "(?:(?<=application )|(?<=app ))(\")", + "captures": { + "1": { + "name": "punctuation.definition.string.applescript" + } + }, + "end": "(\")", + "name": "string.quoted.double.application-name.applescript", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.applescript" + } + ] + }, + { + "begin": "(\")", + "captures": { + "1": { + "name": "punctuation.definition.string.applescript" + } + }, + "end": "(\")", + "name": "string.quoted.double.applescript", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.applescript" + } + ] + }, + { + "captures": { + "1": { + "name": "punctuation.definition.identifier.applescript" + }, + "2": { + "name": "punctuation.definition.identifier.applescript" + } + }, + "match": "(\\|)[^|\\n]*(\\|)", + "name": "meta.identifier.applescript" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.data.applescript" + }, + "2": { + "name": "support.class.built-in.applescript" + }, + "3": { + "name": "storage.type.utxt.applescript" + }, + "4": { + "name": "string.unquoted.data.applescript" + }, + "5": { + "name": "punctuation.definition.data.applescript" + }, + "6": { + "name": "keyword.operator.applescript" + }, + "7": { + "name": "support.class.built-in.applescript" + } + }, + "match": "(«)(data) (utxt|utf8)([[:xdigit:]]*)(»)(?:\\s+(as)\\s+(?i:Unicode\\s+text))?", + "name": "constant.other.data.utxt.applescript" + }, + { + "begin": "(«)(\\w+)\\b(?=\\s)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.data.applescript" + }, + "2": { + "name": "support.class.built-in.applescript" + } + }, + "end": "(»)", + "endCaptures": { + "1": { + "name": "punctuation.definition.data.applescript" + } + }, + "name": "constant.other.data.raw.applescript" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.data.applescript" + }, + "2": { + "name": "punctuation.definition.data.applescript" + } + }, + "match": "(«)[^»]*(»)", + "name": "invalid.illegal.data.applescript" + } + ] + }, + "finder": { + "patterns": [ + { + "match": "\\b(item|container|(computer|disk|trash)-object|disk|folder|((alias|application|document|internet location) )?file|clipping|package)s?\\b", + "name": "support.class.finder.items.applescript" + }, + { + "match": "\\b((Finder|desktop|information|preferences|clipping) )windows?\\b", + "name": "support.class.finder.window-classes.applescript" + }, + { + "match": "\\b(preferences|(icon|column|list) view options|(label|column|alias list)s?)\\b", + "name": "support.class.finder.type-definitions.applescript" + }, + { + "match": "\\b(copy|find|sort|clean up|eject|empty( trash)|erase|reveal|update)\\b", + "name": "support.function.finder.items.applescript" + }, + { + "match": "\\b(insertion location|product version|startup disk|desktop|trash|home|computer container|finder preferences)\\b", + "name": "support.constant.finder.applescript" + }, + { + "match": "\\b(visible)\\b", + "name": "support.variable.finder.applescript" + } + ] + }, + "inline": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#data-structures" + }, + { + "include": "#built-in" + }, + { + "include": "#standardadditions" + } + ] + }, + "itunes": { + "patterns": [ + { + "match": "\\b(artwork|application|encoder|EQ preset|item|source|visual|(EQ |browser )?window|((audio CD|device|shared|URL|file) )?track|playlist window|((audio CD|device|radio tuner|library|folder|user) )?playlist)s?\\b", + "name": "support.class.itunes.applescript" + }, + { + "match": "\\b(add|back track|convert|fast forward|(next|previous) track|pause|play(pause)?|refresh|resume|rewind|search|stop|update|eject|subscribe|update(Podcast|AllPodcasts)|download)\\b", + "name": "support.function.itunes.applescript" + }, + { + "match": "\\b(current (playlist|stream (title|URL)|track)|player state)\\b", + "name": "support.constant.itunes.applescript" + }, + { + "match": "\\b(current (encoder|EQ preset|visual)|EQ enabled|fixed indexing|full screen|mute|player position|sound volume|visuals enabled|visual size)\\b", + "name": "support.variable.itunes.applescript" + } + ] + }, + "standard-suite": { + "patterns": [ + { + "match": "\\b(colors?|documents?|items?|windows?)\\b", + "name": "support.class.standard-suite.applescript" + }, + { + "match": "\\b(close|count|delete|duplicate|exists|make|move|open|print|quit|save|activate|select|data size)\\b", + "name": "support.function.standard-suite.applescript" + }, + { + "match": "\\b(name|frontmost|version)\\b", + "name": "support.constant.standard-suite.applescript" + }, + { + "match": "\\b(selection)\\b", + "name": "support.variable.standard-suite.applescript" + }, + { + "match": "\\b(attachments?|attribute runs?|characters?|paragraphs?|texts?|words?)\\b", + "name": "support.class.text-suite.applescript" + } + ] + }, + "standardadditions": { + "patterns": [ + { + "match": "\\b((alert|dialog) reply)\\b", + "name": "support.class.standardadditions.user-interaction.applescript" + }, + { + "match": "\\b(file information)\\b", + "name": "support.class.standardadditions.file.applescript" + }, + { + "match": "\\b(POSIX files?|system information|volume settings)\\b", + "name": "support.class.standardadditions.miscellaneous.applescript" + }, + { + "match": "\\b(URLs?|internet address(es)?|web pages?|FTP items?)\\b", + "name": "support.class.standardadditions.internet.applescript" + }, + { + "match": "\\b(info for|list (disks|folder)|mount volume|path to( resource)?)\\b", + "name": "support.function.standardadditions.file.applescript" + }, + { + "match": "\\b(beep|choose (application|color|file( name)?|folder|from list|remote application|URL)|delay|display (alert|dialog)|say)\\b", + "name": "support.function.standardadditions.user-interaction.applescript" + }, + { + "match": "\\b(ASCII (character|number)|localized string|offset|summarize)\\b", + "name": "support.function.standardadditions.string.applescript" + }, + { + "match": "\\b(set the clipboard to|the clipboard|clipboard info)\\b", + "name": "support.function.standardadditions.clipboard.applescript" + }, + { + "match": "\\b(open for access|close access|read|write|get eof|set eof)\\b", + "name": "support.function.standardadditions.file-i-o.applescript" + }, + { + "match": "\\b((load|store|run) script|scripting components)\\b", + "name": "support.function.standardadditions.scripting.applescript" + }, + { + "match": "\\b(current date|do shell script|get volume settings|random number|round|set volume|system attribute|system info|time to GMT)\\b", + "name": "support.function.standardadditions.miscellaneous.applescript" + }, + { + "match": "\\b(opening folder|(closing|moving) folder window for|adding folder items to|removing folder items from)\\b", + "name": "support.function.standardadditions.folder-actions.applescript" + }, + { + "match": "\\b(open location|handle CGI request)\\b", + "name": "support.function.standardadditions.internet.applescript" + } + ] + }, + "system-events": { + "patterns": [ + { + "match": "\\b(audio (data|file))\\b", + "name": "support.class.system-events.audio-file.applescript" + }, + { + "match": "\\b(alias(es)?|(Classic|local|network|system|user) domain objects?|disk( item)?s?|domains?|file( package)?s?|folders?|items?)\\b", + "name": "support.class.system-events.disk-folder-file.applescript" + }, + { + "match": "\\b(delete|open|move)\\b", + "name": "support.function.system-events.disk-folder-file.applescript" + }, + { + "match": "\\b(folder actions?|scripts?)\\b", + "name": "support.class.system-events.folder-actions.applescript" + }, + { + "match": "\\b(attach action to|attached scripts|edit action of|remove action from)\\b", + "name": "support.function.system-events.folder-actions.applescript" + }, + { + "match": "\\b(movie data|movie file)\\b", + "name": "support.class.system-events.movie-file.applescript" + }, + { + "match": "\\b(log out|restart|shut down|sleep)\\b", + "name": "support.function.system-events.power.applescript" + }, + { + "match": "\\b(((application |desk accessory )?process|(check|combo )?box)(es)?|(action|attribute|browser|(busy|progress|relevance) indicator|color well|column|drawer|group|grow area|image|incrementor|list|menu( bar)?( item)?|(menu |pop up |radio )?button|outline|(radio|tab|splitter) group|row|scroll (area|bar)|sheet|slider|splitter|static text|table|text (area|field)|tool bar|UI element|window)s?)\\b", + "name": "support.class.system-events.processes.applescript" + }, + { + "match": "\\b(click|key code|keystroke|perform|select)\\b", + "name": "support.function.system-events.processes.applescript" + }, + { + "match": "\\b(property list (file|item))\\b", + "name": "support.class.system-events.property-list.applescript" + }, + { + "match": "\\b(annotation|QuickTime (data|file)|track)s?\\b", + "name": "support.class.system-events.quicktime-file.applescript" + }, + { + "match": "\\b((abort|begin|end) transaction)\\b", + "name": "support.function.system-events.system-events.applescript" + }, + { + "match": "\\b(XML (attribute|data|element|file)s?)\\b", + "name": "support.class.system-events.xml.applescript" + }, + { + "match": "\\b(print settings|users?|login items?)\\b", + "name": "support.class.sytem-events.other.applescript" + } + ] + }, + "textmate": { + "patterns": [ + { + "match": "\\b(print settings)\\b", + "name": "support.class.textmate.applescript" + }, + { + "match": "\\b(get url|insert|reload bundles)\\b", + "name": "support.function.textmate.applescript" + } + ] + } + }, + "scopeName": "source.applescript", + "uuid": "777CF925-14B9-428E-B07B-17FAAB8FA27E" +} diff --git a/src/lib/shiki/languages/ara.tmLanguage.json b/src/lib/shiki/languages/ara.tmLanguage.json new file mode 100644 index 0000000..50e2338 --- /dev/null +++ b/src/lib/shiki/languages/ara.tmLanguage.json @@ -0,0 +1,425 @@ +{ + "scopeName": "source.ara", + "name": "ara", + "fileTypes": ["ara"], + "patterns": [ + { + "include": "#namespace" + }, + { + "include": "#named-arguments" + }, + { + "include": "#comments" + }, + { + "include": "#keywords" + }, + { + "include": "#strings" + }, + { + "include": "#numbers" + }, + { + "include": "#operators" + }, + { + "include": "#type" + }, + { + "include": "#function-call" + } + ], + "repository": { + "class-name": { + "patterns": [ + { + "begin": "\\b(?i)(?", + "patterns": [ + { + "include": "#type-annotation" + } + ] + }, + { + "begin": "(shape\\()", + "end": "((,|\\.\\.\\.)?\\s*\\))", + "endCaptures": { + "1": { + "name": "keyword.operator.key.php" + } + }, + "name": "storage.type.shape.php", + "patterns": [ + { + "include": "#type-annotation" + }, + { + "include": "#strings" + }, + { + "include": "#constants" + } + ] + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#type-annotation" + } + ] + }, + { + "begin": "\\(fn\\(", + "end": "\\)", + "patterns": [ + { + "include": "#type-annotation" + } + ] + }, + { + "include": "#class-name" + }, + { + "include": "#comments" + } + ] + }, + "namespace": { + "begin": "(?i)((namespace)|[a-z0-9_]+)?(\\\\)(?=.*?[^a-z_0-9\\\\])", + "beginCaptures": { + "1": { + "name": "entity.name.type.namespace.php" + }, + "3": { + "name": "punctuation.separator.inheritance.php" + } + }, + "end": "(?i)(?=[a-z0-9_]*[^a-z0-9_\\\\])", + "name": "support.other.namespace.php", + "patterns": [ + { + "name": "entity.name.type.namespace.php", + "match": "(?i)[a-z0-9_]+(?=\\\\)" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + }, + "match": "(?i)(\\\\)" + } + ] + }, + "named-arguments": { + "match": "(?i)(?<=^|\\(|,)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\\s*(:)(?!:)", + "captures": { + "1": { + "name": "entity.name.variable.parameter.ara" + }, + "2": { + "name": "punctuation.separator.colon.ara" + } + } + }, + "comments": { + "patterns": [ + { + "begin": "/\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.ara" + } + }, + "end": "\\*/", + "name": "comment.block.ara" + }, + { + "begin": "(^[ \\t]+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.ara" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.ara" + } + }, + "end": "\\n", + "name": "comment.line.double-slash.ara" + } + ] + } + ] + }, + "keywords": { + "patterns": [ + { + "name": "keyword.control.ara", + "match": "\\b(await|async|concurrently|break|continue|do|else|elseif|for|if|loop|while|foreach|match|return|try|yield|from|catch|finally|default|exit)\\b" + }, + { + "name": "storage.decl.ara", + "match": "\\b(const|enum|class|interface|trait|namespace|type|case|function|fn)\\b" + }, + { + "name": "storage.modifier.ara", + "match": "\\b(final|abstract|static|readonly|public|private|protected)\\b" + }, + { + "name": "keyword.other.ara", + "match": "\\b(as|is|extends|implements|use|where|clone|new)\\b" + } + ] + }, + "function-call": { + "patterns": [ + { + "begin": "(?i)(?=\\\\?[a-z_0-9\\\\]+\\\\[a-z_][a-z0-9_]*\\s*(\\(|(::<)))", + "comment": "Functions in a user-defined namespace (overrides any built-ins)", + "end": "(?=\\s*(\\(|(::<)))", + "patterns": [ + { + "include": "#user-function-call" + } + ] + }, + { + "begin": "(?i)(\\\\)?(?=\\b[a-z_][a-z_0-9]*\\s*(\\(|(::<)))", + "beginCaptures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + }, + "comment": "Root namespace function calls (built-in or user)", + "end": "(?=\\s*(\\(|(::<)))", + "patterns": [ + { + "include": "#user-function-call" + } + ] + } + ] + }, + "user-function-call": { + "begin": "(?i)(?=[a-z_0-9\\\\]*[a-z_][a-z0-9_]*\\s*\\()", + "end": "(?i)[a-z_][a-z_0-9]*(?=\\s*\\()", + "endCaptures": { + "0": { + "name": "entity.name.function.php" + } + }, + "name": "meta.function-call.php", + "patterns": [ + { + "include": "#namespace" + } + ] + }, + "strings": { + "patterns": [ + { + "name": "string.quoted.single.ara", + "begin": "'", + "end": "'", + "patterns": [ + { + "match": "\\\\[\\\\']", + "name": "constant.character.escape.ara" + } + ] + }, + { + "name": "string.quoted.double.ara", + "begin": "\"", + "end": "\"", + "patterns": [ + { + "include": "#interpolation" + } + ] + } + ] + }, + "interpolation": { + "patterns": [ + { + "comment": "Interpolating octal values e.g. \\01 or \\07.", + "match": "\\\\[0-7]{1,3}", + "name": "constant.numeric.octal.ara" + }, + { + "comment": "Interpolating hex values e.g. \\x1 or \\xFF.", + "match": "\\\\x[0-9A-Fa-f]{1,2}", + "name": "constant.numeric.hex.ara" + }, + { + "comment": "Escaped characters in double-quoted strings e.g. \\n or \\t.", + "match": "\\\\[nrt\\\\\\$\\\"]", + "name": "constant.character.escape.ara" + } + ] + }, + "numbers": { + "patterns": [ + { + "match": "0[xX][0-9a-fA-F]+(?:_[0-9a-fA-F]+)*", + "name": "constant.numeric.hex.ara" + }, + { + "match": "0[bB][01]+(?:_[01]+)*", + "name": "constant.numeric.binary.ara" + }, + { + "match": "0[oO][0-7]+(?:_[0-7]+)*", + "name": "constant.numeric.octal.ara" + }, + { + "match": "0(?:_?[0-7]+)+", + "name": "constant.numeric.octal.ara" + }, + { + "match": "(?x)\n(?:\n (?:[0-9]+(?:_[0-9]+)*)?(\\.)[0-9]+(?:_[0-9]+)*(?:[eE][+-]?[0-9]+(?:_[0-9]+)*)?| # .3\n [0-9]+(?:_[0-9]+)*(\\.)(?:[0-9]+(?:_[0-9]+)*)?(?:[eE][+-]?[0-9]+(?:_[0-9]+)*)?| # 3.\n [0-9]+(?:_[0-9]+)*[eE][+-]?[0-9]+(?:_[0-9]+)* # 2e-3\n)", + "name": "constant.numeric.decimal.ara", + "captures": { + "1": { + "name": "punctuation.separator.decimal.period.ara" + }, + "2": { + "name": "punctuation.separator.decimal.period.ara" + } + } + }, + { + "match": "0|[1-9](?:_?[0-9]+)*", + "name": "constant.numeric.decimal.ara" + } + ] + }, + "operators": { + "patterns": [ + { + "comment": "assignment operators", + "name": "keyword.assignments.ara", + "match": "(\\+=|-=|\\*=|/=|%=|\\^=|&&=|<=|>=|&=|\\|=|<<=|>>=|\\?\\?=)" + }, + { + "comment": "logical operators", + "name": "keyword.operators.ara", + "match": "(\\^|\\||\\|\\||&&|>>|<<|&|~|<<|>>|>|<|<=>|\\?\\?|\\?|:|\\?:)(?!=)" + }, + { + "comment": "comparison operators", + "name": "keyword.operator.comparison.ara", + "match": "(==|===|!==|!=|<=|>=|<|>)(?!=)" + }, + { + "comment": "math operators", + "name": "keyword.operator.math.ara", + "match": "(([+%]|(\\*(?!\\w)))(?!=))|(-(?!>))|(/(?!/))" + }, + { + "comment": "single equal assignment operator", + "name": "keyword.operator.assignment.ara", + "match": "(?])=(?!=|>)" + }, + { + "comment": "less than, greater than (special case)", + "match": "(?:\\b|(?:(\\))|(\\])|(\\})))[ \\t]+([<>])[ \\t]+(?:\\b|(?:(\\()|(\\[)|(\\{)))", + "captures": { + "1": { + "name": "punctuation.brackets.round.ara" + }, + "2": { + "name": "punctuation.brackets.square.ara" + }, + "3": { + "name": "punctuation.brackets.curly.ara" + }, + "4": { + "name": "keyword.operator.comparison.ara" + }, + "5": { + "name": "punctuation.brackets.round.ara" + }, + "6": { + "name": "punctuation.brackets.square.ara" + }, + "7": { + "name": "punctuation.brackets.curly.ara" + } + } + }, + { + "comment": "arrow method call, arrow property access", + "name": "keyword.operator.arrow.ara", + "match": "(?x)\n(?:\n -> | \\?-> \n)" + }, + { + "comment": "double arrow key-value pair", + "name": "keyword.operator.double-arrow.ara", + "match": "(?x)\n(?:\n =>\n)" + }, + { + "comment": "static method call, static property access", + "name": "keyword.operator.static.ara", + "match": "(?x)\n(?:\n ::\n)" + }, + { + "comment": "closure creation", + "name": "keyword.operator.closure.ara", + "match": "(?x)\n(?:\n \\(\\.\\.\\.\\)\n)" + }, + { + "comment": "spread operator", + "name": "keyword.operator.spread.ara", + "match": "(?x)\n(?:\n \\.\\.\\.\n)" + }, + { + "comment": "namespace operator", + "name": "keyword.operator.namespace.ara", + "match": "\\\\" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/asm.tmLanguage.json b/src/lib/shiki/languages/asm.tmLanguage.json new file mode 100644 index 0000000..93dbc6a --- /dev/null +++ b/src/lib/shiki/languages/asm.tmLanguage.json @@ -0,0 +1,1735 @@ +{ + "fileTypes": ["asm", "nasm", "yasm", "inc", "s"], + "name": "asm", + "patterns": [ + { + "include": "#registers" + }, + { + "include": "#mnemonics" + }, + { + "include": "#constants" + }, + { + "include": "#entities" + }, + { + "include": "#support" + }, + { + "include": "#comments" + }, + { + "include": "#preprocessor" + }, + { + "include": "#strings" + } + ], + "repository": { + "comments": { + "patterns": [ + { + "match": "(;|(^|\\s)#\\s).*$", + "name": "comment.line" + }, + { + "begin": "/\\*", + "end": "\\*/", + "name": "comment.block" + }, + { + "begin": "^\\s*[\\#%]\\s*if\\s+0\\b", + "end": "^\\s*[\\#%]\\s*endif\\b", + "name": "comment.preprocessor" + } + ] + }, + "constants": { + "patterns": [ + { + "match": "(?i)\\b0[by](?:[01][01_]*)\\.(?:(?:[01][01_]*)?(?:p[+-]?(?:[0-9][0-9_]*))?\\b)?", + "name": "constant.numeric.binary.floating-point.asm.x86_64" + }, + { + "match": "(?i)\\b0[by](?:[01][01_]*)(?:p[+-]?(?:[0-9][0-9_]*))\\b", + "name": "constant.numeric.binary.floating-point.asm.x86_64" + }, + { + "match": "(?i)\\b0[oq](?:[0-7][0-7_]*)\\.(?:(?:[0-7][0-7_]*)?(?:p[+-]?(?:[0-9][0-9_]*))?\\b)?", + "name": "constant.numeric.octal.floating-point.asm.x86_64" + }, + { + "match": "(?i)\\b0[oq](?:[0-7][0-7_]*)(?:p[+-]?(?:[0-9][0-9_]*))\\b", + "name": "constant.numeric.octal.floating-point.asm.x86_64" + }, + { + "match": "(?i)\\b(?:0[dt])?(?:[0-9][0-9_]*)\\.(?:(?:[0-9][0-9_]*)?(?:e[+-]?(?:[0-9][0-9_]*))?\\b)?", + "name": "constant.numeric.decimal.floating-point.asm.x86_64" + }, + { + "match": "(?i)\\b(?:[0-9][0-9_]*)(?:e[+-]?(?:[0-9][0-9_]*))\\b", + "name": "constant.numeric.decimal.floating-point.asm.x86_64" + }, + { + "match": "(?i)\\b(?:[0-9][0-9_]*)p(?:[0-9][0-9_]*)?\\b", + "name": "constant.numeric.decimal.packed-bcd.asm.x86_64" + }, + { + "match": "(?i)\\b0[xh](?:[[:xdigit:]][[:xdigit:]_]*)\\.(?:(?:[[:xdigit:]][[:xdigit:]_]*)?(?:p[+-]?(?:[0-9][0-9_]*))?\\b)?", + "name": "constant.numeric.hex.floating-point.asm.x86_64" + }, + { + "match": "(?i)\\b0[xh](?:[[:xdigit:]][[:xdigit:]_]*)(?:p[+-]?(?:[0-9][0-9_]*))\\b", + "name": "constant.numeric.hex.floating-point.asm.x86_64" + }, + { + "match": "(?i)\\$[0-9]\\_?(?:[[:xdigit:]][[:xdigit:]_]*)?\\.(?:(?:[[:xdigit:]][[:xdigit:]_]*)?(?:p[+-]?(?:[0-9][0-9_]*))?\\b)?", + "name": "constant.numeric.hex.floating-point.asm.x86_64" + }, + { + "match": "(?i)\\$[0-9]\\_?(?:[[:xdigit:]][[:xdigit:]_]*)(?:p[+-]?(?:[0-9][0-9_]*))\\b", + "name": "constant.numeric.hex.floating-point.asm.x86_64" + }, + { + "match": "(?i)\\b(?:(?:0[by](?:[01][01_]*))|(?:(?:[01][01_]*)[by]))\\b", + "name": "constant.numeric.binary.asm.x86_64" + }, + { + "match": "(?i)\\b(?:(?:0[oq](?:[0-7][0-7_]*))|(?:(?:[0-7][0-7_]*)[oq]))\\b", + "name": "constant.numeric.octal.asm.x86_64" + }, + { + "match": "(?i)\\b(?:(?:0[dt](?:[0-9][0-9_]*))|(?:(?:[0-9][0-9_]*)[dt]?))\\b", + "name": "constant.numeric.decimal.asm.x86_64" + }, + { + "match": "(?i)(?:\\$[0-9]\\_?(?:[[:xdigit:]][[:xdigit:]_]*)?)\\b", + "name": "constant.numeric.hex.asm.x86_64" + }, + { + "match": "(?i)\\b(?:(?:0[xh](?:[[:xdigit:]][[:xdigit:]_]*))|(?:(?:[[:xdigit:]][[:xdigit:]_]*)[hxHX]))\\b", + "name": "constant.numeric.hex.asm.x86_64" + } + ] + }, + "entities": { + "patterns": [ + { + "match": "((section|segment)\\s+)?\\.((ro)?data|bss|text)", + "name": "entity.name.section" + }, + { + "match": "^\\.?(globa?l|extern|required)\\b", + "name": "entity.directive" + }, + { + "match": "(\\$\\w+)\\b", + "name": "text.variable" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.asm.x86_64 storage.modifier.asm.x86_64" + }, + "2": { + "name": "entity.name.function.special.asm.x86_64" + }, + "3": { + "name": "punctuation.separator.asm.x86_64" + } + }, + "match": "(\\.\\.@)((?:[[:alpha:]_?](?:[[:alnum:]_$#@~.?]*)))(?:(\\:)?|\\b)", + "name": "entity.name.function.asm.x86_64" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.asm.x86_64 storage.modifier.asm.x86_64" + }, + "2": { + "name": "entity.name.function.asm.x86_64" + }, + "3": { + "name": "punctuation.separator.asm.x86_64" + } + }, + "match": "(?:(\\.)?|\\b)((?:[[:alpha:]_?](?:[[:alnum:]_$#@~.?]*)))(?:(\\:))", + "name": "entity.name.function.asm.x86_64" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.asm.x86_64 storage.modifier.asm.x86_64" + }, + "2": { + "name": "entity.name.function.asm.x86_64" + }, + "3": { + "name": "punctuation.separator.asm.x86_64" + } + }, + "match": "(\\.)([0-9]+(?:[[:alnum:]_$#@~.?]*))(?:(\\:)?|\\b)", + "name": "entity.name.function.asm.x86_64" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.asm.x86_64 storage.modifier.asm.x86_64" + }, + "2": { + "name": "invalid.illegal.entity.name.function.asm.x86_64" + }, + "3": { + "name": "punctuation.separator.asm.x86_64" + } + }, + "match": "(?:(\\.)?|\\b)([0-9$@~](?:[[:alnum:]_$#@~.?]*))(?:(\\:))", + "name": "invalid.illegal.entity.name.function.asm.x86_64" + } + ] + }, + "mnemonics": { + "patterns": [ + { + "include": "#mnemonics-general-purpose" + }, + { + "include": "#mnemonics-fpu" + }, + { + "include": "#mnemonics-mmx" + }, + { + "include": "#mnemonics-sse" + }, + { + "include": "#mnemonics-sse2" + }, + { + "include": "#mnemonics-sse3" + }, + { + "include": "#mnemonics-sse4" + }, + { + "include": "#mnemonics-aesni" + }, + { + "include": "#mnemonics-avx" + }, + { + "include": "#mnemonics-avx2" + }, + { + "include": "#mnemonics-tsx" + }, + { + "include": "#mnemonics-sha" + }, + { + "include": "#mnemonics-avx512" + }, + { + "include": "#mnemonics-system" + }, + { + "include": "#mnemonics-64bit" + }, + { + "include": "#mnemonics-vmx" + }, + { + "include": "#mnemonics-smx" + }, + { + "include": "#mnemonics-mpx" + }, + { + "include": "#mnemonics-sgx" + }, + { + "include": "#mnemonics-cet" + }, + { + "include": "#mnemonics-amx" + }, + { + "include": "#mnemonics-uirq" + }, + { + "include": "#mnemonics-esi" + }, + { + "include": "#mnemonics-intel-manual-listing" + }, + { + "include": "#mnemonics-intel-isa-xeon-phi" + }, + { + "include": "#mnemonics-intel-isa-keylocker" + }, + { + "include": "#mnemonics-supplemental-amd" + }, + { + "include": "#mnemonics-supplemental-cyrix" + }, + { + "include": "#mnemonics-supplemental-via" + }, + { + "include": "#mnemonics-undocumented" + }, + { + "include": "#mnemonics-future-intel" + }, + { + "include": "#mnemonics-pseudo-ops" + } + ] + }, + "mnemonics-64bit": { + "patterns": [ + { + "match": "(?i)\\b(cdqe|cqo|(cmp|lod|mov|sto)sq|cmpxchg16b|mov(ntq|sxd)|scasq|swapgs|sys(call|ret))\\b", + "name": "keyword.operator.word.mnemonic.64-bit-mode" + } + ] + }, + "mnemonics-aesni": { + "patterns": [ + { + "match": "(?i)\\b(aes((dec|enc)(last)?|imc|keygenassist)|pclmulqdq)\\b", + "name": "keyword.operator.word.mnemonic.aesni" + } + ] + }, + "mnemonics-amx": { + "patterns": [ + { + "match": "(?i)\\b((ld|st)tilecfg|tdpb(f16ps|[su]{2}d)|tile(loadd(t1)?|release|stored|zero))\\b", + "name": "keyword.operator.word.mnemonic.amx" + } + ] + }, + "mnemonics-avx": { + "patterns": [ + { + "match": "(?i)\\b(v((test|permil|maskmov)p[ds]|zero(all|upper)|(perm2|insert|extract|broadcast)f128|broadcasts[ds]))\\b", + "name": "keyword.operator.word.mnemonic.avx" + }, + { + "match": "(?i)\\b(vaes((dec|enc)(last)?|imc|keygenassist)|vpclmulqdq)\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.aes" + }, + { + "match": "(?i)\\b(v((cmp[ps]|u?comis)[ds]|pcmp([ei]str[im]|(eq|gt)[bdqw])))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.comparison" + }, + { + "match": "(?i)\\b(v(cvt(dq2pd|dq2ps|pd2ps|ps2pd|sd2ss|si2sd|si2ss|ss2sd|t?(pd2dq|ps2dq|sd2si|ss2si))))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.conversion" + }, + { + "match": "(?i)\\b(vh((add|sub)p[ds])|vph((add|sub)([dw]|sw)|minposuw))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.horizontal-packed-arithmetic" + }, + { + "match": "(?i)\\b(v((andn?|x?or)p[ds]))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.logical" + }, + { + "match": "(?i)\\b(v(mov(([ahl]|msk|nt|u)p[ds]|(hl|lh)ps|s([ds]|[hl]dup)|q)))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.mov" + }, + { + "match": "(?i)\\b(v((add|div|mul|sub|max|min|round|sqrt)[ps][ds]|(addsub|dp)p[ds]|(rcp|rsqrt)[ps]s))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.packed-arithmetic" + }, + { + "match": "(?i)\\b(v(pack[su]s(dw|wb)|punpck[hl](bw|dq|wd|qdq)|unpck[hl]p[ds]))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.packed-conversion" + }, + { + "match": "(?i)\\b(vp(shuf([bd]|[hl]w))|vshufp[ds])\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.packed-shuffle" + }, + { + "match": "(?i)\\b(vp((abs|sign|(max|min)[su])[bdw]|(add|sub)([bdqw]|u?s[bw])|avg[bw]|extr[bdqw]|madd(wd|ubsw)|mul(hu?w|hrsw|l[dw]|u?dq)|sadbw))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.supplemental.arithmetic" + }, + { + "match": "(?i)\\b(vp(andn?|x?or))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.supplemental.logical" + }, + { + "match": "(?i)\\b(vpblend(vb|w))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.supplemental.blending" + }, + { + "match": "(?i)\\b(vpmov(mskb|[sz]x(b[dqw]|w[dq]|dq)))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.supplemental.mov" + }, + { + "match": "(?i)\\b(vp(insr[bdqw]|sll(dq|[dqw])|srl(dq)))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.simd-integer" + }, + { + "match": "(?i)\\b(vp(sra[dwq]|srl[dqw]))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.shift-and-rotate" + }, + { + "match": "(?i)\\b(vblendv?p[ds])\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.packed-blending" + }, + { + "match": "(?i)\\b(vp(test|alignr))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.packed-other" + }, + { + "match": "(?i)\\b(vmov(d(dup|qa|qu)?))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.simd-integer.mov" + }, + { + "match": "(?i)\\b(v((extract|insert)ps|lddqu|(ld|st)mxcsr|mpsadbw))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.other" + }, + { + "match": "(?i)\\b(v(maskmovdqu|movntdqa?))\\b", + "name": "keyword.operator.word.mnemonic.avx.promoted.cacheability-control" + }, + { + "match": "(?i)\\b(vcvt(ph2ps|ps2ph))\\b", + "name": "keyword.operator.word.mnemonic.16-bit-floating-point-conversion" + }, + { + "match": "(?i)\\b(vfn?m((add|sub)(132|213|231)[ps][ds])|vfm((addsub|subadd)(132|213|231)p[ds]))\\b", + "name": "keyword.operator.word.mnemonic.fma" + } + ] + }, + "mnemonics-avx2": { + "patterns": [ + { + "match": "(?i)\\b(v((broadcast|extract|insert|perm2)i128|pmaskmov[dq]|perm([dsq]|p[sd])))\\b", + "name": "keyword.operator.word.mnemonic.avx2.promoted.simd" + }, + { + "match": "(?i)\\b(vpbroadcast[bdqw])\\b", + "name": "keyword.operator.word.mnemonic.avx2.promoted.packed" + }, + { + "match": "(?i)\\b(vp(blendd|s[lr]lv[dq]|sravd))\\b", + "name": "keyword.operator.word.mnemonic.avx2.blend" + }, + { + "match": "(?i)\\b(vp?gather[dq][dq]|vgather([dq]|dq)p[ds])\\b", + "name": "keyword.operator.word.mnemonic.avx2.gather" + } + ] + }, + "mnemonics-avx512": { + "patterns": [ + { + "include": "#mnemonics-avx512f" + }, + { + "include": "#mnemonics-avx512dq" + }, + { + "include": "#mnemonics-avx512bw" + }, + { + "include": "#mnemonics-avx512-opmask" + }, + { + "include": "#mnemonics-avx512er" + }, + { + "include": "#mnemonics-avx512pf" + }, + { + "include": "#mnemonics-avx512fp16" + } + ] + }, + "mnemonics-avx512-opmask": { + "patterns": [ + { + "match": "(?i)\\bk(add|andn?|mov|not|or(test)?|shift[lr]|test|xn?or)[bdqw]\\b", + "name": "keyword.operator.word.mnemonic.avx512.opmask" + }, + { + "match": "(?i)\\bkunpck(bw|wd|dq)\\b", + "name": "keyword.operator.word.mnemonic.avx512.opmask.unpack" + } + ] + }, + "mnemonics-avx512bw": { + "patterns": [ + { + "match": "(?i)\\bv(dbpsadbw|movdqu(8|16))\\b", + "name": "keyword.operator.word.mnemonic.avx512.bw.dbpsad" + }, + { + "match": "(?i)\\bvp(blendm|cmpu?|movm2)[bw]\\b", + "name": "keyword.operator.word.mnemonic.avx512.bw.pblend" + }, + { + "match": "(?i)\\bvperm(w|i2[bw])\\b", + "name": "keyword.operator.word.mnemonic.avx512.bw.perpmi2" + }, + { + "match": "(?i)\\bvp(mov([bw]2m|u?swb))\\b", + "name": "keyword.operator.word.mnemonic.avx512.bw.pmov" + }, + { + "match": "(?i)\\bvp(s(ll|ra|rl)vw|testn?m[bw])\\b", + "name": "keyword.operator.word.mnemonic.avx512.bw.psll" + }, + { + "match": "(?i)\\bvp(broadcastm(b2q|w2d)|(conflict|lzcnt)[dq])\\b", + "name": "keyword.operator.word.mnemonic.avx512.bw.broadcast" + } + ] + }, + "mnemonics-avx512dq": { + "patterns": [ + { + "match": "(?i)\\bvcvt(t?p[ds]2u?qq|uqq2p[ds])\\b", + "name": "keyword.operator.word.mnemonic.avx512.dq.cvt" + }, + { + "match": "(?i)\\bv((extract|insert)[fi]64x2|(fpclass|range|reduce)[ps][ds])\\b", + "name": "keyword.operator.word.mnemonic.avx512.dq.extract" + }, + { + "match": "(?i)\\bvp(mov(m2[dq]|b2d|q2m)|mullq)\\b", + "name": "keyword.operator.word.mnemonic.avx512.dq.pmov" + } + ] + }, + "mnemonics-avx512er": { + "patterns": [ + { + "match": "(?i)\\bv(exp2|rcp28|rsqrt28)[ps][ds]\\b", + "name": "keyword.operator.word.mnemonic.avx512.er" + } + ] + }, + "mnemonics-avx512f": { + "patterns": [ + { + "match": "(?i)\\bv(align[dq]|(blendm|compress)p[ds])\\b", + "name": "keyword.operator.word.mnemonic.avx512.f.align" + }, + { + "match": "(?i)\\bv(cvtt?[ps][ds]2u(dq|si))\\b", + "name": "keyword.operator.word.mnemonic.avx512.f.cvtt" + }, + { + "match": "(?i)\\bv(cvt((q|ud)q2p|usi2s)[ds])\\b", + "name": "keyword.operator.word.mnemonic.avx512.f.cvt" + }, + { + "match": "(?i)\\bv(expandp[ds]|extract[fi](32|64)x4|fixupimm[ps][ds])\\b", + "name": "keyword.operator.word.mnemonic.avx512.f.expand" + }, + { + "match": "(?i)\\bv(get(exp|mant)[ps][ds]|insertf(32|64)x4|movdq[au](32|64))\\b", + "name": "keyword.operator.word.mnemonic.avx512.f.getexp" + }, + { + "match": "(?i)\\bvp(blendm[dq]|cmpu?[dq]|compress[dq])\\b", + "name": "keyword.operator.word.mnemonic.avx512.f.pblend" + }, + { + "match": "(?i)\\bvp(erm[it]2(d|q|p[ds])|expand[dq]|(max|min)[su]q|movu?s(q[bdw]|d[bw]))\\b", + "name": "keyword.operator.word.mnemonic.avx512.f.permi" + }, + { + "match": "(?i)\\bvp(rolv?|rorr?|scatter[dq]|testn?m|terlog)[dq]\\b", + "name": "keyword.operator.word.mnemonic.avx512.f.prol" + }, + { + "match": "(?i)\\bvpsravq\\b", + "name": "keyword.operator.word.mnemonic.avx512.f.sravq" + }, + { + "match": "(?i)\\bv(rcp14|(rnd)?scale|rsqrt14)[ps][ds]\\b", + "name": "keyword.operator.word.mnemonic.avx512.f.rcp" + }, + { + "match": "(?i)\\bv(scatter[dq]{2}|shuf[fi](32|64)x[24])\\b", + "name": "keyword.operator.word.mnemonic.avx512.f.scatter" + } + ] + }, + "mnemonics-avx512fp16": { + "patterns": [ + { + "match": "(?i)\\bv((add|cmp|div|fc?(madd|mul)c|fpclass|get(exp|mant)|mul|rcp|reduce|(rnd)?scale|r?sqrt|sub)[ps]h|u?comish)\\b", + "name": "keyword.operator.word.mnemonic.avx512.fp16.add" + }, + { + "match": "(?i)\\bvcvt(u?([dq]q|w)|pd)2ph\\b", + "name": "keyword.operator.word.mnemonic.avx512.fp16.cvtx2ph" + }, + { + "match": "(?i)\\bvcvtph2(u?([dq]q|w)|pd)\\b", + "name": "keyword.operator.word.mnemonic.avx512.fp16.cvtph2x" + }, + { + "match": "(?i)\\bvcvt(ph2psx|ps2phx)\\b", + "name": "keyword.operator.word.mnemonic.avx512.fp16.cvtx" + }, + { + "match": "(?i)\\bvcvt(s[dsi]|usi)2sh\\b", + "name": "keyword.operator.word.mnemonic.avx512.fp16.cvtx2sh" + }, + { + "match": "(?i)\\bvcvtsh2(s[dsi]|usi)\\b", + "name": "keyword.operator.word.mnemonic.avx512.fp16.cvtsh2x" + }, + { + "match": "(?i)\\bvcvtt(ph2(u?(dq|qq|w))|sh2u?si)\\b", + "name": "keyword.operator.word.mnemonic.avx512.fp16.cvttph2x" + }, + { + "match": "(?i)\\bvfn?m((add|sub)(132|213|231))[ps]h\\b", + "name": "keyword.operator.word.mnemonic.avx512.fp16.fmadd" + }, + { + "match": "(?i)\\bvfm(addsub|subadd)(132|213|231)ph\\b", + "name": "keyword.operator.word.mnemonic.avx512.fp16.fmaddsub" + }, + { + "match": "(?i)\\bv((min|max)ph|mov(sh|w))\\b", + "name": "keyword.operator.word.mnemonic.avx512.fp16.max" + } + ] + }, + "mnemonics-avx512pf": { + "patterns": [ + { + "match": "(?i)\\bv(gather|scatter)pf[01][dq]p[ds]\\b", + "name": "keyword.operator.word.mnemonic.avx512.pf" + } + ] + }, + "mnemonics-cet": { + "patterns": [ + { + "match": "(?i)\\b((inc|save(prev)?|rstor|rd)ssp|wru?ss|(set|clr)ssbsy|endbr(32|64))\\b", + "name": "keyword.operator.word.mnemonic.cet" + }, + { + "match": "(?i)\\bendbranch\\b", + "name": "keyword.operator.word.mnemonic.cet.misc" + } + ] + }, + "mnemonics-esi": { + "patterns": [ + { + "match": "(?i)\\benqcmds?\\b", + "name": "keyword.operator.word.mnemonic.esi" + } + ] + }, + "mnemonics-fpu": { + "patterns": [ + { + "match": "(?i)\\b(fcmov(n?([beu]|be)))\\b", + "name": "keyword.operator.word.mnemonic.fpu.data-transfer.mov" + }, + { + "match": "(?i)\\b(f(i?(ld|stp?)|b(ld|stp)|xch))\\b", + "name": "keyword.operator.word.mnemonic.fpu.data-transfer.other" + }, + { + "match": "(?i)\\b(f((add|div|mul|sub)p?|i(add|div|mul|sub)|(div|sub)rp?|i(div|sub)r))\\b", + "name": "keyword.operator.word.mnemonic.fpu.basic-arithmetic.basic" + }, + { + "match": "(?i)\\b(f(prem1?|abs|chs|rndint|scale|sqrt|xtract))\\b", + "name": "keyword.operator.word.mnemonic.fpu.basic-arithmetic.other" + }, + { + "match": "(?i)\\b(f(u?com[ip]?p?|icomp?|tst|xam))\\b", + "name": "keyword.operator.word.mnemonic.fpu.comparison" + }, + { + "match": "(?i)\\b(f(sin|cos|sincos|pa?tan|2xm1|yl2x(p1)?))\\b", + "name": "keyword.operator.word.mnemonic.fpu.transcendental" + }, + { + "match": "(?i)\\b(fld(1|z|pi|l2[et]|l[ng]2))\\b", + "name": "keyword.operator.word.mnemonic.fpu.load-constants" + }, + { + "match": "(?i)\\b(f((inc|dec)stp|free|n?(init|clex|st[cs]w|stenv|save)|ld(cw|env)|rstor|nop)|f?wait)\\b", + "name": "keyword.operator.word.mnemonic.fpu.control-management" + }, + { + "match": "(?i)\\b(fx(save|rstor)(64)?)\\b", + "name": "keyword.operator.word.mnemonic.fpu.state-management" + } + ] + }, + "mnemonics-future-intel": { + "patterns": [ + { + "include": "#mnemonics-future-intel-apx" + } + ] + }, + "mnemonics-future-intel-apx": { + "patterns": [ + { + "match": "(?i)\\b(c(cmp|test)(n?[bl]e?|[ft]|n?[osz]))\\b", + "name": "keyword.operator.word.mnemonic.apx.ccmp_test" + }, + { + "match": "(?i)\\b(cfcmovn?([bl]e?|[opsz]))\\b", + "name": "keyword.operator.word.mnemonic.apx.cfcmov" + }, + { + "match": "(?i)\\b(cmpn?([bl]e?|[opsz])xadd)\\b", + "name": "keyword.operator.word.mnemonic.apx.cmpxadd" + }, + { + "match": "(?i)\\b(jmpabs|(push|pop)2p?)\\b", + "name": "keyword.operator.word.mnemonic.apx.other" + } + ] + }, + "mnemonics-general-purpose": { + "patterns": [ + { + "match": "(?i)\\b(?:mov(?:[sz]x)?|cmov(?:n?[abceglopsz]|n?[abgl]e|p[eo]))\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.data-transfer.mov" + }, + { + "match": "(?i)\\b(xchg|bswap|xadd|cmpxchg(8b)?)\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.data-transfer.xchg" + }, + { + "match": "(?i)\\b((push|pop)(ad?)?|cwde?|cdq|cbw)\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.data-transfer.other" + }, + { + "match": "(?i)\\b(adcx?|adox|add|sub|sbb|i?mul|i?div|inc|dec|neg|cmp)\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.binary-arithmetic" + }, + { + "match": "(?i)\\b(daa|das|aaa|aas|aam|aad)\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.decimal-arithmetic" + }, + { + "match": "(?i)\\b(and|x?or|not)\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.logical" + }, + { + "match": "(?i)\\b(s[ah][rl]|sh[rl]d|r[co][rl])\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.rotate" + }, + { + "match": "(?i)\\b(set(n?[abceglopsz]|n?[abgl]e|p[eo]))\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.bit-and-byte.set" + }, + { + "match": "(?i)\\b(bt[crs]?|bs[fr]|test|crc32|popcnt)\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.bit-and-byte.other" + }, + { + "match": "(?i)\\b(jmp|jn?[abceglopsz]|jn?[abgl]e|jp[eo]|j[er]?cxz)\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.control-transfer.jmp" + }, + { + "match": "(?i)\\b(loop(n?[ez])?|call|ret|iret[dq]?|into?|bound|enter|leave)\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.control-transfer.other" + }, + { + "match": "(?i)\\b((mov|cmp|sca|lod|sto)(s[bdw]?)|rep(n?[ez])?)\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.strings" + }, + { + "match": "(?i)\\b((in|out)(s[bdw]?)?)\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.io" + }, + { + "match": "(?i)\\b((st|cl)[cdi]|cmc|[ls]ahf|(push|pop)f[dq]?)\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.flag-control" + }, + { + "match": "(?i)\\b(l[defgs]s)\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.segment-registers" + }, + { + "match": "(?i)\\b(lea|nop|ud2?|xlatb?|cpuid|movbe)\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.misc" + }, + { + "match": "(?i)\\b(cl(flush(opt)?|demote|wb)|pcommit)\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.cache-control" + }, + { + "match": "(?i)\\b(rdrand|rdseed)\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.rng" + }, + { + "match": "(?i)\\b(andn|bextr|bls(i|r|msk)|bzhi|pdep|pext|[lt]zcnt|(mul|ror|sar|shl|shr)x)\\b", + "name": "keyword.operator.word.mnemonic.general-purpose.bmi" + } + ] + }, + "mnemonics-intel-isa-keylocker": { + "patterns": [ + { + "match": "(?i)\\b(aes(enc|dec)(wide)?(128|256)kl|encodekey(128|256)|loadiwkey)\\b", + "name": "keyword.operator.word.mnemonic.keylocker" + } + ] + }, + "mnemonics-intel-isa-xeon-phi": { + "patterns": [ + { + "match": "(?i)\\bv(4fn?(madd)[ps]s|p4dpwssds?)\\b", + "name": "keyword.operator.word.mnemonic.xeon-phi" + } + ] + }, + "mnemonics-intel-manual-listing": { + "patterns": [ + { + "match": "(?i)\\bcvtt?pd1pi\\b", + "name": "keyword.operator.word.mnemonic.other.c" + }, + { + "match": "(?i)\\bv?gf2p8(affine(inv)?q|mul)b\\b", + "name": "keyword.operator.word.mnemonic.other.g" + }, + { + "match": "(?i)\\bhreset\\b", + "name": "keyword.operator.word.mnemonic.other.h" + }, + { + "match": "(?i)\\bincssp[dq]\\b", + "name": "keyword.operator.word.mnemonic.other.i" + }, + { + "match": "(?i)\\bmovdir(i|64b)\\b", + "name": "keyword.operator.word.mnemonic.other.m" + }, + { + "match": "(?i)\\bp((abs|(max|min)[su]?|mull|sra)q|config|twrite)\\b", + "name": "keyword.operator.word.mnemonic.other.p" + }, + { + "match": "(?i)\\brd(pid|ssp[dq])\\b", + "name": "keyword.operator.word.mnemonic.other.r" + }, + { + "match": "(?i)\\bserialize\\b", + "name": "keyword.operator.word.mnemonic.other.s" + }, + { + "match": "(?i)\\btpause\\b", + "name": "keyword.operator.word.mnemonic.other.t" + }, + { + "match": "(?i)\\bu(monitor|mwait)\\b", + "name": "keyword.operator.word.mnemonic.other.u" + }, + { + "match": "(?i)\\bvbroadcast[fi](32x[248]|64x[24])\\b", + "name": "keyword.operator.word.mnemonic.other.vb" + }, + { + "match": "(?i)\\bv(compressw|cvtne2?ps2bf16)\\b", + "name": "keyword.operator.word.mnemonic.other.vc" + }, + { + "match": "(?i)\\bvdpbf16ps\\b", + "name": "keyword.operator.word.mnemonic.other.vd" + }, + { + "match": "(?i)\\bvextract[fi]32x8\\b", + "name": "keyword.operator.word.mnemonic.other.ve" + }, + { + "match": "(?i)\\bv(insert([fi]32x8|i(32|64)x4))\\b", + "name": "keyword.operator.word.mnemonic.other.vi" + }, + { + "match": "(?i)\\bv(maskmov|(max|min)sh)\\b", + "name": "keyword.operator.word.mnemonic.other.vm" + }, + { + "match": "(?i)\\bvp((2intersect|andn?)[dq]|absq)\\b", + "name": "keyword.operator.word.mnemonic.other.vpa" + }, + { + "match": "(?i)\\bvpbroadcasti32x4\\b", + "name": "keyword.operator.word.mnemonic.other.vpb" + }, + { + "match": "(?i)\\bvpcompress[bw]\\b", + "name": "keyword.operator.word.mnemonic.other.vpc" + }, + { + "match": "(?i)\\bvp(dp(bu|ws)sds?)\\b", + "name": "keyword.operator.word.mnemonic.other.vpd" + }, + { + "match": "(?i)\\b(vperm(b|t2[bw])|vp(expand[bw]|extrtd))\\b", + "name": "keyword.operator.word.mnemonic.other.vpe" + }, + { + "match": "(?i)\\bvp(madd52[hl]uq|mov(d(2m|[bw])|q[bdw]|wb)|mpov[bdqw]2m|multishiftqb)\\b", + "name": "keyword.operator.word.mnemonic.other.vpm" + }, + { + "match": "(?i)\\b(vpopcnt[bdqw]|vpor[dq])\\b", + "name": "keyword.operator.word.mnemonic.other.vpo" + }, + { + "match": "(?i)\\bvprorv[dq]\\b", + "name": "keyword.operator.word.mnemonic.other.vpr" + }, + { + "match": "(?i)\\bvp(sh[lr]dv?[dqw]|shufbitqmb|shufps)\\b", + "name": "keyword.operator.word.mnemonic.other.vps" + }, + { + "match": "(?i)\\bvpternlog[dq]\\b", + "name": "keyword.operator.word.mnemonic.other.vpt" + }, + { + "match": "(?i)\\bvpxor[dq]\\b", + "name": "keyword.operator.word.mnemonic.other.vpx" + }, + { + "match": "(?i)\\bv(scalef[ps][dhs]|scatter[dq]p[ds])\\b", + "name": "keyword.operator.word.mnemonic.other.vs" + }, + { + "match": "(?i)\\b(wbnoinvd|wru?ss[dq])\\b", + "name": "keyword.operator.word.mnemonic.other.w" + } + ] + }, + "mnemonics-invalid": { + "patterns": [ + { + "include": "#mnemonics-invalid-amd-sse5" + } + ] + }, + "mnemonics-invalid-amd-sse5": { + "patterns": [ + { + "match": "(?i)\\b(com[ps][ds]|pcomu?[bdqw])\\b", + "name": "invalid.keyword.operator.word.mnemonic.sse5.comparison" + }, + { + "match": "(?i)\\b(cvtp(h2ps|s2ph)|frcz[ps][ds])\\b", + "name": "invalid.keyword.operator.word.mnemonic.sse5.conversion" + }, + { + "match": "(?i)\\b(fn?m((add|sub)[ps][ds])|ph(addu?(b[dqw]|w[dq]|dq)|sub(bw|dq|wd))|pma(css?(d(d|q[hl])|w[dw])|dcss?wd))\\b", + "name": "invalid.keyword.operator.word.mnemonic.sse5.packed-arithmetic" + }, + { + "match": "(?i)\\b(pcmov|permp[ds]|pperm|prot[bdqw]|psh[al][bdqw])\\b", + "name": "invalid.keyword.operator.word.mnemonic.sse5.simd-integer" + } + ] + }, + "mnemonics-mmx": { + "patterns": [ + { + "match": "(?i)\\b(mov[dq])\\b", + "name": "keyword.operator.word.mnemonic.mmx.data-transfer" + }, + { + "match": "(?i)\\b(pack(ssdw|[su]swb)|punpck[hl](bw|dq|wd))\\b", + "name": "keyword.operator.word.mnemonic.mmx.conversion" + }, + { + "match": "(?i)\\b(p(((add|sub)(d|(u?s)?[bw]))|maddwd|mul[lh]w))\\b", + "name": "keyword.operator.word.mnemonic.mmx.packed-arithmetic" + }, + { + "match": "(?i)\\b(pcmp((eq|gt)[bdw]))\\b", + "name": "keyword.operator.word.mnemonic.mmx.comparison" + }, + { + "match": "(?i)\\b(pandn?|px?or)\\b", + "name": "keyword.operator.word.mnemonic.mmx.logical" + }, + { + "match": "(?i)\\b(ps([rl]l[dwq]|raw|rad))\\b", + "name": "keyword.operator.word.mnemonic.mmx.shift-and-rotate" + }, + { + "match": "(?i)\\b(emms)\\b", + "name": "keyword.operator.word.mnemonic.mmx.state-management" + } + ] + }, + "mnemonics-mpx": { + "patterns": [ + { + "match": "(?i)\\b(bnd(mk|c[lnu]|mov|ldx|stx))\\b", + "name": "keyword.operator.word.mnemonic.mpx" + } + ] + }, + "mnemonics-pseudo-ops": { + "patterns": [ + { + "match": "(?i)\\b(cmp(n?(eq|lt|le)|(un)?ord)[ps][ds])\\b", + "name": "keyword.operator.word.pseudo-mnemonic.sse2.compare" + }, + { + "match": "(?i)\\b(v?pclmul([hl]q[hl]q|[hl]qh)dq)\\b", + "name": "keyword.operator.word.pseudo-mnemonic.avx.promoted.aes" + }, + { + "match": "(?i)\\b(vcmp(eq(_(os|uq|us))?|neq(_(oq|os|us))?|[gl][et](_oq)?|n[gl][et](_uq)?|(un)?ord(_s)?|false(_os)?|true(_us)?)[ps][ds])\\b", + "name": "keyword.operator.word.pseudo-mnemonic.avx.promoted.comparison" + }, + { + "match": "(?i)\\bvp(cmpn?(eq|le|lt))\\b", + "name": "keyword.operator.word.pseudo-mnemonic.avx512.compare" + }, + { + "match": "(?i)\\b(vpcom(n?eq|[gl][et]|false|true)(b|uw))\\b", + "name": "keyword.operator.word.pseudo-mnemonic.supplemental.amd.xop.simd" + } + ] + }, + "mnemonics-sgx": { + "patterns": [ + { + "match": "(?i)\\bencl[su]\\b", + "name": "keyword.operator.word.mnemonic.sgx" + }, + { + "match": "(?i)\\be(add|block|create|dbg(rd|wr)|extend|init|ld[bu]|pa|remove|track|wb)\\b", + "name": "support.constant.sgx1.supervisor" + }, + { + "match": "(?i)\\be(add|block|create|dbg(rd|wr)|extend|init|ld[bu]|pa|remove|track|wb)\\b", + "name": "support.constant.sgx1.supervisor" + }, + { + "match": "(?i)\\be(enter|exit|getkey|report|resume)\\b", + "name": "support.constant.sgx1.user" + }, + { + "match": "(?i)\\be(aug|mod(pr|t))\\b", + "name": "support.constant.sgx2.supervisor" + }, + { + "match": "(?i)\\be(accept(copy)?|modpe)\\b", + "name": "support.constant.sgx2.user" + } + ] + }, + "mnemonics-sha": { + "patterns": [ + { + "match": "(?i)\\b(sha(1rnds4|256rnds2|1nexte|(1|256)msg[12]))\\b", + "name": "keyword.operator.word.mnemonic.sha" + } + ] + }, + "mnemonics-smx": { + "patterns": [ + { + "match": "(?i)\\b(getsec)\\b", + "name": "keyword.operator.word.mnemonic.smx.getsec" + }, + { + "match": "(?i)\\b(capabilities|enteraccs|exitac|senter|sexit|parameters|smctrl|wakeup)\\b", + "name": "support.constant.smx" + } + ] + }, + "mnemonics-sse": { + "patterns": [ + { + "match": "(?i)\\b(mov(([ahlu]|hl|lh|msk)ps|ss))\\b", + "name": "keyword.operator.word.mnemonic.sse.data-transfer" + }, + { + "match": "(?i)\\b((add|div|max|min|mul|rcp|r?sqrt|sub)[ps]s)\\b", + "name": "keyword.operator.word.mnemonic.sse.packed-arithmetic" + }, + { + "match": "(?i)\\b(cmp[ps]s|u?comiss)\\b", + "name": "keyword.operator.word.mnemonic.sse.comparison" + }, + { + "match": "(?i)\\b((andn?|x?or)ps)\\b", + "name": "keyword.operator.word.mnemonic.sse.logical" + }, + { + "match": "(?i)\\b((shuf|unpck[hl])ps)\\b", + "name": "keyword.operator.word.mnemonic.sse.shuffle-and-unpack" + }, + { + "match": "(?i)\\b(cvt(pi2ps|si2ss|ps2pi|tps2pi|ss2si|tss2si))\\b", + "name": "keyword.operator.word.mnemonic.sse.conversion" + }, + { + "match": "(?i)\\b((ld|st)mxcsr)\\b", + "name": "keyword.operator.word.mnemonic.sse.state-management" + }, + { + "match": "(?i)\\b(p(avg[bw]|extrw|insrw|(max|min)(sw|ub)|sadbw|shufw|mulhuw|movmskb))\\b", + "name": "keyword.operator.word.mnemonic.sse.simd-integer" + }, + { + "match": "(?i)\\b(maskmovq|movntps|sfence)\\b", + "name": "keyword.operator.word.mnemonic.sse.cacheability-control" + }, + { + "match": "(?i)\\b(prefetch(nta|t[0-2]|w(t1)?))\\b", + "name": "keyword.operator.word.mnemonic.sse.prefetch" + } + ] + }, + "mnemonics-sse2": { + "patterns": [ + { + "match": "(?i)\\b(mov([auhl]|msk)pd)\\b", + "name": "keyword.operator.word.mnemonic.sse2.data-transfer" + }, + { + "match": "(?i)\\b((add|div|max|min|mul|sub|sqrt)[ps]d)\\b", + "name": "keyword.operator.word.mnemonic.sse2.packed-arithmetic" + }, + { + "match": "(?i)\\b((andn?|x?or)pd)\\b", + "name": "keyword.operator.word.mnemonic.sse2.logical" + }, + { + "match": "(?i)\\b((cmpp|u?comis)d)\\b", + "name": "keyword.operator.word.mnemonic.sse2.compare" + }, + { + "match": "(?i)\\b((shuf|unpck[hl])pd)\\b", + "name": "keyword.operator.word.mnemonic.sse2.shuffle-and-unpack" + }, + { + "match": "(?i)\\b(cvt(dq2pd|pi2pd|ps2pd|pd2ps|si2sd|sd2ss|ss2sd|t?(pd2dq|pd2pi|sd2si)))\\b", + "name": "keyword.operator.word.mnemonic.sse2.conversion" + }, + { + "match": "(?i)\\b(cvt(dq2ps|ps2dq|tps2dq))\\b", + "name": "keyword.operator.word.mnemonic.sse2.packed-floating-point" + }, + { + "match": "(?i)\\b(mov(dq[au]|q2dq|dq2q))\\b", + "name": "keyword.operator.word.mnemonic.sse2.simd-integer.mov" + }, + { + "match": "(?i)\\b(p((add|sub|(s[lr]l|mulu|unpck[hl]q)d)q|shuf(d|[hl]w)))\\b", + "name": "keyword.operator.word.mnemonic.sse2.simd-integer.other" + }, + { + "match": "(?i)\\b([lm]fence|pause|maskmovdqu|movnt(dq|i|pd))\\b", + "name": "keyword.operator.word.mnemonic.sse2.cacheability-control" + } + ] + }, + "mnemonics-sse3": { + "patterns": [ + { + "match": "(?i)\\b(fisttp|lddqu|(addsub|h(add|sub))p[sd]|mov(sh|sl|d)dup|monitor|mwait)\\b", + "name": "keyword.operator.word.mnemonic.sse3" + }, + { + "match": "(?i)\\b(ph(add|sub)(s?w|d))\\b", + "name": "keyword.operator.word.mnemonic.sse3.supplimental.horizontal-packed-arithmetic" + }, + { + "match": "(?i)\\b(p((abs|sign)[bdw]|maddubsw|mulhrsw|shufb|alignr))\\b", + "name": "keyword.operator.word.mnemonic.sse3.supplimental.other" + } + ] + }, + "mnemonics-sse4": { + "patterns": [ + { + "match": "(?i)\\b(pmul(ld|dq)|dpp[ds])\\b", + "name": "keyword.operator.word.mnemonic.sse4.1.arithmetic" + }, + { + "match": "(?i)\\b(movntdqa)\\b", + "name": "keyword.operator.word.mnemonic.sse4.1.load-hint" + }, + { + "match": "(?i)\\b(blendv?p[ds]|pblend(vb|w))\\b", + "name": "keyword.operator.word.mnemonic.sse4.1.packed-blending" + }, + { + "match": "(?i)\\b(p(min|max)(u[dw]|s[bd]))\\b", + "name": "keyword.operator.word.mnemonic.sse4.1.packed-integer" + }, + { + "match": "(?i)\\b(round[ps][sd])\\b", + "name": "keyword.operator.word.mnemonic.sse4.1.packed-floating-point" + }, + { + "match": "(?i)\\b((extract|insert)ps|p((ins|ext)(r[bdq])))\\b", + "name": "keyword.operator.word.mnemonic.sse4.1.insertion-and-extraction" + }, + { + "match": "(?i)\\b(pmov([sz]x(b[dqw]|dq|wd|wq)))\\b", + "name": "keyword.operator.word.mnemonic.sse4.1.conversion" + }, + { + "match": "(?i)\\b(mpsadbw|phminposuw|ptest|pcmpeqq|packusdw)\\b", + "name": "keyword.operator.word.mnemonic.sse4.1.other" + }, + { + "match": "(?i)\\b(pcmp([ei]str[im]|gtq))\\b", + "name": "keyword.operator.word.mnemonic.sse4.2" + } + ] + }, + "mnemonics-supplemental-amd": { + "patterns": [ + { + "match": "(?i)\\b(bl([cs](fill|ic?|msk)|cs)|t1mskc|tzmsk)\\b", + "name": "keyword.operator.word.mnemonic.supplemental.amd.general-purpose" + }, + { + "match": "(?i)\\b(clgi|int3|invlpga|iretw|skinit|stgi|vm(load|mcall|run|save)|monitorx|mwaitx)\\b", + "name": "keyword.operator.word.mnemonic.supplemental.amd.system" + }, + { + "match": "(?i)\\b([ls]lwpcb|lwp(ins|val))\\b", + "name": "keyword.operator.word.mnemonic.supplemental.amd.profiling" + }, + { + "match": "(?i)\\b(movnts[ds])\\b", + "name": "keyword.operator.word.mnemonic.supplemental.amd.memory-management" + }, + { + "match": "(?i)\\b(prefetch|clzero)\\b", + "name": "keyword.operator.word.mnemonic.supplemental.amd.cache-management" + }, + { + "match": "(?i)\\b((extr|insert)q)\\b", + "name": "keyword.operator.word.mnemonic.supplemental.amd.sse4.a" + }, + { + "match": "(?i)\\b(vfn?m((add|sub)[ps][ds])|vfm((addsub|subadd)p[ds]))\\b", + "name": "keyword.operator.word.mnemonic.supplemental.amd.fma4" + }, + { + "match": "(?i)\\b(vp(cmov|(comu?|rot|sh[al])[bdqw]|mac(s?s(d(d|q[hl])|w[dw]))|madcss?wd|perm))\\b", + "name": "keyword.operator.word.mnemonic.supplemental.amd.xop.simd" + }, + { + "match": "(?i)\\b(vph(addu?(b[dqw]|w[dq]|dq)|sub(bw|dq|wd)))\\b", + "name": "keyword.operator.word.mnemonic.supplemental.amd.xop.simd-horizontal" + }, + { + "match": "(?i)\\b(vfrcz[ps][ds]|vpermil2p[ds])\\b", + "name": "keyword.operator.word.mnemonic.supplemental.amd.xop.other" + }, + { + "match": "(?i)\\b(femms)\\b", + "name": "keyword.operator.word.mnemonic.supplemental.amd.3dnow" + }, + { + "match": "(?i)\\b(p(avgusb|(f2i|i2f)[dw]|mulhrw|swapd)|pf((p?n)?acc|add|max|min|mul|rcp(it[12])?|rsqit1|rsqrt|subr?))\\b", + "name": "keyword.operator.word.mnemonic.supplemental.amd.3dnow.simd" + }, + { + "match": "(?i)\\b(pfcmp(eq|ge|gt))\\b", + "name": "keyword.operator.word.mnemonic.supplemental.amd.3dnow.comparison" + } + ] + }, + "mnemonics-supplemental-cyrix": { + "patterns": [ + { + "match": "(?i)\\b((sv|rs)dc|(wr|rd)shr|paddsiw)\\b", + "name": "keyword.operator.word.mnemonic.supplemental.cyrix" + } + ] + }, + "mnemonics-supplemental-via": { + "patterns": [ + { + "match": "(?i)\\b(montmul)\\b", + "name": "keyword.operator.word.mnemonic.supplemental.via" + }, + { + "match": "(?i)\\b(x(store(rng)?|crypt(ecb|cbc|ctr|cfb|ofb)|sha(1|256)))\\b", + "name": "keyword.operator.word.mnemonic.supplemental.via.padlock" + } + ] + }, + "mnemonics-system": { + "patterns": [ + { + "match": "(?i)\\b((cl|st)ac|[ls]([gli]dt|tr|msw)|clts|arpl|lar|lsl|ver[rw]|inv(d|lpg|pcid)|wbinvd)\\b", + "name": "keyword.operator.word.mnemonic.system" + }, + { + "match": "(?i)\\b(lock|hlt|rsm|(rd|wr)(msr|pkru|[fg]sbase)|rd(pmc|tscp?)|sys(enter|exit))\\b", + "name": "keyword.operator.word.mnemonic.system" + }, + { + "match": "(?i)\\b(x((save(c|opt|s)?|rstors?)(64)?|[gs]etbv))\\b", + "name": "keyword.operator.word.mnemonic.system" + } + ] + }, + "mnemonics-tsx": { + "patterns": [ + { + "match": "(?i)\\b(x(abort|begin|end|test|(res|sus)ldtrk))\\b", + "name": "keyword.operator.word.mnemonic.tsx" + } + ] + }, + "mnemonics-uirq": { + "patterns": [ + { + "match": "(?i)\\b((cl|st|test)ui|senduipi|uiret)\\b", + "name": "keyword.operator.word.mnemonic.uirq" + } + ] + }, + "mnemonics-undocumented": { + "patterns": [ + { + "match": "(?i)\\b(ret[nf]|icebp|int1|int03|smi|ud1)\\b", + "name": "keyword.operator.word.mnemonic.undocumented" + } + ] + }, + "mnemonics-vmx": { + "patterns": [ + { + "match": "(?i)\\b(vm(ptr(ld|st)|clear|read|write|launch|resume|xo(ff|n)|call|func)|inv(ept|vpid))\\b", + "name": "keyword.operator.word.mnemonic.vmx" + } + ] + }, + "preprocessor": { + "patterns": [ + { + "begin": "^\\s*[#%]\\s*(error|warning)\\b", + "captures": { + "1": { + "name": "keyword.control.import.error.c" + } + }, + "end": "$", + "name": "meta.preprocessor.diagnostic.c", + "patterns": [ + { + "match": "(?>\\\\\\s*\\n)", + "name": "punctuation.separator.continuation.c" + } + ] + }, + { + "begin": "^\\s*[#%]\\s*(include|import)\\b\\s+", + "captures": { + "1": { + "name": "keyword.control.import.include.c" + } + }, + "end": "(?=(?://|/\\*))|$", + "name": "meta.preprocessor.c.include", + "patterns": [ + { + "match": "(?>\\\\\\s*\\n)", + "name": "punctuation.separator.continuation.c" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.c" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.c" + } + }, + "name": "string.quoted.double.include.c" + }, + { + "begin": "<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.c" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.c" + } + }, + "name": "string.quoted.other.lt-gt.include.c" + } + ] + }, + { + "begin": "^\\s*[%#]\\s*(i?x?define|defined|elif(def)?|else|i[fs]n?(?:def|macro|ctx|idni?|id|num|str|token|empty|env)?|line|(i|end|uni?)?macro|pragma|endif)\\b", + "captures": { + "1": { + "name": "keyword.control.import.c" + } + }, + "end": "(?=(?://|/\\*))|$", + "name": "meta.preprocessor.c", + "patterns": [ + { + "match": "(?>\\\\\\s*\\n)", + "name": "punctuation.separator.continuation.c" + }, + { + "include": "#preprocessor-functions" + } + ] + }, + { + "begin": "^\\s*[#%]\\s*(assign|strlen|substr|(end|exit)?rep|push|pop|rotate|use|ifusing|ifusable|def(?:ailas|str|tok)|undef(?:alias)?)\\b", + "captures": { + "1": { + "name": "keyword.control" + } + }, + "end": "$", + "name": "meta.preprocessor.nasm", + "patterns": [ + { + "match": "(?>\\\\\\s*\\n)", + "name": "punctuation.separator.continuation.c" + }, + { + "include": "#preprocessor-functions" + } + ] + } + ] + }, + "preprocessor-functions": { + "patterns": [ + { + "begin": "((%)(?:(abs|cond|count|eval|isn?(?:def|macro|ctx|idni?|id|num|str|token|empty|env)?|num|sel|str(?:cat|len)?|substr|tok)\\s*(\\()))", + "captures": { + "3": { + "name": "support.function.preprocessor.asm.x86_64" + } + }, + "end": "(\\))|$", + "name": "meta.preprocessor.function.asm.x86_64", + "patterns": [ + { + "include": "#preprocessor-functions" + } + ] + } + ] + }, + "registers": { + "patterns": [ + { + "match": "(?i)\\b(?:[abcd][hl]|[er]?[abcd]x|[er]?(?:di|si|bp|sp)|dil|sil|bpl|spl|r(?:8|9|1[0-5])[bdlw]?)\\b", + "name": "constant.language.register.general-purpose.asm.x86_64" + }, + { + "match": "(?i)\\b(?:[cdefgs]s)\\b", + "name": "constant.language.register.segment.asm.x86_64" + }, + { + "match": "(?i)\\b(?:[er]?flags)\\b", + "name": "constant.language.register.flags.asm.x86_64" + }, + { + "match": "(?i)\\b(?:[er]?ip)\\b", + "name": "constant.language.register.instruction-pointer.asm.x86_64" + }, + { + "match": "(?i)\\b(?:cr[02-4])\\b", + "name": "constant.language.register.control.asm.x86_64" + }, + { + "match": "(?i)\\b(?:(?:mm|st|fpr)[0-7])\\b", + "name": "constant.language.register.mmx.asm.x86_64" + }, + { + "match": "(?i)\\b(?:[xy]mm(?:[0-9]|1[0-5])|mxcsr)\\b", + "name": "constant.language.register.sse_avx.asm.x86_64" + }, + { + "match": "(?i)\\b(?:zmm(?:[12]?[0-9]|30|31))\\b", + "name": "constant.language.register.avx512.asm.x86_64" + }, + { + "match": "(?i)\\b(?:bnd(?:[0-3]|cfg[su]|status))\\b", + "name": "constant.language.register.memory-protection.asm.x86_64" + }, + { + "match": "(?i)\\b(?:(?:[gil]dt)r?|tr)\\b", + "name": "constant.language.register.system-table-pointer.asm.x86_64" + }, + { + "match": "(?i)\\b(?:dr[0-367])\\b", + "name": "constant.language.register.debug.asm.x86_64" + }, + { + "match": "(?i)\\b(?:cr8|dr(?:[89]|1[0-5])|efer|tpr|syscfg)\\b", + "name": "constant.language.register.amd.asm.x86_64" + }, + { + "match": "(?i)\\b(?:db[0-367]|t[67]|tr[3-7]|st)\\b", + "name": "invalid.deprecated.constant.language.register.asm.x86_64" + }, + { + "match": "(?i)\\b[xy]mm(?:1[6-9]|2[0-9]|3[01])\\b", + "name": "constant.language.register.general-purpose.alias.asm.x86_64" + } + ] + }, + "strings": { + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.asm" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.asm" + } + }, + "name": "string.quoted.double.asm", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_placeholder" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.asm" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.asm" + } + }, + "name": "string.quoted.single.asm", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_placeholder" + } + ] + }, + { + "begin": "`", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.asm" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.asm" + } + }, + "name": "string.quoted.backquote.asm", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_placeholder" + } + ] + } + ] + }, + "support": { + "patterns": [ + { + "match": "(?i)\\b(?:s?byte|(?:[doqtyz]|dq|s[dq]?)?word|(?:d|res)[bdoqtwyz]|ddq)\\b", + "name": "storage.type.asm.x86_64" + }, + { + "match": "(?i)\\b(?:incbin|equ|times|dup)\\b", + "name": "support.function.asm.x86_64" + }, + { + "match": "(?i)\\b(?:strict|nosplit|near|far|abs|rel)\\b", + "name": "storage.modifier.asm.x86_64" + }, + { + "match": "(?i)\\b(?:[ao](?:16|32|64))\\b", + "name": "storage.modifier.prefix.asm.x86_64" + }, + { + "match": "(?i)\\b(?:rep(?:n?[ez])?|lock|xacquire|xrelease|(?:no)?bnd)\\b", + "name": "storage.modifier.prefix.asm.x86_64" + }, + { + "captures": { + "1": { + "name": "storage.modifier.prefix.vex.asm.x86_64" + } + }, + "match": "{(vex[23]?|evex|rex)}" + }, + { + "captures": { + "1": { + "name": "storage.modifier.opmask.asm.x86_64" + } + }, + "match": "{(k[1-7])}" + }, + { + "captures": { + "1": { + "name": "storage.modifier.precision.asm.x86_64" + } + }, + "match": "{(1to(?:8|16))}" + }, + { + "captures": { + "1": { + "name": "storage.modifier.rounding.asm.x86_64" + } + }, + "match": "{(z|(?:r[nudz]-)?sae)}" + }, + { + "match": "\\.\\.(?:start|imagebase|tlvp|got(?:pc(?:rel)?|(?:tp)?off)?|plt|sym|tlsie)\\b", + "name": "support.constant.asm.x86_64" + }, + { + "match": "\\b__\\?(?:utf(?:(?:16|32)(?:[lb]e)?)|float(?:8|16|32|64|80[me]|128[lh])|bfloat16|Infinity|[QS]?NaN)\\?__\\b", + "name": "support.function.asm.x86_64" + }, + { + "match": "\\b__(?:utf(?:(?:16|32)(?:[lb]e)?)|float(?:8|16|32|64|80[me]|128[lh])|bfloat16|Infinity|[QS]?NaN)__\\b", + "name": "support.function.legacy.asm.x86_64" + }, + { + "match": "\\b__\\?NASM_(?:MAJOR|(?:SUB)?MINOR|SNAPSHOT|VER(?:SION_ID)?)\\?__\\b", + "name": "support.function.asm.x86_64" + }, + { + "match": "\\b___\\?NASM_PATCHLEVEL\\?__\\b", + "name": "support.function.asm.x86_64" + }, + { + "match": "\\b__\\?(?:FILE|LINE|BITS|OUTPUT_FORMAT|DEBUG_FORMAT)\\?__\\b", + "name": "support.function.asm.x86_64" + }, + { + "match": "\\b__\\?(?:(?:UTC_)?(?:DATE|TIME)(?:_NUM)?|POSIX_TIME)\\?__\\b", + "name": "support.function.asm.x86_64" + }, + { + "match": "\\b__\\?USE_(?:\\w+)\\?__\\b", + "name": "support.function.asm.x86_64" + }, + { + "match": "\\b__\\?PASS\\?__\\b", + "name": "invalid.deprecated.support.constant.altreg.asm.x86_64" + }, + { + "match": "\\b__\\?ALIGNMODE\\?__\\b", + "name": "support.constant.smartalign.asm.x86_64" + }, + { + "match": "\\b__\\?ALIGN_(\\w+)\\?__\\b", + "name": "support.function.smartalign.asm.x86_64" + }, + { + "match": "\\b__NASM_(?:MAJOR|(?:SUB)?MINOR|SNAPSHOT|VER(?:SION_ID)?)__\\b", + "name": "support.function.asm.x86_64" + }, + { + "match": "\\b___NASM_PATCHLEVEL__\\b", + "name": "support.function.asm.x86_64" + }, + { + "match": "\\b__(?:FILE|LINE|BITS|OUTPUT_FORMAT|DEBUG_FORMAT)__\\b", + "name": "support.function.asm.x86_64" + }, + { + "match": "\\b__(?:(?:UTC_)?(?:DATE|TIME)(?:_NUM)?|POSIX_TIME)__\\b", + "name": "support.function.asm.x86_64" + }, + { + "match": "\\b__USE_(?:\\w+)__\\b", + "name": "support.function.asm.x86_64" + }, + { + "match": "\\b__PASS__\\b", + "name": "invalid.deprecated.support.constant.altreg.asm.x86_64" + }, + { + "match": "\\b__ALIGNMODE__\\b", + "name": "support.constant.smartalign.asm.x86_64" + }, + { + "match": "\\b__ALIGN_(\\w+)__\\b", + "name": "support.function.smartalign.asm.x86_64" + }, + { + "match": "\\b(?:Inf|[QS]?NaN)\\b", + "name": "support.constant.fp.asm.x86_64" + }, + { + "match": "\\b(?:float(?:8|16|32|64|80[me]|128[lh]))\\b", + "name": "support.function.fp.asm.x86_64" + }, + { + "match": "(?i)\\bilog2(?:[ewfc]|[fc]w)?\\b", + "name": "support.function.ifunc.asm.x86_64" + } + ] + } + }, + "scopeName": "source.asm.x86_64", + "uuid": "05d6565d-991a-4e88-8e28-63bb21197f32" +} diff --git a/src/lib/shiki/languages/astro.tmLanguage.json b/src/lib/shiki/languages/astro.tmLanguage.json new file mode 100644 index 0000000..96dfcf3 --- /dev/null +++ b/src/lib/shiki/languages/astro.tmLanguage.json @@ -0,0 +1,773 @@ +{ + "name": "astro", + "scopeName": "source.astro", + "fileTypes": ["astro"], + "injections": { + "L:(meta.script.astro) (meta.lang.json) - (meta source)": { + "patterns": [ + { + "begin": "(?<=>)(?!)(?!)(?!)(?!)(?!)(?!)(?!)(?!)(?!)(?!)(?!|})", + "end": "(?=<|{)", + "name": "text.astro" + } + ] + }, + "comments": { + "begin": "", + "captures": { + "0": { + "name": "punctuation.definition.comment.astro" + } + }, + "name": "comment.block.astro", + "patterns": [ + { + "match": "\\G-?>|)|--!>", + "name": "invalid.illegal.characters-not-allowed-here.astro" + } + ] + }, + "interpolation": { + "patterns": [ + { + "begin": "\\{", + "end": "\\}", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.astro" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.astro" + } + }, + "contentName": "meta.embedded.expression.astro source.tsx", + "patterns": [ + { + "begin": "\\G\\s*(?={)", + "end": "(?<=})", + "patterns": [ + { + "include": "source.tsx#object-literal" + } + ] + }, + { + "include": "source.tsx" + } + ] + } + ] + }, + "attributes": { + "patterns": [ + { + "include": "#attributes-events" + }, + { + "include": "#attributes-keyvalue" + }, + { + "include": "#attributes-interpolated" + } + ] + }, + "attributes-events": { + "begin": "(on(s(croll|t(orage|alled)|u(spend|bmit)|e(curitypolicyviolation|ek(ing|ed)|lect))|hashchange|c(hange|o(ntextmenu|py)|u(t|echange)|l(ick|ose)|an(cel|play(through)?))|t(imeupdate|oggle)|in(put|valid)|o(nline|ffline)|d(urationchange|r(op|ag(start|over|e(n(ter|d)|xit)|leave)?)|blclick)|un(handledrejection|load)|p(opstate|lay(ing)?|a(ste|use|ge(show|hide))|rogress)|e(nded|rror|mptied)|volumechange|key(down|up|press)|focus|w(heel|aiting)|l(oad(start|e(nd|d(data|metadata)))?|anguagechange)|a(uxclick|fterprint|bort)|r(e(s(ize|et)|jectionhandled)|atechange)|m(ouse(o(ut|ver)|down|up|enter|leave|move)|essage(error)?)|b(efore(unload|print)|lur)))(?![\\\\w:-])", + "beginCaptures": { + "0": { + "patterns": [ + { + "match": ".*", + "name": "entity.other.attribute-name.astro" + } + ] + } + }, + "end": "(?=\\s*+[^=\\s])", + "name": "meta.attribute.$1.astro", + "patterns": [ + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "punctuation.separator.key-value.astro" + } + }, + "end": "(?<=[^\\s=])(?!\\s*=)|(?=/?>)", + "patterns": [ + { + "begin": "(?=[^\\s=<>`/]|/(?!>))", + "end": "(?!\\G)", + "name": "meta.embedded.line.js", + "patterns": [ + { + "match": "(([^\\s\\\"'=<>`/]|/(?!>))+)", + "name": "string.unquoted.astro", + "captures": { + "0": { + "name": "source.js" + }, + "1": { + "patterns": [ + { + "include": "source.js" + } + ] + } + } + }, + { + "begin": "([\"])", + "end": "\\1", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.astro" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.astro" + } + }, + "name": "string.quoted.astro", + "patterns": [ + { + "match": "([^\\n\\\"/]|/(?![/*]))+", + "captures": { + "0": { + "patterns": [ + { + "include": "source.js" + } + ] + } + } + }, + { + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.js" + } + }, + "end": "(?=\\\")|\\n", + "name": "comment.line.double-slash.js" + }, + { + "begin": "/\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.js" + } + }, + "end": "(?=\\\")|\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.js" + } + }, + "name": "comment.block.js" + } + ] + }, + { + "begin": "(['])", + "end": "\\1", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.astro" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.astro" + } + }, + "name": "string.quoted.astro", + "patterns": [ + { + "match": "([^\\n\\'/]|/(?![/*]))+", + "captures": { + "0": { + "patterns": [ + { + "include": "source.js" + } + ] + } + } + }, + { + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.js" + } + }, + "end": "(?=\\')|\\n", + "name": "comment.line.double-slash.js" + }, + { + "begin": "/\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.js" + } + }, + "end": "(?=\\')|\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.js" + } + }, + "name": "comment.block.js" + } + ] + } + ] + } + ] + } + ] + }, + "attributes-interpolated": { + "begin": "(?)", + "patterns": [ + { + "include": "#attributes-value" + } + ] + } + ] + }, + "attributes-value": { + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "([^\\s\"'=<>`/]|/(?!>))+", + "name": "string.unquoted.astro" + }, + { + "begin": "(['\"])", + "end": "\\1", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.astro" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.astro" + } + }, + "name": "string.quoted.astro" + }, + { + "begin": "(`)", + "end": "\\1", + "name": "string.template.astro", + "patterns": [ + { + "include": "source.tsx#template-substitution-element" + } + ] + } + ] + }, + "tags": { + "patterns": [ + { + "include": "#tags-raw" + }, + { + "include": "#tags-lang" + }, + { + "include": "#tags-void" + }, + { + "include": "#tags-general-end" + }, + { + "include": "#tags-general-start" + } + ] + }, + "tags-name": { + "patterns": [ + { + "match": "[A-Z][a-zA-Z0-9_]*", + "name": "support.class.component.astro" + }, + { + "match": "[a-z][\\w0-9:]*-[\\w0-9:-]*", + "name": "meta.tag.custom.astro entity.name.tag.astro" + }, + { + "match": "[a-z][\\w0-9:-]*", + "name": "entity.name.tag.astro" + } + ] + }, + "tags-start-attributes": { + "begin": "\\G", + "end": "(?=/?>)", + "name": "meta.tag.start.astro", + "patterns": [ + { + "include": "#attributes" + } + ] + }, + "tags-lang-start-attributes": { + "begin": "\\G", + "end": "(?=/>)|>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.astro" + } + }, + "name": "meta.tag.start.astro", + "patterns": [ + { + "include": "#attributes" + } + ] + }, + "tags-start-node": { + "match": "(<)([^/\\s>/]*)", + "captures": { + "1": { + "name": "punctuation.definition.tag.begin.astro" + }, + "2": { + "patterns": [ + { + "include": "#tags-name" + } + ] + } + }, + "name": "meta.tag.start.astro" + }, + "tags-end-node": { + "match": "()|(/>)", + "captures": { + "1": { + "name": "meta.tag.end.astro punctuation.definition.tag.begin.astro" + }, + "2": { + "name": "meta.tag.end.astro", + "patterns": [ + { + "include": "#tags-name" + } + ] + }, + "3": { + "name": "meta.tag.end.astro punctuation.definition.tag.end.astro" + }, + "4": { + "name": "meta.tag.start.astro punctuation.definition.tag.end.astro" + } + } + }, + "tags-raw": { + "begin": "<([^/?!\\s<>]+)(?=[^>]+is:raw).*?", + "beginCaptures": { + "0": { + "patterns": [ + { + "include": "#tags-start-node" + } + ] + } + }, + "end": "|/>", + "endCaptures": { + "0": { + "patterns": [ + { + "include": "#tags-end-node" + } + ] + } + }, + "name": "meta.scope.tag.$1.astro meta.raw.astro", + "contentName": "source.unknown", + "patterns": [ + { + "include": "#tags-lang-start-attributes" + } + ] + }, + "tags-lang": { + "begin": "<(script|style)", + "end": "|/>", + "beginCaptures": { + "0": { + "patterns": [ + { + "include": "#tags-start-node" + } + ] + } + }, + "endCaptures": { + "0": { + "patterns": [ + { + "include": "#tags-end-node" + } + ] + } + }, + "name": "meta.scope.tag.$1.astro meta.$1.astro", + "patterns": [ + { + "begin": "\\G(?=\\s*[^>]*?(type|lang)\\s*=\\s*(['\"]|)(?:text\\/)?(application\\/ld\\+json)\\2)", + "end": "(?=)", + "name": "meta.lang.json.astro", + "patterns": [ + { + "include": "#tags-lang-start-attributes" + } + ] + }, + { + "begin": "\\G(?=\\s*[^>]*?(type|lang)\\s*=\\s*(['\"]|)(module)\\2)", + "end": "(?=)", + "name": "meta.lang.javascript.astro", + "patterns": [ + { + "include": "#tags-lang-start-attributes" + } + ] + }, + { + "begin": "\\G(?=\\s*[^>]*?(type|lang)\\s*=\\s*(['\"]|)(?:text/|application/)?([\\w\\/+]+)\\2)", + "end": "(?=)", + "name": "meta.lang.$3.astro", + "patterns": [ + { + "include": "#tags-lang-start-attributes" + } + ] + }, + { + "include": "#tags-lang-start-attributes" + } + ] + }, + "tags-void": { + "begin": "(<)(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.astro" + }, + "2": { + "name": "entity.name.tag.astro" + } + }, + "end": "/?>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.begin.astro" + } + }, + "name": "meta.tag.void.astro", + "patterns": [ + { + "include": "#attributes" + } + ] + }, + "tags-general-start": { + "begin": "(<)([^/\\s>/]*)", + "end": "(/?>)", + "beginCaptures": { + "0": { + "patterns": [ + { + "include": "#tags-start-node" + } + ] + } + }, + "endCaptures": { + "1": { + "name": "meta.tag.start.astro punctuation.definition.tag.end.astro" + } + }, + "name": "meta.scope.tag.$2.astro", + "patterns": [ + { + "include": "#tags-start-attributes" + } + ] + }, + "tags-general-end": { + "begin": "(]*)", + "end": "(>)", + "beginCaptures": { + "1": { + "name": "meta.tag.end.astro punctuation.definition.tag.begin.astro" + }, + "2": { + "name": "meta.tag.end.astro", + "patterns": [ + { + "include": "#tags-name" + } + ] + } + }, + "endCaptures": { + "1": { + "name": "meta.tag.end.astro punctuation.definition.tag.end.astro" + } + }, + "name": "meta.scope.tag.$2.astro" + } + } +} diff --git a/src/lib/shiki/languages/awk.tmLanguage.json b/src/lib/shiki/languages/awk.tmLanguage.json new file mode 100644 index 0000000..3cd0c6c --- /dev/null +++ b/src/lib/shiki/languages/awk.tmLanguage.json @@ -0,0 +1,386 @@ +{ + "fileTypes": ["awk"], + "name": "awk", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#procedure" + }, + { + "include": "#pattern" + } + ], + "repository": { + "builtin-pattern": { + "match": "\\b(BEGINFILE|BEGIN|ENDFILE|END)\\b", + "name": "constant.language.awk" + }, + "command": { + "patterns": [ + { + "match": "\\b(?:next|print|printf)\\b", + "name": "keyword.other.command.awk" + }, + { + "match": "\\b(?:close|getline|delete|system)\\b", + "name": "keyword.other.command.nawk" + }, + { + "match": "\\b(?:fflush|nextfile)\\b", + "name": "keyword.other.command.bell-awk" + } + ] + }, + "comment": { + "match": "#.*", + "name": "comment.line.number-sign.awk" + }, + "constant": { + "patterns": [ + { + "include": "#numeric-constant" + }, + { + "include": "#string-constant" + } + ] + }, + "escaped-char": { + "match": "\\\\(?:[\\\\abfnrtv/\"]|x[0-9A-Fa-f]{2}|[0-7]{3})", + "name": "constant.character.escape.awk" + }, + "expression": { + "patterns": [ + { + "include": "#command" + }, + { + "include": "#function" + }, + { + "include": "#constant" + }, + { + "include": "#variable" + }, + { + "include": "#regexp-in-expression" + }, + { + "include": "#operator" + }, + { + "include": "#groupings" + } + ] + }, + "function": { + "patterns": [ + { + "match": "\\b(?:exp|int|log|sqrt|index|length|split|sprintf|substr)\\b", + "name": "support.function.awk" + }, + { + "match": "\\b(?:atan2|cos|rand|sin|srand|gsub|match|sub|tolower|toupper)\\b", + "name": "support.function.nawk" + }, + { + "match": "\\b(?:gensub|strftime|systime)\\b", + "name": "support.function.gawk" + } + ] + }, + "function-definition": { + "begin": "\\b(function)\\s+(\\w+)(\\()", + "beginCaptures": { + "1": { + "name": "storage.type.function.awk" + }, + "2": { + "name": "entity.name.function.awk" + }, + "3": { + "name": "punctuation.definition.parameters.begin.awk" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.awk" + } + }, + "patterns": [ + { + "match": "\\b(\\w+)\\b", + "name": "variable.parameter.function.awk" + }, + { + "match": "\\b(,)\\b", + "name": "punctuation.separator.parameters.awk" + } + ] + }, + "groupings": { + "patterns": [ + { + "match": "\\(", + "name": "meta.brace.round.awk" + }, + { + "match": "\\)", + "name": "meta.brace.round.awk" + }, + { + "match": "\\,", + "name": "punctuation.separator.parameters.awk" + } + ] + }, + "keyword": { + "match": "\\b(?:break|continue|do|while|exit|for|if|else|return)\\b", + "name": "keyword.control.awk" + }, + "numeric-constant": { + "match": "\\b[0-9]+(?:\\.[0-9]+)?(?:e[+-][0-9]+)?\\b", + "name": "constant.numeric.awk" + }, + "operator": { + "patterns": [ + { + "match": "(!?~|[=<>!]=|[<>])", + "name": "keyword.operator.comparison.awk" + }, + { + "match": "\\b(in)\\b", + "name": "keyword.operator.comparison.awk" + }, + { + "match": "([+\\-*/%^]=|\\+\\+|--|>>|=)", + "name": "keyword.operator.assignment.awk" + }, + { + "match": "(\\|\\||&&|!)", + "name": "keyword.operator.boolean.awk" + }, + { + "match": "([+\\-*/%^])", + "name": "keyword.operator.arithmetic.awk" + }, + { + "match": "([?:])", + "name": "keyword.operator.trinary.awk" + }, + { + "match": "(\\[|\\])", + "name": "keyword.operator.index.awk" + } + ] + }, + "pattern": { + "patterns": [ + { + "include": "#regexp-as-pattern" + }, + { + "include": "#function-definition" + }, + { + "include": "#builtin-pattern" + }, + { + "include": "#expression" + } + ] + }, + "procedure": { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#procedure" + }, + { + "include": "#keyword" + }, + { + "include": "#expression" + } + ] + }, + "regex-as-assignment": { + "begin": "([^=<>!+\\-*/%^]=)\\s*(/)", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.awk" + }, + "2": { + "name": "punctuation.definition.regex.begin.awk" + } + }, + "contentName": "string.regexp", + "end": "/", + "endCaptures": { + "0": { + "name": "punctuation.definition.regex.end.awk" + } + }, + "patterns": [ + { + "include": "source.regexp" + } + ] + }, + "regex-as-comparison": { + "begin": "(!?~)\\s*(/)", + "beginCaptures": { + "1": { + "name": "keyword.operator.comparison.awk" + }, + "2": { + "name": "punctuation.definition.regex.begin.awk" + } + }, + "contentName": "string.regexp", + "end": "/", + "endCaptures": { + "0": { + "name": "punctuation.definition.regex.end.awk" + } + }, + "patterns": [ + { + "include": "source.regexp" + } + ] + }, + "regex-as-first-argument": { + "begin": "(\\()\\s*(/)", + "beginCaptures": { + "1": { + "name": "meta.brace.round.awk" + }, + "2": { + "name": "punctuation.definition.regex.begin.awk" + } + }, + "contentName": "string.regexp", + "end": "/", + "endCaptures": { + "0": { + "name": "punctuation.definition.regex.end.awk" + } + }, + "patterns": [ + { + "include": "source.regexp" + } + ] + }, + "regex-as-nth-argument": { + "begin": "(,)\\s*(/)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.parameters.awk" + }, + "2": { + "name": "punctuation.definition.regex.begin.awk" + } + }, + "contentName": "string.regexp", + "end": "/", + "endCaptures": { + "0": { + "name": "punctuation.definition.regex.end.awk" + } + }, + "patterns": [ + { + "include": "source.regexp" + } + ] + }, + "regexp-as-pattern": { + "begin": "/", + "beginCaptures": { + "0": { + "name": "punctuation.definition.regex.begin.awk" + } + }, + "contentName": "string.regexp", + "end": "/", + "endCaptures": { + "0": { + "name": "punctuation.definition.regex.end.awk" + } + }, + "patterns": [ + { + "include": "source.regexp" + } + ] + }, + "regexp-in-expression": { + "patterns": [ + { + "include": "#regex-as-assignment" + }, + { + "include": "#regex-as-comparison" + }, + { + "include": "#regex-as-first-argument" + }, + { + "include": "#regex-as-nth-argument" + } + ] + }, + "string-constant": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.awk" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.awk" + } + }, + "name": "string.quoted.double.awk", + "patterns": [ + { + "include": "#escaped-char" + } + ] + }, + "variable": { + "patterns": [ + { + "match": "\\$[0-9]+", + "name": "variable.language.awk" + }, + { + "match": "\\b(?:FILENAME|FS|NF|NR|OFMT|OFS|ORS|RS)\\b", + "name": "variable.language.awk" + }, + { + "match": "\\b(?:ARGC|ARGV|CONVFMT|ENVIRON|FNR|RLENGTH|RSTART|SUBSEP)\\b", + "name": "variable.language.nawk" + }, + { + "match": "\\b(?:ARGIND|ERRNO|FIELDWIDTHS|IGNORECASE|RT)\\b", + "name": "variable.language.gawk" + } + ] + } + }, + "scopeName": "source.awk", + "uuid": "67bd1ff0-006b-4c32-8b97-8bc198777582" +} diff --git a/src/lib/shiki/languages/ballerina.tmLanguage.json b/src/lib/shiki/languages/ballerina.tmLanguage.json new file mode 100644 index 0000000..a37e620 --- /dev/null +++ b/src/lib/shiki/languages/ballerina.tmLanguage.json @@ -0,0 +1,3784 @@ +{ + "name": "ballerina", + "scopeName": "source.ballerina", + "fileTypes": ["bal"], + "uuid": "c01f5512-489a-41bd-ba5d-caf4b55ae3b3", + "monarchVariables": { + "typeScope": "type", + "annotationScope": "type", + "numberScope": "number", + "xmlTagAngle": "tag", + "xmlAttribute": "variable.parameter", + "xmlTag": "tag", + "primitiveScope": "type" + }, + "tmlVariables": { + "typeScope": "storage.type.ballerina", + "annotationScope": "support.type.ballerina", + "numberScope": "constant.numeric.decimal.ballerina", + "xmlTagAngle": "punctuation.definition.tag.begin.xml.ballerina", + "xmlAttribute": "entity.other.attribute-name.xml.ballerina", + "xmlTag": "entity.name.tag.xml.ballerina", + "primitiveScope": "support.type.primitive.ballerina" + }, + "patterns": [ + { + "include": "#statements" + } + ], + "repository": { + "statements": { + "patterns": [ + { + "include": "#stringTemplate" + }, + { + "include": "#declaration" + }, + { + "include": "#control-statement" + }, + { + "include": "#decl-block" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-semicolon" + }, + { + "include": "#string" + }, + { + "include": "#comment" + }, + { + "include": "#mdDocumentation" + }, + { + "include": "#keywords" + }, + { + "include": "#annotationAttachment" + }, + { + "include": "#regex" + } + ] + }, + "declaration": { + "patterns": [ + { + "include": "#import-declaration" + }, + { + "include": "#var-expr" + }, + { + "include": "#typeDefinition" + }, + { + "include": "#function-defn" + }, + { + "include": "#service-decl" + }, + { + "include": "#class-defn" + }, + { + "include": "#enum-decl" + }, + { + "include": "#source" + }, + { + "include": "#keywords" + } + ] + }, + "control-statement": { + "patterns": [ + { + "begin": "(?)\n )) |\n ((\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "captures": { + "1": { + "name": "punctuation.accessor.ballerina" + }, + "2": { + "name": "punctuation.accessor.optional.ballerina" + }, + "3": { + "name": "entity.name.function.ballerina" + } + } + }, + { + "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=\\()", + "captures": { + "1": { + "name": "punctuation.accessor.ballerina" + }, + "2": { + "name": "punctuation.accessor.optional.ballerina" + }, + "3": { + "name": "entity.name.function.ballerina" + } + } + }, + { + "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "punctuation.accessor.ballerina" + }, + "2": { + "name": "punctuation.accessor.optional.ballerina" + }, + "3": { + "name": "variable.other.property.ballerina" + } + } + }, + { + "include": "#type-primitive" + }, + { + "include": "#self-literal" + }, + { + "name": "keyword.control.ballerina", + "match": "\\b(check|foreach|if|checkpanic)\\b" + }, + { + "include": "#call" + }, + { + "name": "support.type.primitive.ballerina", + "match": "\\b(var)\\b" + }, + { + "match": "([_$[:alpha:]][_$[:alnum:]]*)((\\.)([_$[:alpha:]][_$[:alnum:]]*)(\\()(\\)))?", + "captures": { + "1": { + "name": "variable.other.readwrite.ballerina" + }, + "3": { + "name": "punctuation.accessor.ballerina" + }, + "4": { + "name": "entity.name.function.ballerina" + }, + "5": { + "name": "punctuation.definition.parameters.begin.ballerina" + }, + "6": { + "name": "punctuation.definition.parameters.end.ballerina" + } + } + }, + { + "match": "(\\')([_$[:alpha:]][_$[:alnum:]]*)", + "name": "variable.other.property.ballerina" + }, + { + "include": "#type-annotation" + } + ] + }, + "object-member": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#function-defn" + }, + { + "include": "#literal" + }, + { + "include": "#keywords" + }, + { + "include": "#expression" + }, + { + "name": "meta.object.member.ballerina meta.object-literal.key.ballerina", + "begin": "(?=\\[)", + "end": "(?=:)|((?<=[\\]])(?=\\s*[\\(\\<]))", + "patterns": [ + { + "include": "#comment" + } + ] + }, + { + "name": "meta.object.member.ballerina meta.object-literal.key.ballerina", + "begin": "(?=[\\'\\\"\\`])", + "end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\n*})|(\\s+(as)\\s+))))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + } + ] + }, + { + "name": "meta.object.member.ballerina meta.object-literal.key.ballerina", + "begin": "(?x)(?=(\\b(?)\n )) |\n ((\n ((<\\s*$)|((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "0": { + "name": "meta.object-literal.key.ballerina" + }, + "1": { + "name": "entity.name.function.ballerina" + } + } + }, + { + "name": "meta.object.member.ballerina", + "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)", + "captures": { + "0": { + "name": "meta.object-literal.key.ballerina" + } + } + }, + { + "name": "meta.object.member.ballerina", + "begin": "\\.\\.\\.", + "beginCaptures": { + "0": { + "name": "keyword.operator.spread.ballerina" + } + }, + "end": "(?=,|\\})", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "meta.object.member.ballerina", + "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$|\\/\\/|\\/\\*)", + "captures": { + "1": { + "name": "variable.other.readwrite.ballerina" + } + } + }, + { + "name": "meta.object.member.ballerina", + "match": "(?]|\\|\\||\\&\\&|\\!\\=\\=|$|^|((?>=|>>>=|\\|=" + }, + { + "name": "keyword.operator.bitwise.shift.ballerina", + "match": "<<|>>>|>>" + }, + { + "name": "keyword.operator.comparison.ballerina", + "match": "===|!==|==|!=" + }, + { + "name": "keyword.operator.relational.ballerina", + "match": "<=|>=|<>|<|>" + }, + { + "match": "(?<=[_$[:alnum:]])(\\!)\\s*(?:(/=)|(?:(/)(?![/*])))", + "captures": { + "1": { + "name": "keyword.operator.logical.ballerina" + }, + "2": { + "name": "keyword.operator.assignment.compound.ballerina" + }, + "3": { + "name": "keyword.operator.arithmetic.ballerina" + } + } + }, + { + "name": "keyword.operator.logical.ballerina", + "match": "\\!|&&|\\|\\||\\?\\?" + }, + { + "name": "keyword.operator.bitwise.ballerina", + "match": "\\&|~|\\^|\\|" + }, + { + "name": "keyword.operator.assignment.ballerina", + "match": "\\=" + }, + { + "name": "keyword.operator.decrement.ballerina", + "match": "--" + }, + { + "name": "keyword.operator.increment.ballerina", + "match": "\\+\\+" + }, + { + "name": "keyword.operator.arithmetic.ballerina", + "match": "%|\\*|/|-|\\+" + } + ] + }, + "punctuation-comma": { + "patterns": [ + { + "name": "punctuation.separator.comma.ballerina", + "match": "," + } + ] + }, + "punctuation-semicolon": { + "patterns": [ + { + "match": ";", + "name": "punctuation.terminator.statement.ballerina" + } + ] + }, + "punctuation-accessor": { + "patterns": [ + { + "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", + "captures": { + "1": { + "name": "punctuation.accessor.ballerina" + }, + "2": { + "name": "punctuation.accessor.optional.ballerina" + } + } + } + ] + }, + "annotationAttachment": { + "patterns": [ + { + "match": "(@)((?:[_$[:alpha:]][_$[:alnum:]]*))\\s*(:?)\\s*((?:[_$[:alpha:]][_$[:alnum:]]*)?)", + "captures": { + "1": { + "name": "punctuation.decorator.ballerina" + }, + "2": { + "name": "support.type.ballerina" + }, + "3": { + "name": "punctuation.decorator.ballerina" + }, + "4": { + "name": "support.type.ballerina" + } + } + } + ] + }, + "annotationDefinition": { + "patterns": [ + { + "begin": "\\bannotation\\b", + "beginCaptures": { + "0": { + "name": "keyword.ballerina" + } + }, + "end": ";", + "patterns": [ + { + "include": "#code" + } + ] + } + ] + }, + "booleans": { + "patterns": [ + { + "match": "\\b(true|false)\\b", + "name": "constant.language.boolean.ballerina" + } + ] + }, + "butExp": { + "patterns": [ + { + "begin": "\\bbut\\b", + "beginCaptures": { + "0": { + "name": "keyword.ballerina" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina.documentation" + } + }, + "patterns": [ + { + "include": "#butExpBody" + }, + { + "include": "#comment" + } + ] + } + ] + }, + "butExpBody": { + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina.documentation" + } + }, + "end": "(?=\\})", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina.documentation" + } + }, + "patterns": [ + { + "include": "#parameter" + }, + { + "include": "#butClause" + }, + { + "include": "#comment" + } + ] + } + ] + }, + "butClause": { + "patterns": [ + { + "begin": "=>", + "beginCaptures": { + "0": { + "name": "meta.arrow.ballerina storage.type.function.arrow.ballerina" + } + }, + "end": ",|(?=\\})", + "patterns": [ + { + "include": "#code" + } + ] + } + ] + }, + "call": { + "patterns": [ + { + "match": "(?:\\')?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=\\()", + "name": "entity.name.function.ballerina" + } + ] + }, + "comment": { + "patterns": [ + { + "name": "comment.ballerina", + "match": "\\/\\/.*" + } + ] + }, + "constrainType": { + "patterns": [ + { + "begin": "<", + "end": ">", + "beginCaptures": { + "0": { + "name": "punctuation.definition.parameters.begin.ballerina" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.ballerina" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#constrainType" + }, + { + "name": "storage.type.ballerina", + "match": "\\b([_$[:alpha:]][_$[:alnum:]]*)\\b" + } + ] + } + ] + }, + "tupleType": { + "patterns": [ + { + "begin": "\\[", + "end": "(?=\\]|;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#constrainType" + }, + { + "include": "#paranthesisedBracket" + }, + { + "name": "storage.type.ballerina", + "match": "\\b([_$[:alpha:]][_$[:alnum:]]*)\\b" + } + ] + } + ] + }, + "decl-block": { + "name": "meta.block.ballerina", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina" + } + }, + "end": "(?=\\} external;)|(\\})", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina" + } + }, + "patterns": [ + { + "include": "#statements" + }, + { + "include": "#mdDocumentation" + } + ] + }, + "defaultValue": { + "patterns": [ + { + "begin": "[=:]", + "beginCaptures": { + "0": { + "name": "keyword.operator.ballerina" + } + }, + "end": "(?=[,)])", + "patterns": [ + { + "include": "#code" + } + ] + } + ] + }, + "documentationDef": { + "patterns": [ + { + "begin": "\\b(?:documentation|deprecated)\\b", + "beginCaptures": { + "0": { + "name": "keyword.ballerina" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "delimiter.curly" + } + }, + "patterns": [ + { + "include": "#documentationBody" + }, + { + "include": "#comment" + } + ] + } + ] + }, + "documentationBody": { + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina.documentation" + } + }, + "end": "(?=\\})", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina.documentation" + } + }, + "patterns": [ + { + "match": "(P|R|T|F|V)({{)(.*)(}})", + "captures": { + "1": { + "name": "keyword.other.ballerina.documentation" + }, + "2": { + "name": "keyword.other.ballerina.documentation" + }, + "3": { + "name": "variable.parameter.ballerina.documentation" + }, + "4": { + "name": "keyword.other.ballerina.documentation" + } + } + }, + { + "name": "comment.block.code.ballerina.documentation", + "begin": "\\```", + "end": "\\```" + }, + { + "name": "comment.block.code.ballerina.documentation", + "begin": "\\``", + "end": "\\``" + }, + { + "name": "comment.block.code.ballerina.documentation", + "begin": "\\`", + "end": "\\`" + }, + { + "name": "comment.block.ballerina.documentation", + "match": "." + } + ] + } + ] + }, + "enum-decl": { + "name": "meta.enum.declaration.ballerina", + "begin": "(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)", + "beginCaptures": { + "1": { + "name": "storage.modifier.ballerina" + }, + "2": { + "name": "keyword.other.ballerina" + }, + "3": { + "name": "entity.name.type.enum.ballerina" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#mdDocumentation" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#mdDocumentation" + }, + { + "begin": "([_$[:alpha:]][_$[:alnum:]]*)", + "beginCaptures": { + "0": { + "name": "variable.other.enummember.ballerina" + } + }, + "end": "(?=,|\\}|$)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + } + ] + }, + { + "begin": "(?=((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))", + "end": "(?=,|\\}|$)", + "patterns": [ + { + "include": "#string" + }, + { + "include": "#array-literal" + }, + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + } + ] + }, + { + "include": "#punctuation-comma" + } + ] + } + ] + }, + "errorDestructure": { + "patterns": [ + { + "begin": "error", + "end": "(?==>)", + "beginCaptures": { + "0": { + "name": "storage.type.ballerina" + } + }, + "patterns": [ + { + "include": "#code" + } + ] + } + ] + }, + "callableUnitBody": { + "patterns": [ + { + "begin": "\\{", + "end": "(?=\\})", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina" + } + }, + "patterns": [ + { + "include": "#workerDef" + }, + { + "include": "#service-decl" + }, + { + "include": "#objectDec" + }, + { + "include": "#function-defn" + }, + { + "include": "#forkStatement" + }, + { + "include": "#code" + } + ] + } + ] + }, + "for-loop": { + "begin": "(?", + "name": "meta.block.ballerina", + "beginCaptures": { + "0": { + "name": "meta.arrow.ballerina storage.type.function.arrow.ballerina" + } + }, + "end": "(?=\\;)|(?=\\,)|(?=)(?=\\);)", + "patterns": [ + { + "include": "#statements" + }, + { + "include": "#punctuation-comma" + } + ] + }, + { + "name": "keyword.generator.asterisk.ballerina", + "match": "\\*" + } + ] + }, + "function-defn": { + "name": "meta.function.ballerina", + "begin": "(?:(public|private)\\s+)?(function\\b)", + "beginCaptures": { + "1": { + "name": "keyword.other.ballerina" + }, + "2": { + "name": "keyword.other.ballerina" + } + }, + "end": "(?<=\\;)|(?<=\\})|(?<=\\,)|(?=)(?=\\);)", + "patterns": [ + { + "match": "\\bexternal\\b", + "name": "keyword.ballerina" + }, + { + "include": "#stringTemplate" + }, + { + "include": "#annotationAttachment" + }, + { + "include": "#functionReturns" + }, + { + "include": "#functionName" + }, + { + "include": "#functionParameters" + }, + { + "include": "#punctuation-semicolon" + }, + { + "include": "#function-body" + }, + { + "include": "#regex" + } + ] + }, + "functionName": { + "patterns": [ + { + "name": "keyword.other.ballerina", + "match": "\\bfunction\\b" + }, + { + "include": "#type-primitive" + }, + { + "include": "#self-literal" + }, + { + "include": "#string" + }, + { + "match": "\\s+(\\b(self)|\\b(is|new|isolated|null|function|in)\\b|(string|int|boolean|float|byte|decimal|json|xml|anydata)\\b|\\b(readonly|error|map)\\b|([_$[:alpha:]][_$[:alnum:]]*))", + "captures": { + "2": { + "name": "variable.language.this.ballerina" + }, + "3": { + "name": "keyword.other.ballerina" + }, + "4": { + "name": "support.type.primitive.ballerina" + }, + "5": { + "name": "storage.type.ballerina" + }, + "6": { + "name": "meta.definition.function.ballerina entity.name.function.ballerina" + } + } + } + ] + }, + "functionParameters": { + "name": "meta.parameters.ballerina", + "begin": "\\(|\\[", + "end": "\\)|\\]", + "beginCaptures": { + "0": { + "name": "punctuation.definition.parameters.begin.ballerina" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.ballerina" + } + }, + "patterns": [ + { + "include": "#function-parameters-body" + } + ] + }, + "function-parameters-body": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#numbers" + }, + { + "include": "#string" + }, + { + "include": "#annotationAttachment" + }, + { + "include": "#recordLiteral" + }, + { + "include": "#keywords" + }, + { + "include": "#parameter-name" + }, + { + "include": "#array-literal" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#identifiers" + }, + { + "include": "#regex" + }, + { + "name": "punctuation.separator.parameter.ballerina", + "match": "\\," + } + ] + }, + "parameter-name": { + "patterns": [ + { + "match": "\\s*\\b(var)\\s+", + "captures": { + "1": { + "name": "support.type.primitive.ballerina" + } + } + }, + { + "match": "(?x)(?:(?)|(\\=)|(?=\\{)|(\\))|(?=\\;)", + "endCaptures": { + "1": { + "name": "keyword.operator.ballerina" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "include": "#numbers" + }, + { + "include": "#keywords" + }, + { + "include": "#type-primitive" + }, + { + "match": "\\s*\\b(var)(?=\\s+|\\[|\\?)", + "captures": { + "1": { + "name": "support.type.primitive.ballerina" + } + } + }, + { + "match": "\\|", + "name": "keyword.operator.ballerina" + }, + { + "match": "\\?", + "name": "keyword.operator.optional.ballerina" + }, + { + "include": "#type-annotation" + }, + { + "include": "#type-tuple" + }, + { + "include": "#keywords" + }, + { + "match": "[_$[:alpha:]][_$[:alnum:]]*", + "name": "variable.other.readwrite.ballerina" + } + ] + }, + "functionType": { + "patterns": [ + { + "begin": "\\bfunction\\b", + "beginCaptures": { + "0": { + "name": "keyword.ballerina" + } + }, + "end": "(?=\\,)|(?=\\|)|(?=\\:)|(?==>)|(?=\\))|(?=\\])", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#functionTypeParamList" + }, + { + "include": "#functionTypeReturns" + } + ] + } + ] + }, + "functionTypeParamList": { + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "delimiter.parenthesis" + } + }, + "endCaptures": { + "0": { + "name": "delimiter.parenthesis" + } + }, + "patterns": [ + { + "match": "public", + "name": "keyword" + }, + { + "include": "#annotationAttachment" + }, + { + "include": "#recordLiteral" + }, + { + "include": "#record" + }, + { + "include": "#objectDec" + }, + { + "include": "#functionType" + }, + { + "include": "#constrainType" + }, + { + "include": "#parameterTuple" + }, + { + "include": "#functionTypeType" + }, + { + "include": "#comment" + } + ] + } + ] + }, + "functionTypeType": { + "patterns": [ + { + "begin": "[_$[:alpha:]][_$[:alnum:]]*", + "beginCaptures": { + "0": { + "name": "storage.type.ballerina" + } + }, + "end": "(?=\\,)|(?:\\|)|(?=\\])|(?=\\))" + } + ] + }, + "functionTypeReturns": { + "patterns": [ + { + "begin": "\\breturns\\b", + "beginCaptures": { + "0": { + "name": "keyword" + } + }, + "end": "(?=\\,)|(?:\\|)|(?=\\])|(?=\\))", + "patterns": [ + { + "include": "#functionTypeReturnsParameter" + }, + { + "include": "#comment" + } + ] + } + ] + }, + "functionTypeReturnsParameter": { + "patterns": [ + { + "begin": "((?=record|object|function)|(?:[_$[:alpha:]][_$[:alnum:]]*))", + "beginCaptures": { + "0": { + "name": "storage.type.ballerina" + } + }, + "end": "(?=\\,)|(?:\\|)|(?:\\:)|(?==>)|(?=\\))|(?=\\])", + "patterns": [ + { + "include": "#record" + }, + { + "include": "#objectDec" + }, + { + "include": "#functionType" + }, + { + "include": "#constrainType" + }, + { + "include": "#defaultValue" + }, + { + "include": "#comment" + }, + { + "include": "#parameterTuple" + }, + { + "match": "[_$[:alpha:]][_$[:alnum:]]*", + "name": "default.variable.parameter.ballerina" + } + ] + } + ] + }, + "if-statement": { + "patterns": [ + { + "begin": "(?", + "beginCaptures": { + "0": { + "name": "keyword.ballerina" + } + }, + "end": "((\\})|;|,)", + "patterns": [ + { + "include": "#callableUnitBody" + }, + { + "include": "#code" + } + ] + } + ] + }, + "matchStatement": { + "patterns": [ + { + "begin": "\\bmatch\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.ballerina" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#matchStatementBody" + }, + { + "include": "#comment" + }, + { + "include": "#code" + } + ] + } + ] + }, + "matchStatementBody": { + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina.documentation" + } + }, + "end": "(?=\\})", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina.documentation" + } + }, + "patterns": [ + { + "include": "#literal" + }, + { + "include": "#matchBindingPattern" + }, + { + "include": "#matchStatementPatternClause" + }, + { + "include": "#comment" + }, + { + "include": "#code" + } + ] + } + ] + }, + "matchBindingPattern": { + "patterns": [ + { + "begin": "var", + "beginCaptures": { + "0": { + "name": "storage.type.ballerina" + } + }, + "end": "(?==>)|,", + "patterns": [ + { + "include": "#errorDestructure" + }, + { + "include": "#code" + }, + { + "match": "[_$[:alpha:]][_$[:alnum:]]*", + "name": "variable.parameter.ballerina" + } + ] + } + ] + }, + "mdDocumentation": { + "name": "comment.mddocs.ballerina", + "begin": "\\#", + "end": "[\\r\\n]+", + "patterns": [ + { + "include": "#mdDocumentationReturnParamDescription" + }, + { + "include": "#mdDocumentationParamDescription" + } + ] + }, + "mdDocumentationParamDescription": { + "patterns": [ + { + "begin": "(\\+\\s+)(\\'?[_$[:alpha:]][_$[:alnum:]]*)(\\s*\\-\\s+)", + "beginCaptures": { + "1": { + "name": "keyword.operator.ballerina" + }, + "2": { + "name": "variable.other.readwrite.ballerina" + }, + "3": { + "name": "keyword.operator.ballerina" + } + }, + "end": "(?=[^#\\r\\n]|(?:# *?\\+))", + "patterns": [ + { + "match": "#.*", + "name": "comment.mddocs.paramdesc.ballerina" + } + ] + } + ] + }, + "mdDocumentationReturnParamDescription": { + "patterns": [ + { + "begin": "(#)(?: *?)(\\+)(?: *)(return)(?: *)(-)?(.*)", + "beginCaptures": { + "1": { + "name": "comment.mddocs.ballerina" + }, + "2": { + "name": "keyword.ballerina" + }, + "3": { + "name": "keyword.ballerina" + }, + "4": { + "name": "keyword.ballerina" + }, + "5": { + "name": "comment.mddocs.returnparamdesc.ballerina" + } + }, + "end": "(?=[^#\\r\\n]|(?:# *?\\+))", + "patterns": [ + { + "match": "#.*", + "name": "comment.mddocs.returnparamdesc.ballerina" + } + ] + } + ] + }, + "multiType": { + "patterns": [ + { + "match": "(?<=\\|)([_$[:alpha:]][_$[:alnum:]]*)|([_$[:alpha:]][_$[:alnum:]]*)(?=\\|)", + "name": "storage.type.ballerina" + }, + { + "match": "\\|", + "name": "keyword.operator.ballerina" + } + ] + }, + "numbers": { + "patterns": [ + { + "match": "\\b0[xX][\\da-fA-F]+\\b|\\b\\d+(?:\\.(?:\\d+|$))?", + "name": "constant.numeric.decimal.ballerina" + } + ] + }, + "class-body": { + "name": "meta.class.body.ballerina", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#mdDocumentation" + }, + { + "include": "#function-defn" + }, + { + "include": "#var-expr" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#access-modifier" + }, + { + "include": "#keywords" + }, + { + "begin": "(?<=:)\\s*", + "end": "(?=\\s|[;),}\\]:\\-\\+]|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|service|type|var)\\b))" + }, + { + "include": "#decl-block" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "access-modifier": { + "patterns": [ + { + "match": "(?|\\|)", + "beginCaptures": { + "2": { + "name": "support.type.primitive.ballerina" + }, + "3": { + "name": "storage.type.ballerina" + }, + "4": { + "name": "meta.definition.variable.ballerina variable.other.readwrite.ballerina" + } + }, + "end": "(?=$|^|[;,=}])", + "endCaptures": { + "0": { + "name": "punctuation.terminator.statement.ballerina" + } + }, + "patterns": [ + { + "include": "#call" + }, + { + "include": "#self-literal" + }, + { + "include": "#if-statement" + }, + { + "include": "#string" + }, + { + "include": "#numbers" + }, + { + "include": "#keywords" + } + ] + }, + { + "name": "meta.var-single-variable.expr.ballerina", + "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s+(\\!)?", + "beginCaptures": { + "1": { + "name": "meta.definition.variable.ballerina variable.other.readwrite.ballerina" + }, + "2": { + "name": "keyword.operator.definiteassignment.ballerina" + } + }, + "end": "(?=$|^|[;,=}]|((?)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.ballerina" + } + }, + "end": "(?=$|[,);}\\]])", + "patterns": [ + { + "match": "(\\')([_$[:alpha:]][_$[:alnum:]]*)", + "name": "variable.other.property.ballerina" + }, + { + "include": "#xml" + }, + { + "include": "#function-defn" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-accessor" + }, + { + "include": "#regex" + } + ] + }, + { + "begin": "(?)", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.ballerina" + } + }, + "end": "(?=[,);}\\]]|((?)|(?=\\))|(?=\\])", + "patterns": [ + { + "include": "#parameterWithDescriptor" + }, + { + "include": "#record" + }, + { + "include": "#objectDec" + }, + { + "include": "#functionType" + }, + { + "include": "#constrainType" + }, + { + "include": "#defaultValue" + }, + { + "include": "#comment" + }, + { + "include": "#parameterTuple" + }, + { + "match": "[_$[:alpha:]][_$[:alnum:]]*", + "name": "default.variable.parameter.ballerina" + } + ] + } + ] + }, + "parameterTuple": { + "patterns": [ + { + "begin": "\\[", + "end": "(?=\\,)|(?=\\|)|(?=\\:)|(?==>)|(?=\\))", + "patterns": [ + { + "include": "#record" + }, + { + "include": "#objectDec" + }, + { + "include": "#parameterTupleType" + }, + { + "include": "#parameterTupleEnd" + }, + { + "include": "#comment" + } + ] + } + ] + }, + "parameterTupleType": { + "patterns": [ + { + "begin": "[_$[:alpha:]][_$[:alnum:]]*", + "beginCaptures": { + "0": { + "name": "storage.type.ballerina" + } + }, + "end": "(?:\\,)|(?:\\|)|(?=\\])" + } + ] + }, + "parameterTupleEnd": { + "patterns": [ + { + "begin": "\\]", + "end": "(?=\\,)|(?=\\|)|(?=\\:)|(?==>)|(?=\\))", + "patterns": [ + { + "include": "#defaultWithParentheses" + }, + { + "match": "[_$[:alpha:]][_$[:alnum:]]*", + "name": "default.variable.parameter.ballerina" + } + ] + } + ] + }, + "parameterWithDescriptor": { + "patterns": [ + { + "begin": "\\&", + "beginCaptures": { + "0": { + "name": "keyword.operator.ballerina" + } + }, + "end": "(?=\\,)|(?=\\|)|(?=\\))", + "patterns": [ + { + "include": "#parameter" + } + ] + } + ] + }, + "defaultWithParentheses": { + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ballerina" + } + } + } + ] + }, + "string": { + "patterns": [ + { + "begin": "\"", + "name": "string.quoted.double.ballerina", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ballerina" + } + }, + "end": "(\")|((?:[^\\\\\\n])$)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.ballerina" + }, + "2": { + "name": "invalid.illegal.newline.ballerina" + } + }, + "patterns": [ + { + "include": "#string-character-escape" + } + ] + } + ] + }, + "source": { + "patterns": [ + { + "begin": "(\\bsource\\b)\\s+([_$[:alpha:]][_$[:alnum:]]*)", + "beginCaptures": { + "1": { + "name": "keyword.other.ballerina" + }, + "2": { + "name": "variable.other.readwrite.ballerina" + } + }, + "end": "(?=\\,)|(?=\\;)" + } + ] + }, + "types": { + "patterns": [ + { + "name": "storage.type.ballerina", + "match": "\\b(handle|any|future|typedesc)\\b" + }, + { + "name": "support.type.primitive.ballerina", + "match": "\\b(boolean|int|string|float|decimal|byte|json|xml|anydata)\\b" + }, + { + "name": "storage.type.ballerina", + "match": "\\b(map|error|never|readonly|distinct)\\b" + }, + { + "name": "storage.type.ballerina", + "match": "\\b(stream)\\b" + } + ] + }, + "xml": { + "patterns": [ + { + "begin": "(\\bxml)(\\s*)(`)", + "name": "string.template.ballerina", + "beginCaptures": { + "1": { + "name": "support.type.primitive.ballerina" + }, + "3": { + "name": "punctuation.definition.string.template.begin.ballerina" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.template.end.ballerina" + } + }, + "patterns": [ + { + "include": "#xmlTag" + }, + { + "include": "#xmlComment" + }, + { + "include": "#templateVariable" + }, + { + "name": "string", + "match": "." + } + ] + } + ] + }, + "xmlTag": { + "patterns": [ + { + "begin": "(<\\/?\\??)\\s*([-_a-zA-Z0-9]+)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.xml.ballerina" + }, + "2": { + "name": "entity.name.tag.xml.ballerina" + } + }, + "end": "\\??\\/?>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.xml.ballerina" + } + }, + "patterns": [ + { + "include": "#xmlSingleQuotedString" + }, + { + "include": "#xmlDoubleQuotedString" + }, + { + "name": "keyword.other.ballerina", + "match": "xmlns" + }, + { + "name": "entity.other.attribute-name.xml.ballerina", + "match": "([a-zA-Z0-9-]+)" + } + ] + } + ] + }, + "xmlComment": { + "patterns": [ + { + "begin": "", + "endCaptures": { + "0": { + "name": "comment.block.xml.ballerina" + } + }, + "name": "comment.block.xml.ballerina" + } + ] + }, + "xmlSingleQuotedString": { + "patterns": [ + { + "begin": "\\'", + "end": "\\'", + "beginCaptures": { + "0": { + "name": "string.begin.ballerina" + } + }, + "endCaptures": { + "0": { + "name": "string.end.ballerina" + } + }, + "patterns": [ + { + "name": "constant.character.escape.ballerina", + "match": "\\\\." + }, + { + "name": "string", + "match": "." + } + ] + } + ] + }, + "xmlDoubleQuotedString": { + "patterns": [ + { + "begin": "\\\"", + "end": "\\\"", + "beginCaptures": { + "0": { + "name": "string.begin.ballerina" + } + }, + "endCaptures": { + "0": { + "name": "string.end.ballerina" + } + }, + "patterns": [ + { + "name": "constant.character.escape.ballerina", + "match": "\\\\." + }, + { + "name": "string", + "match": "." + } + ] + } + ] + }, + "templateVariable": { + "patterns": [ + { + "begin": "\\${", + "beginCaptures": { + "0": { + "name": "constant.character.escape.ballerina" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "constant.character.escape.ballerina" + } + }, + "patterns": [ + { + "include": "#code" + } + ] + } + ] + }, + "ternary-expression": { + "begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)(?!\\?)", + "beginCaptures": { + "1": { + "name": "keyword.operator.ternary.ballerina" + } + }, + "end": "\\s*", + "endCaptures": { + "1": { + "name": "keyword.operator.ternary.ballerina" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "type": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "include": "#numbers" + }, + { + "include": "#type-primitive" + }, + { + "include": "#type-tuple" + } + ] + }, + "type-annotation": { + "patterns": [ + { + "name": "meta.type.annotation.ballerina", + "begin": "(\\:)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.ballerina" + } + }, + "end": "(?\\=>]|//)|(?==[^>])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))(\\?)?", + "patterns": [ + { + "include": "#booleans" + }, + { + "include": "#stringTemplate" + }, + { + "include": "#regex" + }, + { + "include": "#self-literal" + }, + { + "include": "#xml" + }, + { + "include": "#call" + }, + { + "match": "\\b(is|new|isolated|null|function|in)\\b|\\b(true|false)\\b|\\b(check|foreach|if|checkpanic)\\b|\\b(readonly|error|map)\\b|\\b(var)\\b|([_$[:alpha:]][_$[:alnum:]]*)((\\.)([_$[:alpha:]][_$[:alnum:]]*)(\\()(\\)))?", + "captures": { + "1": { + "name": "keyword.other.ballerina" + }, + "2": { + "name": "constant.language.boolean.ballerina" + }, + "3": { + "name": "keyword.control.ballerina" + }, + "4": { + "name": "storage.type.ballerina" + }, + "5": { + "name": "support.type.primitive.ballerina" + }, + "6": { + "name": "variable.other.readwrite.ballerina" + }, + "8": { + "name": "punctuation.accessor.ballerina" + }, + "9": { + "name": "entity.name.function.ballerina" + }, + "10": { + "name": "punctuation.definition.parameters.begin.ballerina" + }, + "11": { + "name": "punctuation.definition.parameters.end.ballerina" + } + } + }, + { + "name": "keyword.operator.optional.ballerina", + "match": "\\?" + }, + { + "include": "#multiType" + }, + { + "include": "#type" + }, + { + "include": "#paranthesised" + } + ] + } + ] + }, + "type-tuple": { + "name": "meta.type.tuple.ballerina", + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "meta.brace.square.ballerina" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "meta.brace.square.ballerina" + } + }, + "patterns": [ + { + "include": "#self-literal" + }, + { + "include": "#booleans" + }, + { + "name": "keyword.operator.rest.ballerina", + "match": "\\.\\.\\." + }, + { + "match": "(?)" + }, + { + "name": "keyword.operator.ballerina", + "match": "(!|%|\\+|\\-|~=|===|==|=|!=|!==|<|>|&|\\||\\?:|\\.\\.\\.|<=|>=|&&|\\|\\||~|>>|>>>)" + }, + { + "include": "#types" + }, + { + "include": "#self-literal" + }, + { + "include": "#type-primitive" + } + ] + }, + "literal": { + "patterns": [ + { + "include": "#booleans" + }, + { + "include": "#numbers" + }, + { + "include": "#strings" + }, + { + "include": "#maps" + }, + { + "include": "#self-literal" + }, + { + "include": "#array-literal" + } + ] + }, + "array-literal": { + "name": "meta.array.literal.ballerina", + "begin": "\\s*(\\[)", + "beginCaptures": { + "1": { + "name": "meta.brace.square.ballerina" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "meta.brace.square.ballerina" + } + }, + "patterns": [ + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "self-literal": { + "patterns": [ + { + "match": "(\\bself\\b)\\s*(.)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=\\()", + "captures": { + "1": { + "name": "variable.language.this.ballerina" + }, + "2": { + "name": "punctuation.accessor.ballerina" + }, + "3": { + "name": "entity.name.function.ballerina" + } + } + }, + { + "match": "(?<)])", + "patterns": [ + { + "include": "#escaped_characters" + }, + { + "include": "#variables" + }, + { + "include": "#numbers" + }, + { + "include": "#strings" + } + ] + }, + { + "match": "(?i)(?<=^|[\\s@])(setlocal)(?:\\s*$|\\s+(EnableExtensions|DisableExtensions|EnableDelayedExpansion|DisableDelayedExpansion)(?=\\s*$))", + "captures": { + "1": { + "name": "keyword.command.batchfile" + }, + "2": { + "name": "keyword.other.special-method.batchfile" + } + } + }, + { + "include": "#command_set" + } + ] + }, + "command_set": { + "patterns": [ + { + "begin": "(?<=^|[\\s@])(?i:SET)(?=$|\\s)", + "beginCaptures": { + "0": { + "name": "keyword.command.batchfile" + } + }, + "end": "(?=$\\n|[&|><)])", + "patterns": [ + { + "include": "#command_set_inside" + } + ] + } + ] + }, + "command_set_inside": { + "patterns": [ + { + "include": "#escaped_characters" + }, + { + "include": "#variables" + }, + { + "include": "#numbers" + }, + { + "include": "#parens" + }, + { + "include": "#command_set_strings" + }, + { + "include": "#strings" + }, + { + "begin": "([^ ][^=]*)(=)", + "beginCaptures": { + "1": { + "name": "variable.other.readwrite.batchfile" + }, + "2": { + "name": "keyword.operator.assignment.batchfile" + } + }, + "end": "(?=$\\n|[&|><)])", + "patterns": [ + { + "include": "#escaped_characters" + }, + { + "include": "#variables" + }, + { + "include": "#numbers" + }, + { + "include": "#parens" + }, + { + "include": "#strings" + } + ] + }, + { + "begin": "\\s+/[aA]\\s+", + "end": "(?=$\\n|[&|><)])", + "name": "meta.expression.set.batchfile", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.batchfile" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.batchfile" + } + }, + "name": "string.quoted.double.batchfile", + "patterns": [ + { + "include": "#command_set_inside_arithmetic" + }, + { + "include": "#command_set_group" + }, + { + "include": "#variables" + } + ] + }, + { + "include": "#command_set_inside_arithmetic" + }, + { + "include": "#command_set_group" + } + ] + }, + { + "begin": "\\s+/[pP]\\s+", + "end": "(?=$\\n|[&|><)])", + "patterns": [ + { + "include": "#command_set_strings" + }, + { + "begin": "([^ ][^=]*)(=)", + "beginCaptures": { + "1": { + "name": "variable.other.readwrite.batchfile" + }, + "2": { + "name": "keyword.operator.assignment.batchfile" + } + }, + "end": "(?=$\\n|[&|><)])", + "name": "meta.prompt.set.batchfile", + "patterns": [ + { + "include": "#strings" + } + ] + } + ] + } + ] + }, + "command_set_group": { + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.group.begin.batchfile" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.group.end.batchfile" + } + }, + "patterns": [ + { + "include": "#command_set_inside_arithmetic" + } + ] + } + ] + }, + "command_set_inside_arithmetic": { + "patterns": [ + { + "include": "#command_set_operators" + }, + { + "include": "#numbers" + }, + { + "match": ",", + "name": "punctuation.separator.batchfile" + } + ] + }, + "command_set_operators": { + "patterns": [ + { + "match": "([^ ]*)(\\+\\=|\\-\\=|\\*\\=|\\/\\=|%%\\=|&\\=|\\|\\=|\\^\\=|<<\\=|>>\\=)", + "captures": { + "1": { + "name": "variable.other.readwrite.batchfile" + }, + "2": { + "name": "keyword.operator.assignment.augmented.batchfile" + } + } + }, + { + "match": "\\+|\\-|/|\\*|%%|\\||&|\\^|<<|>>|~", + "name": "keyword.operator.arithmetic.batchfile" + }, + { + "match": "!", + "name": "keyword.operator.logical.batchfile" + }, + { + "match": "([^ =]*)(=)", + "captures": { + "1": { + "name": "variable.other.readwrite.batchfile" + }, + "2": { + "name": "keyword.operator.assignment.batchfile" + } + } + } + ] + }, + "command_set_strings": { + "patterns": [ + { + "begin": "(\")\\s*([^ ][^=]*)(=)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.batchfile" + }, + "2": { + "name": "variable.other.readwrite.batchfile" + }, + "3": { + "name": "keyword.operator.assignment.batchfile" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.batchfile" + } + }, + "name": "string.quoted.double.batchfile", + "patterns": [ + { + "include": "#variables" + }, + { + "include": "#numbers" + }, + { + "include": "#escaped_characters" + } + ] + } + ] + }, + "comments": { + "patterns": [ + { + "begin": "(?:^|(&))\\s*(?=((?::[+=,;: ])))", + "beginCaptures": { + "1": { + "name": "keyword.operator.conditional.batchfile" + } + }, + "end": "\\n", + "patterns": [ + { + "begin": "((?::[+=,;: ]))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.batchfile" + } + }, + "end": "(?=\\n)", + "name": "comment.line.colon.batchfile" + } + ] + }, + { + "begin": "(?<=^|[\\s@])(?i)(REM)(\\.)", + "beginCaptures": { + "1": { + "name": "keyword.command.rem.batchfile" + }, + "2": { + "name": "punctuation.separator.batchfile" + } + }, + "end": "(?=$\\n|[&|><)])", + "name": "comment.line.rem.batchfile" + }, + { + "begin": "(?<=^|[\\s@])(?i:rem)\\b", + "beginCaptures": { + "0": { + "name": "keyword.command.rem.batchfile" + } + }, + "end": "\\n", + "name": "comment.line.rem.batchfile", + "patterns": [ + { + "match": "[><|]", + "name": "invalid.illegal.unexpected-character.batchfile" + } + ] + } + ] + }, + "constants": { + "patterns": [ + { + "match": "\\b(?i:NUL)\\b", + "name": "constant.language.batchfile" + } + ] + }, + "controls": { + "patterns": [ + { + "match": "(?i)(?<=^|\\s)(?:call|exit(?=$|\\s)|goto(?=$|\\s|:))", + "name": "keyword.control.statement.batchfile" + }, + { + "match": "(?<=^|\\s)(?i)(if)\\s+(?:(not)\\s+)?(exist|defined|errorlevel|cmdextversion)(?=\\s)", + "captures": { + "1": { + "name": "keyword.control.conditional.batchfile" + }, + "2": { + "name": "keyword.operator.logical.batchfile" + }, + "3": { + "name": "keyword.other.special-method.batchfile" + } + } + }, + { + "match": "(?<=^|\\s)(?i)(?:if|else)(?=$|\\s)", + "name": "keyword.control.conditional.batchfile" + }, + { + "begin": "(?<=^|[\\s(&^])(?i)for(?=\\s)", + "beginCaptures": { + "0": { + "name": "keyword.control.repeat.batchfile" + } + }, + "name": "meta.block.repeat.batchfile", + "end": "\\n", + "patterns": [ + { + "begin": "(?<=[\\s^])(?i)in(?=\\s)", + "beginCaptures": { + "0": { + "name": "keyword.control.repeat.in.batchfile" + } + }, + "end": "(?<=[\\s)^])(?i)do(?=\\s)|\\n", + "endCaptures": { + "0": { + "name": "keyword.control.repeat.do.batchfile" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "$self" + } + ] + } + ] + }, + "escaped_characters": { + "patterns": [ + { + "match": "%%|\\^\\^!|\\^(?=.)|\\^\\n", + "name": "constant.character.escape.batchfile" + } + ] + }, + "labels": { + "patterns": [ + { + "match": "(?i)(?:^\\s*|(?<=call|goto)\\s*)(:)([^+=,;:\\s]\\S*)", + "captures": { + "1": { + "name": "punctuation.separator.batchfile" + }, + "2": { + "name": "keyword.other.special-method.batchfile" + } + } + } + ] + }, + "numbers": { + "patterns": [ + { + "match": "(?<=^|\\s|=)(0[xX][0-9A-Fa-f]*|[+-]?\\d+)(?=$|\\s|<|>)", + "name": "constant.numeric.batchfile" + } + ] + }, + "operators": { + "patterns": [ + { + "match": "@(?=\\S)", + "name": "keyword.operator.at.batchfile" + }, + { + "match": "(?<=\\s)(?i:EQU|NEQ|LSS|LEQ|GTR|GEQ)(?=\\s)|==", + "name": "keyword.operator.comparison.batchfile" + }, + { + "match": "(?<=\\s)(?i)(NOT)(?=\\s)", + "name": "keyword.operator.logical.batchfile" + }, + { + "match": "(?[&>]?", + "name": "keyword.operator.redirection.batchfile" + } + ] + }, + "parens": { + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.group.begin.batchfile" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.group.end.batchfile" + } + }, + "name": "meta.group.batchfile", + "patterns": [ + { + "match": ",|;", + "name": "punctuation.separator.batchfile" + }, + { + "include": "$self" + } + ] + } + ] + }, + "repeatParameter": { + "patterns": [ + { + "match": "(%%)(?:(?i:~[fdpnxsatz]*(?:\\$PATH:)?)?[a-zA-Z])", + "captures": { + "1": { + "name": "punctuation.definition.variable.batchfile" + } + }, + "name": "variable.parameter.repeat.batchfile" + } + ] + }, + "strings": { + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.batchfile" + } + }, + "end": "(\")|(\\n)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.batchfile" + }, + "2": { + "name": "invalid.illegal.newline.batchfile" + } + }, + "name": "string.quoted.double.batchfile", + "patterns": [ + { + "match": "%%", + "name": "constant.character.escape.batchfile" + }, + { + "include": "#variables" + } + ] + } + ] + }, + "variables": { + "patterns": [ + { + "match": "(%)(?:(?i:~[fdpnxsatz]*(?:\\$PATH:)?)?\\d|\\*)", + "captures": { + "1": { + "name": "punctuation.definition.variable.batchfile" + } + }, + "name": "variable.parameter.batchfile" + }, + { + "include": "#variable" + }, + { + "include": "#variable_delayed_expansion" + } + ] + }, + "variable": { + "patterns": [ + { + "begin": "%(?=[^%]+%)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.variable.begin.batchfile" + } + }, + "end": "(%)|\\n", + "endCaptures": { + "1": { + "name": "punctuation.definition.variable.end.batchfile" + } + }, + "name": "variable.other.readwrite.batchfile", + "patterns": [ + { + "begin": ":~", + "beginCaptures": { + "0": { + "name": "punctuation.separator.batchfile" + } + }, + "end": "(?=%|\\n)", + "name": "meta.variable.substring.batchfile", + "patterns": [ + { + "include": "#variable_substring" + } + ] + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.batchfile" + } + }, + "end": "(?=%|\\n)", + "name": "meta.variable.substitution.batchfile", + "patterns": [ + { + "include": "#variable_replace" + }, + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "punctuation.separator.batchfile" + } + }, + "end": "(?=%|\\n)", + "patterns": [ + { + "include": "#variable_delayed_expansion" + }, + { + "match": "[^%]+", + "name": "string.unquoted.batchfile" + } + ] + } + ] + } + ] + } + ] + }, + "variable_delayed_expansion": { + "patterns": [ + { + "begin": "!(?=[^!]+!)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.variable.begin.batchfile" + } + }, + "end": "(!)|\\n", + "endCaptures": { + "1": { + "name": "punctuation.definition.variable.end.batchfile" + } + }, + "name": "variable.other.readwrite.batchfile", + "patterns": [ + { + "begin": ":~", + "beginCaptures": { + "0": { + "name": "punctuation.separator.batchfile" + } + }, + "end": "(?=!|\\n)", + "name": "meta.variable.substring.batchfile", + "patterns": [ + { + "include": "#variable_substring" + } + ] + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.batchfile" + } + }, + "end": "(?=!|\\n)", + "name": "meta.variable.substitution.batchfile", + "patterns": [ + { + "include": "#escaped_characters" + }, + { + "include": "#variable_replace" + }, + { + "include": "#variable" + }, + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "punctuation.separator.batchfile" + } + }, + "end": "(?=!|\\n)", + "patterns": [ + { + "include": "#variable" + }, + { + "match": "[^!]+", + "name": "string.unquoted.batchfile" + } + ] + } + ] + } + ] + } + ] + }, + "variable_replace": { + "patterns": [ + { + "match": "[^=%!\\n]+", + "name": "string.unquoted.batchfile" + } + ] + }, + "variable_substring": { + "patterns": [ + { + "match": "([+-]?\\d+)(?:(,)([+-]?\\d+))?", + "captures": { + "1": { + "name": "constant.numeric.batchfile" + }, + "2": { + "name": "punctuation.separator.batchfile" + }, + "3": { + "name": "constant.numeric.batchfile" + } + } + } + ] + } + } +} diff --git a/src/lib/shiki/languages/beancount.tmLanguage.json b/src/lib/shiki/languages/beancount.tmLanguage.json new file mode 100644 index 0000000..fd8ea38 --- /dev/null +++ b/src/lib/shiki/languages/beancount.tmLanguage.json @@ -0,0 +1,829 @@ +{ + "fileTypes": ["beancount"], + "name": "beancount", + "patterns": [ + { + "comment": "Comments", + "match": ";.*", + "name": "comment.line.beancount" + }, + { + "begin": "^\\s*(poptag|pushtag)\\s+(#)([A-Za-z0-9\\-_/.]+)", + "beginCaptures": { + "1": { + "name": "support.function.beancount" + }, + "2": { + "name": "keyword.operator.tag.beancount" + }, + "3": { + "name": "entity.name.tag.beancount" + } + }, + "comment": "Tag directive", + "end": "(?=(^\\s*$|^\\S))", + "name": "meta.directive.tag.beancount", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#illegal" + } + ] + }, + { + "begin": "^\\s*(include)\\s+(\\\".*\\\")", + "beginCaptures": { + "1": { + "name": "support.function.beancount" + }, + "2": { + "name": "string.quoted.double.beancount" + } + }, + "comment": "Include directive", + "end": "(?=(^\\s*$|^\\S))", + "name": "meta.directive.include.beancount", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#illegal" + } + ] + }, + { + "begin": "^\\s*(option)\\s+(\\\".*\\\")\\s+(\\\".*\\\")", + "beginCaptures": { + "1": { + "name": "support.function.beancount" + }, + "2": { + "name": "support.variable.beancount" + }, + "3": { + "name": "string.quoted.double.beancount" + } + }, + "comment": "Option directive", + "end": "(?=(^\\s*$|^\\S))", + "name": "meta.directive.option.beancount", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#illegal" + } + ] + }, + { + "begin": "^\\s*(plugin)\\s*(\"(.*?)\")\\s*(\".*?\")?", + "beginCaptures": { + "1": { + "name": "support.function.beancount" + }, + "2": { + "name": "string.quoted.double.beancount" + }, + "3": { + "name": "entity.name.function.beancount" + }, + "4": { + "name": "string.quoted.double.beancount" + } + }, + "comment": "Plugin directive", + "end": "(?=(^\\s*$|^\\S))", + "name": "keyword.operator.directive.beancount", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#illegal" + } + ] + }, + { + "begin": "([0-9]{4})([\\-|/])([0-9]{2})([\\-|/])([0-9]{2})\\s+(open|close|pad)\\b", + "beginCaptures": { + "1": { + "name": "constant.numeric.date.year.beancount" + }, + "2": { + "name": "punctuation.separator.beancount" + }, + "3": { + "name": "constant.numeric.date.month.beancount" + }, + "4": { + "name": "punctuation.separator.beancount" + }, + "5": { + "name": "constant.numeric.date.day.beancount" + }, + "6": { + "name": "support.function.beancount" + } + }, + "comment": "Open/Close/Pad directive", + "end": "(?=(^\\s*$|^\\S))", + "name": "meta.directive.dated.beancount", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#meta" + }, + { + "include": "#account" + }, + { + "include": "#commodity" + }, + { + "match": "\\,", + "name": "punctuation.separator.beancount" + }, + { + "include": "#illegal" + } + ] + }, + { + "begin": "([0-9]{4})([\\-|/])([0-9]{2})([\\-|/])([0-9]{2})\\s+(custom)\\b", + "beginCaptures": { + "1": { + "name": "constant.numeric.date.year.beancount" + }, + "2": { + "name": "punctuation.separator.beancount" + }, + "3": { + "name": "constant.numeric.date.month.beancount" + }, + "4": { + "name": "punctuation.separator.beancount" + }, + "5": { + "name": "constant.numeric.date.day.beancount" + }, + "6": { + "name": "support.function.beancount" + } + }, + "comment": "Custom directive", + "end": "(?=(^\\s*$|^\\S))", + "name": "meta.directive.dated.beancount", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#meta" + }, + { + "include": "#string" + }, + { + "include": "#bool" + }, + { + "include": "#amount" + }, + { + "include": "#number" + }, + { + "include": "#date" + }, + { + "include": "#account" + }, + { + "include": "#illegal" + } + ] + }, + { + "begin": "([0-9]{4})([\\-|/])([0-9]{2})([\\-|/])([0-9]{2})\\s(event)", + "beginCaptures": { + "1": { + "name": "constant.numeric.date.year.beancount" + }, + "2": { + "name": "punctuation.separator.beancount" + }, + "3": { + "name": "constant.numeric.date.month.beancount" + }, + "4": { + "name": "punctuation.separator.beancount" + }, + "5": { + "name": "constant.numeric.date.day.beancount" + }, + "6": { + "name": "support.function.directive.beancount" + } + }, + "comment": "Event directive", + "end": "(?=(^\\s*$|^\\S))", + "name": "meta.directive.dated.beancount", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#meta" + }, + { + "include": "#string" + }, + { + "include": "#illegal" + } + ] + }, + { + "begin": "([0-9]{4})([\\-|/])([0-9]{2})([\\-|/])([0-9]{2})\\s(commodity)", + "beginCaptures": { + "1": { + "name": "constant.numeric.date.year.beancount" + }, + "2": { + "name": "punctuation.separator.beancount" + }, + "3": { + "name": "constant.numeric.date.month.beancount" + }, + "4": { + "name": "punctuation.separator.beancount" + }, + "5": { + "name": "constant.numeric.date.day.beancount" + }, + "6": { + "name": "support.function.directive.beancount" + } + }, + "comment": "Commodity directive", + "end": "(?=(^\\s*$|^\\S))", + "name": "meta.directive.dated.beancount", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#meta" + }, + { + "include": "#commodity" + }, + { + "include": "#illegal" + } + ] + }, + { + "name": "meta.directive.notetotext.beancount", + "comment": "Note as Oneliner Transaction directive", + "begin": "([0-9]{4})([\\-|/])([0-9]{2})([\\-|/])([0-9]{2})\\s+(note)(?=(.*\\*\\\"\\s))", + "beginCaptures": { + "1": { + "name": "constant.numeric.date.year.beancount" + }, + "2": { + "name": "punctuation.separator.beancount" + }, + "3": { + "name": "constant.numeric.date.month.beancount" + }, + "4": { + "name": "punctuation.separator.beancount" + }, + "5": { + "name": "constant.numeric.date.day.beancount" + }, + "6": { + "name": "support.function.directive.beancount" + } + }, + "end": "(?=(^\\s*$|^\\S))", + "patterns": [ + { + "include": "#meta" + }, + { + "include": "#account" + }, + { + "name": "punctuation.separator.beancount", + "match": "(?<=\\s)\\\"" + }, + { + "include": "#cost" + }, + { + "include": "#amount" + }, + { + "begin": "(\\*|\\!)", + "beginCaptures": { + "0": { + "name": "support.function.directive.beancount" + } + }, + "end": "(\\*\\\")", + "endCaptures": { + "0": { + "name": "punctuation.separator.beancount" + } + }, + "patterns": [ + { + "name": "constant.character.escape.beancount", + "match": "\\\\." + }, + { + "include": "#tag" + }, + { + "name": "string.quoted.double.beancount", + "match": "([^\\\"])" + } + ] + }, + { + "include": "#illegal" + } + ] + }, + { + "begin": "([0-9]{4})([\\-|/])([0-9]{2})([\\-|/])([0-9]{2})\\s(note|document)", + "beginCaptures": { + "1": { + "name": "constant.numeric.date.year.beancount" + }, + "2": { + "name": "punctuation.separator.beancount" + }, + "3": { + "name": "constant.numeric.date.month.beancount" + }, + "4": { + "name": "punctuation.separator.beancount" + }, + "5": { + "name": "constant.numeric.date.day.beancount" + }, + "6": { + "name": "support.function.directive.beancount" + } + }, + "comment": "Note/Document directive", + "end": "(?=(^\\s*$|^\\S))", + "name": "meta.directive.dated.beancount", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#meta" + }, + { + "include": "#account" + }, + { + "include": "#string" + }, + { + "include": "#illegal" + } + ] + }, + { + "begin": "([0-9]{4})([\\-|/])([0-9]{2})([\\-|/])([0-9]{2})\\s(price)", + "beginCaptures": { + "1": { + "name": "constant.numeric.date.year.beancount" + }, + "2": { + "name": "punctuation.separator.beancount" + }, + "3": { + "name": "constant.numeric.date.month.beancount" + }, + "4": { + "name": "punctuation.separator.beancount" + }, + "5": { + "name": "constant.numeric.date.day.beancount" + }, + "6": { + "name": "support.function.directive.beancount" + } + }, + "comment": "Price directives", + "end": "(?=(^\\s*$|^\\S))", + "name": "meta.directive.dated.beancount", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#meta" + }, + { + "include": "#commodity" + }, + { + "include": "#amount" + }, + { + "include": "#illegal" + } + ] + }, + { + "begin": "([0-9]{4})([\\-|/])([0-9]{2})([\\-|/])([0-9]{2})\\s(balance)", + "beginCaptures": { + "1": { + "name": "constant.numeric.date.year.beancount" + }, + "2": { + "name": "punctuation.separator.beancount" + }, + "3": { + "name": "constant.numeric.date.month.beancount" + }, + "4": { + "name": "punctuation.separator.beancount" + }, + "5": { + "name": "constant.numeric.date.day.beancount" + }, + "6": { + "name": "support.function.directive.beancount" + } + }, + "comment": "Balance directives", + "end": "(?=(^\\s*$|^\\S))", + "name": "meta.directive.dated.beancount", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#meta" + }, + { + "include": "#account" + }, + { + "include": "#amount" + }, + { + "include": "#illegal" + } + ] + }, + { + "begin": "([0-9]{4})([\\-|/])([0-9]{2})([\\-|/])([0-9]{2})\\s*(txn|[*!&#?%PSTCURM])\\s*(\".*?\")?\\s*(\".*?\")?", + "beginCaptures": { + "1": { + "name": "constant.numeric.date.year.beancount" + }, + "2": { + "name": "punctuation.separator.beancount" + }, + "3": { + "name": "constant.numeric.date.month.beancount" + }, + "4": { + "name": "punctuation.separator.beancount" + }, + "5": { + "name": "constant.numeric.date.day.beancount" + }, + "6": { + "name": "support.function.directive.beancount" + }, + "7": { + "name": "string.quoted.tiers.beancount" + }, + "8": { + "name": "string.quoted.narration.beancount" + } + }, + "comment": "Transaction directive", + "end": "(?=(^\\s*$|^\\S))", + "name": "meta.directive.transaction.beancount", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#posting" + }, + { + "include": "#meta" + }, + { + "include": "#tag" + }, + { + "include": "#link" + }, + { + "include": "#illegal" + } + ] + } + ], + "repository": { + "account": { + "begin": "([A-Z][a-z]+)(:)", + "beginCaptures": { + "1": { + "name": "constant.language.beancount" + }, + "2": { + "name": "punctuation.separator.beancount" + } + }, + "end": "\\s", + "name": "meta.account.beancount", + "patterns": [ + { + "begin": "(\\S+)([:]?)", + "beginCaptures": { + "1": { + "name": "variable.account.beancount" + }, + "2": { + "name": "punctuation.separator.beancount" + } + }, + "comment": "Sub accounts", + "end": "([:]?)|(\\s)", + "patterns": [ + { + "include": "$self" + }, + { + "include": "#illegal" + } + ] + } + ] + }, + "bool": { + "captures": { + "0": { + "name": "constant.language.bool.beancount" + }, + "2": { + "name": "constant.numeric.currency.beancount" + }, + "3": { + "name": "entity.type.commodity.beancount" + } + }, + "match": "TRUE|FALSE" + }, + "number": { + "captures": { + "1": { + "name": "keyword.operator.modifier.beancount" + }, + "2": { + "name": "constant.numeric.currency.beancount" + } + }, + "match": "([\\-|\\+]?)(\\d+(?:,\\d{3})*(?:\\.\\d*)?)" + }, + "amount": { + "captures": { + "1": { + "name": "keyword.operator.modifier.beancount" + }, + "2": { + "name": "constant.numeric.currency.beancount" + }, + "3": { + "name": "entity.type.commodity.beancount" + } + }, + "match": "([\\-|\\+]?)(\\d+(?:,\\d{3})*(?:\\.\\d*)?)\\s*([A-Z][A-Z0-9\\'\\.\\_\\-]{0,22}[A-Z0-9])", + "name": "meta.amount.beancount" + }, + "comments": { + "captures": { + "1": { + "name": "comment.line.beancount" + } + }, + "match": "(;.*)$" + }, + "commodity": { + "match": "([A-Z][A-Z0-9\\'\\.\\_\\-]{0,22}[A-Z0-9])", + "name": "entity.type.commodity.beancount" + }, + "cost": { + "begin": "\\{\\{?", + "beginCaptures": { + "0": { + "name": "keyword.operator.assignment.beancount" + } + }, + "end": "\\}\\}?", + "endCaptures": { + "0": { + "name": "keyword.operator.assignment.beancount" + } + }, + "name": "meta.cost.beancount", + "patterns": [ + { + "include": "#amount" + }, + { + "include": "#date" + }, + { + "match": "\\,", + "name": "punctuation.separator.beancount" + }, + { + "include": "#illegal" + } + ] + }, + "date": { + "captures": { + "1": { + "name": "constant.numeric.date.year.beancount" + }, + "2": { + "name": "punctuation.separator.beancount" + }, + "3": { + "name": "constant.numeric.date.month.beancount" + }, + "4": { + "name": "punctuation.separator.beancount" + }, + "5": { + "name": "constant.numeric.date.day.beancount" + } + }, + "match": "([0-9]{4})([\\-|/])([0-9]{2})([\\-|/])([0-9]{2})", + "name": "meta.date.beancount" + }, + "flag": { + "match": "(?<=\\s)([*!&#?%PSTCURM])(?=\\s+)", + "name": "keyword.other.beancount" + }, + "illegal": { + "match": "[^\\s]", + "name": "invalid.illegal.unrecognized.beancount" + }, + "link": { + "captures": { + "1": { + "name": "keyword.operator.link.beancount" + }, + "2": { + "name": "markup.underline.link.beancount" + } + }, + "match": "(\\^)([A-Za-z0-9\\-_/.]+)" + }, + "meta": { + "begin": "^\\s*([a-z][A-Za-z0-9\\-_]+)([:])", + "beginCaptures": { + "1": { + "name": "keyword.operator.directive.beancount" + }, + "2": { + "name": "punctuation.separator.beancount" + } + }, + "end": "\\n", + "name": "meta.meta.beancount", + "patterns": [ + { + "include": "#string" + }, + { + "include": "#account" + }, + { + "include": "#bool" + }, + { + "include": "#commodity" + }, + { + "include": "#date" + }, + { + "include": "#tag" + }, + { + "include": "#amount" + }, + { + "include": "#number" + }, + { + "include": "#comments" + }, + { + "include": "#illegal" + } + ] + }, + "posting": { + "begin": "^\\s+(?=([A-Z\\!]))", + "end": "(?=(^\\s*$|^\\S|^\\s*[A-Z]))", + "name": "meta.posting.beancount", + "patterns": [ + { + "include": "#meta" + }, + { + "include": "#comments" + }, + { + "include": "#flag" + }, + { + "include": "#account" + }, + { + "include": "#amount" + }, + { + "include": "#cost" + }, + { + "include": "#date" + }, + { + "include": "#price" + }, + { + "include": "#illegal" + } + ] + }, + "price": { + "begin": "\\@\\@?", + "beginCaptures": { + "0": { + "name": "keyword.operator.assignment.beancount" + } + }, + "end": "(?=(;|\\n))", + "name": "meta.price.beancount", + "patterns": [ + { + "include": "#amount" + }, + { + "include": "#illegal" + } + ] + }, + "string": { + "begin": "\\\"", + "end": "\\\"", + "name": "string.quoted.double.beancount", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.beancount" + } + ] + }, + "tag": { + "captures": { + "1": { + "name": "keyword.operator.tag.beancount" + }, + "2": { + "name": "entity.name.tag.beancount" + } + }, + "match": "(#)([A-Za-z0-9\\-_/.]+)" + } + }, + "scopeName": "text.beancount", + "uuid": "dbf28879-ee4d-497e-a678-a5c5a5e8d74f" +} diff --git a/src/lib/shiki/languages/berry.tmLanguage.json b/src/lib/shiki/languages/berry.tmLanguage.json new file mode 100644 index 0000000..40423d2 --- /dev/null +++ b/src/lib/shiki/languages/berry.tmLanguage.json @@ -0,0 +1,166 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "berry", + "patterns": [ + { + "include": "#controls" + }, + { + "include": "#strings" + }, + { + "include": "#comment-block" + }, + { + "include": "#comments" + }, + { + "include": "#keywords" + }, + { + "include": "#function" + }, + { + "include": "#member" + }, + { + "include": "#identifier" + }, + { + "include": "#number" + }, + { + "include": "#operator" + } + ], + "repository": { + "controls": { + "patterns": [ + { + "name": "keyword.control.berry", + "match": "\\b(if|elif|else|for|while|do|end|break|continue|return|try|except|raise)\\b" + } + ] + }, + "strings": { + "patterns": [ + { + "name": "string.quoted.double.berry", + "begin": "(\"|')", + "end": "\\1", + "patterns": [ + { + "name": "constant.character.escape.berry", + "match": "(\\\\x[\\h]{2})|(\\\\[0-7]{3})|(\\\\\\\\)|(\\\\\")|(\\\\')|(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)" + } + ] + }, + { + "name": "string.quoted.other.berry", + "begin": "f(\"|')", + "end": "\\1", + "patterns": [ + { + "name": "constant.character.escape.berry", + "match": "(\\\\x[\\h]{2})|(\\\\[0-7]{3})|(\\\\\\\\)|(\\\\\")|(\\\\')|(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)" + }, + { + "name": "string.quoted.other.berry", + "match": "\\{\\{[^\\}]*\\}\\}" + }, + { + "name": "keyword.other.unit.berry", + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#keywords" + }, + { + "include": "#numbers" + }, + { + "include": "#identifier" + }, + { + "include": "#operator" + }, + { + "include": "#member" + }, + { + "include": "#function" + } + ] + } + ] + } + ] + }, + "comment-block": { + "name": "comment.berry", + "begin": "\\#\\-", + "end": "\\-#", + "patterns": [{}] + }, + "comments": { + "name": "comment.line.berry", + "begin": "\\#", + "end": "\\n", + "patterns": [{}] + }, + "keywords": { + "patterns": [ + { + "name": "keyword.berry", + "match": "\\b(var|static|def|class|true|false|nil|self|super|import|as|_class)\\b" + } + ] + }, + "identifier": { + "patterns": [ + { + "name": "identifier.berry", + "match": "\\b[_A-Za-z]\\w+\\b" + } + ] + }, + "number": { + "patterns": [ + { + "name": "constant.numeric.berry", + "match": "0x[a-fA-F0-9]+|\\d+|(\\d+\\.?|\\.\\d)\\d*([eE][+-]?\\d+)?" + } + ] + }, + "operator": { + "patterns": [ + { + "name": "keyword.operator.berry", + "match": "\\(|\\)|\\[|\\]|\\.|-|\\!|~|\\*|/|%|\\+|&|\\^|\\||<|>|=|:" + } + ] + }, + "member": { + "patterns": [ + { + "match": "\\.([a-zA-Z_][a-zA-Z0-9_]*)", + "captures": { + "0": { + "name": "entity.other.attribute-name.berry" + } + } + } + ] + }, + "function": { + "patterns": [ + { + "name": "entity.name.function.berry", + "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*(?=\\s*\\())" + } + ] + } + }, + "scopeName": "source.berry" +} diff --git a/src/lib/shiki/languages/bibtex.tmLanguage.json b/src/lib/shiki/languages/bibtex.tmLanguage.json new file mode 100644 index 0000000..ce28b47 --- /dev/null +++ b/src/lib/shiki/languages/bibtex.tmLanguage.json @@ -0,0 +1,401 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/jlelong/vscode-latex-basics/blob/master/syntaxes/Bibtex.tmLanguage.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/jlelong/vscode-latex-basics/commit/7adad0868ecafbb1df978f1e052d6c3c85c38732", + "name": "bibtex", + "scopeName": "text.bibtex", + "comment": "Grammar based on description from http://artis.imag.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html#comment\n\t\n\tTODO: Does not support @preamble\n\t", + "patterns": [ + { + "begin": "@Comment", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.bibtex" + } + }, + "end": "$\\n?", + "name": "comment.line.at-sign.bibtex" + }, + { + "patterns": [ + { + "include": "#percentage_comment" + } + ] + }, + { + "begin": "((@)(?i:string))\\s*(\\{)\\s*([a-zA-Z0-9\\!\\$\\&\\*\\+\\-\\.\\/\\:\\;\\<\\>\\?\\[\\]\\^\\_\\`\\|]+)", + "beginCaptures": { + "1": { + "name": "keyword.other.string-constant.bibtex" + }, + "2": { + "name": "punctuation.definition.keyword.bibtex" + }, + "3": { + "name": "punctuation.section.string-constant.begin.bibtex" + }, + "4": { + "name": "variable.other.bibtex" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.string-constant.end.bibtex" + } + }, + "name": "meta.string-constant.braces.bibtex", + "patterns": [ + { + "include": "#string_content" + } + ] + }, + { + "begin": "((@)(?i:string))\\s*(\\()\\s*([a-zA-Z0-9\\!\\$\\&\\*\\+\\-\\.\\/\\:\\;\\<\\>\\?\\[\\]\\^\\_\\`\\|]+)", + "beginCaptures": { + "1": { + "name": "keyword.other.string-constant.bibtex" + }, + "2": { + "name": "punctuation.definition.keyword.bibtex" + }, + "3": { + "name": "punctuation.section.string-constant.begin.bibtex" + }, + "4": { + "name": "variable.other.bibtex" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.string-constant.end.bibtex" + } + }, + "name": "meta.string-constant.parenthesis.bibtex", + "patterns": [ + { + "include": "#string_content" + } + ] + }, + { + "begin": "((@)[a-zA-Z]+)\\s*(\\{)\\s*([^\\s,]*)", + "beginCaptures": { + "1": { + "name": "keyword.other.entry-type.bibtex" + }, + "2": { + "name": "punctuation.definition.keyword.bibtex" + }, + "3": { + "name": "punctuation.section.entry.begin.bibtex" + }, + "4": { + "name": "entity.name.type.entry-key.bibtex" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.entry.end.bibtex" + } + }, + "name": "meta.entry.braces.bibtex", + "patterns": [ + { + "include": "#percentage_comment" + }, + { + "include": "#url_field" + }, + { + "begin": "([a-zA-Z0-9\\!\\$\\&\\*\\+\\-\\.\\/\\:\\;\\<\\>\\?\\[\\]\\^\\_\\`\\|]+)\\s*(\\=)", + "beginCaptures": { + "1": { + "name": "support.function.key.bibtex" + }, + "2": { + "name": "punctuation.separator.key-value.bibtex" + } + }, + "end": "(?=[,}])", + "name": "meta.key-assignment.bibtex", + "patterns": [ + { + "include": "#percentage_comment" + }, + { + "include": "#integer" + }, + { + "include": "#string_content" + }, + { + "include": "#string_var" + } + ] + } + ] + }, + { + "begin": "((@)[a-zA-Z]+)\\s*(\\()\\s*([^\\s,]*)", + "beginCaptures": { + "1": { + "name": "keyword.other.entry-type.bibtex" + }, + "2": { + "name": "punctuation.definition.keyword.bibtex" + }, + "3": { + "name": "punctuation.section.entry.begin.bibtex" + }, + "4": { + "name": "entity.name.type.entry-key.bibtex" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.entry.end.bibtex" + } + }, + "name": "meta.entry.parenthesis.bibtex", + "patterns": [ + { + "include": "#percentage_comment" + }, + { + "include": "#url_field" + }, + { + "begin": "([a-zA-Z0-9\\!\\$\\&\\*\\+\\-\\.\\/\\:\\;\\<\\>\\?\\[\\]\\^\\_\\`\\|]+)\\s*(\\=)", + "beginCaptures": { + "1": { + "name": "support.function.key.bibtex" + }, + "2": { + "name": "punctuation.separator.key-value.bibtex" + } + }, + "end": "(?=[,)])", + "name": "meta.key-assignment.bibtex", + "patterns": [ + { + "include": "#percentage_comment" + }, + { + "include": "#integer" + }, + { + "include": "#string_content" + }, + { + "include": "#string_var" + } + ] + } + ] + }, + { + "begin": "[^@\\n]", + "end": "(?=@)", + "name": "comment.block.bibtex" + } + ], + "repository": { + "integer": { + "match": "\\s*(\\d+)\\s*", + "captures": { + "1": { + "name": "constant.numeric.bibtex" + } + } + }, + "nested_braces": { + "begin": "(?\\?\\[\\]\\^\\_\\`\\|]+)\\s*(#)?", + "captures": { + "1": { + "name": "keyword.operator.bibtex" + }, + "2": { + "name": "support.variable.bibtex" + }, + "3": { + "name": "keyword.operator.bibtex" + } + } + }, + "string_content": { + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.bibtex" + } + }, + "end": "(\\})(?=(?:,?\\s*\\}?\\s*\\n)|(?:\\s*#))", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.bibtex" + } + }, + "patterns": [ + { + "include": "#url_cmd" + }, + { + "include": "#percentage_comment" + }, + { + "match": "@", + "name": "invalid.illegal.at-sign.bibtex" + }, + { + "include": "#nested_braces" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.bibtex" + } + }, + "end": "\"(?=(?:,?\\s*\\}?\\s*\\n)|(?:\\s*#))", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.bibtex" + } + }, + "patterns": [ + { + "include": "#url_cmd" + }, + { + "include": "#percentage_comment" + }, + { + "match": "@", + "name": "invalid.illegal.at-sign.bibtex" + } + ] + } + ] + }, + "string_url": { + "patterns": [ + { + "begin": "\\{|\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.bibtex" + } + }, + "end": "(\\}|\")(?=(?:,?\\s*\\}?\\s*\\n)|(?:\\s*#))", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.bibtex" + } + }, + "contentName": "meta.url.bibtex", + "patterns": [ + { + "include": "#url_cmd" + } + ] + } + ] + }, + "percentage_comment": { + "patterns": [ + { + "begin": "(^[ \\t]+)?(?=%)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.bibtex" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "(?)", + "beginCaptures": { + "1": { + "name": "meta.undefined.bicep", + "patterns": [ + { + "include": "#identifier" + }, + { + "include": "#comments" + } + ] + } + }, + "end": "(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*=>" + }, + "line-comment": { + "name": "comment.line.double-slash.bicep", + "match": "//.*(?=$)" + }, + "named-literal": { + "name": "constant.language.bicep", + "match": "\\b(true|false|null)\\b" + }, + "numeric-literal": { + "name": "constant.numeric.bicep", + "match": "[0-9]+" + }, + "object-literal": { + "name": "meta.object-literal.bicep", + "begin": "{", + "end": "}", + "patterns": [ + { + "include": "#object-property-key" + }, + { + "include": "#expression" + }, + { + "include": "#comments" + } + ] + }, + "object-property-key": { + "name": "variable.other.property.bicep", + "match": "\\b[_$[:alpha:]][_$[:alnum:]]*\\b(?=(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*:)" + }, + "string-literal": { + "name": "string.quoted.single.bicep", + "begin": "'(?!'')", + "end": "'", + "patterns": [ + { + "include": "#escape-character" + }, + { + "include": "#string-literal-subst" + } + ] + }, + "string-literal-subst": { + "name": "meta.string-literal-subst.bicep", + "begin": "(?))", + "beginCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.leading.php" + } + }, + "end": "(?!\\G)(\\s*$\\n)?", + "endCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.trailing.php" + } + }, + "patterns": [ + { + "begin": "<\\?(?i:php|=)?", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + } + }, + "contentName": "source.php", + "end": "(\\?)>", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "source.php" + } + }, + "name": "meta.embedded.block.php", + "patterns": [ + { + "include": "#language" + } + ] + } + ] + }, + { + "begin": "<\\?(?i:php|=)?(?![^?]*\\?>)", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + } + }, + "contentName": "source.php", + "end": "(\\?)>", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "source.php" + } + }, + "name": "meta.embedded.block.php", + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "begin": "<\\?(?i:php|=)?", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + } + }, + "name": "meta.embedded.line.php", + "patterns": [ + { + "captures": { + "1": { + "name": "source.php" + }, + "2": { + "name": "punctuation.section.embedded.end.php" + }, + "3": { + "name": "source.php" + } + }, + "match": "\\G(\\s*)((\\?))(?=>)", + "name": "meta.special.empty-tag.php" + }, + { + "begin": "\\G", + "contentName": "source.php", + "end": "(\\?)(?=>)", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "source.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + } + ] + } + ] + } + }, + "patterns": [ + { + "include": "text.html.basic" + } + ], + "repository": { + "blade": { + "patterns": [ + { + "begin": "{{--", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.blade" + } + }, + "end": "--}}", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.blade" + } + }, + "name": "comment.block.blade", + "patterns": [ + { + "name": "invalid.illegal.php-code-in-comment.blade", + "begin": "(^\\s*)(?=<\\?(?![^?]*\\?>))", + "beginCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.leading.php" + } + }, + "end": "(?!\\G)(\\s*$\\n)?", + "endCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.trailing.php" + } + }, + "patterns": [ + { + "begin": "<\\?(?i:php|=)?", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + } + }, + "contentName": "source.php", + "end": "(\\?)>", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "source.php" + } + }, + "name": "meta.embedded.block.php", + "patterns": [ + { + "include": "#language" + } + ] + } + ] + }, + { + "begin": "<\\?(?i:php|=)?(?![^?]*\\?>)", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + } + }, + "contentName": "source.php", + "end": "(\\?)>", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "source.php" + } + }, + "name": "invalid.illegal.php-code-in-comment.blade.meta.embedded.block.php", + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "begin": "<\\?(?i:php|=)?", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + } + }, + "name": "invalid.illegal.php-code-in-comment.blade.meta.embedded.line.php", + "patterns": [ + { + "captures": { + "1": { + "name": "source.php" + }, + "2": { + "name": "punctuation.section.embedded.end.php" + }, + "3": { + "name": "source.php" + } + }, + "match": "\\G(\\s*)((\\?))(?=>)", + "name": "meta.special.empty-tag.php" + }, + { + "begin": "\\G", + "contentName": "source.php", + "end": "(\\?)(?=>)", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "source.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + } + ] + } + ] + }, + { + "begin": "(?)", + "name": "comment.line.double-slash.php" + } + ] + }, + { + "begin": "(^\\s+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.php" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.php" + } + }, + "end": "\\n|(?=\\?>)", + "name": "comment.line.number-sign.php" + } + ] + } + ] + }, + "constants": { + "patterns": [ + { + "match": "(?i)\\b(TRUE|FALSE|NULL|__(FILE|DIR|FUNCTION|CLASS|METHOD|LINE|NAMESPACE)__|ON|OFF|YES|NO|NL|BR|TAB)\\b", + "name": "constant.language.php" + }, + { + "match": "(?x)\n(\\\\)?\\b\n(DEFAULT_INCLUDE_PATH\n|EAR_(INSTALL|EXTENSION)_DIR\n|E_(ALL|COMPILE_(ERROR|WARNING)|CORE_(ERROR|WARNING)|DEPRECATED|ERROR|NOTICE\n |PARSE|RECOVERABLE_ERROR|STRICT|USER_(DEPRECATED|ERROR|NOTICE|WARNING)|WARNING)\n|PHP_(ROUND_HALF_(DOWN|EVEN|ODD|UP)|(MAJOR|MINOR|RELEASE)_VERSION|MAXPATHLEN\n |BINDIR|SHLIB_SUFFIX|SYSCONFDIR|SAPI|CONFIG_FILE_(PATH|SCAN_DIR)\n |INT_(MAX|SIZE)|ZTS|OS|OUTPUT_HANDLER_(START|CONT|END)|DEBUG|DATADIR\n |URL_(SCHEME|HOST|USER|PORT|PASS|PATH|QUERY|FRAGMENT)|PREFIX\n |EXTRA_VERSION|EXTENSION_DIR|EOL|VERSION(_ID)?\n |WINDOWS_(NT_(SERVER|DOMAIN_CONTROLLER|WORKSTATION)\n |VERSION_(MAJOR|MINOR)|BUILD|SUITEMASK|SP_(MAJOR|MINOR)\n |PRODUCTTYPE|PLATFORM)\n |LIBDIR|LOCALSTATEDIR)\n|STD(ERR|IN|OUT)|ZEND_(DEBUG_BUILD|THREAD_SAFE))\n\\b", + "name": "support.constant.core.php", + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + } + }, + { + "match": "(?x)\n(\\\\)?\\b\n(__COMPILER_HALT_OFFSET__|AB(MON_(1|2|3|4|5|6|7|8|9|10|11|12)|DAY[1-7])\n|AM_STR|ASSERT_(ACTIVE|BAIL|CALLBACK_QUIET_EVAL|WARNING)|ALT_DIGITS\n|CASE_(UPPER|LOWER)|CHAR_MAX|CONNECTION_(ABORTED|NORMAL|TIMEOUT)|CODESET|COUNT_(NORMAL|RECURSIVE)\n|CREDITS_(ALL|DOCS|FULLPAGE|GENERAL|GROUP|MODULES|QA|SAPI)\n|CRYPT_(BLOWFISH|EXT_DES|MD5|SHA(256|512)|SALT_LENGTH|STD_DES)|CURRENCY_SYMBOL\n|D_(T_)?FMT|DATE_(ATOM|COOKIE|ISO8601|RFC(822|850|1036|1123|2822|3339)|RSS|W3C)\n|DAY_[1-7]|DECIMAL_POINT|DIRECTORY_SEPARATOR\n|ENT_(COMPAT|IGNORE|(NO)?QUOTES)|EXTR_(IF_EXISTS|OVERWRITE|PREFIX_(ALL|IF_EXISTS|INVALID|SAME)|REFS|SKIP)\n|ERA(_(D_(T_)?FMT)|T_FMT|YEAR)?|FRAC_DIGITS|GROUPING|HASH_HMAC|HTML_(ENTITIES|SPECIALCHARS)\n|INF|INFO_(ALL|CREDITS|CONFIGURATION|ENVIRONMENT|GENERAL|LICENSEMODULES|VARIABLES)\n|INI_(ALL|CANNER_(NORMAL|RAW)|PERDIR|SYSTEM|USER)|INT_(CURR_SYMBOL|FRAC_DIGITS)\n|LC_(ALL|COLLATE|CTYPE|MESSAGES|MONETARY|NUMERIC|TIME)|LOCK_(EX|NB|SH|UN)\n|LOG_(ALERT|AUTH(PRIV)?|CRIT|CRON|CONS|DAEMON|DEBUG|EMERG|ERR|INFO|LOCAL[1-7]|LPR|KERN|MAIL\n |NEWS|NODELAY|NOTICE|NOWAIT|ODELAY|PID|PERROR|WARNING|SYSLOG|UCP|USER)\n|M_(1_PI|SQRT(1_2|2|3|PI)|2_(SQRT)?PI|PI(_(2|4))?|E(ULER)?|LN(10|2|PI)|LOG(10|2)E)\n|MON_(1|2|3|4|5|6|7|8|9|10|11|12|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)\n|N_(CS_PRECEDES|SEP_BY_SPACE|SIGN_POSN)|NAN|NEGATIVE_SIGN|NO(EXPR|STR)\n|P_(CS_PRECEDES|SEP_BY_SPACE|SIGN_POSN)|PM_STR|POSITIVE_SIGN\n|PATH(_SEPARATOR|INFO_(EXTENSION|(BASE|DIR|FILE)NAME))|RADIXCHAR\n|SEEK_(CUR|END|SET)|SORT_(ASC|DESC|LOCALE_STRING|REGULAR|STRING)|STR_PAD_(BOTH|LEFT|RIGHT)\n|T_FMT(_AMPM)?|THOUSEP|THOUSANDS_SEP\n|UPLOAD_ERR_(CANT_WRITE|EXTENSION|(FORM|INI)_SIZE|NO_(FILE|TMP_DIR)|OK|PARTIAL)\n|YES(EXPR|STR))\n\\b", + "name": "support.constant.std.php", + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + } + }, + { + "match": "(?x)\n(\\\\)?\\b\n(GLOB_(MARK|BRACE|NO(SORT|CHECK|ESCAPE)|ONLYDIR|ERR|AVAILABLE_FLAGS)\n|XML_(SAX_IMPL|(DTD|DOCUMENT(_(FRAG|TYPE))?|HTML_DOCUMENT|NOTATION|NAMESPACE_DECL|PI|COMMENT|DATA_SECTION|TEXT)_NODE\n |OPTION_(SKIP_(TAGSTART|WHITE)|CASE_FOLDING|TARGET_ENCODING)\n |ERROR_((BAD_CHAR|(ATTRIBUTE_EXTERNAL|BINARY|PARAM|RECURSIVE)_ENTITY)_REF|MISPLACED_XML_PI|SYNTAX|NONE\n |NO_(MEMORY|ELEMENTS)|TAG_MISMATCH|INCORRECT_ENCODING|INVALID_TOKEN|DUPLICATE_ATTRIBUTE\n |UNCLOSED_(CDATA_SECTION|TOKEN)|UNDEFINED_ENTITY|UNKNOWN_ENCODING|JUNK_AFTER_DOC_ELEMENT\n |PARTIAL_CHAR|EXTERNAL_ENTITY_HANDLING|ASYNC_ENTITY)\n |ENTITY_(((REF|DECL)_)?NODE)|ELEMENT(_DECL)?_NODE|LOCAL_NAMESPACE|ATTRIBUTE_(NMTOKEN(S)?|NOTATION|NODE)\n |CDATA|ID(REF(S)?)?|DECL_NODE|ENTITY|ENUMERATION)\n|MHASH_(RIPEMD(128|160|256|320)|GOST|MD(2|4|5)|SHA(1|224|256|384|512)|SNEFRU256|HAVAL(128|160|192|224|256)\n |CRC23(B)?|TIGER(128|160)?|WHIRLPOOL|ADLER32)\n|MYSQL_(BOTH|NUM|CLIENT_(SSL|COMPRESS|IGNORE_SPACE|INTERACTIVE|ASSOC))\n|MYSQLI_(REPORT_(STRICT|INDEX|OFF|ERROR|ALL)|REFRESH_(GRANT|MASTER|BACKUP_LOG|STATUS|SLAVE|HOSTS|THREADS|TABLES|LOG)\n |READ_DEFAULT_(FILE|GROUP)|(GROUP|MULTIPLE_KEY|BINARY|BLOB)_FLAG|BOTH\n |STMT_ATTR_(CURSOR_TYPE|UPDATE_MAX_LENGTH|PREFETCH_ROWS)|STORE_RESULT\n |SERVER_QUERY_(NO_((GOOD_)?INDEX_USED)|WAS_SLOW)|SET_(CHARSET_NAME|FLAG)\n |NO_(DEFAULT_VALUE_FLAG|DATA)|NOT_NULL_FLAG|NUM(_FLAG)?\n |CURSOR_TYPE_(READ_ONLY|SCROLLABLE|NO_CURSOR|FOR_UPDATE)\n |CLIENT_(SSL|NO_SCHEMA|COMPRESS|IGNORE_SPACE|INTERACTIVE|FOUND_ROWS)\n |TYPE_(GEOMETRY|((MEDIUM|LONG|TINY)_)?BLOB|BIT|SHORT|STRING|SET|YEAR|NULL|NEWDECIMAL|NEWDATE|CHAR\n |TIME(STAMP)?|TINY|INT24|INTERVAL|DOUBLE|DECIMAL|DATE(TIME)?|ENUM|VAR_STRING|FLOAT|LONG(LONG)?)\n |TIME_STAMP_FLAG|INIT_COMMAND|ZEROFILL_FLAG|ON_UPDATE_NOW_FLAG\n |OPT_(NET_((CMD|READ)_BUFFER_SIZE)|CONNECT_TIMEOUT|INT_AND_FLOAT_NATIVE|LOCAL_INFILE)\n |DEBUG_TRACE_ENABLED|DATA_TRUNCATED|USE_RESULT|(ENUM|(PART|PRI|UNIQUE)_KEY|UNSIGNED)_FLAG\n |ASSOC|ASYNC|AUTO_INCREMENT_FLAG)\n|MCRYPT_(RC(2|6)|RIJNDAEL_(128|192|256)|RAND|GOST|XTEA|MODE_(STREAM|NOFB|CBC|CFB|OFB|ECB)|MARS\n |BLOWFISH(_COMPAT)?|SERPENT|SKIPJACK|SAFER(64|128|PLUS)|CRYPT|CAST_(128|256)|TRIPLEDES|THREEWAY\n |TWOFISH|IDEA|(3)?DES|DECRYPT|DEV_(U)?RANDOM|PANAMA|ENCRYPT|ENIGNA|WAKE|LOKI97|ARCFOUR(_IV)?)\n|STREAM_(REPORT_ERRORS|MUST_SEEK|MKDIR_RECURSIVE|BUFFER_(NONE|FULL|LINE)|SHUT_(RD)?WR\n |SOCK_(RDM|RAW|STREAM|SEQPACKET|DGRAM)|SERVER_(BIND|LISTEN)\n |NOTIFY_(REDIRECTED|RESOLVE|MIME_TYPE_IS|SEVERITY_(INFO|ERR|WARN)|COMPLETED|CONNECT|PROGRESS\n |FILE_SIZE_IS|FAILURE|AUTH_(REQUIRED|RESULT))\n |CRYPTO_METHOD_((SSLv2(3)?|SSLv3|TLS)_(CLIENT|SERVER))|CLIENT_((ASYNC_)?CONNECT|PERSISTENT)\n |CAST_(AS_STREAM|FOR_SELECT)|(IGNORE|IS)_URL|IPPROTO_(RAW|TCP|ICMP|IP|UDP)|OOB\n |OPTION_(READ_(BUFFER|TIMEOUT)|BLOCKING|WRITE_BUFFER)|URL_STAT_(LINK|QUIET)|USE_PATH\n |PEEK|PF_(INET(6)?|UNIX)|ENFORCE_SAFE_MODE|FILTER_(ALL|READ|WRITE))\n|SUNFUNCS_RET_(DOUBLE|STRING|TIMESTAMP)\n|SQLITE_(READONLY|ROW|MISMATCH|MISUSE|BOTH|BUSY|SCHEMA|NOMEM|NOTFOUND|NOTADB|NOLFS|NUM|CORRUPT\n |CONSTRAINT|CANTOPEN|TOOBIG|INTERRUPT|INTERNAL|IOERR|OK|DONE|PROTOCOL|PERM|ERROR|EMPTY\n |FORMAT|FULL|LOCKED|ABORT|ASSOC|AUTH)\n|SQLITE3_(BOTH|BLOB|NUM|NULL|TEXT|INTEGER|OPEN_(READ(ONLY|WRITE)|CREATE)|FLOAT_ASSOC)\n|CURL(M_(BAD_((EASY)?HANDLE)|CALL_MULTI_PERFORM|INTERNAL_ERROR|OUT_OF_MEMORY|OK)\n |MSG_DONE|SSH_AUTH_(HOST|NONE|DEFAULT|PUBLICKEY|PASSWORD|KEYBOARD)\n |CLOSEPOLICY_(SLOWEST|CALLBACK|OLDEST|LEAST_(RECENTLY_USED|TRAFFIC)\n |INFO_(REDIRECT_(COUNT|TIME)|REQUEST_SIZE|SSL_VERIFYRESULT|STARTTRANSFER_TIME\n |(SIZE|SPEED)_(DOWNLOAD|UPLOAD)|HTTP_CODE|HEADER_(OUT|SIZE)|NAMELOOKUP_TIME\n |CONNECT_TIME|CONTENT_(TYPE|LENGTH_(DOWNLOAD|UPLOAD))|CERTINFO|TOTAL_TIME\n |PRIVATE|PRETRANSFER_TIME|EFFECTIVE_URL|FILETIME)\n |OPT_(RESUME_FROM|RETURNTRANSFER|REDIR_PROTOCOLS|REFERER|READ(DATA|FUNCTION)|RANGE|RANDOM_FILE\n |MAX(CONNECTS|REDIRS)|BINARYTRANSFER|BUFFERSIZE\n |SSH_(HOST_PUBLIC_KEY_MD5|(PRIVATE|PUBLIC)_KEYFILE)|AUTH_TYPES)\n |SSL(CERT(TYPE|PASSWD)?|ENGINE(_DEFAULT)?|VERSION|KEY(TYPE|PASSWD)?)\n |SSL_(CIPHER_LIST|VERIFY(HOST|PEER))\n |STDERR|HTTP(GET|HEADER|200ALIASES|_VERSION|PROXYTUNNEL|AUTH)\n |HEADER(FUNCTION)?|NO(BODY|SIGNAL|PROGRESS)|NETRC|CRLF|CONNECTTIMEOUT(_MS)?\n |COOKIE(SESSION|JAR|FILE)?|CUSTOMREQUEST|CERTINFO|CLOSEPOLICY|CA(INFO|PATH)|TRANSFERTEXT\n |TCP_NODELAY|TIME(CONDITION|OUT(_MS)?|VALUE)|INTERFACE|INFILE(SIZE)?|IPRESOLVE\n |DNS_(CACHE_TIMEOUT|USE_GLOBAL_CACHE)|URL|USER(AGENT|PWD)|UNRESTRICTED_AUTH|UPLOAD\n |PRIVATE|PROGRESSFUNCTION|PROXY(TYPE|USERPWD|PORT|AUTH)?|PROTOCOLS|PORT\n |POST(REDIR|QUOTE|FIELDS)?|PUT|EGDSOCKET|ENCODING|VERBOSE|KRB4LEVEL|KEYPASSWD|QUOTE|FRESH_CONNECT\n |FTP(APPEND|LISTONLY|PORT|SSLAUTH)\n |FTP_(SSL|SKIP_PASV_IP|CREATE_MISSING_DIRS|USE_EP(RT|SV)|FILEMETHOD)\n |FILE(TIME)?|FORBID_REUSE|FOLLOWLOCATION|FAILONERROR|WRITE(FUNCTION|HEADER)|LOW_SPEED_(LIMIT|TIME)\n |AUTOREFERER)\n |PROXY_(HTTP|SOCKS(4|5))|PROTO_(SCP|SFTP|HTTP(S)?|TELNET|TFTP|DICT|FTP(S)?|FILE|LDAP(S)?|ALL)\n |E_((RECV|READ)_ERROR|GOT_NOTHING|MALFORMAT_USER\n |BAD_(CONTENT_ENCODING|CALLING_ORDER|PASSWORD_ENTERED|FUNCTION_ARGUMENT)\n |SSH|SSL_(CIPHER|CONNECT_ERROR|CERTPROBLEM|CACERT|PEER_CERTIFICATE|ENGINE_(NOTFOUND|SETFAILED))\n |SHARE_IN_USE|SEND_ERROR|HTTP_(RANGE_ERROR|NOT_FOUND|PORT_FAILED|POST_ERROR)\n |COULDNT_(RESOLVE_(HOST|PROXY)|CONNECT)|TOO_MANY_REDIRECTS|TELNET_OPTION_SYNTAX|OBSOLETE\n |OUT_OF_MEMORY|OPERATION|TIMEOUTED|OK|URL_MALFORMAT(_USER)?|UNSUPPORTED_PROTOCOL\n |UNKNOWN_TELNET_OPTION|PARTIAL_FILE\n |FTP_(BAD_DOWNLOAD_RESUME|SSL_FAILED|COULDNT_(RETR_FILE|GET_SIZE|STOR_FILE|SET_(BINARY|ASCII)|USE_REST)\n |CANT_(GET_HOST|RECONNECT)|USER_PASSWORD_INCORRECT|PORT_FAILED|QUOTE_ERROR|WRITE_ERROR\n |WEIRD_((PASS|PASV|SERVER|USER)_REPLY|227_FORMAT)|ACCESS_DENIED)\n |FILESIZE_EXCEEDED|FILE_COULDNT_READ_FILE|FUNCTION_NOT_FOUND|FAILED_INIT|WRITE_ERROR|LIBRARY_NOT_FOUND\n |LDAP_(SEARCH_FAILED|CANNOT_BIND|INVALID_URL)|ABORTED_BY_CALLBACK)\n |VERSION_NOW\n |FTP(METHOD_(MULTI|SINGLE|NO)CWD|SSL_(ALL|NONE|CONTROL|TRY)|AUTH_(DEFAULT|SSL|TLS))\n |AUTH_(ANY(SAFE)?|BASIC|DIGEST|GSSNEGOTIATE|NTLM))\n|CURL_(HTTP_VERSION_(1_(0|1)|NONE)|NETRC_(REQUIRED|IGNORED|OPTIONAL)|TIMECOND_(IF(UN)?MODSINCE|LASTMOD)\n |IPRESOLVE_(V(4|6)|WHATEVER)|VERSION_(SSL|IPV6|KERBEROS4|LIBZ))\n|IMAGETYPE_(GIF|XBM|BMP|SWF|COUNT|TIFF_(MM|II)|ICO|IFF|UNKNOWN|JB2|JPX|JP2|JPC|JPEG(2000)?|PSD|PNG|WBMP)\n|INPUT_(REQUEST|GET|SERVER|SESSION|COOKIE|POST|ENV)|ICONV_(MIME_DECODE_(STRICT|CONTINUE_ON_ERROR)|IMPL|VERSION)\n|DNS_(MX|SRV|SOA|HINFO|NS|NAPTR|CNAME|TXT|PTR|ANY|ALL|AAAA|A(6)?)\n|DOM(STRING_SIZE_ERR)\n|DOM_((SYNTAX|HIERARCHY_REQUEST|NO_(MODIFICATION_ALLOWED|DATA_ALLOWED)|NOT_(FOUND|SUPPORTED)|NAMESPACE\n |INDEX_SIZE|USE_ATTRIBUTE|VALID_(MODIFICATION|STATE|CHARACTER|ACCESS)|PHP|VALIDATION|WRONG_DOCUMENT)_ERR)\n|JSON_(HEX_(TAG|QUOT|AMP|APOS)|NUMERIC_CHECK|ERROR_(SYNTAX|STATE_MISMATCH|NONE|CTRL_CHAR|DEPTH|UTF8)|FORCE_OBJECT)\n|PREG_((D_UTF8(_OFFSET)?|NO|INTERNAL|(BACKTRACK|RECURSION)_LIMIT)_ERROR|GREP_INVERT\n |SPLIT_(NO_EMPTY|(DELIM|OFFSET)_CAPTURE)|SET_ORDER|OFFSET_CAPTURE|PATTERN_ORDER)\n|PSFS_(PASS_ON|ERR_FATAL|FEED_ME|FLAG_(NORMAL|FLUSH_(CLOSE|INC)))\n|PCRE_VERSION|POSIX_((F|R|W|X)_OK|S_IF(REG|BLK|SOCK|CHR|IFO))\n|FNM_(NOESCAPE|CASEFOLD|PERIOD|PATHNAME)\n|FILTER_(REQUIRE_(SCALAR|ARRAY)|NULL_ON_FAILURE|CALLBACK|DEFAULT|UNSAFE_RAW\n |SANITIZE_(MAGIC_QUOTES|STRING|STRIPPED|SPECIAL_CHARS|NUMBER_(INT|FLOAT)|URL\n |EMAIL|ENCODED|FULL_SPCIAL_CHARS)\n |VALIDATE_(REGEXP|BOOLEAN|INT|IP|URL|EMAIL|FLOAT)\n |FORCE_ARRAY\n |FLAG_(SCHEME_REQUIRED|STRIP_(BACKTICK|HIGH|LOW)|HOST_REQUIRED|NONE|NO_(RES|PRIV)_RANGE|ENCODE_QUOTES\n |IPV(4|6)|PATH_REQUIRED|EMPTY_STRING_NULL|ENCODE_(HIGH|LOW|AMP)|QUERY_REQUIRED\n |ALLOW_(SCIENTIFIC|HEX|THOUSAND|OCTAL|FRACTION)))\n|FILE_(BINARY|SKIP_EMPTY_LINES|NO_DEFAULT_CONTEXT|TEXT|IGNORE_NEW_LINES|USE_INCLUDE_PATH|APPEND)\n|FILEINFO_(RAW|MIME(_(ENCODING|TYPE))?|SYMLINK|NONE|CONTINUE|DEVICES|PRESERVE_ATIME)\n|FORCE_(DEFLATE|GZIP)\n|LIBXML_(XINCLUDE|NSCLEAN|NO(XMLDECL|BLANKS|NET|CDATA|ERROR|EMPTYTAG|ENT|WARNING)\n |COMPACT|DTD(VALID|LOAD|ATTR)|((DOTTED|LOADED)_)?VERSION|PARSEHUGE|ERR_(NONE|ERROR|FATAL|WARNING)))\n\\b", + "name": "support.constant.ext.php", + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + } + }, + { + "match": "(?x)\n(\\\\)?\\b\n(T_(RETURN|REQUIRE(_ONCE)?|GOTO|GLOBAL|(MINUS|MOD|MUL|XOR)_EQUAL|METHOD_C|ML_COMMENT|BREAK\n |BOOL_CAST|BOOLEAN_(AND|OR)|BAD_CHARACTER|SR(_EQUAL)?|STRING(_CAST|VARNAME)?|START_HEREDOC|STATIC\n |SWITCH|SL(_EQUAL)?|HALT_COMPILER|NS_(C|SEPARATOR)|NUM_STRING|NEW|NAMESPACE|CHARACTER|COMMENT\n |CONSTANT(_ENCAPSED_STRING)?|CONCAT_EQUAL|CONTINUE|CURLY_OPEN|CLOSE_TAG|CLONE|CLASS(_C)?\n |CASE|CATCH|TRY|THROW|IMPLEMENTS|ISSET|IS_((GREATER|SMALLER)_OR_EQUAL|(NOT_)?(IDENTICAL|EQUAL))\n |INSTANCEOF|INCLUDE(_ONCE)?|INC|INT_CAST|INTERFACE|INLINE_HTML|IF|OR_EQUAL|OBJECT_(CAST|OPERATOR)\n |OPEN_TAG(_WITH_ECHO)?|OLD_FUNCTION|DNUMBER|DIR|DIV_EQUAL|DOC_COMMENT|DOUBLE_(ARROW|CAST|COLON)\n |DOLLAR_OPEN_CURLY_BRACES|DO|DEC|DECLARE|DEFAULT|USE|UNSET(_CAST)?|PRINT|PRIVATE|PROTECTED|PUBLIC\n |PLUS_EQUAL|PAAMAYIM_NEKUDOTAYIM|EXTENDS|EXIT|EMPTY|ENCAPSED_AND_WHITESPACE\n |END(SWITCH|IF|DECLARE|FOR(EACH)?|WHILE)|END_HEREDOC|ECHO|EVAL|ELSE(IF)?|VAR(IABLE)?|FINAL|FILE\n |FOR(EACH)?|FUNC_C|FUNCTION|WHITESPACE|WHILE|LNUMBER|LIST|LINE|LOGICAL_(AND|OR|XOR)\n |ARRAY_(CAST)?|ABSTRACT|AS|AND_EQUAL))\n\\b", + "name": "support.constant.parser-token.php", + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + } + }, + { + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "name": "constant.other.php" + } + ] + }, + "function-parameters": { + "patterns": [ + { + "include": "#comments" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.php" + }, + { + "begin": "(?xi)\n(array) # Typehint\n\\s+((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference\n\\s*(=)\\s*(array)\\s*(\\() # Default value", + "beginCaptures": { + "1": { + "name": "storage.type.php" + }, + "2": { + "name": "variable.other.php" + }, + "3": { + "name": "storage.modifier.reference.php" + }, + "4": { + "name": "punctuation.definition.variable.php" + }, + "5": { + "name": "keyword.operator.assignment.php" + }, + "6": { + "name": "support.function.construct.php" + }, + "7": { + "name": "punctuation.definition.array.begin.bracket.round.php" + } + }, + "contentName": "meta.array.php", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.bracket.round.php" + } + }, + "name": "meta.function.parameter.array.php", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#strings" + }, + { + "include": "#numbers" + } + ] + }, + { + "match": "(?xi)\n(array|callable) # Typehint\n\\s+((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference\n(?: # Optional default value\n \\s*(=)\\s*\n (?:\n (null)\n |\n (\\[)((?>[^\\[\\]]+|\\[\\g<8>\\])*)(\\])\n |((?:\\S*?\\(\\))|(?:\\S*?))\n )\n)?\n\\s*(?=,|\\)|/[/*]|\\#|$) # A closing parentheses (end of argument list) or a comma or a comment", + "name": "meta.function.parameter.array.php", + "captures": { + "1": { + "name": "storage.type.php" + }, + "2": { + "name": "variable.other.php" + }, + "3": { + "name": "storage.modifier.reference.php" + }, + "4": { + "name": "punctuation.definition.variable.php" + }, + "5": { + "name": "keyword.operator.assignment.php" + }, + "6": { + "name": "constant.language.php" + }, + "7": { + "name": "punctuation.section.array.begin.php" + }, + "8": { + "patterns": [ + { + "include": "#parameter-default-types" + } + ] + }, + "9": { + "name": "punctuation.section.array.end.php" + }, + "10": { + "name": "invalid.illegal.non-null-typehinted.php" + } + } + }, + { + "begin": "(?xi)\n(\\\\?(?:[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\\\)*) # Optional namespace\n([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Typehinted class name\n\\s+((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference", + "beginCaptures": { + "1": { + "name": "support.other.namespace.php", + "patterns": [ + { + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "name": "storage.type.php" + }, + { + "match": "\\\\", + "name": "punctuation.separator.inheritance.php" + } + ] + }, + "2": { + "name": "storage.type.php" + }, + "3": { + "name": "variable.other.php" + }, + "4": { + "name": "storage.modifier.reference.php" + }, + "5": { + "name": "keyword.operator.variadic.php" + }, + "6": { + "name": "punctuation.definition.variable.php" + } + }, + "end": "(?=,|\\)|/[/*]|\\#)", + "name": "meta.function.parameter.typehinted.php", + "patterns": [ + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "keyword.operator.assignment.php" + } + }, + "end": "(?=,|\\)|/[/*]|\\#)", + "patterns": [ + { + "include": "#language" + } + ] + } + ] + }, + { + "captures": { + "1": { + "name": "variable.other.php" + }, + "2": { + "name": "storage.modifier.reference.php" + }, + "3": { + "name": "keyword.operator.variadic.php" + }, + "4": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(?xi)\n((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference\n\\s*(?=,|\\)|/[/*]|\\#|$) # A closing parentheses (end of argument list) or a comma or a comment", + "name": "meta.function.parameter.no-default.php" + }, + { + "begin": "(?xi)\n((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference\n\\s*(=)\\s*\n(?:(\\[)((?>[^\\[\\]]+|\\[\\g<6>\\])*)(\\]))? # Optional default type", + "beginCaptures": { + "1": { + "name": "variable.other.php" + }, + "2": { + "name": "storage.modifier.reference.php" + }, + "3": { + "name": "keyword.operator.variadic.php" + }, + "4": { + "name": "punctuation.definition.variable.php" + }, + "5": { + "name": "keyword.operator.assignment.php" + }, + "6": { + "name": "punctuation.section.array.begin.php" + }, + "7": { + "patterns": [ + { + "include": "#parameter-default-types" + } + ] + }, + "8": { + "name": "punctuation.section.array.end.php" + } + }, + "end": "(?=,|\\)|/[/*]|\\#)", + "name": "meta.function.parameter.default.php", + "patterns": [ + { + "include": "#parameter-default-types" + } + ] + } + ] + }, + "function-call": { + "patterns": [ + { + "begin": "(?xi)\n(\n \\\\?\\b # Optional root namespace\n [a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]* # First namespace\n (?:\\\\[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)+ # Additional namespaces\n)\\s*(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#namespace" + }, + { + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "name": "entity.name.function.php" + } + ] + }, + "2": { + "name": "punctuation.definition.arguments.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.bracket.round.php" + } + }, + "name": "meta.function-call.php", + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "begin": "(?i)(\\\\)?\\b([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#namespace" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#support" + }, + { + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "name": "entity.name.function.php" + } + ] + }, + "3": { + "name": "punctuation.definition.arguments.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.bracket.round.php" + } + }, + "name": "meta.function-call.php", + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "match": "(?i)\\b(print|echo)\\b", + "name": "support.function.construct.output.php" + } + ] + }, + "heredoc": { + "patterns": [ + { + "begin": "(?i)(?=<<<\\s*(\"?)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)(\\1)\\s*$)", + "end": "(?!\\G)", + "name": "string.unquoted.heredoc.php", + "patterns": [ + { + "include": "#heredoc_interior" + } + ] + }, + { + "begin": "(?=<<<\\s*'([a-zA-Z_]+[a-zA-Z0-9_]*)'\\s*$)", + "end": "(?!\\G)", + "name": "string.unquoted.nowdoc.php", + "patterns": [ + { + "include": "#nowdoc_interior" + } + ] + } + ] + }, + "heredoc_interior": { + "patterns": [ + { + "begin": "(<<<)\\s*(\"?)(HTML)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.html", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.html", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "text.html.basic" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(XML)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.xml", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.xml", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "text.xml" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(SQL)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.sql", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.sql", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "source.sql" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(JAVASCRIPT|JS)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.js", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.js", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "source.js" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(JSON)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.json", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.json", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "source.json" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(CSS)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.css", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.css", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "source.css" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(REGEXP?)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "string.regexp.heredoc.php", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "(\\\\){1,2}[.$^\\[\\]{}]", + "name": "constant.character.escape.regex.php" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.arbitrary-repitition.php" + }, + "3": { + "name": "punctuation.definition.arbitrary-repitition.php" + } + }, + "match": "({)\\d+(,\\d+)?(})", + "name": "string.regexp.arbitrary-repitition.php" + }, + { + "begin": "\\[(?:\\^?\\])?", + "captures": { + "0": { + "name": "punctuation.definition.character-class.php" + } + }, + "end": "\\]", + "name": "string.regexp.character-class.php", + "patterns": [ + { + "match": "\\\\[\\\\'\\[\\]]", + "name": "constant.character.escape.php" + } + ] + }, + { + "match": "[$^+*]", + "name": "keyword.operator.regexp.php" + }, + { + "begin": "(?i)(?<=^|\\s)(#)\\s(?=[[a-z0-9_\\x{7f}-\\x{ff},. \\t?!-][^\\x{00}-\\x{7f}]]*$)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.php" + } + }, + "end": "$", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.php" + } + }, + "name": "comment.line.number-sign.php" + } + ] + }, + { + "begin": "(?i)(<<<)\\s*(\"?)([a-z_\\x{7f}-\\x{ff}]+[a-z0-9_\\x{7f}-\\x{ff}]*)(\\2)(\\s*)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "end": "^(\\3)\\b", + "endCaptures": { + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "patterns": [ + { + "include": "#interpolation" + } + ] + } + ] + }, + "nowdoc_interior": { + "patterns": [ + { + "begin": "(<<<)\\s*'(HTML)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.html", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.html", + "patterns": [ + { + "include": "text.html.basic" + } + ] + }, + { + "begin": "(<<<)\\s*'(XML)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.xml", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.xml", + "patterns": [ + { + "include": "text.xml" + } + ] + }, + { + "begin": "(<<<)\\s*'(SQL)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.sql", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.sql", + "patterns": [ + { + "include": "source.sql" + } + ] + }, + { + "begin": "(<<<)\\s*'(JAVASCRIPT|JS)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.js", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.js", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "begin": "(<<<)\\s*'(JSON)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.json", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.json", + "patterns": [ + { + "include": "source.json" + } + ] + }, + { + "begin": "(<<<)\\s*'(CSS)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.css", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.css", + "patterns": [ + { + "include": "source.css" + } + ] + }, + { + "begin": "(<<<)\\s*'(REGEXP?)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "string.regexp.nowdoc.php", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "patterns": [ + { + "match": "(\\\\){1,2}[.$^\\[\\]{}]", + "name": "constant.character.escape.regex.php" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.arbitrary-repitition.php" + }, + "3": { + "name": "punctuation.definition.arbitrary-repitition.php" + } + }, + "match": "({)\\d+(,\\d+)?(})", + "name": "string.regexp.arbitrary-repitition.php" + }, + { + "begin": "\\[(?:\\^?\\])?", + "captures": { + "0": { + "name": "punctuation.definition.character-class.php" + } + }, + "end": "\\]", + "name": "string.regexp.character-class.php", + "patterns": [ + { + "match": "\\\\[\\\\'\\[\\]]", + "name": "constant.character.escape.php" + } + ] + }, + { + "match": "[$^+*]", + "name": "keyword.operator.regexp.php" + }, + { + "begin": "(?i)(?<=^|\\s)(#)\\s(?=[[a-z0-9_\\x{7f}-\\x{ff},. \\t?!-][^\\x{00}-\\x{7f}]]*$)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.php" + } + }, + "end": "$", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.php" + } + }, + "name": "comment.line.number-sign.php" + } + ] + }, + { + "begin": "(?i)(<<<)\\s*'([a-z_\\x{7f}-\\x{ff}]+[a-z0-9_\\x{7f}-\\x{ff}]*)'(\\s*)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "end": "^(\\2)\\b", + "endCaptures": { + "1": { + "name": "keyword.operator.nowdoc.php" + } + } + } + ] + }, + "instantiation": { + "begin": "(?i)(new)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.other.new.php" + } + }, + "end": "(?i)(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", + "patterns": [ + { + "match": "(?i)(parent|static|self)(?![a-z0-9_\\x{7f}-\\x{ff}])", + "name": "storage.type.php" + }, + { + "include": "#class-name" + }, + { + "include": "#variable-name" + } + ] + }, + "interpolation": { + "patterns": [ + { + "match": "\\\\[0-7]{1,3}", + "name": "constant.character.escape.octal.php" + }, + { + "match": "\\\\x[0-9A-Fa-f]{1,2}", + "name": "constant.character.escape.hex.php" + }, + { + "match": "\\\\u{[0-9A-Fa-f]+}", + "name": "constant.character.escape.unicode.php" + }, + { + "match": "\\\\[nrtvef$\"\\\\]", + "name": "constant.character.escape.php" + }, + { + "begin": "{(?=\\$.*?})", + "beginCaptures": { + "0": { + "name": "punctuation.definition.variable.php" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.variable.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "include": "#variable-name" + } + ] + }, + "invoke-call": { + "captures": { + "1": { + "name": "punctuation.definition.variable.php" + }, + "2": { + "name": "variable.other.php" + } + }, + "match": "(?i)(\\$+)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)(?=\\s*\\()", + "name": "meta.function-call.invoke.php" + }, + "language": { + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "(?i)^\\s*(interface)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(extends)?\\s*", + "beginCaptures": { + "1": { + "name": "storage.type.interface.php" + }, + "2": { + "name": "entity.name.type.interface.php" + }, + "3": { + "name": "storage.modifier.extends.php" + } + }, + "end": "(?i)((?:[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\s*,\\s*)*)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?\\s*(?:(?={)|$)", + "endCaptures": { + "1": { + "patterns": [ + { + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "name": "entity.other.inherited-class.php" + }, + { + "match": ",", + "name": "punctuation.separator.classes.php" + } + ] + }, + "2": { + "name": "entity.other.inherited-class.php" + } + }, + "name": "meta.interface.php", + "patterns": [ + { + "include": "#namespace" + } + ] + }, + { + "begin": "(?i)^\\s*(trait)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)", + "beginCaptures": { + "1": { + "name": "storage.type.trait.php" + }, + "2": { + "name": "entity.name.type.trait.php" + } + }, + "end": "(?={)", + "name": "meta.trait.php", + "patterns": [ + { + "include": "#comments" + } + ] + }, + { + "match": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\s+([a-z0-9_\\x{7f}-\\x{ff}\\\\]+)(?=\\s*;)", + "name": "meta.namespace.php", + "captures": { + "1": { + "name": "keyword.other.namespace.php" + }, + "2": { + "name": "entity.name.type.namespace.php", + "patterns": [ + { + "match": "\\\\", + "name": "punctuation.separator.inheritance.php" + } + ] + } + } + }, + { + "begin": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.other.namespace.php" + } + }, + "end": "(?<=})|(?=\\?>)", + "name": "meta.namespace.php", + "patterns": [ + { + "include": "#comments" + }, + { + "match": "(?i)[a-z0-9_\\x{7f}-\\x{ff}\\\\]+", + "name": "entity.name.type.namespace.php", + "captures": { + "0": { + "patterns": [ + { + "match": "\\\\", + "name": "punctuation.separator.inheritance.php" + } + ] + } + } + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.namespace.begin.bracket.curly.php" + } + }, + "end": "}|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.namespace.end.bracket.curly.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "match": "[^\\s]+", + "name": "invalid.illegal.identifier.php" + } + ] + }, + { + "match": "\\s+(?=use\\b)" + }, + { + "begin": "(?i)\\buse\\b", + "beginCaptures": { + "0": { + "name": "keyword.other.use.php" + } + }, + "end": "(?<=})|(?=;)", + "name": "meta.use.php", + "patterns": [ + { + "match": "\\b(const|function)\\b", + "name": "storage.type.${1:/downcase}.php" + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.use.begin.bracket.curly.php" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.use.end.bracket.curly.php" + } + }, + "patterns": [ + { + "include": "#scope-resolution" + }, + { + "match": "(?xi)\n\\b(as)\n\\s+(final|abstract|public|private|protected|static)\n\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n\\b", + "captures": { + "1": { + "name": "keyword.other.use-as.php" + }, + "2": { + "name": "storage.modifier.php" + }, + "3": { + "name": "entity.other.alias.php" + } + } + }, + { + "match": "(?xi)\n\\b(as)\n\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n\\b", + "captures": { + "1": { + "name": "keyword.other.use-as.php" + }, + "2": { + "patterns": [ + { + "match": "^(?:final|abstract|public|private|protected|static)$", + "name": "storage.modifier.php" + }, + { + "match": ".+", + "name": "entity.other.alias.php" + } + ] + } + } + }, + { + "match": "(?i)\\b(insteadof)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)", + "captures": { + "1": { + "name": "keyword.other.use-insteadof.php" + }, + "2": { + "name": "support.class.php" + } + } + }, + { + "match": ";", + "name": "punctuation.terminator.expression.php" + }, + { + "include": "#use-inner" + } + ] + }, + { + "include": "#use-inner" + } + ] + }, + { + "begin": "(?i)^\\s*(?:(abstract|final)\\s+)?(class)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)", + "beginCaptures": { + "1": { + "name": "storage.modifier.${1:/downcase}.php" + }, + "2": { + "name": "storage.type.class.php" + }, + "3": { + "name": "entity.name.type.class.php" + } + }, + "end": "}|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.class.end.bracket.curly.php" + } + }, + "name": "meta.class.php", + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "(?i)(extends)\\s+", + "beginCaptures": { + "1": { + "name": "storage.modifier.extends.php" + } + }, + "contentName": "meta.other.inherited-class.php", + "end": "(?i)(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", + "patterns": [ + { + "begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\\\)", + "end": "(?i)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", + "endCaptures": { + "1": { + "name": "entity.other.inherited-class.php" + } + }, + "patterns": [ + { + "include": "#namespace" + } + ] + }, + { + "include": "#class-builtin" + }, + { + "include": "#namespace" + }, + { + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "name": "entity.other.inherited-class.php" + } + ] + }, + { + "begin": "(?i)(implements)\\s+", + "beginCaptures": { + "1": { + "name": "storage.modifier.implements.php" + } + }, + "end": "(?i)(?=[;{])", + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "(?i)(?=[a-z0-9_\\x{7f}-\\x{ff}\\\\]+)", + "contentName": "meta.other.inherited-class.php", + "end": "(?i)(?:\\s*(?:,|(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\\\s]))\\s*)", + "patterns": [ + { + "begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\\\)", + "end": "(?i)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", + "endCaptures": { + "1": { + "name": "entity.other.inherited-class.php" + } + }, + "patterns": [ + { + "include": "#namespace" + } + ] + }, + { + "include": "#class-builtin" + }, + { + "include": "#namespace" + }, + { + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "name": "entity.other.inherited-class.php" + } + ] + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.class.begin.bracket.curly.php" + } + }, + "end": "(?=}|\\?>)", + "contentName": "meta.class.body.php", + "patterns": [ + { + "include": "#language" + } + ] + } + ] + }, + { + "include": "#switch_statement" + }, + { + "match": "(?x)\n\\s*\n\\b(\n break|case|continue|declare|default|die|do|\n else(if)?|end(declare|for(each)?|if|switch|while)|exit|\n for(each)?|if|return|switch|use|while|yield\n)\\b", + "captures": { + "1": { + "name": "keyword.control.${1:/downcase}.php" + } + } + }, + { + "begin": "(?i)\\b((?:require|include)(?:_once)?)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.control.import.include.php" + } + }, + "end": "(?=\\s|;|$|\\?>)", + "name": "meta.include.php", + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "begin": "\\b(catch)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.control.exception.catch.php" + }, + "2": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.php" + } + }, + "name": "meta.catch.php", + "patterns": [ + { + "include": "#namespace" + }, + { + "match": "(?xi)\n([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Exception class\n((?:\\s*\\|\\s*[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)*) # Optional additional exception classes\n\\s*\n((\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable", + "captures": { + "1": { + "name": "support.class.exception.php" + }, + "2": { + "patterns": [ + { + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "name": "support.class.exception.php" + }, + { + "match": "\\|", + "name": "punctuation.separator.delimiter.php" + } + ] + }, + "3": { + "name": "variable.other.php" + }, + "4": { + "name": "punctuation.definition.variable.php" + } + } + } + ] + }, + { + "match": "\\b(catch|try|throw|exception|finally)\\b", + "name": "keyword.control.exception.php" + }, + { + "begin": "(?i)\\b(function)\\s*(?=\\()", + "beginCaptures": { + "1": { + "name": "storage.type.function.php" + } + }, + "end": "(?={)", + "name": "meta.function.closure.php", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" + } + }, + "contentName": "meta.function.parameters.php", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.php" + } + }, + "patterns": [ + { + "include": "#function-parameters" + } + ] + }, + { + "begin": "(?i)(use)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.function.use.php" + }, + "2": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.php" + } + }, + "patterns": [ + { + "captures": { + "1": { + "name": "variable.other.php" + }, + "2": { + "name": "storage.modifier.reference.php" + }, + "3": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(?i)((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(?=,|\\))", + "name": "meta.function.closure.use.php" + } + ] + } + ] + }, + { + "begin": "(?x)\n((?:(?:final|abstract|public|private|protected|static)\\s+)*)\n(function)\\s+\n(?i:\n (__(?:call|construct|debugInfo|destruct|get|set|isset|unset|tostring|\n clone|set_state|sleep|wakeup|autoload|invoke|callStatic))\n |([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n)\n\\s*(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "match": "final|abstract|public|private|protected|static", + "name": "storage.modifier.php" + } + ] + }, + "2": { + "name": "storage.type.function.php" + }, + "3": { + "name": "support.function.magic.php" + }, + "4": { + "name": "entity.name.function.php" + }, + "5": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" + } + }, + "contentName": "meta.function.parameters.php", + "end": "(\\))(?:\\s*(:)\\s*([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*))?", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.bracket.round.php" + }, + "2": { + "name": "keyword.operator.return-value.php" + }, + "3": { + "name": "storage.type.php" + } + }, + "name": "meta.function.php", + "patterns": [ + { + "include": "#function-parameters" + } + ] + }, + { + "include": "#invoke-call" + }, + { + "include": "#scope-resolution" + }, + { + "include": "#variables" + }, + { + "include": "#strings" + }, + { + "captures": { + "1": { + "name": "support.function.construct.php" + }, + "2": { + "name": "punctuation.definition.array.begin.bracket.round.php" + }, + "3": { + "name": "punctuation.definition.array.end.bracket.round.php" + } + }, + "match": "(array)(\\()(\\))", + "name": "meta.array.empty.php" + }, + { + "begin": "(array)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.construct.php" + }, + "2": { + "name": "punctuation.definition.array.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.bracket.round.php" + } + }, + "name": "meta.array.php", + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "match": "(?i)(\\()\\s*(array|real|double|float|int(?:eger)?|bool(?:ean)?|string|object|binary|unset)\\s*(\\))", + "captures": { + "1": { + "name": "punctuation.definition.storage-type.begin.bracket.round.php" + }, + "2": { + "name": "storage.type.php" + }, + "3": { + "name": "punctuation.definition.storage-type.end.bracket.round.php" + } + } + }, + { + "match": "(?i)\\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|var|function|interface|trait|parent|self|object)\\b", + "name": "storage.type.php" + }, + { + "match": "(?i)\\b(global|abstract|const|extends|implements|final|private|protected|public|static)\\b", + "name": "storage.modifier.php" + }, + { + "include": "#object" + }, + { + "match": ";", + "name": "punctuation.terminator.expression.php" + }, + { + "match": ":", + "name": "punctuation.terminator.statement.php" + }, + { + "include": "#heredoc" + }, + { + "include": "#numbers" + }, + { + "match": "(?i)\\bclone\\b", + "name": "keyword.other.clone.php" + }, + { + "match": "\\.=?", + "name": "keyword.operator.string.php" + }, + { + "match": "=>", + "name": "keyword.operator.key.php" + }, + { + "captures": { + "1": { + "name": "keyword.operator.assignment.php" + }, + "2": { + "name": "storage.modifier.reference.php" + }, + "3": { + "name": "storage.modifier.reference.php" + } + }, + "match": "(?i)(\\=)(&)|(&)(?=[$a-z_])" + }, + { + "match": "@", + "name": "keyword.operator.error-control.php" + }, + { + "match": "===|==|!==|!=|<>", + "name": "keyword.operator.comparison.php" + }, + { + "match": "=|\\+=|\\-=|\\*=|/=|%=|&=|\\|=|\\^=|<<=|>>=", + "name": "keyword.operator.assignment.php" + }, + { + "match": "<=>|<=|>=|<|>", + "name": "keyword.operator.comparison.php" + }, + { + "match": "\\-\\-|\\+\\+", + "name": "keyword.operator.increment-decrement.php" + }, + { + "match": "\\-|\\+|\\*|/|%", + "name": "keyword.operator.arithmetic.php" + }, + { + "match": "(?i)(!|&&|\\|\\|)|\\b(and|or|xor|as)\\b", + "name": "keyword.operator.logical.php" + }, + { + "include": "#function-call" + }, + { + "match": "<<|>>|~|\\^|&|\\|", + "name": "keyword.operator.bitwise.php" + }, + { + "begin": "(?i)\\b(instanceof)\\s+(?=[\\\\$a-z_])", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.php" + } + }, + "end": "(?=[^\\\\$a-z0-9_\\x{7f}-\\x{ff}])", + "patterns": [ + { + "include": "#class-name" + }, + { + "include": "#variable-name" + } + ] + }, + { + "include": "#instantiation" + }, + { + "captures": { + "1": { + "name": "keyword.control.goto.php" + }, + "2": { + "name": "support.other.php" + } + }, + "match": "(?i)(goto)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)" + }, + { + "captures": { + "1": { + "name": "entity.name.goto-label.php" + } + }, + "match": "(?i)^\\s*([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*:(?!:)" + }, + { + "include": "#string-backtick" + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.begin.bracket.curly.php" + } + }, + "end": "}|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.end.bracket.curly.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.php" + } + }, + "end": "\\]|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.end.bracket.round.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "include": "#constants" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.php" + } + ] + }, + "namespace": { + "begin": "(?i)(?:(namespace)|[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?(\\\\)(?=.*?[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", + "beginCaptures": { + "1": { + "name": "variable.language.namespace.php" + }, + "2": { + "name": "punctuation.separator.inheritance.php" + } + }, + "end": "(?i)(?=[a-z0-9_\\x{7f}-\\x{ff}]*[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", + "name": "support.other.namespace.php", + "patterns": [ + { + "match": "\\\\", + "name": "punctuation.separator.inheritance.php" + } + ] + }, + "numbers": { + "patterns": [ + { + "match": "0[xX][0-9a-fA-F]+", + "name": "constant.numeric.hex.php" + }, + { + "match": "0[bB][01]+", + "name": "constant.numeric.binary.php" + }, + { + "match": "0[0-7]+", + "name": "constant.numeric.octal.php" + }, + { + "match": "(?x)\n(?:\n [0-9]*(\\.)[0-9]+(?:[eE][+-]?[0-9]+)?|\n [0-9]+(\\.)[0-9]*(?:[eE][+-]?[0-9]+)?|\n [0-9]+[eE][+-]?[0-9]+\n)", + "name": "constant.numeric.decimal.php", + "captures": { + "1": { + "name": "punctuation.separator.decimal.period.php" + }, + "2": { + "name": "punctuation.separator.decimal.period.php" + } + } + }, + { + "match": "0|[1-9][0-9]*", + "name": "constant.numeric.decimal.php" + } + ] + }, + "object": { + "patterns": [ + { + "begin": "(->)(\\$?{)", + "beginCaptures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "punctuation.definition.variable.php" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.variable.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "begin": "(?i)(->)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "entity.name.function.php" + }, + "3": { + "name": "punctuation.definition.arguments.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.bracket.round.php" + } + }, + "name": "meta.method-call.php", + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "variable.other.property.php" + }, + "3": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(?i)(->)((\\$+)?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?" + } + ] + }, + "parameter-default-types": { + "patterns": [ + { + "include": "#strings" + }, + { + "include": "#numbers" + }, + { + "include": "#string-backtick" + }, + { + "include": "#variables" + }, + { + "match": "=>", + "name": "keyword.operator.key.php" + }, + { + "match": "=", + "name": "keyword.operator.assignment.php" + }, + { + "match": "&(?=\\s*\\$)", + "name": "storage.modifier.reference.php" + }, + { + "begin": "(array)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "support.function.construct.php" + }, + "2": { + "name": "punctuation.definition.array.begin.bracket.round.php" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.bracket.round.php" + } + }, + "name": "meta.array.php", + "patterns": [ + { + "include": "#parameter-default-types" + } + ] + }, + { + "include": "#instantiation" + }, + { + "begin": "(?xi)\n(?=[a-z0-9_\\x{7f}-\\x{ff}\\\\]+(::)\n ([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?\n)", + "end": "(?i)(::)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?", + "endCaptures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "constant.other.class.php" + } + }, + "patterns": [ + { + "include": "#class-name" + } + ] + }, + { + "include": "#constants" + } + ] + }, + "php_doc": { + "patterns": [ + { + "match": "^(?!\\s*\\*).*?(?:(?=\\*\\/)|$\\n?)", + "name": "invalid.illegal.missing-asterisk.phpdoc.php" + }, + { + "captures": { + "1": { + "name": "keyword.other.phpdoc.php" + }, + "3": { + "name": "storage.modifier.php" + }, + "4": { + "name": "invalid.illegal.wrong-access-type.phpdoc.php" + } + }, + "match": "^\\s*\\*\\s*(@access)\\s+((public|private|protected)|(.+))\\s*$" + }, + { + "captures": { + "1": { + "name": "keyword.other.phpdoc.php" + }, + "2": { + "name": "markup.underline.link.php" + } + }, + "match": "(@xlink)\\s+(.+)\\s*$" + }, + { + "begin": "(@(?:global|param|property(-(read|write))?|return|throws|var))\\s+(?=[A-Za-z_\\x{7f}-\\x{ff}\\\\]|\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.phpdoc.php" + } + }, + "end": "(?=\\s|\\*/)", + "contentName": "meta.other.type.phpdoc.php", + "patterns": [ + { + "include": "#php_doc_types_array_multiple" + }, + { + "include": "#php_doc_types_array_single" + }, + { + "include": "#php_doc_types" + } + ] + }, + { + "match": "(?x)\n@\n(\n api|abstract|author|category|copyright|example|global|inherit[Dd]oc|internal|\n license|link|method|property(-(read|write))?|package|param|return|see|since|source|\n static|subpackage|throws|todo|var|version|uses|deprecated|final|ignore\n)\\b", + "name": "keyword.other.phpdoc.php" + }, + { + "captures": { + "1": { + "name": "keyword.other.phpdoc.php" + } + }, + "match": "{(@(link|inherit[Dd]oc)).+?}", + "name": "meta.tag.inline.phpdoc.php" + } + ] + }, + "php_doc_types": { + "match": "(?i)[a-z_\\x{7f}-\\x{ff}\\\\][a-z0-9_\\x{7f}-\\x{ff}\\\\]*(\\|[a-z_\\x{7f}-\\x{ff}\\\\][a-z0-9_\\x{7f}-\\x{ff}\\\\]*)*", + "captures": { + "0": { + "patterns": [ + { + "match": "(?x)\\b\n(string|integer|int|boolean|bool|float|double|object|mixed\n|array|resource|void|null|callback|false|true|self)\\b", + "name": "keyword.other.type.php" + }, + { + "include": "#class-name" + }, + { + "match": "\\|", + "name": "punctuation.separator.delimiter.php" + } + ] + } + } + }, + "php_doc_types_array_multiple": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.type.begin.bracket.round.phpdoc.php" + } + }, + "end": "(\\))(\\[\\])|(?=\\*/)", + "endCaptures": { + "1": { + "name": "punctuation.definition.type.end.bracket.round.phpdoc.php" + }, + "2": { + "name": "keyword.other.array.phpdoc.php" + } + }, + "patterns": [ + { + "include": "#php_doc_types_array_multiple" + }, + { + "include": "#php_doc_types_array_single" + }, + { + "include": "#php_doc_types" + }, + { + "match": "\\|", + "name": "punctuation.separator.delimiter.php" + } + ] + }, + "php_doc_types_array_single": { + "match": "(?i)([a-z_\\x{7f}-\\x{ff}\\\\][a-z0-9_\\x{7f}-\\x{ff}\\\\]*)(\\[\\])", + "captures": { + "1": { + "patterns": [ + { + "include": "#php_doc_types" + } + ] + }, + "2": { + "name": "keyword.other.array.phpdoc.php" + } + } + }, + "regex-double-quoted": { + "begin": "\"/(?=(\\\\.|[^\"/])++/[imsxeADSUXu]*\")", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "end": "(/)([imsxeADSUXu]*)(\")", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.regexp.double-quoted.php", + "patterns": [ + { + "match": "(\\\\){1,2}[.$^\\[\\]{}]", + "name": "constant.character.escape.regex.php" + }, + { + "include": "#interpolation" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.arbitrary-repetition.php" + }, + "3": { + "name": "punctuation.definition.arbitrary-repetition.php" + } + }, + "match": "({)\\d+(,\\d+)?(})", + "name": "string.regexp.arbitrary-repetition.php" + }, + { + "begin": "\\[(?:\\^?\\])?", + "captures": { + "0": { + "name": "punctuation.definition.character-class.php" + } + }, + "end": "\\]", + "name": "string.regexp.character-class.php", + "patterns": [ + { + "include": "#interpolation" + } + ] + }, + { + "match": "[$^+*]", + "name": "keyword.operator.regexp.php" + } + ] + }, + "regex-single-quoted": { + "begin": "'/(?=(\\\\(?:\\\\(?:\\\\[\\\\']?|[^'])|.)|[^'/])++/[imsxeADSUXu]*')", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "end": "(/)([imsxeADSUXu]*)(')", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.regexp.single-quoted.php", + "patterns": [ + { + "include": "#single_quote_regex_escape" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.arbitrary-repetition.php" + }, + "3": { + "name": "punctuation.definition.arbitrary-repetition.php" + } + }, + "match": "({)\\d+(,\\d+)?(})", + "name": "string.regexp.arbitrary-repetition.php" + }, + { + "begin": "\\[(?:\\^?\\])?", + "captures": { + "0": { + "name": "punctuation.definition.character-class.php" + } + }, + "end": "\\]", + "name": "string.regexp.character-class.php" + }, + { + "match": "[$^+*]", + "name": "keyword.operator.regexp.php" + } + ] + }, + "scope-resolution": { + "patterns": [ + { + "match": "(?i)\\b([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)(?=\\s*::)", + "captures": { + "1": { + "patterns": [ + { + "match": "\\b(self|static|parent)\\b", + "name": "storage.type.php" + }, + { + "match": "\\w+", + "name": "entity.name.class.php" + }, + { + "include": "#class-name" + }, + { + "include": "#variable-name" + } + ] + } + } + }, + { + "begin": "(?i)(::)\\s*([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "entity.name.function.php" + }, + "3": { + "name": "punctuation.definition.arguments.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.bracket.round.php" + } + }, + "name": "meta.method-call.static.php", + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "match": "(?i)(::)\\s*(class)\\b", + "captures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "keyword.other.class.php" + } + } + }, + { + "match": "(?xi)\n(::)\\s*\n(?:\n ((\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable\n |\n ([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Constant\n)?", + "captures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "variable.other.class.php" + }, + "3": { + "name": "punctuation.definition.variable.php" + }, + "4": { + "name": "constant.other.class.php" + } + } + } + ] + }, + "single_quote_regex_escape": { + "match": "\\\\(?:\\\\(?:\\\\[\\\\']?|[^'])|.)", + "name": "constant.character.escape.php" + }, + "sql-string-double-quoted": { + "begin": "\"\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|AND)\\b)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "contentName": "source.sql.embedded.php", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.quoted.double.sql.php", + "patterns": [ + { + "match": "(#)(\\\\\"|[^\"])*(?=\"|$)", + "name": "comment.line.number-sign.sql", + "captures": { + "1": { + "name": "punctuation.definition.comment.sql" + } + } + }, + { + "match": "(--)(\\\\\"|[^\"])*(?=\"|$)", + "name": "comment.line.double-dash.sql", + "captures": { + "1": { + "name": "punctuation.definition.comment.sql" + } + } + }, + { + "match": "\\\\[\\\\\"`']", + "name": "constant.character.escape.php" + }, + { + "match": "'(?=((\\\\')|[^'\"])*(\"|$))", + "name": "string.quoted.single.unclosed.sql" + }, + { + "match": "`(?=((\\\\`)|[^`\"])*(\"|$))", + "name": "string.quoted.other.backtick.unclosed.sql" + }, + { + "begin": "'", + "end": "'", + "name": "string.quoted.single.sql", + "patterns": [ + { + "include": "#interpolation" + } + ] + }, + { + "begin": "`", + "end": "`", + "name": "string.quoted.other.backtick.sql", + "patterns": [ + { + "include": "#interpolation" + } + ] + }, + { + "include": "#interpolation" + }, + { + "include": "source.sql" + } + ] + }, + "sql-string-single-quoted": { + "begin": "'\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|AND)\\b)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "contentName": "source.sql.embedded.php", + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.quoted.single.sql.php", + "patterns": [ + { + "match": "(#)(\\\\'|[^'])*(?='|$)", + "name": "comment.line.number-sign.sql", + "captures": { + "1": { + "name": "punctuation.definition.comment.sql" + } + } + }, + { + "match": "(--)(\\\\'|[^'])*(?='|$)", + "name": "comment.line.double-dash.sql", + "captures": { + "1": { + "name": "punctuation.definition.comment.sql" + } + } + }, + { + "match": "\\\\[\\\\'`\"]", + "name": "constant.character.escape.php" + }, + { + "match": "`(?=((\\\\`)|[^`'])*('|$))", + "name": "string.quoted.other.backtick.unclosed.sql" + }, + { + "match": "\"(?=((\\\\\")|[^\"'])*('|$))", + "name": "string.quoted.double.unclosed.sql" + }, + { + "include": "source.sql" + } + ] + }, + "string-backtick": { + "begin": "`", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.interpolated.php", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.php" + }, + { + "include": "#interpolation" + } + ] + }, + "string-double-quoted": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.quoted.double.php", + "patterns": [ + { + "include": "#interpolation" + } + ] + }, + "string-single-quoted": { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.quoted.single.php", + "patterns": [ + { + "match": "\\\\[\\\\']", + "name": "constant.character.escape.php" + } + ] + }, + "strings": { + "patterns": [ + { + "include": "#regex-double-quoted" + }, + { + "include": "#sql-string-double-quoted" + }, + { + "include": "#string-double-quoted" + }, + { + "include": "#regex-single-quoted" + }, + { + "include": "#sql-string-single-quoted" + }, + { + "include": "#string-single-quoted" + } + ] + }, + "support": { + "patterns": [ + { + "match": "(?xi)\n\\b\napc_(\n store|sma_info|compile_file|clear_cache|cas|cache_info|inc|dec|define_constants|delete(_file)?|\n exists|fetch|load_constants|add|bin_(dump|load)(file)?\n)\\b", + "name": "support.function.apc.php" + }, + { + "match": "(?xi)\\b\n(\n shuffle|sizeof|sort|next|nat(case)?sort|count|compact|current|in_array|usort|uksort|uasort|\n pos|prev|end|each|extract|ksort|key(_exists)?|krsort|list|asort|arsort|rsort|reset|range|\n array(_(shift|sum|splice|search|slice|chunk|change_key_case|count_values|column|combine|\n (diff|intersect)(_(u)?(key|assoc))?|u(diff|intersect)(_(u)?assoc)?|unshift|unique|\n pop|push|pad|product|values|keys|key_exists|filter|fill(_keys)?|flip|walk(_recursive)?|\n reduce|replace(_recursive)?|reverse|rand|multisort|merge(_recursive)?|map)?)\n)\\b", + "name": "support.function.array.php" + }, + { + "match": "(?xi)\\b\n(\n show_source|sys_getloadavg|sleep|highlight_(file|string)|constant|connection_(aborted|status)|\n time_(nanosleep|sleep_until)|ignore_user_abort|die|define(d)?|usleep|uniqid|unpack|__halt_compiler|\n php_(check_syntax|strip_whitespace)|pack|eval|exit|get_browser\n)\\b", + "name": "support.function.basic_functions.php" + }, + { + "match": "(?i)\\bbc(scale|sub|sqrt|comp|div|pow(mod)?|add|mod|mul)\\b", + "name": "support.function.bcmath.php" + }, + { + "match": "(?i)\\bblenc_encrypt\\b", + "name": "support.function.blenc.php" + }, + { + "match": "(?i)\\bbz(compress|close|open|decompress|errstr|errno|error|flush|write|read)\\b", + "name": "support.function.bz2.php" + }, + { + "match": "(?xi)\\b\n(\n (French|Gregorian|Jewish|Julian)ToJD|cal_(to_jd|info|days_in_month|from_jd)|unixtojd|\n jdto(unix|jewish)|easter_(date|days)|JD(MonthName|To(Gregorian|Julian|French)|DayOfWeek)\n)\\b", + "name": "support.function.calendar.php" + }, + { + "match": "(?xi)\\b\n(\n class_alias|all_user_method(_array)?|is_(a|subclass_of)|__autoload|(class|interface|method|property|trait)_exists|\n get_(class(_(vars|methods))?|(called|parent)_class|object_vars|declared_(classes|interfaces|traits))\n)\\b", + "name": "support.function.classobj.php" + }, + { + "match": "(?xi)\\b\n(\n com_(create_guid|print_typeinfo|event_sink|load_typelib|get_active_object|message_pump)|\n variant_(sub|set(_type)?|not|neg|cast|cat|cmp|int|idiv|imp|or|div|date_(from|to)_timestamp|\n pow|eqv|fix|and|add|abs|round|get_type|xor|mod|mul)\n)\\b", + "name": "support.function.com.php" + }, + { + "begin": "(?i)\\b(isset|unset|eval|empty|list)\\b", + "name": "support.function.construct.php" + }, + { + "match": "(?i)\\b(print|echo)\\b", + "name": "support.function.construct.output.php" + }, + { + "match": "(?i)\\bctype_(space|cntrl|digit|upper|punct|print|lower|alnum|alpha|graph|xdigit)\\b", + "name": "support.function.ctype.php" + }, + { + "match": "(?xi)\\b\ncurl_(\n share_(close|init|setopt)|strerror|setopt(_array)?|copy_handle|close|init|unescape|pause|escape|\n errno|error|exec|version|file_create|reset|getinfo|\n multi_(strerror|setopt|select|close|init|info_read|(add|remove)_handle|getcontent|exec)\n)\\b", + "name": "support.function.curl.php" + }, + { + "match": "(?xi)\\b\n(\n strtotime|str[fp]time|checkdate|time|timezone_name_(from_abbr|get)|idate|\n timezone_((location|offset|transitions|version)_get|(abbreviations|identifiers)_list|open)|\n date(_(sun(rise|set)|sun_info|sub|create(_(immutable_)?from_format)?|timestamp_(get|set)|timezone_(get|set)|time_set|\n isodate_set|interval_(create_from_date_string|format)|offset_get|diff|default_timezone_(get|set)|date_set|\n parse(_from_format)?|format|add|get_last_errors|modify))?|\n localtime|get(date|timeofday)|gm(strftime|date|mktime)|microtime|mktime\n)\\b", + "name": "support.function.datetime.php" + }, + { + "match": "(?i)\\bdba_(sync|handlers|nextkey|close|insert|optimize|open|delete|popen|exists|key_split|firstkey|fetch|list|replace)\\b", + "name": "support.function.dba.php" + }, + { + "match": "(?i)\\bdbx_(sort|connect|compare|close|escape_string|error|query|fetch_row)\\b", + "name": "support.function.dbx.php" + }, + { + "match": "(?i)\\b(scandir|chdir|chroot|closedir|opendir|dir|rewinddir|readdir|getcwd)\\b", + "name": "support.function.dir.php" + }, + { + "match": "(?xi)\\b\neio_(\n sync(fs)?|sync_file_range|symlink|stat(vfs)?|sendfile|set_min_parallel|set_max_(idle|poll_(reqs|time)|parallel)|\n seek|n(threads|op|pending|reqs|ready)|chown|chmod|custom|close|cancel|truncate|init|open|dup2|unlink|utime|poll|\n event_loop|f(sync|stat(vfs)?|chown|chmod|truncate|datasync|utime|allocate)|write|lstat|link|rename|realpath|\n read(ahead|dir|link)?|rmdir|get_(event_stream|last_error)|grp(_(add|cancel|limit))?|mknod|mkdir|busy\n)\\b", + "name": "support.function.eio.php" + }, + { + "match": "(?xi)\\b\nenchant_(\n dict_(store_replacement|suggest|check|is_in_session|describe|quick_check|add_to_(personal|session)|get_error)|\n broker_(set_ordering|init|dict_exists|describe|free(_dict)?|list_dicts|request_(pwl_)?dict|get_error)\n)\\b", + "name": "support.function.enchant.php" + }, + { + "match": "(?i)\\bsplit(i)?|sql_regcase|ereg(i)?(_replace)?\\b", + "name": "support.function.ereg.php" + }, + { + "match": "(?i)\\b((restore|set)_(error_handler|exception_handler)|trigger_error|debug_(print_)?backtrace|user_error|error_(log|reporting|get_last))\\b", + "name": "support.function.errorfunc.php" + }, + { + "match": "(?i)\\bshell_exec|system|passthru|proc_(nice|close|terminate|open|get_status)|escapeshell(arg|cmd)|exec\\b", + "name": "support.function.exec.php" + }, + { + "match": "(?i)\\b(exif_(thumbnail|tagname|imagetype|read_data)|read_exif_data)\\b", + "name": "support.function.exif.php" + }, + { + "match": "(?xi)\\b\nfann_(\n (duplicate|length|merge|shuffle|subset)_train_data|scale_(train(_data)?|(input|output)(_train_data)?)|\n set_(scaling_params|sarprop_(step_error_(shift|threshold_factor)|temperature|weight_decay_shift)|\n cascade_(num_candidate_groups|candidate_(change_fraction|limit|stagnation_epochs)|\n output_(change_fraction|stagnation_epochs)|weight_multiplier|activation_(functions|steepnesses)|\n (max|min)_(cand|out)_epochs)|\n callback|training_algorithm|train_(error|stop)_function|(input|output)_scaling_params|error_log|\n quickprop_(decay|mu)|weight(_array)?|learning_(momentum|rate)|bit_fail_limit|\n activation_(function|steepness)(_(hidden|layer|output))?|\n rprop_((decrease|increase)_factor|delta_(max|min|zero)))|\n save(_train)?|num_(input|output)_train_data|copy|clear_scaling_params|cascadetrain_on_(file|data)|\n create_((sparse|shortcut|standard)(_array)?|train(_from_callback)?|from_file)|\n test(_data)?|train(_(on_(file|data)|epoch))?|init_weights|descale_(input|output|train)|destroy(_train)?|\n print_error|run|reset_(MSE|err(no|str))|read_train_from_file|randomize_weights|\n get_(sarprop_(step_error_(shift|threshold_factor)|temperature|weight_decay_shift)|num_(input|output|layers)|\n network_type|MSE|connection_(array|rate)|bias_array|bit_fail(_limit)?|\n cascade_(num_(candidates|candidate_groups)|(candidate|output)_(change_fraction|limit|stagnation_epochs)|\n weight_multiplier|activation_(functions|steepnesses)(_count)?|(max|min)_(cand|out)_epochs)|\n total_(connections|neurons)|training_algorithm|train_(error|stop)_function|err(no|str)|\n quickprop_(decay|mu)|learning_(momentum|rate)|layer_array|activation_(function|steepness)|\n rprop_((decrease|increase)_factor|delta_(max|min|zero)))\n)\\b", + "name": "support.function.fann.php" + }, + { + "match": "(?xi)\\b\n(\n symlink|stat|set_file_buffer|chown|chgrp|chmod|copy|clearstatcache|touch|tempnam|tmpfile|\n is_(dir|(uploaded_)?file|executable|link|readable|writ(e)?able)|disk_(free|total)_space|diskfreespace|\n dirname|delete|unlink|umask|pclose|popen|pathinfo|parse_ini_(file|string)|fscanf|fstat|fseek|fnmatch|\n fclose|ftell|ftruncate|file(size|[acm]time|type|inode|owner|perms|group)?|file_(exists|(get|put)_contents)|\n f(open|puts|putcsv|passthru|eof|flush|write|lock|read|gets(s)?|getc(sv)?)|lstat|lchown|lchgrp|link(info)?|\n rename|rewind|read(file|link)|realpath(_cache_(get|size))?|rmdir|glob|move_uploaded_file|mkdir|basename\n)\\b", + "name": "support.function.file.php" + }, + { + "match": "(?i)\\b(finfo_(set_flags|close|open|file|buffer)|mime_content_type)\\b", + "name": "support.function.fileinfo.php" + }, + { + "match": "(?i)\\bfilter_(has_var|input(_array)?|id|var(_array)?|list)\\b", + "name": "support.function.filter.php" + }, + { + "match": "(?i)\\bfastcgi_finish_request\\b", + "name": "support.function.fpm.php" + }, + { + "match": "(?i)\\b(call_user_(func|method)(_array)?|create_function|unregister_tick_function|forward_static_call(_array)?|function_exists|func_(num_args|get_arg(s)?)|register_(shutdown|tick)_function|get_defined_functions)\\b", + "name": "support.function.funchand.php" + }, + { + "match": "(?i)\\b((n)?gettext|textdomain|d((n)?gettext|c(n)?gettext)|bind(textdomain|_textdomain_codeset))\\b", + "name": "support.function.gettext.php" + }, + { + "match": "(?xi)\\b\ngmp_(\n scan[01]|strval|sign|sub|setbit|sqrt(rem)?|hamdist|neg|nextprime|com|clrbit|cmp|testbit|\n intval|init|invert|import|or|div(exact)?|div_(q|qr|r)|jacobi|popcount|pow(m)?|perfect_square|\n prob_prime|export|fact|legendre|and|add|abs|root(rem)?|random(_(bits|range))?|gcd(ext)?|xor|mod|mul\n)\\b", + "name": "support.function.gmp.php" + }, + { + "match": "(?i)\\bhash(_(hmac(_file)?|copy|init|update(_(file|stream))?|pbkdf2|equals|file|final|algos))?\\b", + "name": "support.function.hash.php" + }, + { + "match": "(?xi)\\b\n(\n http_(support|send_(status|stream|content_(disposition|type)|data|file|last_modified)|head|\n negotiate_(charset|content_type|language)|chunked_decode|cache_(etag|last_modified)|throttle|\n inflate|deflate|date|post_(data|fields)|put_(data|file|stream)|persistent_handles_(count|clean|ident)|\n parse_(cookie|headers|message|params)|redirect|request(_(method_(exists|name|(un)?register)|body_encode))?|\n get(_request_(headers|body(_stream)?))?|match_(etag|modified|request_header)|build_(cookie|str|url))|\n ob_(etag|deflate|inflate)handler\n)\\b", + "name": "support.function.http.php" + }, + { + "match": "(?i)\\b(iconv(_(str(pos|len|rpos)|substr|(get|set)_encoding|mime_(decode(_headers)?|encode)))?|ob_iconv_handler)\\b", + "name": "support.function.iconv.php" + }, + { + "match": "(?i)\\biis_((start|stop)_(service|server)|set_(script_map|server_rights|dir_security|app_settings)|(add|remove)_server|get_(script_map|service_state|server_(rights|by_(comment|path))|dir_security))\\b", + "name": "support.function.iisfunc.php" + }, + { + "match": "(?xi)\\b\n(\n iptc(embed|parse)|(jpeg|png)2wbmp|gd_info|getimagesize(fromstring)?|\n image(s[xy]|scale|(char|string)(up)?|set(style|thickness|tile|interpolation|pixel|brush)|savealpha|\n convolution|copy(resampled|resized|merge(gray)?)?|colors(forindex|total)|\n color(set|closest(alpha|hwb)?|transparent|deallocate|(allocate|exact|resolve)(alpha)?|at|match)|\n crop(auto)?|create(truecolor|from(string|jpeg|png|wbmp|webp|gif|gd(2(part)?)?|xpm|xbm))?|\n types|ttf(bbox|text)|truecolortopalette|istruecolor|interlace|2wbmp|destroy|dashedline|jpeg|\n _type_to_(extension|mime_type)|ps(slantfont|text|(encode|extend|free|load)font|bbox)|png|polygon|\n palette(copy|totruecolor)|ellipse|ft(text|bbox)|filter|fill|filltoborder|\n filled(arc|ellipse|polygon|rectangle)|font(height|width)|flip|webp|wbmp|line|loadfont|layereffect|\n antialias|affine(matrix(concat|get))?|alphablending|arc|rotate|rectangle|gif|gd(2)?|gammacorrect|\n grab(screen|window)|xbm)\n)\\b", + "name": "support.function.image.php" + }, + { + "match": "(?xi)\\b\n(\n sys_get_temp_dir|set_(time_limit|include_path|magic_quotes_runtime)|cli_(get|set)_process_title|\n ini_(alter|get(_all)?|restore|set)|zend_(thread_id|version|logo_guid)|dl|php(credits|info|version)|\n php_(sapi_name|ini_(scanned_files|loaded_file)|uname|logo_guid)|putenv|extension_loaded|version_compare|\n assert(_options)?|restore_include_path|gc_(collect_cycles|disable|enable(d)?)|getopt|\n get_(cfg_var|current_user|defined_constants|extension_funcs|include_path|included_files|loaded_extensions|\n magic_quotes_(gpc|runtime)|required_files|resources)|\n get(env|lastmod|rusage|my(inode|[gup]id))|\n memory_get_(peak_)?usage|main|magic_quotes_runtime\n)\\b", + "name": "support.function.info.php" + }, + { + "match": "(?xi)\\b\nibase_(\n set_event_handler|service_(attach|detach)|server_info|num_(fields|params)|name_result|connect|\n commit(_ret)?|close|trans|delete_user|drop_db|db_info|pconnect|param_info|prepare|err(code|msg)|\n execute|query|field_info|fetch_(assoc|object|row)|free_(event_handler|query|result)|wait_event|\n add_user|affected_rows|rollback(_ret)?|restore|gen_id|modify_user|maintain_db|backup|\n blob_(cancel|close|create|import|info|open|echo|add|get)\n)\\b", + "name": "support.function.interbase.php" + }, + { + "match": "(?xi)\\b\n(\n normalizer_(normalize|is_normalized)|idn_to_(unicode|utf8|ascii)|\n numfmt_(set_(symbol|(text_)?attribute|pattern)|create|(parse|format)(_currency)?|\n get_(symbol|(text_)?attribute|pattern|error_(code|message)|locale))|\n collator_(sort(_with_sort_keys)?|set_(attribute|strength)|compare|create|asort|\n get_(strength|sort_key|error_(code|message)|locale|attribute))|\n transliterator_(create(_(inverse|from_rules))?|transliterate|list_ids|get_error_(code|message))|\n intl(cal|tz)_get_error_(code|message)|intl_(is_failure|error_name|get_error_(code|message))|\n datefmt_(set_(calendar|lenient|pattern|timezone(_id)?)|create|is_lenient|parse|format(_object)?|localtime|\n get_(calendar(_object)?|time(type|zone(_id)?)|datetype|pattern|error_(code|message)|locale))|\n locale_(set_default|compose|canonicalize|parse|filter_matches|lookup|accept_from_http|\n get_(script|display_(script|name|variant|language|region)|default|primary_language|keywords|all_variants|region))|\n resourcebundle_(create|count|locales|get(_(error_(code|message)))?)|\n grapheme_(str(i?str|r?i?pos|len)|substr|extract)|\n msgfmt_(set_pattern|create|(format|parse)(_message)?|get_(pattern|error_(code|message)|locale))\n)\\b", + "name": "support.function.intl.php" + }, + { + "match": "(?i)\\bjson_(decode|encode|last_error(_msg)?)\\b", + "name": "support.function.json.php" + }, + { + "match": "(?xi)\\b\nldap_(\n start|tls|sort|search|sasl_bind|set_(option|rebind_proc)|(first|next)_(attribute|entry|reference)|\n connect|control_paged_result(_response)?|count_entries|compare|close|t61_to_8859|8859_to_t61|\n dn2ufn|delete|unbind|parse_(reference|result)|escape|errno|err2str|error|explode_dn|bind|\n free_result|list|add|rename|read|get_(option|dn|entries|values(_len)?|attributes)|modify(_batch)?|\n mod_(add|del|replace)\n)\\b", + "name": "support.function.ldap.php" + }, + { + "match": "(?i)\\blibxml_(set_(streams_context|external_entity_loader)|clear_errors|disable_entity_loader|use_internal_errors|get_(errors|last_error))\\b", + "name": "support.function.libxml.php" + }, + { + "match": "(?i)\\b(ezmlm_hash|mail)\\b", + "name": "support.function.mail.php" + }, + { + "match": "(?xi)\\b\n(\n (a)?(cos|sin|tan)(h)?|sqrt|srand|hypot|hexdec|ceil|is_(nan|(in)?finite)|octdec|dec(hex|oct|bin)|deg2rad|\n pi|pow|exp(m1)?|floor|fmod|lcg_value|log(1(p|0))?|atan2|abs|round|rand|rad2deg|getrandmax|\n mt_(srand|rand|getrandmax)|max|min|bindec|base_convert\n)\\b", + "name": "support.function.math.php" + }, + { + "match": "(?xi)\\b\nmb_(\n str(cut|str|to(lower|upper)|istr|ipos|imwidth|pos|width|len|rchr|richr|ripos|rpos)|\n substitute_character|substr(_count)?|split|send_mail|http_(input|output)|check_encoding|\n convert_(case|encoding|kana|variables)|internal_encoding|output_handler|decode_(numericentity|mimeheader)|\n detect_(encoding|order)|parse_str|preferred_mime_name|encoding_aliases|encode_(numericentity|mimeheader)|\n ereg(i(_replace)?)?|ereg_(search(_(get(pos|regs)|init|regs|(set)?pos))?|replace(_callback)?|match)|\n list_encodings|language|regex_(set_options|encoding)|get_info\n)\\b", + "name": "support.function.mbstring.php" + }, + { + "match": "(?xi)\\b\n(\n mcrypt_(\n cfb|create_iv|cbc|ofb|decrypt|encrypt|ecb|list_(algorithms|modes)|generic(_((de)?init|end))?|\n enc_(self_test|is_block_(algorithm|algorithm_mode|mode)|\n get_(supported_key_sizes|(block|iv|key)_size|(algorithms|modes)_name))|\n get_(cipher_name|(block|iv|key)_size)|\n module_(close|self_test|is_block_(algorithm|algorithm_mode|mode)|open|\n get_(supported_key_sizes|algo_(block|key)_size)))|\n mdecrypt_generic\n)\\b", + "name": "support.function.mcrypt.php" + }, + { + "match": "(?i)\\bmemcache_debug\\b", + "name": "support.function.memcache.php" + }, + { + "match": "(?i)\\bmhash(_(count|keygen_s2k|get_(hash_name|block_size)))?\\b", + "name": "support.function.mhash.php" + }, + { + "match": "(?i)\\b(log_(cmd_(insert|delete|update)|killcursor|write_batch|reply|getmore)|bson_(decode|encode))\\b", + "name": "support.function.mongo.php" + }, + { + "match": "(?xi)\\b\nmysql_(\n stat|set_charset|select_db|num_(fields|rows)|connect|client_encoding|close|create_db|escape_string|\n thread_id|tablename|insert_id|info|data_seek|drop_db|db_(name|query)|unbuffered_query|pconnect|ping|\n errno|error|query|field_(seek|name|type|table|flags|len)|fetch_(object|field|lengths|assoc|array|row)|\n free_result|list_(tables|dbs|processes|fields)|affected_rows|result|real_escape_string|\n get_(client|host|proto|server)_info\n)\\b", + "name": "support.function.mysql.php" + }, + { + "match": "(?xi)\\b\nmysqli_(\n ssl_set|store_result|stat|send_(query|long_data)|set_(charset|opt|local_infile_(default|handler))|\n stmt_(store_result|send_long_data|next_result|close|init|data_seek|prepare|execute|fetch|free_result|\n attr_(get|set)|result_metadata|reset|get_(result|warnings)|more_results|bind_(param|result))|\n select_db|slave_query|savepoint|next_result|change_user|character_set_name|connect|commit|\n client_encoding|close|thread_safe|init|options|(enable|disable)_(reads_from_master|rpl_parse)|\n dump_debug_info|debug|data_seek|use_result|ping|poll|param_count|prepare|escape_string|execute|\n embedded_server_(start|end)|kill|query|field_seek|free_result|autocommit|rollback|report|refresh|\n fetch(_(object|fields|field(_direct)?|assoc|all|array|row))?|rpl_(parse_enabled|probe|query_type)|\n release_savepoint|reap_async_query|real_(connect|escape_string|query)|more_results|multi_query|\n get_(charset|connection_stats|client_(stats|info|version)|cache_stats|warnings|links_stats|metadata)|\n master_query|bind_(param|result)|begin_transaction\n)\\b", + "name": "support.function.mysqli.php" + }, + { + "match": "(?i)\\bmysqlnd_memcache_(set|get_config)\\b", + "name": "support.function.mysqlnd-memcache.php" + }, + { + "match": "(?i)\\bmysqlnd_ms_(set_(user_pick_server|qos)|dump_servers|query_is_select|fabric_select_(shard|global)|get_(stats|last_(used_connection|gtid))|xa_(commit|rollback|gc|begin)|match_wild)\\b", + "name": "support.function.mysqlnd-ms.php" + }, + { + "match": "(?i)\\bmysqlnd_qc_(set_(storage_handler|cache_condition|is_select|user_handlers)|clear_cache|get_(normalized_query_trace_log|core_stats|cache_info|query_trace_log|available_handlers))\\b", + "name": "support.function.mysqlnd-qc.php" + }, + { + "match": "(?i)\\bmysqlnd_uh_(set_(statement|connection)_proxy|convert_to_mysqlnd)\\b", + "name": "support.function.mysqlnd-uh.php" + }, + { + "match": "(?xi)\\b\n(\n syslog|socket_(set_(blocking|timeout)|get_status)|set(raw)?cookie|http_response_code|openlog|\n headers_(list|sent)|header(_(register_callback|remove))?|checkdnsrr|closelog|inet_(ntop|pton)|ip2long|\n openlog|dns_(check_record|get_(record|mx))|define_syslog_variables|(p)?fsockopen|long2ip|\n get(servby(name|port)|host(name|by(name(l)?|addr))|protoby(name|number)|mxrr)\n)\\b", + "name": "support.function.network.php" + }, + { + "match": "(?i)\\bnsapi_(virtual|response_headers|request_headers)\\b", + "name": "support.function.nsapi.php" + }, + { + "match": "(?xi)\\b\n(\n oci(statementtype|setprefetch|serverversion|savelob(file)?|numcols|new(collection|cursor|descriptor)|nlogon|\n column(scale|size|name|type(raw)?|isnull|precision)|coll(size|trim|assign(elem)?|append|getelem|max)|commit|\n closelob|cancel|internaldebug|definebyname|plogon|parse|error|execute|fetch(statement|into)?|\n free(statement|collection|cursor|desc)|write(temporarylob|lobtofile)|loadlob|log(on|off)|rowcount|rollback|\n result|bindbyname)|\n oci_(statement_type|set_(client_(info|identifier)|prefetch|edition|action|module_name)|server_version|\n num_(fields|rows)|new_(connect|collection|cursor|descriptor)|connect|commit|client_version|close|cancel|\n internal_debug|define_by_name|pconnect|password_change|parse|error|execute|bind_(array_)?by_name|\n field_(scale|size|name|type(_raw)?|is_null|precision)|fetch(_(object|assoc|all|array|row))?|\n free_(statement|descriptor)|lob_(copy|is_equal)|rollback|result|get_implicit_resultset)\n)\\b", + "name": "support.function.oci8.php" + }, + { + "match": "(?i)\\bopcache_(compile_file|invalidate|reset|get_(status|configuration))\\b", + "name": "support.function.opcache.php" + }, + { + "match": "(?xi)\\b\nopenssl_(\n sign|spki_(new|export(_challenge)?|verify)|seal|csr_(sign|new|export(_to_file)?|get_(subject|public_key))|\n cipher_iv_length|open|dh_compute_key|digest|decrypt|public_(decrypt|encrypt)|encrypt|error_string|\n pkcs12_(export(_to_file)?|read)|pkcs7_(sign|decrypt|encrypt|verify)|verify|free_key|random_pseudo_bytes|\n pkey_(new|export(_to_file)?|free|get_(details|public|private))|private_(decrypt|encrypt)|pbkdf2|\n get_((cipher|md)_methods|cert_locations|(public|private)key)|\n x509_(check_private_key|checkpurpose|parse|export(_to_file)?|fingerprint|free|read)\n)\\b", + "name": "support.function.openssl.php" + }, + { + "match": "(?xi)\\b\n(\n output_(add_rewrite_var|reset_rewrite_vars)|flush|\n ob_(start|clean|implicit_flush|end_(clean|flush)|flush|list_handlers|gzhandler|\n get_(status|contents|clean|flush|length|level))\n)\\b", + "name": "support.function.output.php" + }, + { + "match": "(?i)\\bpassword_(hash|needs_rehash|verify|get_info)\\b", + "name": "support.function.password.php" + }, + { + "match": "(?xi)\\b\npcntl_(\n strerror|signal(_dispatch)?|sig(timedwait|procmask|waitinfo)|setpriority|errno|exec|fork|\n w(stopsig|termsig|if(stopped|signaled|exited))|wait(pid)?|alarm|getpriority|get_last_error\n)\\b", + "name": "support.function.pcntl.php" + }, + { + "match": "(?xi)\\b\npg_(\n socket|send_(prepare|execute|query(_params)?)|set_(client_encoding|error_verbosity)|select|host|\n num_(fields|rows)|consume_input|connection_(status|reset|busy)|connect(_poll)?|convert|copy_(from|to)|\n client_encoding|close|cancel_query|tty|transaction_status|trace|insert|options|delete|dbname|untrace|\n unescape_bytea|update|pconnect|ping|port|put_line|parameter_status|prepare|version|query(_params)?|\n escape_(string|identifier|literal|bytea)|end_copy|execute|flush|free_result|last_(notice|error|oid)|\n field_(size|num|name|type(_oid)?|table|is_null|prtlen)|affected_rows|result_(status|seek|error(_field)?)|\n fetch_(object|assoc|all(_columns)?|array|row|result)|get_(notify|pid|result)|meta_data|\n lo_(seek|close|create|tell|truncate|import|open|unlink|export|write|read(_all)?)|\n)\\b", + "name": "support.function.pgsql.php" + }, + { + "match": "(?i)\\b(virtual|getallheaders|apache_((get|set)env|note|child_terminate|lookup_uri|response_headers|reset_timeout|request_headers|get_(version|modules)))\\b", + "name": "support.function.php_apache.php" + }, + { + "match": "(?i)\\bdom_import_simplexml\\b", + "name": "support.function.php_dom.php" + }, + { + "match": "(?xi)\\b\nftp_(\n ssl_connect|systype|site|size|set_option|nlist|nb_(continue|f?(put|get))|ch(dir|mod)|connect|cdup|close|\n delete|put|pwd|pasv|exec|quit|f(put|get)|login|alloc|rename|raw(list)?|rmdir|get(_option)?|mdtm|mkdir\n)\\b", + "name": "support.function.php_ftp.php" + }, + { + "match": "(?xi)\\b\nimap_(\n (create|delete|list|rename|scan)(mailbox)?|status|sort|subscribe|set_quota|set(flag_full|acl)|search|savebody|\n num_(recent|msg)|check|close|clearflag_full|thread|timeout|open|header(info)?|headers|append|alerts|reopen|\n 8bit|unsubscribe|undelete|utf7_(decode|encode)|utf8|uid|ping|errors|expunge|qprint|gc|\n fetch(structure|header|text|mime|body)|fetch_overview|lsub|list(scan|subscribed)|last_error|\n rfc822_(parse_(headers|adrlist)|write_address)|get(subscribed|acl|mailboxes)|get_quota(root)?|\n msgno|mime_header_decode|mail_(copy|compose|move)|mail|mailboxmsginfo|binary|body(struct)?|base64\n)\\b", + "name": "support.function.php_imap.php" + }, + { + "match": "(?xi)\\b\nmssql_(\n select_db|num_(fields|rows)|next_result|connect|close|init|data_seek|pconnect|execute|query|\n field_(seek|name|type|length)|fetch_(object|field|assoc|array|row|batch)|free_(statement|result)|\n rows_affected|result|guid_string|get_last_message|min_(error|message)_severity|bind\n)\\b", + "name": "support.function.php_mssql.php" + }, + { + "match": "(?xi)\\b\nodbc_(\n statistics|specialcolumns|setoption|num_(fields|rows)|next_result|connect|columns|columnprivileges|commit|\n cursor|close(_all)?|tables|tableprivileges|do|data_source|pconnect|primarykeys|procedures|procedurecolumns|\n prepare|error(msg)?|exec(ute)?|field_(scale|num|name|type|precision|len)|foreignkeys|free_result|\n fetch_(into|object|array|row)|longreadlen|autocommit|rollback|result(_all)?|gettypeinfo|binmode\n)\\b", + "name": "support.function.php_odbc.php" + }, + { + "match": "(?i)\\bpreg_(split|quote|filter|last_error|replace(_callback)?|grep|match(_all)?)\\b", + "name": "support.function.php_pcre.php" + }, + { + "match": "(?i)\\b(spl_(classes|object_hash|autoload(_(call|unregister|extensions|functions|register))?)|class_(implements|uses|parents)|iterator_(count|to_array|apply))\\b", + "name": "support.function.php_spl.php" + }, + { + "match": "(?i)\\bzip_(close|open|entry_(name|compressionmethod|compressedsize|close|open|filesize|read)|read)\\b", + "name": "support.function.php_zip.php" + }, + { + "match": "(?xi)\\b\nposix_(\n strerror|set(s|e?u|[ep]?g)id|ctermid|ttyname|times|isatty|initgroups|uname|errno|kill|access|\n get(sid|cwd|uid|pid|ppid|pwnam|pwuid|pgid|pgrp|euid|egid|login|rlimit|gid|grnam|groups|grgid)|\n get_last_error|mknod|mkfifo\n)\\b", + "name": "support.function.posix.php" + }, + { + "match": "(?i)\\bset(thread|proc)title\\b", + "name": "support.function.proctitle.php" + }, + { + "match": "(?xi)\\b\npspell_(\n store_replacement|suggest|save_wordlist|new(_(config|personal))?|check|clear_session|\n config_(save_repl|create|ignore|(data|dict)_dir|personal|runtogether|repl|mode)|add_to_(session|personal)\n)\\b", + "name": "support.function.pspell.php" + }, + { + "match": "(?i)\\breadline(_(completion_function|clear_history|callback_(handler_(install|remove)|read_char)|info|on_new_line|write_history|list_history|add_history|redisplay|read_history))?\\b", + "name": "support.function.readline.php" + }, + { + "match": "(?i)\\brecode(_(string|file))?\\b", + "name": "support.function.recode.php" + }, + { + "match": "(?i)\\brrd(c_disconnect|_(create|tune|info|update|error|version|first|fetch|last(update)?|restore|graph|xport))\\b", + "name": "support.function.rrd.php" + }, + { + "match": "(?xi)\\b\n(\n shm_((get|has|remove|put)_var|detach|attach|remove)|sem_(acquire|release|remove|get)|ftok|\n msg_((get|remove|set|stat)_queue|send|queue_exists|receive)\n)\\b", + "name": "support.function.sem.php" + }, + { + "match": "(?xi)\\b\nsession_(\n status|start|set_(save_handler|cookie_params)|save_path|name|commit|cache_(expire|limiter)|\n is_registered|id|destroy|decode|unset|unregister|encode|write_close|abort|reset|register(_shutdown)?|\n regenerate_id|get_cookie_params|module_name\n)\\b", + "name": "support.function.session.php" + }, + { + "match": "(?i)\\bshmop_(size|close|open|delete|write|read)\\b", + "name": "support.function.shmop.php" + }, + { + "match": "(?i)\\bsimplexml_(import_dom|load_(string|file))\\b", + "name": "support.function.simplexml.php" + }, + { + "match": "(?xi)\\b\n(\n snmp(walk(oid)?|realwalk|get(next)?|set)|\n snmp_(set_(valueretrieval|quick_print|enum_print|oid_(numeric_print|output_format))|read_mib|\n get_(valueretrieval|quick_print))|\n snmp[23]_(set|walk|real_walk|get(next)?)\n)\\b", + "name": "support.function.snmp.php" + }, + { + "match": "(?i)\\b(is_soap_fault|use_soap_error_handler)\\b", + "name": "support.function.soap.php" + }, + { + "match": "(?xi)\\b\nsocket_(\n shutdown|strerror|send(to|msg)?|set_((non)?block|option)|select|connect|close|clear_error|bind|\n create(_(pair|listen))?|cmsg_space|import_stream|write|listen|last_error|accept|recv(from|msg)?|\n read|get(peer|sock)name|get_option\n)\\b", + "name": "support.function.sockets.php" + }, + { + "match": "(?xi)\\b\nsqlite_(\n single_query|seek|has_(more|prev)|num_(fields|rows)|next|changes|column|current|close|\n create_(aggregate|function)|open|unbuffered_query|udf_(decode|encode)_binary|popen|prev|\n escape_string|error_string|exec|valid|key|query|field_name|factory|\n fetch_(string|single|column_types|object|all|array)|lib(encoding|version)|\n last_(insert_rowid|error)|array_query|rewind|busy_timeout\n)\\b", + "name": "support.function.sqlite.php" + }, + { + "match": "(?xi)\\b\nsqlsrv_(\n send_stream_data|server_info|has_rows|num_(fields|rows)|next_result|connect|configure|commit|\n client_info|close|cancel|prepare|errors|execute|query|field_metadata|fetch(_(array|object))?|\n free_stmt|rows_affected|rollback|get_(config|field)|begin_transaction\n)\\b", + "name": "support.function.sqlsrv.php" + }, + { + "match": "(?xi)\\b\nstats_(\n harmonic_mean|covariance|standard_deviation|skew|\n cdf_(noncentral_(chisquare|f)|negative_binomial|chisquare|cauchy|t|uniform|poisson|exponential|f|weibull|\n logistic|laplace|gamma|binomial|beta)|\n stat_(noncentral_t|correlation|innerproduct|independent_t|powersum|percentile|paired_t|gennch|binomial_coef)|\n dens_(normal|negative_binomial|chisquare|cauchy|t|pmf_(hypergeometric|poisson|binomial)|exponential|f|\n weibull|logistic|laplace|gamma|beta)|\n den_uniform|variance|kurtosis|absolute_deviation|\n rand_(setall|phrase_to_seeds|ranf|get_seeds|\n gen_(noncentral_[ft]|noncenral_chisquare|normal|chisquare|t|int|\n i(uniform|poisson|binomial(_negative)?)|exponential|f(uniform)?|gamma|beta))\n)\\b", + "name": "support.function.stats.php" + }, + { + "match": "(?xi)\\b\n(\n set_socket_blocking|\n stream_(socket_(shutdown|sendto|server|client|pair|enable_crypto|accept|recvfrom|get_name)|\n set_(chunk_size|timeout|(read|write)_buffer|blocking)|select|notification_callback|supports_lock|\n context_(set_(option|default|params)|create|get_(options|default|params))|copy_to_stream|is_local|\n encoding|filter_(append|prepend|register|remove)|wrapper_((un)?register|restore)|\n resolve_include_path|register_wrapper|get_(contents|transports|filters|wrappers|line|meta_data)|\n bucket_(new|prepend|append|make_writeable)\n )\n)\\b", + "name": "support.function.streamsfuncs.php" + }, + { + "match": "(?xi)\\b\n(\n money_format|md5(_file)?|metaphone|bin2hex|sscanf|sha1(_file)?|\n str(str|c?spn|n(at)?(case)?cmp|chr|coll|(case)?cmp|to(upper|lower)|tok|tr|istr|pos|pbrk|len|rchr|ri?pos|rev)|\n str_(getcsv|ireplace|pad|repeat|replace|rot13|shuffle|split|word_count)|\n strip(c?slashes|os)|strip_tags|similar_text|soundex|substr(_(count|compare|replace))?|setlocale|\n html(specialchars(_decode)?|entities)|html_entity_decode|hex2bin|hebrev(c)?|number_format|nl2br|nl_langinfo|\n chop|chunk_split|chr|convert_(cyr_string|uu(decode|encode))|count_chars|crypt|crc32|trim|implode|ord|\n uc(first|words)|join|parse_str|print(f)?|echo|explode|v?[fs]?printf|quoted_printable_(decode|encode)|\n quotemeta|wordwrap|lcfirst|[lr]trim|localeconv|levenshtein|addc?slashes|get_html_translation_table\n)\\b", + "name": "support.function.string.php" + }, + { + "match": "(?xi)\\b\nsybase_(\n set_message_handler|select_db|num_(fields|rows)|connect|close|deadlock_retry_count|data_seek|\n unbuffered_query|pconnect|query|field_seek|fetch_(object|field|assoc|array|row)|free_result|\n affected_rows|result|get_last_message|min_(client|error|message|server)_severity\n)\\b", + "name": "support.function.sybase.php" + }, + { + "match": "(?i)\\b(taint|is_tainted|untaint)\\b", + "name": "support.function.taint.php" + }, + { + "match": "(?xi)\\b\n(\n tidy_((get|set)opt|set_encoding|save_config|config_count|clean_repair|is_(xhtml|xml)|diagnose|\n (access|error|warning)_count|load_config|reset_config|(parse|repair)_(string|file)|\n get_(status|html(_ver)?|head|config|output|opt_doc|root|release|body))|\n ob_tidyhandler\n)\\b", + "name": "support.function.tidy.php" + }, + { + "match": "(?i)\\btoken_(name|get_all)\\b", + "name": "support.function.tokenizer.php" + }, + { + "match": "(?xi)\\b\ntrader_(\n stoch(f|r|rsi)?|stddev|sin(h)?|sum|sub|set_(compat|unstable_period)|sqrt|sar(ext)?|sma|\n ht_(sine|trend(line|mode)|dc(period|phase)|phasor)|natr|cci|cos(h)?|correl|\n cdl(shootingstar|shortline|sticksandwich|stalledpattern|spinningtop|separatinglines|\n hikkake(mod)?|highwave|homingpigeon|hangingman|harami(cross)?|hammer|concealbabyswall|\n counterattack|closingmarubozu|thrusting|tasukigap|takuri|tristar|inneck|invertedhammer|\n identical3crows|2crows|onneck|doji(star)?|darkcloudcover|dragonflydoji|unique3river|\n upsidegap2crows|3(starsinsouth|inside|outside|whitesoldiers|linestrike|blackcrows)|\n piercing|engulfing|evening(doji)?star|kicking(bylength)?|longline|longleggeddoji|\n ladderbottom|advanceblock|abandonedbaby|risefall3methods|rickshawman|gapsidesidewhite|\n gravestonedoji|xsidegap3methods|morning(doji)?star|mathold|matchinglow|marubozu|\n belthold|breakaway)|\n ceil|cmo|tsf|typprice|t3|tema|tan(h)?|trix|trima|trange|obv|div|dema|dx|ultosc|ppo|\n plus_d[im]|errno|exp|ema|var|kama|floor|wclprice|willr|wma|ln|log10|bop|beta|bbands|\n linearreg(_(slope|intercept|angle))?|asin|acos|atan|atr|adosc|ad|add|adx(r)?|apo|avgprice|\n aroon(osc)?|rsi|roc|rocp|rocr(100)?|get_(compat|unstable_period)|min(index)?|minus_d[im]|\n minmax(index)?|mid(point|price)|mom|mult|medprice|mfi|macd(ext|fix)?|mavp|max(index)?|ma(ma)?\n)\\b", + "name": "support.function.trader.php" + }, + { + "match": "(?i)\\buopz_(copy|compose|implement|overload|delete|undefine|extend|function|flags|restore|rename|redefine|backup)\\b", + "name": "support.function.uopz.php" + }, + { + "match": "(?i)\\b(http_build_query|(raw)?url(decode|encode)|parse_url|get_(headers|meta_tags)|base64_(decode|encode))\\b", + "name": "support.function.url.php" + }, + { + "match": "(?xi)\\b\n(\n strval|settype|serialize|(bool|double|float)val|debug_zval_dump|intval|import_request_variables|isset|\n is_(scalar|string|null|numeric|callable|int(eger)?|object|double|float|long|array|resource|real|bool)|\n unset|unserialize|print_r|empty|var_(dump|export)|gettype|get_(defined_vars|resource_type)\n)\\b", + "name": "support.function.var.php" + }, + { + "match": "(?i)\\bwddx_(serialize_(value|vars)|deserialize|packet_(start|end)|add_vars)\\b", + "name": "support.function.wddx.php" + }, + { + "match": "(?i)\\bxhprof_(sample_)?(disable|enable)\\b", + "name": "support.function.xhprof.php" + }, + { + "match": "(?xi)\n\\b\n(\n utf8_(decode|encode)|\n xml_(set_((notation|(end|start)_namespace|unparsed_entity)_decl_handler|\n (character_data|default|element|external_entity_ref|processing_instruction)_handler|object)|\n parse(_into_struct)?|parser_((get|set)_option|create(_ns)?|free)|error_string|\n get_(current_((column|line)_number|byte_index)|error_code))\n)\\b", + "name": "support.function.xml.php" + }, + { + "match": "(?xi)\\b\nxmlrpc_(\n server_(call_method|create|destroy|add_introspection_data|register_(introspection_callback|method))|\n is_fault|decode(_request)?|parse_method_descriptions|encode(_request)?|(get|set)_type\n)\\b", + "name": "support.function.xmlrpc.php" + }, + { + "match": "(?xi)\\b\nxmlwriter_(\n (end|start|write)_(comment|cdata|dtd(_(attlist|entity|element))?|document|pi|attribute|element)|\n (start|write)_(attribute|element)_ns|write_raw|set_indent(_string)?|text|output_memory|open_(memory|uri)|\n full_end_element|flush|\n)\\b", + "name": "support.function.xmlwriter.php" + }, + { + "match": "(?xi)\\b\n(\n zlib_(decode|encode|get_coding_type)|readgzfile|\n gz(seek|compress|close|tell|inflate|open|decode|deflate|uncompress|puts|passthru|encode|eof|file|\n write|rewind|read|getc|getss?)\n)\\b", + "name": "support.function.zlib.php" + }, + { + "match": "(?i)\\bis_int(eger)?\\b", + "name": "support.function.alias.php" + } + ] + }, + "switch_statement": { + "patterns": [ + { + "match": "\\s+(?=switch\\b)" + }, + { + "begin": "\\bswitch\\b(?!\\s*\\(.*\\)\\s*:)", + "beginCaptures": { + "0": { + "name": "keyword.control.switch.php" + } + }, + "end": "}|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.section.switch-block.end.bracket.curly.php" + } + }, + "name": "meta.switch-statement.php", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.switch-expression.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.switch-expression.end.bracket.round.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.section.switch-block.begin.bracket.curly.php" + } + }, + "end": "(?=}|\\?>)", + "patterns": [ + { + "include": "#language" + } + ] + } + ] + } + ] + }, + "use-inner": { + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "(?i)\\b(as)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.other.use-as.php" + } + }, + "end": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "endCaptures": { + "0": { + "name": "entity.other.alias.php" + } + } + }, + { + "include": "#class-name" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.php" + } + ] + }, + "var_basic": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(?i)(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\b", + "name": "variable.other.php" + } + ] + }, + "var_global": { + "captures": { + "1": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(\\$)((_(COOKIE|FILES|GET|POST|REQUEST))|arg(v|c))\\b", + "name": "variable.other.global.php" + }, + "var_global_safer": { + "captures": { + "1": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(\\$)((GLOBALS|_(ENV|SERVER|SESSION)))", + "name": "variable.other.global.safer.php" + }, + "var_language": { + "match": "(\\$)this\\b", + "name": "variable.language.this.php", + "captures": { + "1": { + "name": "punctuation.definition.variable.php" + } + } + }, + "variable-name": { + "patterns": [ + { + "include": "#var_global" + }, + { + "include": "#var_global_safer" + }, + { + "captures": { + "1": { + "name": "variable.other.php" + }, + "2": { + "name": "punctuation.definition.variable.php" + }, + "4": { + "name": "keyword.operator.class.php" + }, + "5": { + "name": "variable.other.property.php" + }, + "6": { + "name": "punctuation.section.array.begin.php" + }, + "7": { + "name": "constant.numeric.index.php" + }, + "8": { + "name": "variable.other.index.php" + }, + "9": { + "name": "punctuation.definition.variable.php" + }, + "10": { + "name": "string.unquoted.index.php" + }, + "11": { + "name": "punctuation.section.array.end.php" + } + }, + "match": "(?xi)\n((\\$)(?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*))\n(?:\n (->)(\\g)\n |\n (\\[)(?:(\\d+)|((\\$)\\g)|([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*))(\\])\n)?" + }, + { + "captures": { + "1": { + "name": "variable.other.php" + }, + "2": { + "name": "punctuation.definition.variable.php" + }, + "4": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(?i)((\\${)(?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)(}))" + } + ] + }, + "variables": { + "patterns": [ + { + "include": "#var_language" + }, + { + "include": "#var_global" + }, + { + "include": "#var_global_safer" + }, + { + "include": "#var_basic" + }, + { + "begin": "\\${(?=.*?})", + "beginCaptures": { + "0": { + "name": "punctuation.definition.variable.php" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.variable.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + } + ] + } + } +} diff --git a/src/lib/shiki/languages/c.tmLanguage.json b/src/lib/shiki/languages/c.tmLanguage.json new file mode 100644 index 0000000..cf111bf --- /dev/null +++ b/src/lib/shiki/languages/c.tmLanguage.json @@ -0,0 +1,3555 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/jeff-hykin/better-c-syntax/blob/master/autogenerated/c.tmLanguage.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/jeff-hykin/better-c-syntax/commit/34712a6106a4ffb0a04d2fa836fd28ff6c5849a4", + "name": "c", + "scopeName": "source.c", + "patterns": [ + { + "include": "#preprocessor-rule-enabled" + }, + { + "include": "#preprocessor-rule-disabled" + }, + { + "include": "#preprocessor-rule-conditional" + }, + { + "include": "#predefined_macros" + }, + { + "include": "#comments" + }, + { + "include": "#switch_statement" + }, + { + "include": "#anon_pattern_1" + }, + { + "include": "#storage_types" + }, + { + "include": "#anon_pattern_2" + }, + { + "include": "#anon_pattern_3" + }, + { + "include": "#anon_pattern_4" + }, + { + "include": "#anon_pattern_5" + }, + { + "include": "#anon_pattern_6" + }, + { + "include": "#anon_pattern_7" + }, + { + "include": "#operators" + }, + { + "include": "#numbers" + }, + { + "include": "#strings" + }, + { + "include": "#anon_pattern_range_1" + }, + { + "include": "#anon_pattern_range_2" + }, + { + "include": "#anon_pattern_range_3" + }, + { + "include": "#pragma-mark" + }, + { + "include": "#anon_pattern_range_4" + }, + { + "include": "#anon_pattern_range_5" + }, + { + "include": "#anon_pattern_range_6" + }, + { + "include": "#anon_pattern_8" + }, + { + "include": "#anon_pattern_9" + }, + { + "include": "#anon_pattern_10" + }, + { + "include": "#anon_pattern_11" + }, + { + "include": "#anon_pattern_12" + }, + { + "include": "#anon_pattern_13" + }, + { + "include": "#block" + }, + { + "include": "#parens" + }, + { + "include": "#anon_pattern_range_7" + }, + { + "include": "#line_continuation_character" + }, + { + "include": "#anon_pattern_range_8" + }, + { + "include": "#anon_pattern_range_9" + }, + { + "include": "#anon_pattern_14" + }, + { + "include": "#anon_pattern_15" + } + ], + "repository": { + "access-method": { + "name": "meta.function-call.member.c", + "begin": "([a-zA-Z_][a-zA-Z_0-9]*|(?<=[\\]\\)]))\\s*(?:(\\.)|(->))((?:(?:[a-zA-Z_][a-zA-Z_0-9]*)\\s*(?:(?:\\.)|(?:->)))*)\\s*([a-zA-Z_][a-zA-Z_0-9]*)(\\()", + "beginCaptures": { + "1": { + "name": "variable.object.c" + }, + "2": { + "name": "punctuation.separator.dot-access.c" + }, + "3": { + "name": "punctuation.separator.pointer-access.c" + }, + "4": { + "patterns": [ + { + "match": "\\.", + "name": "punctuation.separator.dot-access.c" + }, + { + "match": "->", + "name": "punctuation.separator.pointer-access.c" + }, + { + "match": "[a-zA-Z_][a-zA-Z_0-9]*", + "name": "variable.object.c" + }, + { + "name": "everything.else.c", + "match": ".+" + } + ] + }, + "5": { + "name": "entity.name.function.member.c" + }, + "6": { + "name": "punctuation.section.arguments.begin.bracket.round.function.member.c" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.arguments.end.bracket.round.function.member.c" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + "anon_pattern_1": { + "match": "\\b(break|continue|do|else|for|goto|if|_Pragma|return|while)\\b", + "name": "keyword.control.c" + }, + "anon_pattern_10": { + "match": "(?x) \\b\n(int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t\n|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t\n|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t\n|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t\n|uintmax_t|uintmax_t)\n\\b", + "name": "support.type.stdint.c" + }, + "anon_pattern_11": { + "match": "\\b(noErr|kNilOptions|kInvalidID|kVariableLengthArray)\\b", + "name": "support.constant.mac-classic.c" + }, + "anon_pattern_12": { + "match": "(?x) \\b\n(AbsoluteTime|Boolean|Byte|ByteCount|ByteOffset|BytePtr|CompTimeValue|ConstLogicalAddress|ConstStrFileNameParam\n|ConstStringPtr|Duration|Fixed|FixedPtr|Float32|Float32Point|Float64|Float80|Float96|FourCharCode|Fract|FractPtr\n|Handle|ItemCount|LogicalAddress|OptionBits|OSErr|OSStatus|OSType|OSTypePtr|PhysicalAddress|ProcessSerialNumber\n|ProcessSerialNumberPtr|ProcHandle|Ptr|ResType|ResTypePtr|ShortFixed|ShortFixedPtr|SignedByte|SInt16|SInt32|SInt64\n|SInt8|Size|StrFileName|StringHandle|StringPtr|TimeBase|TimeRecord|TimeScale|TimeValue|TimeValue64|UInt16|UInt32\n|UInt64|UInt8|UniChar|UniCharCount|UniCharCountPtr|UniCharPtr|UnicodeScalarValue|UniversalProcHandle|UniversalProcPtr\n|UnsignedFixed|UnsignedFixedPtr|UnsignedWide|UTF16Char|UTF32Char|UTF8Char)\n\\b", + "name": "support.type.mac-classic.c" + }, + "anon_pattern_13": { + "match": "\\b([A-Za-z0-9_]+_t)\\b", + "name": "support.type.posix-reserved.c" + }, + "anon_pattern_14": { + "match": ";", + "name": "punctuation.terminator.statement.c" + }, + "anon_pattern_15": { + "match": ",", + "name": "punctuation.separator.delimiter.c" + }, + "anon_pattern_2": { + "match": "typedef", + "name": "keyword.other.typedef.c" + }, + "anon_pattern_3": { + "match": "\\b(const|extern|register|restrict|static|volatile|inline)\\b", + "name": "storage.modifier.c" + }, + "anon_pattern_4": { + "match": "\\bk[A-Z]\\w*\\b", + "name": "constant.other.variable.mac-classic.c" + }, + "anon_pattern_5": { + "match": "\\bg[A-Z]\\w*\\b", + "name": "variable.other.readwrite.global.mac-classic.c" + }, + "anon_pattern_6": { + "match": "\\bs[A-Z]\\w*\\b", + "name": "variable.other.readwrite.static.mac-classic.c" + }, + "anon_pattern_7": { + "match": "\\b(NULL|true|false|TRUE|FALSE)\\b", + "name": "constant.language.c" + }, + "anon_pattern_8": { + "match": "\\b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\b", + "name": "support.type.sys-types.c" + }, + "anon_pattern_9": { + "match": "\\b(pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t)\\b", + "name": "support.type.pthread.c" + }, + "anon_pattern_range_1": { + "name": "meta.preprocessor.macro.c", + "begin": "((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((#)\\s*define\\b)\\s+((?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.c" + } + }, + "name": "string.quoted.other.lt-gt.include.c" + } + ] + }, + "anon_pattern_range_4": { + "begin": "^\\s*((#)\\s*line)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.line.c" + }, + "2": { + "name": "punctuation.definition.directive.c" + } + }, + "end": "(?=(?://|/\\*))|(?=+!]+ | \\(\\) | \\[\\]))\n)\n\\s*(\\() # opening bracket", + "beginCaptures": { + "1": { + "name": "variable.other.c" + }, + "2": { + "name": "punctuation.section.parens.begin.bracket.round.initialization.c" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.initialization.c" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.c" + } + }, + "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.c" + } + }, + "patterns": [ + { + "include": "#block_innards" + } + ] + }, + { + "include": "#parens-block" + }, + { + "include": "$self" + } + ] + }, + "c_conditional_context": { + "patterns": [ + { + "include": "$self" + }, + { + "include": "#block_innards" + } + ] + }, + "c_function_call": { + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(?=\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", + "end": "(?<=\\))(?!\\w)", + "name": "meta.function-call.c", + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + "case_statement": { + "name": "meta.conditional.case.c", + "begin": "((?>(?:(?:(?>(?(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))((?\\s*)(\\/\\/[!\\/]+)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.documentation.c" + } + }, + "end": "(?<=\\n)(?|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.c" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.c" + }, + "2": { + "name": "markup.italic.doxygen.c" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]b)\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.c" + }, + "2": { + "name": "markup.bold.doxygen.c" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.c" + }, + "2": { + "name": "markup.inline.raw.string.c" + } + } + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.c" + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.c" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?\\s*(?:in|out)\\s*)+)\\])?\\s+(\\b\\w+\\b)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.c" + }, + "2": { + "patterns": [ + { + "match": "in|out", + "name": "keyword.other.parameter.direction.$0.c" + } + ] + }, + "3": { + "name": "variable.parameter.c" + } + } + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.c" + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.c" + }, + { + "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", + "name": "storage.type.class.gtkdoc" + } + ] + }, + { + "match": "(\\/\\*[!*]+(?=\\s))(.+)([!*]*\\*\\/)", + "captures": { + "1": { + "name": "punctuation.definition.comment.begin.documentation.c" + }, + "2": { + "patterns": [ + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:callergraph|callgraph|else|endif|f\\$|f\\[|f\\]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|\\$|\\#|<|>|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.c" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.c" + }, + "2": { + "name": "markup.italic.doxygen.c" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]b)\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.c" + }, + "2": { + "name": "markup.bold.doxygen.c" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.c" + }, + "2": { + "name": "markup.inline.raw.string.c" + } + } + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.c" + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.c" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?\\s*(?:in|out)\\s*)+)\\])?\\s+(\\b\\w+\\b)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.c" + }, + "2": { + "patterns": [ + { + "match": "in|out", + "name": "keyword.other.parameter.direction.$0.c" + } + ] + }, + "3": { + "name": "variable.parameter.c" + } + } + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.c" + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.c" + }, + { + "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", + "name": "storage.type.class.gtkdoc" + } + ] + }, + "3": { + "name": "punctuation.definition.comment.end.documentation.c" + } + }, + "name": "comment.block.documentation.c" + }, + { + "name": "comment.block.documentation.c", + "begin": "((?>\\s*)\\/\\*[!*]+(?:(?:\\n|$)|(?=\\s)))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.begin.documentation.c" + } + }, + "end": "([!*]*\\*\\/)", + "endCaptures": { + "1": { + "name": "punctuation.definition.comment.end.documentation.c" + } + }, + "patterns": [ + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:callergraph|callgraph|else|endif|f\\$|f\\[|f\\]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|\\$|\\#|<|>|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.c" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.c" + }, + "2": { + "name": "markup.italic.doxygen.c" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]b)\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.c" + }, + "2": { + "name": "markup.bold.doxygen.c" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.c" + }, + "2": { + "name": "markup.inline.raw.string.c" + } + } + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.c" + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.c" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?\\s*(?:in|out)\\s*)+)\\])?\\s+(\\b\\w+\\b)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.c" + }, + "2": { + "patterns": [ + { + "match": "in|out", + "name": "keyword.other.parameter.direction.$0.c" + } + ] + }, + "3": { + "name": "variable.parameter.c" + } + } + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.c" + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.c" + }, + { + "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", + "name": "storage.type.class.gtkdoc" + } + ] + }, + { + "match": "^\\/\\* =(\\s*.*?)\\s*= \\*\\/$\\n?", + "captures": { + "1": { + "name": "meta.toc-list.banner.block.c" + } + }, + "name": "comment.block.banner.c" + }, + { + "name": "comment.block.c", + "begin": "(\\/\\*)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.begin.c" + } + }, + "end": "(\\*\\/)", + "endCaptures": { + "1": { + "name": "punctuation.definition.comment.end.c" + } + } + }, + { + "match": "^\\/\\/ =(\\s*.*?)\\s*=$\\n?", + "captures": { + "1": { + "name": "meta.toc-list.banner.line.c" + } + }, + "name": "comment.line.banner.c" + }, + { + "begin": "((?:^[ \\t]+)?)(?=\\/\\/)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.c" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "name": "comment.line.double-slash.c", + "begin": "(\\/\\/)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.c" + } + }, + "end": "(?=\\n)", + "patterns": [ + { + "include": "#line_continuation_character" + } + ] + } + ] + } + ] + }, + { + "include": "#block_comment" + }, + { + "include": "#line_comment" + } + ] + }, + { + "include": "#block_comment" + }, + { + "include": "#line_comment" + } + ] + }, + "default_statement": { + "name": "meta.conditional.case.c", + "begin": "((?>(?:(?:(?>(?(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))((?=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.c" + }, + "2": { + "name": "punctuation.section.arguments.begin.bracket.round.c" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.arguments.end.bracket.round.c" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.c" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.c" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + { + "include": "#block_innards" + } + ] + }, + "function-innards": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#storage_types" + }, + { + "include": "#operators" + }, + { + "include": "#vararg_ellipses" + }, + { + "name": "meta.function.definition.parameters.c", + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.c" + }, + "2": { + "name": "punctuation.section.parameters.begin.bracket.round.c" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parameters.end.bracket.round.c" + } + }, + "patterns": [ + { + "include": "#probably_a_parameter" + }, + { + "include": "#function-innards" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.c" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.c" + } + }, + "patterns": [ + { + "include": "#function-innards" + } + ] + }, + { + "include": "$self" + } + ] + }, + "inline_comment": { + "patterns": [ + { + "patterns": [ + { + "match": "(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/))", + "captures": { + "1": { + "name": "comment.block.c punctuation.definition.comment.begin.c" + }, + "2": { + "name": "comment.block.c" + }, + "3": { + "patterns": [ + { + "match": "\\*\\/", + "name": "comment.block.c punctuation.definition.comment.end.c" + }, + { + "match": "\\*", + "name": "comment.block.c" + } + ] + } + } + }, + { + "match": "(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/))", + "captures": { + "1": { + "name": "comment.block.c punctuation.definition.comment.begin.c" + }, + "2": { + "name": "comment.block.c" + }, + "3": { + "patterns": [ + { + "match": "\\*\\/", + "name": "comment.block.c punctuation.definition.comment.end.c" + }, + { + "match": "\\*", + "name": "comment.block.c" + } + ] + } + } + } + ] + }, + { + "match": "(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/))", + "captures": { + "1": { + "name": "comment.block.c punctuation.definition.comment.begin.c" + }, + "2": { + "name": "comment.block.c" + }, + "3": { + "patterns": [ + { + "match": "\\*\\/", + "name": "comment.block.c punctuation.definition.comment.end.c" + }, + { + "match": "\\*", + "name": "comment.block.c" + } + ] + } + } + } + ] + }, + "line_comment": { + "patterns": [ + { + "begin": "\\s*+(\\/\\/)", + "end": "(?<=\\n)(?\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_int_least64_t|atomic_int_least32_t|pthread_rwlockattr_t|atomic_uint_fast16_t|pthread_mutexattr_t|atomic_int_fast16_t|atomic_uint_fast8_t|atomic_int_fast64_t|atomic_int_least8_t|atomic_int_fast32_t|atomic_int_fast8_t|pthread_condattr_t|atomic_uintptr_t|atomic_ptrdiff_t|pthread_rwlock_t|atomic_uintmax_t|pthread_mutex_t|atomic_intmax_t|atomic_intptr_t|atomic_char32_t|atomic_char16_t|pthread_attr_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_cond_t|pthread_once_t|uint_fast64_t|uint_fast16_t|atomic_size_t|uint_least8_t|int_least64_t|int_least32_t|int_least16_t|pthread_key_t|atomic_ullong|atomic_ushort|uint_fast32_t|atomic_schar|atomic_short|uint_fast8_t|int_fast64_t|int_fast32_t|int_fast16_t|atomic_ulong|atomic_llong|int_least8_t|atomic_uchar|memory_order|suseconds_t|int_fast8_t|atomic_bool|atomic_char|atomic_uint|atomic_long|atomic_int|useconds_t|_Imaginary|blksize_t|pthread_t|in_addr_t|uintptr_t|in_port_t|uintmax_t|uintmax_t|blkcnt_t|uint16_t|unsigned|_Complex|uint32_t|intptr_t|intmax_t|intmax_t|uint64_t|u_quad_t|int64_t|int32_t|ssize_t|caddr_t|clock_t|uint8_t|u_short|swblk_t|segsz_t|int16_t|fixpt_t|daddr_t|nlink_t|qaddr_t|size_t|time_t|mode_t|signed|quad_t|ushort|u_long|u_char|double|int8_t|ino_t|uid_t|pid_t|_Bool|float|dev_t|div_t|short|gid_t|off_t|u_int|key_t|id_t|uint|long|void|char|bool|id_t|int)\\b)[a-zA-Z_]\\w*\\b(?!\\())", + "captures": { + "1": { + "name": "variable.other.object.access.c" + }, + "2": { + "name": "punctuation.separator.dot-access.c" + }, + "3": { + "name": "punctuation.separator.pointer-access.c" + }, + "4": { + "patterns": [ + { + "include": "#member_access" + }, + { + "include": "#method_access" + }, + { + "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))", + "captures": { + "1": { + "name": "variable.other.object.access.c" + }, + "2": { + "name": "punctuation.separator.dot-access.c" + }, + "3": { + "name": "punctuation.separator.pointer-access.c" + } + } + } + ] + }, + "5": { + "name": "variable.other.member.c" + } + } + }, + "method_access": { + "contentName": "meta.function-call.member.c", + "begin": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*([a-zA-Z_]\\w*)(\\()", + "beginCaptures": { + "1": { + "name": "variable.other.object.access.c" + }, + "2": { + "name": "punctuation.separator.dot-access.c" + }, + "3": { + "name": "punctuation.separator.pointer-access.c" + }, + "4": { + "patterns": [ + { + "include": "#member_access" + }, + { + "include": "#method_access" + }, + { + "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))", + "captures": { + "1": { + "name": "variable.other.object.access.c" + }, + "2": { + "name": "punctuation.separator.dot-access.c" + }, + "3": { + "name": "punctuation.separator.pointer-access.c" + } + } + } + ] + }, + "5": { + "name": "entity.name.function.member.c" + }, + "6": { + "name": "punctuation.section.arguments.begin.bracket.round.function.member.c" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.arguments.end.bracket.round.function.member.c" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + "numbers": { + "match": "(?>=|\\|=", + "name": "keyword.operator.assignment.compound.bitwise.c" + }, + { + "match": "<<|>>", + "name": "keyword.operator.bitwise.shift.c" + }, + { + "match": "!=|<=|>=|==|<|>", + "name": "keyword.operator.comparison.c" + }, + { + "match": "&&|!|\\|\\|", + "name": "keyword.operator.logical.c" + }, + { + "match": "&|\\||\\^|~", + "name": "keyword.operator.c" + }, + { + "match": "=", + "name": "keyword.operator.assignment.c" + }, + { + "match": "%|\\*|/|-|\\+", + "name": "keyword.operator.c" + }, + { + "begin": "(\\?)", + "beginCaptures": { + "1": { + "name": "keyword.operator.ternary.c" + } + }, + "end": "(:)", + "endCaptures": { + "1": { + "name": "keyword.operator.ternary.c" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + }, + { + "include": "$self" + } + ] + } + ] + }, + "parens": { + "name": "meta.parens.c", + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.c" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.c" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + "parens-block": { + "name": "meta.parens.block.c", + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.c" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.c" + } + }, + "patterns": [ + { + "include": "#block_innards" + }, + { + "match": "(?-mix:(?=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", + "end": "(?<=\\))(?!\\w)|(?=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.c" + }, + "2": { + "name": "punctuation.section.arguments.begin.bracket.round.c" + } + }, + "end": "(\\))|(?\\]\\)]))\\s*([a-zA-Z_]\\w*)\\s*(?=(?:\\[\\]\\s*)?(?:,|\\)))", + "captures": { + "1": { + "name": "variable.parameter.probably.c" + } + } + }, + "static_assert": { + "begin": "((?>(?:(?:(?>(?(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))((?(?:(?:(?>(?(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.c punctuation.definition.comment.begin.c" + }, + "3": { + "name": "comment.block.c" + }, + "4": { + "patterns": [ + { + "match": "\\*\\/", + "name": "comment.block.c punctuation.definition.comment.end.c" + }, + { + "match": "\\*", + "name": "comment.block.c" + } + ] + }, + "5": { + "name": "keyword.other.static_assert.c" + }, + "6": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "7": { + "name": "comment.block.c punctuation.definition.comment.begin.c" + }, + "8": { + "name": "comment.block.c" + }, + "9": { + "patterns": [ + { + "match": "\\*\\/", + "name": "comment.block.c punctuation.definition.comment.end.c" + }, + { + "match": "\\*", + "name": "comment.block.c" + } + ] + }, + "10": { + "name": "punctuation.section.arguments.begin.bracket.round.static_assert.c" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.arguments.end.bracket.round.static_assert.c" + } + }, + "patterns": [ + { + "name": "meta.static_assert.message.c", + "begin": "(,)\\s*(?=(?:L|u8|u|U\\s*\\\")?)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.delimiter.comma.c" + } + }, + "end": "(?=\\))", + "patterns": [ + { + "include": "#string_context" + } + ] + }, + { + "include": "#evaluation_context" + } + ] + }, + "storage_types": { + "patterns": [ + { + "match": "(?-mix:(?\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:\\n|$)", + "captures": { + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.c punctuation.definition.comment.begin.c" + }, + "3": { + "name": "comment.block.c" + }, + "4": { + "patterns": [ + { + "match": "\\*\\/", + "name": "comment.block.c punctuation.definition.comment.end.c" + }, + { + "match": "\\*", + "name": "comment.block.c" + } + ] + } + } + }, + { + "include": "#comments" + }, + { + "begin": "(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\()", + "beginCaptures": { + "1": { + "name": "punctuation.section.parens.begin.bracket.round.assembly.c" + }, + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "3": { + "name": "comment.block.c punctuation.definition.comment.begin.c" + }, + "4": { + "name": "comment.block.c" + }, + "5": { + "patterns": [ + { + "match": "\\*\\/", + "name": "comment.block.c punctuation.definition.comment.end.c" + }, + { + "match": "\\*", + "name": "comment.block.c" + } + ] + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.parens.end.bracket.round.assembly.c" + } + }, + "patterns": [ + { + "name": "string.quoted.double.c", + "contentName": "meta.embedded.assembly.c", + "begin": "(R?)(\")", + "beginCaptures": { + "1": { + "name": "meta.encoding.c" + }, + "2": { + "name": "punctuation.definition.string.begin.assembly.c" + } + }, + "end": "(\")", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.assembly.c" + } + }, + "patterns": [ + { + "include": "source.asm" + }, + { + "include": "source.x86" + }, + { + "include": "source.x86_64" + }, + { + "include": "source.arm" + }, + { + "include": "#backslash_escapes" + }, + { + "include": "#string_escaped_char" + } + ] + }, + { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.section.parens.begin.bracket.round.assembly.inner.c" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.parens.end.bracket.round.assembly.inner.c" + } + }, + "patterns": [ + { + "include": "#evaluation_context" + } + ] + }, + { + "match": "\\[((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))([a-zA-Z_]\\w*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\]", + "captures": { + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.c punctuation.definition.comment.begin.c" + }, + "3": { + "name": "comment.block.c" + }, + "4": { + "patterns": [ + { + "match": "\\*\\/", + "name": "comment.block.c punctuation.definition.comment.end.c" + }, + { + "match": "\\*", + "name": "comment.block.c" + } + ] + }, + "5": { + "name": "variable.other.asm.label.c" + }, + "6": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "7": { + "name": "comment.block.c punctuation.definition.comment.begin.c" + }, + "8": { + "name": "comment.block.c" + }, + "9": { + "patterns": [ + { + "match": "\\*\\/", + "name": "comment.block.c punctuation.definition.comment.end.c" + }, + { + "match": "\\*", + "name": "comment.block.c" + } + ] + } + } + }, + { + "match": ":", + "name": "punctuation.separator.delimiter.colon.assembly.c" + }, + { + "include": "#comments" + } + ] + } + ] + } + ] + }, + "string_escaped_char": { + "patterns": [ + { + "match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )", + "name": "constant.character.escape.c" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unknown-escape.c" + } + ] + }, + "string_placeholder": { + "patterns": [ + { + "match": "(?x) %\n(\\d+\\$)?\t\t\t\t\t\t # field (argument #)\n[#0\\- +']*\t\t\t\t\t\t # flags\n[,;:_]?\t\t\t\t\t\t\t # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)?\t\t # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?\t# precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%]\t\t # conversion type", + "name": "constant.other.placeholder.c" + }, + { + "match": "(%)(?!\"\\s*(PRI|SCN))", + "captures": { + "1": { + "name": "invalid.illegal.placeholder.c" + } + } + } + ] + }, + "strings": { + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.c" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.c" + } + }, + "name": "string.quoted.double.c", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_placeholder" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.c" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.c" + } + }, + "name": "string.quoted.single.c", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#line_continuation_character" + } + ] + } + ] + }, + "switch_conditional_parentheses": { + "name": "meta.conditional.switch.c", + "begin": "((?>(?:(?:(?>(?(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.c punctuation.definition.comment.begin.c" + }, + "3": { + "name": "comment.block.c" + }, + "4": { + "patterns": [ + { + "match": "\\*\\/", + "name": "comment.block.c punctuation.definition.comment.end.c" + }, + { + "match": "\\*", + "name": "comment.block.c" + } + ] + }, + "5": { + "name": "punctuation.section.parens.begin.bracket.round.conditional.switch.c" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.parens.end.bracket.round.conditional.switch.c" + } + }, + "patterns": [ + { + "include": "#evaluation_context" + }, + { + "include": "#c_conditional_context" + } + ] + }, + "switch_statement": { + "name": "meta.block.switch.c", + "begin": "(((?>(?:(?:(?>(?(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))((?|\\?\\?>)|(?=[;>\\[\\]=]))", + "patterns": [ + { + "name": "meta.head.switch.c", + "begin": "\\G ?", + "end": "((?:\\{|<%|\\?\\?<|(?=;)))", + "endCaptures": { + "1": { + "name": "punctuation.section.block.begin.bracket.curly.switch.c" + } + }, + "patterns": [ + { + "include": "#switch_conditional_parentheses" + }, + { + "include": "$self" + } + ] + }, + { + "name": "meta.body.switch.c", + "begin": "(?<=\\{|<%|\\?\\?<)", + "end": "(\\}|%>|\\?\\?>)", + "endCaptures": { + "1": { + "name": "punctuation.section.block.end.bracket.curly.switch.c" + } + }, + "patterns": [ + { + "include": "#default_statement" + }, + { + "include": "#case_statement" + }, + { + "include": "$self" + }, + { + "include": "#block_innards" + } + ] + }, + { + "name": "meta.tail.switch.c", + "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", + "end": "[\\s\\n]*(?=;)", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "vararg_ellipses": { + "match": "(?|<|>=|<=", + "name": "keyword.operator.comparison.cadence" + }, + { + "match": "\\?\\?", + "name": "keyword.operator.coalescing.cadence" + }, + { + "match": "&&|\\|\\|", + "name": "keyword.operator.logical.cadence" + }, + { + "match": "[?!]", + "name": "keyword.operator.type.optional.cadence" + } + ] + }, + "keywords": { + "patterns": [ + { + "match": "(?&|\\^~.])(:)(?![/=\\-+!*%<>&|\\^~.])\\s*", + "beginCaptures": { + "1": { + "name": "keyword.operator.function-result.cadence" + } + }, + "end": "(?!\\G)(?=\\{|;)|$", + "name": "meta.function-result.cadence", + "patterns": [ + { + "include": "#type" + } + ] + }, + "expressions": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#function-call-expression" + }, + { + "include": "#literals" + }, + { + "include": "#operators" + }, + { + "include": "#language-variables" + } + ] + }, + "language-variables": { + "patterns": [ + { + "match": "\\b(self)\\b", + "name": "variable.language.cadence" + } + ] + }, + "function-call-expression": { + "patterns": [ + { + "begin": "(?!(?:set|init))([\\p{L}_][\\p{L}_\\p{N}\\p{M}]*)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "support.function.any-method.cadence" + }, + "4": { + "name": "punctuation.definition.arguments.begin.cadence" + } + }, + "comment": "foo(args) -- a call whose callee is a highlightable name", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.cadence" + } + }, + "name": "meta.function-call.cadence", + "patterns": [ + { + "include": "#expression-element-list" + } + ] + } + ] + }, + "expression-element-list": { + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "([\\p{L}_][\\p{L}_\\p{N}\\p{M}]*)\\s*(:)", + "beginCaptures": { + "1": { + "name": "support.function.any-method.cadence" + }, + "2": { + "name": "punctuation.separator.argument-label.cadence" + } + }, + "comment": "an element with a label", + "end": "(?=[,)\\]])", + "patterns": [ + { + "include": "#expressions" + } + ] + }, + { + "begin": "(?![,)\\]])(?=\\S)", + "comment": "an element without a label (i.e. anything else)", + "end": "(?=[,)\\]])", + "patterns": [ + { + "include": "#expressions" + } + ] + } + ] + }, + "declarations": { + "patterns": [ + { + "include": "#var-let-declaration" + }, + { + "include": "#function" + }, + { + "include": "#initializer" + } + ] + }, + "var-let-declaration": { + "begin": "\\b(var|let)\\b\\s+([\\p{L}_][\\p{L}_\\p{N}\\p{M}]*)", + "beginCaptures": { + "1": { + "name": "storage.type.$1.cadence" + }, + "2": { + "name": "entity.name.type.$1.cadence" + } + }, + "end": "=|<-|<-!|$", + "patterns": [ + { + "include": "#type" + } + ] + }, + "type": { + "patterns": [ + { + "include": "#comments" + }, + { + "match": "([\\p{L}_][\\p{L}_\\p{N}\\p{M}]*)", + "name": "storage.type.cadence" + } + ] + }, + "parameter-clause": { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.parameters.begin.cadence" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.cadence" + } + }, + "name": "meta.parameter-clause.cadence", + "patterns": [ + { + "include": "#parameter-list" + } + ] + }, + "parameter-list": { + "patterns": [ + { + "match": "([\\p{L}_][\\p{L}_\\p{N}\\p{M}]*)\\s+([\\p{L}_][\\p{L}_\\p{N}\\p{M}]*)(?=\\s*:)", + "captures": { + "1": { + "name": "entity.name.function.cadence" + }, + "2": { + "name": "variable.parameter.function.cadence" + } + }, + "comment": "External parameter labels are considered part of the function name" + }, + { + "match": "(([\\p{L}_][\\p{L}_\\p{N}\\p{M}]*))(?=\\s*:)", + "captures": { + "1": { + "name": "variable.parameter.function.cadence" + }, + "2": { + "name": "entity.name.function.cadence" + } + }, + "comment": "If no external label is given, the name is both the external label and the internal variable name" + }, + { + "begin": ":\\s*(?!\\s)", + "end": "(?=[,)])", + "patterns": [ + { + "include": "#type" + }, + { + "match": ":", + "name": "invalid.illegal.extra-colon-in-parameter-list.cadence" + } + ] + } + ] + }, + "event": { + "begin": "\\b(event)\\b\\s+([\\p{L}_][\\p{L}_\\p{N}\\p{M}]*)\\s*", + "beginCaptures": { + "1": { + "name": "storage.type.event.cadence" + }, + "2": { + "name": "entity.name.type.event.cadence" + } + }, + "end": "(?<=\\))|$", + "name": "meta.definition.type.event.cadence", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#parameter-clause" + } + ] + }, + "composite": { + "begin": "\\b((?:(?:struct|resource|contract)(?:\\s+interface)?)|transaction|enum)\\s+([\\p{L}_][\\p{L}_\\p{N}\\p{M}]*)", + "beginCaptures": { + "1": { + "name": "storage.type.$1.cadence" + }, + "2": { + "name": "entity.name.type.$1.cadence" + } + }, + "end": "(?<=\\})", + "name": "meta.definition.type.composite.cadence", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#conformance-clause" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.type.begin.cadence" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.type.end.cadence" + } + }, + "name": "meta.definition.type.body.cadence", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "conformance-clause": { + "begin": "(:)(?=\\s*\\{)|(:)\\s*", + "beginCaptures": { + "1": { + "name": "invalid.illegal.empty-conformance-clause.cadence" + }, + "2": { + "name": "punctuation.separator.conformance-clause.cadence" + } + }, + "end": "(?!\\G)$|(?=[={}])", + "name": "meta.conformance-clause.cadence", + "patterns": [ + { + "begin": "\\G", + "end": "(?!\\G)$|(?=[={}])", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#type" + } + ] + } + ] + } + }, + "name": "cadence" +} diff --git a/src/lib/shiki/languages/clarity.tmLanguage.json b/src/lib/shiki/languages/clarity.tmLanguage.json new file mode 100644 index 0000000..bea1c28 --- /dev/null +++ b/src/lib/shiki/languages/clarity.tmLanguage.json @@ -0,0 +1,878 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "clarity", + "scopeName": "source.clar", + "uuid": "f9e9871d-2ea6-4be0-afd2-fc382d704716", + "patterns": [ + { + "include": "#expression" + }, + { + "include": "#define-constant" + }, + { + "include": "#define-data-var" + }, + { + "include": "#define-map" + }, + { + "include": "#define-function" + }, + { + "include": "#define-fungible-token" + }, + { + "include": "#define-non-fungible-token" + }, + { + "include": "#define-trait" + }, + { + "include": "#use-trait" + } + ], + "repository": { + "comment": { + "name": "comment.line.semicolon.clarity", + "match": "(?x) (?<=^|[()\\[\\]{}\",'`;\\s]) (;) .* $" + }, + "expression": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#keyword" + }, + { + "include": "#literal" + }, + { + "include": "#let-func" + }, + { + "include": "#built-in-func" + }, + { + "include": "#get-set-func" + } + ] + }, + "keyword": { + "name": "constant.language.clarity", + "match": "(?\\=|<|>|\\*|/|and|append|as-contract|as-max-len\\?|asserts!|at-block|begin|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|buff-to-int-be|buff-to-int-le|buff-to-uint-be|buff-to-uint-le|concat|contract-call\\?|contract-of|default-to|element-at|element-at\\?|filter|fold|from-consensus-buff\\?|ft-burn\\?|ft-get-balance|ft-get-supply|ft-mint\\?|ft-transfer\\?|get-block-info\\?|get-burn-block-info\\?|hash160|if|impl-trait|index-of|index-of\\?|int-to-ascii|int-to-utf8|is-eq|is-err|is-none|is-ok|is-some|is-standard|keccak256|len|log2|map|match|merge|mod|nft-burn\\?|nft-get-owner\\?|nft-mint\\?|nft-transfer\\?|not|or|pow|principal-construct\\?|principal-destruct\\?|principal-of\\?|print|replace-at\\?|secp256k1-recover\\?|secp256k1-verify|sha256|sha512|sha512/256|slice\\?|sqrti|string-to-int\\?|string-to-uint\\?|stx-account|stx-burn\\?|stx-get-balance|stx-transfer-memo\\?|stx-transfer\\?|to-consensus-buff\\?|to-int|to-uint|try!|unwrap!|unwrap-err!|unwrap-err-panic|unwrap-panic|xor) \\s+", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "punctuation.built-in-function.start.clarity" + }, + "2": { + "name": "keyword.declaration.built-in-function.clarity" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.built-in-function.end.clarity" + } + }, + "name": "meta.built-in-function", + "patterns": [ + { + "include": "#expression" + }, + { + "include": "#user-func" + } + ] + }, + "get-set-func": { + "name": "meta.get-set-func", + "begin": "(?x) (\\() \\s* (var-get|var-set|map-get\\?|map-set|map-insert|map-delete|get) \\s+ ([a-zA-Z][\\w\\?\\!\\-]*) \\s*", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "punctuation.get-set-func.start.clarity" + }, + "2": { + "name": "keyword.control.clarity" + }, + "3": { + "name": "variable.other.clarity" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.get-set-func.end.clarity" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "let-func": { + "begin": "(?x) (\\() \\s* (let) \\s*", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "punctuation.let-function.start.clarity" + }, + "2": { + "name": "keyword.declaration.let-function.clarity" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.let-function.end.clarity" + } + }, + "name": "meta.let-function", + "patterns": [ + { + "include": "#expression" + }, + { + "include": "#user-func" + }, + { + "begin": "(?x) (\\() \\s*", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "punctuation.let-var.start.clarity" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.let-var.end.clarity" + } + }, + "name": "meta.let-var", + "patterns": [ + { + "begin": "(?x) (\\() ([a-zA-Z][\\w\\?\\!\\-]*) \\s+", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "punctuation.let-local-var.start.clarity" + }, + "2": { + "name": "entity.name.let-local-var-name.clarity variable.parameter.clarity" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.let-local-var.end.clarity" + } + }, + "name": "meta.let-local-var", + "patterns": [ + { + "include": "#expression" + }, + { + "include": "#user-func" + } + ] + }, + { + "include": "#expression" + } + ] + } + ] + }, + "user-func": { + "begin": "(?x) (\\() \\s* (([a-zA-Z][\\w\\?\\!\\-]*)) \\s*", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "punctuation.user-function.start.clarity" + }, + "2": { + "name": "entity.name.function.clarity" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.user-function.end.clarity" + } + }, + "name": "meta.user-function", + "patterns": [ + { + "include": "#expression" + }, + { + "include": "$self" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/clojure.tmLanguage.json b/src/lib/shiki/languages/clojure.tmLanguage.json new file mode 100644 index 0000000..d078016 --- /dev/null +++ b/src/lib/shiki/languages/clojure.tmLanguage.json @@ -0,0 +1,431 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-clojure/blob/master/grammars/clojure.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/atom/language-clojure/commit/45bdb881501d0b8f8b707ca1d3fcc8b4b99fca03", + "name": "clojure", + "scopeName": "source.clojure", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#shebang-comment" + }, + { + "include": "#quoted-sexp" + }, + { + "include": "#sexp" + }, + { + "include": "#keyfn" + }, + { + "include": "#string" + }, + { + "include": "#vector" + }, + { + "include": "#set" + }, + { + "include": "#map" + }, + { + "include": "#regexp" + }, + { + "include": "#var" + }, + { + "include": "#constants" + }, + { + "include": "#dynamic-variables" + }, + { + "include": "#metadata" + }, + { + "include": "#namespace-symbol" + }, + { + "include": "#symbol" + } + ], + "repository": { + "comment": { + "begin": "(?\\<\\/\\!\\?\\*]+(?=(\\s|\\)|\\]|\\}|\\,))", + "name": "constant.keyword.clojure" + }, + "keyfn": { + "patterns": [ + { + "match": "(?<=(\\s|\\(|\\[|\\{))(if(-[-\\p{Ll}\\?]*)?|when(-[-\\p{Ll}]*)?|for(-[-\\p{Ll}]*)?|cond|do|let(-[-\\p{Ll}\\?]*)?|binding|loop|recur|fn|throw[\\p{Ll}\\-]*|try|catch|finally|([\\p{Ll}]*case))(?=(\\s|\\)|\\]|\\}))", + "name": "storage.control.clojure" + }, + { + "match": "(?<=(\\s|\\(|\\[|\\{))(declare-?|(in-)?ns|import|use|require|load|compile|(def[\\p{Ll}\\-]*))(?=(\\s|\\)|\\]|\\}))", + "name": "keyword.control.clojure" + } + ] + }, + "dynamic-variables": { + "match": "\\*[\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\d]+\\*", + "name": "meta.symbol.dynamic.clojure" + }, + "map": { + "begin": "(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.section.map.begin.clojure" + } + }, + "end": "(\\}(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\})", + "endCaptures": { + "1": { + "name": "punctuation.section.map.end.trailing.clojure" + }, + "2": { + "name": "punctuation.section.map.end.clojure" + } + }, + "name": "meta.map.clojure", + "patterns": [ + { + "include": "$self" + } + ] + }, + "metadata": { + "patterns": [ + { + "begin": "(\\^\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.section.metadata.map.begin.clojure" + } + }, + "end": "(\\}(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\})", + "endCaptures": { + "1": { + "name": "punctuation.section.metadata.map.end.trailing.clojure" + }, + "2": { + "name": "punctuation.section.metadata.map.end.clojure" + } + }, + "name": "meta.metadata.map.clojure", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "(\\^)", + "end": "(\\s)", + "name": "meta.metadata.simple.clojure", + "patterns": [ + { + "include": "#keyword" + }, + { + "include": "$self" + } + ] + } + ] + }, + "quoted-sexp": { + "begin": "(['``]\\()", + "beginCaptures": { + "1": { + "name": "punctuation.section.expression.begin.clojure" + } + }, + "end": "(\\))$|(\\)(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.expression.end.trailing.clojure" + }, + "2": { + "name": "punctuation.section.expression.end.trailing.clojure" + }, + "3": { + "name": "punctuation.section.expression.end.clojure" + } + }, + "name": "meta.quoted-expression.clojure", + "patterns": [ + { + "include": "$self" + } + ] + }, + "regexp": { + "begin": "#\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.regexp.begin.clojure" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.regexp.end.clojure" + } + }, + "name": "string.regexp.clojure", + "patterns": [ + { + "include": "#regexp_escaped_char" + } + ] + }, + "regexp_escaped_char": { + "match": "\\\\.", + "name": "constant.character.escape.clojure" + }, + "set": { + "begin": "(\\#\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.section.set.begin.clojure" + } + }, + "end": "(\\}(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\})", + "endCaptures": { + "1": { + "name": "punctuation.section.set.end.trailing.clojure" + }, + "2": { + "name": "punctuation.section.set.end.clojure" + } + }, + "name": "meta.set.clojure", + "patterns": [ + { + "include": "$self" + } + ] + }, + "sexp": { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.section.expression.begin.clojure" + } + }, + "end": "(\\))$|(\\)(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.expression.end.trailing.clojure" + }, + "2": { + "name": "punctuation.section.expression.end.trailing.clojure" + }, + "3": { + "name": "punctuation.section.expression.end.clojure" + } + }, + "name": "meta.expression.clojure", + "patterns": [ + { + "begin": "(?<=\\()(ns|declare|def[\\w\\d._:+=>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)", + "name": "entity.global.clojure" + }, + { + "include": "$self" + } + ] + }, + { + "include": "#keyfn" + }, + { + "include": "#constants" + }, + { + "include": "#vector" + }, + { + "include": "#map" + }, + { + "include": "#set" + }, + { + "include": "#sexp" + }, + { + "match": "(?<=\\()(.+?)(?=\\s|\\))", + "captures": { + "1": { + "name": "entity.name.function.clojure" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "$self" + } + ] + }, + "shebang-comment": { + "begin": "^(#!)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.shebang.clojure" + } + }, + "end": "$", + "name": "comment.line.shebang.clojure" + }, + "string": { + "begin": "(?\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)/", + "captures": { + "1": { + "name": "meta.symbol.namespace.clojure" + } + } + } + ] + }, + "symbol": { + "patterns": [ + { + "match": "([\\p{L}\\.\\-\\_\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)", + "name": "meta.symbol.clojure" + } + ] + }, + "var": { + "match": "(?<=(\\s|\\(|\\[|\\{)\\#)'[\\w\\.\\-\\_\\:\\+\\=\\>\\<\\/\\!\\?\\*]+(?=(\\s|\\)|\\]|\\}))", + "name": "meta.var.clojure" + }, + "vector": { + "begin": "(\\[)", + "beginCaptures": { + "1": { + "name": "punctuation.section.vector.begin.clojure" + } + }, + "end": "(\\](?=[\\}\\]\\)\\s]*(?:;|$)))|(\\])", + "endCaptures": { + "1": { + "name": "punctuation.section.vector.end.trailing.clojure" + }, + "2": { + "name": "punctuation.section.vector.end.clojure" + } + }, + "name": "meta.vector.clojure", + "patterns": [ + { + "include": "$self" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/cmake.tmLanguage.json b/src/lib/shiki/languages/cmake.tmLanguage.json new file mode 100644 index 0000000..d8bfb8d --- /dev/null +++ b/src/lib/shiki/languages/cmake.tmLanguage.json @@ -0,0 +1,139 @@ +{ + "fileTypes": ["cmake", "CMakeLists.txt"], + "name": "cmake", + "patterns": [ + { + "comment": "Variables That Describe the System", + "match": "\\b(?i:APPLE|BORLAND|(CMAKE_)?(CL_64|COMPILER_2005|HOST_APPLE|HOST_SYSTEM|HOST_SYSTEM_NAME|HOST_SYSTEM_PROCESSOR|HOST_SYSTEM_VERSION|HOST_UNIX|HOST_WIN32|LIBRARY_ARCHITECTURE|LIBRARY_ARCHITECTURE_REGEX|OBJECT_PATH_MAX|SYSTEM|SYSTEM_NAME|SYSTEM_PROCESSOR|SYSTEM_VERSION)|CYGWIN|MSVC|MSVC80|MSVC_IDE|MSVC_VERSION|UNIX|WIN32|XCODE_VERSION|MSVC60|MSVC70|MSVC90|MSVC71)\\b", + "name": "constant.source.cmake" + }, + { + "comment": "cmakeOperators", + "match": "\\b(?i:ABSOLUTE|AND|BOOL|CACHE|COMMAND|COMMENT|DEFINED|DOC|EQUAL|EXISTS|EXT|FALSE|GREATER|GREATER_EQUAL|INTERNAL|IN_LIST|IS_ABSOLUTE|IS_DIRECTORY|IS_NEWER_THAN|IS_SYMLINK|LESS|LESS_EQUAL|MATCHES|NAME|NAMES|NAME_WE|NOT|OFF|ON|OR|PATH|PATHS|POLICY|PROGRAM|STREQUAL|STRGREATER|STRGREATER_EQUAL|STRING|STRLESS|STRLESS_EQUAL|TARGET|TEST|TRUE|VERSION_EQUAL|VERSION_GREATER|VERSION_GREATER_EQUAL|VERSION_LESS)\\b", + "name": "keyword.cmake" + }, + { + "comment": "Commands", + "match": "^\\s*\\b(?i:add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_libraries|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)\\b", + "name": "keyword.cmake" + }, + { + "comment": "Variables That Change Behavior", + "match": "\\b(?i:BUILD_SHARED_LIBS|(CMAKE_)?(ABSOLUTE_DESTINATION_FILES|AUTOMOC_RELAXED_MODE|BACKWARDS_COMPATIBILITY|BUILD_TYPE|COLOR_MAKEFILE|CONFIGURATION_TYPES|DEBUG_TARGET_PROPERTIES|DISABLE_FIND_PACKAGE_\\w+|FIND_LIBRARY_PREFIXES|FIND_LIBRARY_SUFFIXES|IGNORE_PATH|INCLUDE_PATH|INSTALL_DEFAULT_COMPONENT_NAME|INSTALL_PREFIX|LIBRARY_PATH|MFC_FLAG|MODULE_PATH|NOT_USING_CONFIG_FLAGS|POLICY_DEFAULT_CMP\\w+|PREFIX_PATH|PROGRAM_PATH|SKIP_INSTALL_ALL_DEPENDENCY|SYSTEM_IGNORE_PATH|SYSTEM_INCLUDE_PATH|SYSTEM_LIBRARY_PATH|SYSTEM_PREFIX_PATH|SYSTEM_PROGRAM_PATH|USER_MAKE_RULES_OVERRIDE|WARN_ON_ABSOLUTE_INSTALL_DESTINATION))\\b", + "name": "variable.source.cmake" + }, + { + "match": "\\$\\{\\w+\\}", + "name": "storage.source.cmake" + }, + { + "match": "\\$ENV\\{\\w+\\}", + "name": "storage.source.cmake" + }, + { + "comment": "Variables that Control the Build", + "match": "\\b(?i:(CMAKE_)?(\\w+_POSTFIX|ARCHIVE_OUTPUT_DIRECTORY|AUTOMOC|AUTOMOC_MOC_OPTIONS|BUILD_WITH_INSTALL_RPATH|DEBUG_POSTFIX|EXE_LINKER_FLAGS|EXE_LINKER_FLAGS_\\w+|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GNUtoMS|INCLUDE_CURRENT_DIR|INCLUDE_CURRENT_DIR_IN_INTERFACE|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_PATH_FLAG|LINK_DEF_FILE_FLAG|LINK_DEPENDS_NO_SHARED|LINK_INTERFACE_LIBRARIES|LINK_LIBRARY_FILE_FLAG|LINK_LIBRARY_FLAG|MACOSX_BUNDLE|NO_BUILTIN_CHRPATH|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|RUNTIME_OUTPUT_DIRECTORY|SKIP_BUILD_RPATH|SKIP_INSTALL_RPATH|TRY_COMPILE_CONFIGURATION|USE_RELATIVE_PATHS|WIN32_EXECUTABLE)|EXECUTABLE_OUTPUT_PATH|LIBRARY_OUTPUT_PATH)\\b", + "name": "variable.source.cmake" + }, + { + "comment": "Variables that Provide Information", + "match": "\\b(?i:CMAKE_(AR|ARGC|ARGV0|BINARY_DIR|BUILD_TOOL|CACHEFILE_DIR|CACHE_MAJOR_VERSION|CACHE_MINOR_VERSION|CACHE_PATCH_VERSION|CFG_INTDIR|COMMAND|CROSSCOMPILING|CTEST_COMMAND|CURRENT_BINARY_DIR|CURRENT_LIST_DIR|CURRENT_LIST_FILE|CURRENT_LIST_LINE|CURRENT_SOURCE_DIR|DL_LIBS|EDIT_COMMAND|EXECUTABLE_SUFFIX|EXTRA_GENERATOR|EXTRA_SHARED_LIBRARY_SUFFIXES|GENERATOR|HOME_DIRECTORY|IMPORT_LIBRARY_PREFIX|IMPORT_LIBRARY_SUFFIX|LINK_LIBRARY_SUFFIX|MAJOR_VERSION|MAKE_PROGRAM|MINOR_VERSION|PARENT_LIST_FILE|PATCH_VERSION|PROJECT_NAME|RANLIB|ROOT|SCRIPT_MODE_FILE|SHARED_LIBRARY_PREFIX|SHARED_LIBRARY_SUFFIX|SHARED_MODULE_PREFIX|SHARED_MODULE_SUFFIX|SIZEOF_VOID_P|SKIP_RPATH|SOURCE_DIR|STANDARD_LIBRARIES|STATIC_LIBRARY_PREFIX|STATIC_LIBRARY_SUFFIX|TWEAK_VERSION|USING_VC_FREE_TOOLS|VERBOSE_MAKEFILE|VERSION)|PROJECT_BINARY_DIR|PROJECT_NAME|PROJECT_SOURCE_DIR|\\w+_BINARY_DIR|\\w+__SOURCE_DIR)\\b", + "name": "variable.source.cmake" + }, + { + "comment": "BracketArgs", + "begin": "#\\[(=*)\\[", + "end": "\\]\\1\\]", + "name": "comment.source.cmake", + "patterns": [ + { + "match": "\\\\(.|$)", + "name": "constant.character.escape" + } + ] + }, + { + "comment": "BracketArgs", + "begin": "\\[(=*)\\[", + "end": "\\]\\1\\]", + "name": "argument.source.cmake", + "patterns": [ + { + "match": "\\\\(.|$)", + "name": "constant.character.escape" + } + ] + }, + { + "match": "#+.*$", + "name": "comment.source.cmake" + }, + { + "comment": "Properties on Cache Entries", + "match": "\\b(?i:ADVANCED|HELPSTRING|MODIFIED|STRINGS|TYPE|VALUE)\\b", + "name": "entity.source.cmake" + }, + { + "comment": "Properties on Source Files", + "match": "\\b(?i:ABSTRACT|COMPILE_DEFINITIONS|COMPILE_DEFINITIONS_|COMPILE_FLAGS|EXTERNAL_OBJECT|Fortran_FORMAT|GENERATED|HEADER_FILE_ONLY|KEEP_EXTENSION|LABELS|LANGUAGE|LOCATION|MACOSX_PACKAGE_LOCATION|OBJECT_DEPENDS|OBJECT_OUTPUTS|SYMBOLIC|WRAP_EXCLUDE)\\b", + "name": "entity.source.cmake" + }, + { + "comment": "Properties on Tests", + "match": "\\b(?i:ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|COST|DEPENDS|ENVIRONMENT|FAIL_REGULAR_EXPRESSION|LABELS|MEASUREMENT|PASS_REGULAR_EXPRESSION|PROCESSORS|REQUIRED_FILES|RESOURCE_LOCK|RUN_SERIAL|TIMEOUT|WILL_FAIL|WORKING_DIRECTORY)\\b", + "name": "entity.source.cmake" + }, + { + "comment": "Properties on Directories", + "match": "\\b(?i:ADDITIONAL_MAKE_CLEAN_FILES|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMPILE_DEFINITIONS|COMPILE_DEFINITIONS_\\w+|DEFINITIONS|EXCLUDE_FROM_ALL|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INTERPROCEDURAL_OPTIMIZATION|INTERPROCEDURAL_OPTIMIZATION_\\w+|LINK_DIRECTORIES|LISTFILE_STACK|MACROS|PARENT_DIRECTORY|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|TEST_INCLUDE_FILE|VARIABLES|VS_GLOBAL_SECTION_POST_\\w+|VS_GLOBAL_SECTION_PRE_\\w+)\\b", + "name": "entity.source.cmake" + }, + { + "comment": "Properties of Global Scope", + "match": "\\b(?i:ALLOW_DUPLICATE_CUSTOM_TARGETS|DEBUG_CONFIGURATIONS|DISABLED_FEATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|IN_TRY_COMPILE|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PREDEFINED_TARGETS_FOLDER|REPORT_UNDEFINED_PROPERTIES|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_SUPPORTS_SHARED_LIBS|USE_FOLDERS|__CMAKE_DELETE_CACHE_CHANGE_VARS_)\\b", + "name": "entity.source.cmake" + }, + { + "comment": "Properties on Targets", + "match": "\\b(?i:\\w+_(OUTPUT_NAME|POSTFIX)|ARCHIVE_OUTPUT_(DIRECTORY(_\\w+)?|NAME(_\\w+)?)|AUTOMOC(_MOC_OPTIONS)?|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE(_EXTENSION)?|COMPATIBLE_INTERFACE_BOOL|COMPATIBLE_INTERFACE_STRING|COMPILE_(DEFINITIONS(_\\w+)?|FLAGS)|DEBUG_POSTFIX|DEFINE_SYMBOL|ENABLE_EXPORTS|EXCLUDE_FROM_ALL|EchoString|FOLDER|FRAMEWORK|Fortran_(FORMAT|MODULE_DIRECTORY)|GENERATOR_FILE_NAME|GNUtoMS|HAS_CXX|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(CONFIGURATIONS|IMPLIB(_\\w+)?|LINK_DEPENDENT_LIBRARIES(_\\w+)?|LINK_INTERFACE_LANGUAGES(_\\w+)?|LINK_INTERFACE_LIBRARIES(_\\w+)?|LINK_INTERFACE_MULTIPLICITY(_\\w+)?|LOCATION(_\\w+)?|NO_SONAME(_\\w+)?|SONAME(_\\w+)?)|IMPORT_PREFIX|IMPORT_SUFFIX|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE|INTERFACE_COMPILE_DEFINITIONS|INTERFACE_INCLUDE_DIRECTORIES|INTERPROCEDURAL_OPTIMIZATION|INTERPROCEDURAL_OPTIMIZATION_\\w+|LABELS|LIBRARY_OUTPUT_DIRECTORY(_\\w+)?|LIBRARY_OUTPUT_NAME(_\\w+)?|LINKER_LANGUAGE|LINK_DEPENDS|LINK_FLAGS(_\\w+)?|LINK_INTERFACE_LIBRARIES(_\\w+)?|LINK_INTERFACE_MULTIPLICITY(_\\w+)?|LINK_LIBRARIES|LINK_SEARCH_END_STATIC|LINK_SEARCH_START_STATIC|LOCATION(_\\w+)?|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MAP_IMPORTED_CONFIG_\\w+|NO_SONAME|OSX_ARCHITECTURES(_\\w+)?|OUTPUT_NAME(_\\w+)?|PDB_NAME(_\\w+)?|POST_INSTALL_SCRIPT|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE|PRIVATE_HEADER|PROJECT_LABEL|PUBLIC|PUBLIC_HEADER|RESOURCE|RULE_LAUNCH_(COMPILE|CUSTOM|LINK)|RUNTIME_OUTPUT_(DIRECTORY(_\\w+)?|NAME(_\\w+)?)|SKIP_BUILD_RPATH|SOURCES|SOVERSION|STATIC_LIBRARY_FLAGS(_\\w+)?|SUFFIX|TYPE|VERSION|VS_DOTNET_REFERENCES|VS_GLOBAL_(\\w+|KEYWORD|PROJECT_TYPES)|VS_KEYWORD|VS_SCC_(AUXPATH|LOCALPATH|PROJECTNAME|PROVIDER)|VS_WINRT_EXTENSIONS|VS_WINRT_REFERENCES|WIN32_EXECUTABLE|XCODE_ATTRIBUTE_\\w+)\\b", + "name": "entity.source.cmake" + }, + { + "comment": "Escaped Strings", + "begin": "\\\\\"", + "end": "\\\\\"", + "name": "string.source.cmake", + "patterns": [ + { + "match": "\\\\(.|$)", + "name": "constant.character.escape" + } + ] + }, + { + "comment": "Normal Strings", + "begin": "\"", + "end": "\"", + "name": "string.source.cmake", + "patterns": [ + { + "match": "\\\\(.|$)", + "name": "constant.character.escape" + } + ] + }, + { + "comment": "Derecated keyword", + "match": "\\bBUILD_NAME\\b", + "name": "invalid.deprecated.source.cmake" + }, + { + "comment": "Compiler Flags", + "match": "\\b(?i:(CMAKE_)?(CXX_FLAGS|CMAKE_CXX_FLAGS_DEBUG|CMAKE_CXX_FLAGS_MINSIZEREL|CMAKE_CXX_FLAGS_RELEASE|CMAKE_CXX_FLAGS_RELWITHDEBINFO))\\b", + "name": "variable.source.cmake" + } + ], + "repository": {}, + "scopeName": "source.cmake", + "uuid": "7aed2d59-22d9-41c8-ba9e-4f178191e380" +} diff --git a/src/lib/shiki/languages/cobol.tmLanguage.json b/src/lib/shiki/languages/cobol.tmLanguage.json new file mode 100644 index 0000000..608dcbb --- /dev/null +++ b/src/lib/shiki/languages/cobol.tmLanguage.json @@ -0,0 +1,1121 @@ +{ + "_copyright": "The MIT License (MIT)\nCopyright (c) 2015-2022 spgennard\nSource: https://github.com/spgennard/vscode_cobol/blob/main/syntaxes/COBOL.tmLanguage.json", + "$schema": "https://raw.githubusercontent.com/spgennard/vscode_cobol/main/schemas/tmlanguage.json", + "fileTypes": [ + "ccp", + "scbl", + "cobol", + "cbl", + "cblle", + "cblsrce", + "cblcpy", + "lks", + "pdv", + "cpy", + "copybook", + "cobcopy", + "fd", + "sel", + "scb", + "scbl", + "sqlcblle", + "cob", + "dds", + "def", + "src", + "ss", + "wks", + "bib", + "pco" + ], + "name": "cobol", + "patterns": [ + { + "match": "(^[ \\*][ \\*][ \\*][ \\*][ \\*][ \\*])([dD]\\s.*$)", + "name": "token.info-token.cobol" + }, + { + "match": "(^[ \\*][ \\*][ \\*][ \\*][ \\*][ \\*])(\\/.*$)", + "captures": { + "1": { + "name": "constant.numeric.cobol" + }, + "2": { + "name": "comment.line.cobol.newpage" + } + } + }, + { + "match": "(^[ \\*][ \\*][ \\*][ \\*][ \\*][ \\*])(\\*.*$)", + "captures": { + "1": { + "name": "constant.numeric.cobol" + }, + "2": { + "name": "comment.line.cobol.fixed" + } + } + }, + { + "match": "(^[0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s])(\\/.*$)", + "captures": { + "1": { + "name": "constant.numeric.cobol" + }, + "2": { + "name": "comment.line.cobol.newpage" + } + } + }, + { + "match": "^[0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s]$", + "name": "constant.numeric.cobol" + }, + { + "match": "(^[0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s])(\\*.*$)", + "captures": { + "1": { + "name": "constant.numeric.cobol" + }, + "2": { + "name": "comment.line.cobol.fixed" + } + } + }, + { + "match": "(^[0-9a-zA-Z\\s\\$#%\\.@\\- ][0-9a-zA-Z\\s\\$#%\\.@\\- ][0-9a-zA-Z\\s\\$#%\\.@\\- ][0-9a-zA-Z\\s\\$#%\\.@\\- ][0-9a-zA-Z\\s\\$#%\\.@\\- ][0-9a-zA-Z\\s\\$#%\\.@\\- ])(\\*.*$)", + "captures": { + "1": { + "name": "constant.cobol" + }, + "2": { + "name": "comment.line.cobol.fixed" + } + } + }, + { + "match": "^\\s+(78)\\s+([0-9a-zA-Z][a-zA-Z\\-0-9_]+)", + "captures": { + "1": { + "name": "constant.numeric.cobol" + }, + "2": { + "name": "variable.other.constant" + } + } + }, + { + "match": "^\\s+([0-9]+)\\s+([0-9a-zA-Z][a-zA-Z\\-0-9_]+)\\s+((?i:constant))", + "captures": { + "1": { + "name": "constant.numeric.cobol" + }, + "2": { + "name": "variable.other.constant" + }, + "3": { + "name": "keyword.identifers.cobol" + } + } + }, + { + "match": "(^[0-9a-zA-Z\\s\\$#%\\.@][0-9a-zA-Z\\s\\$#%\\.@][0-9a-zA-Z\\s\\$#%\\.@][0-9a-zA-Z\\s\\$#%\\.@][0-9a-zA-Z\\s\\$#%\\.@][0-9a-zA-Z\\s\\$#%\\.@])(\\/.*$)", + "captures": { + "1": { + "name": "constant.cobol" + }, + "2": { + "name": "comment.line.cobol.newpage" + } + } + }, + { + "match": "^\\*.*$", + "name": "comment.line.cobol.fixed" + }, + { + "match": "((?:^|\\s+)(?i:\\$set)\\s+)((?i:constant)\\s+)([0-9a-zA-Z][a-zA-Z\\-0-9]+\\s*)([a-zA-Z\\-0-9]*)", + "captures": { + "1": { + "name": "keyword.control.directive.conditional.cobol" + }, + "2": { + "name": "entity.name.function.preprocessor.cobol" + }, + "3": { + "name": "entity.name.function.cobol" + }, + "4": { + "name": "keyword.control.directive.conditional.cobol" + } + } + }, + { + "match": "((?i:\\$\\s*set\\s+)(ilusing)(\\()(.*)(\\)))", + "captures": { + "1": { + "name": "entity.name.function.preprocessor.cobol" + }, + "2": { + "name": "storage.modifier.import.cobol" + }, + "3": { + "name": "punctuation.begin.bracket.round.cobol" + }, + "4": { + "name": "string.quoted.other.cobol" + }, + "5": { + "name": "punctuation.end.bracket.round.cobol" + } + } + }, + { + "match": "((?i:\\$\\s*set\\s+)(ilusing)(\")(.*)(\"))", + "captures": { + "1": { + "name": "entity.name.function.preprocessor.cobol" + }, + "2": { + "name": "storage.modifier.import.cobol" + }, + "3": { + "name": "punctuation.definition.string.begin.cobol" + }, + "4": { + "name": "string.quoted.other.cobol" + }, + "5": { + "name": "punctuation.definition.string.begin.cobol" + } + } + }, + { + "match": "((?i:\\$set))\\s+(\\w+)\\s*(\")(\\w*)(\")", + "captures": { + "1": { + "name": "keyword.control.directive.conditional.cobol" + }, + "2": { + "name": "entity.name.function.preprocessor.cobol" + }, + "3": { + "name": "punctuation.definition.string.begin.cobol" + }, + "4": { + "name": "string.quoted.other.cobol" + }, + "5": { + "name": "punctuation.definition.string.begin.cobol" + } + } + }, + { + "match": "((?i:\\$set))\\s+(\\w+)\\s*(\\()(.*)(\\))", + "captures": { + "1": { + "name": "keyword.control.directive.conditional.cobol" + }, + "2": { + "name": "entity.name.function.preprocessor.cobol" + }, + "3": { + "name": "punctuation.begin.bracket.round.cobol" + }, + "4": { + "name": "string.quoted.other.cobol" + }, + "5": { + "name": "punctuation.end.bracket.round.cobol" + } + } + }, + { + "match": "(?:^|\\s+)(?i:\\$\\s*set\\s)((?i:01SHUFFLE|64KPARA|64KSECT|AUXOPT|CHIP|DATALIT|EANIM|EXPANDDATA|FIXING|FLAG-CHIP|MASM|MODEL|OPTSIZE|OPTSPEED|PARAS|PROTMODE|REGPARM|SEGCROSS|SEGSIZE|SIGNCOMPARE|SMALLDD|TABLESEGCROSS|TRICKLECHECK|\\s)+).*$", + "captures": { + "0": { + "name": "keyword.control.directive.conditional.cobol" + }, + "1": { + "name": "invalid.illegal.directive" + }, + "2": { + "name": "comment.line.set.cobol" + } + } + }, + { + "match": "(\\$region|\\$end-region)(.*$)", + "captures": { + "1": { + "name": "keyword.control.directive.cobol" + }, + "2": { + "name": "entity.other.attribute-name.preprocessor.cobol" + } + } + }, + { + "begin": "\\$(?i:doc)(.*$)", + "end": "\\$(?i:end-doc)(.*$)", + "name": "invalid.illegal.iscobol" + }, + { + "match": ">>\\s*(?i:turn|page|listing|leap-seconds|d)\\s+.*$", + "name": "invalid.illegal.meta.preprocessor.cobolit" + }, + { + "match": "((((>>|\\$)[\\s]*)(?i:if|else|elif|end-if|end-evaluate|end|define|evaluate|when|display|call-convention|set))(.*$))", + "captures": { + "1": { + "name": "keyword.control.directive.conditional.cobol" + }, + "2": { + "name": "entity.name.function.preprocessor.cobol" + }, + "3": { + "name": "entity.name.function.preprocessor.cobol" + } + } + }, + { + "match": "(\\*>)\\s+(@[0-9a-zA-Z][a-zA-Z\\-0-9]+)\\s+(.*$)", + "captures": { + "1": { + "name": "comment.line.scantoken.cobol" + }, + "2": { + "name": "keyword.cobol" + }, + "3": { + "name": "string.cobol" + } + } + }, + { + "match": "(\\*>.*$)", + "name": "comment.line.modern" + }, + { + "match": "(>>.*)$", + "name": "strong comment.line.set.acucobol" + }, + { + "match": "([nNuU][xX]|[hHxX])'\\h*'", + "name": "constant.numeric.integer.hexadecimal.cobol" + }, + { + "match": "([nNuU][xX]|[hHxX])'.*'", + "name": "invalid.illegal.hexadecimal.cobol" + }, + { + "match": "([nNuU][xX]|[hHxX])\"\\h*\"", + "name": "constant.numeric.integer.hexadecimal.cobol" + }, + { + "match": "([nNuU][xX]|[hHxX])\".*\"", + "name": "invalid.illegal.hexadecimal.cobol" + }, + { + "match": "[bB]\"[0-1]\"", + "name": "constant.numeric.integer.boolean.cobol" + }, + { + "match": "[bB]'[0-1]'", + "name": "constant.numeric.integer.boolean.cobol" + }, + { + "match": "[oO]\"[0-7]*\"", + "name": "constant.numeric.integer.octal.cobol" + }, + { + "match": "[oO]\".*\"", + "name": "invalid.illegal.octal.cobol" + }, + { + "match": "(#)([0-9a-zA-Z][a-zA-Z\\-0-9]+)", + "name": "meta.symbol.cobol.forced" + }, + { + "begin": "((?|<=|>=|<>|\\+|\\-|\\*|\\/|(?=|>", + "name": "keyword.operator.relational.ql" + }, + "comparison-operator": { + "match": "(?x)=|\\!\\=", + "name": "keyword.operator.comparison.ql" + }, + "arithmetic-operator": { + "match": "(?x)\\+|-|\\*|/|%", + "name": "keyword.operator.arithmetic.ql" + }, + "comma": { + "match": "(?x),", + "name": "punctuation.separator.comma.ql" + }, + "semicolon": { + "match": "(?x);", + "name": "punctuation.separator.statement.ql" + }, + "dot": { + "match": "(?x)\\.", + "name": "punctuation.accessor.ql" + }, + "dotdot": { + "match": "(?x)\\.\\.", + "name": "punctuation.operator.range.ql" + }, + "pipe": { + "match": "(?x)\\|", + "name": "punctuation.separator.pipe.ql" + }, + "open-paren": { + "match": "(?x)\\(", + "name": "punctuation.parenthesis.open.ql" + }, + "close-paren": { + "match": "(?x)\\)", + "name": "punctuation.parenthesis.close.ql" + }, + "open-brace": { + "match": "(?x)\\{", + "name": "punctuation.curlybrace.open.ql" + }, + "close-brace": { + "match": "(?x)\\}", + "name": "punctuation.curlybrace.close.ql" + }, + "open-bracket": { + "match": "(?x)\\[", + "name": "punctuation.squarebracket.open.ql" + }, + "close-bracket": { + "match": "(?x)\\]", + "name": "punctuation.squarebracket.close.ql" + }, + "operator-or-punctuation": { + "patterns": [ + { + "include": "#relational-operator" + }, + { + "include": "#comparison-operator" + }, + { + "include": "#arithmetic-operator" + }, + { + "include": "#comma" + }, + { + "include": "#semicolon" + }, + { + "include": "#dot" + }, + { + "include": "#dotdot" + }, + { + "include": "#pipe" + }, + { + "include": "#open-paren" + }, + { + "include": "#close-paren" + }, + { + "include": "#open-brace" + }, + { + "include": "#close-brace" + }, + { + "include": "#open-bracket" + }, + { + "include": "#close-bracket" + } + ] + }, + "dont-care": { + "match": "(?x)\\b(?:_)(?:(?!(?:[0-9A-Za-z_])))", + "name": "variable.language.dont-care.ql" + }, + "and": { + "match": "(?x)\\b(?:and)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.and.ql" + }, + "any": { + "match": "(?x)\\b(?:any)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.quantifier.any.ql" + }, + "as": { + "match": "(?x)\\b(?:as)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.as.ql" + }, + "asc": { + "match": "(?x)\\b(?:asc)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.order.asc.ql" + }, + "avg": { + "match": "(?x)\\b(?:avg)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.aggregate.avg.ql" + }, + "boolean": { + "match": "(?x)\\b(?:boolean)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.type.boolean.ql" + }, + "by": { + "match": "(?x)\\b(?:by)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.order.by.ql" + }, + "class": { + "match": "(?x)\\b(?:class)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.class.ql" + }, + "concat": { + "match": "(?x)\\b(?:concat)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.aggregate.concat.ql" + }, + "count": { + "match": "(?x)\\b(?:count)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.aggregate.count.ql" + }, + "date": { + "match": "(?x)\\b(?:date)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.type.date.ql" + }, + "desc": { + "match": "(?x)\\b(?:desc)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.order.desc.ql" + }, + "else": { + "match": "(?x)\\b(?:else)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.else.ql" + }, + "exists": { + "match": "(?x)\\b(?:exists)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.quantifier.exists.ql" + }, + "extends": { + "match": "(?x)\\b(?:extends)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.extends.ql" + }, + "false": { + "match": "(?x)\\b(?:false)(?:(?!(?:[0-9A-Za-z_])))", + "name": "constant.language.boolean.false.ql" + }, + "float": { + "match": "(?x)\\b(?:float)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.type.float.ql" + }, + "forall": { + "match": "(?x)\\b(?:forall)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.quantifier.forall.ql" + }, + "forex": { + "match": "(?x)\\b(?:forex)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.quantifier.forex.ql" + }, + "from": { + "match": "(?x)\\b(?:from)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.from.ql" + }, + "if": { + "match": "(?x)\\b(?:if)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.if.ql" + }, + "implies": { + "match": "(?x)\\b(?:implies)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.implies.ql" + }, + "import": { + "match": "(?x)\\b(?:import)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.import.ql" + }, + "in": { + "match": "(?x)\\b(?:in)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.in.ql" + }, + "instanceof": { + "match": "(?x)\\b(?:instanceof)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.instanceof.ql" + }, + "int": { + "match": "(?x)\\b(?:int)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.type.int.ql" + }, + "max": { + "match": "(?x)\\b(?:max)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.aggregate.max.ql" + }, + "min": { + "match": "(?x)\\b(?:min)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.aggregate.min.ql" + }, + "module": { + "match": "(?x)\\b(?:module)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.module.ql" + }, + "newtype": { + "match": "(?x)\\b(?:newtype)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.newtype.ql" + }, + "none": { + "match": "(?x)\\b(?:none)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.quantifier.none.ql" + }, + "not": { + "match": "(?x)\\b(?:not)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.not.ql" + }, + "or": { + "match": "(?x)\\b(?:or)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.or.ql" + }, + "order": { + "match": "(?x)\\b(?:order)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.order.order.ql" + }, + "predicate": { + "match": "(?x)\\b(?:predicate)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.predicate.ql" + }, + "rank": { + "match": "(?x)\\b(?:rank)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.aggregate.rank.ql" + }, + "result": { + "match": "(?x)\\b(?:result)(?:(?!(?:[0-9A-Za-z_])))", + "name": "variable.language.result.ql" + }, + "select": { + "match": "(?x)\\b(?:select)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.query.select.ql" + }, + "strictconcat": { + "match": "(?x)\\b(?:strictconcat)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.aggregate.strictconcat.ql" + }, + "strictcount": { + "match": "(?x)\\b(?:strictcount)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.aggregate.strictcount.ql" + }, + "strictsum": { + "match": "(?x)\\b(?:strictsum)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.aggregate.strictsum.ql" + }, + "string": { + "match": "(?x)\\b(?:string)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.type.string.ql" + }, + "sum": { + "match": "(?x)\\b(?:sum)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.aggregate.sum.ql" + }, + "super": { + "match": "(?x)\\b(?:super)(?:(?!(?:[0-9A-Za-z_])))", + "name": "variable.language.super.ql" + }, + "then": { + "match": "(?x)\\b(?:then)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.then.ql" + }, + "this": { + "match": "(?x)\\b(?:this)(?:(?!(?:[0-9A-Za-z_])))", + "name": "variable.language.this.ql" + }, + "true": { + "match": "(?x)\\b(?:true)(?:(?!(?:[0-9A-Za-z_])))", + "name": "constant.language.boolean.true.ql" + }, + "unique": { + "match": "(?x)\\b(?:unique)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.aggregate.unique.ql" + }, + "where": { + "match": "(?x)\\b(?:where)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.query.where.ql" + }, + "keyword": { + "patterns": [ + { + "include": "#dont-care" + }, + { + "include": "#and" + }, + { + "include": "#any" + }, + { + "include": "#as" + }, + { + "include": "#asc" + }, + { + "include": "#avg" + }, + { + "include": "#boolean" + }, + { + "include": "#by" + }, + { + "include": "#class" + }, + { + "include": "#concat" + }, + { + "include": "#count" + }, + { + "include": "#date" + }, + { + "include": "#desc" + }, + { + "include": "#else" + }, + { + "include": "#exists" + }, + { + "include": "#extends" + }, + { + "include": "#false" + }, + { + "include": "#float" + }, + { + "include": "#forall" + }, + { + "include": "#forex" + }, + { + "include": "#from" + }, + { + "include": "#if" + }, + { + "include": "#implies" + }, + { + "include": "#import" + }, + { + "include": "#in" + }, + { + "include": "#instanceof" + }, + { + "include": "#int" + }, + { + "include": "#max" + }, + { + "include": "#min" + }, + { + "include": "#module" + }, + { + "include": "#newtype" + }, + { + "include": "#none" + }, + { + "include": "#not" + }, + { + "include": "#or" + }, + { + "include": "#order" + }, + { + "include": "#predicate" + }, + { + "include": "#rank" + }, + { + "include": "#result" + }, + { + "include": "#select" + }, + { + "include": "#strictconcat" + }, + { + "include": "#strictcount" + }, + { + "include": "#strictsum" + }, + { + "include": "#string" + }, + { + "include": "#sum" + }, + { + "include": "#super" + }, + { + "include": "#then" + }, + { + "include": "#this" + }, + { + "include": "#true" + }, + { + "include": "#unique" + }, + { + "include": "#where" + } + ] + }, + "predicate-start-keyword": { + "patterns": [ + { + "include": "#boolean" + }, + { + "include": "#date" + }, + { + "include": "#float" + }, + { + "include": "#int" + }, + { + "include": "#predicate" + }, + { + "include": "#string" + } + ] + }, + "abstract": { + "match": "(?x)\\b(?:abstract)(?:(?!(?:[0-9A-Za-z_])))", + "name": "storage.modifier.abstract.ql" + }, + "additional": { + "match": "(?x)\\b(?:additional)(?:(?!(?:[0-9A-Za-z_])))", + "name": "storage.modifier.additional.ql" + }, + "bindingset": { + "match": "(?x)\\b(?:bindingset)(?:(?!(?:[0-9A-Za-z_])))", + "name": "storage.modifier.bindingset.ql" + }, + "cached": { + "match": "(?x)\\b(?:cached)(?:(?!(?:[0-9A-Za-z_])))", + "name": "storage.modifier.cached.ql" + }, + "default": { + "match": "(?x)\\b(?:default)(?:(?!(?:[0-9A-Za-z_])))", + "name": "storage.modifier.default.ql" + }, + "deprecated": { + "match": "(?x)\\b(?:deprecated)(?:(?!(?:[0-9A-Za-z_])))", + "name": "storage.modifier.deprecated.ql" + }, + "external": { + "match": "(?x)\\b(?:external)(?:(?!(?:[0-9A-Za-z_])))", + "name": "storage.modifier.external.ql" + }, + "final": { + "match": "(?x)\\b(?:final)(?:(?!(?:[0-9A-Za-z_])))", + "name": "storage.modifier.final.ql" + }, + "language": { + "match": "(?x)\\b(?:language)(?:(?!(?:[0-9A-Za-z_])))", + "name": "storage.modifier.language.ql" + }, + "library": { + "match": "(?x)\\b(?:library)(?:(?!(?:[0-9A-Za-z_])))", + "name": "storage.modifier.library.ql" + }, + "override": { + "match": "(?x)\\b(?:override)(?:(?!(?:[0-9A-Za-z_])))", + "name": "storage.modifier.override.ql" + }, + "pragma": { + "match": "(?x)\\b(?:pragma)(?:(?!(?:[0-9A-Za-z_])))", + "name": "storage.modifier.pragma.ql" + }, + "private": { + "match": "(?x)\\b(?:private)(?:(?!(?:[0-9A-Za-z_])))", + "name": "storage.modifier.private.ql" + }, + "query": { + "match": "(?x)\\b(?:query)(?:(?!(?:[0-9A-Za-z_])))", + "name": "storage.modifier.query.ql" + }, + "signature": { + "match": "(?x)\\b(?:signature)(?:(?!(?:[0-9A-Za-z_])))", + "name": "storage.modifier.signature.ql" + }, + "transient": { + "match": "(?x)\\b(?:transient)(?:(?!(?:[0-9A-Za-z_])))", + "name": "storage.modifier.transient.ql" + }, + "annotation-keyword": { + "patterns": [ + { + "include": "#abstract" + }, + { + "include": "#additional" + }, + { + "include": "#bindingset" + }, + { + "include": "#cached" + }, + { + "include": "#default" + }, + { + "include": "#deprecated" + }, + { + "include": "#external" + }, + { + "include": "#final" + }, + { + "include": "#language" + }, + { + "include": "#library" + }, + { + "include": "#override" + }, + { + "include": "#pragma" + }, + { + "include": "#private" + }, + { + "include": "#query" + }, + { + "include": "#signature" + }, + { + "include": "#transient" + } + ] + }, + "implements": { + "match": "(?x)\\b(?:implements)(?:(?!(?:[0-9A-Za-z_])))", + "name": "keyword.other.implements.ql" + }, + "comment": { + "patterns": [ + { + "begin": "(?x)/\\*\\*", + "end": "(?x)\\*/", + "name": "comment.block.documentation.ql", + "patterns": [ + { + "begin": "(?x)(?<=/\\*\\*)([^*]|\\*(?!/))*$", + "while": "(?x)(^|\\G)\\s*([^*]|\\*(?!/))(?=([^*]|[*](?!/))*$)", + "patterns": [ + { + "match": "(?x)\\G\\s* (@\\S+)", + "name": "keyword.tag.ql" + } + ] + } + ] + }, + { + "begin": "(?x)/\\*", + "end": "(?x)\\*/", + "name": "comment.block.ql" + }, + { + "match": "(?x)//.*$", + "name": "comment.line.double-slash.ql" + } + ] + }, + "module-member": { + "patterns": [ + { + "include": "#import-directive" + }, + { + "include": "#import-as-clause" + }, + { + "include": "#module-declaration" + }, + { + "include": "#newtype-declaration" + }, + { + "include": "#newtype-branch-name-with-prefix" + }, + { + "include": "#predicate-parameter-list" + }, + { + "include": "#predicate-body" + }, + { + "include": "#class-declaration" + }, + { + "include": "#select-clause" + }, + { + "include": "#predicate-or-field-declaration" + }, + { + "include": "#non-context-sensitive" + }, + { + "include": "#annotation" + } + ] + }, + "import-directive": { + "end": "(?x)(?:\\b [A-Za-z][0-9A-Za-z_]* (?:(?!(?:[0-9A-Za-z_])))) (?!\\s*(\\.|\\:\\:))", + "endCaptures": { + "0": { + "name": "entity.name.type.namespace.ql" + } + }, + "name": "meta.block.import-directive.ql", + "patterns": [ + { + "include": "#non-context-sensitive" + }, + { + "match": "(?x)(?:\\b [A-Za-z][0-9A-Za-z_]* (?:(?!(?:[0-9A-Za-z_]))))", + "name": "entity.name.type.namespace.ql" + } + ], + "begin": "(?x)((?:\\b(?:import)(?:(?!(?:[0-9A-Za-z_])))))", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#import" + } + ] + } + } + }, + "end-of-as-clause": { + "match": "(?x)(?: (?<=(?:[0-9A-Za-z_])) (?!(?:[0-9A-Za-z_])) (?)", + "beginCaptures": { + "1": { + "name": "entity.name.function.coffee" + }, + "2": { + "name": "variable.other.readwrite.instance.coffee" + }, + "3": { + "name": "keyword.operator.assignment.coffee" + } + }, + "end": "[=-]>", + "endCaptures": { + "0": { + "name": "storage.type.function.coffee" + } + }, + "name": "meta.function.coffee", + "patterns": [ + { + "include": "#function_params" + } + ] + }, + { + "begin": "(?x)\n(?<=\\s|^)(?:((')([^']*?)('))|((\")([^\"]*?)(\")))\n\\s*([:=])\\s*\n(?=(\\([^\\(\\)]*\\)\\s*)?[=-]>)", + "beginCaptures": { + "1": { + "name": "string.quoted.single.coffee" + }, + "2": { + "name": "punctuation.definition.string.begin.coffee" + }, + "3": { + "name": "entity.name.function.coffee" + }, + "4": { + "name": "punctuation.definition.string.end.coffee" + }, + "5": { + "name": "string.quoted.double.coffee" + }, + "6": { + "name": "punctuation.definition.string.begin.coffee" + }, + "7": { + "name": "entity.name.function.coffee" + }, + "8": { + "name": "punctuation.definition.string.end.coffee" + }, + "9": { + "name": "keyword.operator.assignment.coffee" + } + }, + "end": "[=-]>", + "endCaptures": { + "0": { + "name": "storage.type.function.coffee" + } + }, + "name": "meta.function.coffee", + "patterns": [ + { + "include": "#function_params" + } + ] + }, + { + "begin": "(?=(\\([^\\(\\)]*\\)\\s*)?[=-]>)", + "end": "[=-]>", + "endCaptures": { + "0": { + "name": "storage.type.function.coffee" + } + }, + "name": "meta.function.inline.coffee", + "patterns": [ + { + "include": "#function_params" + } + ] + }, + { + "begin": "(?<=\\s|^)({)(?=[^'\"#]+?}[\\s\\]}]*=)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.destructuring.begin.bracket.curly.coffee" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.destructuring.end.bracket.curly.coffee" + } + }, + "name": "meta.variable.assignment.destructured.object.coffee", + "patterns": [ + { + "include": "$self" + }, + { + "match": "[a-zA-Z$_]\\w*", + "name": "variable.assignment.coffee" + } + ] + }, + { + "begin": "(?<=\\s|^)(\\[)(?=[^'\"#]+?\\][\\s\\]}]*=)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.destructuring.begin.bracket.square.coffee" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.destructuring.end.bracket.square.coffee" + } + }, + "name": "meta.variable.assignment.destructured.array.coffee", + "patterns": [ + { + "include": "$self" + }, + { + "match": "[a-zA-Z$_]\\w*", + "name": "variable.assignment.coffee" + } + ] + }, + { + "match": "\\b(?|\\-\\d|\\[|{|\"|'))", + "end": "(?=\\s*(?|\\-\\d|\\[|{|\"|')))", + "beginCaptures": { + "1": { + "name": "variable.other.readwrite.instance.coffee" + }, + "2": { + "patterns": [ + { + "include": "#function_names" + } + ] + } + }, + "end": "(?=\\s*(?|\\-\\d|\\[|{|\"|')))", + "beginCaptures": { + "1": { + "name": "punctuation.separator.method.period.coffee" + }, + "2": { + "name": "keyword.operator.prototype.coffee" + }, + "3": { + "patterns": [ + { + "include": "#method_names" + } + ] + } + }, + "end": "(?=\\s*(?>=|>>>=|\\|=)", + "captures": { + "1": { + "name": "variable.assignment.coffee" + }, + "2": { + "name": "keyword.operator.assignment.compound.bitwise.coffee" + } + } + }, + { + "match": "<<|>>>|>>", + "name": "keyword.operator.bitwise.shift.coffee" + }, + { + "match": "!=|<=|>=|==|<|>", + "name": "keyword.operator.comparison.coffee" + }, + { + "match": "&&|!|\\|\\|", + "name": "keyword.operator.logical.coffee" + }, + { + "match": "&|\\||\\^|~", + "name": "keyword.operator.bitwise.coffee" + }, + { + "match": "([a-zA-Z$_][\\w$]*)?\\s*(=|:(?!:))(?![>=])", + "captures": { + "1": { + "name": "variable.assignment.coffee" + }, + "2": { + "name": "keyword.operator.assignment.coffee" + } + } + }, + { + "match": "--", + "name": "keyword.operator.decrement.coffee" + }, + { + "match": "\\+\\+", + "name": "keyword.operator.increment.coffee" + }, + { + "match": "\\.\\.\\.", + "name": "keyword.operator.splat.coffee" + }, + { + "match": "\\?", + "name": "keyword.operator.existential.coffee" + }, + { + "match": "%|\\*|/|-|\\+", + "name": "keyword.operator.coffee" + }, + { + "match": "(?x)\n\\b(?)", + "name": "meta.tag.coffee", + "patterns": [ + { + "include": "#jsx-attribute" + } + ] + } + ] + }, + "jsx-end-tag": { + "patterns": [ + { + "begin": "()", + "name": "meta.tag.coffee" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/cpp-macro.tmLanguage.json b/src/lib/shiki/languages/cpp-macro.tmLanguage.json new file mode 100644 index 0000000..73defb9 --- /dev/null +++ b/src/lib/shiki/languages/cpp-macro.tmLanguage.json @@ -0,0 +1,9366 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/jeff-hykin/better-cpp-syntax/blob/master/autogenerated/cpp.embedded.macro.tmLanguage.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/jeff-hykin/better-cpp-syntax/commit/f1d127a8af2b184db570345f0bb179503c47fdf6", + "name": "cpp-macro", + "scopeName": "source.cpp.embedded.macro", + "patterns": [ + { + "include": "#ever_present_context" + }, + { + "include": "#constructor_root" + }, + { + "include": "#destructor_root" + }, + { + "include": "#function_definition" + }, + { + "include": "#operator_overload" + }, + { + "include": "#using_namespace" + }, + { + "include": "source.cpp#type_alias" + }, + { + "include": "source.cpp#using_name" + }, + { + "include": "source.cpp#namespace_alias" + }, + { + "include": "#namespace_block" + }, + { + "include": "#extern_block" + }, + { + "include": "#typedef_class" + }, + { + "include": "#typedef_struct" + }, + { + "include": "#typedef_union" + }, + { + "include": "source.cpp#misc_keywords" + }, + { + "include": "source.cpp#standard_declares" + }, + { + "include": "#class_block" + }, + { + "include": "#struct_block" + }, + { + "include": "#union_block" + }, + { + "include": "#enum_block" + }, + { + "include": "source.cpp#template_isolated_definition" + }, + { + "include": "#template_definition" + }, + { + "include": "source.cpp#template_explicit_instantiation" + }, + { + "include": "source.cpp#access_control_keywords" + }, + { + "include": "#block" + }, + { + "include": "#static_assert" + }, + { + "include": "#assembly" + }, + { + "include": "#function_pointer" + }, + { + "include": "#evaluation_context" + } + ], + "repository": { + "alignas_attribute": { + "begin": "alignas\\(", + "end": "\\)|(?=(?|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)|(?=(?|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.italic.doxygen.cpp" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]b)\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.bold.doxygen.cpp" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.inline.raw.string.cpp" + } + } + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:\\s+)?(?:in|out)(?:\\s+)?)+)\\])?(\\s+((?|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.italic.doxygen.cpp" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]b)\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.bold.doxygen.cpp" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.inline.raw.string.cpp" + } + } + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:\\s+)?(?:in|out)(?:\\s+)?)+)\\])?(\\s+((?|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.italic.doxygen.cpp" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]b)\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.bold.doxygen.cpp" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.inline.raw.string.cpp" + } + } + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:\\s+)?(?:in|out)(?:\\s+)?)+)\\])?(\\s+((?|\\?\\?>)|(?=[;>\\[\\]=]))|(?=(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(\\()", + "end": "\\)|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)|(?=(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)(((?>(?|\\?\\?>)|(?=[;>\\[\\]=]))|(?=(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(\\()", + "end": "\\)|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)|(?=(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(\\{)", + "end": "\\}|(?=(?|(?=(?|\\?\\?>)|(?=[;>\\[\\]=]))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)|(?=(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)(((?>(?|\\?\\?>)|(?=[;>\\[\\]=]))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)|(?=(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(::))?(?:\\s+)?((?|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)|(?=(?|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)|(?=(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)\\b(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(\\()", + "end": "\\)|(?=(?|\\*\\/))\\s*+(?:((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))(((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))?(?:(?:&|\\*)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:&|\\*))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)\\b(?|\\?\\?>)|(?=[;>\\[\\]=]))|(?=(?|(?=(?)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))", + "captures": { + "1": { + "name": "punctuation.definition.function.return-type.cpp" + }, + "2": { + "patterns": [ + { + "include": "source.cpp#inline_comment" + } + ] + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "4": { + "name": "comment.block.cpp" + }, + "5": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "6": { + "name": "meta.qualified_type.cpp", + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + { + "match": "(?|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)|(?=(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))(((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))?(?:(?:&|\\*)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:&|\\*))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(\\()(\\*)(?:\\s+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?)(?:\\s+)?(?:(\\[)(\\w*)(\\])(?:\\s+)?)*(\\))(?:\\s+)?(\\()", + "end": "(\\))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?=[{=,);>]|\\n)(?!\\()|(?=(?|(?=(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))(((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))?(?:(?:&|\\*)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:&|\\*))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(\\()(\\*)(?:\\s+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?)(?:\\s+)?(?:(\\[)(\\w*)(\\])(?:\\s+)?)*(\\))(?:\\s+)?(\\()", + "end": "(\\))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?=[{=,);>]|\\n)(?!\\()|(?=(?|(?=(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))", + "captures": { + "1": { + "name": "meta.qualified_type.cpp", + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + { + "match": "(?|(?=(?])|(?<=\\Wreturn|^return))(?:\\s+)?(\\[(?!\\[| *+\"| *+\\d))((?:[^\\[\\]]|((??)++\\]))*+)(\\](?!((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))[\\[\\];=]))", + "end": "(?<=[;}])|(?=(?", + "end": "(?=\\{)|(?=(?\\*|->)))((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:\\s+)?(?:(?:\\.\\*|\\.)|(?:->\\*|->))(?:\\s+)?)*)(?:\\s+)?(~?(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)(?:\\s+)?(\\()", + "end": "\\)|(?=(?|->\\*))(?:\\s+)?(?:((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?\\*|->)))", + "captures": { + "1": { + "patterns": [ + { + "include": "source.cpp#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "3": { + "name": "comment.block.cpp" + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "5": { + "name": "variable.language.this.cpp" + }, + "6": { + "name": "variable.other.object.property.cpp" + }, + "7": { + "name": "punctuation.separator.dot-access.cpp" + }, + "8": { + "name": "punctuation.separator.pointer-access.cpp" + } + } + }, + { + "match": "(?:((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?\\*|->)))", + "captures": { + "1": { + "patterns": [ + { + "include": "source.cpp#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "3": { + "name": "comment.block.cpp" + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "5": { + "name": "variable.language.this.cpp" + }, + "6": { + "name": "variable.other.object.access.cpp" + }, + "7": { + "name": "punctuation.separator.dot-access.cpp" + }, + "8": { + "name": "punctuation.separator.pointer-access.cpp" + } + } + }, + { + "include": "source.cpp#member_access" + }, + { + "include": "#method_access" + } + ] + }, + "10": { + "name": "entity.name.function.member.cpp" + }, + "11": { + "name": "punctuation.section.arguments.begin.bracket.round.function.member.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.arguments.end.bracket.round.function.member.cpp" + } + }, + "patterns": [ + { + "include": "#evaluation_context" + } + ] + }, + "ms_attributes": { + "begin": "__declspec\\(", + "end": "\\)|(?=(?|\\?\\?>)|(?=[;>\\[\\]=]))|(?=(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)(?:\\s+)?((?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)|(?=(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))(((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))?(?:(?:&|\\*)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:&|\\*))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)(operator)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)(?:(?:((?:(?:delete\\[\\])|(?:delete)|(?:new\\[\\])|(?:<=>)|(?:<<=)|(?:new)|(?:>>=)|(?:\\->\\*)|(?:\\/=)|(?:%=)|(?:&=)|(?:>=)|(?:\\|=)|(?:\\+\\+)|(?:\\-\\-)|(?:\\(\\))|(?:\\[\\])|(?:\\->)|(?:\\+\\+)|(?:<<)|(?:>>)|(?:\\-\\-)|(?:<=)|(?:\\^=)|(?:==)|(?:!=)|(?:&&)|(?:\\|\\|)|(?:\\+=)|(?:\\-=)|(?:\\*=)|,|\\+|\\-|!|~|\\*|&|\\*|\\/|%|\\+|\\-|<|>|&|\\^|\\||=))|((?|\\?\\?>)|(?=[;>\\[\\]=]))|(?=(?|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)|(?=(?>=|\\|=", + "name": "keyword.operator.assignment.compound.bitwise.cpp" + }, + { + "match": "<<|>>", + "name": "keyword.operator.bitwise.shift.cpp" + }, + { + "match": "!=|<=|>=|==|<|>", + "name": "keyword.operator.comparison.cpp" + }, + { + "match": "&&|!|\\|\\|", + "name": "keyword.operator.logical.cpp" + }, + { + "match": "&|\\||\\^|~", + "name": "keyword.operator.bitwise.cpp" + }, + { + "include": "source.cpp#assignment_operator" + }, + { + "match": "%|\\*|\\/|-|\\+", + "name": "keyword.operator.arithmetic.cpp" + }, + { + "include": "#ternary_operator" + } + ] + }, + "parameter": { + "begin": "((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?=\\w)", + "end": "(?:(?=\\))|(,))|(?=(?|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)|(?=(?|\\?\\?>)|(?=[;>\\[\\]=]))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)|(?=(?|(?=(?|(?=(?|(?=(?|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)|(?=(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))(((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))?(?:(?:&|\\*)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:&|\\*))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(\\()(\\*)(?:\\s+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?)(?:\\s+)?(?:(\\[)(\\w*)(\\])(?:\\s+)?)*(\\))(?:\\s+)?(\\()", + "end": "(\\))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?=[{=,);>]|\\n)(?!\\()|(?=(?|(?=(?|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)|(?=(?|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)|(?=(?|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)|(?=(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)?((?|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))", + "beginCaptures": { + "0": { + "name": "meta.head.class.cpp" + }, + "1": { + "name": "storage.type.$1.cpp" + }, + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "4": { + "name": "comment.block.cpp" + }, + "5": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "6": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "7": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "patterns": [ + { + "match": "((?|\\?\\?>", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.class.cpp" + } + }, + "name": "meta.body.class.cpp", + "patterns": [ + { + "include": "#function_pointer" + }, + { + "include": "#static_assert" + }, + { + "include": "#constructor_inline" + }, + { + "include": "#destructor_inline" + }, + { + "include": "$self" + } + ] + }, + { + "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.tail.class.cpp", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "class_declare": { + "match": "((?|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.italic.doxygen.cpp" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]b)\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.bold.doxygen.cpp" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.inline.raw.string.cpp" + } + } + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:\\s+)?(?:in|out)(?:\\s+)?)+)\\])?(\\s+((?|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.italic.doxygen.cpp" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]b)\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.bold.doxygen.cpp" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.inline.raw.string.cpp" + } + } + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:\\s+)?(?:in|out)(?:\\s+)?)+)\\])?(\\s+((?|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.italic.doxygen.cpp" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]b)\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.bold.doxygen.cpp" + } + } + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))\\s+(\\S+)", + "captures": { + "1": { + "name": "storage.type.class.doxygen.cpp" + }, + "2": { + "name": "markup.inline.raw.string.cpp" + } + } + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", + "name": "storage.type.class.doxygen.cpp" + }, + { + "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:\\s+)?(?:in|out)(?:\\s+)?)+)\\])?(\\s+((?|\\?\\?>)|(?=[;>\\[\\]=]))", + "beginCaptures": { + "0": { + "name": "meta.head.function.definition.special.constructor.cpp" + }, + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "3": { + "name": "comment.block.cpp" + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "5": { + "patterns": [ + { + "include": "#functional_specifiers_pre_parameters" + } + ] + }, + "6": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "7": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "8": { + "name": "comment.block.cpp" + }, + "9": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "10": { + "name": "storage.type.modifier.calling-convention.cpp" + }, + "11": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "12": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "13": { + "name": "comment.block.cpp" + }, + "14": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "15": { + "name": "entity.name.function.constructor.cpp entity.name.function.definition.special.constructor.cpp" + } + }, + "endCaptures": {}, + "name": "meta.function.definition.special.constructor.cpp", + "patterns": [ + { + "begin": "\\G ?", + "end": "(?:\\{|<%|\\?\\?<|(?=;))", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.function.definition.special.constructor.cpp" + } + }, + "name": "meta.head.function.definition.special.constructor.cpp", + "patterns": [ + { + "include": "#ever_present_context" + }, + { + "match": "(\\=)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(default)|(delete))", + "captures": { + "1": { + "name": "keyword.operator.assignment.cpp" + }, + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "4": { + "name": "comment.block.cpp" + }, + "5": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "6": { + "name": "keyword.other.default.function.cpp keyword.other.default.constructor.cpp" + }, + "7": { + "name": "keyword.other.delete.function.cpp keyword.other.delete.constructor.cpp" + } + } + }, + { + "include": "#functional_specifiers_pre_parameters" + }, + { + "begin": ":", + "end": "(?=\\{)", + "beginCaptures": { + "0": { + "name": "punctuation.separator.initializers.cpp" + } + }, + "endCaptures": {}, + "patterns": [ + { + "begin": "((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(\\()", + "end": "\\)", + "beginCaptures": { + "1": { + "name": "entity.name.function.call.initializer.cpp" + }, + "2": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "3": {}, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "5": { + "name": "comment.block.cpp" + }, + "6": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "7": { + "name": "punctuation.section.arguments.begin.bracket.round.function.call.initializer.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.arguments.end.bracket.round.function.call.initializer.cpp" + } + }, + "contentName": "meta.parameter.initialization", + "patterns": [ + { + "include": "#evaluation_context" + } + ] + }, + { + "begin": "((?|\\?\\?>", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.function.definition.special.constructor.cpp" + } + }, + "name": "meta.body.function.definition.special.constructor.cpp", + "patterns": [ + { + "include": "#function_body_context" + } + ] + }, + { + "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.tail.function.definition.special.constructor.cpp", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "constructor_root": { + "begin": "\\s*+((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)(((?>(?|\\?\\?>)|(?=[;>\\[\\]=]))", + "beginCaptures": { + "0": { + "name": "meta.head.function.definition.special.constructor.cpp" + }, + "1": { + "name": "storage.type.modifier.calling-convention.cpp" + }, + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "4": { + "name": "comment.block.cpp" + }, + "5": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "6": { + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.constructor.cpp" + }, + { + "match": "(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(\\()", + "end": "\\)", + "beginCaptures": { + "1": { + "name": "entity.name.function.call.initializer.cpp" + }, + "2": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "3": {}, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "5": { + "name": "comment.block.cpp" + }, + "6": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "7": { + "name": "punctuation.section.arguments.begin.bracket.round.function.call.initializer.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.arguments.end.bracket.round.function.call.initializer.cpp" + } + }, + "contentName": "meta.parameter.initialization", + "patterns": [ + { + "include": "#evaluation_context" + } + ] + }, + { + "begin": "((?|\\?\\?>", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.function.definition.special.constructor.cpp" + } + }, + "name": "meta.body.function.definition.special.constructor.cpp", + "patterns": [ + { + "include": "#function_body_context" + } + ] + }, + { + "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.tail.function.definition.special.constructor.cpp", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "control_flow_keywords": { + "match": "((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(\\{)", + "end": "\\}", + "beginCaptures": { + "1": { + "name": "meta.qualified_type.cpp", + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + { + "match": "(?", + "beginCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.begin.template.call.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.end.template.call.cpp" + } + }, + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_context" + } + ] + }, + { + "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", + "name": "entity.name.type.cpp" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "5": { + "name": "comment.block.cpp" + }, + "6": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "7": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" + }, + { + "match": "(?]*(>?)((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(?:\\n|$)|(?=\\/\\/)))|((\\\")[^\\\"]*(\\\"?)((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(?:\\n|$)|(?=\\/\\/))))|(((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:\\.(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)*((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(?:\\n|$)|(?=(?:\\/\\/|;)))))|((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(?:\\n|$)|(?=(?:\\/\\/|;))))(?:\\s+)?(;?)", + "captures": { + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "3": { + "name": "keyword.control.directive.import.cpp" + }, + "5": { + "name": "string.quoted.other.lt-gt.include.cpp" + }, + "6": { + "name": "punctuation.definition.string.begin.cpp" + }, + "7": { + "name": "punctuation.definition.string.end.cpp" + }, + "8": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "9": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "10": { + "name": "string.quoted.double.include.cpp" + }, + "11": { + "name": "punctuation.definition.string.begin.cpp" + }, + "12": { + "name": "punctuation.definition.string.end.cpp" + }, + "13": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "14": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "15": { + "name": "entity.name.other.preprocessor.macro.include.cpp" + }, + "16": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "17": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "18": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "19": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "20": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "21": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "22": { + "name": "punctuation.terminator.statement.cpp" + } + }, + "name": "meta.preprocessor.import.cpp" + }, + "d9bc4796b0b_preprocessor_number_literal": { + "match": "(?|\\?\\?>)|(?=[;>\\[\\]=]))", + "beginCaptures": { + "0": { + "name": "meta.head.function.definition.special.member.destructor.cpp" + }, + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "3": { + "name": "comment.block.cpp" + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "5": { + "name": "storage.type.modifier.calling-convention.cpp" + }, + "6": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "7": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "8": { + "name": "comment.block.cpp" + }, + "9": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "10": { + "patterns": [ + { + "include": "#functional_specifiers_pre_parameters" + } + ] + }, + "11": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "12": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "13": { + "name": "comment.block.cpp" + }, + "14": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "15": { + "name": "entity.name.function.destructor.cpp entity.name.function.definition.special.member.destructor.cpp" + } + }, + "endCaptures": {}, + "name": "meta.function.definition.special.member.destructor.cpp", + "patterns": [ + { + "begin": "\\G ?", + "end": "(?:\\{|<%|\\?\\?<|(?=;))", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.function.definition.special.member.destructor.cpp" + } + }, + "name": "meta.head.function.definition.special.member.destructor.cpp", + "patterns": [ + { + "include": "#ever_present_context" + }, + { + "match": "(\\=)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(default)|(delete))", + "captures": { + "1": { + "name": "keyword.operator.assignment.cpp" + }, + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "4": { + "name": "comment.block.cpp" + }, + "5": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "6": { + "name": "keyword.other.default.function.cpp keyword.other.default.constructor.cpp keyword.other.default.destructor.cpp" + }, + "7": { + "name": "keyword.other.delete.function.cpp keyword.other.delete.constructor.cpp keyword.other.delete.destructor.cpp" + } + } + }, + { + "begin": "\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "punctuation.section.parameters.begin.bracket.round.special.member.destructor.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.parameters.end.bracket.round.special.member.destructor.cpp" + } + }, + "contentName": "meta.function.definition.parameters.special.member.destructor", + "patterns": [] + }, + { + "include": "#qualifiers_and_specifiers_post_parameters" + }, + { + "include": "$self" + } + ] + }, + { + "begin": "(?<=\\{|<%|\\?\\?<)", + "end": "\\}|%>|\\?\\?>", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.function.definition.special.member.destructor.cpp" + } + }, + "name": "meta.body.function.definition.special.member.destructor.cpp", + "patterns": [ + { + "include": "#function_body_context" + } + ] + }, + { + "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.tail.function.definition.special.member.destructor.cpp", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "destructor_root": { + "begin": "((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)(((?>(?|\\?\\?>)|(?=[;>\\[\\]=]))", + "beginCaptures": { + "0": { + "name": "meta.head.function.definition.special.member.destructor.cpp" + }, + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "3": { + "name": "comment.block.cpp" + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "5": { + "name": "storage.type.modifier.calling-convention.cpp" + }, + "6": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "7": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "8": { + "name": "comment.block.cpp" + }, + "9": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "10": { + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.destructor.cpp" + }, + { + "match": "(?|\\?\\?>", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.function.definition.special.member.destructor.cpp" + } + }, + "name": "meta.body.function.definition.special.member.destructor.cpp", + "patterns": [ + { + "include": "#function_body_context" + } + ] + }, + { + "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.tail.function.definition.special.member.destructor.cpp", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "diagnostic": { + "begin": "(^((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(#)(?:\\s+)?((?:error|warning)))\\b(?:\\s+)?", + "end": "(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(::))?(?:\\s+)?((?|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))", + "beginCaptures": { + "0": { + "name": "meta.head.enum.cpp" + }, + "1": { + "name": "storage.type.enum.cpp" + }, + "2": { + "name": "storage.type.enum.enum-key.$2.cpp" + }, + "3": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "4": { + "name": "entity.name.type.enum.cpp" + }, + "5": { + "name": "punctuation.separator.colon.type-specifier.cpp" + }, + "6": { + "patterns": [ + { + "include": "#scope_resolution_inner_generated" + } + ] + }, + "7": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + "8": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "9": {}, + "10": { + "name": "entity.name.scope-resolution.cpp" + }, + "11": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "12": {}, + "13": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "14": { + "name": "comment.block.cpp" + }, + "15": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "16": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + "17": { + "name": "storage.type.integral.$17.cpp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.terminator.statement.cpp" + }, + "2": { + "name": "punctuation.terminator.statement.cpp" + } + }, + "name": "meta.block.enum.cpp", + "patterns": [ + { + "begin": "\\G ?", + "end": "(?:\\{|<%|\\?\\?<|(?=;))", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.enum.cpp" + } + }, + "name": "meta.head.enum.cpp", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "(?<=\\{|<%|\\?\\?<)", + "end": "\\}|%>|\\?\\?>", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.enum.cpp" + } + }, + "name": "meta.body.enum.cpp", + "patterns": [ + { + "include": "#ever_present_context" + }, + { + "include": "#enumerator_list" + }, + { + "include": "#comments" + }, + { + "include": "#comma" + }, + { + "include": "#semicolon" + } + ] + }, + { + "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.tail.enum.cpp", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "enum_declare": { + "match": "((?|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))", + "beginCaptures": { + "0": { + "name": "meta.head.extern.cpp" + }, + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "3": { + "name": "comment.block.cpp" + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "5": { + "name": "storage.type.extern.cpp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.terminator.statement.cpp" + }, + "2": { + "name": "punctuation.terminator.statement.cpp" + } + }, + "name": "meta.block.extern.cpp", + "patterns": [ + { + "begin": "\\G ?", + "end": "(?:\\{|<%|\\?\\?<|(?=;))", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.extern.cpp" + } + }, + "name": "meta.head.extern.cpp", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "(?<=\\{|<%|\\?\\?<)", + "end": "\\}|%>|\\?\\?>", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.extern.cpp" + } + }, + "name": "meta.body.extern.cpp", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.tail.extern.cpp", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "$self" + } + ] + }, + "function_body_context": { + "patterns": [ + { + "include": "#ever_present_context" + }, + { + "include": "#using_namespace" + }, + { + "include": "#type_alias" + }, + { + "include": "#using_name" + }, + { + "include": "#namespace_alias" + }, + { + "include": "#typedef_class" + }, + { + "include": "#typedef_struct" + }, + { + "include": "#typedef_union" + }, + { + "include": "#misc_keywords" + }, + { + "include": "#standard_declares" + }, + { + "include": "#class_block" + }, + { + "include": "#struct_block" + }, + { + "include": "#union_block" + }, + { + "include": "#enum_block" + }, + { + "include": "#access_control_keywords" + }, + { + "include": "#block" + }, + { + "include": "#static_assert" + }, + { + "include": "#assembly" + }, + { + "include": "#function_pointer" + }, + { + "include": "#switch_statement" + }, + { + "include": "#goto_statement" + }, + { + "include": "#evaluation_context" + }, + { + "include": "#label" + } + ] + }, + "function_call": { + "begin": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)\\b(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(\\()", + "end": "\\)", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#scope_resolution_function_call_inner_generated" + } + ] + }, + "2": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.call.cpp" + }, + "3": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "4": {}, + "5": { + "name": "entity.name.function.call.cpp" + }, + "6": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "7": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "8": { + "name": "comment.block.cpp" + }, + "9": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "10": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "11": {}, + "12": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "13": { + "name": "comment.block.cpp" + }, + "14": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "15": { + "name": "punctuation.section.arguments.begin.bracket.round.function.call.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.arguments.end.bracket.round.function.call.cpp" + } + }, + "patterns": [ + { + "include": "#evaluation_context" + } + ] + }, + "function_definition": { + "begin": "(?:(?:^|\\G|(?<=;|\\}))|(?<=>|\\*\\/))\\s*+(?:((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))(((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))?(?:(?:&|\\*)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:&|\\*))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)\\b(?|\\?\\?>)|(?=[;>\\[\\]=]))", + "beginCaptures": { + "0": { + "name": "meta.head.function.definition.cpp" + }, + "1": { + "name": "storage.type.template.cpp" + }, + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "4": { + "name": "comment.block.cpp" + }, + "5": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "6": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "7": { + "patterns": [ + { + "match": "((?", + "beginCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.begin.template.call.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.end.template.call.cpp" + } + }, + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_context" + } + ] + }, + { + "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", + "name": "entity.name.type.cpp" + } + ] + }, + "14": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "15": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "16": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "17": { + "name": "comment.block.cpp" + }, + "18": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "19": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "20": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "21": { + "name": "comment.block.cpp" + }, + "22": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "23": { + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" + }, + { + "match": "(?)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))", + "captures": { + "1": { + "name": "punctuation.definition.function.return-type.cpp" + }, + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "4": { + "name": "comment.block.cpp" + }, + "5": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "6": { + "name": "meta.qualified_type.cpp", + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + { + "match": "(?", + "beginCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.begin.template.call.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.end.template.call.cpp" + } + }, + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_context" + } + ] + }, + { + "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", + "name": "entity.name.type.cpp" + } + ] + }, + "7": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "8": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "9": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "10": { + "name": "comment.block.cpp" + }, + "11": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "12": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "13": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "14": { + "name": "comment.block.cpp" + }, + "15": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "16": { + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" + }, + { + "match": "(?|\\?\\?>", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.function.definition.cpp" + } + }, + "name": "meta.body.function.definition.cpp", + "patterns": [ + { + "include": "#function_body_context" + } + ] + }, + { + "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.tail.function.definition.cpp", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "function_parameter_context": { + "patterns": [ + { + "include": "#ever_present_context" + }, + { + "include": "#parameter" + }, + { + "include": "#comma" + } + ] + }, + "function_pointer": { + "begin": "(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))(((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))?(?:(?:&|\\*)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:&|\\*))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(\\()(\\*)(?:\\s+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?)(?:\\s+)?(?:(\\[)(\\w*)(\\])(?:\\s+)?)*(\\))(?:\\s+)?(\\()", + "end": "(\\))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?=[{=,);>]|\\n)(?!\\()", + "beginCaptures": { + "1": { + "name": "meta.qualified_type.cpp", + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + { + "match": "(?", + "beginCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.begin.template.call.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.end.template.call.cpp" + } + }, + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_context" + } + ] + }, + { + "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", + "name": "entity.name.type.cpp" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "5": { + "name": "comment.block.cpp" + }, + "6": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "7": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" + }, + { + "match": "(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))(((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))?(?:(?:&|\\*)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:&|\\*))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(\\()(\\*)(?:\\s+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?)(?:\\s+)?(?:(\\[)(\\w*)(\\])(?:\\s+)?)*(\\))(?:\\s+)?(\\()", + "end": "(\\))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?=[{=,);>]|\\n)(?!\\()", + "beginCaptures": { + "1": { + "name": "meta.qualified_type.cpp", + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + { + "match": "(?", + "beginCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.begin.template.call.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.end.template.call.cpp" + } + }, + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_context" + } + ] + }, + { + "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", + "name": "entity.name.type.cpp" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "5": { + "name": "comment.block.cpp" + }, + "6": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "7": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" + }, + { + "match": "(?]*(>?)((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(?:\\n|$)|(?=\\/\\/)))|((\\\")[^\\\"]*(\\\"?)((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(?:\\n|$)|(?=\\/\\/))))|(((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:\\.(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)*((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(?:\\n|$)|(?=(?:\\/\\/|;)))))|((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(?:\\n|$)|(?=(?:\\/\\/|;))))", + "captures": { + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "3": { + "name": "keyword.control.directive.$5.cpp" + }, + "4": { + "name": "punctuation.definition.directive.cpp" + }, + "6": { + "name": "string.quoted.other.lt-gt.include.cpp" + }, + "7": { + "name": "punctuation.definition.string.begin.cpp" + }, + "8": { + "name": "punctuation.definition.string.end.cpp" + }, + "9": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "10": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "11": { + "name": "string.quoted.double.include.cpp" + }, + "12": { + "name": "punctuation.definition.string.begin.cpp" + }, + "13": { + "name": "punctuation.definition.string.end.cpp" + }, + "14": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "15": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "16": { + "name": "entity.name.other.preprocessor.macro.include.cpp" + }, + "17": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "18": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "19": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "20": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "21": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "22": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + } + }, + "name": "meta.preprocessor.include.cpp" + }, + "inheritance_context": { + "patterns": [ + { + "include": "#ever_present_context" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.comma.inheritance.cpp" + }, + { + "match": "(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))", + "captures": { + "1": { + "name": "meta.qualified_type.cpp", + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + { + "match": "(?", + "beginCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.begin.template.call.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.end.template.call.cpp" + } + }, + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_context" + } + ] + }, + { + "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", + "name": "entity.name.type.cpp" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "4": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "5": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "6": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "7": { + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" + }, + { + "match": "(?])|(?<=\\Wreturn|^return))(?:\\s+)?(\\[(?!\\[| *+\"| *+\\d))((?:[^\\[\\]]|((??)++\\]))*+)(\\](?!((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))[\\[\\];=]))", + "end": "(?<=[;}])", + "beginCaptures": { + "1": { + "name": "punctuation.definition.capture.begin.lambda.cpp" + }, + "2": { + "name": "meta.lambda.capture.cpp", + "patterns": [ + { + "include": "#the_this_keyword" + }, + { + "match": "((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(?:(?=\\]|\\z|$)|(,))|(\\=))", + "captures": { + "1": { + "name": "variable.parameter.capture.cpp" + }, + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "4": { + "name": "comment.block.cpp" + }, + "5": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "6": { + "name": "punctuation.separator.delimiter.comma.cpp" + }, + "7": { + "name": "keyword.operator.assignment.cpp" + } + } + }, + { + "include": "#evaluation_context" + } + ] + }, + "3": {}, + "4": { + "name": "punctuation.definition.capture.end.lambda.cpp" + }, + "5": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "6": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "7": { + "name": "comment.block.cpp" + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + }, + "endCaptures": {}, + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.parameters.begin.lambda.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.lambda.cpp" + } + }, + "name": "meta.function.definition.parameters.lambda.cpp", + "patterns": [ + { + "include": "#function_parameter_context" + } + ] + }, + { + "match": "(?", + "end": "(?=\\{)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.lambda.return-type.cpp" + } + }, + "endCaptures": {}, + "patterns": [ + { + "include": "#comments" + }, + { + "match": "\\S+", + "name": "storage.type.return-type.lambda.cpp" + } + ] + }, + { + "begin": "\\{", + "end": "\\}", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.lambda.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.lambda.cpp" + } + }, + "name": "meta.function.definition.body.lambda.cpp", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "language_constants": { + "match": "(?\\*|->)))((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:\\s+)?(?:(?:\\.\\*|\\.)|(?:->\\*|->))(?:\\s+)?)*)(?:\\s+)?(\\b(?!uint_least32_t[^\\w]|uint_least16_t[^\\w]|uint_least64_t[^\\w]|int_least32_t[^\\w]|int_least64_t[^\\w]|uint_fast32_t[^\\w]|uint_fast64_t[^\\w]|uint_least8_t[^\\w]|uint_fast16_t[^\\w]|int_least16_t[^\\w]|int_fast16_t[^\\w]|int_least8_t[^\\w]|uint_fast8_t[^\\w]|int_fast64_t[^\\w]|int_fast32_t[^\\w]|int_fast8_t[^\\w]|suseconds_t[^\\w]|useconds_t[^\\w]|in_addr_t[^\\w]|uintmax_t[^\\w]|uintmax_t[^\\w]|uintmax_t[^\\w]|in_port_t[^\\w]|uintptr_t[^\\w]|blksize_t[^\\w]|uint32_t[^\\w]|uint64_t[^\\w]|u_quad_t[^\\w]|intmax_t[^\\w]|intmax_t[^\\w]|unsigned[^\\w]|blkcnt_t[^\\w]|uint16_t[^\\w]|intptr_t[^\\w]|swblk_t[^\\w]|wchar_t[^\\w]|u_short[^\\w]|qaddr_t[^\\w]|caddr_t[^\\w]|daddr_t[^\\w]|fixpt_t[^\\w]|nlink_t[^\\w]|segsz_t[^\\w]|clock_t[^\\w]|ssize_t[^\\w]|int16_t[^\\w]|int32_t[^\\w]|int64_t[^\\w]|uint8_t[^\\w]|int8_t[^\\w]|mode_t[^\\w]|quad_t[^\\w]|ushort[^\\w]|u_long[^\\w]|u_char[^\\w]|double[^\\w]|signed[^\\w]|time_t[^\\w]|size_t[^\\w]|key_t[^\\w]|div_t[^\\w]|ino_t[^\\w]|uid_t[^\\w]|gid_t[^\\w]|off_t[^\\w]|pid_t[^\\w]|float[^\\w]|dev_t[^\\w]|u_int[^\\w]|short[^\\w]|bool[^\\w]|id_t[^\\w]|uint[^\\w]|long[^\\w]|char[^\\w]|void[^\\w]|auto[^\\w]|id_t[^\\w]|int[^\\w])(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b(?!\\())", + "captures": { + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "3": { + "name": "variable.language.this.cpp" + }, + "4": { + "name": "variable.other.object.access.cpp" + }, + "5": { + "name": "punctuation.separator.dot-access.cpp" + }, + "6": { + "name": "punctuation.separator.pointer-access.cpp" + }, + "7": { + "patterns": [ + { + "match": "(?<=(?:\\.\\*|\\.|->|->\\*))(?:\\s+)?(?:((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?\\*|->)))", + "captures": { + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "3": { + "name": "comment.block.cpp" + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "5": { + "name": "variable.language.this.cpp" + }, + "6": { + "name": "variable.other.object.property.cpp" + }, + "7": { + "name": "punctuation.separator.dot-access.cpp" + }, + "8": { + "name": "punctuation.separator.pointer-access.cpp" + } + } + }, + { + "match": "(?:((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?\\*|->)))", + "captures": { + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "3": { + "name": "comment.block.cpp" + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "5": { + "name": "variable.language.this.cpp" + }, + "6": { + "name": "variable.other.object.access.cpp" + }, + "7": { + "name": "punctuation.separator.dot-access.cpp" + }, + "8": { + "name": "punctuation.separator.pointer-access.cpp" + } + } + }, + { + "include": "#member_access" + }, + { + "include": "#method_access" + } + ] + }, + "8": { + "name": "variable.other.property.cpp" + } + } + }, + "memory_operators": { + "match": "((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?:(?:(delete)(?:\\s+)?(\\[\\])|(delete))|(new))(?!\\w))", + "captures": { + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "3": { + "name": "keyword.operator.wordlike.cpp" + }, + "4": { + "name": "keyword.operator.delete.array.cpp" + }, + "5": { + "name": "keyword.operator.delete.array.bracket.cpp" + }, + "6": { + "name": "keyword.operator.delete.cpp" + }, + "7": { + "name": "keyword.operator.new.cpp" + } + } + }, + "method_access": { + "begin": "(?:((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?\\*|->)))((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:\\s+)?(?:(?:\\.\\*|\\.)|(?:->\\*|->))(?:\\s+)?)*)(?:\\s+)?(~?(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)(?:\\s+)?(\\()", + "end": "\\)", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "3": { + "name": "comment.block.cpp" + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "5": { + "name": "variable.language.this.cpp" + }, + "6": { + "name": "variable.other.object.access.cpp" + }, + "7": { + "name": "punctuation.separator.dot-access.cpp" + }, + "8": { + "name": "punctuation.separator.pointer-access.cpp" + }, + "9": { + "patterns": [ + { + "match": "(?<=(?:\\.\\*|\\.|->|->\\*))(?:\\s+)?(?:((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?\\*|->)))", + "captures": { + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "3": { + "name": "comment.block.cpp" + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "5": { + "name": "variable.language.this.cpp" + }, + "6": { + "name": "variable.other.object.property.cpp" + }, + "7": { + "name": "punctuation.separator.dot-access.cpp" + }, + "8": { + "name": "punctuation.separator.pointer-access.cpp" + } + } + }, + { + "match": "(?:((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?\\*|->)))", + "captures": { + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "3": { + "name": "comment.block.cpp" + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "5": { + "name": "variable.language.this.cpp" + }, + "6": { + "name": "variable.other.object.access.cpp" + }, + "7": { + "name": "punctuation.separator.dot-access.cpp" + }, + "8": { + "name": "punctuation.separator.pointer-access.cpp" + } + } + }, + { + "include": "#member_access" + }, + { + "include": "#method_access" + } + ] + }, + "10": { + "name": "entity.name.function.member.cpp" + }, + "11": { + "name": "punctuation.section.arguments.begin.bracket.round.function.member.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.arguments.end.bracket.round.function.member.cpp" + } + }, + "patterns": [ + { + "include": "#evaluation_context" + } + ] + }, + "misc_keywords": { + "match": "((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)(?:\\s+)?((?|\\?\\?>)|(?=[;>\\[\\]=]))", + "beginCaptures": { + "0": { + "name": "meta.head.namespace.cpp" + }, + "1": { + "name": "keyword.other.namespace.definition.cpp storage.type.namespace.definition.cpp" + } + }, + "endCaptures": {}, + "name": "meta.block.namespace.cpp", + "patterns": [ + { + "begin": "\\G ?", + "end": "(?:\\{|<%|\\?\\?<|(?=;))", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.namespace.cpp" + } + }, + "name": "meta.head.namespace.cpp", + "patterns": [ + { + "include": "#ever_present_context" + }, + { + "include": "#attributes_context" + }, + { + "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)(?:\\s+)?((?|\\?\\?>", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.namespace.cpp" + } + }, + "name": "meta.body.namespace.cpp", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.tail.namespace.cpp", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "noexcept_operator": { + "begin": "((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))(((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))?(?:(?:&|\\*)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:&|\\*))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)(operator)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)(?:(?:((?:(?:delete\\[\\])|(?:delete)|(?:new\\[\\])|(?:<=>)|(?:<<=)|(?:new)|(?:>>=)|(?:\\->\\*)|(?:\\/=)|(?:%=)|(?:&=)|(?:>=)|(?:\\|=)|(?:\\+\\+)|(?:\\-\\-)|(?:\\(\\))|(?:\\[\\])|(?:\\->)|(?:\\+\\+)|(?:<<)|(?:>>)|(?:\\-\\-)|(?:<=)|(?:\\^=)|(?:==)|(?:!=)|(?:&&)|(?:\\|\\|)|(?:\\+=)|(?:\\-=)|(?:\\*=)|,|\\+|\\-|!|~|\\*|&|\\*|\\/|%|\\+|\\-|<|>|&|\\^|\\||=))|((?|\\?\\?>)|(?=[;>\\[\\]=]))", + "beginCaptures": { + "0": { + "name": "meta.head.function.definition.special.operator-overload.cpp" + }, + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "3": { + "name": "comment.block.cpp" + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "5": { + "name": "meta.qualified_type.cpp", + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + { + "match": "(?", + "beginCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.begin.template.call.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.end.template.call.cpp" + } + }, + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_context" + } + ] + }, + { + "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", + "name": "entity.name.type.cpp" + } + ] + }, + "6": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "7": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "12": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "13": { + "name": "comment.block.cpp" + }, + "14": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "15": { + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" + }, + { + "match": "(?|\\?\\?>", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.function.definition.special.operator-overload.cpp" + } + }, + "name": "meta.body.function.definition.special.operator-overload.cpp", + "patterns": [ + { + "include": "#function_body_context" + } + ] + }, + { + "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.tail.function.definition.special.operator-overload.cpp", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "operators": { + "patterns": [ + { + "begin": "((?>=|\\|=", + "name": "keyword.operator.assignment.compound.bitwise.cpp" + }, + { + "match": "<<|>>", + "name": "keyword.operator.bitwise.shift.cpp" + }, + { + "match": "!=|<=|>=|==|<|>", + "name": "keyword.operator.comparison.cpp" + }, + { + "match": "&&|!|\\|\\|", + "name": "keyword.operator.logical.cpp" + }, + { + "match": "&|\\||\\^|~", + "name": "keyword.operator.bitwise.cpp" + }, + { + "include": "#assignment_operator" + }, + { + "match": "%|\\*|\\/|-|\\+", + "name": "keyword.operator.arithmetic.cpp" + }, + { + "include": "#ternary_operator" + } + ] + }, + "over_qualified_types": { + "patterns": [ + { + "match": "(\\bstruct)((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.])", + "captures": { + "0": { + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + { + "match": "(?", + "beginCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.begin.template.call.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.end.template.call.cpp" + } + }, + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_context" + } + ] + }, + { + "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", + "name": "entity.name.type.cpp" + } + ] + }, + "1": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "3": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "4": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "5": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "6": { + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" + }, + { + "match": "(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+", + "captures": { + "0": { + "patterns": [ + { + "include": "#scope_resolution_inner_generated" + } + ] + }, + "1": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + "2": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + } + } + }, + "scope_resolution_function_call": { + "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+", + "captures": { + "0": { + "patterns": [ + { + "include": "#scope_resolution_function_call_inner_generated" + } + ] + }, + "1": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.call.cpp" + }, + "2": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + } + } + }, + "scope_resolution_function_call_inner_generated": { + "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(::)", + "captures": { + "1": { + "patterns": [ + { + "include": "#scope_resolution_function_call_inner_generated" + } + ] + }, + "2": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.call.cpp" + }, + "3": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "4": {}, + "5": { + "name": "entity.name.scope-resolution.function.call.cpp" + }, + "6": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "7": {}, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.call.cpp" + } + } + }, + "scope_resolution_function_definition": { + "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+", + "captures": { + "0": { + "patterns": [ + { + "include": "#scope_resolution_function_definition_inner_generated" + } + ] + }, + "1": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.cpp" + }, + "2": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + } + } + }, + "scope_resolution_function_definition_inner_generated": { + "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(::)", + "captures": { + "1": { + "patterns": [ + { + "include": "#scope_resolution_function_definition_inner_generated" + } + ] + }, + "2": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.cpp" + }, + "3": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "4": {}, + "5": { + "name": "entity.name.scope-resolution.function.definition.cpp" + }, + "6": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "7": {}, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.cpp" + } + } + }, + "scope_resolution_function_definition_operator_overload": { + "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+", + "captures": { + "0": { + "patterns": [ + { + "include": "#scope_resolution_function_definition_operator_overload_inner_generated" + } + ] + }, + "1": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.operator-overload.cpp" + }, + "2": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + } + } + }, + "scope_resolution_function_definition_operator_overload_inner_generated": { + "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(::)", + "captures": { + "1": { + "patterns": [ + { + "include": "#scope_resolution_function_definition_operator_overload_inner_generated" + } + ] + }, + "2": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.operator-overload.cpp" + }, + "3": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "4": {}, + "5": { + "name": "entity.name.scope-resolution.function.definition.operator-overload.cpp" + }, + "6": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "7": {}, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.operator-overload.cpp" + } + } + }, + "scope_resolution_inner_generated": { + "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(::)", + "captures": { + "1": { + "patterns": [ + { + "include": "#scope_resolution_inner_generated" + } + ] + }, + "2": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + "3": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "4": {}, + "5": { + "name": "entity.name.scope-resolution.cpp" + }, + "6": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "7": {}, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + } + } + }, + "scope_resolution_namespace_alias": { + "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+", + "captures": { + "0": { + "patterns": [ + { + "include": "#scope_resolution_namespace_alias_inner_generated" + } + ] + }, + "1": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.alias.cpp" + }, + "2": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + } + } + }, + "scope_resolution_namespace_alias_inner_generated": { + "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(::)", + "captures": { + "1": { + "patterns": [ + { + "include": "#scope_resolution_namespace_alias_inner_generated" + } + ] + }, + "2": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.alias.cpp" + }, + "3": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "4": {}, + "5": { + "name": "entity.name.scope-resolution.namespace.alias.cpp" + }, + "6": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "7": {}, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.alias.cpp" + } + } + }, + "scope_resolution_namespace_block": { + "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+", + "captures": { + "0": { + "patterns": [ + { + "include": "#scope_resolution_namespace_block_inner_generated" + } + ] + }, + "1": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.block.cpp" + }, + "2": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + } + } + }, + "scope_resolution_namespace_block_inner_generated": { + "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(::)", + "captures": { + "1": { + "patterns": [ + { + "include": "#scope_resolution_namespace_block_inner_generated" + } + ] + }, + "2": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.block.cpp" + }, + "3": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "4": {}, + "5": { + "name": "entity.name.scope-resolution.namespace.block.cpp" + }, + "6": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "7": {}, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.block.cpp" + } + } + }, + "scope_resolution_namespace_using": { + "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+", + "captures": { + "0": { + "patterns": [ + { + "include": "#scope_resolution_namespace_using_inner_generated" + } + ] + }, + "1": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.using.cpp" + }, + "2": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + } + } + }, + "scope_resolution_namespace_using_inner_generated": { + "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(::)", + "captures": { + "1": { + "patterns": [ + { + "include": "#scope_resolution_namespace_using_inner_generated" + } + ] + }, + "2": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.using.cpp" + }, + "3": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "4": {}, + "5": { + "name": "entity.name.scope-resolution.namespace.using.cpp" + }, + "6": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "7": {}, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.using.cpp" + } + } + }, + "scope_resolution_parameter": { + "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+", + "captures": { + "0": { + "patterns": [ + { + "include": "#scope_resolution_parameter_inner_generated" + } + ] + }, + "1": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.parameter.cpp" + }, + "2": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + } + } + }, + "scope_resolution_parameter_inner_generated": { + "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(::)", + "captures": { + "1": { + "patterns": [ + { + "include": "#scope_resolution_parameter_inner_generated" + } + ] + }, + "2": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.parameter.cpp" + }, + "3": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "4": {}, + "5": { + "name": "entity.name.scope-resolution.parameter.cpp" + }, + "6": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "7": {}, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.parameter.cpp" + } + } + }, + "scope_resolution_template_call": { + "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+", + "captures": { + "0": { + "patterns": [ + { + "include": "#scope_resolution_template_call_inner_generated" + } + ] + }, + "1": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.call.cpp" + }, + "2": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + } + } + }, + "scope_resolution_template_call_inner_generated": { + "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(::)", + "captures": { + "1": { + "patterns": [ + { + "include": "#scope_resolution_template_call_inner_generated" + } + ] + }, + "2": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.call.cpp" + }, + "3": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "4": {}, + "5": { + "name": "entity.name.scope-resolution.template.call.cpp" + }, + "6": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "7": {}, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.call.cpp" + } + } + }, + "scope_resolution_template_definition": { + "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+", + "captures": { + "0": { + "patterns": [ + { + "include": "#scope_resolution_template_definition_inner_generated" + } + ] + }, + "1": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.definition.cpp" + }, + "2": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + } + } + }, + "scope_resolution_template_definition_inner_generated": { + "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?(::)", + "captures": { + "1": { + "patterns": [ + { + "include": "#scope_resolution_template_definition_inner_generated" + } + ] + }, + "2": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.definition.cpp" + }, + "3": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "4": {}, + "5": { + "name": "entity.name.scope-resolution.template.definition.cpp" + }, + "6": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "7": {}, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.definition.cpp" + } + } + }, + "semicolon": { + "match": ";", + "name": "punctuation.terminator.statement.cpp" + }, + "simple_type": { + "match": "(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))(((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))?(?:(?:&|\\*)((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:&|\\*))?", + "captures": { + "1": { + "name": "meta.qualified_type.cpp", + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + { + "match": "(?", + "beginCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.begin.template.call.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.end.template.call.cpp" + } + }, + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_context" + } + ] + }, + { + "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", + "name": "entity.name.type.cpp" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "4": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "5": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "6": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "7": { + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" + }, + { + "match": "(?|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))", + "beginCaptures": { + "0": { + "name": "meta.head.struct.cpp" + }, + "1": { + "name": "storage.type.$1.cpp" + }, + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "4": { + "name": "comment.block.cpp" + }, + "5": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "6": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "7": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "patterns": [ + { + "match": "((?|\\?\\?>", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.struct.cpp" + } + }, + "name": "meta.body.struct.cpp", + "patterns": [ + { + "include": "#function_pointer" + }, + { + "include": "#static_assert" + }, + { + "include": "#constructor_inline" + }, + { + "include": "#destructor_inline" + }, + { + "include": "$self" + } + ] + }, + { + "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.tail.struct.cpp", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "struct_declare": { + "match": "((?|\\?\\?>)|(?=[;>\\[\\]=]))", + "beginCaptures": { + "0": { + "name": "meta.head.switch.cpp" + }, + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "3": { + "name": "comment.block.cpp" + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "5": { + "name": "keyword.control.switch.cpp" + } + }, + "endCaptures": {}, + "name": "meta.block.switch.cpp", + "patterns": [ + { + "begin": "\\G ?", + "end": "(?:\\{|<%|\\?\\?<|(?=;))", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.switch.cpp" + } + }, + "name": "meta.head.switch.cpp", + "patterns": [ + { + "include": "#switch_conditional_parentheses" + }, + { + "include": "$self" + } + ] + }, + { + "begin": "(?<=\\{|<%|\\?\\?<)", + "end": "\\}|%>|\\?\\?>", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.switch.cpp" + } + }, + "name": "meta.body.switch.cpp", + "patterns": [ + { + "include": "#default_statement" + }, + { + "include": "#case_statement" + }, + { + "include": "$self" + } + ] + }, + { + "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.tail.switch.cpp", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "template_argument_defaulted": { + "match": "(?<=<|,)(?:\\s+)?((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)\\s+((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?)(?:\\s+)?(\\=)", + "captures": { + "1": { + "name": "storage.type.template.argument.$1.cpp" + }, + "2": { + "name": "entity.name.type.template.cpp" + }, + "3": { + "name": "keyword.operator.assignment.cpp" + } + } + }, + "template_call_context": { + "patterns": [ + { + "include": "#ever_present_context" + }, + { + "include": "#template_call_range" + }, + { + "include": "#storage_types" + }, + { + "include": "#language_constants" + }, + { + "include": "#scope_resolution_template_call_inner_generated" + }, + { + "include": "#operators" + }, + { + "include": "#number_literal" + }, + { + "include": "#string_context" + }, + { + "include": "#comma_in_template_argument" + }, + { + "include": "#qualified_type" + } + ] + }, + "template_call_innards": { + "match": "((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+", + "captures": { + "0": { + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "2": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "3": { + "name": "comment.block.cpp" + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + }, + "name": "meta.template.call.cpp" + }, + "template_call_range": { + "begin": "<", + "end": ">", + "beginCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.begin.template.call.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.end.template.call.cpp" + } + }, + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_context" + } + ] + }, + "template_definition": { + "begin": "(?", + "beginCaptures": { + "1": { + "name": "storage.type.template.cpp" + }, + "2": { + "name": "punctuation.section.angle-brackets.begin.template.definition.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.end.template.definition.cpp" + } + }, + "name": "meta.template.definition.cpp", + "patterns": [ + { + "begin": "(?<=\\w)(?:\\s+)?<", + "end": ">", + "beginCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.begin.template.call.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.end.template.call.cpp" + } + }, + "patterns": [ + { + "include": "#template_call_context" + } + ] + }, + { + "include": "#template_definition_context" + } + ] + }, + "template_definition_argument": { + "match": "((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(?:(?:((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)|((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\s+)+)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*))|((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)(?:\\s+)?(\\.\\.\\.)(?:\\s+)?((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*))|(?)(?:\\s+)?(class|typename)(?:\\s+((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*))?)(?:\\s+)?(?:(\\=)(?:\\s+)?(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?(?:(,)|(?=>|$))", + "captures": { + "1": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "2": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "3": { + "name": "storage.type.template.argument.$3.cpp" + }, + "4": { + "patterns": [ + { + "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", + "name": "storage.type.template.argument.$0.cpp" + } + ] + }, + "5": { + "name": "entity.name.type.template.cpp" + }, + "6": { + "name": "storage.type.template.argument.$6.cpp" + }, + "7": { + "name": "punctuation.vararg-ellipses.template.definition.cpp" + }, + "8": { + "name": "entity.name.type.template.cpp" + }, + "9": { + "name": "storage.type.template.cpp" + }, + "10": { + "name": "punctuation.section.angle-brackets.begin.template.definition.cpp" + }, + "11": { + "name": "storage.type.template.argument.$11.cpp" + }, + "12": { + "name": "entity.name.type.template.cpp" + }, + "13": { + "name": "punctuation.section.angle-brackets.end.template.definition.cpp" + }, + "14": { + "name": "storage.type.template.argument.$14.cpp" + }, + "15": { + "name": "entity.name.type.template.cpp" + }, + "16": { + "name": "keyword.operator.assignment.cpp" + }, + "17": { + "name": "punctuation.separator.delimiter.comma.template.argument.cpp" + } + } + }, + "template_definition_context": { + "patterns": [ + { + "include": "#scope_resolution_template_definition_inner_generated" + }, + { + "include": "#template_definition_argument" + }, + { + "include": "#template_argument_defaulted" + }, + { + "include": "#template_call_innards" + }, + { + "include": "#evaluation_context" + } + ] + }, + "template_explicit_instantiation": { + "match": "(?)(?:\\s+)?$", + "captures": { + "1": { + "name": "storage.type.template.cpp" + }, + "2": { + "name": "punctuation.section.angle-brackets.begin.template.definition.cpp" + }, + "3": { + "name": "meta.template.definition.cpp", + "patterns": [ + { + "include": "#template_definition_context" + } + ] + }, + "4": { + "name": "punctuation.section.angle-brackets.end.template.definition.cpp" + } + } + }, + "ternary_operator": { + "begin": "\\?", + "end": ":", + "beginCaptures": { + "0": { + "name": "keyword.operator.ternary.cpp" + } + }, + "endCaptures": { + "0": { + "name": "keyword.operator.ternary.cpp" + } + }, + "patterns": [ + { + "include": "#ever_present_context" + }, + { + "include": "#string_context" + }, + { + "include": "#number_literal" + }, + { + "include": "#method_access" + }, + { + "include": "#member_access" + }, + { + "include": "#predefined_macros" + }, + { + "include": "#operators" + }, + { + "include": "#memory_operators" + }, + { + "include": "#wordlike_operators" + }, + { + "include": "#type_casting_operators" + }, + { + "include": "#control_flow_keywords" + }, + { + "include": "#exception_keywords" + }, + { + "include": "#the_this_keyword" + }, + { + "include": "#language_constants" + }, + { + "include": "#builtin_storage_type_initilizer" + }, + { + "include": "#qualifiers_and_specifiers_post_parameters" + }, + { + "include": "#functional_specifiers_pre_parameters" + }, + { + "include": "#storage_types" + }, + { + "include": "#lambdas" + }, + { + "include": "#attributes_context" + }, + { + "include": "#parentheses" + }, + { + "include": "#function_call" + }, + { + "include": "#scope_resolution_inner_generated" + }, + { + "include": "#square_brackets" + }, + { + "include": "#semicolon" + }, + { + "include": "#comma" + } + ], + "applyEndPatternLast": 1 + }, + "the_this_keyword": { + "match": "((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))|(.*(?", + "beginCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.begin.template.call.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.end.template.call.cpp" + } + }, + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_context" + } + ] + }, + { + "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", + "name": "entity.name.type.cpp" + } + ] + }, + "9": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "10": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "11": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "12": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "13": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "14": { + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" + }, + { + "match": "(?|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))", + "beginCaptures": { + "0": { + "name": "meta.head.class.cpp" + }, + "1": { + "name": "storage.type.$1.cpp" + }, + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "4": { + "name": "comment.block.cpp" + }, + "5": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "6": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "7": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "patterns": [ + { + "match": "((?|\\?\\?>", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.class.cpp" + } + }, + "name": "meta.body.class.cpp", + "patterns": [ + { + "include": "#function_pointer" + }, + { + "include": "#static_assert" + }, + { + "include": "#constructor_inline" + }, + { + "include": "#destructor_inline" + }, + { + "include": "$self" + } + ] + }, + { + "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.tail.class.cpp", + "patterns": [ + { + "match": "(((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))?(?:(?:&|\\*)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:&|\\*))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))(((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))?(?:(?:&|\\*)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:&|\\*))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(\\()(\\*)(?:\\s+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?)(?:\\s+)?(?:(\\[)(\\w*)(\\])(?:\\s+)?)*(\\))(?:\\s+)?(\\()", + "end": "(\\))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?=[{=,);>]|\\n)(?!\\()", + "beginCaptures": { + "1": { + "name": "meta.qualified_type.cpp", + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + { + "match": "(?", + "beginCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.begin.template.call.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.end.template.call.cpp" + } + }, + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_context" + } + ] + }, + { + "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", + "name": "entity.name.type.cpp" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "4": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "5": { + "name": "comment.block.cpp" + }, + "6": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "7": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" + }, + { + "match": "(?|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))", + "beginCaptures": { + "0": { + "name": "meta.head.struct.cpp" + }, + "1": { + "name": "storage.type.$1.cpp" + }, + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "4": { + "name": "comment.block.cpp" + }, + "5": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "6": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "7": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "patterns": [ + { + "match": "((?|\\?\\?>", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.struct.cpp" + } + }, + "name": "meta.body.struct.cpp", + "patterns": [ + { + "include": "#function_pointer" + }, + { + "include": "#static_assert" + }, + { + "include": "#constructor_inline" + }, + { + "include": "#destructor_inline" + }, + { + "include": "$self" + } + ] + }, + { + "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.tail.struct.cpp", + "patterns": [ + { + "match": "(((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))?(?:(?:&|\\*)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:&|\\*))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))", + "beginCaptures": { + "0": { + "name": "meta.head.union.cpp" + }, + "1": { + "name": "storage.type.$1.cpp" + }, + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "4": { + "name": "comment.block.cpp" + }, + "5": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "6": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "7": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "patterns": [ + { + "match": "((?|\\?\\?>", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.union.cpp" + } + }, + "name": "meta.body.union.cpp", + "patterns": [ + { + "include": "#function_pointer" + }, + { + "include": "#static_assert" + }, + { + "include": "#constructor_inline" + }, + { + "include": "#destructor_inline" + }, + { + "include": "$self" + } + ] + }, + { + "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.tail.union.cpp", + "patterns": [ + { + "match": "(((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))?(?:(?:&|\\*)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:&|\\*))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:__has_include)|(?:atomic_cancel)|(?:synchronized)|(?:thread_local)|(?:dynamic_cast)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:co_return)|(?:constinit)|(?:namespace)|(?:protected)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:co_return)|(?:consteval)|(?:co_await)|(?:continue)|(?:template)|(?:reflexpr)|(?:volatile)|(?:register)|(?:co_await)|(?:co_yield)|(?:restrict)|(?:noexcept)|(?:volatile)|(?:override)|(?:explicit)|(?:decltype)|(?:operator)|(?:noexcept)|(?:noexcept)|(?:typename)|(?:requires)|(?:co_yield)|(?:nullptr)|(?:alignof)|(?:alignas)|(?:default)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:define)|(?:module)|(?:sizeof)|(?:switch)|(?:delete)|(?:pragma)|(?:and_eq)|(?:inline)|(?:xor_eq)|(?:typeid)|(?:import)|(?:extern)|(?:public)|(?:bitand)|(?:static)|(?:export)|(?:return)|(?:friend)|(?:ifndef)|(?:not_eq)|(?:false)|(?:final)|(?:break)|(?:const)|(?:catch)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:audit)|(?:while)|(?:using)|(?:axiom)|(?:or_eq)|(?:compl)|(?:throw)|(?:bitor)|(?:const)|(?:line)|(?:case)|(?:else)|(?:this)|(?:true)|(?:goto)|(?:else)|(?:NULL)|(?:elif)|(?:new)|(?:asm)|(?:xor)|(?:and)|(?:try)|(?:not)|(?:for)|(?:do)|(?:if)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)?(?![\\w<:.]))", + "captures": { + "1": { + "name": "storage.modifier.cpp" + }, + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "3": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "4": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "5": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "6": { + "name": "meta.qualified_type.cpp", + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + { + "match": "(?", + "beginCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.begin.template.call.cpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.angle-brackets.end.template.call.cpp" + } + }, + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_context" + } + ] + }, + { + "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", + "name": "entity.name.type.cpp" + } + ] + }, + "7": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "8": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "9": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "10": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "11": { + "patterns": [ + { + "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+", + "captures": { + "1": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "2": { + "name": "comment.block.cpp" + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + } + ] + }, + "12": { + "patterns": [ + { + "match": "::", + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" + }, + { + "match": "(?|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))", + "beginCaptures": { + "0": { + "name": "meta.head.union.cpp" + }, + "1": { + "name": "storage.type.$1.cpp" + }, + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "4": { + "name": "comment.block.cpp" + }, + "5": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "6": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "7": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "11": { + "patterns": [ + { + "match": "((?|\\?\\?>", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.union.cpp" + } + }, + "name": "meta.body.union.cpp", + "patterns": [ + { + "include": "#function_pointer" + }, + { + "include": "#static_assert" + }, + { + "include": "#constructor_inline" + }, + { + "include": "#destructor_inline" + }, + { + "include": "$self" + } + ] + }, + { + "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", + "end": "[\\s]*(?=;)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.tail.union.cpp", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "union_declare": { + "match": "((?|(?:(?:[^'\"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*\\s*+)?((?~]\\s*+(if|unless)))\\b(?![^;]*+;.*?\\bend\\b)|(\"(\\\\.|[^\"])*+\"|'(\\\\.|[^'])*+'|[^#\"'])*(\\{(?![^}]*+\\})|\\[(?![^\\]]*+\\]))).*$|[#].*?\\(fold\\)\\s*+$", + "foldingStopMarker": "(?x)((^|;)\\s*+end\\s*+([#].*)?$|(^|;)\\s*+end\\..*$|^\\s*+[}\\]] ,?\\s*+([#].*)?$|[#].*?\\(end\\)\\s*+$|^=end)", + "keyEquivalent": "^~R", + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.control.class.crystal" + }, + "2": { + "name": "keyword.control.class.crystal" + }, + "3": { + "name": "entity.name.type.class.crystal" + }, + "5": { + "name": "punctuation.separator.crystal" + }, + "6": { + "name": "support.class.other.type-param.crystal" + }, + "7": { + "name": "entity.other.inherited-class.crystal" + }, + "8": { + "name": "punctuation.separator.crystal" + }, + "9": { + "name": "punctuation.separator.crystal" + }, + "10": { + "name": "support.class.other.type-param.crystal" + }, + "11": { + "name": "punctuation.definition.variable.crystal" + } + }, + "match": "(?x)^\\s*(abstract)?\\s*(class|struct|union|annotation|enum)\\s+(([.A-Z_:\\x{80}-\\x{10FFFF}][.\\w:\\x{80}-\\x{10FFFF}]*(\\(([,\\s.a-zA-Z0-9_:\\x{80}-\\x{10FFFF}]+)\\))?(\\s*(<)\\s*[.:A-Z\\x{80}-\\x{10FFFF}][.:\\w\\x{80}-\\x{10FFFF}]*(\\(([.a-zA-Z0-9_:]+\\s,)\\))?)?)|((<<)\\s*[.A-Z0-9_:\\x{80}-\\x{10FFFF}]+))", + "name": "meta.class.crystal" + }, + { + "captures": { + "1": { + "name": "keyword.control.module.crystal" + }, + "2": { + "name": "entity.name.type.module.crystal" + }, + "3": { + "name": "entity.other.inherited-class.module.first.crystal" + }, + "4": { + "name": "punctuation.separator.inheritance.crystal" + }, + "5": { + "name": "entity.other.inherited-class.module.second.crystal" + }, + "6": { + "name": "punctuation.separator.inheritance.crystal" + }, + "7": { + "name": "entity.other.inherited-class.module.third.crystal" + }, + "8": { + "name": "punctuation.separator.inheritance.crystal" + } + }, + "match": "^\\s*(module)\\s+(([A-Z\\x{80}-\\x{10FFFF}][\\w\\x{80}-\\x{10FFFF}]*(::))?([A-Z\\x{80}-\\x{10FFFF}][\\w\\x{80}-\\x{10FFFF}]*(::))?([A-Z\\x{80}-\\x{10FFFF}][\\w\\x{80}-\\x{10FFFF}]*(::))*[A-Z\\x{80}-\\x{10FFFF}][\\w\\x{80}-\\x{10FFFF}]*)", + "name": "meta.module.crystal" + }, + { + "captures": { + "1": { + "name": "keyword.control.lib.crystal" + }, + "2": { + "name": "entity.name.type.lib.crystal" + }, + "3": { + "name": "entity.other.inherited-class.lib.first.crystal" + }, + "4": { + "name": "punctuation.separator.inheritance.crystal" + }, + "5": { + "name": "entity.other.inherited-class.lib.second.crystal" + }, + "6": { + "name": "punctuation.separator.inheritance.crystal" + }, + "7": { + "name": "entity.other.inherited-class.lib.third.crystal" + }, + "8": { + "name": "punctuation.separator.inheritance.crystal" + } + }, + "match": "^\\s*(lib)\\s+(([A-Z]\\w*(::))?([A-Z]\\w*(::))?([A-Z]\\w*(::))*[A-Z]\\w*)", + "name": "meta.lib.crystal" + }, + { + "captures": { + "1": { + "name": "keyword.control.lib.type.crystal" + }, + "2": { + "name": "entity.name.lib.type.crystal" + }, + "3": { + "name": "keyword.control.lib.crystal" + }, + "4": { + "name": "entity.name.lib.type.value.crystal" + } + }, + "comment": "type in lib", + "match": "(?|_|\\*|\\$|\\?|:|\"|-[0adFiIlpv])", + "name": "variable.other.readwrite.global.pre-defined.crystal" + }, + { + "begin": "\\b(ENV)\\[", + "beginCaptures": { + "1": { + "name": "variable.other.constant.crystal" + } + }, + "end": "\\]", + "name": "meta.environment-variable.crystal", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "match": "\\b[A-Z\\x{80}-\\x{10FFFF}][\\w\\x{80}-\\x{10FFFF}]*", + "name": "support.class.crystal", + "comment": "Literals name of Crystal" + }, + { + "match": "(?[a-zA-Z_]\\w*(?>\\.|::))? # method prefix\n (?> # method name\n [a-zA-Z_]\\w*(?>[?!]|=(?!>))?\n |\n \\^|===?|!=|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[][?=]?|\\[]=?\n )\n)\n\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.control.def.crystal" + }, + "2": { + "name": "entity.name.function.crystal" + }, + "3": { + "name": "punctuation.definition.parameters.crystal" + } + }, + "comment": "The method pattern comes from the symbol pattern. See there for an explanation.", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.crystal" + } + }, + "name": "meta.function.method.with-arguments.crystal", + "patterns": [ + { + "begin": "(?![\\s,)])", + "end": "(?=,|\\)\\s*$)", + "patterns": [ + { + "captures": { + "1": { + "name": "storage.type.variable.crystal" + }, + "2": { + "name": "constant.other.symbol.hashkey.parameter.function.crystal" + }, + "3": { + "name": "punctuation.definition.constant.hashkey.crystal" + }, + "4": { + "name": "variable.parameter.function.crystal" + } + }, + "match": "\\G([&*]?)(?:([_a-zA-Z]\\w*(:))|([_a-zA-Z]\\w*))" + }, + { + "include": "$self" + } + ] + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.control.def.crystal" + }, + "3": { + "name": "entity.name.function.crystal" + } + }, + "comment": " the optional name is just to catch the def also without a method-name", + "match": "(?x)\n(?=def\\b) # optimization to help Oniguruma fail fast\n(?<=^|\\s)(def)\\b\n(\n \\s+\n (\n (?>[a-zA-Z_]\\w*(?>\\.|::))? # method prefix\n (?> # method name\n [a-zA-Z_]\\w*(?>[?!]|=(?!>))?\n |\n \\^|===?|!=|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[][?=]?|\\[]=?\n )\n )\n)?", + "name": "meta.function.method.without-arguments.crystal" + }, + { + "comment": "Floating point literal (fraction)", + "name": "constant.numeric.float.crystal", + "match": "\\b[0-9][0-9_]*\\.[0-9][0-9_]*([eE][+-]?[0-9_]+)?(f32|f64)?\\b" + }, + { + "comment": "Floating point literal (exponent)", + "name": "constant.numeric.float.crystal", + "match": "\\b[0-9][0-9_]*(\\.[0-9][0-9_]*)?[eE][+-]?[0-9_]+(f32|f64)?\\b" + }, + { + "comment": "Floating point literal (typed)", + "name": "constant.numeric.float.crystal", + "match": "\\b[0-9][0-9_]*(\\.[0-9][0-9_]*)?([eE][+-]?[0-9_]+)?(f32|f64)\\b" + }, + { + "comment": "Integer literal (decimal)", + "name": "constant.numeric.integer.decimal.crystal", + "match": "\\b(?!0[0-9])[0-9][0-9_]*([ui](8|16|32|64|128))?\\b" + }, + { + "comment": "Integer literal (hexadecimal)", + "name": "constant.numeric.integer.hexadecimal.crystal", + "match": "\\b0x[a-fA-F0-9_]+([ui](8|16|32|64|128))?\\b" + }, + { + "comment": "Integer literal (octal)", + "name": "constant.numeric.integer.octal.crystal", + "match": "\\b0o[0-7_]+([ui](8|16|32|64|128))?\\b" + }, + { + "comment": "Integer literal (binary)", + "name": "constant.numeric.integer.binary.crystal", + "match": "\\b0b[01_]+([ui](8|16|32|64|128))?\\b" + }, + { + "begin": ":'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.symbol.begin.crystal" + } + }, + "comment": "symbol literal with '' delimiter", + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.symbol.end.crystal" + } + }, + "name": "constant.other.symbol.crystal", + "patterns": [ + { + "match": "\\\\['\\\\]", + "name": "constant.character.escape.crystal" + } + ] + }, + { + "begin": ":\"", + "beginCaptures": { + "0": { + "name": "punctuation.section.symbol.begin.crystal" + } + }, + "comment": "symbol literal with \"\" delimiter", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.section.symbol.end.crystal" + } + }, + "name": "constant.other.symbol.interpolated.crystal", + "patterns": [ + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "comment": "Needs higher precedence than regular expressions.", + "match": "(?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.interpolated.crystal", + "patterns": [ + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_ltgt_i" + } + ] + }, + { + "begin": "%x\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "execute string (allow for interpolation)", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.interpolated.crystal", + "patterns": [ + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_parens_i" + } + ] + }, + { + "begin": "%x\\|", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "execute string (allow for interpolation)", + "end": "\\|", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.interpolated.crystal", + "patterns": [ + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?x) (?: ^| (?<=[=>~(?:\\[,|&;] | [\\s;]if\\s| [\\s;]elsif\\s | [\\s;]while\\s | [\\s;]unless\\s | [\\s;]when\\s | [\\s;]assert_match\\s | [\\s;]or\\s| [\\s;]and\\s | [\\s;]not\\s | [\\s.]index\\s| [\\s.]scan\\s | [\\s.]sub\\s | [\\s.]sub!\\s | [\\s.]gsub\\s | [\\s.]gsub!\\s | [\\s.]match\\s ) | (?<=^when\\s| ^if\\s | ^elsif\\s | ^while\\s | ^unless\\s ) ) \\s*((/))(?![*+{}?])", + "captures": { + "1": { + "name": "string.regexp.classic.crystal" + }, + "2": { + "name": "punctuation.definition.string.crystal" + } + }, + "comment": "regular expressions (normal) we only start a regexp if the character before it (excluding whitespace) is what we think is before a regexp", + "contentName": "string.regexp.classic.crystal", + "end": "((/[imsx]*))", + "patterns": [ + { + "include": "#regex_sub" + } + ] + }, + { + "begin": "%r\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "regular expressions (literal)", + "end": "\\}[imsx]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.regexp.mod-r.crystal", + "patterns": [ + { + "include": "#regex_sub" + }, + { + "include": "#nest_curly_r" + } + ] + }, + { + "begin": "%r\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "regular expressions (literal)", + "end": "\\][imsx]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.regexp.mod-r.crystal", + "patterns": [ + { + "include": "#regex_sub" + }, + { + "include": "#nest_brackets_r" + } + ] + }, + { + "begin": "%r\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "regular expressions (literal)", + "end": "\\)[imsx]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.regexp.mod-r.crystal", + "patterns": [ + { + "include": "#regex_sub" + }, + { + "include": "#nest_parens_r" + } + ] + }, + { + "begin": "%r\\<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "regular expressions (literal)", + "end": "\\>[imsx]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.regexp.mod-r.crystal", + "patterns": [ + { + "include": "#regex_sub" + }, + { + "include": "#nest_ltgt_r" + } + ] + }, + { + "begin": "%r\\|", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "regular expressions (literal)", + "end": "\\|[imsx]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.regexp.mod-r.crystal", + "patterns": [ + { + "include": "#regex_sub" + } + ] + }, + { + "begin": "%Q?\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "literal capable of interpolation ()", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.quoted.other.literal.upper.crystal", + "patterns": [ + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_parens_i" + } + ] + }, + { + "begin": "%Q?\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "literal capable of interpolation []", + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.quoted.other.literal.upper.crystal", + "patterns": [ + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_brackets_i" + } + ] + }, + { + "begin": "%Q?\\<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "literal capable of interpolation <>", + "end": "\\>", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.quoted.other.literal.upper.crystal", + "patterns": [ + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_ltgt_i" + } + ] + }, + { + "begin": "%Q?\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "literal capable of interpolation -- {}", + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.quoted.double.crystal.mod", + "patterns": [ + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_curly_i" + } + ] + }, + { + "begin": "%Q\\|", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "literal capable of interpolation -- ||", + "end": "\\|", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.quoted.other.literal.upper.crystal", + "patterns": [ + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "%[qwi]\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "literal incapable of interpolation -- ()", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.quoted.other.literal.lower.crystal", + "patterns": [ + { + "match": "\\\\\\)|\\\\\\\\", + "name": "constant.character.escape.crystal" + }, + { + "include": "#nest_parens" + } + ] + }, + { + "begin": "%[qwi]\\<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "literal incapable of interpolation -- <>", + "end": "\\>", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.quoted.other.literal.lower.crystal", + "patterns": [ + { + "match": "\\\\\\>|\\\\\\\\", + "name": "constant.character.escape.crystal" + }, + { + "include": "#nest_ltgt" + } + ] + }, + { + "begin": "%[qwi]\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "literal incapable of interpolation -- []", + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.quoted.other.literal.lower.crystal", + "patterns": [ + { + "match": "\\\\\\]|\\\\\\\\", + "name": "constant.character.escape.crystal" + }, + { + "include": "#nest_brackets" + } + ] + }, + { + "begin": "%[qwi]\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "literal incapable of interpolation -- {}", + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.quoted.other.literal.lower.crystal", + "patterns": [ + { + "match": "\\\\\\}|\\\\\\\\", + "name": "constant.character.escape.crystal" + }, + { + "include": "#nest_curly" + } + ] + }, + { + "begin": "%[qwi]\\|", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "literal incapable of interpolation -- ||", + "end": "\\|", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.quoted.other.literal.lower.crystal", + "patterns": [ + { + "comment": "Cant be named because its not necessarily an escape.", + "match": "\\\\." + } + ] + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.crystal" + } + }, + "comment": "symbols", + "match": "(?[a-zA-Z_\\x{80}-\\x{10FFFF}][\\w\\x{80}-\\x{10FFFF}]*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<[<=]?|<=>|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\][?=]?|@@?[a-zA-Z_\\x{80}-\\x{10FFFF}][\\w\\x{80}-\\x{10FFFF}]*)", + "name": "constant.other.symbol.crystal" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.crystal" + } + }, + "comment": "symbols", + "match": "(?>[a-zA-Z_\\x{80}-\\x{10FFFF}][\\w\\x{80}-\\x{10FFFF}]*(?>[?!])?)(:)(?!:)", + "name": "constant.other.symbol.crystal.19syntax" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.comment.crystal" + } + }, + "match": "(?:^[ \\t]+)?(#).*$\\n?", + "name": "comment.line.number-sign.crystal" + }, + { + "match": "\\b_([\\w]+[?!]?)", + "name": "comment.unused.crystal" + }, + { + "begin": "(?><<-('?)((?:[_\\w]+_|)HTML)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "heredoc with embedded HTML and indented terminator", + "contentName": "text.html.embedded.crystal", + "end": "\\s*\\2\\b", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.unquoted.embedded.html.crystal", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "text.html.basic" + }, + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?><<-('?)((?:[_\\w]+_|)SQL)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "heredoc with embedded SQL and indented terminator", + "contentName": "text.sql.embedded.crystal", + "end": "\\s*\\2\\b", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.unquoted.embedded.sql.crystal", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "source.sql" + }, + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?><<-('?)((?:[_\\w]+_|)CSS)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "heredoc with embedded css and intented terminator", + "contentName": "text.css.embedded.crystal", + "end": "\\s*\\2\\b", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.unquoted.embedded.css.crystal", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "source.css" + }, + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?><<-('?)((?:[_\\w]+_|)CPP)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "heredoc with embedded c++ and intented terminator", + "contentName": "text.c++.embedded.crystal", + "end": "\\s*\\2\\b", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.unquoted.embedded.cplusplus.crystal", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "source.c++" + }, + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?><<-('?)((?:[_\\w]+_|)C)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "heredoc with embedded c++ and intented terminator", + "contentName": "text.c.embedded.crystal", + "end": "\\s*\\2\\b", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.unquoted.embedded.c.crystal", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "source.c" + }, + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?><<-('?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "heredoc with embedded javascript and intented terminator", + "contentName": "text.js.embedded.crystal", + "end": "\\s*\\2\\b", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.unquoted.embedded.js.crystal", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "source.js" + }, + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?><<-('?)((?:[_\\w]+_|)JQUERY)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "heredoc with embedded javascript and intented terminator", + "contentName": "text.js.jquery.embedded.crystal", + "end": "\\s*\\2\\b", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.unquoted.embedded.js.jquery.crystal", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "source.js.jquery" + }, + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?><<-('?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "heredoc with embedded shell and intented terminator", + "contentName": "text.shell.embedded.crystal", + "end": "\\s*\\2\\b", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.unquoted.embedded.shell.crystal", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "source.shell" + }, + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?><<-('?)((?:[_\\w]+_|)CRYSTAL)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "heredoc with embedded crystal and intented terminator", + "contentName": "text.crystal.embedded.crystal", + "end": "\\s*\\2\\b", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.unquoted.embedded.crystal.crystal", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "source.crystal" + }, + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?><<-'(\\w+)')", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "heredoc with indented terminator", + "end": "\\s*\\1\\b", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.unquoted.heredoc.crystal", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?><<-(\\w+)\\b)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.crystal" + } + }, + "comment": "heredoc with indented terminator", + "end": "\\s*\\1\\b", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.crystal" + } + }, + "name": "string.unquoted.heredoc.crystal", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?<={|{\\s|[^A-Za-z0-9_]do|^do|[^A-Za-z0-9_]do\\s|^do\\s)(\\|)", + "captures": { + "1": { + "name": "punctuation.separator.variable.crystal" + } + }, + "end": "(?", + "name": "punctuation.separator.key-value" + }, + { + "match": "->", + "name": "support.function.kernel.crystal" + }, + { + "match": "<<=|%=|&{1,2}=|\\*=|\\*\\*=|\\+=|-=|\\^=|\\|{1,2}=|<<", + "name": "keyword.operator.assignment.augmented.crystal" + }, + { + "match": "<=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|(?<=[ \\t])\\?", + "name": "keyword.operator.comparison.crystal" + }, + { + "match": "(?<=^|[ \\t])!|&&|\\|\\||\\^", + "name": "keyword.operator.logical.crystal" + }, + { + "match": "(\\{\\%|\\%\\}|\\{\\{|\\}\\})", + "name": "keyword.operator.macro.crystal" + }, + { + "comment": "Safe navigation operator", + "match": "(&\\.)\\s*(?![A-Z])", + "captures": { + "1": { + "name": "punctuation.separator.method.crystal" + } + } + }, + { + "match": "(%|&|\\*\\*|\\*|\\+|\\-|/)", + "name": "keyword.operator.arithmetic.crystal" + }, + { + "match": "=", + "name": "keyword.operator.assignment.crystal" + }, + { + "match": "\\||~|>>", + "name": "keyword.operator.other.crystal" + }, + { + "match": ":", + "name": "punctuation.separator.other.crystal" + }, + { + "match": "\\;", + "name": "punctuation.separator.statement.crystal" + }, + { + "match": ",", + "name": "punctuation.separator.object.crystal" + }, + { + "match": "\\.|::", + "name": "punctuation.separator.method.crystal" + }, + { + "match": "\\{|\\}", + "name": "punctuation.section.scope.crystal" + }, + { + "match": "\\[|\\]", + "name": "punctuation.section.array.crystal" + }, + { + "match": "\\(|\\)", + "name": "punctuation.section.function.crystal" + }, + { + "begin": "(?=[a-zA-Z0-9_!?]+\\()", + "end": "(?<=\\))", + "name": "meta.function-call.crystal", + "patterns": [ + { + "match": "([a-zA-Z0-9_!?]+)(?=\\()", + "name": "entity.name.function.crystal" + }, + { + "include": "$self" + } + ] + }, + { + "comment": "This is kindof experimental. There really is no way to perfectly match all regular variables, but you can pretty well assume that any normal word in certain curcumstances that havnt already been scoped as something else are probably variables, and the advantages beat the potential errors", + "match": "((?<=\\W)\\b|^)\\w+\\b(?=\\s*([\\]\\)\\}\\=\\+\\-\\*\\/\\^\\$\\,\\.]|<\\s|<<[\\s|\\.]))", + "name": "variable.other.crystal" + } + ], + "repository": { + "escaped_char": { + "comment": "https://crystal-lang.org/reference/syntax_and_semantics/literals/string.html", + "match": "\\\\(?:[0-7]{1,3}|x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|u\\{[a-fA-F0-9 ]+\\}|.)", + "name": "constant.character.escape.crystal" + }, + "heredoc": { + "begin": "^<<-?\\w+", + "end": "$", + "patterns": [ + { + "include": "$self" + } + ] + }, + "interpolated_crystal": { + "patterns": [ + { + "begin": "#\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.crystal" + } + }, + "contentName": "source.crystal", + "end": "(\\})", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.crystal" + }, + "1": { + "name": "source.crystal" + } + }, + "name": "meta.embedded.line.crystal", + "patterns": [ + { + "include": "#nest_curly_and_self" + }, + { + "include": "$self" + } + ], + "repository": { + "nest_curly_and_self": { + "patterns": [ + { + "begin": "\\{", + "captures": { + "0": { + "name": "punctuation.section.scope.crystal" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#nest_curly_and_self" + } + ] + }, + { + "include": "$self" + } + ] + } + } + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.crystal" + } + }, + "match": "(#@)[a-zA-Z_]\\w*", + "name": "variable.other.readwrite.instance.crystal" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.crystal" + } + }, + "match": "(#@@)[a-zA-Z_]\\w*", + "name": "variable.other.readwrite.class.crystal" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.crystal" + } + }, + "match": "(#\\$)[a-zA-Z_]\\w*", + "name": "variable.other.readwrite.global.crystal" + } + ] + }, + "nest_brackets": { + "begin": "\\[", + "captures": { + "0": { + "name": "punctuation.section.scope.crystal" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#nest_brackets" + } + ] + }, + "nest_brackets_i": { + "begin": "\\[", + "captures": { + "0": { + "name": "punctuation.section.scope.crystal" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_brackets_i" + } + ] + }, + "nest_brackets_r": { + "begin": "\\[", + "captures": { + "0": { + "name": "punctuation.section.scope.crystal" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#regex_sub" + }, + { + "include": "#nest_brackets_r" + } + ] + }, + "nest_curly": { + "begin": "\\{", + "captures": { + "0": { + "name": "punctuation.section.scope.crystal" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#nest_curly" + } + ] + }, + "nest_curly_and_self": { + "patterns": [ + { + "begin": "\\{", + "captures": { + "0": { + "name": "punctuation.section.scope.crystal" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#nest_curly_and_self" + } + ] + }, + { + "include": "$self" + } + ] + }, + "nest_curly_i": { + "begin": "\\{", + "captures": { + "0": { + "name": "punctuation.section.scope.crystal" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_curly_i" + } + ] + }, + "nest_curly_r": { + "begin": "\\{", + "captures": { + "0": { + "name": "punctuation.section.scope.crystal" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#regex_sub" + }, + { + "include": "#nest_curly_r" + } + ] + }, + "nest_ltgt": { + "begin": "\\<", + "captures": { + "0": { + "name": "punctuation.section.scope.crystal" + } + }, + "end": "\\>", + "patterns": [ + { + "include": "#nest_ltgt" + } + ] + }, + "nest_ltgt_i": { + "begin": "\\<", + "captures": { + "0": { + "name": "punctuation.section.scope.crystal" + } + }, + "end": "\\>", + "patterns": [ + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_ltgt_i" + } + ] + }, + "nest_ltgt_r": { + "begin": "\\<", + "captures": { + "0": { + "name": "punctuation.section.scope.crystal" + } + }, + "end": "\\>", + "patterns": [ + { + "include": "#regex_sub" + }, + { + "include": "#nest_ltgt_r" + } + ] + }, + "nest_parens": { + "begin": "\\(", + "captures": { + "0": { + "name": "punctuation.section.scope.crystal" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#nest_parens" + } + ] + }, + "nest_parens_i": { + "begin": "\\(", + "captures": { + "0": { + "name": "punctuation.section.scope.crystal" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_parens_i" + } + ] + }, + "nest_parens_r": { + "begin": "\\(", + "captures": { + "0": { + "name": "punctuation.section.scope.crystal" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#regex_sub" + }, + { + "include": "#nest_parens_r" + } + ] + }, + "regex_sub": { + "patterns": [ + { + "include": "#interpolated_crystal" + }, + { + "include": "#escaped_char" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.arbitrary-repetition.crystal" + }, + "3": { + "name": "punctuation.definition.arbitrary-repetition.crystal" + } + }, + "match": "({)\\d+(,\\d+)?(})", + "name": "string.regexp.arbitrary-repetition.crystal" + }, + { + "begin": "\\[(?:\\^?])?", + "captures": { + "0": { + "name": "punctuation.definition.character-class.crystal" + } + }, + "end": "]", + "name": "string.regexp.character-class.crystal", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "\\(", + "captures": { + "0": { + "name": "punctuation.definition.group.crystal" + } + }, + "end": "\\)", + "name": "string.regexp.group.crystal", + "patterns": [ + { + "include": "#regex_sub" + } + ] + }, + { + "captures": { + "1": { + "name": "punctuation.definition.comment.crystal" + } + }, + "comment": "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.", + "match": "(?<=^|\\s)(#)\\s[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$", + "name": "comment.line.number-sign.crystal" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/csharp.tmLanguage.json b/src/lib/shiki/languages/csharp.tmLanguage.json new file mode 100644 index 0000000..7a08962 --- /dev/null +++ b/src/lib/shiki/languages/csharp.tmLanguage.json @@ -0,0 +1,5651 @@ +{ + "name": "csharp", + "scopeName": "source.cs", + "fileTypes": ["cs"], + "uuid": "f7de61e2-bdde-4e2a-a139-8221b179584e", + "patterns": [ + { + "include": "#preprocessor" + }, + { + "include": "#comment" + }, + { + "include": "#directives" + }, + { + "include": "#declarations" + }, + { + "include": "#script-top-level" + } + ], + "repository": { + "directives": { + "patterns": [ + { + "include": "#extern-alias-directive" + }, + { + "include": "#using-directive" + }, + { + "include": "#attribute-section" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "declarations": { + "patterns": [ + { + "include": "#namespace-declaration" + }, + { + "include": "#type-declarations" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "script-top-level": { + "patterns": [ + { + "include": "#statement" + }, + { + "include": "#method-declaration" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "type-declarations": { + "patterns": [ + { + "include": "#preprocessor" + }, + { + "include": "#comment" + }, + { + "include": "#storage-modifier" + }, + { + "include": "#class-declaration" + }, + { + "include": "#delegate-declaration" + }, + { + "include": "#enum-declaration" + }, + { + "include": "#interface-declaration" + }, + { + "include": "#struct-declaration" + }, + { + "include": "#record-declaration" + }, + { + "include": "#attribute-section" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "class-or-struct-members": { + "patterns": [ + { + "include": "#preprocessor" + }, + { + "include": "#comment" + }, + { + "include": "#storage-modifier" + }, + { + "include": "#type-declarations" + }, + { + "include": "#property-declaration" + }, + { + "include": "#field-declaration" + }, + { + "include": "#event-declaration" + }, + { + "include": "#indexer-declaration" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#constructor-declaration" + }, + { + "include": "#destructor-declaration" + }, + { + "include": "#operator-declaration" + }, + { + "include": "#conversion-operator-declaration" + }, + { + "include": "#method-declaration" + }, + { + "include": "#attribute-section" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "interface-members": { + "patterns": [ + { + "include": "#preprocessor" + }, + { + "include": "#comment" + }, + { + "include": "#property-declaration" + }, + { + "include": "#event-declaration" + }, + { + "include": "#indexer-declaration" + }, + { + "include": "#method-declaration" + }, + { + "include": "#attribute-section" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "statement": { + "patterns": [ + { + "include": "#preprocessor" + }, + { + "include": "#comment" + }, + { + "include": "#while-statement" + }, + { + "include": "#do-statement" + }, + { + "include": "#for-statement" + }, + { + "include": "#foreach-statement" + }, + { + "include": "#if-statement" + }, + { + "include": "#else-part" + }, + { + "include": "#goto-statement" + }, + { + "include": "#return-statement" + }, + { + "include": "#break-or-continue-statement" + }, + { + "include": "#throw-statement" + }, + { + "include": "#yield-statement" + }, + { + "include": "#await-statement" + }, + { + "include": "#try-statement" + }, + { + "include": "#checked-unchecked-statement" + }, + { + "include": "#lock-statement" + }, + { + "include": "#using-statement" + }, + { + "include": "#labeled-statement" + }, + { + "include": "#object-creation-expression" + }, + { + "include": "#array-creation-expression" + }, + { + "include": "#anonymous-object-creation-expression" + }, + { + "include": "#local-declaration" + }, + { + "include": "#block" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "expression": { + "patterns": [ + { + "include": "#preprocessor" + }, + { + "include": "#comment" + }, + { + "include": "#checked-unchecked-expression" + }, + { + "include": "#typeof-or-default-expression" + }, + { + "include": "#nameof-expression" + }, + { + "include": "#default-literal-expression" + }, + { + "include": "#throw-expression" + }, + { + "include": "#raw-interpolated-string" + }, + { + "include": "#interpolated-string" + }, + { + "include": "#verbatim-interpolated-string" + }, + { + "include": "#type-builtin" + }, + { + "include": "#language-variable" + }, + { + "include": "#switch-statement-or-expression" + }, + { + "include": "#with-expression" + }, + { + "include": "#conditional-operator" + }, + { + "include": "#assignment-expression" + }, + { + "include": "#expression-operators" + }, + { + "include": "#await-expression" + }, + { + "include": "#query-expression" + }, + { + "include": "#as-expression" + }, + { + "include": "#is-expression" + }, + { + "include": "#anonymous-method-expression" + }, + { + "include": "#object-creation-expression" + }, + { + "include": "#array-creation-expression" + }, + { + "include": "#anonymous-object-creation-expression" + }, + { + "include": "#invocation-expression" + }, + { + "include": "#member-access-expression" + }, + { + "include": "#element-access-expression" + }, + { + "include": "#cast-expression" + }, + { + "include": "#literal" + }, + { + "include": "#parenthesized-expression" + }, + { + "include": "#tuple-deconstruction-assignment" + }, + { + "include": "#initializer-expression" + }, + { + "include": "#identifier" + } + ] + }, + "extern-alias-directive": { + "begin": "\\b(extern)\\s+(alias)\\b", + "beginCaptures": { + "1": { + "name": "keyword.other.directive.extern.cs" + }, + "2": { + "name": "keyword.other.directive.alias.cs" + } + }, + "end": "(?=;)", + "patterns": [ + { + "match": "\\@?[_[:alpha:]][_[:alnum:]]*", + "name": "variable.other.alias.cs" + } + ] + }, + "using-directive": { + "patterns": [ + { + "begin": "\\b(?:(global)\\s+)?(using)\\s+(static)\\b\\s*(?:(unsafe)\\b\\s*)?", + "beginCaptures": { + "1": { + "name": "keyword.other.directive.global.cs" + }, + "2": { + "name": "keyword.other.directive.using.cs" + }, + "3": { + "name": "keyword.other.directive.static.cs" + }, + "4": { + "name": "storage.modifier.unsafe.cs" + } + }, + "end": "(?=;)", + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "begin": "\\b(?:(global)\\s+)?(using)\\b\\s*(?:(unsafe)\\b\\s*)?(@?[_[:alpha:]][_[:alnum:]]*)\\s*(=)", + "beginCaptures": { + "1": { + "name": "keyword.other.directive.global.cs" + }, + "2": { + "name": "keyword.other.directive.using.cs" + }, + "3": { + "name": "storage.modifier.unsafe.cs" + }, + "4": { + "name": "entity.name.type.alias.cs" + }, + "5": { + "name": "keyword.operator.assignment.cs" + } + }, + "end": "(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type" + } + ] + }, + { + "begin": "\\b(?:(global)\\s+)?(using)\\b\\s*+(?!\\(|var)", + "beginCaptures": { + "1": { + "name": "keyword.other.directive.global.cs" + }, + "2": { + "name": "keyword.other.directive.using.cs" + } + }, + "end": "(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "name": "entity.name.type.namespace.cs", + "match": "\\@?[_[:alpha:]][_[:alnum:]]*" + }, + { + "include": "#punctuation-accessor" + }, + { + "include": "#operator-assignment" + } + ] + } + ] + }, + "attribute-section": { + "begin": "(\\[)(assembly|module|field|event|method|param|property|return|type)?(\\:)?", + "beginCaptures": { + "1": { + "name": "punctuation.squarebracket.open.cs" + }, + "2": { + "name": "keyword.other.attribute-specifier.cs" + }, + "3": { + "name": "punctuation.separator.colon.cs" + } + }, + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.squarebracket.close.cs" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#attribute" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "attribute": { + "patterns": [ + { + "include": "#type-name" + }, + { + "include": "#attribute-arguments" + } + ] + }, + "attribute-arguments": { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.parenthesis.open.cs" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.parenthesis.close.cs" + } + }, + "patterns": [ + { + "include": "#attribute-named-argument" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "attribute-named-argument": { + "begin": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(?==)", + "beginCaptures": { + "1": { + "name": "entity.name.variable.property.cs" + } + }, + "end": "(?=(,|\\)))", + "patterns": [ + { + "include": "#operator-assignment" + }, + { + "include": "#expression" + } + ] + }, + "namespace-declaration": { + "begin": "\\b(namespace)\\s+", + "beginCaptures": { + "1": { + "name": "storage.type.namespace.cs" + } + }, + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "name": "entity.name.type.namespace.cs", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + }, + { + "include": "#punctuation-accessor" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.cs" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.cs" + } + }, + "patterns": [ + { + "include": "#declarations" + }, + { + "include": "#using-directive" + }, + { + "include": "#punctuation-semicolon" + } + ] + } + ] + }, + "storage-modifier": { + "name": "storage.modifier.$1.cs", + "match": "(?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", + "beginCaptures": { + "1": { + "name": "storage.type.delegate.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "name": "entity.name.type.delegate.cs" + }, + "8": { + "patterns": [ + { + "include": "#type-parameter-list" + } + ] + } + }, + "end": "(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#generic-constraints" + } + ] + }, + "enum-declaration": { + "begin": "(?=\\benum\\b)", + "end": "(?<=\\})", + "patterns": [ + { + "begin": "(?=enum)", + "end": "(?=\\{)", + "patterns": [ + { + "include": "#comment" + }, + { + "match": "(enum)\\s+(@?[_[:alpha:]][_[:alnum:]]*)", + "captures": { + "1": { + "name": "storage.type.enum.cs" + }, + "2": { + "name": "entity.name.type.enum.cs" + } + } + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.colon.cs" + } + }, + "end": "(?=\\{)", + "patterns": [ + { + "include": "#type" + } + ] + } + ] + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.cs" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.cs" + } + }, + "patterns": [ + { + "include": "#preprocessor" + }, + { + "include": "#comment" + }, + { + "include": "#attribute-section" + }, + { + "include": "#punctuation-comma" + }, + { + "begin": "@?[_[:alpha:]][_[:alnum:]]*", + "beginCaptures": { + "0": { + "name": "entity.name.variable.enum-member.cs" + } + }, + "end": "(?=(,|\\}))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + } + ] + } + ] + }, + { + "include": "#preprocessor" + }, + { + "include": "#comment" + } + ] + }, + "interface-declaration": { + "begin": "(?=\\binterface\\b)", + "end": "(?<=\\})", + "patterns": [ + { + "begin": "(?x)\n(interface)\\b\\s+\n(@?[_[:alpha:]][_[:alnum:]]*)", + "beginCaptures": { + "1": { + "name": "storage.type.interface.cs" + }, + "2": { + "name": "entity.name.type.interface.cs" + } + }, + "end": "(?=\\{)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-parameter-list" + }, + { + "include": "#base-types" + }, + { + "include": "#generic-constraints" + } + ] + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.cs" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.cs" + } + }, + "patterns": [ + { + "include": "#interface-members" + } + ] + }, + { + "include": "#preprocessor" + }, + { + "include": "#comment" + } + ] + }, + "record-declaration": { + "begin": "(?=\\brecord\\b)", + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "begin": "(?x)\n(record)\\b\\s+\n(@?[_[:alpha:]][_[:alnum:]]*)", + "beginCaptures": { + "1": { + "name": "storage.type.record.cs" + }, + "2": { + "name": "entity.name.type.class.cs" + } + }, + "end": "(?=\\{)|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-parameter-list" + }, + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#base-types" + }, + { + "include": "#generic-constraints" + } + ] + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.cs" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.cs" + } + }, + "patterns": [ + { + "include": "#class-or-struct-members" + } + ] + }, + { + "include": "#preprocessor" + }, + { + "include": "#comment" + } + ] + }, + "struct-declaration": { + "begin": "(?=(\\brecord\\b\\s+)?\\bstruct\\b)", + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "begin": "(?x)\n(\\b(record)\\b\\s+)?\n(struct)\\b\\s+\n(@?[_[:alpha:]][_[:alnum:]]*)", + "beginCaptures": { + "2": { + "name": "storage.type.record.cs" + }, + "3": { + "name": "storage.type.struct.cs" + }, + "4": { + "name": "entity.name.type.struct.cs" + } + }, + "end": "(?=\\{)|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-parameter-list" + }, + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#base-types" + }, + { + "include": "#generic-constraints" + } + ] + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.cs" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.cs" + } + }, + "patterns": [ + { + "include": "#class-or-struct-members" + } + ] + }, + { + "include": "#preprocessor" + }, + { + "include": "#comment" + } + ] + }, + "type-parameter-list": { + "begin": "\\<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.begin.cs" + } + }, + "end": "\\>", + "endCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.end.cs" + } + }, + "patterns": [ + { + "match": "\\b(in|out)\\b", + "name": "storage.modifier.$1.cs" + }, + { + "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\b", + "name": "entity.name.type.type-parameter.cs" + }, + { + "include": "#comment" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#attribute-section" + } + ] + }, + "base-types": { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.colon.cs" + } + }, + "end": "(?=\\{|where|;)", + "patterns": [ + { + "include": "#type" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#preprocessor" + } + ] + }, + "generic-constraints": { + "begin": "(where)\\s+(@?[_[:alpha:]][_[:alnum:]]*)\\s*(:)", + "beginCaptures": { + "1": { + "name": "storage.modifier.where.cs" + }, + "2": { + "name": "entity.name.type.type-parameter.cs" + }, + "3": { + "name": "punctuation.separator.colon.cs" + } + }, + "end": "(?=\\{|where|;|=>)", + "patterns": [ + { + "name": "storage.type.class.cs", + "match": "\\bclass\\b" + }, + { + "name": "storage.type.struct.cs", + "match": "\\bstruct\\b" + }, + { + "match": "(new)\\s*(\\()\\s*(\\))", + "captures": { + "1": { + "name": "keyword.operator.expression.new.cs" + }, + "2": { + "name": "punctuation.parenthesis.open.cs" + }, + "3": { + "name": "punctuation.parenthesis.close.cs" + } + } + }, + { + "include": "#type" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#generic-constraints" + } + ] + }, + "field-declaration": { + "begin": "(?x)\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g)\\s* # first field name\n(?!=>|==)(?=,|;|=|$)", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "6": { + "name": "entity.name.variable.field.cs" + } + }, + "end": "(?=;)", + "patterns": [ + { + "name": "entity.name.variable.field.cs", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#class-or-struct-members" + } + ] + }, + "property-declaration": { + "begin": "(?x)\n\n# The negative lookahead below ensures that we don't match nested types\n# or other declarations as properties.\n(?![[:word:][:space:]]*\\b(?:class|interface|struct|enum|event)\\b)\n\n(?\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g)\\s*\n(?=\\{|=>|//|/\\*|$)", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "patterns": [ + { + "include": "#type" + }, + { + "include": "#punctuation-accessor" + } + ] + }, + "8": { + "name": "entity.name.variable.property.cs" + } + }, + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#property-accessors" + }, + { + "include": "#accessor-getter-expression" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#class-or-struct-members" + } + ] + }, + "indexer-declaration": { + "begin": "(?x)\n(?\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?this)\\s*\n(?=\\[)", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "patterns": [ + { + "include": "#type" + }, + { + "include": "#punctuation-accessor" + } + ] + }, + "8": { + "name": "variable.language.this.cs" + } + }, + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#bracketed-parameter-list" + }, + { + "include": "#property-accessors" + }, + { + "include": "#accessor-getter-expression" + }, + { + "include": "#variable-initializer" + } + ] + }, + "event-declaration": { + "begin": "(?x)\n\\b(event)\\b\\s*\n(?\n (?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(\\g)\\s* # first event name\n(?=\\{|;|,|=|//|/\\*|$)", + "beginCaptures": { + "1": { + "name": "storage.type.event.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "8": { + "patterns": [ + { + "include": "#type" + }, + { + "include": "#punctuation-accessor" + } + ] + }, + "9": { + "name": "entity.name.variable.event.cs" + } + }, + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#event-accessors" + }, + { + "name": "entity.name.variable.event.cs", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + }, + { + "include": "#punctuation-comma" + }, + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "keyword.operator.assignment.cs" + } + }, + "end": "(?<=,)|(?=;)", + "patterns": [ + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + } + ] + } + ] + }, + "property-accessors": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.cs" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.cs" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#attribute-section" + }, + { + "name": "storage.modifier.$1.cs", + "match": "\\b(private|protected|internal)\\b" + }, + { + "begin": "\\b(get)\\b\\s*(?=\\{|;|=>|//|/\\*|$)", + "beginCaptures": { + "1": { + "name": "storage.type.accessor.$1.cs" + } + }, + "end": "(?<=\\}|;)|(?=\\})", + "patterns": [ + { + "include": "#accessor-getter" + } + ] + }, + { + "begin": "\\b(set|init)\\b\\s*(?=\\{|;|=>|//|/\\*|$)", + "beginCaptures": { + "1": { + "name": "storage.type.accessor.$1.cs" + } + }, + "end": "(?<=\\}|;)|(?=\\})", + "patterns": [ + { + "include": "#accessor-setter" + } + ] + } + ] + }, + "event-accessors": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.cs" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.cs" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#attribute-section" + }, + { + "begin": "\\b(add|remove)\\b\\s*(?=\\{|;|=>|//|/\\*|$)", + "beginCaptures": { + "1": { + "name": "storage.type.accessor.$1.cs" + } + }, + "end": "(?<=\\}|;)|(?=\\})", + "patterns": [ + { + "include": "#accessor-setter" + } + ] + } + ] + }, + "accessor-getter": { + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.cs" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.cs" + } + }, + "contentName": "meta.accessor.getter.cs", + "patterns": [ + { + "include": "#statement" + } + ] + }, + { + "include": "#accessor-getter-expression" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "accessor-getter-expression": { + "begin": "=>", + "beginCaptures": { + "0": { + "name": "keyword.operator.arrow.cs" + } + }, + "end": "(?=;|\\})", + "contentName": "meta.accessor.getter.cs", + "patterns": [ + { + "include": "#ref-modifier" + }, + { + "include": "#expression" + } + ] + }, + "accessor-setter": { + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.cs" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.cs" + } + }, + "contentName": "meta.accessor.setter.cs", + "patterns": [ + { + "include": "#statement" + } + ] + }, + { + "begin": "=>", + "beginCaptures": { + "0": { + "name": "keyword.operator.arrow.cs" + } + }, + "end": "(?=;|\\})", + "contentName": "meta.accessor.setter.cs", + "patterns": [ + { + "include": "#ref-modifier" + }, + { + "include": "#expression" + } + ] + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "method-declaration": { + "begin": "(?x)\n(?\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "patterns": [ + { + "include": "#type" + }, + { + "include": "#punctuation-accessor" + } + ] + }, + "8": { + "name": "entity.name.function.cs" + }, + "9": { + "patterns": [ + { + "include": "#type-parameter-list" + } + ] + } + }, + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#generic-constraints" + }, + { + "include": "#expression-body" + }, + { + "include": "#block" + } + ] + }, + "constructor-declaration": { + "begin": "(?=@?[_[:alpha:]][_[:alnum:]]*\\s*\\()", + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\b", + "captures": { + "1": { + "name": "entity.name.function.cs" + } + } + }, + { + "begin": "(:)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.colon.cs" + } + }, + "end": "(?=\\{|=>)", + "patterns": [ + { + "include": "#constructor-initializer" + } + ] + }, + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#preprocessor" + }, + { + "include": "#comment" + }, + { + "include": "#expression-body" + }, + { + "include": "#block" + } + ] + }, + "constructor-initializer": { + "begin": "\\b(base|this)\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "name": "variable.language.$1.cs" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#argument-list" + } + ] + }, + "destructor-declaration": { + "begin": "(~)(@?[_[:alpha:]][_[:alnum:]]*)\\s*(?=\\()", + "beginCaptures": { + "1": { + "name": "punctuation.tilde.cs" + }, + "2": { + "name": "entity.name.function.cs" + } + }, + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#expression-body" + }, + { + "include": "#block" + } + ] + }, + "operator-declaration": { + "begin": "(?x)\n(?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n\\b(?operator)\\b\\s*\n(?[+\\-*/%&|\\^!=~<>]+|true|false)\\s*\n(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "6": { + "name": "storage.type.operator.cs" + }, + "7": { + "name": "entity.name.function.cs" + } + }, + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#expression-body" + }, + { + "include": "#block" + } + ] + }, + "conversion-operator-declaration": { + "begin": "(?x)\n(?(?:\\b(?:explicit|implicit)))\\s*\n(?(?:\\b(?:operator)))\\s*\n(?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "match": "\\b(explicit)\\b", + "captures": { + "1": { + "name": "storage.modifier.explicit.cs" + } + } + }, + { + "match": "\\b(implicit)\\b", + "captures": { + "1": { + "name": "storage.modifier.implicit.cs" + } + } + } + ] + }, + "2": { + "name": "storage.type.operator.cs" + }, + "3": { + "patterns": [ + { + "include": "#type" + } + ] + } + }, + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#expression-body" + }, + { + "include": "#block" + } + ] + }, + "block": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.cs" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.cs" + } + }, + "patterns": [ + { + "include": "#statement" + } + ] + }, + "variable-initializer": { + "begin": "(?)", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.cs" + } + }, + "end": "(?=[,\\)\\];}])", + "patterns": [ + { + "include": "#ref-modifier" + }, + { + "include": "#expression" + } + ] + }, + "expression-body": { + "begin": "=>", + "beginCaptures": { + "0": { + "name": "keyword.operator.arrow.cs" + } + }, + "end": "(?=[,\\);}])", + "patterns": [ + { + "include": "#ref-modifier" + }, + { + "include": "#expression" + } + ] + }, + "goto-statement": { + "begin": "(?", + "beginCaptures": { + "0": { + "name": "keyword.operator.arrow.cs" + } + }, + "end": "(?=,|})", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "begin": "\\b(when)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.conditional.when.cs" + } + }, + "end": "(?==>|,|})", + "patterns": [ + { + "include": "#case-guard" + } + ] + }, + { + "begin": "(?!\\s)", + "end": "(?=\\bwhen\\b|=>|,|})", + "patterns": [ + { + "include": "#pattern" + } + ] + } + ] + }, + "case-guard": { + "patterns": [ + { + "include": "#parenthesized-expression" + }, + { + "include": "#expression" + } + ] + }, + "is-expression": { + "begin": "(?=?", + "beginCaptures": { + "0": { + "name": "keyword.operator.relational.cs" + } + }, + "end": "(?=[)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "var-pattern": { + "begin": "\\b(var)\\b", + "beginCaptures": { + "1": { + "name": "storage.type.var.cs" + } + }, + "end": "(?=[)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", + "patterns": [ + { + "include": "#designation-pattern" + } + ] + }, + "designation-pattern": { + "patterns": [ + { + "include": "#intrusive" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.cs" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.cs" + } + }, + "patterns": [ + { + "include": "#punctuation-comma" + }, + { + "include": "#designation-pattern" + } + ] + }, + { + "include": "#simple-designation-pattern" + } + ] + }, + "simple-designation-pattern": { + "patterns": [ + { + "include": "#discard-pattern" + }, + { + "match": "@?[_[:alpha:]][_[:alnum:]]*", + "name": "entity.name.variable.local.cs" + } + ] + }, + "type-pattern": { + "begin": "(?=@?[_[:alpha:]][_[:alnum:]]*)", + "end": "(?=[)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", + "patterns": [ + { + "begin": "\\G", + "end": "(?!\\G[@_[:alpha:]])(?=[\\({@_[:alpha:])}\\],;:=&|^]|(?:\\s|^)\\?|!=|\\b(and|or|when)\\b)", + "patterns": [ + { + "include": "#intrusive" + }, + { + "include": "#type-subpattern" + } + ] + }, + { + "begin": "(?=[\\({@_[:alpha:]])", + "end": "(?=[)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", + "patterns": [ + { + "include": "#intrusive" + }, + { + "include": "#positional-pattern" + }, + { + "include": "#property-pattern" + }, + { + "include": "#simple-designation-pattern" + } + ] + } + ] + }, + "type-subpattern": { + "patterns": [ + { + "include": "#type-builtin" + }, + { + "begin": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(::)", + "beginCaptures": { + "1": { + "name": "entity.name.type.alias.cs" + }, + "2": { + "name": "punctuation.separator.coloncolon.cs" + } + }, + "end": "(?<=[_[:alnum:]])|(?=[.<\\[\\({)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", + "patterns": [ + { + "include": "#intrusive" + }, + { + "match": "\\@?[_[:alpha:]][_[:alnum:]]*", + "name": "entity.name.type.cs" + } + ] + }, + { + "match": "\\@?[_[:alpha:]][_[:alnum:]]*", + "name": "entity.name.type.cs" + }, + { + "begin": "\\.", + "beginCaptures": { + "0": { + "name": "punctuation.accessor.cs" + } + }, + "end": "(?<=[_[:alnum:]])|(?=[<\\[\\({)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", + "patterns": [ + { + "include": "#intrusive" + }, + { + "match": "\\@?[_[:alpha:]][_[:alnum:]]*", + "name": "entity.name.type.cs" + } + ] + }, + { + "include": "#type-arguments" + }, + { + "include": "#type-array-suffix" + }, + { + "match": "(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g)\\s+\n\\b(in)\\b", + "captures": { + "1": { + "name": "storage.type.var.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "name": "entity.name.variable.local.cs" + }, + "8": { + "name": "keyword.control.loop.in.cs" + } + } + }, + { + "match": "(?x) # match foreach (var (x, y) in ...)\n(?:\\b(var)\\b\\s*)?\n(?\\((?:[^\\(\\)]|\\g)+\\))\\s+\n\\b(in)\\b", + "captures": { + "1": { + "name": "storage.type.var.cs" + }, + "2": { + "patterns": [ + { + "include": "#tuple-declaration-deconstruction-element-list" + } + ] + }, + "3": { + "name": "keyword.control.loop.in.cs" + } + } + }, + { + "include": "#expression" + } + ] + }, + { + "include": "#statement" + } + ] + }, + "try-statement": { + "patterns": [ + { + "include": "#try-block" + }, + { + "include": "#catch-clause" + }, + { + "include": "#finally-clause" + } + ] + }, + "try-block": { + "begin": "(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?:(\\g)\\b)?", + "captures": { + "1": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "6": { + "name": "entity.name.variable.local.cs" + } + } + } + ] + }, + { + "include": "#when-clause" + }, + { + "include": "#comment" + }, + { + "include": "#block" + } + ] + }, + "when-clause": { + "begin": "(?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref local\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g)\\s*\n(?!=>)\n(?=,|;|=|\\))", + "beginCaptures": { + "1": { + "name": "keyword.control.context.using.cs" + }, + "2": { + "name": "storage.modifier.ref.cs" + }, + "3": { + "name": "storage.modifier.readonly.cs" + }, + "4": { + "name": "storage.type.var.cs" + }, + "5": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "10": { + "name": "entity.name.variable.local.cs" + } + }, + "end": "(?=;|\\))", + "patterns": [ + { + "name": "entity.name.variable.local.cs", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + } + ] + }, + "local-constant-declaration": { + "begin": "(?x)\n(?\\b(?:const)\\b)\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=)", + "beginCaptures": { + "1": { + "name": "storage.modifier.const.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "name": "entity.name.variable.local.cs" + } + }, + "end": "(?=;)", + "patterns": [ + { + "name": "entity.name.variable.local.cs", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + } + ] + }, + "local-function-declaration": { + "begin": "(?x)\n\\b((?:(?:async|unsafe|static|extern)\\s+)*)\n(?\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n \\s*(?:,\\s*)* # commata for multi-dimensional arrays\n \\]\n (?:\\s*\\?)? # arrays can be nullable reference types\n )*\n)\\s+\n(\\g)\\s*\n(<[^<>]+>)?\\s*\n(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#storage-modifier" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "name": "entity.name.function.cs" + }, + "8": { + "patterns": [ + { + "include": "#type-parameter-list" + } + ] + } + }, + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#generic-constraints" + }, + { + "include": "#expression-body" + }, + { + "include": "#block" + } + ] + }, + "local-tuple-var-deconstruction": { + "begin": "(?x) # e.g. var (x, y) = GetPoint();\n(?:\\b(var)\\b\\s*)\n(?\\((?:[^\\(\\)]|\\g)+\\))\\s*\n(?=;|=|\\))", + "beginCaptures": { + "1": { + "name": "storage.type.var.cs" + }, + "2": { + "patterns": [ + { + "include": "#tuple-declaration-deconstruction-element-list" + } + ] + } + }, + "end": "(?=;|\\))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + } + ] + }, + "tuple-deconstruction-assignment": { + "match": "(?x)\n(?\\s*\\((?:[^\\(\\)]|\\g)+\\))\\s*\n(?!=>|==)(?==)", + "captures": { + "1": { + "patterns": [ + { + "include": "#tuple-deconstruction-element-list" + } + ] + } + } + }, + "tuple-declaration-deconstruction-element-list": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.cs" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.cs" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#tuple-declaration-deconstruction-element-list" + }, + { + "include": "#declaration-expression-tuple" + }, + { + "include": "#punctuation-comma" + }, + { + "match": "(?x) # e.g. x\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*\n(?=[,)])", + "captures": { + "1": { + "name": "entity.name.variable.tuple-element.cs" + } + } + } + ] + }, + "tuple-deconstruction-element-list": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.cs" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.cs" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#tuple-deconstruction-element-list" + }, + { + "include": "#declaration-expression-tuple" + }, + { + "include": "#punctuation-comma" + }, + { + "match": "(?x) # e.g. x\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*\n(?=[,)])", + "captures": { + "1": { + "name": "variable.other.readwrite.cs" + } + } + } + ] + }, + "declaration-expression-local": { + "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g)\\b\\s*\n(?=[,)\\]])", + "captures": { + "1": { + "name": "storage.type.var.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "name": "entity.name.variable.local.cs" + } + } + }, + "declaration-expression-tuple": { + "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g)\\b\\s*\n(?=[,)])", + "captures": { + "1": { + "name": "storage.type.var.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "name": "entity.name.variable.tuple-element.cs" + } + } + }, + "checked-unchecked-expression": { + "begin": "(?>>?|\\|)?=(?!=|>)", + "beginCaptures": { + "0": { + "patterns": [ + { + "include": "#assignment-operators" + } + ] + } + }, + "end": "(?=[,\\)\\];}])", + "patterns": [ + { + "include": "#ref-modifier" + }, + { + "include": "#expression" + } + ] + }, + "assignment-operators": { + "patterns": [ + { + "name": "keyword.operator.assignment.compound.cs", + "match": "\\*=|/=|%=|\\+=|-=|\\?\\?=" + }, + { + "name": "keyword.operator.assignment.compound.bitwise.cs", + "match": "\\&=|\\^=|<<=|>>>?=|\\|=" + }, + { + "name": "keyword.operator.assignment.cs", + "match": "\\=" + } + ] + }, + "expression-operators": { + "patterns": [ + { + "name": "keyword.operator.bitwise.shift.cs", + "match": "<<|>>>?" + }, + { + "name": "keyword.operator.comparison.cs", + "match": "==|!=" + }, + { + "name": "keyword.operator.relational.cs", + "match": "<=|>=|<|>" + }, + { + "name": "keyword.operator.logical.cs", + "match": "\\!|&&|\\|\\|" + }, + { + "name": "keyword.operator.bitwise.cs", + "match": "\\&|~|\\^|\\|" + }, + { + "name": "keyword.operator.decrement.cs", + "match": "--" + }, + { + "name": "keyword.operator.increment.cs", + "match": "\\+\\+" + }, + { + "name": "keyword.operator.arithmetic.cs", + "match": "\\+|-(?!>)|\\*|/|%" + }, + { + "name": "keyword.operator.null-coalescing.cs", + "match": "\\?\\?" + }, + { + "name": "keyword.operator.range.cs", + "match": "\\.\\." + } + ] + }, + "with-expression": { + "begin": "(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(\\))(?=\\s*-*!*@?[_[:alnum:]\\(])", + "captures": { + "1": { + "name": "punctuation.parenthesis.open.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "name": "punctuation.parenthesis.close.cs" + } + } + }, + "as-expression": { + "match": "(?x)\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?(?!\\?))? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n \\s*(?:,\\s*)* # commata for multi-dimensional arrays\n \\]\n (?:\\s*\\?(?!\\?))? # arrays can be nullable reference types\n )*\n )\n)?", + "captures": { + "1": { + "name": "keyword.operator.expression.as.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + } + } + }, + "language-variable": { + "patterns": [ + { + "name": "variable.language.$1.cs", + "match": "\\b(base|this)\\b" + }, + { + "name": "variable.other.$1.cs", + "match": "\\b(value)\\b" + } + ] + }, + "invocation-expression": { + "begin": "(?x)\n(?:\n (?:(\\?)\\s*)? # preceding null-conditional operator?\n (\\.)\\s*| # preceding dot?\n (->)\\s* # preceding pointer arrow?\n)?\n(@?[_[:alpha:]][_[:alnum:]]*)\\s* # method name\n(\n <\n (?\n [^<>()]+|\n <\\g+>|\n \\(\\g+\\)\n )+\n >\\s*\n)? # type arguments\n(?=\\() # open paren of argument list", + "beginCaptures": { + "1": { + "name": "keyword.operator.null-conditional.cs" + }, + "2": { + "name": "punctuation.accessor.cs" + }, + "3": { + "name": "punctuation.accessor.pointer.cs" + }, + "4": { + "name": "entity.name.function.cs" + }, + "5": { + "patterns": [ + { + "include": "#type-arguments" + } + ] + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#argument-list" + } + ] + }, + "element-access-expression": { + "begin": "(?x)\n(?:\n (?:(\\?)\\s*)? # preceding null-conditional operator?\n (\\.)\\s*| # preceding dot?\n (->)\\s* # preceding pointer arrow?\n)?\n(?:(@?[_[:alpha:]][_[:alnum:]]*)\\s*)? # property name\n(?:(\\?)\\s*)? # null-conditional operator?\n(?=\\[) # open bracket of argument list", + "beginCaptures": { + "1": { + "name": "keyword.operator.null-conditional.cs" + }, + "2": { + "name": "punctuation.accessor.cs" + }, + "3": { + "name": "punctuation.accessor.pointer.cs" + }, + "4": { + "name": "variable.other.object.property.cs" + }, + "5": { + "name": "keyword.operator.null-conditional.cs" + } + }, + "end": "(?<=\\])(?!\\s*\\[)", + "patterns": [ + { + "include": "#bracketed-argument-list" + } + ] + }, + "member-access-expression": { + "patterns": [ + { + "match": "(?x)\n(?:\n (?:(\\?)\\s*)? # preceding null-conditional operator?\n (\\.)\\s*| # preceding dot?\n (->)\\s* # preceding pointer arrow?\n)\n(@?[_[:alpha:]][_[:alnum:]]*)\\s* # property name\n(?![_[:alnum:]]|\\(|(\\?)?\\[|<) # next character is not alpha-numeric, nor a (, [, or <. Also, test for ?[", + "captures": { + "1": { + "name": "keyword.operator.null-conditional.cs" + }, + "2": { + "name": "punctuation.accessor.cs" + }, + "3": { + "name": "punctuation.accessor.pointer.cs" + }, + "4": { + "name": "variable.other.object.property.cs" + } + } + }, + { + "match": "(?x)\n(\\.)?\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\n(?\\s*<([^<>]|\\g)+>\\s*)\n(?=\n (\\s*\\?)?\n \\s*\\.\\s*@?[_[:alpha:]][_[:alnum:]]*\n)", + "captures": { + "1": { + "name": "punctuation.accessor.cs" + }, + "2": { + "name": "variable.other.object.cs" + }, + "3": { + "patterns": [ + { + "include": "#type-arguments" + } + ] + } + } + }, + { + "match": "(?x)\n(@?[_[:alpha:]][_[:alnum:]]*)\n(?=\n \\s*(?:(?:\\?\\s*)?\\.|->)\n \\s*@?[_[:alpha:]][_[:alnum:]]*\n)", + "captures": { + "1": { + "name": "variable.other.object.cs" + } + } + } + ] + }, + "object-creation-expression": { + "patterns": [ + { + "include": "#object-creation-expression-with-parameters" + }, + { + "include": "#object-creation-expression-with-no-parameters" + } + ] + }, + "object-creation-expression-with-parameters": { + "begin": "(?x)\n(new)(?:\\s+\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n))?\\s*\n(?=\\()", + "beginCaptures": { + "1": { + "name": "keyword.operator.expression.new.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#argument-list" + } + ] + }, + "object-creation-expression-with-no-parameters": { + "match": "(?x)\n(new)\\s+\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?=\\{|//|/\\*|$)", + "captures": { + "1": { + "name": "keyword.operator.expression.new.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + } + } + }, + "array-creation-expression": { + "begin": "(?x)\n\\b(new|stackalloc)\\b\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\\s*\n(?=\\[)", + "beginCaptures": { + "1": { + "name": "keyword.operator.expression.$1.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + } + }, + "end": "(?<=\\])", + "patterns": [ + { + "include": "#bracketed-argument-list" + } + ] + }, + "anonymous-object-creation-expression": { + "begin": "\\b(new)\\b\\s*(?=\\{|//|/\\*|$)", + "beginCaptures": { + "1": { + "name": "keyword.operator.expression.new.cs" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#initializer-expression" + } + ] + }, + "bracketed-parameter-list": { + "begin": "(?=(\\[))", + "beginCaptures": { + "1": { + "name": "punctuation.squarebracket.open.cs" + } + }, + "end": "(?=(\\]))", + "endCaptures": { + "1": { + "name": "punctuation.squarebracket.close.cs" + } + }, + "patterns": [ + { + "begin": "(?<=\\[)", + "end": "(?=\\])", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#attribute-section" + }, + { + "include": "#parameter" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#variable-initializer" + } + ] + } + ] + }, + "parenthesized-parameter-list": { + "begin": "(\\()", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.cs" + } + }, + "end": "(\\))", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.cs" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#attribute-section" + }, + { + "include": "#parameter" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#variable-initializer" + } + ] + }, + "parameter": { + "match": "(?x)\n(?:(?:\\b(ref|params|out|in|this)\\b)\\s+)?\n(?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g)", + "captures": { + "1": { + "name": "storage.modifier.$1.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "name": "entity.name.variable.parameter.cs" + } + } + }, + "argument-list": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.cs" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.cs" + } + }, + "patterns": [ + { + "include": "#named-argument" + }, + { + "include": "#argument" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "bracketed-argument-list": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.squarebracket.open.cs" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.squarebracket.close.cs" + } + }, + "patterns": [ + { + "include": "#named-argument" + }, + { + "include": "#argument" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "named-argument": { + "begin": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(:)", + "beginCaptures": { + "1": { + "name": "entity.name.variable.parameter.cs" + }, + "2": { + "name": "punctuation.separator.colon.cs" + } + }, + "end": "(?=(,|\\)|\\]))", + "patterns": [ + { + "include": "#argument" + } + ] + }, + "argument": { + "patterns": [ + { + "name": "storage.modifier.$1.cs", + "match": "\\b(ref|in)\\b" + }, + { + "begin": "\\b(out)\\b", + "beginCaptures": { + "1": { + "name": "storage.modifier.out.cs" + } + }, + "end": "(?=,|\\)|\\])", + "patterns": [ + { + "include": "#declaration-expression-local" + }, + { + "include": "#expression" + } + ] + }, + { + "include": "#expression" + } + ] + }, + "query-expression": { + "begin": "(?x)\n\\b(from)\\b\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\n\\s+(\\g)\\b\\s*\n\\b(in)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.operator.expression.query.from.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "name": "entity.name.variable.range-variable.cs" + }, + "8": { + "name": "keyword.operator.expression.query.in.cs" + } + }, + "end": "(?=;|\\))", + "patterns": [ + { + "include": "#query-body" + }, + { + "include": "#expression" + } + ] + }, + "query-body": { + "patterns": [ + { + "include": "#let-clause" + }, + { + "include": "#where-clause" + }, + { + "include": "#join-clause" + }, + { + "include": "#orderby-clause" + }, + { + "include": "#select-clause" + }, + { + "include": "#group-clause" + } + ] + }, + "let-clause": { + "begin": "(?x)\n\\b(let)\\b\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*\n(=)\\s*", + "beginCaptures": { + "1": { + "name": "keyword.operator.expression.query.let.cs" + }, + "2": { + "name": "entity.name.variable.range-variable.cs" + }, + "3": { + "name": "keyword.operator.assignment.cs" + } + }, + "end": "(?=;|\\))", + "patterns": [ + { + "include": "#query-body" + }, + { + "include": "#expression" + } + ] + }, + "where-clause": { + "begin": "(?x)\n\\b(where)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.operator.expression.query.where.cs" + } + }, + "end": "(?=;|\\))", + "patterns": [ + { + "include": "#query-body" + }, + { + "include": "#expression" + } + ] + }, + "join-clause": { + "begin": "(?x)\n\\b(join)\\b\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\n\\s+(\\g)\\b\\s*\n\\b(in)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.operator.expression.query.join.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "name": "entity.name.variable.range-variable.cs" + }, + "8": { + "name": "keyword.operator.expression.query.in.cs" + } + }, + "end": "(?=;|\\))", + "patterns": [ + { + "include": "#join-on" + }, + { + "include": "#join-equals" + }, + { + "include": "#join-into" + }, + { + "include": "#query-body" + }, + { + "include": "#expression" + } + ] + }, + "join-on": { + "match": "\\b(on)\\b\\s*", + "captures": { + "1": { + "name": "keyword.operator.expression.query.on.cs" + } + } + }, + "join-equals": { + "match": "\\b(equals)\\b\\s*", + "captures": { + "1": { + "name": "keyword.operator.expression.query.equals.cs" + } + } + }, + "join-into": { + "match": "(?x)\n\\b(into)\\b\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*", + "captures": { + "1": { + "name": "keyword.operator.expression.query.into.cs" + }, + "2": { + "name": "entity.name.variable.range-variable.cs" + } + } + }, + "orderby-clause": { + "begin": "\\b(orderby)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.operator.expression.query.orderby.cs" + } + }, + "end": "(?=;|\\))", + "patterns": [ + { + "include": "#ordering-direction" + }, + { + "include": "#query-body" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "ordering-direction": { + "match": "\\b(ascending|descending)\\b", + "captures": { + "1": { + "name": "keyword.operator.expression.query.$1.cs" + } + } + }, + "select-clause": { + "begin": "\\b(select)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.operator.expression.query.select.cs" + } + }, + "end": "(?=;|\\))", + "patterns": [ + { + "include": "#query-body" + }, + { + "include": "#expression" + } + ] + }, + "group-clause": { + "begin": "\\b(group)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.operator.expression.query.group.cs" + } + }, + "end": "(?=;|\\))", + "patterns": [ + { + "include": "#group-by" + }, + { + "include": "#group-into" + }, + { + "include": "#query-body" + }, + { + "include": "#expression" + } + ] + }, + "group-by": { + "match": "\\b(by)\\b\\s*", + "captures": { + "1": { + "name": "keyword.operator.expression.query.by.cs" + } + } + }, + "group-into": { + "match": "(?x)\n\\b(into)\\b\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*", + "captures": { + "1": { + "name": "keyword.operator.expression.query.into.cs" + }, + "2": { + "name": "entity.name.variable.range-variable.cs" + } + } + }, + "anonymous-method-expression": { + "patterns": [ + { + "begin": "(?x)\n((?:\\b(?:async|static)\\b\\s*)*)\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*\n(=>)", + "beginCaptures": { + "1": { + "patterns": [ + { + "match": "async|static", + "name": "storage.modifier.$0.cs" + } + ] + }, + "2": { + "name": "entity.name.variable.parameter.cs" + }, + "3": { + "name": "keyword.operator.arrow.cs" + } + }, + "end": "(?=\\)|;|}|,)", + "patterns": [ + { + "include": "#block" + }, + { + "include": "#ref-modifier" + }, + { + "include": "#expression" + } + ] + }, + { + "begin": "(?x)\n((?:\\b(?:async|static)\\b\\s*)*)\n(?\n \\(\n (?:[^()]|\\g)*\n \\)\n)\\s*\n(=>)", + "beginCaptures": { + "1": { + "patterns": [ + { + "match": "async|static", + "name": "storage.modifier.$0.cs" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#lambda-parameter-list" + } + ] + }, + "3": { + "name": "keyword.operator.arrow.cs" + } + }, + "end": "(?=\\)|;|}|,)", + "patterns": [ + { + "include": "#block" + }, + { + "include": "#ref-modifier" + }, + { + "include": "#expression" + } + ] + }, + { + "begin": "(?x)\n((?:\\b(?:async|static)\\b\\s*)*)\n(?:\\b(delegate)\\b\\s*)", + "beginCaptures": { + "1": { + "patterns": [ + { + "match": "async|static", + "name": "storage.modifier.$0.cs" + } + ] + }, + "2": { + "name": "storage.type.delegate.cs" + } + }, + "end": "(?=\\)|;|}|,)", + "patterns": [ + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#block" + } + ] + } + ] + }, + "lambda-parameter-list": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.cs" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.cs" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#attribute-section" + }, + { + "include": "#lambda-parameter" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "lambda-parameter": { + "match": "(?x)\n(?:\\b(ref|out|in)\\b)?\\s*\n(?:(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+)?\n(\\g)\\b\\s*\n(?=[,)])", + "captures": { + "1": { + "name": "storage.modifier.$1.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "name": "entity.name.variable.parameter.cs" + } + } + }, + "type": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#ref-modifier" + }, + { + "include": "#readonly-modifier" + }, + { + "include": "#tuple-type" + }, + { + "include": "#type-builtin" + }, + { + "include": "#type-name" + }, + { + "include": "#type-arguments" + }, + { + "include": "#type-array-suffix" + }, + { + "include": "#type-nullable-suffix" + } + ] + }, + "ref-modifier": { + "name": "storage.modifier.ref.cs", + "match": "\\bref\\b" + }, + "readonly-modifier": { + "name": "storage.modifier.readonly.cs", + "match": "\\breadonly\\b" + }, + "tuple-type": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.cs" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.cs" + } + }, + "patterns": [ + { + "include": "#tuple-element" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "tuple-element": { + "match": "(?x)\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\n(?:(?\\g)\\b)?", + "captures": { + "1": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "6": { + "name": "entity.name.variable.tuple-element.cs" + } + } + }, + "type-builtin": { + "match": "\\b(bool|s?byte|u?short|n?u?int|u?long|float|double|decimal|char|string|object|void|dynamic)\\b", + "captures": { + "1": { + "name": "keyword.type.$1.cs" + } + } + }, + "type-name": { + "patterns": [ + { + "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(\\:\\:)", + "captures": { + "1": { + "name": "entity.name.type.alias.cs" + }, + "2": { + "name": "punctuation.separator.coloncolon.cs" + } + } + }, + { + "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(\\.)", + "captures": { + "1": { + "name": "entity.name.type.cs" + }, + "2": { + "name": "punctuation.accessor.cs" + } + } + }, + { + "match": "(\\.)\\s*(@?[_[:alpha:]][_[:alnum:]]*)", + "captures": { + "1": { + "name": "punctuation.accessor.cs" + }, + "2": { + "name": "entity.name.type.cs" + } + } + }, + { + "name": "entity.name.type.cs", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + } + ] + }, + "type-arguments": { + "begin": "<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.begin.cs" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.end.cs" + } + }, + "patterns": [ + { + "include": "#type" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "type-array-suffix": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.squarebracket.open.cs" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.squarebracket.close.cs" + } + }, + "patterns": [ + { + "include": "#intrusive" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "type-nullable-suffix": { + "match": "\\?", + "captures": { + "0": { + "name": "punctuation.separator.question-mark.cs" + } + } + }, + "operator-assignment": { + "name": "keyword.operator.assignment.cs", + "match": "(?)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.cs" + } + }, + "patterns": [ + { + "include": "#xml-attribute" + } + ] + }, + "xml-attribute": { + "patterns": [ + { + "match": "(?x)\n(?:^|\\s+)\n(\n (?:\n ([-_[:alnum:]]+)\n (:)\n )?\n ([-_[:alnum:]]+)\n)\n(=)", + "captures": { + "1": { + "name": "entity.other.attribute-name.cs" + }, + "2": { + "name": "entity.other.attribute-name.namespace.cs" + }, + "3": { + "name": "punctuation.separator.colon.cs" + }, + "4": { + "name": "entity.other.attribute-name.localname.cs" + }, + "5": { + "name": "punctuation.separator.equals.cs" + } + } + }, + { + "include": "#xml-string" + } + ] + }, + "xml-cdata": { + "name": "string.unquoted.cdata.cs", + "begin": "", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.cs" + } + } + }, + "xml-string": { + "patterns": [ + { + "name": "string.quoted.single.cs", + "begin": "\\'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.cs" + } + }, + "end": "\\'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.cs" + } + }, + "patterns": [ + { + "include": "#xml-character-entity" + } + ] + }, + { + "name": "string.quoted.double.cs", + "begin": "\\\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.cs" + } + }, + "end": "\\\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.cs" + } + }, + "patterns": [ + { + "include": "#xml-character-entity" + } + ] + } + ] + }, + "xml-character-entity": { + "patterns": [ + { + "name": "constant.character.entity.cs", + "match": "(?x)\n(&)\n(\n (?:[[:alpha:]:_][[:alnum:]:_.-]*)|\n (?:\\#[[:digit:]]+)|\n (?:\\#x[[:xdigit:]]+)\n)\n(;)", + "captures": { + "1": { + "name": "punctuation.definition.constant.cs" + }, + "3": { + "name": "punctuation.definition.constant.cs" + } + } + }, + { + "name": "invalid.illegal.bad-ampersand.cs", + "match": "&" + } + ] + }, + "xml-comment": { + "name": "comment.block.cs", + "begin": "", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.cs" + } + } + } + } +} diff --git a/src/lib/shiki/languages/css.tmLanguage.json b/src/lib/shiki/languages/css.tmLanguage.json new file mode 100644 index 0000000..e455068 --- /dev/null +++ b/src/lib/shiki/languages/css.tmLanguage.json @@ -0,0 +1,1865 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/microsoft/vscode-css/blob/master/grammars/css.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/microsoft/vscode-css/commit/3bd00206f6b0d16eb2eba53fb886462eb8c58baa", + "name": "css", + "scopeName": "source.css", + "patterns": [ + { + "include": "#comment-block" + }, + { + "include": "#escapes" + }, + { + "include": "#combinators" + }, + { + "include": "#selector" + }, + { + "include": "#at-rules" + }, + { + "include": "#rule-list" + } + ], + "repository": { + "at-rules": { + "patterns": [ + { + "begin": "\\A(?:\\xEF\\xBB\\xBF)?(?i:(?=\\s*@charset\\b))", + "end": ";|(?=$)", + "endCaptures": { + "0": { + "name": "punctuation.terminator.rule.css" + } + }, + "name": "meta.at-rule.charset.css", + "patterns": [ + { + "captures": { + "1": { + "name": "invalid.illegal.not-lowercase.charset.css" + }, + "2": { + "name": "invalid.illegal.leading-whitespace.charset.css" + }, + "3": { + "name": "invalid.illegal.no-whitespace.charset.css" + }, + "4": { + "name": "invalid.illegal.whitespace.charset.css" + }, + "5": { + "name": "invalid.illegal.not-double-quoted.charset.css" + }, + "6": { + "name": "invalid.illegal.unclosed-string.charset.css" + }, + "7": { + "name": "invalid.illegal.unexpected-characters.charset.css" + } + }, + "match": "(?x) # Possible errors:\n\\G\n((?!@charset)@\\w+) # Not lowercase (@charset is case-sensitive)\n|\n\\G(\\s+) # Preceding whitespace\n|\n(@charset\\S[^;]*) # No whitespace after @charset\n|\n(?<=@charset) # Before quoted charset name\n(\\x20{2,}|\\t+) # More than one space used, or a tab\n|\n(?<=@charset\\x20) # Beginning of charset name\n([^\";]+) # Not double-quoted\n|\n(\"[^\"]+$) # Unclosed quote\n|\n(?<=\") # After charset name\n([^;]+) # Unexpected junk instead of semicolon" + }, + { + "captures": { + "1": { + "name": "keyword.control.at-rule.charset.css" + }, + "2": { + "name": "punctuation.definition.keyword.css" + } + }, + "match": "((@)charset)(?=\\s)" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.css" + } + }, + "end": "\"|$", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.css" + } + }, + "name": "string.quoted.double.css", + "patterns": [ + { + "begin": "(?:\\G|^)(?=(?:[^\"])+$)", + "end": "$", + "name": "invalid.illegal.unclosed.string.css" + } + ] + } + ] + }, + { + "begin": "(?i)((@)import)(?:\\s+|$|(?=['\"]|/\\*))", + "beginCaptures": { + "1": { + "name": "keyword.control.at-rule.import.css" + }, + "2": { + "name": "punctuation.definition.keyword.css" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.terminator.rule.css" + } + }, + "name": "meta.at-rule.import.css", + "patterns": [ + { + "begin": "\\G\\s*(?=/\\*)", + "end": "(?<=\\*/)\\s*", + "patterns": [ + { + "include": "#comment-block" + } + ] + }, + { + "include": "#string" + }, + { + "include": "#url" + }, + { + "include": "#media-query-list" + } + ] + }, + { + "begin": "(?i)((@)font-face)(?=\\s*|{|/\\*|$)", + "beginCaptures": { + "1": { + "name": "keyword.control.at-rule.font-face.css" + }, + "2": { + "name": "punctuation.definition.keyword.css" + } + }, + "end": "(?!\\G)", + "name": "meta.at-rule.font-face.css", + "patterns": [ + { + "include": "#comment-block" + }, + { + "include": "#escapes" + }, + { + "include": "#rule-list" + } + ] + }, + { + "begin": "(?i)(@)page(?=[\\s:{]|/\\*|$)", + "captures": { + "0": { + "name": "keyword.control.at-rule.page.css" + }, + "1": { + "name": "punctuation.definition.keyword.css" + } + }, + "end": "(?=\\s*($|[:{;]))", + "name": "meta.at-rule.page.css", + "patterns": [ + { + "include": "#rule-list" + } + ] + }, + { + "begin": "(?i)(?=@media(\\s|\\(|/\\*|$))", + "end": "(?<=})(?!\\G)", + "patterns": [ + { + "begin": "(?i)\\G(@)media", + "beginCaptures": { + "0": { + "name": "keyword.control.at-rule.media.css" + }, + "1": { + "name": "punctuation.definition.keyword.css" + } + }, + "end": "(?=\\s*[{;])", + "name": "meta.at-rule.media.header.css", + "patterns": [ + { + "include": "#media-query-list" + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.media.begin.bracket.curly.css" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.media.end.bracket.curly.css" + } + }, + "name": "meta.at-rule.media.body.css", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + { + "begin": "(?i)(?=@counter-style([\\s'\"{;]|/\\*|$))", + "end": "(?<=})(?!\\G)", + "patterns": [ + { + "begin": "(?i)\\G(@)counter-style", + "beginCaptures": { + "0": { + "name": "keyword.control.at-rule.counter-style.css" + }, + "1": { + "name": "punctuation.definition.keyword.css" + } + }, + "end": "(?=\\s*{)", + "name": "meta.at-rule.counter-style.header.css", + "patterns": [ + { + "include": "#comment-block" + }, + { + "include": "#escapes" + }, + { + "captures": { + "0": { + "patterns": [ + { + "include": "#escapes" + } + ] + } + }, + "match": "(?x)\n(?:[-a-zA-Z_] | [^\\x00-\\x7F]) # First letter\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F] # Remainder of identifier\n |\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*", + "name": "variable.parameter.style-name.css" + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.property-list.begin.bracket.curly.css" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.property-list.end.bracket.curly.css" + } + }, + "name": "meta.at-rule.counter-style.body.css", + "patterns": [ + { + "include": "#comment-block" + }, + { + "include": "#escapes" + }, + { + "include": "#rule-list-innards" + } + ] + } + ] + }, + { + "begin": "(?i)(?=@document([\\s'\"{;]|/\\*|$))", + "end": "(?<=})(?!\\G)", + "patterns": [ + { + "begin": "(?i)\\G(@)document", + "beginCaptures": { + "0": { + "name": "keyword.control.at-rule.document.css" + }, + "1": { + "name": "punctuation.definition.keyword.css" + } + }, + "end": "(?=\\s*[{;])", + "name": "meta.at-rule.document.header.css", + "patterns": [ + { + "begin": "(?i)(?>>", + "name": "invalid.deprecated.combinator.css" + }, + { + "match": ">>|>|\\+|~", + "name": "keyword.operator.combinator.css" + } + ] + }, + "commas": { + "match": ",", + "name": "punctuation.separator.list.comma.css" + }, + "comment-block": { + "begin": "/\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.css" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.css" + } + }, + "name": "comment.block.css" + }, + "escapes": { + "patterns": [ + { + "match": "\\\\[0-9a-fA-F]{1,6}", + "name": "constant.character.escape.codepoint.css" + }, + { + "begin": "\\\\$\\s*", + "end": "^(?<:=]|\\)|/\\*) # Terminates cleanly" + }, + "media-feature-keywords": { + "match": "(?xi)\n(?<=^|\\s|:|\\*/)\n(?: portrait # Orientation\n | landscape\n | progressive # Scan types\n | interlace\n | fullscreen # Display modes\n | standalone\n | minimal-ui\n | browser\n | hover\n)\n(?=\\s|\\)|$)", + "name": "support.constant.property-value.css" + }, + "media-query": { + "begin": "\\G", + "end": "(?=\\s*[{;])", + "patterns": [ + { + "include": "#comment-block" + }, + { + "include": "#escapes" + }, + { + "include": "#media-types" + }, + { + "match": "(?i)(?<=\\s|^|,|\\*/)(only|not)(?=\\s|{|/\\*|$)", + "name": "keyword.operator.logical.$1.media.css" + }, + { + "match": "(?i)(?<=\\s|^|\\*/|\\))and(?=\\s|/\\*|$)", + "name": "keyword.operator.logical.and.media.css" + }, + { + "match": ",(?:(?:\\s*,)+|(?=\\s*[;){]))", + "name": "invalid.illegal.comma.css" + }, + { + "include": "#commas" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.parameters.begin.bracket.round.css" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.css" + } + }, + "patterns": [ + { + "include": "#media-features" + }, + { + "include": "#media-feature-keywords" + }, + { + "match": ":", + "name": "punctuation.separator.key-value.css" + }, + { + "match": ">=|<=|=|<|>", + "name": "keyword.operator.comparison.css" + }, + { + "captures": { + "1": { + "name": "constant.numeric.css" + }, + "2": { + "name": "keyword.operator.arithmetic.css" + }, + "3": { + "name": "constant.numeric.css" + } + }, + "match": "(\\d+)\\s*(/)\\s*(\\d+)", + "name": "meta.ratio.css" + }, + { + "include": "#numeric-values" + }, + { + "include": "#comment-block" + } + ] + } + ] + }, + "media-query-list": { + "begin": "(?=\\s*[^{;])", + "end": "(?=\\s*[{;])", + "patterns": [ + { + "include": "#media-query" + } + ] + }, + "media-types": { + "captures": { + "1": { + "name": "support.constant.media.css" + }, + "2": { + "name": "invalid.deprecated.constant.media.css" + } + }, + "match": "(?xi)\n(?<=^|\\s|,|\\*/)\n(?:\n # Valid media types\n (all|print|screen|speech)\n |\n # Deprecated in Media Queries 4: http://dev.w3.org/csswg/mediaqueries/#media-types\n (aural|braille|embossed|handheld|projection|tty|tv)\n)\n(?=$|[{,\\s;]|/\\*)" + }, + "numeric-values": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.constant.css" + } + }, + "match": "(#)(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\\b", + "name": "constant.other.color.rgb-value.hex.css" + }, + { + "captures": { + "1": { + "name": "keyword.other.unit.percentage.css" + }, + "2": { + "name": "keyword.other.unit.${2:/downcase}.css" + } + }, + "match": "(?xi) (?+~|] # - Followed by another selector\n | /\\* # - Followed by a block comment\n )\n |\n # Name contains unescaped ASCII symbol\n (?: # Check for acceptable preceding characters\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # - Valid selector character\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # - Escape sequence\n )*\n (?: # Invalid punctuation\n [!\"'%&(*;+~|] # - Another selector\n | /\\* # - A block comment\n)", + "name": "entity.other.attribute-name.class.css" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + }, + "2": { + "patterns": [ + { + "include": "#escapes" + } + ] + } + }, + "match": "(?x)\n(\\#)\n(\n -?\n (?![0-9])\n (?:[-a-zA-Z0-9_]|[^\\x00-\\x7F]|\\\\(?:[0-9a-fA-F]{1,6}|.))+\n)\n(?=$|[\\s,.\\#)\\[:{>+~|]|/\\*)", + "name": "entity.other.attribute-name.id.css" + }, + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.entity.begin.bracket.square.css" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.entity.end.bracket.square.css" + } + }, + "name": "meta.attribute-selector.css", + "patterns": [ + { + "include": "#comment-block" + }, + { + "include": "#string" + }, + { + "captures": { + "1": { + "name": "storage.modifier.ignore-case.css" + } + }, + "match": "(?<=[\"'\\s]|^|\\*/)\\s*([iI])\\s*(?=[\\s\\]]|/\\*|$)" + }, + { + "captures": { + "1": { + "name": "string.unquoted.attribute-value.css", + "patterns": [ + { + "include": "#escapes" + } + ] + } + }, + "match": "(?x)(?<==)\\s*((?!/\\*)(?:[^\\\\\"'\\s\\]]|\\\\.)+)" + }, + { + "include": "#escapes" + }, + { + "match": "[~|^$*]?=", + "name": "keyword.operator.pattern.css" + }, + { + "match": "\\|", + "name": "punctuation.separator.css" + }, + { + "captures": { + "1": { + "name": "entity.other.namespace-prefix.css", + "patterns": [ + { + "include": "#escapes" + } + ] + } + }, + "match": "(?x)\n# Qualified namespace prefix\n( -?(?!\\d)(?:[\\w-]|[^\\x00-\\x7F]|\\\\(?:[0-9a-fA-F]{1,6}|.))+\n| \\*\n)\n# Lookahead to ensure there's a valid identifier ahead\n(?=\n \\| (?!\\s|=|$|\\])\n (?: -?(?!\\d)\n | [\\\\\\w-]\n | [^\\x00-\\x7F]\n )\n)" + }, + { + "captures": { + "1": { + "name": "entity.other.attribute-name.css", + "patterns": [ + { + "include": "#escapes" + } + ] + } + }, + "match": "(?x)\n(-?(?!\\d)(?>[\\w-]|[^\\x00-\\x7F]|\\\\(?:[0-9a-fA-F]{1,6}|.))+)\n\\s*\n(?=[~|^\\]$*=]|/\\*)" + } + ] + }, + { + "include": "#pseudo-classes" + }, + { + "include": "#pseudo-elements" + }, + { + "include": "#functional-pseudo-classes" + }, + { + "match": "(?x) (?\\s,.\\#|){:\\[]|/\\*|$)", + "name": "entity.name.tag.css" + }, + "unicode-range": { + "captures": { + "0": { + "name": "constant.other.unicode-range.css" + }, + "1": { + "name": "punctuation.separator.dash.unicode-range.css" + } + }, + "match": "(?<])=(?![=~])", + "name": "punctuation.bind" + }, + { + "match": "<-", + "name": "punctuation.arrow" + }, + { + "include": "#expression" + } + ] + }, + "expression": { + "patterns": [ + { + "patterns": [ + { + "match": "(?=|[<](?![-=])|[>](?![=])", + "name": "keyword.operator.comparison" + }, + { + "match": "&{2}|\\|{2}|!(?![=~])", + "name": "keyword.operator.logical" + }, + { + "match": "&(?!&)|\\|(?!\\|)", + "name": "keyword.operator.set" + } + ] + }, + { + "match": "(?|<>|<|>|=~|=)", + "name": "keyword.operator.compare.cypher" + }, + { + "match": "(?i)\\b(OR|AND|XOR|IS)\\b", + "name": "keyword.operator.logical.cypher" + }, + { + "match": "(?i)\\b(IN)\\b", + "name": "keyword.operator.in.cypher" + } + ] + }, + "path-patterns": { + "patterns": [ + { + "match": "(<--|-->|--)", + "name": "support.function.relationship-pattern.cypher" + }, + { + "begin": "(<-|-)(\\[)", + "beginCaptures": { + "1": { + "name": "support.function.relationship-pattern-start.cypher" + }, + "2": { + "name": "keyword.operator.relationship-pattern-start.cypher" + } + }, + "end": "(])(->|-)", + "endCaptures": { + "1": { + "name": "keyword.operator.relationship-pattern-end.cypher" + }, + "2": { + "name": "support.function.relationship-pattern-end.cypher" + } + }, + "name": "path-pattern.cypher", + "patterns": [ + { + "include": "#identifiers" + }, + { + "captures": { + "1": { + "name": "keyword.operator.relationship-type-start.cypher" + }, + "2": { + "name": "entity.name.class.relationship.type.cypher" + } + }, + "match": "(:)((?:`.+?`)|(?:[\\p{L}_][\\p{L}0-9_]*))", + "name": "entity.name.class.relationship-type.cypher" + }, + { + "captures": { + "1": { + "name": "support.type.operator.relationship-type-or.cypher" + }, + "2": { + "name": "entity.name.class.relationship.type-or.cypher" + } + }, + "match": "(\\|)(\\s*)((?:`.+?`)|(?:[\\p{L}_][\\p{L}0-9_]*))", + "name": "entity.name.class.relationship-type-ored.cypher" + }, + { + "match": "(?:\\?\\*|\\?|\\*)\\s*(?:\\d+\\s*(?:\\.\\.\\s*\\d+)?)?", + "name": "support.function.relationship-pattern.quant.cypher" + }, + { + "include": "#properties_literal" + } + ] + } + ] + }, + "properties_literal": { + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "keyword.control.properties_literal.cypher" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "keyword.control.properties_literal.cypher" + } + }, + "name": "source.cypher", + "patterns": [ + { + "match": ":|,", + "name": "keyword.control.properties_literal.seperator.cypher" + }, + { + "include": "#comments" + }, + { + "include": "#constants" + }, + { + "include": "#functions" + }, + { + "include": "#operators" + }, + { + "include": "#identifiers" + }, + { + "include": "#numbers" + }, + { + "include": "#strings" + } + ] + } + ] + }, + "string_escape": { + "captures": { + "2": { + "name": "string.quoted.double.cypher" + } + }, + "match": "(\\\\\\\\|\\\\[tbnrf])|(\\\\'|\\\\\")", + "name": "constant.character.escape.cypher" + }, + "strings": { + "patterns": [ + { + "begin": "'", + "end": "'", + "name": "string.quoted.single.cypher", + "patterns": [ + { + "include": "#string_escape" + } + ] + }, + { + "begin": "\"", + "end": "\"", + "name": "string.quoted.double.cypher", + "patterns": [ + { + "include": "#string_escape" + } + ] + } + ] + } + }, + "scopeName": "source.cypher", + "uuid": "698F4D06-BAE8-40A8-8AA4-3307ABC03B31" +} diff --git a/src/lib/shiki/languages/d.tmLanguage.json b/src/lib/shiki/languages/d.tmLanguage.json new file mode 100644 index 0000000..95cf2df --- /dev/null +++ b/src/lib/shiki/languages/d.tmLanguage.json @@ -0,0 +1,3180 @@ +{ + "fileTypes": ["d", "di", "dpp"], + "name": "d", + "scopeName": "source.d", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type" + }, + { + "include": "#statement" + }, + { + "include": "#expression" + } + ], + "repository": { + "type": { + "patterns": [ + { + "include": "#typeof" + }, + { + "include": "#base-type" + }, + { + "include": "#type-ctor" + }, + { + "begin": "!\\(", + "end": "\\)", + "patterns": [ + { + "include": "#type" + }, + { + "include": "#expression" + } + ] + } + ] + }, + "base-type": { + "patterns": [ + { + "match": "\\b(auto|bool|byte|ubyte|short|ushort|int|uint|long|ulong|char|wchar|dchar|float|double|real|ifloat|idouble|ireal|cfloat|cdouble|creal|void|noreturn)\\b", + "name": "storage.type.basic-type.d" + }, + { + "match": "\\b(string|wstring|dstring|size_t|ptrdiff_t)\\b(?!\\s*=)", + "name": "storage.type.basic-type.d" + } + ] + }, + "extended-type": { + "patterns": [ + { + "match": "\\b((\\.\\s*)?[_\\w][_\\d\\w]*)(\\s*\\.\\s*[_\\w][_\\d\\w]*)*\\b", + "name": "entity.name.type.d" + }, + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "storage.type.array.expression.begin.d" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "storage.type.array.expression.end.d" + } + }, + "patterns": [ + { + "match": "\\.\\.|\\$", + "name": "keyword.operator.slice.d" + }, + { + "include": "#type" + }, + { + "include": "#expression" + } + ] + } + ] + }, + "type-ctor": { + "patterns": [ + { + "match": "(const|immutable|inout|shared)\\b", + "name": "storage.type.modifier.d" + } + ] + }, + "typeof": { + "begin": "typeof\\s*\\(", + "end": "\\)", + "name": "keyword.token.typeof.d", + "patterns": [ + { + "match": "return", + "name": "keyword.control.return.d" + }, + { + "include": "#expression" + } + ] + }, + "expression": { + "patterns": [ + { + "include": "#index-expression" + }, + { + "include": "#expression-no-index" + } + ] + }, + "expression-no-index": { + "patterns": [ + { + "include": "#function-literal" + }, + { + "include": "#assert-expression" + }, + { + "include": "#assign-expression" + }, + { + "include": "#mixin-expression" + }, + { + "include": "#import-expression" + }, + { + "include": "#traits-expression" + }, + { + "include": "#is-expression" + }, + { + "include": "#typeid-expression" + }, + { + "include": "#shift-expression" + }, + { + "include": "#logical-expression" + }, + { + "include": "#rel-expression" + }, + { + "include": "#bitwise-expression" + }, + { + "include": "#identity-expression" + }, + { + "include": "#in-expression" + }, + { + "include": "#conditional-expression" + }, + { + "include": "#arithmetic-expression" + }, + { + "include": "#new-expression" + }, + { + "include": "#delete-expression" + }, + { + "include": "#cast-expression" + }, + { + "include": "#type-specialization" + }, + { + "include": "#comma" + }, + { + "include": "#special-keyword" + }, + { + "include": "#functions" + }, + { + "include": "#type" + }, + { + "include": "#parentheses-expression" + }, + { + "include": "#lexical" + } + ] + }, + "assign-expression": { + "patterns": [ + { + "match": ">>>=|\\^\\^=|>>=|<<=|~=|\\^=|\\|=|&=|%=|/=|\\*=|-=|\\+=|=(?!>)", + "name": "keyword.operator.assign.d" + } + ] + }, + "conditional-expression": { + "patterns": [ + { + "match": "\\s(\\?|:)\\s", + "name": "keyword.operator.ternary.d" + } + ] + }, + "logical-expression": { + "patterns": [ + { + "match": "\\|\\||&&|==|!=|!", + "name": "keyword.operator.logical.d" + } + ] + }, + "bitwise-expression": { + "patterns": [ + { + "match": "\\||\\^|&", + "name": "keyword.operator.bitwise.d" + } + ] + }, + "identity-expression": { + "patterns": [ + { + "match": "\\b(is|!is)\\b", + "name": "keyword.operator.identity.d" + } + ] + }, + "rel-expression": { + "patterns": [ + { + "match": "!<>=|!<>|<>=|!>=|!<=|<=|>=|<>|!>|!<|<|>", + "name": "keyword.operator.rel.d" + } + ] + }, + "in-expression": { + "patterns": [ + { + "match": "\\b(in|!in)\\b", + "name": "keyword.operator.in.d" + } + ] + }, + "shift-expression": { + "patterns": [ + { + "match": "<<|>>|>>>", + "name": "keyword.operator.shift.d" + }, + { + "include": "#add-expression" + } + ] + }, + "arithmetic-expression": { + "patterns": [ + { + "match": "\\^\\^|\\+\\+|--|(?", + "name": "keyword.operator.lambda.d" + }, + { + "match": "\\b(function|delegate)\\b", + "name": "keyword.other.function-literal.d" + }, + { + "begin": "\\b([_\\w][_\\d\\w]*)\\s*(=>)", + "end": "(?=[\\);,\\]}])", + "beginCaptures": { + "1": { + "name": "variable.parameter.d" + }, + "2": { + "name": "meta.lexical.token.symbolic.d" + } + }, + "patterns": [ + { + "include": "source.d" + } + ] + }, + { + "begin": "(?<=\\)|\\()(\\s*)({)", + "beginCaptures": { + "1": { + "name": "source.d" + }, + "2": { + "name": "source.d" + } + }, + "end": "}", + "patterns": [ + { + "include": "source.d" + } + ] + } + ] + }, + "assert-expression": { + "patterns": [ + { + "begin": "\\bassert\\s*\\(", + "beginCaptures": { + "0": { + "name": "keyword.other.assert.begin.d" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.other.assert.end.d" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#expression" + }, + { + "include": "#comma" + } + ] + } + ] + }, + "mixin-expression": { + "patterns": [ + { + "begin": "\\bmixin\\s*\\(", + "beginCaptures": { + "0": { + "name": "keyword.other.mixin.begin.d" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.other.mixin.end.d" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#expression" + }, + { + "include": "#comma" + } + ] + } + ] + }, + "import-expression": { + "patterns": [ + { + "begin": "\\b(import)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.import.d" + }, + "2": { + "name": "keyword.other.import.begin.d" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.other.import.end.d" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#expression" + }, + { + "include": "#comma" + } + ] + } + ] + }, + "typeid-expression": { + "patterns": [ + { + "match": "\\btypeid\\s*(?=\\()", + "name": "keyword.other.typeid.d" + } + ] + }, + "type-specialization": { + "patterns": [ + { + "match": "\\b(struct|union|class|interface|enum|function|delegate|super|const|immutable|inout|shared|return|__parameters)\\b", + "name": "keyword.other.storage.type-specialization.d" + } + ] + }, + "traits-expression": { + "patterns": [ + { + "begin": "\\b__traits\\s*\\(", + "beginCaptures": { + "0": { + "name": "keyword.other.traits.begin.d" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.other.traits.end.d" + } + }, + "patterns": [ + { + "include": "#traits-keyword" + }, + { + "include": "#comma" + }, + { + "include": "#traits-argument" + } + ] + } + ] + }, + "traits-keyword": { + "patterns": [ + { + "match": "isAbstractClass|isArithmetic|isAssociativeArray|isFinalClass|isPOD|isNested|isFloating|isIntegral|isScalar|isStaticArray|isUnsigned|isVirtualFunction|isVirtualMethod|isAbstractFunction|isFinalFunction|isStaticFunction|isOverrideFunction|isRef|isOut|isLazy|hasMember|identifier|getAliasThis|getAttributes|getMember|getOverloads|getProtection|getVirtualFunctions|getVirtualMethods|getUnitTests|parent|classInstanceSize|getVirtualIndex|allMembers|derivedMembers|isSame|compiles", + "name": "support.constant.traits-keyword.d" + } + ] + }, + "traits-arguments": { + "patterns": [ + { + "include": "#traits-argument" + }, + { + "include": "#comma" + } + ] + }, + "traits-argument": { + "patterns": [ + { + "include": "#expression" + }, + { + "include": "#type" + } + ] + }, + "special-keyword": { + "patterns": [ + { + "match": "\\b(__FILE__|__FILE_FULL_PATH__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__)\\b", + "name": "constant.language.special-keyword.d" + } + ] + }, + "statement": { + "patterns": [ + { + "include": "#non-block-statement" + }, + { + "include": "#semi-colon" + } + ] + }, + "non-block-statement": { + "patterns": [ + { + "include": "#module-declaration" + }, + { + "include": "#labeled-statement" + }, + { + "include": "#if-statement" + }, + { + "include": "#while-statement" + }, + { + "include": "#do-statement" + }, + { + "include": "#for-statement" + }, + { + "include": "#static-foreach" + }, + { + "include": "#static-foreach-reverse" + }, + { + "include": "#foreach-statement" + }, + { + "include": "#foreach-reverse-statement" + }, + { + "include": "#switch-statement" + }, + { + "include": "#final-switch-statement" + }, + { + "include": "#case-statement" + }, + { + "include": "#default-statement" + }, + { + "include": "#continue-statement" + }, + { + "include": "#break-statement" + }, + { + "include": "#return-statement" + }, + { + "include": "#goto-statement" + }, + { + "include": "#with-statement" + }, + { + "include": "#synchronized-statement" + }, + { + "include": "#try-statement" + }, + { + "include": "#catches" + }, + { + "include": "#scope-guard-statement" + }, + { + "include": "#throw-statement" + }, + { + "include": "#finally-statement" + }, + { + "include": "#asm-statement" + }, + { + "include": "#pragma-statement" + }, + { + "include": "#mixin-statement" + }, + { + "include": "#conditional-statement" + }, + { + "include": "#static-assert" + }, + { + "include": "#deprecated-statement" + }, + { + "include": "#unit-test" + }, + { + "include": "#declaration-statement" + } + ] + }, + "labeled-statement": { + "patterns": [ + { + "match": "\\b(?!abstract|alias|align|asm|assert|auto|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|in|inout|int|interface|invariant|ireal|is|lazy|long|macro|mixin|module|new|nothrow|noreturn|null|out|override|package|pragma|private|protected|public|pure|real|ref|return|scope|shared|short|static|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__|__gshared|__traits|__vector|__parameters)[a-zA-Z_][a-zA-Z_0-9]*\\s*:", + "name": "entity.name.d" + } + ] + }, + "declaration-statement": { + "patterns": [ + { + "include": "#declaration" + } + ] + }, + "if-statement": { + "patterns": [ + { + "begin": "\\b(if)\\b\\s*", + "captures": { + "1": { + "name": "keyword.control.if.d" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "source.d" + } + ] + } + ] + }, + { + "match": "\\belse\\b\\s*", + "name": "keyword.control.else.d" + } + ] + }, + "while-statement": { + "patterns": [ + { + "begin": "\\b(while)\\b\\s*", + "captures": { + "1": { + "name": "keyword.control.while.d" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "source.d" + } + ] + } + ] + } + ] + }, + "do-statement": { + "patterns": [ + { + "match": "\\bdo\\b", + "name": "keyword.control.do.d" + } + ] + }, + "for-statement": { + "patterns": [ + { + "begin": "\\b(for)\\b\\s*", + "captures": { + "1": { + "name": "keyword.control.for.d" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "source.d" + } + ] + } + ] + } + ] + }, + "foreach-statement": { + "patterns": [ + { + "begin": "\\b(foreach)\\b\\s*", + "captures": { + "1": { + "name": "keyword.control.foreach.d" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "match": ";", + "name": "keyword.operator.semi-colon.d" + }, + { + "include": "source.d" + } + ] + } + ] + } + ] + }, + "foreach-reverse-statement": { + "patterns": [ + { + "begin": "\\b(foreach_reverse)\\b\\s*", + "captures": { + "1": { + "name": "keyword.control.foreach_reverse.d" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "match": ";", + "name": "keyword.operator.semi-colon.d" + }, + { + "include": "source.d" + } + ] + } + ] + } + ] + }, + "switch-statement": { + "patterns": [ + { + "begin": "\\b(switch)\\b\\s*", + "captures": { + "1": { + "name": "keyword.control.switch.d" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "source.d" + } + ] + } + ] + } + ] + }, + "case-statement": { + "patterns": [ + { + "begin": "\\b(case)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.case.range.d" + } + }, + "end": ":", + "endCaptures": { + "0": { + "name": "meta.case.end.d" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#expression" + }, + { + "include": "#comma" + } + ] + } + ] + }, + "default-statement": { + "patterns": [ + { + "match": "\\b(default)\\s*(:)", + "captures": { + "1": { + "name": "keyword.control.case.default.d" + }, + "2": { + "name": "meta.default.colon.d" + } + } + } + ] + }, + "final-switch-statement": { + "patterns": [ + { + "begin": "\\b(final\\s+switch)\\b\\s*", + "captures": { + "1": { + "name": "keyword.control.final.switch.d" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "source.d" + } + ] + } + ] + } + ] + }, + "continue-statement": { + "patterns": [ + { + "match": "\\bcontinue\\b", + "name": "keyword.control.continue.d" + } + ] + }, + "break-statement": { + "patterns": [ + { + "match": "\\bbreak\\b", + "name": "keyword.control.break.d" + } + ] + }, + "return-statement": { + "patterns": [ + { + "match": "\\breturn\\b", + "name": "keyword.control.return.d" + } + ] + }, + "goto-statement": { + "patterns": [ + { + "match": "\\bgoto\\s+default\\b", + "name": "keyword.control.goto.d" + }, + { + "match": "\\bgoto\\s+case\\b", + "name": "keyword.control.goto.d" + }, + { + "match": "\\bgoto\\b", + "name": "keyword.control.goto.d" + } + ] + }, + "with-statement": { + "patterns": [ + { + "begin": "\\b(with)\\b\\s*(?=\\()", + "captures": { + "1": { + "name": "keyword.control.with.d" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "source.d" + } + ] + } + ] + } + ] + }, + "synchronized-statement": { + "patterns": [ + { + "begin": "\\b(synchronized)\\b\\s*(?=\\()", + "captures": { + "1": { + "name": "keyword.control.synchronized.d" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "source.d" + } + ] + } + ] + } + ] + }, + "try-statement": { + "patterns": [ + { + "match": "\\btry\\b", + "name": "keyword.control.try.d" + } + ] + }, + "catches": { + "patterns": [ + { + "include": "#catch" + } + ] + }, + "catch": { + "patterns": [ + { + "begin": "\\b(catch)\\b\\s*(?=\\()", + "captures": { + "1": { + "name": "keyword.control.catch.d" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "source.d" + } + ] + } + ] + } + ] + }, + "finally-statement": { + "patterns": [ + { + "match": "\\bfinally\\b", + "name": "keyword.control.throw.d" + } + ] + }, + "throw-statement": { + "patterns": [ + { + "match": "\\bthrow\\b", + "name": "keyword.control.throw.d" + } + ] + }, + "scope-guard-statement": { + "patterns": [ + { + "match": "\\bscope\\s*\\((exit|success|failure)\\)", + "name": "keyword.control.scope.d" + } + ] + }, + "asm-statement": { + "patterns": [ + { + "begin": "\\b(asm)\\b\\s*(?=\\{)", + "captures": { + "1": { + "name": "keyword.control.switch.d" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "begin": "\\{", + "end": "\\}", + "beginCaptures": { + "0": { + "name": "keyword.control.asm.begin.d" + } + }, + "endCaptures": { + "0": { + "name": "keyword.control.asm.end.d" + } + }, + "contentName": "gfm.markup.raw.assembly.d", + "patterns": [ + { + "include": "#asm-instruction" + } + ] + } + ] + } + ] + }, + "pragma-statement": { + "patterns": [ + { + "include": "#pragma" + } + ] + }, + "mixin-statement": { + "patterns": [ + { + "begin": "\\bmixin\\s*\\(", + "beginCaptures": { + "0": { + "name": "keyword.control.mixin.begin.d" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.control.mixin.end.d" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#expression" + }, + { + "include": "#comma" + } + ] + } + ] + }, + "is-expression": { + "patterns": [ + { + "begin": "\\bis\\s*\\(", + "beginCaptures": { + "0": { + "name": "keyword.token.is.begin.d" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.token.is.end.d" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#expression" + }, + { + "include": "#comma" + } + ] + } + ] + }, + "parentheses-expression": { + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#expression" + } + ] + } + ] + }, + "deprecated-statement": { + "patterns": [ + { + "begin": "\\bdeprecated\\s*\\(", + "beginCaptures": { + "0": { + "name": "keyword.other.deprecated.begin.d" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.other.deprecated.end.d" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#expression" + }, + { + "include": "#comma" + } + ] + }, + { + "match": "\\bdeprecated\\b\\s*(?!\\()", + "name": "keyword.other.deprecated.plain.d" + } + ] + }, + "asm-instruction": { + "patterns": [ + { + "include": "#comment" + }, + { + "match": "\\b(align|even|naked|db|ds|di|dl|df|dd|de)\\b|:", + "name": "keyword.asm-instruction.d" + }, + { + "match": "\\b__LOCAL_SIZE\\b", + "name": "constant.language.assembly.d" + }, + { + "match": "\\b(offsetof|seg)\\b", + "name": "support.type.assembly.d" + }, + { + "include": "#asm-type-prefix" + }, + { + "include": "#asm-primary-expression" + }, + { + "include": "#operands" + }, + { + "include": "#register" + }, + { + "include": "#register-64" + }, + { + "include": "#float-literal" + }, + { + "include": "#integer-literal" + }, + { + "include": "#identifier" + } + ] + }, + "operands": { + "patterns": [ + { + "match": "\\?|:", + "name": "keyword.operator.ternary.assembly.d" + }, + { + "match": "\\]|\\[", + "name": "keyword.operator.bracket.assembly.d" + }, + { + "match": ">>>|\\|\\||&&|==|!=|<=|>=|<<|>>|\\||\\^|&|<|>|\\+|-|\\*|/|%|~|!", + "name": "keyword.operator.assembly.d" + } + ] + }, + "asm-type-prefix": { + "patterns": [ + { + "match": "\\b((near\\s+ptr)|(far\\s+ptr)|(byte\\s+ptr)|(short\\s+ptr)|(int\\s+ptr)|(word\\s+ptr)|(dword\\s+ptr)|(qword\\s+ptr)|(float\\s+ptr)|(double\\s+ptr)|(real\\s+ptr))\\b", + "name": "support.type.asm-type-prefix.d" + } + ] + }, + "register": { + "patterns": [ + { + "match": "\\b(XMM0|XMM1|XMM2|XMM3|XMM4|XMM5|XMM6|XMM7|MM0|MM1|MM2|MM3|MM4|MM5|MM6|MM7|ST\\(0\\)|ST\\(1\\)|ST\\(2\\)|ST\\(3\\)|ST\\(4\\)|ST\\(5\\)|ST\\(6\\)|ST\\(7\\)|ST|TR1|TR2|TR3|TR4|TR5|TR6|TR7|DR0|DR1|DR2|DR3|DR4|DR5|DR6|DR7|CR0|CR2|CR3|CR4|EAX|EBX|ECX|EDX|EBP|ESP|EDI|ESI|AL|AH|AX|BL|BH|BX|CL|CH|CX|DL|DH|DX|BP|SP|DI|SI|ES|CS|SS|DS|GS|FS)\\b", + "name": "storage.type.assembly.register.d" + } + ] + }, + "register-64": { + "patterns": [ + { + "match": "\\b(RAX|RBX|RCX|RDX|BPL|RBP|SPL|RSP|DIL|RDI|SIL|RSI|R8B|R8W|R8D|R8|R9B|R9W|R9D|R9|R10B|R10W|R10D|R10|R11B|R11W|R11D|R11|R12B|R12W|R12D|R12|R13B|R13W|R13D|R13|R14B|R14W|R14D|R14|R15B|R15W|R15D|R15|XMM8|XMM9|XMM10|XMM11|XMM12|XMM13|XMM14|XMM15|YMM0|YMM1|YMM2|YMM3|YMM4|YMM5|YMM6|YMM7|YMM8|YMM9|YMM10|YMM11|YMM12|YMM13|YMM14|YMM15)\\b", + "name": "storage.type.assembly.register-64.d" + } + ] + }, + "declaration": { + "patterns": [ + { + "include": "#alias-declaration" + }, + { + "include": "#aggregate-declaration" + }, + { + "include": "#enum-declaration" + }, + { + "include": "#import-declaration" + }, + { + "include": "#storage-class" + }, + { + "include": "#void-initializer" + }, + { + "include": "#mixin-declaration" + } + ] + }, + "alias-declaration": { + "patterns": [ + { + "begin": "\\b(alias)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.other.alias.d" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "meta.alias.end.d" + } + }, + "patterns": [ + { + "include": "#type" + }, + { + "match": "=(?![=>])", + "name": "keyword.operator.equal.alias.d" + }, + { + "include": "#expression" + } + ] + } + ] + }, + "storage-class": { + "patterns": [ + { + "match": "\\b(deprecated|enum|static|extern|abstract|final|override|synchronized|auto|scope|const|immutable|inout|shared|__gshared|nothrow|pure|ref)\\b", + "name": "storage.class.d" + }, + { + "include": "#linkage-attribute" + }, + { + "include": "#align-attribute" + }, + { + "include": "#property" + } + ] + }, + "void-initializer": { + "patterns": [ + { + "match": "\\bvoid\\b", + "name": "support.type.void.d" + } + ] + }, + "functions": { + "patterns": [ + { + "include": "#function-attribute" + }, + { + "include": "#function-prelude" + } + ] + }, + "function-prelude": { + "patterns": [ + { + "match": "(?!typeof|typeid)((\\.\\s*)?[_\\w][_\\d\\w]*)(\\s*\\.\\s*[_\\w][_\\d\\w]*)*\\s*(?=\\()", + "name": "entity.name.function.d" + } + ] + }, + "class-members": { + "patterns": [ + { + "include": "#shared-static-constructor" + }, + { + "include": "#shared-static-destructor" + }, + { + "include": "#constructor" + }, + { + "include": "#destructor" + }, + { + "include": "#postblit" + }, + { + "include": "#invariant" + }, + { + "include": "#member-function-attribute" + } + ] + }, + "function-attribute": { + "patterns": [ + { + "match": "\\b(nothrow|pure)\\b", + "name": "storage.type.modifier.function-attribute.d" + }, + { + "include": "#property" + } + ] + }, + "member-function-attribute": { + "patterns": [ + { + "match": "\\b(const|immutable|inout|shared)\\b", + "name": "storage.type.modifier.member-function-attribute" + } + ] + }, + "function-body": { + "patterns": [ + { + "include": "#in-statement" + }, + { + "include": "#out-statement" + }, + { + "include": "#block-statement" + } + ] + }, + "in-statement": { + "patterns": [ + { + "match": "\\bin\\b", + "name": "keyword.control.in.d" + } + ] + }, + "out-statement": { + "patterns": [ + { + "begin": "\\bout\\s*\\(", + "beginCaptures": { + "0": { + "name": "keyword.control.out.begin.d" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.control.out.end.d" + } + }, + "patterns": [ + { + "include": "#identifier" + } + ] + }, + { + "match": "\\bout\\b", + "name": "keyword.control.out.d" + } + ] + }, + "constructor": { + "patterns": [ + { + "match": "\\bthis\\b", + "name": "entity.name.function.constructor.d" + } + ] + }, + "destructor": { + "patterns": [ + { + "match": "\\b~this\\s*\\(\\s*\\)", + "name": "entity.name.class.destructor.d" + } + ] + }, + "postblit": { + "patterns": [ + { + "match": "\\bthis\\s*\\(\\s*this\\s*\\)\\s", + "name": "entity.name.class.postblit.d" + } + ] + }, + "invariant": { + "patterns": [ + { + "match": "\\binvariant\\s*\\(\\s*\\)", + "name": "entity.name.class.invariant.d" + } + ] + }, + "shared-static-constructor": { + "patterns": [ + { + "match": "\\b(shared\\s+)?static\\s+this\\s*\\(\\s*\\)", + "name": "entity.name.class.constructor.shared-static.d" + }, + { + "include": "#function-body" + } + ] + }, + "shared-static-destructor": { + "patterns": [ + { + "match": "\\b(shared\\s+)?static\\s+~this\\s*\\(\\s*\\)", + "name": "entity.name.class.destructor.static.d" + } + ] + }, + "aggregate-declaration": { + "patterns": [ + { + "include": "#class-declaration" + }, + { + "include": "#interface-declaration" + }, + { + "include": "#struct-declaration" + }, + { + "include": "#union-declaration" + }, + { + "include": "#mixin-template-declaration" + }, + { + "include": "#template-declaration" + } + ] + }, + "class-declaration": { + "patterns": [ + { + "match": "\\b(class)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b", + "captures": { + "1": { + "name": "storage.type.class.d" + }, + "2": { + "name": "entity.name.class.d" + } + } + }, + { + "include": "#protection-attribute" + }, + { + "include": "#class-members" + } + ] + }, + "interface-declaration": { + "patterns": [ + { + "match": "\\b(interface)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b", + "captures": { + "1": { + "name": "storage.type.interface.d" + }, + "2": { + "name": "entity.name.type.interface.d" + } + } + } + ] + }, + "struct-declaration": { + "patterns": [ + { + "match": "\\b(struct)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b", + "captures": { + "1": { + "name": "storage.type.struct.d" + }, + "2": { + "name": "entity.name.type.struct.d" + } + } + } + ] + }, + "union-declaration": { + "patterns": [ + { + "match": "\\b(union)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b", + "captures": { + "1": { + "name": "storage.type.union.d" + }, + "2": { + "name": "entity.name.type.union.d" + } + } + } + ] + }, + "enum-declaration": { + "patterns": [ + { + "begin": "\\b(enum)\\b\\s+(?=.*[=;])", + "end": "([A-Za-z_][\\w_\\d]*)\\s*(?=;|=|\\()(;)?", + "beginCaptures": { + "1": { + "name": "storage.type.enum.d" + } + }, + "endCaptures": { + "1": { + "name": "entity.name.type.enum.d" + }, + "2": { + "name": "meta.enum.end.d" + } + }, + "patterns": [ + { + "include": "#type" + }, + { + "include": "#extended-type" + }, + { + "match": "=(?![=>])", + "name": "keyword.operator.equal.alias.d" + } + ] + } + ] + }, + "template-declaration": { + "patterns": [ + { + "match": "\\b(template)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b", + "captures": { + "1": { + "name": "storage.type.template.d" + }, + "2": { + "name": "entity.name.type.template.d" + } + } + } + ] + }, + "mixin-template-declaration": { + "patterns": [ + { + "match": "\\b(mixin\\s*template)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b", + "captures": { + "1": { + "name": "storage.type.mixintemplate.d" + }, + "2": { + "name": "entity.name.type.mixintemplate.d" + } + } + } + ] + }, + "attribute": { + "patterns": [ + { + "include": "#linkage-attribute" + }, + { + "include": "#align-attribute" + }, + { + "include": "#deprecated-attribute" + }, + { + "include": "#protection-attribute" + }, + { + "include": "#pragma" + }, + { + "match": "\\b(static|extern|abstract|final|override|synchronized|auto|scope|const|immutable|inout|shared|__gshared|nothrow|pure|ref)\\b", + "name": "entity.other.attribute-name.d" + }, + { + "include": "#property" + } + ] + }, + "linkage-attribute": { + "patterns": [ + { + "begin": "\\bextern\\s*\\(\\s*C\\+\\+\\s*,", + "beginCaptures": { + "0": { + "name": "keyword.other.extern.cplusplus.begin.d" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.other.extern.cplusplus.end.d" + } + }, + "patterns": [ + { + "include": "#identifier" + }, + { + "include": "#comma" + } + ] + }, + { + "begin": "\\bextern\\s*\\(", + "beginCaptures": { + "0": { + "name": "keyword.other.extern.begin.d" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.other.extern.end.d" + } + }, + "patterns": [ + { + "include": "#linkage-type" + } + ] + } + ] + }, + "linkage-type": { + "patterns": [ + { + "match": "C|C\\+\\+|D|Windows|Pascal|System", + "name": "storage.modifier.linkage-type.d" + } + ] + }, + "align-attribute": { + "patterns": [ + { + "begin": "\\balign\\s*\\(", + "end": "\\)", + "name": "storage.modifier.align-attribute.d", + "patterns": [ + { + "include": "#integer-literal" + } + ] + }, + { + "match": "\\balign\\b\\s*(?!\\()", + "name": "storage.modifier.align-attribute.d" + } + ] + }, + "protection-attribute": { + "patterns": [ + { + "match": "\\b(private|package|protected|public|export)\\b", + "name": "keyword.other.protections.d" + } + ] + }, + "property": { + "patterns": [ + { + "match": "@(property|safe|trusted|system|disable|nogc)\\b", + "name": "entity.name.tag.property.d" + }, + { + "include": "#user-defined-attribute" + } + ] + }, + "user-defined-attribute": { + "patterns": [ + { + "match": "@([_\\w][_\\d\\w]*)\\b", + "name": "entity.name.tag.user-defined-property.d" + }, + { + "begin": "@([_\\w][_\\d\\w]*)?\\(", + "end": "\\)", + "name": "entity.name.tag.user-defined-property.d", + "patterns": [ + { + "include": "#expression" + } + ] + } + ] + }, + "pragma": { + "patterns": [ + { + "match": "\\bpragma\\s*\\(\\s*[_\\w][_\\d\\w]*\\s*\\)", + "name": "keyword.other.pragma.d" + }, + { + "begin": "\\bpragma\\s*\\(\\s*[_\\w][_\\d\\w]*\\s*,", + "end": "\\)", + "name": "keyword.other.pragma.d", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "match": "^#!.+", + "name": "gfm.markup.header.preprocessor.script-tag.d" + } + ] + }, + "conditional-declaration": { + "patterns": [ + { + "include": "#condition" + }, + { + "match": "\\belse\\b", + "name": "keyword.control.else.d" + }, + { + "include": "#colon" + }, + { + "include": "#decl-defs" + } + ] + }, + "conditional-statement": { + "patterns": [ + { + "include": "#condition" + }, + { + "include": "#no-scope-non-empty-statement" + }, + { + "match": "\\belse\\b", + "name": "keyword.control.else.d" + } + ] + }, + "condition": { + "patterns": [ + { + "include": "#version-condition" + }, + { + "include": "#debug-condition" + }, + { + "include": "#static-if-condition" + } + ] + }, + "version-condition": { + "patterns": [ + { + "match": "\\bversion\\s*\\(\\s*unittest\\s*\\)", + "name": "keyword.other.version.unittest.d" + }, + { + "match": "\\bversion\\s*\\(\\s*assert\\s*\\)", + "name": "keyword.other.version.assert.d" + }, + { + "begin": "\\bversion\\s*\\(", + "beginCaptures": { + "0": { + "name": "keyword.other.version.identifier.begin.d" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.other.version.identifer.end.d" + } + }, + "patterns": [ + { + "include": "#integer-literal" + }, + { + "include": "#identifier" + } + ] + }, + { + "include": "#version-specification" + } + ] + }, + "debug-condition": { + "patterns": [ + { + "begin": "\\bdebug\\s*\\(", + "beginCaptures": { + "0": { + "name": "keyword.other.debug.identifier.begin.d" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.other.debug.identifier.end.d" + } + }, + "patterns": [ + { + "include": "#integer-literal" + }, + { + "include": "#identifier" + } + ] + }, + { + "match": "\\bdebug\\b\\s*(?!\\()", + "name": "keyword.other.debug.plain.d" + } + ] + }, + "version-specification": { + "patterns": [ + { + "match": "\\bversion\\b\\s*(?==)", + "name": "keyword.other.version-specification.d" + } + ] + }, + "debug-specification": { + "patterns": [ + { + "match": "\\bdebug\\b\\s*(?==)", + "name": "keyword.other.debug-specification.d" + } + ] + }, + "static-if-condition": { + "patterns": [ + { + "begin": "\\bstatic\\s+if\\b\\s*\\(", + "beginCaptures": { + "0": { + "name": "keyword.control.static-if.begin.d" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.control.static-if.end.d" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#expression" + } + ] + } + ] + }, + "static-assert": { + "patterns": [ + { + "begin": "\\bstatic\\s+assert\\b\\s*\\(", + "beginCaptures": { + "0": { + "name": "keyword.other.static-assert.begin.d" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.other.static-assert.end.d" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + } + ] + }, + "static-foreach": { + "patterns": [ + { + "begin": "\\b(static\\s+foreach)\\b\\s*", + "captures": { + "1": { + "name": "keyword.control.static-foreach.d" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "match": ";", + "name": "keyword.operator.semi-colon.d" + }, + { + "include": "source.d" + } + ] + } + ] + } + ] + }, + "static-foreach-reverse": { + "patterns": [ + { + "begin": "\\b(static\\s+foreach_reverse)\\b\\s*", + "captures": { + "1": { + "name": "keyword.control.static-foreach.d" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "match": ";", + "name": "keyword.operator.semi-colon.d" + }, + { + "include": "source.d" + } + ] + } + ] + } + ] + }, + "module": { + "packages": [ + { + "import": "#module-declaration" + } + ] + }, + "module-declaration": { + "patterns": [ + { + "begin": "\\b(module)\\s+", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.package.module.d" + } + }, + "endCaptures": { + "0": { + "name": "meta.module.end.d" + } + }, + "patterns": [ + { + "include": "#module-identifier" + }, + { + "include": "#comment" + } + ] + } + ] + }, + "import-declaration": { + "patterns": [ + { + "begin": "\\b(static\\s+)?(import)\\s+(?!\\()", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.package.import.d" + }, + "2": { + "name": "keyword.package.import.d" + } + }, + "endCaptures": { + "0": { + "name": "meta.import.end.d" + } + }, + "patterns": [ + { + "include": "#import-identifier" + }, + { + "include": "#comma" + }, + { + "include": "#comment" + } + ] + } + ] + }, + "mixin-declaration": { + "patterns": [ + { + "begin": "\\bmixin\\s*\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "keyword.mixin.begin.d" + } + }, + "endCaptures": { + "0": { + "name": "keyword.mixin.end.d" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#expression" + }, + { + "include": "#comma" + } + ] + } + ] + }, + "comma": { + "patterns": [ + { + "match": ",", + "name": "keyword.operator.comma.d" + } + ] + }, + "colon": { + "patterns": [ + { + "match": ":", + "name": "support.type.colon.d" + } + ] + }, + "equal": { + "patterns": [ + { + "match": "=(?![=>])", + "name": "keyword.operator.equal.d" + } + ] + }, + "semi-colon": { + "patterns": [ + { + "match": ";", + "name": "meta.statement.end.d" + } + ] + }, + "lexical": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string-literal" + }, + { + "include": "#character-literal" + }, + { + "include": "#float-literal" + }, + { + "include": "#integer-literal" + }, + { + "include": "#eof" + }, + { + "include": "#special-tokens" + }, + { + "include": "#special-token-sequence" + }, + { + "include": "#keyword" + }, + { + "include": "#identifier" + } + ] + }, + "integer-literal": { + "patterns": [ + { + "include": "#decimal-integer" + }, + { + "include": "#binary-integer" + }, + { + "include": "#hexadecimal-integer" + } + ] + }, + "decimal-integer": { + "patterns": [ + { + "match": "\\b(0(?=[^\\dxXbB]))|([1-9][0-9_]*)(Lu|LU|uL|UL|L|u|U)?\\b", + "name": "constant.numeric.integer.decimal.d" + } + ] + }, + "binary-integer": { + "patterns": [ + { + "match": "\\b(0b|0B)[0-1_]+(Lu|LU|uL|UL|L|u|U)?\\b", + "name": "constant.numeric.integer.binary.d" + } + ] + }, + "hexadecimal-integer": { + "patterns": [ + { + "match": "\\b(0x|0X)([0-9a-fA-F][0-9a-fA-F_]*)(Lu|LU|uL|UL|L|u|U)?\\b", + "name": "constant.numeric.integer.hexadecimal.d" + } + ] + }, + "float-literal": { + "patterns": [ + { + "include": "#decimal-float" + }, + { + "include": "#hexadecimal-float" + } + ] + }, + "decimal-float": { + "patterns": [ + { + "match": "\\b((\\.[0-9])|(0\\.)|(([1-9]|(0[1-9_]))[0-9_]*\\.))[0-9_]*((e-|E-|e\\+|E\\+|e|E)[0-9][0-9_]*)?[LfF]?i?\\b", + "name": "constant.numeric.float.decimal.d" + } + ] + }, + "hexadecimal-float": { + "patterns": [ + { + "match": "\\b0[xX][0-9a-fA-F_]*(\\.[0-9a-fA-F_]*)?(p-|P-|p\\+|P\\+|p|P)[0-9][0-9_]*[LfF]?i?\\b", + "name": "constant.numeric.float.hexadecimal.d" + } + ] + }, + "string-literal": { + "patterns": [ + { + "include": "#wysiwyg-string" + }, + { + "include": "#alternate-wysiwyg-string" + }, + { + "include": "#hex-string" + }, + { + "include": "#arbitrary-delimited-string" + }, + { + "include": "#delimited-string" + }, + { + "include": "#double-quoted-string" + }, + { + "include": "#token-string" + } + ] + }, + "wysiwyg-string": { + "patterns": [ + { + "begin": "r\\\"", + "end": "\\\"[cwd]?", + "name": "string.wysiwyg-string.d", + "patterns": [ + { + "include": "#wysiwyg-characters" + } + ] + } + ] + }, + "alternate-wysiwyg-string": { + "patterns": [ + { + "begin": "`", + "end": "`[cwd]?", + "name": "string.alternate-wysiwyg-string.d", + "patterns": [ + { + "include": "#wysiwyg-characters" + } + ] + } + ] + }, + "double-quoted-string": { + "patterns": [ + { + "begin": "\"", + "end": "\"[cwd]?", + "name": "string.double-quoted-string.d", + "patterns": [ + { + "include": "#double-quoted-characters" + } + ] + } + ] + }, + "hex-string": { + "patterns": [ + { + "begin": "x\"", + "end": "\"[cwd]?", + "name": "string.hex-string.d", + "patterns": [ + { + "match": "[a-fA-F0-9_s]+", + "name": "constant.character.hex-string.d" + } + ] + } + ] + }, + "arbitrary-delimited-string": { + "begin": "q\"(\\w+)", + "end": "\\1\"", + "name": "string.delimited.d", + "patterns": [ + { + "match": ".", + "name": "string.delimited.d" + } + ] + }, + "delimited-string": { + "begin": "q\"", + "end": "\"", + "name": "string.delimited.d", + "patterns": [ + { + "include": "#delimited-string-bracket" + }, + { + "include": "#delimited-string-parens" + }, + { + "include": "#delimited-string-angle-brackets" + }, + { + "include": "#delimited-string-braces" + } + ] + }, + "token-string": { + "begin": "q\\{", + "end": "\\}[cdw]?", + "beginCaptures": { + "0": { + "name": "string.quoted.token.d" + } + }, + "endCaptures": { + "0": { + "name": "string.quoted.token.d" + } + }, + "patterns": [ + { + "include": "#token-string-content" + } + ] + }, + "delimited-string-bracket": { + "patterns": [ + { + "begin": "\\[", + "end": "\\]", + "name": "constant.characters.delimited.brackets.d", + "patterns": [ + { + "include": "#wysiwyg-characters" + } + ] + } + ] + }, + "delimited-string-parens": { + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "name": "constant.character.delimited.parens.d", + "patterns": [ + { + "include": "#wysiwyg-characters" + } + ] + } + ] + }, + "delimited-string-angle-brackets": { + "patterns": [ + { + "begin": "<", + "end": ">", + "name": "constant.character.angle-brackets.d", + "patterns": [ + { + "include": "#wysiwyg-characters" + } + ] + } + ] + }, + "delimited-string-braces": { + "patterns": [ + { + "begin": "\\{", + "end": "\\}", + "name": "constant.character.delimited.braces.d", + "patterns": [ + { + "include": "#wysiwyg-characters" + } + ] + } + ] + }, + "wysiwyg-characters": { + "patterns": [ + { + "include": "#character" + }, + { + "include": "#end-of-line" + } + ] + }, + "double-quoted-characters": { + "patterns": [ + { + "include": "#character" + }, + { + "include": "#end-of-line" + }, + { + "include": "#escape-sequence" + } + ] + }, + "escape-sequence": { + "patterns": [ + { + "match": "(\\\\(?:quot|amp|lt|gt|OElig|oelig|Scaron|scaron|Yuml|circ|tilde|ensp|emsp|thinsp|zwnj|zwj|lrm|rlm|ndash|mdash|lsquo|rsquo|sbquo|ldquo|rdquo|bdquo|dagger|Dagger|permil|lsaquo|rsaquo|euro|nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|Aelig|Ccedil|egrave|eacute|ecirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|fnof|Alpha|Beta|Gamma|Delta|Epsilon|Zeta|Eta|Theta|Iota|Kappa|Lambda|Mu|Nu|Xi|Omicron|Pi|Rho|Sigma|Tau|Upsilon|Phi|Chi|Psi|Omega|alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigmaf|sigma|tau|upsilon|phi|chi|psi|omega|thetasym|upsih|piv|bull|hellip|prime|Prime|oline|frasl|weierp|image|real|trade|alefsym|larr|uarr|rarr|darr|harr|crarr|lArr|uArr|rArr|dArr|hArr|forall|part|exist|empty|nabla|isin|notin|ni|prod|sum|minux|lowast|radic|prop|infin|ang|and|or|cap|cup|int|there4|sim|cong|asymp|ne|equiv|le|ge|sub|sup|nsub|sube|supe|oplus|otimes|perp|sdot|lceil|rceil|lfloor|rfloor|loz|spades|clubs|hearts|diams|lang|rang))", + "name": "constant.character.escape-sequence.entity.d" + }, + { + "match": "(\\\\x[0-9a-fA-F_]{2}|\\\\u[0-9a-fA-F_]{4}|\\\\U[0-9a-fA-F_]{8}|\\\\[0-7]{1,3})", + "name": "constant.character.escape-sequence.number.d" + }, + { + "match": "(\\\\t|\\\\'|\\\\\"|\\\\\\?|\\\\0|\\\\a|\\\\b|\\\\f|\\\\n|\\\\r|\\\\v|\\\\\\\\)", + "name": "constant.character.escape-sequence.d" + } + ] + }, + "character-literal": { + "patterns": [ + { + "begin": "'", + "end": "'", + "name": "string.character-literal.d", + "patterns": [ + { + "include": "#character" + }, + { + "include": "#escape-sequence" + } + ] + } + ] + }, + "character": { + "patterns": [ + { + "match": "[\\w\\s]+", + "name": "string.character.d" + } + ] + }, + "end-of-line": { + "patterns": [ + { + "match": "\\n+", + "name": "string.character.end-of-line.d" + } + ] + }, + "identifier-list": { + "patterns": [ + { + "match": ",", + "name": "keyword.other.comma.d" + }, + { + "include": "#identifier" + } + ] + }, + "identifier": { + "patterns": [ + { + "match": "\\b((\\.\\s*)?[_\\w][_\\d\\w]*)(\\s*\\.\\s*[_\\w][_\\d\\w]*)*\\b", + "name": "variable.d" + } + ] + }, + "module-identifier": { + "patterns": [ + { + "match": "([_a-zA-Z][_\\d\\w]*)(\\s*\\.\\s*[_a-zA-Z][_\\d\\w]*)*", + "name": "variable.parameter.module.d" + } + ] + }, + "import-identifier": { + "patterns": [ + { + "match": "([_a-zA-Z][_\\d\\w]*)(\\s*\\.\\s*[_a-zA-Z][_\\d\\w]*)*", + "name": "variable.parameter.import.d" + } + ] + }, + "eof": { + "patterns": [ + { + "begin": "__EOF__", + "beginCaptures": { + "0": { + "name": "comment.block.documentation.eof.start.d" + } + }, + "end": "(?!__NEVER_MATCH__)__NEVER_MATCH__", + "name": "text.eof.d" + } + ] + }, + "comment": { + "patterns": [ + { + "include": "#block-comment" + }, + { + "include": "#line-comment" + }, + { + "include": "#nesting-block-comment" + } + ] + }, + "block-comment": { + "patterns": [ + { + "begin": "/((?!\\*/)\\*)+", + "beginCaptures": { + "0": { + "name": "comment.block.begin.d" + } + }, + "end": "\\*+/", + "endCaptures": { + "0": { + "name": "comment.block.end.d" + } + }, + "name": "comment.block.content.d" + } + ] + }, + "line-comment": { + "patterns": [ + { + "match": "//+.*$", + "name": "comment.line.d" + } + ] + }, + "nesting-block-comment": { + "patterns": [ + { + "begin": "/((?!\\+/)\\+)+", + "beginCaptures": { + "0": { + "name": "comment.block.documentation.begin.d" + } + }, + "end": "\\++/", + "endCaptures": { + "0": { + "name": "comment.block.documentation.end.d" + } + }, + "name": "comment.block.documentation.content.d", + "patterns": [ + { + "include": "#nesting-block-comment" + } + ] + } + ] + }, + "token-string-content": { + "patterns": [ + { + "begin": "{", + "end": "}", + "patterns": [ + { + "include": "#token-string-content" + } + ] + }, + { + "include": "#comment" + }, + { + "include": "#tokens" + } + ] + }, + "tokens": { + "patterns": [ + { + "include": "#string-literal" + }, + { + "include": "#character-literal" + }, + { + "include": "#integer-literal" + }, + { + "include": "#float-literal" + }, + { + "include": "#keyword" + }, + { + "match": "~=|~|>>>|>>=|>>|>=|>|=>|==|=|<>|<=|<<|<|%=|%|#|&=|&&|&|\\$|\\|=|\\|\\||\\||\\+=|\\+\\+|\\+|\\^=|\\^\\^=|\\^\\^|\\^|\\*=|\\*|\\}|\\{|\\]|\\[|\\)|\\(|\\.\\.\\.|\\.\\.|\\.|\\?|\\!>=|\\!>|\\!=|\\!<>=|\\!<>|\\!<=|\\!<|\\!|/=|/|@|:|;|,|-=|--|-", + "name": "meta.lexical.token.symbolic.d" + }, + { + "include": "#identifier" + } + ] + }, + "keyword": { + "patterns": [ + { + "match": "\\babstract\\b", + "name": "keyword.token.abstract.d" + }, + { + "match": "\\balias\\b", + "name": "keyword.token.alias.d" + }, + { + "match": "\\balign\\b", + "name": "keyword.token.align.d" + }, + { + "match": "\\basm\\b", + "name": "keyword.token.asm.d" + }, + { + "match": "\\bassert\\b", + "name": "keyword.token.assert.d" + }, + { + "match": "\\bauto\\b", + "name": "keyword.token.auto.d" + }, + { + "match": "\\bbool\\b", + "name": "keyword.token.bool.d" + }, + { + "match": "\\bbreak\\b", + "name": "keyword.token.break.d" + }, + { + "match": "\\bbyte\\b", + "name": "keyword.token.byte.d" + }, + { + "match": "\\bcase\\b", + "name": "keyword.token.case.d" + }, + { + "match": "\\bcast\\b", + "name": "keyword.token.cast.d" + }, + { + "match": "\\bcatch\\b", + "name": "keyword.token.catch.d" + }, + { + "match": "\\bcdouble\\b", + "name": "keyword.token.cdouble.d" + }, + { + "match": "\\bcent\\b", + "name": "keyword.token.cent.d" + }, + { + "match": "\\bcfloat\\b", + "name": "keyword.token.cfloat.d" + }, + { + "match": "\\bchar\\b", + "name": "keyword.token.char.d" + }, + { + "match": "\\bclass\\b", + "name": "keyword.token.class.d" + }, + { + "match": "\\bconst\\b", + "name": "keyword.token.const.d" + }, + { + "match": "\\bcontinue\\b", + "name": "keyword.token.continue.d" + }, + { + "match": "\\bcreal\\b", + "name": "keyword.token.creal.d" + }, + { + "match": "\\bdchar\\b", + "name": "keyword.token.dchar.d" + }, + { + "match": "\\bdebug\\b", + "name": "keyword.token.debug.d" + }, + { + "match": "\\bdefault\\b", + "name": "keyword.token.default.d" + }, + { + "match": "\\bdelegate\\b", + "name": "keyword.token.delegate.d" + }, + { + "match": "\\bdelete\\b", + "name": "keyword.token.delete.d" + }, + { + "match": "\\bdeprecated\\b", + "name": "keyword.token.deprecated.d" + }, + { + "match": "\\bdo\\b", + "name": "keyword.token.do.d" + }, + { + "match": "\\bdouble\\b", + "name": "keyword.token.double.d" + }, + { + "match": "\\belse\\b", + "name": "keyword.token.else.d" + }, + { + "match": "\\benum\\b", + "name": "keyword.token.enum.d" + }, + { + "match": "\\bexport\\b", + "name": "keyword.token.export.d" + }, + { + "match": "\\bextern\\b", + "name": "keyword.token.extern.d" + }, + { + "match": "\\bfalse\\b", + "name": "constant.language.boolean.false.d" + }, + { + "match": "\\bfinal\\b", + "name": "keyword.token.final.d" + }, + { + "match": "\\bfinally\\b", + "name": "keyword.token.finally.d" + }, + { + "match": "\\bfloat\\b", + "name": "keyword.token.float.d" + }, + { + "match": "\\bfor\\b", + "name": "keyword.token.for.d" + }, + { + "match": "\\bforeach\\b", + "name": "keyword.token.foreach.d" + }, + { + "match": "\\bforeach_reverse\\b", + "name": "keyword.token.foreach_reverse.d" + }, + { + "match": "\\bfunction\\b", + "name": "keyword.token.function.d" + }, + { + "match": "\\bgoto\\b", + "name": "keyword.token.goto.d" + }, + { + "match": "\\bidouble\\b", + "name": "keyword.token.idouble.d" + }, + { + "match": "\\bif\\b", + "name": "keyword.token.if.d" + }, + { + "match": "\\bifloat\\b", + "name": "keyword.token.ifloat.d" + }, + { + "match": "\\bimmutable\\b", + "name": "keyword.token.immutable.d" + }, + { + "match": "\\bimport\\b", + "name": "keyword.token.import.d" + }, + { + "match": "\\bin\\b", + "name": "keyword.token.in.d" + }, + { + "match": "\\binout\\b", + "name": "keyword.token.inout.d" + }, + { + "match": "\\bint\\b", + "name": "keyword.token.int.d" + }, + { + "match": "\\binterface\\b", + "name": "keyword.token.interface.d" + }, + { + "match": "\\binvariant\\b", + "name": "keyword.token.invariant.d" + }, + { + "match": "\\bireal\\b", + "name": "keyword.token.ireal.d" + }, + { + "match": "\\bis\\b", + "name": "keyword.token.is.d" + }, + { + "match": "\\blazy\\b", + "name": "keyword.token.lazy.d" + }, + { + "match": "\\blong\\b", + "name": "keyword.token.long.d" + }, + { + "match": "\\bmacro\\b", + "name": "keyword.token.macro.d" + }, + { + "match": "\\bmixin\\b", + "name": "keyword.token.mixin.d" + }, + { + "match": "\\bmodule\\b", + "name": "keyword.token.module.d" + }, + { + "match": "\\bnew\\b", + "name": "keyword.token.new.d" + }, + { + "match": "\\bnothrow\\b", + "name": "keyword.token.nothrow.d" + }, + { + "match": "\\bnull\\b", + "name": "constant.language.null.d" + }, + { + "match": "\\bout\\b", + "name": "keyword.token.out.d" + }, + { + "match": "\\boverride\\b", + "name": "keyword.token.override.d" + }, + { + "match": "\\bpackage\\b", + "name": "keyword.token.package.d" + }, + { + "match": "\\bpragma\\b", + "name": "keyword.token.pragma.d" + }, + { + "match": "\\bprivate\\b", + "name": "keyword.token.private.d" + }, + { + "match": "\\bprotected\\b", + "name": "keyword.token.protected.d" + }, + { + "match": "\\bpublic\\b", + "name": "keyword.token.public.d" + }, + { + "match": "\\bpure\\b", + "name": "keyword.token.pure.d" + }, + { + "match": "\\breal\\b", + "name": "keyword.token.real.d" + }, + { + "match": "\\bref\\b", + "name": "keyword.token.ref.d" + }, + { + "match": "\\breturn\\b", + "name": "keyword.token.return.d" + }, + { + "match": "\\bscope\\b", + "name": "keyword.token.scope.d" + }, + { + "match": "\\bshared\\b", + "name": "keyword.token.shared.d" + }, + { + "match": "\\bshort\\b", + "name": "keyword.token.short.d" + }, + { + "match": "\\bstatic\\b", + "name": "keyword.token.static.d" + }, + { + "match": "\\bstruct\\b", + "name": "keyword.token.struct.d" + }, + { + "match": "\\bsuper\\b", + "name": "keyword.token.super.d" + }, + { + "match": "\\bswitch\\b", + "name": "keyword.token.switch.d" + }, + { + "match": "\\bsynchronized\\b", + "name": "keyword.token.synchronized.d" + }, + { + "match": "\\btemplate\\b", + "name": "keyword.token.template.d" + }, + { + "match": "\\bthis\\b", + "name": "keyword.token.this.d" + }, + { + "match": "\\bthrow\\b", + "name": "keyword.token.throw.d" + }, + { + "match": "\\btrue\\b", + "name": "constant.language.boolean.true.d" + }, + { + "match": "\\btry\\b", + "name": "keyword.token.try.d" + }, + { + "match": "\\btypedef\\b", + "name": "keyword.token.typedef.d" + }, + { + "match": "\\btypeid\\b", + "name": "keyword.token.typeid.d" + }, + { + "match": "\\btypeof\\b", + "name": "keyword.token.typeof.d" + }, + { + "match": "\\bubyte\\b", + "name": "keyword.token.ubyte.d" + }, + { + "match": "\\bucent\\b", + "name": "keyword.token.ucent.d" + }, + { + "match": "\\buint\\b", + "name": "keyword.token.uint.d" + }, + { + "match": "\\bulong\\b", + "name": "keyword.token.ulong.d" + }, + { + "match": "\\bunion\\b", + "name": "keyword.token.union.d" + }, + { + "match": "\\bunittest\\b", + "name": "keyword.token.unittest.d" + }, + { + "match": "\\bushort\\b", + "name": "keyword.token.ushort.d" + }, + { + "match": "\\bversion\\b", + "name": "keyword.token.version.d" + }, + { + "match": "\\bvoid\\b", + "name": "keyword.token.void.d" + }, + { + "match": "\\bvolatile\\b", + "name": "keyword.token.volatile.d" + }, + { + "match": "\\bwchar\\b", + "name": "keyword.token.wchar.d" + }, + { + "match": "\\bwhile\\b", + "name": "keyword.token.while.d" + }, + { + "match": "\\bwith\\b", + "name": "keyword.token.with.d" + }, + { + "match": "\\b__FILE__\\b", + "name": "keyword.token.__FILE__.d" + }, + { + "match": "\\b__MODULE__\\b", + "name": "keyword.token.__MODULE__.d" + }, + { + "match": "\\b__LINE__\\b", + "name": "keyword.token.__LINE__.d" + }, + { + "match": "\\b__FUNCTION__\\b", + "name": "keyword.token.__FUNCTION__.d" + }, + { + "match": "\\b__PRETTY_FUNCTION__\\b", + "name": "keyword.token.__PRETTY_FUNCTION__.d" + }, + { + "match": "\\b__gshared\\b", + "name": "keyword.token.__gshared.d" + }, + { + "match": "\\b__traits\\b", + "name": "keyword.token.__traits.d" + }, + { + "match": "\\b__vector\\b", + "name": "keyword.token.__vector.d" + }, + { + "match": "\\b__parameters\\b", + "name": "keyword.token.__parameters.d" + } + ] + }, + "special-token-sequence": { + "patterns": [ + { + "match": "#\\s*line.*", + "name": "gfm.markup.italic.special-token-sequence.d" + } + ] + }, + "special-tokens": { + "patterns": [ + { + "match": "\\b(__DATE__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__)\\b", + "name": "gfm.markup.raw.special-tokens.d" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/dart.tmLanguage.json b/src/lib/shiki/languages/dart.tmLanguage.json new file mode 100644 index 0000000..f11ea1c --- /dev/null +++ b/src/lib/shiki/languages/dart.tmLanguage.json @@ -0,0 +1,528 @@ +{ + "name": "dart", + "version": "1.2.2", + "fileTypes": ["dart"], + "scopeName": "source.dart", + "foldingStartMarker": "\\{\\s*$", + "foldingStopMarker": "^\\s*\\}", + "patterns": [ + { + "name": "meta.preprocessor.script.dart", + "match": "^(#!.*)$" + }, + { + "name": "meta.declaration.dart", + "begin": "^\\w*\\b(library|import|part of|part|export)\\b", + "beginCaptures": { + "0": { + "name": "keyword.other.import.dart" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.terminator.dart" + } + }, + "patterns": [ + { + "include": "#strings" + }, + { + "include": "#comments" + }, + { + "name": "keyword.other.import.dart", + "match": "\\b(as|show|hide)\\b" + }, + { + "name": "keyword.control.dart", + "match": "\\b(if)\\b" + } + ] + }, + { + "include": "#comments" + }, + { + "include": "#punctuation" + }, + { + "include": "#annotations" + }, + { + "include": "#keywords" + }, + { + "include": "#constants-and-special-vars" + }, + { + "include": "#operators" + }, + { + "include": "#strings" + } + ], + "repository": { + "dartdoc": { + "patterns": [ + { + "match": "(\\[.*?\\])", + "captures": { + "0": { + "name": "variable.name.source.dart" + } + } + }, + { + "match": "^ {4,}(?![ \\*]).*", + "captures": { + "0": { + "name": "variable.name.source.dart" + } + } + }, + { + "contentName": "variable.other.source.dart", + "begin": "```.*?$", + "end": "```" + }, + { + "match": "(`.*?`)", + "captures": { + "0": { + "name": "variable.other.source.dart" + } + } + }, + { + "match": "(`.*?`)", + "captures": { + "0": { + "name": "variable.other.source.dart" + } + } + }, + { + "match": "(\\* (( ).*))$", + "captures": { + "2": { + "name": "variable.other.source.dart" + } + } + } + ] + }, + "comments": { + "patterns": [ + { + "name": "comment.block.empty.dart", + "match": "/\\*\\*/", + "captures": { + "0": { + "name": "punctuation.definition.comment.dart" + } + } + }, + { + "include": "#comments-doc-oldschool" + }, + { + "include": "#comments-doc" + }, + { + "include": "#comments-inline" + } + ] + }, + "comments-doc-oldschool": { + "patterns": [ + { + "name": "comment.block.documentation.dart", + "begin": "/\\*\\*", + "end": "\\*/", + "patterns": [ + { + "include": "#comments-doc-oldschool" + }, + { + "include": "#comments-block" + }, + { + "include": "#dartdoc" + } + ] + } + ] + }, + "comments-doc": { + "patterns": [ + { + "name": "comment.block.documentation.dart", + "begin": "///", + "while": "^\\s*///", + "patterns": [ + { + "include": "#dartdoc" + } + ] + } + ] + }, + "comments-inline": { + "patterns": [ + { + "include": "#comments-block" + }, + { + "match": "((//).*)$", + "captures": { + "1": { + "name": "comment.line.double-slash.dart" + } + } + } + ] + }, + "comments-block": { + "patterns": [ + { + "name": "comment.block.dart", + "begin": "/\\*", + "end": "\\*/", + "patterns": [ + { + "include": "#comments-block" + } + ] + } + ] + }, + "annotations": { + "patterns": [ + { + "name": "storage.type.annotation.dart", + "match": "@[a-zA-Z]+" + } + ] + }, + "constants-and-special-vars": { + "patterns": [ + { + "name": "constant.language.dart", + "match": "(??]|,\\s*|\\s+extends\\s+)+>)?[!?]?\\(", + "captures": { + "1": { + "name": "entity.name.function.dart" + }, + "2": { + "patterns": [ + { + "include": "#type-args" + } + ] + } + } + } + ] + }, + "type-args": { + "begin": "(<)", + "end": "(>)", + "beginCaptures": { + "1": { + "name": "other.source.dart" + } + }, + "endCaptures": { + "1": { + "name": "other.source.dart" + } + }, + "patterns": [ + { + "include": "#class-identifier" + }, + { + "match": "," + }, + { + "name": "keyword.declaration.dart", + "match": "extends" + }, + { + "include": "#comments" + } + ] + }, + "keywords": { + "patterns": [ + { + "name": "keyword.cast.dart", + "match": "(?>>?|~|\\^|\\||&)" + }, + { + "name": "keyword.operator.assignment.bitwise.dart", + "match": "((&|\\^|\\||<<|>>>?)=)" + }, + { + "name": "keyword.operator.closure.dart", + "match": "(=>)" + }, + { + "name": "keyword.operator.comparison.dart", + "match": "(==|!=|<=?|>=?)" + }, + { + "name": "keyword.operator.assignment.arithmetic.dart", + "match": "(([+*/%-]|\\~)=)" + }, + { + "name": "keyword.operator.assignment.dart", + "match": "(=)" + }, + { + "name": "keyword.operator.increment-decrement.dart", + "match": "(\\-\\-|\\+\\+)" + }, + { + "name": "keyword.operator.arithmetic.dart", + "match": "(\\-|\\+|\\*|\\/|\\~\\/|%)" + }, + { + "name": "keyword.operator.logical.dart", + "match": "(!|&&|\\|\\|)" + } + ] + }, + "string-interp": { + "patterns": [ + { + "match": "\\$([a-zA-Z0-9_]+)", + "captures": { + "1": { + "name": "variable.parameter.dart" + } + } + }, + { + "name": "string.interpolated.expression.dart", + "begin": "\\$\\{", + "end": "\\}", + "patterns": [ + { + "include": "#constants-and-special-vars", + "name": "variable.parameter.dart" + }, + { + "include": "#strings" + }, + { + "name": "variable.parameter.dart", + "match": "[a-zA-Z0-9_]+" + } + ] + }, + { + "name": "constant.character.escape.dart", + "match": "\\\\." + } + ] + }, + "strings": { + "patterns": [ + { + "name": "string.interpolated.triple.double.dart", + "begin": "(? | < | >= | <= | =(?!==)\n" + }, + { + "name": "keyword.operator.logical.dax", + "match": "(?x)\n && | IN | NOT | \\|\\|" + }, + { + "name": "keyword.arithmetic.operator.dax", + "match": "(?x)\n \\+ | \\- | \\* | \\/ \n" + }, + { + "begin": "\\[", + "end": "\\]", + "name": "support.function.dax" + }, + { + "begin": "\"", + "end": "\"", + "name": "string.quoted.double.dax" + }, + { + "begin": "\\'", + "end": "\\'", + "name": "support.class.dax" + } + ] + }, + "strings": { + "name": "string.quoted.double.dax", + "begin": "\"", + "end": "\"", + "patterns": [ + { + "name": "constant.character.escape.dax", + "match": "\\\\." + } + ] + }, + "metas": { + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.dax" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.dax" + } + } + } + ] + } + }, + "scopeName": "source.dax" +} diff --git a/src/lib/shiki/languages/diff.tmLanguage.json b/src/lib/shiki/languages/diff.tmLanguage.json new file mode 100644 index 0000000..a7bddb7 --- /dev/null +++ b/src/lib/shiki/languages/diff.tmLanguage.json @@ -0,0 +1,160 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/diff.tmbundle/blob/master/Syntaxes/Diff.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/textmate/diff.tmbundle/commit/0593bb775eab1824af97ef2172fd38822abd97d7", + "name": "diff", + "scopeName": "source.diff", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.separator.diff" + } + }, + "match": "^((\\*{15})|(={67})|(-{3}))$\\n?", + "name": "meta.separator.diff" + }, + { + "match": "^\\d+(,\\d+)*(a|d|c)\\d+(,\\d+)*$\\n?", + "name": "meta.diff.range.normal" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.range.diff" + }, + "2": { + "name": "meta.toc-list.line-number.diff" + }, + "3": { + "name": "punctuation.definition.range.diff" + } + }, + "match": "^(@@)\\s*(.+?)\\s*(@@)($\\n?)?", + "name": "meta.diff.range.unified" + }, + { + "captures": { + "3": { + "name": "punctuation.definition.range.diff" + }, + "4": { + "name": "punctuation.definition.range.diff" + }, + "6": { + "name": "punctuation.definition.range.diff" + }, + "7": { + "name": "punctuation.definition.range.diff" + } + }, + "match": "^(((\\-{3}) .+ (\\-{4}))|((\\*{3}) .+ (\\*{4})))$\\n?", + "name": "meta.diff.range.context" + }, + { + "match": "^diff --git a/.*$\\n?", + "name": "meta.diff.header.git" + }, + { + "match": "^diff (-|\\S+\\s+\\S+).*$\\n?", + "name": "meta.diff.header.command" + }, + { + "captures": { + "4": { + "name": "punctuation.definition.from-file.diff" + }, + "6": { + "name": "punctuation.definition.from-file.diff" + }, + "7": { + "name": "punctuation.definition.from-file.diff" + } + }, + "match": "(^(((-{3}) .+)|((\\*{3}) .+))$\\n?|^(={4}) .+(?= - ))", + "name": "meta.diff.header.from-file" + }, + { + "captures": { + "2": { + "name": "punctuation.definition.to-file.diff" + }, + "3": { + "name": "punctuation.definition.to-file.diff" + }, + "4": { + "name": "punctuation.definition.to-file.diff" + } + }, + "match": "(^(\\+{3}) .+$\\n?| (-) .* (={4})$\\n?)", + "name": "meta.diff.header.to-file" + }, + { + "captures": { + "3": { + "name": "punctuation.definition.inserted.diff" + }, + "6": { + "name": "punctuation.definition.inserted.diff" + } + }, + "match": "^(((>)( .*)?)|((\\+).*))$\\n?", + "name": "markup.inserted.diff" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.changed.diff" + } + }, + "match": "^(!).*$\\n?", + "name": "markup.changed.diff" + }, + { + "captures": { + "3": { + "name": "punctuation.definition.deleted.diff" + }, + "6": { + "name": "punctuation.definition.deleted.diff" + } + }, + "match": "^(((<)( .*)?)|((-).*))$\\n?", + "name": "markup.deleted.diff" + }, + { + "begin": "^(#)", + "captures": { + "1": { + "name": "punctuation.definition.comment.diff" + } + }, + "comment": "Git produces unified diffs with embedded comments\"", + "end": "\\n", + "name": "comment.line.number-sign.diff" + }, + { + "match": "^index [0-9a-f]{7,40}\\.\\.[0-9a-f]{7,40}.*$\\n?", + "name": "meta.diff.index.git" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.key-value.diff" + }, + "2": { + "name": "meta.toc-list.file-name.diff" + } + }, + "match": "^Index(:) (.+)$\\n?", + "name": "meta.diff.index" + }, + { + "match": "^Only in .*: .*$\\n?", + "name": "meta.diff.only-in" + } + ] +} diff --git a/src/lib/shiki/languages/docker.tmLanguage.json b/src/lib/shiki/languages/docker.tmLanguage.json new file mode 100644 index 0000000..9599f0f --- /dev/null +++ b/src/lib/shiki/languages/docker.tmLanguage.json @@ -0,0 +1,102 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/moby/moby/blob/master/contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/moby/moby/commit/abd39744c6f3ed854500e423f5fabf952165161f", + "name": "docker", + "scopeName": "source.dockerfile", + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.other.special-method.dockerfile" + }, + "2": { + "name": "keyword.other.special-method.dockerfile" + } + }, + "match": "^\\s*\\b(?i:(FROM))\\b.*?\\b(?i:(AS))\\b" + }, + { + "captures": { + "1": { + "name": "keyword.control.dockerfile" + }, + "2": { + "name": "keyword.other.special-method.dockerfile" + } + }, + "match": "^\\s*(?i:(ONBUILD)\\s+)?(?i:(ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR))\\s" + }, + { + "captures": { + "1": { + "name": "keyword.operator.dockerfile" + }, + "2": { + "name": "keyword.other.special-method.dockerfile" + } + }, + "match": "^\\s*(?i:(ONBUILD)\\s+)?(?i:(CMD|ENTRYPOINT))\\s" + }, + { + "begin": "\"", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.dockerfile" + } + }, + "end": "\"", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.dockerfile" + } + }, + "name": "string.quoted.double.dockerfile", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escaped.dockerfile" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.dockerfile" + } + }, + "end": "'", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.dockerfile" + } + }, + "name": "string.quoted.single.dockerfile", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escaped.dockerfile" + } + ] + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.comment.leading.dockerfile" + }, + "2": { + "name": "comment.line.number-sign.dockerfile" + }, + "3": { + "name": "punctuation.definition.comment.dockerfile" + } + }, + "comment": "comment.line", + "match": "^(\\s*)((#).*$\\n?)" + } + ] +} diff --git a/src/lib/shiki/languages/dream-maker.tmLanguage.json b/src/lib/shiki/languages/dream-maker.tmLanguage.json new file mode 100644 index 0000000..ccb9db6 --- /dev/null +++ b/src/lib/shiki/languages/dream-maker.tmLanguage.json @@ -0,0 +1,636 @@ +{ + "fileTypes": ["dm", "dme"], + "foldingStartMarker": "(?x)\n/\\*\\*(?!\\*)\n|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))", + "foldingStopMarker": "(?|<)(=)?|\\.|:|/(=)?|~|\\+(\\+|=)?|-(-|=)?|\\*(\\*|=)?|%|>>|<<|=(=)?|!(=)?|<>|&|&&|\\^|\\||\\|\\||\\bto\\b|\\bin\\b|\\bstep\\b)", + "name": "keyword.operator.dm" + }, + { + "match": "\\b([A-Z_][A-Z_0-9]*)\\b", + "name": "constant.language.dm" + }, + { + "match": "\\bnull\\b", + "name": "constant.language.dm" + }, + { + "begin": "{\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.dm" + } + }, + "end": "\"}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.dm" + } + }, + "name": "string.quoted.triple.dm", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_embedded_expression" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.dm" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.dm" + } + }, + "name": "string.quoted.double.dm", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_embedded_expression" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.dm" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.dm" + } + }, + "name": "string.quoted.single.dm", + "patterns": [ + { + "include": "#string_escaped_char" + } + ] + }, + { + "begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+ # define\n((?[a-zA-Z_][a-zA-Z0-9_]*)) # macro name\n(?:\n\t(\\()\n\t\t(\n\t\t\t\\s* \\g \\s* # first argument\n\t\t\t((,) \\s* \\g \\s*)* # additional arguments\n\t\t\t(?:\\.\\.\\.)? # varargs ellipsis?\n\t\t)\n\t(\\))\n)", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.define.dm" + }, + "2": { + "name": "punctuation.definition.directive.dm" + }, + "3": { + "name": "entity.name.function.preprocessor.dm" + }, + "5": { + "name": "punctuation.definition.parameters.begin.dm" + }, + "6": { + "name": "variable.parameter.preprocessor.dm" + }, + "8": { + "name": "punctuation.separator.parameters.dm" + }, + "9": { + "name": "punctuation.definition.parameters.end.dm" + } + }, + "end": "(?=(?://|/\\*))|(?[a-zA-Z_][a-zA-Z0-9_]*)) # macro name", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.define.dm" + }, + "2": { + "name": "punctuation.definition.directive.dm" + }, + "3": { + "name": "variable.other.preprocessor.dm" + } + }, + "end": "(?=(?://|/\\*))|(?\\\\\\s*\\n)", + "name": "punctuation.separator.continuation.dm" + } + ] + }, + { + "begin": "^\\s*(?:((#)\\s*(?:elif|else|if|ifdef|ifndef))|((#)\\s*(undef|include)))\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.conditional.dm" + }, + "2": { + "name": "punctuation.definition.directive.dm" + }, + "3": { + "name": "keyword.control.directive.$5.dm" + }, + "4": { + "name": "punctuation.definition.directive.dm" + } + }, + "end": "(?=(?://|/\\*))|(?\\\\\\s*\\n)", + "name": "punctuation.separator.continuation.dm" + } + ] + }, + { + "include": "#block" + }, + { + "begin": "(?x)\n\t\t\t\t(?: ^ # begin-of-line\n\t\t\t\t\t|\n\t\t\t\t\t\t (?: (?= \\s ) (?]) # or type modifier before name\n\t\t\t\t\t\t )\n\t\t\t\t)\n\t\t\t\t(\\s*) (?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()\n\t\t\t\t(\n\t\t\t\t\t(?: [A-Za-z_][A-Za-z0-9_]*+ | :: )++ | # actual name\n\t\t\t\t\t(?: (?<=operator) (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) ) # if it is a C++ operator\n\t\t\t\t)\n\t\t\t\t \\s*(?=\\()", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.function.leading.dm" + }, + "3": { + "name": "entity.name.function.dm" + }, + "4": { + "name": "punctuation.definition.parameters.dm" + } + }, + "end": "(?<=\\})|(?=#)|(;)?", + "name": "meta.function.dm", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#parens" + }, + { + "match": "\\bconst\\b", + "name": "storage.modifier.dm" + }, + { + "include": "#block" + } + ] + } + ], + "repository": { + "access": { + "match": "\\.[a-zA-Z_][a-zA-Z_0-9]*\\b(?!\\s*\\()", + "name": "variable.other.dot-access.dm" + }, + "block": { + "begin": "\\{", + "end": "\\}", + "name": "meta.block.dm", + "patterns": [ + { + "include": "#block_innards" + } + ] + }, + "block_innards": { + "patterns": [ + { + "include": "#preprocessor-rule-enabled-block" + }, + { + "include": "#preprocessor-rule-disabled-block" + }, + { + "include": "#preprocessor-rule-other-block" + }, + { + "include": "#access" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.function-call.leading.dm" + }, + "2": { + "name": "support.function.any-method.dm" + }, + "3": { + "name": "punctuation.definition.parameters.dm" + } + }, + "match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?\\\\\\s*\\n)", + "name": "punctuation.separator.continuation.dm" + } + ] + } + ] + }, + "disabled": { + "begin": "^\\s*#\\s*if(n?def)?\\b.*$", + "comment": "eat nested preprocessor if(def)s", + "end": "^\\s*#\\s*endif\\b.*$", + "patterns": [ + { + "include": "#disabled" + } + ] + }, + "parens": { + "begin": "\\(", + "end": "\\)", + "name": "meta.parens.dm", + "patterns": [ + { + "include": "$base" + } + ] + }, + "preprocessor-rule-disabled": { + "begin": "^\\s*(#(if)\\s+(0)\\b).*", + "captures": { + "1": { + "name": "meta.preprocessor.dm" + }, + "2": { + "name": "keyword.control.import.if.dm" + }, + "3": { + "name": "constant.numeric.preprocessor.dm" + } + }, + "end": "^\\s*(#\\s*(endif)\\b)", + "patterns": [ + { + "begin": "^\\s*(#\\s*(else)\\b)", + "captures": { + "1": { + "name": "meta.preprocessor.dm" + }, + "2": { + "name": "keyword.control.import.else.dm" + } + }, + "end": "(?=^\\s*#\\s*endif\\b.*$)", + "patterns": [ + { + "include": "$base" + } + ] + }, + { + "begin": "", + "end": "(?=^\\s*#\\s*(else|endif)\\b.*$)", + "name": "comment.block.preprocessor.if-branch", + "patterns": [ + { + "include": "#disabled" + } + ] + } + ] + }, + "preprocessor-rule-disabled-block": { + "begin": "^\\s*(#(if)\\s+(0)\\b).*", + "captures": { + "1": { + "name": "meta.preprocessor.dm" + }, + "2": { + "name": "keyword.control.import.if.dm" + }, + "3": { + "name": "constant.numeric.preprocessor.dm" + } + }, + "end": "^\\s*(#\\s*(endif)\\b)", + "patterns": [ + { + "begin": "^\\s*(#\\s*(else)\\b)", + "captures": { + "1": { + "name": "meta.preprocessor.dm" + }, + "2": { + "name": "keyword.control.import.else.dm" + } + }, + "end": "(?=^\\s*#\\s*endif\\b.*$)", + "patterns": [ + { + "include": "#block_innards" + } + ] + }, + { + "begin": "", + "end": "(?=^\\s*#\\s*(else|endif)\\b.*$)", + "name": "comment.block.preprocessor.if-branch.in-block", + "patterns": [ + { + "include": "#disabled" + } + ] + } + ] + }, + "preprocessor-rule-enabled": { + "begin": "^\\s*(#(if)\\s+(0*1)\\b)", + "captures": { + "1": { + "name": "meta.preprocessor.dm" + }, + "2": { + "name": "keyword.control.import.if.dm" + }, + "3": { + "name": "constant.numeric.preprocessor.dm" + } + }, + "end": "^\\s*(#\\s*(endif)\\b)", + "patterns": [ + { + "begin": "^\\s*(#\\s*(else)\\b).*", + "captures": { + "1": { + "name": "meta.preprocessor.dm" + }, + "2": { + "name": "keyword.control.import.else.dm" + } + }, + "contentName": "comment.block.preprocessor.else-branch", + "end": "(?=^\\s*#\\s*endif\\b.*$)", + "patterns": [ + { + "include": "#disabled" + } + ] + }, + { + "begin": "", + "end": "(?=^\\s*#\\s*(else|endif)\\b.*$)", + "patterns": [ + { + "include": "$base" + } + ] + } + ] + }, + "preprocessor-rule-enabled-block": { + "begin": "^\\s*(#(if)\\s+(0*1)\\b)", + "captures": { + "1": { + "name": "meta.preprocessor.dm" + }, + "2": { + "name": "keyword.control.import.if.dm" + }, + "3": { + "name": "constant.numeric.preprocessor.dm" + } + }, + "end": "^\\s*(#\\s*(endif)\\b)", + "patterns": [ + { + "begin": "^\\s*(#\\s*(else)\\b).*", + "captures": { + "1": { + "name": "meta.preprocessor.dm" + }, + "2": { + "name": "keyword.control.import.else.dm" + } + }, + "contentName": "comment.block.preprocessor.else-branch.in-block", + "end": "(?=^\\s*#\\s*endif\\b.*$)", + "patterns": [ + { + "include": "#disabled" + } + ] + }, + { + "begin": "", + "end": "(?=^\\s*#\\s*(else|endif)\\b.*$)", + "patterns": [ + { + "include": "#block_innards" + } + ] + } + ] + }, + "preprocessor-rule-other": { + "begin": "^\\s*((#\\s*(if(n?def)?))\\b.*?(?:(?=(?://|/\\*))|$))", + "captures": { + "1": { + "name": "meta.preprocessor.dm" + }, + "2": { + "name": "keyword.control.import.dm" + } + }, + "end": "^\\s*((#\\s*(endif))\\b).*$", + "patterns": [ + { + "include": "$base" + } + ] + }, + "preprocessor-rule-other-block": { + "begin": "^\\s*(#\\s*(if(n?def)?)\\b.*?(?:(?=(?://|/\\*))|$))", + "captures": { + "1": { + "name": "meta.preprocessor.dm" + }, + "2": { + "name": "keyword.control.import.dm" + } + }, + "end": "^\\s*(#\\s*(endif)\\b).*$", + "patterns": [ + { + "include": "#block_innards" + } + ] + }, + "string_embedded_expression": { + "patterns": [ + { + "begin": "(?\"n\\n \\[]\n)", + "name": "constant.character.escape.dm" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unknown-escape.dm" + } + ] + } + }, + "scopeName": "source.dm" +} diff --git a/src/lib/shiki/languages/elixir.tmLanguage.json b/src/lib/shiki/languages/elixir.tmLanguage.json new file mode 100644 index 0000000..2e4291a --- /dev/null +++ b/src/lib/shiki/languages/elixir.tmLanguage.json @@ -0,0 +1,1013 @@ +{ + "comment": "Textmate bundle for Elixir Programming Language.", + "fileTypes": ["ex", "exs"], + "firstLineMatch": "^#!/.*\\belixir", + "foldingStartMarker": "(after|else|catch|rescue|\\-\\>|\\{|\\[|do)\\s*$", + "foldingStopMarker": "^\\s*((\\}|\\]|after|else|catch|rescue)\\s*$|end\\b)", + "keyEquivalent": "^~E", + "name": "elixir", + "patterns": [ + { + "begin": "\\b(fn)\\b(?!.*->)", + "beginCaptures": { + "1": { + "name": "keyword.control.elixir" + } + }, + "end": "$", + "patterns": [ + { + "include": "#core_syntax" + } + ] + }, + { + "captures": { + "1": { + "name": "entity.name.type.class.elixir" + }, + "2": { + "name": "punctuation.separator.method.elixir" + }, + "3": { + "name": "entity.name.function.elixir" + } + }, + "match": "([A-Z]\\w+)\\s*(\\.)\\s*([a-z_]\\w*[!?]?)" + }, + { + "captures": { + "1": { + "name": "constant.other.symbol.elixir" + }, + "2": { + "name": "punctuation.separator.method.elixir" + }, + "3": { + "name": "entity.name.function.elixir" + } + }, + "match": "(\\:\\w+)\\s*(\\.)\\s*([_]?\\w*[!?]?)" + }, + { + "captures": { + "1": { + "name": "keyword.operator.other.elixir" + }, + "2": { + "name": "entity.name.function.elixir" + } + }, + "match": "(\\|\\>)\\s*([a-z_]\\w*[!?]?)" + }, + { + "match": "\\b[a-z_]\\w*[!?]?(?=\\s*\\.?\\s*\\()", + "name": "entity.name.function.elixir" + }, + { + "begin": "\\b(fn)\\b(?=.*->)", + "beginCaptures": { + "1": { + "name": "keyword.control.elixir" + } + }, + "end": "(?>(->)|(when)|(\\)))", + "endCaptures": { + "1": { + "name": "keyword.operator.other.elixir" + }, + "2": { + "name": "keyword.control.elixir" + }, + "3": { + "name": "punctuation.section.function.elixir" + } + }, + "patterns": [ + { + "include": "#core_syntax" + } + ] + }, + { + "include": "#core_syntax" + }, + { + "begin": "^(?=.*->)((?![^\"']*(\"|')[^\"']*->)|(?=.*->[^\"']*(\"|')[^\"']*->))((?!.*\\([^\\)]*->)|(?=[^\\(\\)]*->)|(?=\\s*\\(.*\\).*->))((?!.*\\b(fn)\\b)|(?=.*->.*\\bfn\\b))", + "beginCaptures": { + "1": { + "name": "keyword.control.elixir" + } + }, + "end": "(?>(->)|(when)|(\\)))", + "endCaptures": { + "1": { + "name": "keyword.operator.other.elixir" + }, + "2": { + "name": "keyword.control.elixir" + }, + "3": { + "name": "punctuation.section.function.elixir" + } + }, + "patterns": [ + { + "include": "#core_syntax" + } + ] + } + ], + "repository": { + "core_syntax": { + "patterns": [ + { + "begin": "^\\s*(defmodule)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.module.elixir" + } + }, + "end": "\\b(do)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.module.elixir" + } + }, + "name": "meta.module.elixir", + "patterns": [ + { + "match": "\\b[A-Z]\\w*(?=\\.)", + "name": "entity.other.inherited-class.elixir" + }, + { + "match": "\\b[A-Z]\\w*\\b", + "name": "entity.name.type.class.elixir" + } + ] + }, + { + "begin": "^\\s*(defprotocol)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.protocol.elixir" + } + }, + "end": "\\b(do)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.protocol.elixir" + } + }, + "name": "meta.protocol_declaration.elixir", + "patterns": [ + { + "match": "\\b[A-Z]\\w*\\b", + "name": "entity.name.type.protocol.elixir" + } + ] + }, + { + "begin": "^\\s*(defimpl)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.protocol.elixir" + } + }, + "end": "\\b(do)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.protocol.elixir" + } + }, + "name": "meta.protocol_implementation.elixir", + "patterns": [ + { + "match": "\\b[A-Z]\\w*\\b", + "name": "entity.name.type.protocol.elixir" + } + ] + }, + { + "begin": "^\\s*(def|defmacro|defdelegate|defguard)\\s+((?>[a-zA-Z_]\\w*(?>\\.|::))?(?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))?|===?|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?))((\\()|\\s*)", + "beginCaptures": { + "1": { + "name": "keyword.control.module.elixir" + }, + "2": { + "name": "entity.name.function.public.elixir" + }, + "4": { + "name": "punctuation.section.function.elixir" + } + }, + "end": "(\\bdo:)|(\\bdo\\b)|(?=\\s+(def|defn|defmacro|defdelegate|defguard)\\b)", + "endCaptures": { + "1": { + "name": "constant.other.keywords.elixir" + }, + "2": { + "name": "keyword.control.module.elixir" + } + }, + "name": "meta.function.public.elixir", + "patterns": [ + { + "include": "$self" + }, + { + "begin": "\\s(\\\\\\\\)", + "beginCaptures": { + "1": { + "name": "keyword.operator.other.elixir" + } + }, + "end": ",|\\)|$", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "match": "\\b(is_atom|is_binary|is_bitstring|is_boolean|is_float|is_function|is_integer|is_list|is_map|is_nil|is_number|is_pid|is_port|is_record|is_reference|is_tuple|is_exception|abs|bit_size|byte_size|div|elem|hd|length|map_size|node|rem|round|tl|trunc|tuple_size)\\b", + "name": "keyword.control.elixir" + } + ] + }, + { + "begin": "^\\s*(defp|defnp|defmacrop|defguardp)\\s+((?>[a-zA-Z_]\\w*(?>\\.|::))?(?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))?|===?|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?))((\\()|\\s*)", + "beginCaptures": { + "1": { + "name": "keyword.control.module.elixir" + }, + "2": { + "name": "entity.name.function.private.elixir" + }, + "4": { + "name": "punctuation.section.function.elixir" + } + }, + "end": "(\\bdo:)|(\\bdo\\b)|(?=\\s+(defp|defmacrop|defguardp)\\b)", + "endCaptures": { + "1": { + "name": "constant.other.keywords.elixir" + }, + "2": { + "name": "keyword.control.module.elixir" + } + }, + "name": "meta.function.private.elixir", + "patterns": [ + { + "include": "$self" + }, + { + "begin": "\\s(\\\\\\\\)", + "beginCaptures": { + "1": { + "name": "keyword.operator.other.elixir" + } + }, + "end": ",|\\)|$", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "match": "\\b(is_atom|is_binary|is_bitstring|is_boolean|is_float|is_function|is_integer|is_list|is_map|is_nil|is_number|is_pid|is_port|is_record|is_reference|is_tuple|is_exception|abs|bit_size|byte_size|div|elem|hd|length|map_size|node|rem|round|tl|trunc|tuple_size)\\b", + "name": "keyword.control.elixir" + } + ] + }, + { + "begin": "\\s*~L\"\"\"", + "comment": "Leex Sigil", + "end": "\\s*\"\"\"", + "name": "sigil.leex", + "patterns": [ + { + "include": "text.elixir" + }, + { + "include": "text.html.basic" + } + ] + }, + { + "begin": "\\s*~H\"\"\"", + "comment": "HEEx Sigil", + "end": "\\s*\"\"\"", + "name": "sigil.heex", + "patterns": [ + { + "include": "text.elixir" + }, + { + "include": "text.html.basic" + } + ] + }, + { + "begin": "@(module|type)?doc (~[a-z])?\"\"\"", + "comment": "@doc with heredocs is treated as documentation", + "end": "\\s*\"\"\"", + "name": "comment.block.documentation.heredoc", + "patterns": [ + { + "include": "#interpolated_elixir" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "@(module|type)?doc ~[A-Z]\"\"\"", + "comment": "@doc with heredocs is treated as documentation", + "end": "\\s*\"\"\"", + "name": "comment.block.documentation.heredoc" + }, + { + "begin": "@(module|type)?doc (~[a-z])?'''", + "comment": "@doc with heredocs is treated as documentation", + "end": "\\s*'''", + "name": "comment.block.documentation.heredoc", + "patterns": [ + { + "include": "#interpolated_elixir" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "@(module|type)?doc ~[A-Z]'''", + "comment": "@doc with heredocs is treated as documentation", + "end": "\\s*'''", + "name": "comment.block.documentation.heredoc" + }, + { + "comment": "@doc false is treated as documentation", + "match": "@(module|type)?doc false", + "name": "comment.block.documentation.false" + }, + { + "begin": "@(module|type)?doc \"", + "comment": "@doc with string is treated as documentation", + "end": "\"", + "name": "comment.block.documentation.string", + "patterns": [ + { + "include": "#interpolated_elixir" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "match": "(?_?[0-9A-Fa-f])*\\b", + "name": "constant.numeric.hex.elixir" + }, + { + "match": "\\b\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)+)([eE][-+]?\\d(?>_?\\d)*)?\\b", + "name": "constant.numeric.float.elixir" + }, + { + "match": "\\b\\d(?>_?\\d)*\\b", + "name": "constant.numeric.integer.elixir" + }, + { + "match": "\\b0b[01](?>_?[01])*\\b", + "name": "constant.numeric.binary.elixir" + }, + { + "match": "\\b0o[0-7](?>_?[0-7])*\\b", + "name": "constant.numeric.octal.elixir" + }, + { + "begin": ":'", + "captures": { + "0": { + "name": "punctuation.definition.constant.elixir" + } + }, + "end": "'", + "name": "constant.other.symbol.single-quoted.elixir", + "patterns": [ + { + "include": "#interpolated_elixir" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": ":\"", + "captures": { + "0": { + "name": "punctuation.definition.constant.elixir" + } + }, + "end": "\"", + "name": "constant.other.symbol.double-quoted.elixir", + "patterns": [ + { + "include": "#interpolated_elixir" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?>''')", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elixir" + } + }, + "comment": "Single-quoted heredocs", + "end": "^\\s*'''", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elixir" + } + }, + "name": "string.quoted.single.heredoc.elixir", + "patterns": [ + { + "include": "#interpolated_elixir" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elixir" + } + }, + "comment": "single quoted string (allows for interpolation)", + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elixir" + } + }, + "name": "string.quoted.single.elixir", + "patterns": [ + { + "include": "#interpolated_elixir" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?>\"\"\")", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elixir" + } + }, + "comment": "Double-quoted heredocs", + "end": "^\\s*\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elixir" + } + }, + "name": "string.quoted.double.heredoc.elixir", + "patterns": [ + { + "include": "#interpolated_elixir" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elixir" + } + }, + "comment": "double quoted string (allows for interpolation)", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elixir" + } + }, + "name": "string.quoted.double.elixir", + "patterns": [ + { + "include": "#interpolated_elixir" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "~[a-z](?>\"\"\")", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elixir" + } + }, + "comment": "Double-quoted heredocs sigils", + "end": "^\\s*\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elixir" + } + }, + "name": "string.quoted.other.sigil.heredoc.elixir", + "patterns": [ + { + "include": "#interpolated_elixir" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "~[a-z]\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elixir" + } + }, + "comment": "sigil (allow for interpolation)", + "end": "\\}[a-z]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elixir" + } + }, + "name": "string.quoted.other.sigil.elixir", + "patterns": [ + { + "include": "#interpolated_elixir" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "~[a-z]\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elixir" + } + }, + "comment": "sigil (allow for interpolation)", + "end": "\\][a-z]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elixir" + } + }, + "name": "string.quoted.other.sigil.elixir", + "patterns": [ + { + "include": "#interpolated_elixir" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "~[a-z]\\<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elixir" + } + }, + "comment": "sigil (allow for interpolation)", + "end": "\\>[a-z]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elixir" + } + }, + "name": "string.quoted.other.sigil.elixir", + "patterns": [ + { + "include": "#interpolated_elixir" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "~[a-z]\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elixir" + } + }, + "comment": "sigil (allow for interpolation)", + "end": "\\)[a-z]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elixir" + } + }, + "name": "string.quoted.other.sigil.elixir", + "patterns": [ + { + "include": "#interpolated_elixir" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "~[a-z]([^\\w])", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elixir" + } + }, + "comment": "sigil (allow for interpolation)", + "end": "\\1[a-z]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elixir" + } + }, + "name": "string.quoted.other.sigil.elixir", + "patterns": [ + { + "include": "#interpolated_elixir" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "~[A-Z](?>\"\"\")", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elixir" + } + }, + "comment": "Double-quoted heredocs sigils", + "end": "^\\s*\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elixir" + } + }, + "name": "string.quoted.other.sigil.heredoc.literal.elixir" + }, + { + "begin": "~[A-Z]\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elixir" + } + }, + "comment": "sigil (without interpolation)", + "end": "\\}[a-z]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elixir" + } + }, + "name": "string.quoted.other.sigil.literal.elixir" + }, + { + "begin": "~[A-Z]\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elixir" + } + }, + "comment": "sigil (without interpolation)", + "end": "\\][a-z]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elixir" + } + }, + "name": "string.quoted.other.sigil.literal.elixir" + }, + { + "begin": "~[A-Z]\\<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elixir" + } + }, + "comment": "sigil (without interpolation)", + "end": "\\>[a-z]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elixir" + } + }, + "name": "string.quoted.other.sigil.literal.elixir" + }, + { + "begin": "~[A-Z]\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elixir" + } + }, + "comment": "sigil (without interpolation)", + "end": "\\)[a-z]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elixir" + } + }, + "name": "string.quoted.other.sigil.literal.elixir" + }, + { + "begin": "~[A-Z]([^\\w])", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elixir" + } + }, + "comment": "sigil (without interpolation)", + "end": "\\1[a-z]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elixir" + } + }, + "name": "string.quoted.other.sigil.literal.elixir" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.elixir" + } + }, + "comment": "symbols", + "match": "(?[a-zA-Z_][\\w@]*(?>[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|=~|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|\\.\\.//|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(\\^\\^)?)", + "name": "constant.other.symbol.elixir" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.elixir" + } + }, + "comment": "symbols", + "match": "(?>[a-zA-Z_][\\w@]*(?>[?!])?)(:)(?!:)", + "name": "constant.other.keywords.elixir" + }, + { + "begin": "(^[ \\t]+)?(?=##)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.elixir" + } + }, + "end": "(?!#)", + "patterns": [ + { + "begin": "##", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.elixir" + } + }, + "end": "\\n", + "name": "comment.line.section.elixir" + } + ] + }, + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.elixir" + } + }, + "end": "(?!#)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.elixir" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.elixir" + } + ] + }, + { + "match": "\\b_([^_][\\w]+[?!]?)", + "name": "comment.unused.elixir" + }, + { + "match": "\\b_\\b", + "name": "comment.wildcard.elixir" + }, + { + "comment": "\n\t\t\tmatches questionmark-letters.\n\n\t\t\texamples (1st alternation = hex):\n\t\t\t?\\x1 ?\\x61\n\n\t\t\texamples (2rd alternation = escaped):\n\t\t\t?\\n ?\\b\n\n\t\t\texamples (3rd alternation = normal):\n\t\t\t?a ?A ?0\n\t\t\t?* ?\" ?(\n\t\t\t?. ?#\n\n\t\t\tthe negative lookbehind prevents against matching\n\t\t\tp(42.tainted?)\n\t\t\t", + "match": "(?", + "name": "keyword.operator.concatenation.elixir" + }, + { + "match": "\\|\\>|<~>|<>|<<<|>>>|~>>|<<~|~>|<~|<\\|>", + "name": "keyword.operator.sigils_1.elixir" + }, + { + "match": "&&&|&&", + "name": "keyword.operator.sigils_2.elixir" + }, + { + "match": "<\\-|\\\\\\\\", + "name": "keyword.operator.sigils_3.elixir" + }, + { + "match": "===?|!==?|<=?|>=?", + "name": "keyword.operator.comparison.elixir" + }, + { + "match": "(\\|\\|\\||&&&|\\^\\^\\^|<<<|>>>|~~~)", + "name": "keyword.operator.bitwise.elixir" + }, + { + "match": "(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b", + "name": "keyword.operator.logical.elixir" + }, + { + "match": "(\\*|\\+|\\-|/)", + "name": "keyword.operator.arithmetic.elixir" + }, + { + "match": "\\||\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\<\\-|\\<\\>|\\<\\<|\\>\\>|\\:\\:|\\.\\.|//|\\|>|~|=>|&", + "name": "keyword.operator.other.elixir" + }, + { + "match": "=", + "name": "keyword.operator.assignment.elixir" + }, + { + "match": ":", + "name": "punctuation.separator.other.elixir" + }, + { + "match": "\\;", + "name": "punctuation.separator.statement.elixir" + }, + { + "match": ",", + "name": "punctuation.separator.object.elixir" + }, + { + "match": "\\.", + "name": "punctuation.separator.method.elixir" + }, + { + "match": "\\{|\\}", + "name": "punctuation.section.scope.elixir" + }, + { + "match": "\\[|\\]", + "name": "punctuation.section.array.elixir" + }, + { + "match": "\\(|\\)", + "name": "punctuation.section.function.elixir" + } + ] + }, + "escaped_char": { + "match": "\\\\(x[\\da-fA-F]{1,2}|.)", + "name": "constant.character.escaped.elixir" + }, + "interpolated_elixir": { + "begin": "#\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.elixir" + } + }, + "contentName": "source.elixir", + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.elixir" + } + }, + "name": "meta.embedded.line.elixir", + "patterns": [ + { + "include": "#nest_curly_and_self" + }, + { + "include": "$self" + } + ] + }, + "nest_curly_and_self": { + "patterns": [ + { + "begin": "\\{", + "captures": { + "0": { + "name": "punctuation.section.scope.elixir" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#nest_curly_and_self" + } + ] + }, + { + "include": "$self" + } + ] + } + }, + "scopeName": "source.elixir", + "uuid": "D00C06B9-71B2-4FEB-A0E3-37237F579456" +} diff --git a/src/lib/shiki/languages/elm.tmLanguage.json b/src/lib/shiki/languages/elm.tmLanguage.json new file mode 100644 index 0000000..f38de1f --- /dev/null +++ b/src/lib/shiki/languages/elm.tmLanguage.json @@ -0,0 +1,748 @@ +{ + "fileTypes": ["elm"], + "name": "elm", + "scopeName": "source.elm", + "patterns": [ + { + "include": "#import" + }, + { + "include": "#module" + }, + { + "include": "#debug" + }, + { + "include": "#comments" + }, + { + "match": "\\b(_)\\b", + "name": "keyword.unused.elm" + }, + { + "include": "#type-signature" + }, + { + "include": "#type-declaration" + }, + { + "include": "#type-alias-declaration" + }, + { + "include": "#string-triple" + }, + { + "include": "#string-quote" + }, + { + "include": "#char" + }, + { + "comment": "Floats are always decimal", + "match": "\\b([0-9]+\\.[0-9]+([eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\\b", + "name": "constant.numeric.float.elm" + }, + { + "match": "\\b([0-9]+)\\b", + "name": "constant.numeric.elm" + }, + { + "match": "\\b(0x[0-9a-fA-F]+)\\b", + "name": "constant.numeric.elm" + }, + { + "include": "#glsl" + }, + { + "include": "#record-prefix" + }, + { + "include": "#module-prefix" + }, + { + "include": "#constructor" + }, + { + "name": "meta.record.field.update.elm", + "match": "(\\{)\\s+([a-z][a-zA-Z0-9_]*)\\s+(\\|)\\s+([a-z][a-zA-Z0-9_]*)", + "captures": { + "1": { + "name": "punctuation.bracket.elm" + }, + "2": { + "name": "record.name.elm" + }, + "3": { + "name": "keyword.pipe.elm" + }, + "4": { + "name": "entity.name.record.field.elm" + } + } + }, + { + "name": "meta.record.field.update.elm", + "match": "(\\|)\\s+([a-z][a-zA-Z0-9_]*)\\s+(\\=)", + "captures": { + "1": { + "name": "keyword.pipe.elm" + }, + "2": { + "name": "entity.name.record.field.elm" + }, + "3": { + "name": "keyword.operator.assignment.elm" + } + } + }, + { + "name": "meta.record.field.update.elm", + "match": "(\\{)\\s+([a-z][a-zA-Z0-9_]*)\\s+$", + "captures": { + "1": { + "name": "punctuation.bracket.elm" + }, + "2": { + "name": "record.name.elm" + } + } + }, + { + "name": "meta.record.field.elm", + "match": "(\\{)\\s+([a-z][a-zA-Z0-9_]*)\\s+(\\=)", + "captures": { + "1": { + "name": "punctuation.bracket.elm" + }, + "2": { + "name": "entity.name.record.field.elm" + }, + "3": { + "name": "keyword.operator.assignment.elm" + } + } + }, + { + "name": "meta.record.field.elm", + "match": "(,)\\s+([a-z][a-zA-Z0-9_]*)\\s+(\\=)", + "captures": { + "1": { + "name": "punctuation.separator.comma.elm" + }, + "2": { + "name": "entity.name.record.field.elm" + }, + "3": { + "name": "keyword.operator.assignment.elm" + } + } + }, + { + "match": "(\\}|\\{)", + "name": "punctuation.bracket.elm" + }, + { + "include": "#unit" + }, + { + "include": "#comma" + }, + { + "include": "#parens" + }, + { + "match": "(->)", + "name": "keyword.operator.arrow.elm" + }, + { + "include": "#infix_op" + }, + { + "match": "(\\=|\\:|\\||\\\\)", + "name": "keyword.other.elm" + }, + { + "match": "\\b(type|as|port|exposing|alias|infixl|infixr|infix)\\s+", + "name": "keyword.other.elm" + }, + { + "match": "\\b(if|then|else|case|of|let|in)\\s+", + "name": "keyword.control.elm" + }, + { + "include": "#record-accessor" + }, + { + "include": "#top_level_value" + }, + { + "include": "#value" + }, + { + "include": "#period" + }, + { + "include": "#square_brackets" + } + ], + "repository": { + "comma": { + "match": "(,)", + "name": "punctuation.separator.comma.elm" + }, + "parens": { + "match": "(\\(|\\))", + "name": "punctuation.parens.elm" + }, + "block_comment": { + "applyEndPatternLast": 1, + "begin": "\\{-(?!#)", + "captures": { + "0": { + "name": "punctuation.definition.comment.elm" + } + }, + "end": "-\\}", + "name": "comment.block.elm", + "patterns": [ + { + "include": "#block_comment" + } + ] + }, + "comments": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.comment.elm" + } + }, + "begin": "--", + "end": "$", + "name": "comment.line.double-dash.elm" + }, + { + "include": "#block_comment" + } + ] + }, + "import": { + "name": "meta.import.elm", + "begin": "^\\b(import)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.control.import.elm" + } + }, + "end": "\\n(?!\\s)", + "patterns": [ + { + "match": "(as|exposing)", + "name": "keyword.control.elm" + }, + { + "include": "#module_chunk" + }, + { + "include": "#period" + }, + { + "match": "\\s+", + "name": "punctuation.spaces.elm" + }, + { + "include": "#module-exports" + } + ] + }, + "module": { + "begin": "^\\b((port |effect )?module)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.other.elm" + } + }, + "end": "\\n(?!\\s)", + "endCaptures": { + "1": { + "name": "keyword.other.elm" + } + }, + "name": "meta.declaration.module.elm", + "patterns": [ + { + "include": "#module_chunk" + }, + { + "include": "#period" + }, + { + "match": "(exposing)", + "name": "keyword.other.elm" + }, + { + "match": "\\s+", + "name": "punctuation.spaces.elm" + }, + { + "include": "#module-exports" + } + ] + }, + "string-triple": { + "name": "string.quoted.triple.elm", + "begin": "\"\"\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elm" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elm" + } + }, + "patterns": [ + { + "match": "\\\\(NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]|x[0-9a-fA-F]{1,5})", + "name": "constant.character.escape.elm" + }, + { + "match": "\\^[A-Z@\\[\\]\\\\\\^_]", + "name": "constant.character.escape.control.elm" + } + ] + }, + "string-quote": { + "name": "string.quoted.double.elm", + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.elm" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.elm" + } + }, + "patterns": [ + { + "match": "\\\\(NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]|x[0-9a-fA-F]{1,5})", + "name": "constant.character.escape.elm" + }, + { + "match": "\\^[A-Z@\\[\\]\\\\\\^_]", + "name": "constant.character.escape.control.elm" + } + ] + }, + "char": { + "name": "string.quoted.single.elm", + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.char.begin.elm" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.char.end.elm" + } + }, + "patterns": [ + { + "match": "\\\\(NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]|x[0-9a-fA-F]{1,5})", + "name": "constant.character.escape.elm" + }, + { + "match": "\\^[A-Z@\\[\\]\\\\\\^_]", + "name": "constant.character.escape.control.elm" + } + ] + }, + "debug": { + "match": "\\b(Debug)\\b", + "name": "invalid.illegal.debug.elm" + }, + "module-exports": { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.parens.module-export.elm" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.parens.module-export.elm" + } + }, + "name": "meta.declaration.exports.elm", + "patterns": [ + { + "match": "\\b[a-z][a-zA-Z_'0-9]*", + "name": "entity.name.function.elm" + }, + { + "match": "\\b[A-Z][A-Za-z_'0-9]*", + "name": "storage.type.elm" + }, + { + "match": ",", + "name": "punctuation.separator.comma.elm" + }, + { + "match": "\\s+", + "name": "punctuation.spaces.elm" + }, + { + "include": "#comma" + }, + { + "match": "\\(\\.\\.\\)", + "name": "punctuation.parens.ellipses.elm" + }, + { + "match": "\\.\\.", + "name": "punctuation.parens.ellipses.elm" + }, + { + "include": "#infix_op" + }, + { + "comment": "So named because I don't know what to call this.", + "match": "\\(.*?\\)", + "name": "meta.other.unknown.elm" + } + ] + }, + "module_chunk": { + "match": "[A-Z][a-zA-Z0-9_]*", + "name": "support.module.elm" + }, + "period": { + "match": "[.]", + "name": "keyword.other.period.elm" + }, + "square_brackets": { + "match": "[\\[\\]]", + "name": "punctuation.definition.list.elm" + }, + "record-prefix": { + "match": "([a-z][a-zA-Z0-9_]*)(\\.)([a-z][a-zA-Z0-9_]*)", + "name": "record.accessor.elm", + "captures": { + "1": { + "name": "record.name.elm" + }, + "2": { + "name": "keyword.other.period.elm" + }, + "3": { + "name": "entity.name.record.field.accessor.elm" + } + } + }, + "module-prefix": { + "match": "([A-Z][a-zA-Z0-9_]*)(\\.)", + "name": "meta.module.name.elm", + "captures": { + "1": { + "name": "support.module.elm" + }, + "2": { + "name": "keyword.other.period.elm" + } + } + }, + "constructor": { + "match": "\\b[A-Z][a-zA-Z0-9_]*\\b", + "name": "constant.type-constructor.elm" + }, + "value": { + "match": "\\b[a-z][a-zA-Z0-9_]*\\b", + "name": "meta.value.elm" + }, + "unit": { + "match": "\\(\\)", + "name": "constant.unit.elm" + }, + "top_level_value": { + "match": "^[a-z][a-zA-Z0-9_]*\\b", + "name": "entity.name.function.top_level.elm" + }, + "record-accessor": { + "match": "(\\.)([a-z][a-zA-Z0-9_]*)", + "name": "meta.record.accessor", + "captures": { + "1": { + "name": "keyword.other.period.elm" + }, + "2": { + "name": "entity.name.record.field.accessor.elm" + } + } + }, + "infix_op": { + "match": "(|<\\?>|<\\||<=|\\|\\||&&|>=|\\|>|\\|=|\\|\\.|\\+\\+|::|/=|==|//|>>|<<|<|>|\\^|\\+|-|/|\\*)", + "name": "keyword.operator.elm" + }, + "type-declaration": { + "begin": "^(type\\s+)([A-Z][a-zA-Z0-9_']*)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.type.elm" + }, + "2": { + "name": "storage.type.elm" + } + }, + "end": "^(?=\\S)", + "name": "meta.function.type-declaration.elm", + "patterns": [ + { + "name": "meta.record.field.elm", + "match": "^\\s*([A-Z][a-zA-Z0-9_]*)\\b", + "captures": { + "1": { + "name": "constant.type-constructor.elm" + } + } + }, + { + "match": "\\s+", + "name": "punctuation.spaces.elm" + }, + { + "name": "meta.record.field.elm", + "match": "(\\=|\\|)\\s+([A-Z][a-zA-Z0-9_]*)\\b", + "captures": { + "1": { + "name": "keyword.operator.assignment.elm" + }, + "2": { + "name": "constant.type-constructor.elm" + } + } + }, + { + "match": "\\=", + "name": "keyword.operator.assignment.elm" + }, + { + "match": "\\-\\>", + "name": "keyword.operator.arrow.elm" + }, + { + "include": "#module-prefix" + }, + { + "match": "\\b[a-z][a-zA-Z0-9_]*\\b", + "name": "variable.type.elm" + }, + { + "match": "\\b[A-Z][a-zA-Z0-9_]*\\b", + "name": "storage.type.elm" + }, + { + "include": "#comments" + }, + { + "include": "#type-record" + } + ] + }, + "type-alias-declaration": { + "begin": "^(type\\s+)(alias\\s+)([A-Z][a-zA-Z0-9_']*)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.type.elm" + }, + "2": { + "name": "keyword.type-alias.elm" + }, + "3": { + "name": "storage.type.elm" + } + }, + "end": "^(?=\\S)", + "name": "meta.function.type-declaration.elm", + "patterns": [ + { + "match": "\\n\\s+", + "name": "punctuation.spaces.elm" + }, + { + "match": "\\=", + "name": "keyword.operator.assignment.elm" + }, + { + "include": "#module-prefix" + }, + { + "match": "\\b[A-Z][a-zA-Z0-9_]*\\b", + "name": "storage.type.elm" + }, + { + "match": "\\b[a-z][a-zA-Z0-9_]*\\b", + "name": "variable.type.elm" + }, + { + "include": "#comments" + }, + { + "include": "#type-record" + } + ] + }, + "type-record": { + "begin": "(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.section.braces.begin" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.section.braces.end" + } + }, + "name": "meta.function.type-record.elm", + "patterns": [ + { + "match": "\\s+", + "name": "punctuation.spaces.elm" + }, + { + "match": "->", + "name": "keyword.operator.arrow.elm" + }, + { + "name": "meta.record.field.elm", + "match": "([a-z][a-zA-Z0-9_]*)\\s+(\\:)", + "captures": { + "1": { + "name": "entity.name.record.field.elm" + }, + "2": { + "name": "keyword.other.elm" + } + } + }, + { + "match": "\\,", + "name": "punctuation.separator.comma.elm" + }, + { + "include": "#module-prefix" + }, + { + "match": "\\b[a-z][a-zA-Z0-9_]*\\b", + "name": "variable.type.elm" + }, + { + "match": "\\b[A-Z][a-zA-Z0-9_]*\\b", + "name": "storage.type.elm" + }, + { + "include": "#comments" + }, + { + "include": "#type-record" + } + ] + }, + "type-signature": { + "begin": "^(port\\s+)?([a-z_][a-zA-Z0-9_']*)\\s+(\\:)", + "beginCaptures": { + "1": { + "name": "keyword.other.port.elm" + }, + "2": { + "name": "entity.name.function.elm" + }, + "3": { + "name": "keyword.other.colon.elm" + } + }, + "end": "((^(?=[a-z]))|^$)", + "name": "meta.function.type-declaration.elm", + "patterns": [ + { + "include": "#type-signature-chunk" + } + ] + }, + "type-signature-chunk": { + "patterns": [ + { + "match": "->", + "name": "keyword.operator.arrow.elm" + }, + { + "match": "\\s+", + "name": "punctuation.spaces.elm" + }, + { + "include": "#module-prefix" + }, + { + "match": "\\b[a-z][a-zA-Z0-9_]*\\b", + "name": "variable.type.elm" + }, + { + "match": "\\b[A-Z][a-zA-Z0-9_]*\\b", + "name": "storage.type.elm" + }, + { + "match": "\\(\\)", + "name": "constant.unit.elm" + }, + { + "include": "#comma" + }, + { + "include": "#parens" + }, + { + "include": "#comments" + }, + { + "include": "#type-record" + } + ] + }, + "glsl": { + "begin": "(\\[)(glsl)(\\|)", + "beginCaptures": { + "1": { + "name": "entity.glsl.bracket.elm" + }, + "2": { + "name": "entity.glsl.name.elm" + }, + "3": { + "name": "entity.glsl.bracket.elm" + } + }, + "end": "(\\|\\])", + "endCaptures": { + "1": { + "name": "entity.glsl.bracket.elm" + } + }, + "name": "meta.embedded.block.glsl", + "patterns": [ + { + "include": "source.glsl" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/erb.tmLanguage.json b/src/lib/shiki/languages/erb.tmLanguage.json new file mode 100644 index 0000000..c1d8421 --- /dev/null +++ b/src/lib/shiki/languages/erb.tmLanguage.json @@ -0,0 +1,153 @@ +{ + "fileTypes": ["erb", "rhtml", "html.erb"], + "injections": { + "text.html.erb - (meta.embedded.block.erb | meta.embedded.line.erb | comment)": { + "patterns": [ + { + "begin": "(^\\s*)(?=<%+#(?![^%]*%>))", + "beginCaptures": { + "0": { + "name": "punctuation.whitespace.comment.leading.erb" + } + }, + "end": "(?!\\G)(\\s*$\\n)?", + "endCaptures": { + "0": { + "name": "punctuation.whitespace.comment.trailing.erb" + } + }, + "patterns": [ + { + "include": "#comment" + } + ] + }, + { + "begin": "(^\\s*)(?=<%(?![^%]*%>))", + "beginCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.leading.erb" + } + }, + "end": "(?!\\G)(\\s*$\\n)?", + "endCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.trailing.erb" + } + }, + "patterns": [ + { + "include": "#tags" + } + ] + }, + { + "include": "#comment" + }, + { + "include": "#tags" + } + ] + } + }, + "keyEquivalent": "^~H", + "name": "erb", + "patterns": [ + { + "include": "text.html.basic" + } + ], + "repository": { + "comment": { + "patterns": [ + { + "begin": "<%+#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.erb" + } + }, + "end": "%>", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.erb" + } + }, + "name": "comment.block.erb" + } + ] + }, + "tags": { + "patterns": [ + { + "begin": "<%+(?!>)[-=]?(?![^%]*%>)", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.erb" + } + }, + "contentName": "source.ruby", + "end": "(-?%)>", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.erb" + }, + "1": { + "name": "source.ruby" + } + }, + "name": "meta.embedded.block.erb", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.comment.erb" + } + }, + "match": "(#).*?(?=-?%>)", + "name": "comment.line.number-sign.erb" + }, + { + "include": "source.ruby" + } + ] + }, + { + "begin": "<%+(?!>)[-=]?", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.erb" + } + }, + "contentName": "source.ruby", + "end": "(-?%)>", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.erb" + }, + "1": { + "name": "source.ruby" + } + }, + "name": "meta.embedded.line.erb", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.comment.erb" + } + }, + "match": "(#).*?(?=-?%>)", + "name": "comment.line.number-sign.erb" + }, + { + "include": "source.ruby" + } + ] + } + ] + } + }, + "scopeName": "text.html.erb", + "uuid": "13FF9439-15D0-4E74-9A8E-83ABF0BAA5E7" +} diff --git a/src/lib/shiki/languages/erlang.tmLanguage.json b/src/lib/shiki/languages/erlang.tmLanguage.json new file mode 100644 index 0000000..9175ca9 --- /dev/null +++ b/src/lib/shiki/languages/erlang.tmLanguage.json @@ -0,0 +1,1753 @@ +{ + "comment": "The recognition of function definitions and compiler directives (such as module, record and macro definitions) requires that each of the aforementioned constructs must be the first string inside a line (except for whitespace). Also, the function/module/record/macro names must be given unquoted. -- desp", + "fileTypes": ["erl", "escript", "hrl", "xrl", "yrl"], + "keyEquivalent": "^~E", + "name": "erlang", + "patterns": [ + { + "include": "#module-directive" + }, + { + "include": "#import-export-directive" + }, + { + "include": "#behaviour-directive" + }, + { + "include": "#record-directive" + }, + { + "include": "#define-directive" + }, + { + "include": "#macro-directive" + }, + { + "include": "#directive" + }, + { + "include": "#function" + }, + { + "include": "#everything-else" + } + ], + "repository": { + "atom": { + "patterns": [ + { + "begin": "(')", + "beginCaptures": { + "1": { + "name": "punctuation.definition.symbol.begin.erlang" + } + }, + "end": "(')", + "endCaptures": { + "1": { + "name": "punctuation.definition.symbol.end.erlang" + } + }, + "name": "constant.other.symbol.quoted.single.erlang", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.escape.erlang" + }, + "3": { + "name": "punctuation.definition.escape.erlang" + } + }, + "match": "(\\\\)([bdefnrstv\\\\'\"]|(\\^)[@-_a-z]|[0-7]{1,3}|x[\\da-fA-F]{2})", + "name": "constant.other.symbol.escape.erlang" + }, + { + "match": "\\\\\\^?.?", + "name": "invalid.illegal.atom.erlang" + } + ] + }, + { + "match": "[a-z][a-zA-Z\\d@_]*+", + "name": "constant.other.symbol.unquoted.erlang" + } + ] + }, + "behaviour-directive": { + "captures": { + "1": { + "name": "punctuation.section.directive.begin.erlang" + }, + "2": { + "name": "keyword.control.directive.behaviour.erlang" + }, + "3": { + "name": "punctuation.definition.parameters.begin.erlang" + }, + "4": { + "name": "entity.name.type.class.behaviour.definition.erlang" + }, + "5": { + "name": "punctuation.definition.parameters.end.erlang" + }, + "6": { + "name": "punctuation.section.directive.end.erlang" + } + }, + "match": "^\\s*+(-)\\s*+(behaviour)\\s*+(\\()\\s*+([a-z][a-zA-Z\\d@_]*+)\\s*+(\\))\\s*+(\\.)", + "name": "meta.directive.behaviour.erlang" + }, + "binary": { + "begin": "(<<)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.binary.begin.erlang" + } + }, + "end": "(>>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.binary.end.erlang" + } + }, + "name": "meta.structure.binary.erlang", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.separator.binary.erlang" + }, + "2": { + "name": "punctuation.separator.value-size.erlang" + } + }, + "match": "(,)|(:)" + }, + { + "include": "#internal-type-specifiers" + }, + { + "include": "#everything-else" + } + ] + }, + "character": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.character.erlang" + }, + "2": { + "name": "constant.character.escape.erlang" + }, + "3": { + "name": "punctuation.definition.escape.erlang" + }, + "5": { + "name": "punctuation.definition.escape.erlang" + } + }, + "match": "(\\$)((\\\\)([bdefnrstv\\\\'\"]|(\\^)[@-_a-z]|[0-7]{1,3}|x[\\da-fA-F]{2}))", + "name": "constant.character.erlang" + }, + { + "match": "\\$\\\\\\^?.?", + "name": "invalid.illegal.character.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.character.erlang" + } + }, + "match": "(\\$)[ \\S]", + "name": "constant.character.erlang" + }, + { + "match": "\\$.?", + "name": "invalid.illegal.character.erlang" + } + ] + }, + "comment": { + "begin": "(^[ \\t]+)?(?=%)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.erlang" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "%", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.erlang" + } + }, + "end": "\\n", + "name": "comment.line.percentage.erlang" + } + ] + }, + "define-directive": { + "patterns": [ + { + "begin": "^\\s*+(-)\\s*+(define)\\s*+(\\()\\s*+([a-zA-Z\\d@_]++)\\s*+", + "beginCaptures": { + "1": { + "name": "punctuation.section.directive.begin.erlang" + }, + "2": { + "name": "keyword.control.directive.define.erlang" + }, + "3": { + "name": "punctuation.definition.parameters.begin.erlang" + }, + "4": { + "name": "entity.name.function.macro.definition.erlang" + } + }, + "end": "(\\))\\s*+(\\.)", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.erlang" + }, + "2": { + "name": "punctuation.section.directive.end.erlang" + } + }, + "name": "meta.directive.define.erlang", + "patterns": [ + { + "include": "#everything-else" + } + ] + }, + { + "begin": "(?=^\\s*+-\\s*+define\\s*+\\(\\s*+[a-zA-Z\\d@_]++\\s*+\\()", + "end": "(\\))\\s*+(\\.)", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.erlang" + }, + "2": { + "name": "punctuation.section.directive.end.erlang" + } + }, + "name": "meta.directive.define.erlang", + "patterns": [ + { + "begin": "^\\s*+(-)\\s*+(define)\\s*+(\\()\\s*+([a-zA-Z\\d@_]++)\\s*+(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.section.directive.begin.erlang" + }, + "2": { + "name": "keyword.control.directive.define.erlang" + }, + "3": { + "name": "punctuation.definition.parameters.begin.erlang" + }, + "4": { + "name": "entity.name.function.macro.definition.erlang" + }, + "5": { + "name": "punctuation.definition.parameters.begin.erlang" + } + }, + "end": "(\\))\\s*(,)", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.erlang" + }, + "2": { + "name": "punctuation.separator.parameters.erlang" + } + }, + "patterns": [ + { + "match": ",", + "name": "punctuation.separator.parameters.erlang" + }, + { + "include": "#everything-else" + } + ] + }, + { + "match": "\\|\\||\\||:|;|,|\\.|->", + "name": "punctuation.separator.define.erlang" + }, + { + "include": "#everything-else" + } + ] + } + ] + }, + "directive": { + "patterns": [ + { + "begin": "^\\s*+(-)\\s*+([a-z][a-zA-Z\\d@_]*+)\\s*+(\\(?)", + "beginCaptures": { + "1": { + "name": "punctuation.section.directive.begin.erlang" + }, + "2": { + "name": "keyword.control.directive.erlang" + }, + "3": { + "name": "punctuation.definition.parameters.begin.erlang" + } + }, + "end": "(\\)?)\\s*+(\\.)", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.erlang" + }, + "2": { + "name": "punctuation.section.directive.end.erlang" + } + }, + "name": "meta.directive.erlang", + "patterns": [ + { + "include": "#everything-else" + } + ] + }, + { + "captures": { + "1": { + "name": "punctuation.section.directive.begin.erlang" + }, + "2": { + "name": "keyword.control.directive.erlang" + }, + "3": { + "name": "punctuation.section.directive.end.erlang" + } + }, + "match": "^\\s*+(-)\\s*+([a-z][a-zA-Z\\d@_]*+)\\s*+(\\.)", + "name": "meta.directive.erlang" + } + ] + }, + "everything-else": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#record-usage" + }, + { + "include": "#macro-usage" + }, + { + "include": "#expression" + }, + { + "include": "#keyword" + }, + { + "include": "#textual-operator" + }, + { + "include": "#language-constant" + }, + { + "include": "#function-call" + }, + { + "include": "#tuple" + }, + { + "include": "#list" + }, + { + "include": "#binary" + }, + { + "include": "#parenthesized-expression" + }, + { + "include": "#character" + }, + { + "include": "#number" + }, + { + "include": "#atom" + }, + { + "include": "#string" + }, + { + "include": "#symbolic-operator" + }, + { + "include": "#variable" + } + ] + }, + "expression": { + "patterns": [ + { + "begin": "\\b(if)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.if.erlang" + } + }, + "end": "\\b(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.erlang" + } + }, + "name": "meta.expression.if.erlang", + "patterns": [ + { + "include": "#internal-expression-punctuation" + }, + { + "include": "#everything-else" + } + ] + }, + { + "begin": "\\b(case)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.case.erlang" + } + }, + "end": "\\b(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.erlang" + } + }, + "name": "meta.expression.case.erlang", + "patterns": [ + { + "include": "#internal-expression-punctuation" + }, + { + "include": "#everything-else" + } + ] + }, + { + "begin": "\\b(receive)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.receive.erlang" + } + }, + "end": "\\b(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.erlang" + } + }, + "name": "meta.expression.receive.erlang", + "patterns": [ + { + "include": "#internal-expression-punctuation" + }, + { + "include": "#everything-else" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.control.fun.erlang" + }, + "4": { + "name": "entity.name.type.class.module.erlang" + }, + "5": { + "name": "variable.other.erlang" + }, + "6": { + "name": "punctuation.separator.module-function.erlang" + }, + "8": { + "name": "entity.name.function.erlang" + }, + "9": { + "name": "variable.other.erlang" + }, + "10": { + "name": "punctuation.separator.function-arity.erlang" + } + }, + "comment": "Implicit function expression with optional module qualifier when both module and function can be atom or variable", + "match": "\\b(fun)\\s+((([a-z][a-zA-Z\\d@_]*+)|(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+))\\s*+(:)\\s*+)?(([a-z][a-zA-Z\\d@_]*+|'[^']*+')|(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+))\\s*(/)", + "name": "meta.expression.fun.implicit.erlang" + }, + { + "begin": "\\b(fun)\\s+(([a-z][a-zA-Z\\d@_]*+)|(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+))\\s*+(:)", + "beginCaptures": { + "1": { + "name": "keyword.control.fun.erlang" + }, + "3": { + "name": "entity.name.type.class.module.erlang" + }, + "4": { + "name": "variable.other.erlang" + }, + "5": { + "name": "punctuation.separator.module-function.erlang" + } + }, + "comment": "Implicit function expression with module qualifier when module can be atom or variable and function can by anything", + "end": "(/)", + "endCaptures": { + "1": { + "name": "punctuation.separator.function-arity.erlang" + } + }, + "name": "meta.expression.fun.implicit.erlang", + "patterns": [ + { + "include": "#everything-else" + } + ] + }, + { + "begin": "\\b(fun)\\s+(?!\\()", + "beginCaptures": { + "1": { + "name": "keyword.control.fun.erlang" + } + }, + "comment": "Implicit function expression when both module and function can by anything", + "end": "(/)", + "endCaptures": { + "1": { + "name": "punctuation.separator.function-arity.erlang" + } + }, + "name": "meta.expression.fun.implicit.erlang", + "patterns": [ + { + "include": "#everything-else" + } + ] + }, + { + "begin": "\\b(fun)\\s*+(\\()(?=(\\s*+\\())", + "beginCaptures": { + "1": { + "name": "entity.name.function.erlang" + }, + "2": { + "name": "punctuation.definition.parameters.begin.erlang" + } + }, + "comment": "Function type in type specification", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.erlang" + } + }, + "patterns": [ + { + "include": "#everything-else" + } + ] + }, + { + "begin": "\\b(fun)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.fun.erlang" + } + }, + "comment": "Explicit function expression", + "end": "\\b(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.erlang" + } + }, + "name": "meta.expression.fun.erlang", + "patterns": [ + { + "begin": "(?=\\()", + "end": "(;)|(?=\\bend\\b)", + "endCaptures": { + "1": { + "name": "punctuation.separator.clauses.erlang" + } + }, + "patterns": [ + { + "include": "#internal-function-parts" + } + ] + }, + { + "include": "#everything-else" + } + ] + }, + { + "begin": "\\b(try)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.try.erlang" + } + }, + "end": "\\b(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.erlang" + } + }, + "name": "meta.expression.try.erlang", + "patterns": [ + { + "include": "#internal-expression-punctuation" + }, + { + "include": "#everything-else" + } + ] + }, + { + "begin": "\\b(begin)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.begin.erlang" + } + }, + "end": "\\b(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.erlang" + } + }, + "name": "meta.expression.begin.erlang", + "patterns": [ + { + "include": "#internal-expression-punctuation" + }, + { + "include": "#everything-else" + } + ] + }, + { + "begin": "\\b(maybe)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.maybe.erlang" + } + }, + "end": "\\b(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.erlang" + } + }, + "name": "meta.expression.maybe.erlang", + "patterns": [ + { + "include": "#internal-expression-punctuation" + }, + { + "include": "#everything-else" + } + ] + } + ] + }, + "function": { + "begin": "^\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(?=\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.definition.erlang" + } + }, + "end": "(\\.)", + "endCaptures": { + "1": { + "name": "punctuation.terminator.function.erlang" + } + }, + "name": "meta.function.erlang", + "patterns": [ + { + "captures": { + "1": { + "name": "entity.name.function.erlang" + } + }, + "match": "^\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(?=\\()" + }, + { + "begin": "(?=\\()", + "end": "(;)|(?=\\.)", + "endCaptures": { + "1": { + "name": "punctuation.separator.clauses.erlang" + } + }, + "patterns": [ + { + "include": "#parenthesized-expression" + }, + { + "include": "#internal-function-parts" + } + ] + }, + { + "include": "#everything-else" + } + ] + }, + "function-call": { + "begin": "(?=([a-z][a-zA-Z\\d@_]*+|'[^']*+'|_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+)\\s*+(\\(|:\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+'|_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+)\\s*+\\())", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.erlang" + } + }, + "name": "meta.function-call.erlang", + "patterns": [ + { + "begin": "((erlang)\\s*+(:)\\s*+)?(is_atom|is_binary|is_constant|is_float|is_function|is_integer|is_list|is_number|is_pid|is_port|is_reference|is_tuple|is_record|abs|element|hd|length|node|round|self|size|tl|trunc)\\s*+(\\()", + "beginCaptures": { + "2": { + "name": "entity.name.type.class.module.erlang" + }, + "3": { + "name": "punctuation.separator.module-function.erlang" + }, + "4": { + "name": "entity.name.function.guard.erlang" + }, + "5": { + "name": "punctuation.definition.parameters.begin.erlang" + } + }, + "end": "(?=\\))", + "patterns": [ + { + "match": ",", + "name": "punctuation.separator.parameters.erlang" + }, + { + "include": "#everything-else" + } + ] + }, + { + "begin": "((([a-z][a-zA-Z\\d@_]*+|'[^']*+')|(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+))\\s*+(:)\\s*+)?(([a-z][a-zA-Z\\d@_]*+|'[^']*+')|(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+))\\s*+(\\()", + "beginCaptures": { + "3": { + "name": "entity.name.type.class.module.erlang" + }, + "4": { + "name": "variable.other.erlang" + }, + "5": { + "name": "punctuation.separator.module-function.erlang" + }, + "7": { + "name": "entity.name.function.erlang" + }, + "8": { + "name": "variable.other.erlang" + }, + "9": { + "name": "punctuation.definition.parameters.begin.erlang" + } + }, + "end": "(?=\\))", + "patterns": [ + { + "match": ",", + "name": "punctuation.separator.parameters.erlang" + }, + { + "include": "#everything-else" + } + ] + } + ] + }, + "import-export-directive": { + "patterns": [ + { + "begin": "^\\s*+(-)\\s*+(import)\\s*+(\\()\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(,)", + "beginCaptures": { + "1": { + "name": "punctuation.section.directive.begin.erlang" + }, + "2": { + "name": "keyword.control.directive.import.erlang" + }, + "3": { + "name": "punctuation.definition.parameters.begin.erlang" + }, + "4": { + "name": "entity.name.type.class.module.erlang" + }, + "5": { + "name": "punctuation.separator.parameters.erlang" + } + }, + "end": "(\\))\\s*+(\\.)", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.erlang" + }, + "2": { + "name": "punctuation.section.directive.end.erlang" + } + }, + "name": "meta.directive.import.erlang", + "patterns": [ + { + "include": "#internal-function-list" + } + ] + }, + { + "begin": "^\\s*+(-)\\s*+(export)\\s*+(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.section.directive.begin.erlang" + }, + "2": { + "name": "keyword.control.directive.export.erlang" + }, + "3": { + "name": "punctuation.definition.parameters.begin.erlang" + } + }, + "end": "(\\))\\s*+(\\.)", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.erlang" + }, + "2": { + "name": "punctuation.section.directive.end.erlang" + } + }, + "name": "meta.directive.export.erlang", + "patterns": [ + { + "include": "#internal-function-list" + } + ] + } + ] + }, + "internal-expression-punctuation": { + "captures": { + "1": { + "name": "punctuation.separator.clause-head-body.erlang" + }, + "2": { + "name": "punctuation.separator.clauses.erlang" + }, + "3": { + "name": "punctuation.separator.expressions.erlang" + } + }, + "match": "(->)|(;)|(,)" + }, + "internal-function-list": { + "begin": "(\\[)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.list.begin.erlang" + } + }, + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.definition.list.end.erlang" + } + }, + "name": "meta.structure.list.function.erlang", + "patterns": [ + { + "begin": "([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(/)", + "beginCaptures": { + "1": { + "name": "entity.name.function.erlang" + }, + "2": { + "name": "punctuation.separator.function-arity.erlang" + } + }, + "end": "(,)|(?=\\])", + "endCaptures": { + "1": { + "name": "punctuation.separator.list.erlang" + } + }, + "patterns": [ + { + "include": "#everything-else" + } + ] + }, + { + "include": "#everything-else" + } + ] + }, + "internal-function-parts": { + "patterns": [ + { + "begin": "(?=\\()", + "end": "(->)", + "endCaptures": { + "1": { + "name": "punctuation.separator.clause-head-body.erlang" + } + }, + "patterns": [ + { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.parameters.begin.erlang" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.erlang" + } + }, + "patterns": [ + { + "match": ",", + "name": "punctuation.separator.parameters.erlang" + }, + { + "include": "#everything-else" + } + ] + }, + { + "match": ",|;", + "name": "punctuation.separator.guards.erlang" + }, + { + "include": "#everything-else" + } + ] + }, + { + "match": ",", + "name": "punctuation.separator.expressions.erlang" + }, + { + "include": "#everything-else" + } + ] + }, + "internal-record-body": { + "begin": "(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.class.record.begin.erlang" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.class.record.end.erlang" + } + }, + "name": "meta.structure.record.erlang", + "patterns": [ + { + "begin": "(([a-z][a-zA-Z\\d@_]*+|'[^']*+')|(_))", + "beginCaptures": { + "2": { + "name": "variable.other.field.erlang" + }, + "3": { + "name": "variable.language.omitted.field.erlang" + } + }, + "end": "(,)|(?=\\})", + "endCaptures": { + "1": { + "name": "punctuation.separator.class.record.erlang" + } + }, + "patterns": [ + { + "include": "#everything-else" + } + ] + }, + { + "include": "#everything-else" + } + ] + }, + "internal-type-specifiers": { + "begin": "(/)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.value-type.erlang" + } + }, + "end": "(?=,|:|>>)", + "patterns": [ + { + "captures": { + "1": { + "name": "storage.type.erlang" + }, + "2": { + "name": "storage.modifier.signedness.erlang" + }, + "3": { + "name": "storage.modifier.endianness.erlang" + }, + "4": { + "name": "storage.modifier.unit.erlang" + }, + "5": { + "name": "punctuation.separator.unit-specifiers.erlang" + }, + "6": { + "name": "constant.numeric.integer.decimal.erlang" + }, + "7": { + "name": "punctuation.separator.type-specifiers.erlang" + } + }, + "match": "(integer|float|binary|bytes|bitstring|bits|utf8|utf16|utf32)|(signed|unsigned)|(big|little|native)|(unit)(:)(\\d++)|(-)" + } + ] + }, + "keyword": { + "match": "\\b(after|begin|case|catch|cond|end|fun|if|let|of|try|receive|when|maybe|else)\\b", + "name": "keyword.control.erlang" + }, + "language-constant": { + "match": "\\b(false|true|undefined)\\b", + "name": "constant.language" + }, + "list": { + "begin": "(\\[)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.list.begin.erlang" + } + }, + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.definition.list.end.erlang" + } + }, + "name": "meta.structure.list.erlang", + "patterns": [ + { + "match": "\\||\\|\\||,", + "name": "punctuation.separator.list.erlang" + }, + { + "include": "#everything-else" + } + ] + }, + "macro-directive": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.section.directive.begin.erlang" + }, + "2": { + "name": "keyword.control.directive.ifdef.erlang" + }, + "3": { + "name": "punctuation.definition.parameters.begin.erlang" + }, + "4": { + "name": "entity.name.function.macro.erlang" + }, + "5": { + "name": "punctuation.definition.parameters.end.erlang" + }, + "6": { + "name": "punctuation.section.directive.end.erlang" + } + }, + "match": "^\\s*+(-)\\s*+(ifdef)\\s*+(\\()\\s*+([a-zA-z\\d@_]++)\\s*+(\\))\\s*+(\\.)", + "name": "meta.directive.ifdef.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.section.directive.begin.erlang" + }, + "2": { + "name": "keyword.control.directive.ifndef.erlang" + }, + "3": { + "name": "punctuation.definition.parameters.begin.erlang" + }, + "4": { + "name": "entity.name.function.macro.erlang" + }, + "5": { + "name": "punctuation.definition.parameters.end.erlang" + }, + "6": { + "name": "punctuation.section.directive.end.erlang" + } + }, + "match": "^\\s*+(-)\\s*+(ifndef)\\s*+(\\()\\s*+([a-zA-z\\d@_]++)\\s*+(\\))\\s*+(\\.)", + "name": "meta.directive.ifndef.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.section.directive.begin.erlang" + }, + "2": { + "name": "keyword.control.directive.undef.erlang" + }, + "3": { + "name": "punctuation.definition.parameters.begin.erlang" + }, + "4": { + "name": "entity.name.function.macro.erlang" + }, + "5": { + "name": "punctuation.definition.parameters.end.erlang" + }, + "6": { + "name": "punctuation.section.directive.end.erlang" + } + }, + "match": "^\\s*+(-)\\s*+(undef)\\s*+(\\()\\s*+([a-zA-z\\d@_]++)\\s*+(\\))\\s*+(\\.)", + "name": "meta.directive.undef.erlang" + } + ] + }, + "macro-usage": { + "captures": { + "1": { + "name": "keyword.operator.macro.erlang" + }, + "2": { + "name": "entity.name.function.macro.erlang" + } + }, + "match": "(\\?\\??)\\s*+([a-zA-Z\\d@_]++)", + "name": "meta.macro-usage.erlang" + }, + "module-directive": { + "captures": { + "1": { + "name": "punctuation.section.directive.begin.erlang" + }, + "2": { + "name": "keyword.control.directive.module.erlang" + }, + "3": { + "name": "punctuation.definition.parameters.begin.erlang" + }, + "4": { + "name": "entity.name.type.class.module.definition.erlang" + }, + "5": { + "name": "punctuation.definition.parameters.end.erlang" + }, + "6": { + "name": "punctuation.section.directive.end.erlang" + } + }, + "match": "^\\s*+(-)\\s*+(module)\\s*+(\\()\\s*+([a-z][a-zA-Z\\d@_]*+)\\s*+(\\))\\s*+(\\.)", + "name": "meta.directive.module.erlang" + }, + "number": { + "begin": "(?=\\d)", + "end": "(?!\\d)", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.separator.integer-float.erlang" + }, + "2": { + "name": "punctuation.separator.float-exponent.erlang" + } + }, + "match": "\\d++(\\.)\\d++([eE][\\+\\-]?\\d++)?", + "name": "constant.numeric.float.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "2(#)([0-1]++_)*[0-1]++", + "name": "constant.numeric.integer.binary.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "3(#)([0-2]++_)*[0-2]++", + "name": "constant.numeric.integer.base-3.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "4(#)([0-3]++_)*[0-3]++", + "name": "constant.numeric.integer.base-4.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "5(#)([0-4]++_)*[0-4]++", + "name": "constant.numeric.integer.base-5.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "6(#)([0-5]++_)*[0-5]++", + "name": "constant.numeric.integer.base-6.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "7(#)([0-6]++_)*[0-6]++", + "name": "constant.numeric.integer.base-7.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "8(#)([0-7]++_)*[0-7]++", + "name": "constant.numeric.integer.octal.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "9(#)([0-8]++_)*[0-8]++", + "name": "constant.numeric.integer.base-9.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "10(#)(\\d++_)*\\d++", + "name": "constant.numeric.integer.decimal.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "11(#)([\\daA]++_)*[\\daA]++", + "name": "constant.numeric.integer.base-11.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "12(#)([\\da-bA-B]++_)*[\\da-bA-B]++", + "name": "constant.numeric.integer.base-12.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "13(#)([\\da-cA-C]++_)*[\\da-cA-C]++", + "name": "constant.numeric.integer.base-13.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "14(#)([\\da-dA-D]++_)*[\\da-dA-D]++", + "name": "constant.numeric.integer.base-14.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "15(#)([\\da-eA-E]++_)*[\\da-eA-E]++", + "name": "constant.numeric.integer.base-15.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "16(#)([\\da-fA-F]++_)*[\\da-fA-F]++", + "name": "constant.numeric.integer.hexadecimal.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "17(#)([\\da-gA-G]++_)*[\\da-gA-G]++", + "name": "constant.numeric.integer.base-17.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "18(#)([\\da-hA-H]++_)*[\\da-hA-H]++", + "name": "constant.numeric.integer.base-18.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "19(#)([\\da-iA-I]++_)*[\\da-iA-I]++", + "name": "constant.numeric.integer.base-19.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "20(#)([\\da-jA-J]++_)*[\\da-jA-J]++", + "name": "constant.numeric.integer.base-20.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "21(#)([\\da-kA-K]++_)*[\\da-kA-K]++", + "name": "constant.numeric.integer.base-21.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "22(#)([\\da-lA-L]++_)*[\\da-lA-L]++", + "name": "constant.numeric.integer.base-22.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "23(#)([\\da-mA-M]++_)*[\\da-mA-M]++", + "name": "constant.numeric.integer.base-23.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "24(#)([\\da-nA-N]++_)*[\\da-nA-N]++", + "name": "constant.numeric.integer.base-24.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "25(#)([\\da-oA-O]++_)*[\\da-oA-O]++", + "name": "constant.numeric.integer.base-25.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "26(#)([\\da-pA-P]++_)*[\\da-pA-P]++", + "name": "constant.numeric.integer.base-26.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "27(#)([\\da-qA-Q]++_)*[\\da-qA-Q]++", + "name": "constant.numeric.integer.base-27.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "28(#)([\\da-rA-R]++_)*[\\da-rA-R]++", + "name": "constant.numeric.integer.base-28.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "29(#)([\\da-sA-S]++_)*[\\da-sA-S]++", + "name": "constant.numeric.integer.base-29.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "30(#)([\\da-tA-T]++_)*[\\da-tA-T]++", + "name": "constant.numeric.integer.base-30.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "31(#)([\\da-uA-U]++_)*[\\da-uA-U]++", + "name": "constant.numeric.integer.base-31.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "32(#)([\\da-vA-V]++_)*[\\da-vA-V]++", + "name": "constant.numeric.integer.base-32.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "33(#)([\\da-wA-W]++_)*[\\da-wA-W]++", + "name": "constant.numeric.integer.base-33.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "34(#)([\\da-xA-X]++_)*[\\da-xA-X]++", + "name": "constant.numeric.integer.base-34.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "35(#)([\\da-yA-Y]++_)*[\\da-yA-Y]++", + "name": "constant.numeric.integer.base-35.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.base-integer.erlang" + } + }, + "match": "36(#)([\\da-zA-Z]++_)*[\\da-zA-Z]++", + "name": "constant.numeric.integer.base-36.erlang" + }, + { + "match": "\\d++#([\\da-zA-Z]++_)*[\\da-zA-Z]++", + "name": "invalid.illegal.integer.erlang" + }, + { + "match": "(\\d++_)*\\d++", + "name": "constant.numeric.integer.decimal.erlang" + } + ] + }, + "parenthesized-expression": { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.section.expression.begin.erlang" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.expression.end.erlang" + } + }, + "name": "meta.expression.parenthesized", + "patterns": [ + { + "include": "#everything-else" + } + ] + }, + "record-directive": { + "begin": "^\\s*+(-)\\s*+(record)\\s*+(\\()\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(,)", + "beginCaptures": { + "1": { + "name": "punctuation.section.directive.begin.erlang" + }, + "2": { + "name": "keyword.control.directive.import.erlang" + }, + "3": { + "name": "punctuation.definition.parameters.begin.erlang" + }, + "4": { + "name": "entity.name.type.class.record.definition.erlang" + }, + "5": { + "name": "punctuation.separator.parameters.erlang" + } + }, + "end": "(\\))\\s*+(\\.)", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.erlang" + }, + "2": { + "name": "punctuation.section.directive.end.erlang" + } + }, + "name": "meta.directive.record.erlang", + "patterns": [ + { + "include": "#internal-record-body" + }, + { + "include": "#comment" + } + ] + }, + "record-usage": { + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.operator.record.erlang" + }, + "2": { + "name": "entity.name.type.class.record.erlang" + }, + "3": { + "name": "punctuation.separator.record-field.erlang" + }, + "4": { + "name": "variable.other.field.erlang" + } + }, + "match": "(#)\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(\\.)\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')", + "name": "meta.record-usage.erlang" + }, + { + "begin": "(#)\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')", + "beginCaptures": { + "1": { + "name": "keyword.operator.record.erlang" + }, + "2": { + "name": "entity.name.type.class.record.erlang" + } + }, + "end": "(?<=\\})", + "name": "meta.record-usage.erlang", + "patterns": [ + { + "include": "#internal-record-body" + } + ] + } + ] + }, + "string": { + "begin": "(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.erlang" + } + }, + "end": "(\")", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.erlang" + } + }, + "name": "string.quoted.double.erlang", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.escape.erlang" + }, + "3": { + "name": "punctuation.definition.escape.erlang" + } + }, + "match": "(\\\\)([bdefnrstv\\\\'\"]|(\\^)[@-_a-z]|[0-7]{1,3}|x[\\da-fA-F]{2})", + "name": "constant.character.escape.erlang" + }, + { + "match": "\\\\\\^?.?", + "name": "invalid.illegal.string.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.placeholder.erlang" + }, + "3": { + "name": "punctuation.separator.placeholder-parts.erlang" + }, + "4": { + "name": "punctuation.separator.placeholder-parts.erlang" + }, + "6": { + "name": "punctuation.separator.placeholder-parts.erlang" + }, + "8": { + "name": "punctuation.separator.placeholder-parts.erlang" + }, + "10": { + "name": "punctuation.separator.placeholder-parts.erlang" + }, + "12": { + "name": "punctuation.separator.placeholder-parts.erlang" + } + }, + "match": "(~)((\\-)?\\d++|(\\*))?((\\.)(\\d++|(\\*)))?((\\.)((\\*)|.))?[~cfegswpWPBX#bx\\+ni]", + "name": "constant.other.placeholder.erlang" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.placeholder.erlang" + }, + "2": { + "name": "punctuation.separator.placeholder-parts.erlang" + } + }, + "match": "(~)(\\*)?(\\d++)?[~du\\-#fsacl]", + "name": "constant.other.placeholder.erlang" + }, + { + "match": "~[^\"]?", + "name": "invalid.illegal.string.erlang" + } + ] + }, + "symbolic-operator": { + "match": "\\+\\+|\\+|--|-|\\*|/=|/|=/=|=:=|==|=<|=|<-|<|>=|>|!|::|\\?=", + "name": "keyword.operator.symbolic.erlang" + }, + "textual-operator": { + "match": "\\b(andalso|band|and|bxor|xor|bor|orelse|or|bnot|not|bsl|bsr|div|rem)\\b", + "name": "keyword.operator.textual.erlang" + }, + "tuple": { + "begin": "(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tuple.begin.erlang" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.tuple.end.erlang" + } + }, + "name": "meta.structure.tuple.erlang", + "patterns": [ + { + "match": ",", + "name": "punctuation.separator.tuple.erlang" + }, + { + "include": "#everything-else" + } + ] + }, + "variable": { + "captures": { + "1": { + "name": "variable.other.erlang" + }, + "2": { + "name": "variable.language.omitted.erlang" + } + }, + "match": "(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+)|(_)" + } + }, + "scopeName": "source.erlang", + "uuid": "58EA597D-5158-4BF7-9FB2-B05135D1E166" +} diff --git a/src/lib/shiki/languages/fish.tmLanguage.json b/src/lib/shiki/languages/fish.tmLanguage.json new file mode 100644 index 0000000..235909b --- /dev/null +++ b/src/lib/shiki/languages/fish.tmLanguage.json @@ -0,0 +1,189 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "fileTypes": ["fish"], + "firstLineMatch": "^#!.*\\bfish\\b", + "foldingStartMarker": "^\\s*(function|while|if|switch|for|begin)\\s.*$", + "foldingStopMarker": "^\\s*end\\s*$", + "keyEquivalent": "^~F", + "name": "fish", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.fish" + } + }, + "comment": "Double quoted string", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.fish" + } + }, + "name": "string.quoted.double.fish", + "patterns": [ + { + "include": "#variable" + }, + { + "comment": "https://fishshell.com/docs/current/#quotes", + "match": "\\\\(\\\"|\\$|$|\\\\)", + "name": "constant.character.escape.fish" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.fish" + } + }, + "comment": "Single quoted string", + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.fish" + } + }, + "name": "string.quoted.single.fish", + "patterns": [ + { + "comment": "https://fishshell.com/docs/current/#quotes", + "match": "\\\\('|`|\\\\)", + "name": "constant.character.escape.fish" + } + ] + }, + { + "captures": { + "1": { + "name": "punctuation.definition.comment.fish" + } + }, + "comment": "line comment", + "match": "(?|\\^|>>|\\^\\^)(&[012\\-])?| # Redirection of stderr\n[012](<|>|>>)(&[012\\-])? # Redirect input/output of file descriptors\n)", + "name": "keyword.operator.redirect.fish" + }, + { + "match": "&", + "name": "keyword.operator.background.fish" + }, + { + "match": "\\*\\*|\\*|\\?", + "name": "keyword.operator.glob.fish" + }, + { + "comment": "command short/long options", + "match": "\\s(-{1,2}[a-zA-Z_\\-0-9]+|-\\w)\\b", + "captures": { + "1": { + "name": "source.option.fish" + } + } + }, + { + "include": "#variable" + }, + { + "include": "#escape" + } + ], + "repository": { + "escape": { + "patterns": [ + { + "comment": "single character character escape sequences", + "match": "\\\\[abefnrtv $*?~#(){}\\[\\]<>^&|;\"']", + "name": "constant.character.escape.single.fish" + }, + { + "comment": "escapes the ascii character with the specified value (hexadecimal)", + "match": "\\\\x[0-9a-fA-F]{1,2}", + "name": "constant.character.escape.hex-ascii.fish" + }, + { + "comment": "escapes a byte of data with the specified value (hexadecimal). If you are using mutibyte encoding, this can be used to enter invalid strings. Only use this if you know what are doing.", + "match": "\\\\X[0-9a-fA-F]{1,2}", + "name": "constant.character.escape.hex-byte.fish" + }, + { + "comment": "escapes the ascii character with the specified value (octal)", + "match": "\\\\[0-7]{1,3}", + "name": "constant.character.escape.octal.fish" + }, + { + "comment": "escapes the 16-bit unicode character with the specified value (hexadecimal)", + "match": "\\\\u[0-9a-fA-F]{1,4}", + "name": "constant.character.escape.unicode-16-bit.fish" + }, + { + "comment": "escapes the 32-bit unicode character with the specified value (hexadecimal)", + "match": "\\\\U[0-9a-fA-F]{1,8}", + "name": "constant.character.escape.unicode-32-bit.fish" + }, + { + "comment": "escapes the control sequence generated by pressing the control key and the specified letter", + "match": "\\\\c[a-zA-Z]", + "name": "constant.character.escape.control.fish" + } + ] + }, + "variable": { + "patterns": [ + { + "comment": "Built-in variables visible by pressing $ TAB TAB in a new shell", + "captures": { + "1": { + "name": "punctuation.definition.variable.fish" + } + }, + "match": "(\\$)(argv|CMD_DURATION|COLUMNS|fish_bind_mode|fish_color_autosuggestion|fish_color_cancel|fish_color_command|fish_color_comment|fish_color_cwd|fish_color_cwd_root|fish_color_end|fish_color_error|fish_color_escape|fish_color_hg_added|fish_color_hg_clean|fish_color_hg_copied|fish_color_hg_deleted|fish_color_hg_dirty|fish_color_hg_modified|fish_color_hg_renamed|fish_color_hg_unmerged|fish_color_hg_untracked|fish_color_history_current|fish_color_host|fish_color_host_remote|fish_color_match|fish_color_normal|fish_color_operator|fish_color_param|fish_color_quote|fish_color_redirection|fish_color_search_match|fish_color_selection|fish_color_status|fish_color_user|fish_color_valid_path|fish_complete_path|fish_function_path|fish_greeting|fish_key_bindings|fish_pager_color_completion|fish_pager_color_description|fish_pager_color_prefix|fish_pager_color_progress|fish_pid|fish_prompt_hg_status_added|fish_prompt_hg_status_copied|fish_prompt_hg_status_deleted|fish_prompt_hg_status_modified|fish_prompt_hg_status_order|fish_prompt_hg_status_unmerged|fish_prompt_hg_status_untracked|FISH_VERSION|history|hostname|IFS|LINES|pipestatus|status|umask|version)\\b", + "name": "variable.language.fish" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.fish" + } + }, + "match": "(\\$)[a-zA-Z_][a-zA-Z0-9_]*", + "name": "variable.other.normal.fish" + } + ] + } + }, + "scopeName": "source.fish", + "uuid": "9CA6DB6F-A16F-4836-A058-617C7378775D" +} diff --git a/src/lib/shiki/languages/fsharp.tmLanguage.json b/src/lib/shiki/languages/fsharp.tmLanguage.json new file mode 100644 index 0000000..749b369 --- /dev/null +++ b/src/lib/shiki/languages/fsharp.tmLanguage.json @@ -0,0 +1,1835 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/ionide/ionide-fsgrammar/blob/master/grammars/fsharp.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/ionide/ionide-fsgrammar/commit/8740e610a367c5e3f15be716acc7207655ced4cf", + "name": "fsharp", + "scopeName": "source.fsharp", + "patterns": [ + { + "include": "#compiler_directives" + }, + { + "include": "#comments" + }, + { + "include": "#constants" + }, + { + "include": "#strings" + }, + { + "include": "#chars" + }, + { + "include": "#double_tick" + }, + { + "include": "#definition" + }, + { + "include": "#abstract_definition" + }, + { + "include": "#attributes" + }, + { + "include": "#modules" + }, + { + "include": "#anonymous_functions" + }, + { + "include": "#du_declaration" + }, + { + "include": "#record_declaration" + }, + { + "include": "#records" + }, + { + "include": "#strp_inlined" + }, + { + "include": "#keywords" + }, + { + "include": "#cexprs" + }, + { + "include": "#text" + } + ], + "repository": { + "strp_inlined_body": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#anonymous_functions" + }, + { + "match": "(\\^[[:alpha:]0-9'._]+)", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "name": "keyword.fsharp", + "match": "\\b(and|when|or)\\b" + }, + { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "include": "#strp_inlined_body" + } + ] + }, + { + "match": "(static member|member)\\s*([[:alpha:]0-9'`<>^._]+|``[[:alpha:]0-9' <>^._]+``)\\s*(:)", + "captures": { + "1": { + "name": "keyword.fsharp" + }, + "2": { + "name": "variable.fsharp" + }, + "3": { + "name": "keyword.symbol.fsharp" + } + } + }, + { + "include": "#compiler_directives" + }, + { + "include": "#constants" + }, + { + "include": "#strings" + }, + { + "include": "#chars" + }, + { + "include": "#double_tick" + }, + { + "include": "#keywords" + }, + { + "include": "#text" + }, + { + "include": "#definition" + }, + { + "include": "#attributes" + }, + { + "include": "#keywords" + }, + { + "include": "#cexprs" + }, + { + "include": "#text" + } + ] + }, + "strp_inlined": { + "patterns": [ + { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "include": "#strp_inlined_body" + } + ] + } + ] + }, + "generic_declaration": { + "patterns": [ + { + "comments": "SRTP syntax support", + "begin": "(:)\\s*(\\()\\s*(static member|member)", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + }, + "2": { + "name": "keyword.symbol.fsharp" + }, + "3": { + "name": "keyword.fsharp" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "include": "#member_declaration" + } + ] + }, + { + "match": "(('|\\^)[[:alpha:]0-9'._]+)", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "include": "#variables" + }, + { + "include": "#keywords" + } + ] + }, + { + "name": "keyword.fsharp", + "match": "\\b(private|to|public|internal|function|yield!|yield|class|exception|match|delegate|of|new|in|as|if|then|else|elif|for|begin|end|inherit|do|let\\!|return\\!|return|interface|with|abstract|enum|member|try|finally|and|when|or|use|use\\!|struct|while|mutable|assert|base|done|downcast|downto|extern|fixed|global|lazy|upcast|not)(?!')\\b" + }, + { + "name": "keyword.symbol.fsharp", + "match": ":" + }, + { + "include": "#constants" + }, + { + "match": "(('|\\^)[[:alpha:]0-9'._]+)", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "begin": "(<)", + "end": "(>)", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "match": "(('|\\^)[[:alpha:]0-9'._]+)", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "include": "#tuple_signature" + }, + { + "include": "#generic_declaration" + } + ] + }, + { + "begin": "(\\()", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "match": "(([?[:alpha:]0-9'`^._ ]+))+", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "include": "#tuple_signature" + } + ] + }, + { + "match": "(?!when|and|or\\b)\\b([\\w0-9'`^._]+)", + "comments": "Here we need the \\w modifier in order to check that the words are allowed", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "match": "(\\|)", + "comments": "Prevent captures of `|>` as a keyword when defining custom operator like `<|>`", + "captures": { + "1": { + "name": "keyword.symbol.fsharp" + } + } + }, + { + "include": "#keywords" + } + ] + }, + "anonymous_record_declaration": { + "begin": "(\\{\\|)", + "end": "(\\|\\})", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "match": "[[:alpha:]0-9'`^_ ]+(:)", + "captures": { + "1": { + "name": "keyword.symbol.fsharp" + } + } + }, + { + "match": "([[:alpha:]0-9'`^_ ]+)", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "include": "#anonymous_record_declaration" + }, + { + "include": "#keywords" + } + ] + }, + "record_signature": { + "patterns": [ + { + "match": "[[:alpha:]0-9'`^_ ]+(=)([[:alpha:]0-9'`^_ ]+)", + "captures": { + "1": { + "name": "keyword.symbol.fsharp" + }, + "2": { + "name": "variable.parameter.fsharp" + } + } + }, + { + "begin": "({)", + "end": "(})", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "match": "[[:alpha:]0-9'`^_ ]+(=)([[:alpha:]0-9'`^_ ]+)", + "captures": { + "1": { + "name": "keyword.symbol.fsharp" + }, + "2": { + "name": "variable.parameter.fsharp" + } + } + }, + { + "include": "#record_signature" + } + ] + }, + { + "include": "#keywords" + } + ] + }, + "tuple_signature": { + "patterns": [ + { + "match": "(([?[:alpha:]0-9'`^._ ]+))+", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "begin": "(\\()", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "match": "(([?[:alpha:]0-9'`^._ ]+))+", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "include": "#tuple_signature" + } + ] + }, + { + "include": "#keywords" + } + ] + }, + "anonymous_functions": { + "patterns": [ + { + "name": "function.anonymous", + "begin": "\\b(fun)\\b", + "end": "(->)", + "beginCaptures": { + "1": { + "name": "keyword.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.arrow.fsharp" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "(\\()", + "end": "\\s*(?=(->))", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.arrow.fsharp" + } + }, + "patterns": [ + { + "include": "#member_declaration" + } + ] + }, + { + "include": "#variables" + } + ] + } + ] + }, + "attributes": { + "patterns": [ + { + "name": "support.function.attribute.fsharp", + "begin": "\\[\\<", + "end": "\\>\\]|\\]", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "comments": { + "patterns": [ + { + "name": "comment.literate.command.fsharp", + "match": "(\\(\\*{3}.*\\*{3}\\))", + "beginCaptures": { + "1": { + "name": "comment.block.fsharp" + } + } + }, + { + "name": "comment.block.markdown.fsharp", + "begin": "^\\s*(\\(\\*\\*(?!\\)))((?!\\*\\)).)*$", + "while": "^(?!\\s*(\\*)+\\)\\s*$)", + "beginCaptures": { + "1": { + "name": "comment.block.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "comment.block.fsharp" + } + }, + "patterns": [ + { + "include": "text.html.markdown" + } + ] + }, + { + "name": "comment.block.fsharp", + "begin": "(\\(\\*(?!\\)))", + "end": "(\\*+\\))", + "beginCaptures": { + "1": { + "name": "comment.block.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "comment.block.fsharp" + } + }, + "patterns": [ + { + "comments": "Capture // when inside of (* *) like that the rule which capture comments starting by // is not trigger. See https://github.com/ionide/ionide-fsgrammar/issues/155", + "name": "fast-capture.comment.line.double-slash.fsharp", + "match": "//" + }, + { + "include": "#comments" + } + ] + }, + { + "name": "comment.block.markdown.fsharp.end", + "match": "((?\\])?\\s*([_[:alpha:]0-9,\\._`\\s]+)(:)", + "end": "\\s*(with)\\b|=|$", + "beginCaptures": { + "1": { + "name": "keyword.fsharp" + }, + "2": { + "name": "keyword.fsharp" + }, + "3": { + "name": "support.function.attribute.fsharp" + }, + "5": { + "name": "keyword.symbol.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.fsharp" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#common_declaration" + }, + { + "match": "(\\?{0,1})([[:alpha:]0-9'`^._ ]+)\\s*(:)((?!with\\b)\\b([\\w0-9'`^._ ]+)){0,1}", + "captures": { + "1": { + "name": "keyword.symbol.fsharp" + }, + "2": { + "name": "variable.parameter.fsharp" + }, + "3": { + "name": "keyword.symbol.fsharp" + }, + "4": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "match": "(?!with|get|set\\b)\\b([\\w0-9'`^._]+)", + "comments": "Here we need the \\w modifier in order to check that the words isn't blacklisted", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "include": "#keywords" + } + ] + }, + "common_binding_definition": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#attributes" + }, + { + "comments": "SRTP syntax support", + "begin": "(:)\\s*(\\()\\s*(static member|member)", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + }, + "2": { + "name": "keyword.symbol.fsharp" + }, + "3": { + "name": "keyword.fsharp" + } + }, + "end": "(\\))\\s*((?=,)|(?=\\=))", + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "match": "(\\^[[:alpha:]0-9'._]+)", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "include": "#variables" + }, + { + "include": "#keywords" + } + ] + }, + { + "begin": "(:)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + }, + "2": { + "name": "keyword.symbol.fsharp" + } + }, + "end": "(\\)\\s*(([?[:alpha:]0-9'`^._ ]*)))", + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + }, + "2": { + "name": "entity.name.type.fsharp" + } + }, + "patterns": [ + { + "include": "#tuple_signature" + } + ] + }, + { + "begin": "(:)\\s*(\\^[[:alpha:]0-9'._]+)\\s*(when)", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + }, + "2": { + "name": "entity.name.type.fsharp" + }, + "3": { + "name": "keyword.fsharp" + } + }, + "end": "(?=:)", + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "name": "keyword.fsharp", + "match": "\\b(and|when|or)\\b" + }, + { + "comment": "Because we first capture the keywords, we can capture what looks like a word and assume it's an entity definition", + "match": "([[:alpha:]0-9'^._]+)", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "name": "keyword.symbol.fsharp", + "match": "(\\(|\\))" + } + ] + }, + { + "match": "(:)\\s*([?[:alpha:]0-9'`^._ ]+)", + "captures": { + "1": { + "name": "keyword.symbol.fsharp" + }, + "2": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "match": "(->)\\s*(\\()?\\s*([?[:alpha:]0-9'`^._ ]+)*", + "captures": { + "1": { + "name": "keyword.symbol.arrow.fsharp" + }, + "2": { + "name": "keyword.symbol.fsharp" + }, + "3": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "begin": "(\\*)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + }, + "2": { + "name": "keyword.symbol.fsharp" + } + }, + "end": "(\\)\\s*(([?[:alpha:]0-9'`^._ ]+))+)", + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + }, + "2": { + "name": "entity.name.type.fsharp" + } + }, + "patterns": [ + { + "include": "#tuple_signature" + } + ] + }, + { + "begin": "(\\*)(\\s*([?[:alpha:]0-9'`^._ ]+))*", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + }, + "2": { + "name": "entity.name.type.fsharp" + } + }, + "end": "(?==)|(?=\\))", + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "include": "#tuple_signature" + } + ] + }, + { + "begin": "(<+(?![[:space:]]*\\)))", + "beginComment": "The group (?![[:space:]]*\\) is for protection against overload operator. static member (<)", + "end": "((?|\\))", + "endComment": "The group (? when using SRTP synthax", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "include": "#generic_declaration" + } + ] + }, + { + "include": "#anonymous_record_declaration" + }, + { + "begin": "({)", + "end": "(})", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "include": "#record_signature" + } + ] + }, + { + "include": "#definition" + }, + { + "include": "#variables" + }, + { + "include": "#keywords" + } + ] + }, + "definition": { + "patterns": [ + { + "name": "binding.fsharp", + "begin": "\\b(let mutable|static let mutable|static let|let inline|let|and|member val|static member inline|static member|default|member|override|let!)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9\\._`\\s]+|(?<=,)\\s)*)?", + "end": "\\s*((with\\b)|(=|\\n+=|(?<=\\=)))", + "beginCaptures": { + "1": { + "name": "keyword.fsharp" + }, + "2": { + "name": "keyword.fsharp" + }, + "3": { + "name": "support.function.attribute.fsharp" + }, + "4": { + "name": "storage.modifier.fsharp" + }, + "5": { + "name": "variable.fsharp" + } + }, + "endCaptures": { + "2": { + "name": "keyword.fsharp" + }, + "3": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "include": "#common_binding_definition" + } + ] + }, + { + "name": "binding.fsharp", + "begin": "\\b(use|use!|and|and!)\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9\\._`\\s]+|(?<=,)\\s)*)?", + "end": "\\s*(=)", + "beginCaptures": { + "1": { + "name": "keyword.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "include": "#common_binding_definition" + } + ] + }, + { + "name": "binding.fsharp", + "begin": "(?<=with|and)\\s*\\b((get|set)\\s*(?=\\())(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9\\._`\\s]+|(?<=,)\\s)*)?", + "end": "\\s*(=|\\n+=|(?<=\\=))", + "beginCaptures": { + "4": { + "name": "variable.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "include": "#common_binding_definition" + } + ] + }, + { + "name": "binding.fsharp", + "begin": "\\b(static val mutable|val mutable|val)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9,\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9,\\._`\\s]+|(?<=,)\\s)*)?", + "end": "\\n$", + "beginCaptures": { + "1": { + "name": "keyword.fsharp" + }, + "2": { + "name": "keyword.fsharp" + }, + "3": { + "name": "support.function.attribute.fsharp" + }, + "4": { + "name": "storage.modifier.fsharp" + }, + "5": { + "name": "variable.fsharp" + } + }, + "patterns": [ + { + "include": "#common_binding_definition" + } + ] + }, + { + "name": "binding.fsharp", + "begin": "\\b(new)\\b\\s+(\\()", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "keyword.fsharp" + }, + "2": { + "name": "keyword.symbol.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "include": "#common_binding_definition" + } + ] + } + ] + }, + "du_declaration": { + "patterns": [ + { + "name": "du_declaration.fsharp", + "begin": "\\b(of)\\b", + "end": "$|(\\|)", + "beginCaptures": { + "1": { + "name": "keyword.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "match": "([[:alpha:]0-9'`<>^._]+|``[[:alpha:]0-9' <>^._]+``)\\s*(:)\\s*([[:alpha:]0-9'`<>^._]+|``[[:alpha:]0-9' <>^._]+``)", + "captures": { + "1": { + "name": "variable.parameter.fsharp" + }, + "2": { + "name": "keyword.symbol.fsharp" + }, + "3": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "match": "(``([[:alpha:]0-9'^._ ]+)``|[[:alpha:]0-9'`^._]+)", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "include": "#anonymous_record_declaration" + }, + { + "include": "#keywords" + } + ] + } + ] + }, + "keywords": { + "patterns": [ + { + "name": "storage.modifier", + "match": "\\b(private|public|internal)\\b" + }, + { + "name": "keyword.fsharp", + "match": "\\b(private|to|public|internal|function|class|exception|delegate|of|new|as|begin|end|inherit|let!|interface|abstract|enum|member|and|when|or|use|use\\!|struct|mutable|assert|base|done|downcast|downto|extern|fixed|global|lazy|upcast|not)(?!')\\b" + }, + { + "name": "keyword.control", + "match": "\\b(match|yield|yield!|with|if|then|else|elif|for|in|return!|return|try|finally|while|do)(?!')\\b" + }, + { + "name": "keyword.symbol.arrow.fsharp", + "match": "(\\->|\\<\\-)" + }, + { + "name": "keyword.symbol.fsharp", + "match": "(&&&|\\|\\|\\||\\^\\^\\^|~~~|<<<|>>>|\\|>|:>|:\\?>|:|\\[|\\]|\\;|<>|=|@|\\|\\||&&|{|}|\\||_|\\.\\.|\\,|\\+|\\-|\\*|\\/|\\^|\\!|\\>|\\>\\=|\\>\\>|\\<|\\<\\=|\\(|\\)|\\<\\<)" + } + ] + }, + "modules": { + "patterns": [ + { + "name": "entity.name.section.fsharp", + "begin": "\\b(namespace global)|\\b(namespace|module)\\s*(public|internal|private|rec)?\\s+([[:alpha:]][[:alpha:]0-9'_. ]*)", + "end": "(\\s?=|\\s|$)", + "beginCaptures": { + "1": { + "name": "keyword.fsharp" + }, + "2": { + "name": "keyword.fsharp" + }, + "3": { + "name": "storage.modifier.fsharp" + }, + "4": { + "name": "entity.name.section.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "name": "entity.name.section.fsharp", + "match": "(\\.)([A-Z][[:alpha:]0-9'_]*)", + "captures": { + "1": { + "name": "punctuation.separator.namespace-reference.fsharp" + }, + "2": { + "name": "entity.name.section.fsharp" + } + } + } + ] + }, + { + "name": "namespace.open.fsharp", + "begin": "\\b(open type|open)\\s+([[:alpha:]][[:alpha:]0-9'_]*)(?=(\\.[A-Z][[:alpha:]0-9_]*)*)", + "end": "(\\s|$)", + "beginCaptures": { + "1": { + "name": "keyword.fsharp" + }, + "2": { + "name": "entity.name.section.fsharp" + } + }, + "patterns": [ + { + "name": "entity.name.section.fsharp", + "match": "(\\.)([[:alpha:]][[:alpha:]0-9'_]*)", + "captures": { + "1": { + "name": "punctuation.separator.namespace-reference.fsharp" + }, + "2": { + "name": "entity.name.section.fsharp" + } + } + }, + { + "include": "#comments" + } + ] + }, + { + "name": "namespace.alias.fsharp", + "begin": "^\\s*(module)\\s+([A-Z][[:alpha:]0-9'_]*)\\s*(=)\\s*([A-Z][[:alpha:]0-9'_]*)", + "end": "(\\s|$)", + "beginCaptures": { + "1": { + "name": "keyword.fsharp" + }, + "2": { + "name": "entity.name.type.namespace.fsharp" + }, + "3": { + "name": "keyword.symbol.fsharp" + }, + "4": { + "name": "entity.name.section.fsharp" + } + }, + "patterns": [ + { + "name": "entity.name.section.fsharp", + "match": "(\\.)([A-Z][[:alpha:]0-9'_]*)", + "captures": { + "1": { + "name": "punctuation.separator.namespace-reference.fsharp" + }, + "2": { + "name": "entity.name.section.fsharp" + } + } + } + ] + } + ] + }, + "strings": { + "patterns": [ + { + "name": "string.quoted.literal.fsharp", + "begin": "(?=[^\\\\])(@\")", + "end": "(\")(?!\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.fsharp" + } + }, + "patterns": [ + { + "name": "constant.character.string.escape.fsharp", + "match": "\"(\")" + } + ] + }, + { + "name": "string.quoted.triple.fsharp", + "begin": "(?=[^\\\\])(\"\"\")", + "end": "(\"\"\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.fsharp" + } + }, + "patterns": [ + { + "include": "#string_formatter" + } + ] + }, + { + "name": "string.quoted.double.fsharp", + "begin": "(?=[^\\\\])(\")", + "end": "(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.fsharp" + } + }, + "patterns": [ + { + "name": "punctuation.separator.string.ignore-eol.fsharp", + "match": "\\\\$[ \\t]*" + }, + { + "name": "constant.character.string.escape.fsharp", + "match": "\\\\(['\"\\\\abfnrtv]|([01][0-9][0-9]|2[0-4][0-9]|25[0-5])|(x[0-9a-fA-F]{2})|(u[0-9a-fA-F]{4})|(U00(0[0-9a-fA-F]|10)[0-9a-fA-F]{4}))" + }, + { + "name": "invalid.illegal.character.string.fsharp", + "match": "\\\\(([0-9]{1,3})|(x[^\\s]{0,2})|(u[^\\s]{0,4})|(U[^\\s]{0,8})|[^\\s])" + }, + { + "include": "#string_formatter" + } + ] + } + ] + }, + "string_formatter": { + "patterns": [ + { + "name": "entity.name.type.format.specifier.fsharp", + "match": "(%0?-?(\\d+)?((a|t)|(\\.\\d+)?(f|F|e|E|g|G|M)|(b|c|s|d|i|x|X|o|u)|(s|b|O)|(\\+?A)))", + "captures": { + "1": { + "name": "keyword.format.specifier.fsharp" + } + } + } + ] + }, + "variables": { + "patterns": [ + { + "name": "keyword.symbol.fsharp", + "match": "\\(\\)" + }, + { + "match": "(\\?{0,1})(``[[:alpha:]0-9'`^:,._ ]+``|(?!private\\b)\\b[\\w[:alpha:]0-9'`<>^._ ]+)", + "captures": { + "1": { + "name": "keyword.symbol.fsharp" + }, + "2": { + "name": "variable.parameter.fsharp" + } + } + } + ] + }, + "common_declaration": { + "patterns": [ + { + "begin": "\\s*(->)\\s*([[:alpha:]0-9'`^._ ]+)(<)", + "end": "(>)", + "beginCaptures": { + "1": { + "name": "keyword.symbol.arrow.fsharp" + }, + "2": { + "name": "entity.name.type.fsharp" + }, + "3": { + "name": "keyword.symbol.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "match": "([[:alpha:]0-9'`^._ ]+)", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "include": "#keywords" + } + ] + }, + { + "match": "\\s*(->)\\s*(?!with|get|set\\b)\\b([\\w0-9'`^._]+)", + "captures": { + "1": { + "name": "keyword.symbol.arrow.fsharp" + }, + "2": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "include": "#anonymous_record_declaration" + }, + { + "begin": "(\\?{0,1})([[:alpha:]0-9'`^._ ]+)\\s*(:)(\\s*([?[:alpha:]0-9'`^._ ]+)(<))", + "end": "(>)", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + }, + "2": { + "name": "variable.parameter.fsharp" + }, + "3": { + "name": "keyword.symbol.fsharp" + }, + "4": { + "name": "keyword.symbol.fsharp" + }, + "5": { + "name": "entity.name.type.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "match": "([[:alpha:]0-9'`^._ ]+)", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "include": "#keywords" + } + ] + } + ] + }, + "member_declaration": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#common_declaration" + }, + { + "comments": "SRTP syntax support", + "begin": "(:)\\s*(\\()\\s*(static member|member)", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + }, + "2": { + "name": "keyword.symbol.fsharp" + }, + "3": { + "name": "keyword.fsharp" + } + }, + "end": "(\\))\\s*((?=,)|(?=\\=))", + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "include": "#member_declaration" + } + ] + }, + { + "match": "(\\^[[:alpha:]0-9'._]+)", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "include": "#variables" + }, + { + "include": "#keywords" + } + ] + }, + { + "match": "(\\^[[:alpha:]0-9'._]+)", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "name": "keyword.fsharp", + "match": "\\b(and|when|or)\\b" + }, + { + "name": "keyword.symbol.fsharp", + "match": "(\\(|\\))" + }, + { + "match": "(\\?{0,1})([[:alpha:]0-9'`^._]+|``[[:alpha:]0-9'`^:,._ ]+``)\\s*(:{0,1})(\\s*([?[:alpha:]0-9'`<>._ ]+)){0,1}", + "captures": { + "1": { + "name": "keyword.symbol.fsharp" + }, + "2": { + "name": "variable.parameter.fsharp" + }, + "3": { + "name": "keyword.symbol.fsharp" + }, + "4": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "include": "#keywords" + } + ] + }, + "double_tick": { + "patterns": [ + { + "name": "variable.other.binding.fsharp", + "match": "(``)([^`]*)(``)", + "captures": { + "1": { + "name": "string.quoted.single.fsharp" + }, + "2": { + "name": "variable.other.binding.fsharp" + }, + "3": { + "name": "string.quoted.single.fsharp" + } + } + } + ] + }, + "records": { + "patterns": [ + { + "name": "record.fsharp", + "begin": "\\b(type)[\\s]+(private|internal|public)?\\s*", + "end": "\\s*((with)|((as)\\s+([[:alpha:]0-9']+))|(=)|[\\n=]|(\\(\\)))", + "beginCaptures": { + "1": { + "name": "keyword.fsharp" + }, + "2": { + "name": "storage.modifier.fsharp" + } + }, + "endCaptures": { + "2": { + "name": "keyword.fsharp" + }, + "3": { + "name": "keyword.fsharp" + }, + "4": { + "name": "keyword.fsharp" + }, + "5": { + "name": "variable.parameter.fsharp" + }, + "6": { + "name": "keyword.symbol.fsharp" + }, + "7": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#attributes" + }, + { + "match": "([[:alpha:]0-9'^._]+|``[[:alpha:]0-9'`^:,._ ]+``)", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "begin": "(<)", + "end": "((?)", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "match": "(('|\\^)``[[:alpha:]0-9`^:,._ ]+``|('|\\^)[[:alpha:]0-9`^:._]+)", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "name": "keyword.fsharp", + "match": "\\b(interface|with|abstract|and|when|or|not|struct|equality|comparison|unmanaged|delegate|enum)\\b" + }, + { + "begin": "(\\()", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "match": "(static member|member|new)", + "captures": { + "1": { + "name": "keyword.fsharp" + } + } + }, + { + "include": "#common_binding_definition" + } + ] + }, + { + "match": "([\\w0-9'`^._]+)", + "comments": "Here we need the \\w modifier in order to check that the words isn't blacklisted", + "captures": { + "1": { + "name": "entity.name.type.fsharp" + } + } + }, + { + "include": "#keywords" + } + ] + }, + { + "match": "\\s*(private|internal|public)", + "captures": { + "1": { + "name": "storage.modifier.fsharp" + } + } + }, + { + "begin": "(\\()", + "end": "\\s*(?=(=)|[\\n=]|(\\(\\))|(as))", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "patterns": [ + { + "include": "#member_declaration" + } + ] + }, + { + "include": "#keywords" + } + ] + } + ] + }, + "record_declaration": { + "patterns": [ + { + "begin": "(\\{)", + "beginCaptures": { + "1": { + "name": "keyword.symbol.fsharp" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "(((mutable)\\s[[:alpha:]]+)|[[:alpha:]0-9'`<>^._]*)\\s*((?=|==|<|>|!=", + "name": "keyword.operator.comparison.gdscript" + }, + "arithmetic_op": { + "match": "\\+=|-=|\\*=|/=|%=|&=|\\|=|\\*|/|%|\\+|-|<<|>>|&|\\||\\^|~", + "name": "keyword.operator.arithmetic.gdscript" + }, + "assignment_op": { + "match": "=", + "name": "keyword.operator.assignment.gdscript" + }, + "control_flow": { + "match": "\\b(?i:if|elif|else|for|while|break|continue|pass|return|match|yield|await)\\b", + "name": "keyword.control.gdscript" + }, + "keywords": { + "match": "\\b(?i:class|class_name|extends|is|onready|tool|static|export|as|void|enum|preload|assert|breakpoint|rpc|sync|remote|master|puppet|slave|remotesync|mastersync|puppetsync|trait|namespace)\\b", + "name": "keyword.language.gdscript" + }, + "letter": { + "match": "\\b(?i:true|false|null)\\b", + "name": "constant.language.gdscript" + }, + "numbers": { + "patterns": [ + { + "match": "\\b(?i:0x\\h*)\\b", + "name": "constant.numeric.integer.hexadecimal.gdscript" + }, + { + "match": "\\b(?i:(\\d+\\.\\d*(e[\\-\\+]?\\d+)?))\\b", + "name": "constant.numeric.float.gdscript" + }, + { + "match": "\\b(?i:(\\.\\d+(e[\\-\\+]?\\d+)?))\\b", + "name": "constant.numeric.float.gdscript" + }, + { + "match": "\\b(?i:(\\d+e[\\-\\+]?\\d+))\\b", + "name": "constant.numeric.float.gdscript" + }, + { + "match": "\\b\\d+\\b", + "name": "constant.numeric.integer.gdscript" + } + ] + }, + "variable_definition": { + "begin": "\\b(?:(var)|(const))\\s+", + "end": "$|;", + "beginCaptures": { + "1": { + "name": "storage.type.var.gdscript" + }, + "2": { + "name": "storage.type.const.gdscript" + } + }, + "patterns": [ + { + "match": "(:)\\s*([a-zA-Z_]\\w*)?", + "captures": { + "1": { + "name": "punctuation.separator.annotation.gdscript" + }, + "2": { + "name": "entity.name.type.class.gdscript" + } + } + }, + { + "match": "=(?!=)", + "name": "keyword.operator.assignment.gdscript" + }, + { + "match": "(setget)\\s+([a-zA-Z_]\\w*)(?:[,]\\s*([a-zA-Z_]\\w*))?", + "captures": { + "1": { + "name": "storage.type.const.gdscript" + }, + "2": { + "name": "entity.name.function.gdscript" + }, + "3": { + "name": "entity.name.function.gdscript" + } + } + }, + { + "include": "#base_expression" + } + ] + }, + "getter_setter_godot4": { + "patterns": [ + { + "match": "\\b(get):", + "captures": { + "1": { + "name": "entity.name.function.gdscript" + } + } + }, + { + "name": "meta.function.gdscript", + "begin": "(?x) \\s+\n (set) \\s*\n (?=\\()", + "end": "(:|(?=[#'\"\\n]))", + "beginCaptures": { + "1": { + "name": "entity.name.function.gdscript" + } + }, + "patterns": [ + { + "include": "#parameters" + }, + { + "include": "#line_continuation" + }, + { + "match": "\\s*(\\-\\>)\\s*([a-zA-Z_]\\w*)\\s*\\:", + "captures": { + "1": {}, + "2": { + "name": "entity.name.type.class.gdscript" + } + } + } + ] + } + ] + }, + "class_definition": { + "captures": { + "1": { + "name": "entity.name.type.class.gdscript" + }, + "2": { + "name": "class.other.gdscript" + } + }, + "match": "(?<=^class)\\s+([a-zA-Z_]\\w*)\\s*(?=:)" + }, + "class_new": { + "captures": { + "1": { + "name": "entity.name.type.class.gdscript" + }, + "2": { + "name": "storage.type.new.gdscript" + } + }, + "match": "\\b([a-zA-Z_]\\w*).(new)\\(" + }, + "class_is": { + "captures": { + "1": { + "name": "storage.type.is.gdscript" + }, + "2": { + "name": "entity.name.type.class.gdscript" + } + }, + "match": "\\s+(is)\\s+([a-zA-Z_]\\w*)" + }, + "class_enum": { + "captures": { + "1": { + "name": "entity.name.type.class.gdscript" + }, + "2": { + "name": "constant.language.gdscript" + } + }, + "match": "\\b([A-Z][a-zA-Z_0-9]*)\\.([A-Z_0-9]+)" + }, + "class_name": { + "captures": { + "1": { + "name": "entity.name.type.class.gdscript" + }, + "2": { + "name": "class.other.gdscript" + } + }, + "match": "(?<=class_name)\\s+([a-zA-Z_]\\w*(\\.([a-zA-Z_]\\w*))?)" + }, + "extends": { + "match": "(?<=extends)\\s+[a-zA-Z_]\\w*(\\.([a-zA-Z_]\\w*))?", + "name": "entity.other.inherited-class.gdscript" + }, + "builtin_func": { + "match": "(?)\\s*([a-zA-Z_]\\w*)\\s*\\:", + "captures": { + "1": {}, + "2": { + "name": "entity.name.type.class.gdscript" + } + } + } + ] + }, + "lambda_declaration": { + "name": "meta.function.gdscript", + "begin": "(func)(?=\\()", + "end": "(:|(?=[#'\"\\n]))", + "beginCaptures": { + "1": { + "name": "storage.type.function.gdscript" + }, + "2": { + "name": "entity.name.function.gdscript" + } + }, + "patterns": [ + { + "include": "#parameters" + }, + { + "include": "#line_continuation" + } + ] + }, + "function_declaration": { + "name": "meta.function.gdscript", + "begin": "(?x) \\s*\n (func) \\s+\n ([a-zA-Z_]\\w*) \\s*\n (?=\\()", + "end": "((:)|(?=[#'\"\\n]))", + "beginCaptures": { + "1": { + "name": "storage.type.function.gdscript" + }, + "2": { + "name": "entity.name.function.gdscript" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.section.function.begin.gdscript" + } + }, + "patterns": [ + { + "include": "#parameters" + }, + { + "include": "#line_continuation" + }, + { + "match": "\\s*(\\-\\>)\\s*([a-zA-Z_]\\w*)\\s*\\:", + "captures": { + "1": {}, + "2": { + "name": "entity.name.type.class.gdscript" + } + } + }, + { + "include": "#base_expression" + } + ] + }, + "function_keyword": { + "match": "func", + "name": "keyword.language.gdscript" + }, + "parameters": { + "name": "meta.function.parameters.gdscript", + "begin": "(\\()", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.parameters.begin.gdscript" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.gdscript" + } + }, + "patterns": [ + { + "include": "#annotated_parameter" + }, + { + "match": "(?x)\n ([a-zA-Z_]\\w*)\n \\s* (?: (,) | (?=[)#\\n=]))\n", + "captures": { + "1": { + "name": "variable.parameter.function.language.gdscript" + }, + "2": { + "name": "punctuation.separator.parameters.gdscript" + } + } + }, + { + "include": "#comment" + }, + { + "include": "#loose_default" + } + ] + }, + "loose_default": { + "begin": "(=)", + "end": "(,)|(?=\\))", + "beginCaptures": { + "1": { + "name": "keyword.operator.gdscript" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.separator.parameters.gdscript" + } + }, + "patterns": [ + { + "include": "#base_expression" + } + ] + }, + "annotated_parameter": { + "begin": "(?x)\n \\b\n ([a-zA-Z_]\\w*) \\s* (:)\n", + "end": "(,)|(?=\\))", + "beginCaptures": { + "1": { + "name": "variable.parameter.function.language.gdscript" + }, + "2": { + "name": "punctuation.separator.annotation.gdscript" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.separator.parameters.gdscript" + } + }, + "patterns": [ + { + "include": "#base_expression" + }, + { + "name": "keyword.operator.assignment.gdscript", + "match": "=(?!=)" + } + ] + }, + "line_continuation": { + "patterns": [ + { + "match": "(\\\\)\\s*(\\S.*$\\n?)", + "captures": { + "1": { + "name": "punctuation.separator.continuation.line.gdscript" + }, + "2": { + "name": "invalid.illegal.line.continuation.gdscript" + } + } + }, + { + "begin": "(\\\\)\\s*$\\n?", + "end": "(?x)\n (?=^\\s*$)\n |\n (?! (\\s* [rR]? (\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))\n |\n (\\G $) (?# '\\G' is necessary for ST)\n )\n", + "beginCaptures": { + "1": { + "name": "punctuation.separator.continuation.line.gdscript" + } + }, + "patterns": [ + { + "include": "#base_expression" + } + ] + } + ] + }, + "any_method": { + "match": "\\b([A-Za-z_]\\w*)\\b(?=\\s*(?:[(]))", + "name": "support.function.any-method.gdscript" + }, + "any_property": { + "match": "(?<=[^.]\\.)\\b([A-Za-z_]\\w*)\\b(?![(])", + "name": "variable.other.property.gdscript" + }, + "function_call": { + "name": "meta.function-call.gdscript", + "comment": "Regular function call of the type \"name(args)\"", + "begin": "(?x)\n \\b(?=\n ([a-zA-Z_]\\w*) \\s* (\\()\n )\n", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.gdscript" + } + }, + "patterns": [ + { + "include": "#function_name" + }, + { + "include": "#function_arguments" + } + ] + }, + "function_name": { + "patterns": [ + { + "include": "#builtin_func" + }, + { + "include": "#builtin_classes" + }, + { + "comment": "Some color schemas support meta.function-call.generic scope", + "name": "support.function.any-method.gdscript", + "match": "(?x)\n \\b ([a-zA-Z_]\\w*) \\b\n" + } + ] + }, + "function_arguments": { + "begin": "(\\()", + "end": "(?=\\))(?!\\)\\s*\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.gdscript" + } + }, + "contentName": "meta.function-call.arguments.gdscript", + "patterns": [ + { + "name": "punctuation.separator.arguments.gdscript", + "match": "(,)" + }, + { + "match": "\\b([a-zA-Z_]\\w*)\\s*(=)(?!=)", + "captures": { + "1": { + "name": "variable.parameter.function-call.gdscript" + }, + "2": { + "name": "keyword.operator.assignment.gdscript" + } + } + }, + { + "name": "keyword.operator.assignment.gdscript", + "match": "=(?!=)" + }, + { + "include": "#base_expression" + }, + { + "match": "\\s*(\\))\\s*(\\()", + "captures": { + "1": { + "name": "punctuation.definition.arguments.end.gdscript" + }, + "2": { + "name": "punctuation.definition.arguments.begin.gdscript" + } + } + } + ] + } + } +} diff --git a/src/lib/shiki/languages/gdshader.tmLanguage.json b/src/lib/shiki/languages/gdshader.tmLanguage.json new file mode 100644 index 0000000..9221f38 --- /dev/null +++ b/src/lib/shiki/languages/gdshader.tmLanguage.json @@ -0,0 +1,403 @@ +{ + "name": "gdshader", + "scopeName": "source.gdshader", + "uuid": "3a95d25d-688b-481f-a581-eee47f00e5ca", + "fileTypes": ["gdshader"], + "patterns": [ + { + "include": "#any" + } + ], + "repository": { + "any": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#enclosed" + }, + { + "include": "#classifier" + }, + { + "include": "#definition" + }, + { + "include": "#keyword" + }, + { + "include": "#element" + }, + { + "include": "#separator" + }, + { + "include": "#operator" + } + ] + }, + "comment": { + "patterns": [ + { + "include": "#commentLine" + }, + { + "include": "#commentBlock" + } + ] + }, + "commentLine": { + "name": "comment.line.double-slash.gdshader", + "begin": "//", + "end": "$" + }, + "commentBlock": { + "name": "comment.block.gdshader", + "begin": "/\\*", + "end": "\\*/" + }, + "enclosed": { + "name": "meta.parenthesis.gdshader", + "begin": "\\(", + "end": "\\)", + "captures": { + "0": { + "name": "punctuation.parenthesis.gdshader" + } + }, + "patterns": [ + { + "include": "#any" + } + ] + }, + "classifier": { + "name": "meta.classifier.gdshader", + "begin": "(?=\\b(?:shader_type|render_mode)\\b)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#keyword" + }, + { + "include": "#identifierClassification" + }, + { + "include": "#separator" + } + ], + "end": "(?<=;)" + }, + "classifierKeyword": { + "name": "keyword.language.classifier.gdshader", + "match": "\\b(?:shader_type|render_mode)\\b" + }, + "identifierClassification": { + "name": "entity.other.inherited-class.gdshader", + "match": "\\b[a-z_]+\\b" + }, + "definition": { + "patterns": [ + { + "include": "#structDefinition" + } + ] + }, + "arraySize": { + "name": "meta.array-size.gdshader", + "begin": "\\[", + "end": "\\]", + "captures": { + "0": { + "name": "punctuation.bracket.gdshader" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#keyword" + }, + { + "include": "#element" + }, + { + "include": "#separator" + } + ] + }, + "structDefinition": { + "begin": "(?=\\b(?:struct)\\b)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#keyword" + }, + { + "include": "#structName" + }, + { + "include": "#structDefinitionBlock" + }, + { + "include": "#separator" + } + ], + "end": "(?<=;)" + }, + "structKeyword": { + "name": "keyword.other.struct.gdshader", + "match": "\\b(?:struct)\\b" + }, + "structName": { + "name": "entity.name.type.struct.gdshader", + "match": "\\b[a-zA-Z_]\\w*\\b" + }, + "structDefinitionBlock": { + "name": "meta.definition.block.struct.gdshader", + "begin": "\\{", + "end": "\\}", + "captures": { + "0": { + "name": "punctuation.definition.block.struct.gdshader" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#precisionKeyword" + }, + { + "include": "#fieldDefinition" + }, + { + "include": "#keyword" + }, + { + "include": "#any" + } + ] + }, + "fieldDefinition": { + "name": "meta.definition.field.gdshader", + "begin": "\\b[a-zA-Z_]\\w*\\b", + "beginCaptures": { + "0": { + "patterns": [ + { + "include": "#typeKeyword" + }, + { + "match": ".+", + "name": "entity.name.type.gdshader" + } + ] + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#keyword" + }, + { + "include": "#arraySize" + }, + { + "include": "#fieldName" + }, + { + "include": "#any" + } + ], + "end": "(?<=;)" + }, + "fieldName": { + "name": "entity.name.variable.field.gdshader", + "match": "\\b[a-zA-Z_]\\w*\\b" + }, + "keyword": { + "patterns": [ + { + "include": "#classifierKeyword" + }, + { + "include": "#structKeyword" + }, + { + "include": "#controlKeyword" + }, + { + "include": "#modifierKeyword" + }, + { + "include": "#precisionKeyword" + }, + { + "include": "#typeKeyword" + }, + { + "include": "#hintKeyword" + } + ] + }, + "controlKeyword": { + "name": "keyword.control.gdshader", + "match": "\\b(?:if|else|do|while|for|continue|break|switch|case|default|return|discard)\\b" + }, + "modifierKeyword": { + "name": "storage.modifier.gdshader", + "match": "\\b(?:const|global|instance|uniform|varying|in|out|inout|flat|smooth)\\b" + }, + "precisionKeyword": { + "name": "storage.type.built-in.primitive.precision.gdshader", + "match": "\\b(?:low|medium|high)p\\b" + }, + "typeKeyword": { + "name": "support.type.gdshader", + "match": "\\b(?:void|bool|[biu]?vec[234]|u?int|float|mat[234]|[iu]?sampler(?:3D|2D(?:Array)?)|samplerCube)\\b" + }, + "hintKeyword": { + "name": "support.type.annotation.gdshader", + "match": "\\b(?:source_color|hint_(?:color|range|(?:black_)?albedo|normal|(?:default_)?(?:white|black)|aniso|anisotropy|roughness_(?:[rgba]|normal|gray))|filter_(?:nearest|linear)(?:_mipmap(?:_anisotropic)?)?|repeat_(?:en|dis)able)\\b" + }, + "element": { + "patterns": [ + { + "include": "#literalFloat" + }, + { + "include": "#literalInt" + }, + { + "include": "#literalBool" + }, + { + "include": "#identifierType" + }, + { + "include": "#constructor" + }, + { + "include": "#processorFunction" + }, + { + "include": "#identifierFunction" + }, + { + "include": "#swizzling" + }, + { + "include": "#identifierField" + }, + { + "include": "#constantFloat" + }, + { + "include": "#languageVariable" + }, + { + "include": "#identifierVariable" + } + ] + }, + "literalFloat": { + "name": "constant.numeric.float.gdshader", + "match": "\\b(?:\\d+[eE][-+]?\\d+|(?:\\d*[.]\\d+|\\d+[.])(?:[eE][-+]?\\d+)?)[fF]?" + }, + "literalInt": { + "name": "constant.numeric.integer.gdshader", + "match": "\\b(?:0[xX][0-9A-Fa-f]+|\\d+[uU]?)\\b" + }, + "literalBool": { + "name": "constant.language.boolean.gdshader", + "match": "\\b(?:false|true)\\b" + }, + "identifierType": { + "name": "entity.name.type.gdshader", + "match": "\\b[a-zA-Z_]\\w*(?=(?:\\s*\\[\\s*\\w*\\s*\\])?\\s+[a-zA-Z_]\\w*\\b)" + }, + "constructor": { + "name": "entity.name.type.constructor.gdshader", + "match": "\\b[a-zA-Z_]\\w*(?=\\s*\\[\\s*\\w*\\s*\\]\\s*[(])|\\b[A-Z]\\w*(?=\\s*[(])" + }, + "processorFunction": { + "name": "support.function.gdshader", + "match": "\\b(?:vertex|fragment|light|start|process|sky|fog)(?=(?:\\s|/\\*(?:\\*(?!/)|[^*])*\\*/)*[(])" + }, + "identifierFunction": { + "name": "entity.name.function.gdshader", + "match": "\\b[a-zA-Z_]\\w*(?=(?:\\s|/\\*(?:\\*(?!/)|[^*])*\\*/)*[(])" + }, + "swizzling": { + "match": "([.])\\s*([xyzw]{2,4}|[rgba]{2,4}|[stpq]{2,4})\\b", + "captures": { + "1": { + "name": "punctuation.accessor.gdshader" + }, + "2": { + "name": "variable.other.property.gdshader" + } + } + }, + "identifierField": { + "match": "([.])\\s*([a-zA-Z_]\\w*)\\b(?!\\s*\\()", + "captures": { + "1": { + "name": "punctuation.accessor.gdshader" + }, + "2": { + "name": "entity.name.variable.field.gdshader" + } + } + }, + "constantFloat": { + "name": "constant.language.float.gdshader", + "match": "\\b(?:E|PI|TAU)\\b" + }, + "languageVariable": { + "name": "variable.language.gdshader", + "match": "\\b(?:[A-Z][A-Z_0-9]*)\\b" + }, + "identifierVariable": { + "name": "variable.name.gdshader", + "match": "\\b[a-zA-Z_]\\w*\\b" + }, + "separator": { + "patterns": [ + { + "match": "[.]", + "name": "punctuation.accessor.gdshader" + }, + { + "include": "#separatorComma" + }, + { + "match": "[;]", + "name": "punctuation.terminator.statement.gdshader" + }, + { + "match": "[:]", + "name": "keyword.operator.type.annotation.gdshader" + } + ] + }, + "separatorComma": { + "name": "punctuation.separator.comma.gdshader", + "match": "[,]" + }, + "operator": { + "name": "keyword.operator.gdshader", + "match": "\\<\\<\\=?|\\>\\>\\=?|[-+*/&|<>=!]\\=|\\&\\&|[|][|]|[-+~!*/%<>&^|=]" + } + } +} diff --git a/src/lib/shiki/languages/gherkin.tmLanguage.json b/src/lib/shiki/languages/gherkin.tmLanguage.json new file mode 100644 index 0000000..3b33010 --- /dev/null +++ b/src/lib/shiki/languages/gherkin.tmLanguage.json @@ -0,0 +1,132 @@ +{ + "fileTypes": ["feature"], + "firstLineMatch": "기능|機能|功能|フィーチャ|خاصية|תכונה|Функціонал|Функционалност|Функционал|Особина|Функция|Функциональность|Свойство|Могућност|Özellik|Właściwość|Tính năng|Savybė|Požiadavka|Požadavek|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Fīča|Funzionalità|Funktionalität|Funkcionalnost|Funkcionalitāte|Funcționalitate|Functionaliteit|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Ability|Business Need|Feature|Egenskap|Egenskab|Crikey|Característica|Arwedd(.*)", + "foldingStartMarker": "^\\s*\\b(예|시나리오 개요|시나리오|배경|背景|場景大綱|場景|场景大纲|场景|劇本大綱|劇本|例子|例|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|シナリオ|サンプル|سيناريو مخطط|سيناريو|امثلة|الخلفية|תרחיש|תבנית תרחיש|רקע|דוגמאות|Тарих|Сценарій|Сценарији|Сценарио|Сценарий структураси|Сценарий|Структура сценарію|Структура сценарија|Структура сценария|Скица|Рамка на сценарий|Примери|Пример|Приклади|Предыстория|Предистория|Позадина|Передумова|Основа|Мисоллар|Концепт|Контекст|Значения|Örnekler|Założenia|Wharrimean is|Voorbeelden|Variantai|Tình huống|The thing of it is|Tausta|Taust|Tapausaihio|Tapaus|Tapaukset|Szenariogrundriss|Szenario|Szablon scenariusza|Stsenaarium|Struktura scenarija|Skica|Skenario konsep|Skenario|Situācija|Senaryo taslağı|Senaryo|Scénář|Scénario|Schema dello scenario|Scenārijs pēc parauga|Scenārijs|Scenár|Scenariusz|Scenariul de şablon|Scenariul de sablon|Scenariu|Scenarios|Scenario Outline|Scenario Amlinellol|Scenario|Example|Scenarijus|Scenariji|Scenarijaus šablonas|Scenarijai|Scenarij|Scenarie|Rerefons|Raamstsenaarium|Příklady|Példák|Príklady|Przykłady|Primjeri|Primeri|Primer|Pozadí|Pozadina|Pozadie|Plan du scénario|Plan du Scénario|Piemēri|Pavyzdžiai|Paraugs|Osnova scénáře|Osnova|Náčrt Scénáře|Náčrt Scenáru|Mate|MISHUN SRSLY|MISHUN|Kịch bản|Kontext|Konteksts|Kontekstas|Kontekst|Koncept|Khung tình huống|Khung kịch bản|Juhtumid|Háttér|Grundlage|Geçmiş|Forgatókönyv vázlat|Forgatókönyv|Exemplos|Exemples|Exemplele|Exempel|Examples|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esempi|Escenario|Escenari|Enghreifftiau|Eksempler|Ejemplos|EXAMPLZ|Dữ liệu|Dis is what went down|Dasar|Contoh|Contexto|Contexte|Contesto|Condiţii|Conditii|Cobber|Cenário|Cenario|Cefndir|Bối cảnh|Blokes|Beispiele|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|All y'all|Achtergrond|Abstrakt Scenario|Abstract Scenario|Rule|Regla|Règle|Regel|Regra)", + "foldingStopMarker": "^\\s*$", + "keyEquivalent": "^~C", + "name": "gherkin", + "patterns": [ + { + "include": "#feature_element_keyword" + }, + { + "include": "#feature_keyword" + }, + { + "include": "#step_keyword" + }, + { + "include": "#strings_triple_quote" + }, + { + "include": "#strings_single_quote" + }, + { + "include": "#strings_double_quote" + }, + { + "include": "#comments" + }, + { + "include": "#tags" + }, + { + "include": "#scenario_outline_variable" + }, + { + "include": "#table" + } + ], + "repository": { + "comments": { + "captures": { + "0": { + "name": "comment.line.number-sign" + } + }, + "match": "^\\s*(#.*)" + }, + "table": { + "begin": "^\\s*\\|", + "end": "\\|\\s*$", + "name": "keyword.control.cucumber.table", + "patterns": [ + { + "match": "\\w", + "name": "source" + } + ] + }, + "feature_keyword": { + "captures": { + "1": { + "name": "keyword.language.gherkin.feature" + }, + "2": { + "name": "string.language.gherkin.feature.title" + } + }, + "match": "^\\s*(기능|機能|功能|フィーチャ|خاصية|תכונה|Функціонал|Функционалност|Функционал|Особина|Функция|Функциональность|Свойство|Могућност|Özellik|Właściwość|Tính năng|Savybė|Požiadavka|Požadavek|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Fīča|Funzionalità|Funktionalität|Funkcionalnost|Funkcionalitāte|Funcționalitate|Functionaliteit|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Ability|Business Need|Feature|Ability|Egenskap|Egenskab|Crikey|Característica|Arwedd):(.*)\\b" + }, + "step_keyword": { + "captures": { + "1": { + "name": "keyword.language.gherkin.feature.step" + } + }, + "match": "^\\s*(En |و |Y |E |Եվ |Ya |Too right |Və |Həm |A |И |而且 |并且 |同时 |並且 |同時 |Ak |Epi |A také |Og |😂 |And |Kaj |Ja |Et que |Et qu' |Et |და |Und |Και |અને |וגם |और |तथा |És |Dan |Agus |かつ |Lan |ಮತ್ತು |'ej |latlh |그리고 |AN |Un |Ir |an |a |Мөн |Тэгээд |Ond |7 |ਅਤੇ |Aye |Oraz |Si |Și |Şi |К тому же |Также |An |A tiež |A taktiež |A zároveň |In |Ter |Och |மேலும் |மற்றும் |Һәм |Вә |మరియు |และ |Ve |І |А також |Та |اور |Ва |Và |Maar |لكن |Pero |Բայց |Peru |Yeah nah |Amma |Ancaq |Ali |Но |Però |但是 |Men |Ale |😔 |But |Sed |Kuid |Mutta |Mais que |Mais qu' |Mais |მაგ­რამ |Aber |Αλλά |પણ |אבל |पर |परन्तु |किन्तु |De |En |Tapi |Ach |Ma |しかし |但し |ただし |Nanging |Ananging |ಆದರೆ |'ach |'a |하지만 |단 |BUT |Bet |awer |mä |No |Tetapi |Гэхдээ |Харин |Ac |ਪਰ |اما |Avast! |Mas |Dar |А |Иначе |Buh |Али |Toda |Ampak |Vendar |ஆனால் |Ләкин |Әмма |కాని |แต่ |Fakat |Ama |Але |لیکن |Лекин |Бирок |Аммо |Nhưng |Ond |Dan |اذاً |ثم |Alavez |Allora |Antonces |Ապա |Entós |But at the end of the day I reckon |O halda |Zatim |То |Aleshores |Cal |那么 |那麼 |Lè sa a |Le sa a |Onda |Pak |Så |🙏 |Then |Do |Siis |Niin |Alors |Entón |Logo |მაშინ |Dann |Τότε |પછી |אז |אזי |तब |तदा |Akkor |Þá |Maka |Ansin |ならば |Njuk |Banjur |ನಂತರ |vaj |그러면 |DEN |Tad |Tada |dann |Тогаш |Togash |Kemudian |Тэгэхэд |Үүний дараа |Tha |Þa |Ða |Tha the |Þa þe |Ða ðe |ਤਦ |آنگاه |Let go and haul |Wtedy |Então |Entao |Atunci |Затем |Тогда |Dun |Den youse gotta |Онда |Tak |Potom |Nato |Potem |Takrat |Entonces |அப்பொழுது |Нәтиҗәдә |అప్పుడు |ดังนั้น |O zaman |Тоді |پھر |تب |Унда |Thì |Yna |Wanneer |متى |عندما |Cuan |Եթե |Երբ |Cuando |It's just unbelievable |Əgər |Nə vaxt ki |Kada |Когато |Quan |当 |當 |Lè |Le |Kad |Když |Når |Als |🎬 |When |Se |Kui |Kun |Quand |Lorsque |Lorsqu' |Cando |როდესაც |Wenn |Όταν |ક્યારે |כאשר |जब |कदा |Majd |Ha |Amikor |Þegar |Ketika |Nuair a |Nuair nach |Nuair ba |Nuair nár |Quando |もし |Manawa |Menawa |ಸ್ಥಿತಿಯನ್ನು |qaSDI' |만일 |만약 |WEN |Ja |Kai |wann |Кога |Koga |Apabila |Хэрэв |Tha |Þa |Ða |ਜਦੋਂ |هنگامی |Blimey! |Jeżeli |Jeśli |Gdy |Kiedy |Cand |Când |Когда |Если |Wun |Youse know like when |Када |Кад |Keď |Ak |Ko |Ce |Če |Kadar |När |எப்போது |Әгәр |ఈ పరిస్థితిలో |เมื่อ |Eğer ki |Якщо |Коли |جب |Агар |Khi |Pryd |Gegewe |بفرض |Dau |Dada |Daus |Dadas |Դիցուք |Dáu |Daos |Daes |Y'know |Tutaq ki |Verilir |Dato |Дадено |Donat |Donada |Atès |Atesa |假如 |假设 |假定 |假設 |Sipoze |Sipoze ke |Sipoze Ke |Zadan |Zadani |Zadano |Pokud |Za předpokladu |Givet |Gegeven |Stel |😐 |Given |Donitaĵo |Komence |Eeldades |Oletetaan |Soit |Etant donné que |Etant donné qu' |Etant donné |Etant donnée |Etant donnés |Etant données |Étant donné que |Étant donné qu' |Étant donné |Étant donnée |Étant donnés |Étant données |Dado |Dados |მოცემული |Angenommen |Gegeben sei |Gegeben seien |Δεδομένου |આપેલ છે |בהינתן |अगर |यदि |चूंकि |Amennyiben |Adott |Ef |Dengan |Cuir i gcás go |Cuir i gcás nach |Cuir i gcás gur |Cuir i gcás nár |Data |Dati |Date |前提 |Nalika |Nalikaning |ನೀಡಿದ |ghu' noblu' |DaH ghu' bejlu' |조건 |먼저 |I CAN HAZ |Kad |Duota |ugeholl |Дадена |Dadeno |Dadena |Diberi |Bagi |Өгөгдсөн нь |Анх |Gitt |Thurh |Þurh |Ðurh |ਜੇਕਰ |ਜਿਵੇਂ ਕਿ |با فرض |Gangway! |Zakładając |Mając |Zakładając, że |Date fiind |Dat fiind |Dată fiind |Dati fiind |Dați fiind |Daţi fiind |Допустим |Дано |Пусть |Givun |Youse know when youse got |За дато |За дате |За дати |Za dato |Za date |Za dati |Pokiaľ |Za predpokladu |Dano |Podano |Zaradi |Privzeto |கொடுக்கப்பட்ட |Әйтик |చెప్పబడినది |กำหนดให้ |Diyelim ki |Припустимо |Припустимо, що |Нехай |اگر |بالفرض |فرض کیا |Агар |Biết |Cho |Anrhegedig a |\\* )" + }, + "feature_element_keyword": { + "captures": { + "1": { + "name": "keyword.language.gherkin.feature.scenario" + }, + "2": { + "name": "string.language.gherkin.scenario.title.title" + } + }, + "match": "^\\s*(예|시나리오 개요|시나리오|배경|背景|場景大綱|場景|场景大纲|场景|劇本大綱|劇本|例子|例|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|シナリオ|サンプル|سيناريو مخطط|سيناريو|امثلة|الخلفية|תרחיש|תבנית תרחיש|רקע|דוגמאות|Тарих|Сценарій|Сценарији|Сценарио|Сценарий структураси|Сценарий|Структура сценарію|Структура сценарија|Структура сценария|Скица|Рамка на сценарий|Примери|Пример|Приклади|Предыстория|Предистория|Позадина|Передумова|Основа|Мисоллар|Концепт|Контекст|Значения|Örnekler|Założenia|Wharrimean is|Voorbeelden|Variantai|Tình huống|The thing of it is|Tausta|Taust|Tapausaihio|Tapaus|Tapaukset|Szenariogrundriss|Szenario|Szablon scenariusza|Stsenaarium|Struktura scenarija|Skica|Skenario konsep|Skenario|Situācija|Senaryo taslağı|Senaryo|Scénář|Scénario|Schema dello scenario|Scenārijs pēc parauga|Scenārijs|Scenár|Scenariusz|Scenariul de şablon|Scenariul de sablon|Scenariu|Scenarios|Scenario Outline|Scenario Amlinellol|Scenario|Example|Scenarijus|Scenariji|Scenarijaus šablonas|Scenarijai|Scenarij|Scenarie|Rerefons|Raamstsenaarium|Příklady|Példák|Príklady|Przykłady|Primjeri|Primeri|Primer|Pozadí|Pozadina|Pozadie|Plan du scénario|Plan du Scénario|Piemēri|Pavyzdžiai|Paraugs|Osnova scénáře|Osnova|Náčrt Scénáře|Náčrt Scenáru|Mate|MISHUN SRSLY|MISHUN|Kịch bản|Kontext|Konteksts|Kontekstas|Kontekst|Koncept|Khung tình huống|Khung kịch bản|Juhtumid|Háttér|Grundlage|Geçmiş|Forgatókönyv vázlat|Forgatókönyv|Exemplos|Exemples|Exemplele|Exempel|Examples|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esempi|Escenario|Escenari|Enghreifftiau|Eksempler|Ejemplos|EXAMPLZ|Dữ liệu|Dis is what went down|Dasar|Contoh|Contexto|Contexte|Contesto|Condiţii|Conditii|Cobber|Cenário|Cenario|Cefndir|Bối cảnh|Blokes|Beispiele|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|All y'all|Achtergrond|Abstrakt Scenario|Abstract Scenario|Rule|Regla|Règle|Regel|Regra):(.*)" + }, + "scenario_outline_variable": { + "match": "<[a-zA-Z0-9 _-]*>", + "name": "variable.other" + }, + "strings_double_quote": { + "begin": "(? 50 lines as deprecated, > 72 as illegal", + "name": "meta.scope.subject.git-commit", + "match": "\\G.{0,50}(.{0,22}(.*))$", + "captures": { + "1": { + "name": "invalid.deprecated.line-too-long.git-commit" + }, + "2": { + "name": "invalid.illegal.line-too-long.git-commit" + } + } + } + ] + }, + { + "comment": "Git supplied metadata in a number of lines starting with #", + "name": "meta.scope.metadata.git-commit", + "begin": "^(?=#)", + "contentName": "comment.line.number-sign.git-commit", + "end": "^(?!#)", + "patterns": [ + { + "match": "^#\\t((modified|renamed):.*)$", + "captures": { + "1": { + "name": "markup.changed.git-commit" + } + } + }, + { + "match": "^#\\t(new file:.*)$", + "captures": { + "1": { + "name": "markup.inserted.git-commit" + } + } + }, + { + "match": "^#\\t(deleted.*)$", + "captures": { + "1": { + "name": "markup.deleted.git-commit" + } + } + }, + { + "comment": "Fallback for non-English git commit template", + "match": "^#\\t([^:]+): *(.*)$", + "captures": { + "1": { + "name": "keyword.other.file-type.git-commit" + }, + "2": { + "name": "string.unquoted.filename.git-commit" + } + } + } + ] + } + ] +} diff --git a/src/lib/shiki/languages/git-rebase.tmLanguage.json b/src/lib/shiki/languages/git-rebase.tmLanguage.json new file mode 100644 index 0000000..33e164c --- /dev/null +++ b/src/lib/shiki/languages/git-rebase.tmLanguage.json @@ -0,0 +1,61 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/git.tmbundle/blob/master/Syntaxes/Git%20Rebase%20Message.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/textmate/git.tmbundle/commit/5870cf3f8abad3a6637bdf69250b5d2ded427dc4", + "name": "git-rebase", + "scopeName": "text.git-rebase", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.comment.git-rebase" + } + }, + "match": "^\\s*(#).*$\\n?", + "name": "comment.line.number-sign.git-rebase" + }, + { + "captures": { + "1": { + "name": "support.function.git-rebase" + }, + "2": { + "name": "constant.sha.git-rebase" + }, + "3": { + "name": "meta.commit-message.git-rebase" + } + }, + "match": "^\\s*(pick|p|reword|r|edit|e|squash|s|fixup|f|drop|d)\\s+([0-9a-f]+)\\s+(.*)$", + "name": "meta.commit-command.git-rebase" + }, + { + "captures": { + "1": { + "name": "support.function.git-rebase" + }, + "2": { + "patterns": [ + { + "include": "source.shell" + } + ] + } + }, + "match": "^\\s*(exec|x)\\s+(.*)$", + "name": "meta.commit-command.git-rebase" + }, + { + "captures": { + "1": { + "name": "support.function.git-rebase" + } + }, + "match": "^\\s*(break|b)\\s*$", + "name": "meta.commit-command.git-rebase" + } + ] +} diff --git a/src/lib/shiki/languages/glimmer-js.tmLanguage.json b/src/lib/shiki/languages/glimmer-js.tmLanguage.json new file mode 100644 index 0000000..48b4ac3 --- /dev/null +++ b/src/lib/shiki/languages/glimmer-js.tmLanguage.json @@ -0,0 +1,98 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "glimmer-js", + "scopeName": "source.gjs", + "patterns": [ + { + "include": "source.js" + } + ], + "injections": { + "L:source.gjs -comment -string": { + "patterns": [ + { + "name": "meta.js.embeddedTemplateWithoutArgs", + "begin": "\\s*(<)(template)\\s*(>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "entity.name.tag.other.html" + }, + "3": { + "name": "punctuation.definition.tag.html" + } + }, + "end": "()", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "entity.name.tag.other.html" + }, + "3": { + "name": "punctuation.definition.tag.html" + } + }, + "patterns": [ + { + "include": "text.html.handlebars" + } + ] + }, + { + "name": "meta.js.embeddedTemplateWithArgs", + "begin": "(<)(template)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "entity.name.tag.other.html" + } + }, + "end": "()", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "entity.name.tag.other.html" + }, + "3": { + "name": "punctuation.definition.tag.html" + } + }, + "patterns": [ + { + "begin": "(?<=\\)", + "patterns": [ + { + "include": "text.html.handlebars#tag-stuff" + } + ] + }, + { + "begin": "(>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.end.js" + } + }, + "end": "(?=)", + "contentName": "meta.html.embedded.block", + "patterns": [ + { + "include": "text.html.handlebars" + } + ] + } + ] + } + ] + } + } +} diff --git a/src/lib/shiki/languages/glimmer-ts.tmLanguage.json b/src/lib/shiki/languages/glimmer-ts.tmLanguage.json new file mode 100644 index 0000000..fef2f86 --- /dev/null +++ b/src/lib/shiki/languages/glimmer-ts.tmLanguage.json @@ -0,0 +1,98 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "glimmer-ts", + "scopeName": "source.gts", + "patterns": [ + { + "include": "source.ts" + } + ], + "injections": { + "L:source.gts -comment -string": { + "patterns": [ + { + "name": "meta.js.embeddedTemplateWithoutArgs", + "begin": "\\s*(<)(template)\\s*(>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "entity.name.tag.other.html" + }, + "3": { + "name": "punctuation.definition.tag.html" + } + }, + "end": "()", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "entity.name.tag.other.html" + }, + "3": { + "name": "punctuation.definition.tag.html" + } + }, + "patterns": [ + { + "include": "text.html.handlebars" + } + ] + }, + { + "name": "meta.js.embeddedTemplateWithArgs", + "begin": "(<)(template)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "entity.name.tag.other.html" + } + }, + "end": "()", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "entity.name.tag.other.html" + }, + "3": { + "name": "punctuation.definition.tag.html" + } + }, + "patterns": [ + { + "begin": "(?<=\\)", + "patterns": [ + { + "include": "text.html.handlebars#tag-stuff" + } + ] + }, + { + "begin": "(>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.end.js" + } + }, + "end": "(?=)", + "contentName": "meta.html.embedded.block", + "patterns": [ + { + "include": "text.html.handlebars" + } + ] + } + ] + } + ] + } + } +} diff --git a/src/lib/shiki/languages/glsl.tmLanguage.json b/src/lib/shiki/languages/glsl.tmLanguage.json new file mode 100644 index 0000000..d127031 --- /dev/null +++ b/src/lib/shiki/languages/glsl.tmLanguage.json @@ -0,0 +1,58 @@ +{ + "fileTypes": [ + "vs", + "fs", + "gs", + "vsh", + "fsh", + "gsh", + "vshader", + "fshader", + "gshader", + "vert", + "frag", + "geom", + "f.glsl", + "v.glsl", + "g.glsl" + ], + "foldingStartMarker": "/\\*\\*|\\{\\s*$", + "foldingStopMarker": "\\*\\*/|^\\s*\\}", + "keyEquivalent": "^~G", + "name": "glsl", + "patterns": [ + { + "match": "\\b(break|case|continue|default|discard|do|else|for|if|return|switch|while)\\b", + "name": "keyword.control.glsl" + }, + { + "match": "\\b(void|bool|int|uint|float|vec2|vec3|vec4|bvec2|bvec3|bvec4|ivec2|ivec2|ivec3|uvec2|uvec2|uvec3|mat2|mat3|mat4|mat2x2|mat2x3|mat2x4|mat3x2|mat3x3|mat3x4|mat4x2|mat4x3|mat4x4|sampler[1|2|3]D|samplerCube|sampler2DRect|sampler[1|2]DShadow|sampler2DRectShadow|sampler[1|2]DArray|sampler[1|2]DArrayShadow|samplerBuffer|sampler2DMS|sampler2DMSArray|struct|isampler[1|2|3]D|isamplerCube|isampler2DRect|isampler[1|2]DArray|isamplerBuffer|isampler2DMS|isampler2DMSArray|usampler[1|2|3]D|usamplerCube|usampler2DRect|usampler[1|2]DArray|usamplerBuffer|usampler2DMS|usampler2DMSArray)\\b", + "name": "storage.type.glsl" + }, + { + "match": "\\b(attribute|centroid|const|flat|in|inout|invariant|noperspective|out|smooth|uniform|varying)\\b", + "name": "storage.modifier.glsl" + }, + { + "match": "\\b(gl_BackColor|gl_BackLightModelProduct|gl_BackLightProduct|gl_BackMaterial|gl_BackSecondaryColor|gl_ClipDistance|gl_ClipPlane|gl_ClipVertex|gl_Color|gl_DepthRange|gl_DepthRangeParameters|gl_EyePlaneQ|gl_EyePlaneR|gl_EyePlaneS|gl_EyePlaneT|gl_Fog|gl_FogCoord|gl_FogFragCoord|gl_FogParameters|gl_FragColor|gl_FragCoord|gl_FragDat|gl_FragDept|gl_FrontColor|gl_FrontFacing|gl_FrontLightModelProduct|gl_FrontLightProduct|gl_FrontMaterial|gl_FrontSecondaryColor|gl_InstanceID|gl_Layer|gl_LightModel|gl_LightModelParameters|gl_LightModelProducts|gl_LightProducts|gl_LightSource|gl_LightSourceParameters|gl_MaterialParameters|gl_ModelViewMatrix|gl_ModelViewMatrixInverse|gl_ModelViewMatrixInverseTranspose|gl_ModelViewMatrixTranspose|gl_ModelViewProjectionMatrix|gl_ModelViewProjectionMatrixInverse|gl_ModelViewProjectionMatrixInverseTranspose|gl_ModelViewProjectionMatrixTranspose|gl_MultiTexCoord[0-7]|gl_Normal|gl_NormalMatrix|gl_NormalScale|gl_ObjectPlaneQ|gl_ObjectPlaneR|gl_ObjectPlaneS|gl_ObjectPlaneT|gl_Point|gl_PointCoord|gl_PointParameters|gl_PointSize|gl_Position|gl_PrimitiveIDIn|gl_ProjectionMatrix|gl_ProjectionMatrixInverse|gl_ProjectionMatrixInverseTranspose|gl_ProjectionMatrixTranspose|gl_SecondaryColor|gl_TexCoord|gl_TextureEnvColor|gl_TextureMatrix|gl_TextureMatrixInverse|gl_TextureMatrixInverseTranspose|gl_TextureMatrixTranspose|gl_Vertex|gl_VertexIDh)\\b", + "name": "support.variable.glsl" + }, + { + "match": "\\b(gl_MaxClipPlanes|gl_MaxCombinedTextureImageUnits|gl_MaxDrawBuffers|gl_MaxFragmentUniformComponents|gl_MaxLights|gl_MaxTextureCoords|gl_MaxTextureImageUnits|gl_MaxTextureUnits|gl_MaxVaryingFloats|gl_MaxVertexAttribs|gl_MaxVertexTextureImageUnits|gl_MaxVertexUniformComponents)\\b", + "name": "support.constant.glsl" + }, + { + "match": "\\b(abs|acos|all|any|asin|atan|ceil|clamp|cos|cross|degrees|dFdx|dFdy|distance|dot|equal|exp|exp2|faceforward|floor|fract|ftransform|fwidth|greaterThan|greaterThanEqual|inversesqrt|length|lessThan|lessThanEqual|log|log2|matrixCompMult|max|min|mix|mod|noise[1-4]|normalize|not|notEqual|outerProduct|pow|radians|reflect|refract|shadow1D|shadow1DLod|shadow1DProj|shadow1DProjLod|shadow2D|shadow2DLod|shadow2DProj|shadow2DProjLod|sign|sin|smoothstep|sqrt|step|tan|texture1D|texture1DLod|texture1DProj|texture1DProjLod|texture2D|texture2DLod|texture2DProj|texture2DProjLod|texture3D|texture3DLod|texture3DProj|texture3DProjLod|textureCube|textureCubeLod|transpose)\\b", + "name": "support.function.glsl" + }, + { + "match": "\\b(asm|double|enum|extern|goto|inline|long|short|sizeof|static|typedef|union|unsigned|volatile)\\b", + "name": "invalid.illegal.glsl" + }, + { + "include": "source.c" + } + ], + "scopeName": "source.glsl", + "uuid": "D0FD1B52-F137-4FBA-A148-B8A893CD948C" +} diff --git a/src/lib/shiki/languages/gnuplot.tmLanguage.json b/src/lib/shiki/languages/gnuplot.tmLanguage.json new file mode 100644 index 0000000..4d5273c --- /dev/null +++ b/src/lib/shiki/languages/gnuplot.tmLanguage.json @@ -0,0 +1,887 @@ +{ + "name": "gnuplot", + "scopeName": "source.gnuplot", + "uuid": "A75AB1C2-611C-4500-9EE4-20668B5BB465", + "fileTypes": ["gp", "plt", "plot", "gnuplot"], + "patterns": [ + { + "name": "invalid.illegal.backslash.gnuplot", + "match": "(\\\\(?!\\n).*)" + }, + { + "name": "punctuation.separator.statement.gnuplot", + "match": "(;)" + }, + { + "include": "#LineComment" + }, + { + "include": "#DataBlock" + }, + { + "include": "#MacroExpansion" + }, + { + "include": "#VariableDecl" + }, + { + "include": "#ArrayDecl" + }, + { + "include": "#FunctionDecl" + }, + { + "include": "#ShellCommand" + }, + { + "include": "#Command" + } + ], + "repository": { + "DataBlock": { + "name": "meta.datablock.gnuplot", + "begin": "(?x:\n\t\t\t\t([$][A-Za-z_]\\w*)\\s* # 1: var name\n\t\t\t\t(<<)\\s* # 2: shift operator\n\t\t\t\t([A-Za-z_]\\w*)\\s* # 3: end tag\n\t\t\t\t(?=(\\#|$)) # 4: comment or end of line\n\t\t\t)", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#SpecialVariable" + } + ] + }, + "3": { + "name": "constant.language.datablock.gnuplot" + } + }, + "end": "^(\\3)\\b(.*)", + "endCaptures": { + "1": { + "name": "constant.language.datablock.gnuplot" + }, + "2": { + "name": "invalid.illegal.datablock.gnuplot" + } + }, + "patterns": [ + { + "include": "#LineComment" + }, + { + "include": "#NumberLiteral" + }, + { + "include": "#DoubleQuotedStringLiteral" + } + ] + }, + "MacroExpansion": { + "begin": "([@][A-Za-z_]\\w*)", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#SpecialVariable" + } + ] + } + }, + "end": "(?=(;|#|\\\\(?!\\n)|(?>|&|\\||\\^)" + }, + { + "name": "keyword.operator.comparison.gnuplot", + "match": "(==|!=|<=|<|>=|>)" + }, + { + "name": "keyword.operator.assignment.gnuplot", + "match": "(=)" + }, + { + "name": "keyword.operator.arithmetic.gnuplot", + "match": "(\\+|-|~|!)" + }, + { + "name": "keyword.operator.arithmetic.gnuplot", + "match": "(\\*\\*|\\+|-|\\*|/|%)" + }, + { + "name": "keyword.operator.strings.gnuplot", + "match": "(\\.|\\b(eq|ne)\\b)", + "captures": { + "2": { + "name": "keyword.operator.word.gnuplot" + } + } + } + ] + }, + "BuiltinVariable": { + "patterns": [ + { + "name": "invalid.deprecated.variable.gnuplot", + "match": "\\b(?x:\n\t\t\t\t\t\tFIT_LIMIT |\n\t\t\t\t\t\tFIT_MAXITER |\n\t\t\t\t\t\tFIT_START_LAMBDA |\n\t\t\t\t\t\tFIT_LAMBDA_FACTOR |\n\t\t\t\t\t\tFIT_SKIP |\n\t\t\t\t\t\tFIT_INDEX\n\t\t\t\t\t)\\b" + }, + { + "name": "support.constant.gnuplot", + "match": "\\b(GPVAL_\\w*|MOUSE_\\w*)\\b" + }, + { + "name": "support.variable.gnuplot", + "match": "\\b(ARG[0-9C]|GPFUN_\\w*|FIT_\\w*|STATS_\\w*|pi|NaN)\\b" + } + ] + }, + "SpecialVariable": { + "patterns": [ + { + "match": "(?<=[\\[:=])\\s*(\\*)\\s*(?=[:\\]])", + "captures": { + "1": { + "name": "constant.language.wildcard.gnuplot" + } + } + }, + { + "name": "constant.language.special.gnuplot", + "match": "(([@$])[A-Za-z_]\\w*)\\b", + "captures": { + "2": { + "name": "punctuation.definition.variable.gnuplot" + } + } + } + ] + }, + "BuiltinFunction": { + "patterns": [ + { + "name": "invalid.deprecated.function.gnuplot", + "match": "\\b(?x:\n\t\t\t\t\t\tdefined\n\t\t\t\t\t)\\b" + }, + { + "name": "support.function.math.gnuplot", + "match": "\\b(?x:\n\t\t\t\t\t\tabs |\n\t\t\t\t\t\tacos |\n\t\t\t\t\t\tacosh |\n\t\t\t\t\t\tairy |\n\t\t\t\t\t\targ |\n\t\t\t\t\t\tasin |\n\t\t\t\t\t\tasinh |\n\t\t\t\t\t\tatan |\n\t\t\t\t\t\tatan2 |\n\t\t\t\t\t\tatanh |\n\t\t\t\t\t\tEllipticK |\n\t\t\t\t\t\tEllipticE |\n\t\t\t\t\t\tEllipticPi |\n\t\t\t\t\t\tbesj0 |\n\t\t\t\t\t\tbesj1 |\n\t\t\t\t\t\tbesy0 |\n\t\t\t\t\t\tbesy1 |\n\t\t\t\t\t\tceil |\n\t\t\t\t\t\tcos |\n\t\t\t\t\t\tcosh |\n\t\t\t\t\t\terf |\n\t\t\t\t\t\terfc |\n\t\t\t\t\t\texp |\n\t\t\t\t\t\texpint |\n\t\t\t\t\t\tfloor |\n\t\t\t\t\t\tgamma |\n\t\t\t\t\t\tibeta |\n\t\t\t\t\t\tinverf |\n\t\t\t\t\t\tigamma |\n\t\t\t\t\t\timag |\n\t\t\t\t\t\tinvnorm |\n\t\t\t\t\t\tint |\n\t\t\t\t\t\tlambertw |\n\t\t\t\t\t\tlgamma |\n\t\t\t\t\t\tlog |\n\t\t\t\t\t\tlog10 |\n\t\t\t\t\t\tnorm |\n\t\t\t\t\t\trand |\n\t\t\t\t\t\treal |\n\t\t\t\t\t\tsgn |\n\t\t\t\t\t\tsin |\n\t\t\t\t\t\tsinh |\n\t\t\t\t\t\tsqrt |\n\t\t\t\t\t\ttan |\n\t\t\t\t\t\ttanh |\n\t\t\t\t\t\tvoigt |\n\t\t\t\t\t\tcerf |\n\t\t\t\t\t\tcdawson |\n\t\t\t\t\t\tfaddeeva |\n\t\t\t\t\t\terfi |\n\t\t\t\t\t\tVP\n\t\t\t\t\t)\\b" + }, + { + "name": "support.function.string.gnuplot", + "match": "\\b(?x:\n\t\t\t\t\t\tgprintf |\n\t\t\t\t\t\tsprintf |\n\t\t\t\t\t\tstrlen |\n\t\t\t\t\t\tstrstrt |\n\t\t\t\t\t\tsubstr |\n\t\t\t\t\t\tstrftime |\n\t\t\t\t\t\tstrptime |\n\t\t\t\t\t\tsystem |\n\t\t\t\t\t\tword |\n\t\t\t\t\t\twords\n\t\t\t\t\t)\\b" + }, + { + "name": "support.function.other.gnuplot", + "match": "\\b(?x:\n\t\t\t\t\t\tcolumn |\n\t\t\t\t\t\tcolumnhead |\n\t\t\t\t\t\texists |\n\t\t\t\t\t\thsv2rgb |\n\t\t\t\t\t\tstringcolumn |\n\t\t\t\t\t\ttimecolumn |\n\t\t\t\t\t\ttm_hour |\n\t\t\t\t\t\ttm_mday |\n\t\t\t\t\t\ttm_min |\n\t\t\t\t\t\ttm_mon |\n\t\t\t\t\t\ttm_sec |\n\t\t\t\t\t\ttm_wday |\n\t\t\t\t\t\ttm_yday |\n\t\t\t\t\t\ttm_year |\n\t\t\t\t\t\ttime |\n\t\t\t\t\t\tvalid |\n\t\t\t\t\t\tvalue\n\t\t\t\t\t)\\b" + } + ] + }, + "Literal": { + "patterns": [ + { + "include": "#NumberLiteral" + }, + { + "include": "#DeprecatedScriptArgsLiteral" + }, + { + "include": "#SingleQuotedStringLiteral" + }, + { + "include": "#DoubleQuotedStringLiteral" + }, + { + "include": "#InterpolatedStringLiteral" + } + ] + }, + "NumberLiteral": { + "patterns": [ + { + "name": "constant.numeric.float.gnuplot", + "match": "(?x:\n\t\t\t\t\t\t# .5e2 and 0.5e2\n\t\t\t\t\t\t( ((\\b[0-9]+)|(?,\\s*\\w+(?:\\.\\w+)*)*)(?=\\s*=(?!=))", + "captures": { + "1": { + "patterns": [ + { + "match": "\\d\\w*", + "name": "invalid.illegal.identifier.go" + }, + { + "match": "\\w+(?:\\.\\w+)*", + "name": "variable.other.assignment.go", + "captures": { + "0": { + "patterns": [ + { + "include": "#delimiters" + } + ] + } + } + }, + { + "include": "#delimiters" + } + ] + } + } + }, + { + "match": "\\b\\w+(?:,\\s*\\w+)*(?=\\s*:=)", + "captures": { + "0": { + "patterns": [ + { + "match": "\\d\\w*", + "name": "invalid.illegal.identifier.go" + }, + { + "match": "\\w+", + "name": "variable.other.assignment.go" + }, + { + "include": "#delimiters" + } + ] + } + } + }, + { + "comment": "Terminators", + "match": ";", + "name": "punctuation.terminator.go" + }, + { + "include": "#brackets" + }, + { + "include": "#delimiters" + }, + { + "include": "#keywords" + }, + { + "include": "#operators" + }, + { + "include": "#runes" + }, + { + "include": "#storage_types" + } + ], + "repository": { + "brackets": { + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.begin.bracket.curly.go" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.end.bracket.curly.go" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.begin.bracket.round.go" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.end.bracket.round.go" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "match": "\\[|\\]", + "name": "punctuation.definition.bracket.square.go" + } + ] + }, + "comments": { + "patterns": [ + { + "name": "comment.block.go", + "begin": "(\\/\\*)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.go" + } + }, + "end": "(\\*\\/)", + "endCaptures": { + "1": { + "name": "punctuation.definition.comment.go" + } + } + }, + { + "name": "comment.line.double-slash.go", + "begin": "(\\/\\/)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.go" + } + }, + "end": "(?:\\n|$)" + } + ] + }, + "delimiters": { + "patterns": [ + { + "match": ",", + "name": "punctuation.other.comma.go" + }, + { + "match": "\\.(?!\\.\\.)", + "name": "punctuation.other.period.go" + }, + { + "match": ":(?!=)", + "name": "punctuation.other.colon.go" + } + ] + }, + "imports": { + "patterns": [ + { + "match": "((?!\\s+\")[^\\s]*)?\\s*((\")([^\"]*)(\"))", + "captures": { + "1": { + "name": "entity.alias.import.go" + }, + "2": { + "name": "string.quoted.double.go" + }, + "3": { + "name": "punctuation.definition.string.begin.go" + }, + "4": { + "name": "entity.name.import.go" + }, + "5": { + "name": "punctuation.definition.string.end.go" + } + } + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.imports.begin.bracket.round.go" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.imports.end.bracket.round.go" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#imports" + } + ] + } + ] + }, + "keywords": { + "patterns": [ + { + "comment": "Flow control keywords", + "match": "\\b(break|case|continue|default|defer|else|fallthrough|for|go|goto|if|range|return|select|switch)\\b", + "name": "keyword.control.go" + }, + { + "match": "\\bchan\\b", + "name": "keyword.channel.go" + }, + { + "match": "\\bconst\\b", + "name": "keyword.const.go" + }, + { + "match": "\\bfunc\\b", + "name": "keyword.function.go" + }, + { + "match": "\\binterface\\b", + "name": "keyword.interface.go" + }, + { + "match": "\\bmap\\b", + "name": "keyword.map.go" + }, + { + "match": "\\bstruct\\b", + "name": "keyword.struct.go" + } + ] + }, + "operators": { + "comment": "Note that the order here is very important!", + "patterns": [ + { + "match": "(\\*|&)(?=\\w)", + "name": "keyword.operator.address.go" + }, + { + "match": "<\\-", + "name": "keyword.operator.channel.go" + }, + { + "match": "\\-\\-", + "name": "keyword.operator.decrement.go" + }, + { + "match": "\\+\\+", + "name": "keyword.operator.increment.go" + }, + { + "match": "(==|!=|<=|>=|<(?!<)|>(?!>))", + "name": "keyword.operator.comparison.go" + }, + { + "match": "(&&|\\|\\||!)", + "name": "keyword.operator.logical.go" + }, + { + "match": "(=|\\+=|\\-=|\\|=|\\^=|\\*=|/=|:=|%=|<<=|>>=|&\\^=|&=)", + "name": "keyword.operator.assignment.go" + }, + { + "match": "(\\+|\\-|\\*|/|%)", + "name": "keyword.operator.arithmetic.go" + }, + { + "match": "(&(?!\\^)|\\||\\^|&\\^|<<|>>)", + "name": "keyword.operator.arithmetic.bitwise.go" + }, + { + "match": "\\.\\.\\.", + "name": "keyword.operator.ellipsis.go" + } + ] + }, + "runes": { + "patterns": [ + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.go" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.go" + } + }, + "name": "string.quoted.rune.go", + "patterns": [ + { + "match": "\\G(\\\\([0-7]{3}|[abfnrtv\\\\'\"]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})|.)(?=')", + "name": "constant.other.rune.go" + }, + { + "match": "[^']+", + "name": "invalid.illegal.unknown-rune.go" + } + ] + } + ] + }, + "storage_types": { + "patterns": [ + { + "match": "\\bbool\\b", + "name": "storage.type.boolean.go" + }, + { + "match": "\\bbyte\\b", + "name": "storage.type.byte.go" + }, + { + "match": "\\berror\\b", + "name": "storage.type.error.go" + }, + { + "match": "\\b(complex(64|128)|float(32|64)|u?int(8|16|32|64)?)\\b", + "name": "storage.type.numeric.go" + }, + { + "match": "\\brune\\b", + "name": "storage.type.rune.go" + }, + { + "match": "\\bstring\\b", + "name": "storage.type.string.go" + }, + { + "match": "\\buintptr\\b", + "name": "storage.type.uintptr.go" + } + ] + }, + "string_escaped_char": { + "patterns": [ + { + "match": "\\\\([0-7]{3}|[abfnrtv\\\\'\"]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})", + "name": "constant.character.escape.go" + }, + { + "match": "\\\\[^0-7xuUabfnrtv\\'\"]", + "name": "invalid.illegal.unknown-escape.go" + } + ] + }, + "string_placeholder": { + "patterns": [ + { + "match": "%(\\[\\d+\\])?([\\+#\\-0\\x20]{,2}((\\d+|\\*)?(\\.?(\\d+|\\*|(\\[\\d+\\])\\*?)?(\\[\\d+\\])?)?))?[vT%tbcdoqxXUbeEfFgGspw]", + "name": "constant.other.placeholder.go" + } + ] + }, + "variables": { + "patterns": [ + { + "match": "(\\w+(?:,\\s*\\w+)*)(\\s+\\*?\\w+(?:\\.\\w+)?\\s*)?(?=\\s*=)", + "captures": { + "1": { + "patterns": [ + { + "match": "\\d\\w*", + "name": "invalid.illegal.identifier.go" + }, + { + "match": "\\w+", + "name": "variable.other.assignment.go" + }, + { + "include": "#delimiters" + } + ] + }, + "2": { + "patterns": [ + { + "include": "$self" + } + ] + } + } + }, + { + "match": "(\\w+(?:,\\s*\\w+)*)(\\s+(\\[(\\d*|\\.\\.\\.)\\])*\\*?(<-)?\\w+(?:\\.\\w+)?\\s*[^=].*)", + "captures": { + "1": { + "patterns": [ + { + "match": "\\d\\w*", + "name": "invalid.illegal.identifier.go" + }, + { + "match": "\\w+", + "name": "variable.other.declaration.go" + }, + { + "include": "#delimiters" + } + ] + }, + "2": { + "patterns": [ + { + "include": "$self" + } + ] + } + } + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.variables.begin.bracket.round.go" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.variables.end.bracket.round.go" + } + }, + "patterns": [ + { + "include": "$self" + }, + { + "include": "#variables" + } + ] + } + ] + }, + "numeric_literals": { + "match": "(?)(;))", + "endCaptures": { + "1": { + "name": "punctuation.terminator.groovy" + } + }, + "name": "meta.import.groovy", + "patterns": [ + { + "match": "\\.", + "name": "punctuation.separator.groovy" + }, + { + "match": "\\s", + "name": "invalid.illegal.character_not_allowed_here.groovy" + } + ] + }, + { + "begin": "(import)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.other.import.groovy" + } + }, + "captures": { + "1": { + "name": "keyword.other.import.groovy" + }, + "2": { + "name": "storage.modifier.import.groovy" + }, + "3": { + "name": "punctuation.terminator.groovy" + } + }, + "contentName": "storage.modifier.import.groovy", + "end": "\\s*(?:$|(?=%>)|(;))", + "endCaptures": { + "1": { + "name": "punctuation.terminator.groovy" + } + }, + "name": "meta.import.groovy", + "patterns": [ + { + "match": "\\.", + "name": "punctuation.separator.groovy" + }, + { + "match": "\\s", + "name": "invalid.illegal.character_not_allowed_here.groovy" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.other.import.groovy" + }, + "2": { + "name": "keyword.other.import.static.groovy" + }, + "3": { + "name": "storage.modifier.import.groovy" + }, + "4": { + "name": "punctuation.terminator.groovy" + } + }, + "match": "^\\s*(import)(?:\\s+(static)\\s+)\\b(?:\\s*([^ ;$]+)\\s*(;)?)?", + "name": "meta.import.groovy" + }, + { + "include": "#groovy" + } + ], + "repository": { + "annotations": { + "patterns": [ + { + "begin": "(?)", + "end": "\\}", + "patterns": [ + { + "begin": "(?<=\\{)(?=[^\\}]*?->)", + "end": "->", + "endCaptures": { + "0": { + "name": "keyword.operator.groovy" + } + }, + "patterns": [ + { + "begin": "(?!->)", + "end": "(?=->)", + "name": "meta.closure.parameters.groovy", + "patterns": [ + { + "begin": "(?!,|->)", + "end": "(?=,|->)", + "name": "meta.closure.parameter.groovy", + "patterns": [ + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "keyword.operator.assignment.groovy" + } + }, + "end": "(?=,|->)", + "name": "meta.parameter.default.groovy", + "patterns": [ + { + "include": "#groovy-code" + } + ] + }, + { + "include": "#parameters" + } + ] + } + ] + } + ] + }, + { + "begin": "(?=[^}])", + "end": "(?=\\})", + "patterns": [ + { + "include": "#groovy-code" + } + ] + } + ] + }, + "comment-block": { + "begin": "/\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.groovy" + } + }, + "end": "\\*/", + "name": "comment.block.groovy" + }, + "comments": { + "patterns": [ + { + "captures": { + "0": { + "name": "punctuation.definition.comment.groovy" + } + }, + "match": "/\\*\\*/", + "name": "comment.block.empty.groovy" + }, + { + "include": "text.html.javadoc" + }, + { + "include": "#comment-block" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.comment.groovy" + } + }, + "match": "(//).*$\\n?", + "name": "comment.line.double-slash.groovy" + } + ] + }, + "constants": { + "patterns": [ + { + "match": "\\b([A-Z][A-Z0-9_]+)\\b", + "name": "constant.other.groovy" + }, + { + "match": "\\b(true|false|null)\\b", + "name": "constant.language.groovy" + } + ] + }, + "constructors": { + "applyEndPatternLast": 1, + "begin": "(?<=;|^)(?=\\s*(?:(?:private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final)\\s+)*[A-Z]\\w*\\()", + "end": "}", + "patterns": [ + { + "include": "#method-content" + } + ] + }, + "enum-values": { + "patterns": [ + { + "begin": "(?<=;|^)\\s*\\b([A-Z0-9_]+)(?=\\s*(?:,|;|}|\\(|$))", + "beginCaptures": { + "1": { + "name": "constant.enum.name.groovy" + } + }, + "end": ",|;|(?=})|^(?!\\s*\\w+\\s*(?:,|$))", + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "name": "meta.enum.value.groovy", + "patterns": [ + { + "match": ",", + "name": "punctuation.definition.seperator.parameter.groovy" + }, + { + "include": "#groovy-code" + } + ] + } + ] + } + ] + }, + "groovy": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#class" + }, + { + "include": "#variables" + }, + { + "include": "#methods" + }, + { + "include": "#annotations" + }, + { + "include": "#groovy-code" + } + ] + }, + "groovy-code": { + "patterns": [ + { + "include": "#groovy-code-minus-map-keys" + }, + { + "include": "#map-keys" + } + ] + }, + "groovy-code-minus-map-keys": { + "comment": "In some situations, maps can't be declared without enclosing []'s, \n\t\t\t\ttherefore we create a collection of everything but that", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#annotations" + }, + { + "include": "#support-functions" + }, + { + "include": "#keyword-language" + }, + { + "include": "#values" + }, + { + "include": "#anonymous-classes-and-new" + }, + { + "include": "#keyword-operator" + }, + { + "include": "#types" + }, + { + "include": "#storage-modifiers" + }, + { + "include": "#parens" + }, + { + "include": "#closures" + }, + { + "include": "#braces" + } + ] + }, + "keyword": { + "patterns": [ + { + "include": "#keyword-operator" + }, + { + "include": "#keyword-language" + } + ] + }, + "keyword-language": { + "patterns": [ + { + "match": "\\b(try|catch|finally|throw)\\b", + "name": "keyword.control.exception.groovy" + }, + { + "match": "\\b((?", + "name": "keyword.operator.arrow.groovy" + }, + { + "match": "<<", + "name": "keyword.operator.leftshift.groovy" + }, + { + "match": "(?<=\\S)\\.(?=\\S)", + "name": "keyword.operator.navigation.groovy" + }, + { + "match": "(?<=\\S)\\?\\.(?=\\S)", + "name": "keyword.operator.safe-navigation.groovy" + }, + { + "begin": "\\?", + "beginCaptures": { + "0": { + "name": "keyword.operator.ternary.groovy" + } + }, + "end": "(?=$|\\)|}|])", + "name": "meta.evaluation.ternary.groovy", + "patterns": [ + { + "match": ":", + "name": "keyword.operator.ternary.expression-seperator.groovy" + }, + { + "include": "#groovy-code-minus-map-keys" + } + ] + }, + { + "match": "==~", + "name": "keyword.operator.match.groovy" + }, + { + "match": "=~", + "name": "keyword.operator.find.groovy" + }, + { + "match": "\\b(instanceof)\\b", + "name": "keyword.operator.instanceof.groovy" + }, + { + "match": "(===|==|!=|<=|>=|<=>|<>|<|>|<<)", + "name": "keyword.operator.comparison.groovy" + }, + { + "match": "=", + "name": "keyword.operator.assignment.groovy" + }, + { + "match": "(\\-\\-|\\+\\+)", + "name": "keyword.operator.increment-decrement.groovy" + }, + { + "match": "(\\-|\\+|\\*|\\/|%)", + "name": "keyword.operator.arithmetic.groovy" + }, + { + "match": "(!|&&|\\|\\|)", + "name": "keyword.operator.logical.groovy" + } + ] + }, + "language-variables": { + "patterns": [ + { + "match": "\\b(this|super)\\b", + "name": "variable.language.groovy" + } + ] + }, + "map-keys": { + "patterns": [ + { + "captures": { + "1": { + "name": "constant.other.key.groovy" + }, + "2": { + "name": "punctuation.definition.seperator.key-value.groovy" + } + }, + "match": "(\\w+)\\s*(:)" + } + ] + }, + "method-call": { + "begin": "([\\w$]+)(\\()", + "beginCaptures": { + "1": { + "name": "meta.method.groovy" + }, + "2": { + "name": "punctuation.definition.method-parameters.begin.groovy" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.method-parameters.end.groovy" + } + }, + "name": "meta.method-call.groovy", + "patterns": [ + { + "match": ",", + "name": "punctuation.definition.seperator.parameter.groovy" + }, + { + "include": "#groovy-code" + } + ] + }, + "method-content": { + "patterns": [ + { + "match": "\\s" + }, + { + "include": "#annotations" + }, + { + "begin": "(?=(?:\\w|<)[^\\(]*\\s+(?:[\\w$]|<)+\\s*\\()", + "end": "(?=[\\w$]+\\s*\\()", + "name": "meta.method.return-type.java", + "patterns": [ + { + "include": "#storage-modifiers" + }, + { + "include": "#types" + } + ] + }, + { + "begin": "([\\w$]+)\\s*\\(", + "beginCaptures": { + "1": { + "name": "entity.name.function.java" + } + }, + "end": "\\)", + "name": "meta.definition.method.signature.java", + "patterns": [ + { + "begin": "(?=[^)])", + "end": "(?=\\))", + "name": "meta.method.parameters.groovy", + "patterns": [ + { + "begin": "(?=[^,)])", + "end": "(?=,|\\))", + "name": "meta.method.parameter.groovy", + "patterns": [ + { + "match": ",", + "name": "punctuation.definition.separator.groovy" + }, + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "keyword.operator.assignment.groovy" + } + }, + "end": "(?=,|\\))", + "name": "meta.parameter.default.groovy", + "patterns": [ + { + "include": "#groovy-code" + } + ] + }, + { + "include": "#parameters" + } + ] + } + ] + } + ] + }, + { + "begin": "(?=<)", + "end": "(?=\\s)", + "name": "meta.method.paramerised-type.groovy", + "patterns": [ + { + "begin": "<", + "end": ">", + "name": "storage.type.parameters.groovy", + "patterns": [ + { + "include": "#types" + }, + { + "match": ",", + "name": "punctuation.definition.seperator.groovy" + } + ] + } + ] + }, + { + "begin": "throws", + "beginCaptures": { + "0": { + "name": "storage.modifier.groovy" + } + }, + "end": "(?={|;)|^(?=\\s*(?:[^{\\s]|$))", + "name": "meta.throwables.groovy", + "patterns": [ + { + "include": "#object-types" + } + ] + }, + { + "begin": "{", + "end": "(?=})", + "name": "meta.method.body.java", + "patterns": [ + { + "include": "#groovy-code" + } + ] + } + ] + }, + "methods": { + "applyEndPatternLast": 1, + "begin": "(?x:(?<=;|^|{)(?=\\s*\n (?:\n (?:private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final) # visibility/modifier\n |\n (?:def)\n |\n (?:\n (?:\n (?:void|boolean|byte|char|short|int|float|long|double)\n |\n (?:@?(?:[a-zA-Z]\\w*\\.)*[A-Z]+\\w*) # object type\n )\n [\\[\\]]*\n (?:<.*>)?\n ) \n \n )\n \\s+\n ([^=]+\\s+)?\\w+\\s*\\(\n\t\t\t))", + "end": "}|(?=[^{])", + "name": "meta.definition.method.groovy", + "patterns": [ + { + "include": "#method-content" + } + ] + }, + "nest_curly": { + "begin": "\\{", + "captures": { + "0": { + "name": "punctuation.section.scope.groovy" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#nest_curly" + } + ] + }, + "numbers": { + "patterns": [ + { + "match": "((0(x|X)[0-9a-fA-F]*)|(\\+|-)?\\b(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDdg]|UL|ul)?\\b", + "name": "constant.numeric.groovy" + } + ] + }, + "object-types": { + "patterns": [ + { + "begin": "\\b((?:[a-z]\\w*\\.)*(?:[A-Z]+\\w*[a-z]+\\w*|UR[LI]))<", + "end": ">|[^\\w\\s,\\?<\\[\\]]", + "name": "storage.type.generic.groovy", + "patterns": [ + { + "include": "#object-types" + }, + { + "begin": "<", + "comment": "This is just to support <>'s with no actual type prefix", + "end": ">|[^\\w\\s,\\[\\]<]", + "name": "storage.type.generic.groovy" + } + ] + }, + { + "begin": "\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*[a-z]+\\w*)(?=\\[)", + "end": "(?=[^\\]\\s])", + "name": "storage.type.object.array.groovy", + "patterns": [ + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#groovy" + } + ] + } + ] + }, + { + "match": "\\b(?:[a-zA-Z]\\w*\\.)*(?:[A-Z]+\\w*[a-z]+\\w*|UR[LI])\\b", + "name": "storage.type.groovy" + } + ] + }, + "object-types-inherited": { + "patterns": [ + { + "begin": "\\b((?:[a-zA-Z]\\w*\\.)*[A-Z]+\\w*[a-z]+\\w*)<", + "end": ">|[^\\w\\s,\\?<\\[\\]]", + "name": "entity.other.inherited-class.groovy", + "patterns": [ + { + "include": "#object-types-inherited" + }, + { + "begin": "<", + "comment": "This is just to support <>'s with no actual type prefix", + "end": ">|[^\\w\\s,\\[\\]<]", + "name": "storage.type.generic.groovy" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.operator.dereference.groovy" + } + }, + "match": "\\b(?:[a-zA-Z]\\w*(\\.))*[A-Z]+\\w*[a-z]+\\w*\\b", + "name": "entity.other.inherited-class.groovy" + } + ] + }, + "parameters": { + "patterns": [ + { + "include": "#annotations" + }, + { + "include": "#storage-modifiers" + }, + { + "include": "#types" + }, + { + "match": "\\w+", + "name": "variable.parameter.method.groovy" + } + ] + }, + "parens": { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#groovy-code" + } + ] + }, + "primitive-arrays": { + "patterns": [ + { + "match": "\\b(?:void|boolean|byte|char|short|int|float|long|double)(\\[\\])*\\b", + "name": "storage.type.primitive.array.groovy" + } + ] + }, + "primitive-types": { + "patterns": [ + { + "match": "\\b(?:void|boolean|byte|char|short|int|float|long|double)\\b", + "name": "storage.type.primitive.groovy" + } + ] + }, + "regexp": { + "patterns": [ + { + "begin": "/(?=[^/]+/([^>]|$))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.regexp.begin.groovy" + } + }, + "end": "/", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.regexp.end.groovy" + } + }, + "name": "string.regexp.groovy", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.groovy" + } + ] + }, + { + "begin": "~\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.regexp.begin.groovy" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.regexp.end.groovy" + } + }, + "name": "string.regexp.compiled.groovy", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.groovy" + } + ] + } + ] + }, + "storage-modifiers": { + "patterns": [ + { + "match": "\\b(private|protected|public)\\b", + "name": "storage.modifier.access-control.groovy" + }, + { + "match": "\\b(static)\\b", + "name": "storage.modifier.static.groovy" + }, + { + "match": "\\b(final)\\b", + "name": "storage.modifier.final.groovy" + }, + { + "match": "\\b(native|synchronized|abstract|threadsafe|transient)\\b", + "name": "storage.modifier.other.groovy" + } + ] + }, + "string-quoted-double": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.groovy" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.groovy" + } + }, + "name": "string.quoted.double.groovy", + "patterns": [ + { + "include": "#string-quoted-double-contents" + } + ] + }, + "string-quoted-double-contents": { + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.groovy" + }, + { + "applyEndPatternLast": 1, + "begin": "\\$\\w", + "end": "(?=\\W)", + "name": "variable.other.interpolated.groovy", + "patterns": [ + { + "match": "\\w", + "name": "variable.other.interpolated.groovy" + }, + { + "match": "\\.", + "name": "keyword.other.dereference.groovy" + } + ] + }, + { + "begin": "\\$\\{", + "captures": { + "0": { + "name": "punctuation.section.embedded.groovy" + } + }, + "end": "\\}", + "name": "source.groovy.embedded.source", + "patterns": [ + { + "include": "#nest_curly" + } + ] + } + ] + }, + "string-quoted-double-multiline": { + "begin": "\"\"\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.groovy" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.groovy" + } + }, + "name": "string.quoted.double.multiline.groovy", + "patterns": [ + { + "include": "#string-quoted-double-contents" + } + ] + }, + "string-quoted-single": { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.groovy" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.groovy" + } + }, + "name": "string.quoted.single.groovy", + "patterns": [ + { + "include": "#string-quoted-single-contents" + } + ] + }, + "string-quoted-single-contents": { + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.groovy" + } + ] + }, + "string-quoted-single-multiline": { + "begin": "'''", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.groovy" + } + }, + "end": "'''", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.groovy" + } + }, + "name": "string.quoted.single.multiline.groovy", + "patterns": [ + { + "include": "#string-quoted-single-contents" + } + ] + }, + "strings": { + "patterns": [ + { + "include": "#string-quoted-double-multiline" + }, + { + "include": "#string-quoted-single-multiline" + }, + { + "include": "#string-quoted-double" + }, + { + "include": "#string-quoted-single" + }, + { + "include": "#regexp" + } + ] + }, + "structures": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.structure.begin.groovy" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.structure.end.groovy" + } + }, + "name": "meta.structure.groovy", + "patterns": [ + { + "include": "#groovy-code" + }, + { + "match": ",", + "name": "punctuation.definition.separator.groovy" + } + ] + }, + "support-functions": { + "patterns": [ + { + "match": "(?x)\\b(?:sprintf|print(?:f|ln)?)\\b", + "name": "support.function.print.groovy" + }, + { + "match": "(?x)\\b(?:shouldFail|fail(?:NotEquals)?|ass(?:ume|ert(?:S(?:cript|ame)|N(?:ot(?:Same|\n\t\t\t\t\tNull)|ull)|Contains|T(?:hat|oString|rue)|Inspect|Equals|False|Length|\n\t\t\t\t\tArrayEquals)))\\b", + "name": "support.function.testing.groovy" + } + ] + }, + "types": { + "patterns": [ + { + "match": "\\b(def)\\b", + "name": "storage.type.def.groovy" + }, + { + "include": "#primitive-types" + }, + { + "include": "#primitive-arrays" + }, + { + "include": "#object-types" + } + ] + }, + "values": { + "patterns": [ + { + "include": "#language-variables" + }, + { + "include": "#strings" + }, + { + "include": "#numbers" + }, + { + "include": "#constants" + }, + { + "include": "#types" + }, + { + "include": "#structures" + }, + { + "include": "#method-call" + } + ] + }, + "variables": { + "applyEndPatternLast": 1, + "patterns": [ + { + "begin": "(?x:(?=\n (?:\n (?:private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final) # visibility/modifier\n |\n (?:def)\n |\n (?:void|boolean|byte|char|short|int|float|long|double)\n |\n (?:(?:[a-z]\\w*\\.)*[A-Z]+\\w*) # object type\n )\n \\s+\n [\\w\\d_<>\\[\\],\\s]+\n (?:=|$)\n \n \t\t\t))", + "end": ";|$", + "name": "meta.definition.variable.groovy", + "patterns": [ + { + "match": "\\s" + }, + { + "captures": { + "1": { + "name": "constant.variable.groovy" + } + }, + "match": "([A-Z_0-9]+)\\s+(?=\\=)" + }, + { + "captures": { + "1": { + "name": "meta.definition.variable.name.groovy" + } + }, + "match": "(\\w[^\\s,]*)\\s+(?=\\=)" + }, + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "keyword.operator.assignment.groovy" + } + }, + "end": "$", + "patterns": [ + { + "include": "#groovy-code" + } + ] + }, + { + "captures": { + "1": { + "name": "meta.definition.variable.name.groovy" + } + }, + "match": "(\\w[^\\s=]*)(?=\\s*($|;))" + }, + { + "include": "#groovy-code" + } + ] + } + ] + } + } +} diff --git a/src/lib/shiki/languages/hack.tmLanguage.json b/src/lib/shiki/languages/hack.tmLanguage.json new file mode 100644 index 0000000..1b8265d --- /dev/null +++ b/src/lib/shiki/languages/hack.tmLanguage.json @@ -0,0 +1,2645 @@ +{ + "scopeName": "source.hack", + "name": "hack", + "fileTypes": ["hh", "php", "hack"], + "foldingStartMarker": "(/\\*|\\{\\s*$|<<)", + "name": "comment.line.double-slash.php" + } + ] + } + ] + }, + "generics": { + "patterns": [ + { + "begin": "(<)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.generics.php" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.generics.php" + } + }, + "name": "meta.generics.php", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#generics" + }, + { + "match": "([-+])?([A-Za-z_][A-Za-z0-9_]*)(?:\\s+(as|super)\\s+([A-Za-z_][A-Za-z0-9_]*))?", + "name": "support.type.php" + }, + { + "include": "#type-annotation" + } + ] + } + ] + }, + "implements": { + "patterns": [ + { + "begin": "(?i)(implements)\\s+", + "beginCaptures": { + "1": { + "name": "storage.modifier.implements.php" + } + }, + "end": "(?i)(?=[;{])", + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "(?i)(?=[a-z0-9_\\\\]+)", + "contentName": "meta.other.inherited-class.php", + "end": "(?i)(?:\\s*(?:,|(?=[^a-z0-9_\\\\\\s]))\\s*)", + "patterns": [ + { + "begin": "(?i)(?=\\\\?[a-z_0-9]+\\\\)", + "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])", + "endCaptures": { + "1": { + "name": "entity.other.inherited-class.php" + } + }, + "patterns": [ + { + "include": "#namespace" + } + ] + }, + { + "include": "#class-builtin" + }, + { + "include": "#namespace" + }, + { + "match": "(?i)[a-z_][a-z_0-9]*", + "name": "entity.other.inherited-class.php" + } + ] + } + ] + } + ] + }, + "attributes": { + "patterns": [ + { + "begin": "(<<)(?!<)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.attributes.php" + } + }, + "end": "(>>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.attributes.php" + } + }, + "name": "meta.attributes.php", + "patterns": [ + { + "include": "#comments" + }, + { + "match": "([A-Za-z_][A-Za-z0-9_]*)", + "name": "entity.other.attribute-name.php" + }, + { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.parameters.begin.php" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + } + ] + } + ] + }, + "constants": { + "patterns": [ + { + "begin": "(?xi)\n(?=\n (\n (\\\\[a-z_][a-z_0-9]*\\\\[a-z_][a-z_0-9\\\\]*)\n |\n ([a-z_][a-z_0-9]*\\\\[a-z_][a-z_0-9\\\\]*)\n )\n [^a-z_0-9\\\\]\n)", + "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])", + "endCaptures": { + "1": { + "name": "constant.other.php" + } + }, + "patterns": [ + { + "include": "#namespace" + } + ] + }, + { + "begin": "(?=\\\\?[a-zA-Z_\\x{7f}-\\x{ff}])", + "end": "(?=[^\\\\a-zA-Z_\\x{7f}-\\x{ff}])", + "patterns": [ + { + "match": "(?i)\\b(TRUE|FALSE|NULL|__(FILE|DIR|FUNCTION|CLASS|METHOD|LINE|NAMESPACE)__)\\b", + "name": "constant.language.php" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + }, + "match": "(\\\\)?\\b(STD(IN|OUT|ERR)|ZEND_(THREAD_SAFE|DEBUG_BUILD)|DEFAULT_INCLUDE_PATH|P(HP_(R(OUND_HALF_(ODD|DOWN|UP|EVEN)|ELEASE_VERSION)|M(INOR_VERSION|A(XPATHLEN|JOR_VERSION))|BINDIR|S(HLIB_SUFFIX|YSCONFDIR|API)|CONFIG_FILE_(SCAN_DIR|PATH)|INT_(MAX|SIZE)|ZTS|O(S|UTPUT_HANDLER_(START|CONT|END))|D(EBUG|ATADIR)|URL_(SCHEME|HOST|USER|P(ORT|A(SS|TH))|QUERY|FRAGMENT)|PREFIX|E(XT(RA_VERSION|ENSION_DIR)|OL)|VERSION(_ID)?|WINDOWS_(NT_(SERVER|DOMAIN_CONTROLLER|WORKSTATION)|VERSION_(M(INOR|AJOR)|BUILD|S(UITEMASK|P_M(INOR|AJOR))|P(RODUCTTYPE|LATFORM)))|L(IBDIR|OCALSTATEDIR))|EAR_(INSTALL_DIR|EXTENSION_DIR))|E_(RECOVERABLE_ERROR|STRICT|NOTICE|CO(RE_(ERROR|WARNING)|MPILE_(ERROR|WARNING))|DEPRECATED|USER_(NOTICE|DEPRECATED|ERROR|WARNING)|PARSE|ERROR|WARNING|ALL))\\b", + "name": "support.constant.core.php" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + }, + "match": "(\\\\)?\\b(RADIXCHAR|GROUPING|M(_(1_PI|SQRT(1_2|2|3|PI)|2_(SQRTPI|PI)|PI(_(2|4))?|E(ULER)?|L(N(10|2|PI)|OG(10E|2E)))|ON_(GROUPING|1(1|2|0)?|7|2|8|THOUSANDS_SEP|3|DECIMAL_POINT|9|4|5|6))|S(TR_PAD_(RIGHT|BOTH|LEFT)|ORT_(REGULAR|STRING|NUMERIC|DESC|LOCALE_STRING|ASC)|EEK_(SET|CUR|END))|H(TML_(SPECIALCHARS|ENTITIES)|ASH_HMAC)|YES(STR|EXPR)|N(_(S(IGN_POSN|EP_BY_SPACE)|CS_PRECEDES)|O(STR|EXPR)|EGATIVE_SIGN|AN)|C(R(YPT_(MD5|BLOWFISH|S(HA(256|512)|TD_DES|ALT_LENGTH)|EXT_DES)|NCYSTR|EDITS_(G(ROUP|ENERAL)|MODULES|SAPI|DOCS|QA|FULLPAGE|ALL))|HAR_MAX|O(NNECTION_(NORMAL|TIMEOUT|ABORTED)|DESET|UNT_(RECURSIVE|NORMAL))|URRENCY_SYMBOL|ASE_(UPPER|LOWER))|__COMPILER_HALT_OFFSET__|T(HOUS(EP|ANDS_SEP)|_FMT(_AMPM)?)|IN(T_(CURR_SYMBOL|FRAC_DIGITS)|I_(S(YSTEM|CANNER_(RAW|NORMAL))|USER|PERDIR|ALL)|F(O_(GENERAL|MODULES|C(REDITS|ONFIGURATION)|ENVIRONMENT|VARIABLES|LICENSE|ALL))?)|D(_(T_FMT|FMT)|IRECTORY_SEPARATOR|ECIMAL_POINT|A(Y_(1|7|2|3|4|5|6)|TE_(R(SS|FC(1(123|036)|2822|8(22|50)|3339))|COOKIE|ISO8601|W3C|ATOM)))|UPLOAD_ERR_(NO_(TMP_DIR|FILE)|CANT_WRITE|INI_SIZE|OK|PARTIAL|EXTENSION|FORM_SIZE)|P(M_STR|_(S(IGN_POSN|EP_BY_SPACE)|CS_PRECEDES)|OSITIVE_SIGN|ATH(_SEPARATOR|INFO_(BASENAME|DIRNAME|EXTENSION|FILENAME)))|E(RA(_(YEAR|T_FMT|D_(T_FMT|FMT)))?|XTR_(REFS|SKIP|IF_EXISTS|OVERWRITE|PREFIX_(SAME|I(NVALID|F_EXISTS)|ALL))|NT_(NOQUOTES|COMPAT|IGNORE|QUOTES))|FRAC_DIGITS|L(C_(M(ONETARY|ESSAGES)|NUMERIC|C(TYPE|OLLATE)|TIME|ALL)|O(G_(MAIL|SYSLOG|N(O(TICE|WAIT)|DELAY|EWS)|C(R(IT|ON)|ONS)|INFO|ODELAY|D(EBUG|AEMON)|U(SER|UCP)|P(ID|ERROR)|E(RR|MERG)|KERN|WARNING|L(OCAL(1|7|2|3|4|5|0|6)|PR)|A(UTH(PRIV)?|LERT))|CK_(SH|NB|UN|EX)))|A(M_STR|B(MON_(1(1|2|0)?|7|2|8|3|9|4|5|6)|DAY_(1|7|2|3|4|5|6))|SSERT_(BAIL|CALLBACK|QUIET_EVAL|WARNING|ACTIVE)|LT_DIGITS))\\b", + "name": "support.constant.std.php" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + }, + "match": "(\\\\)?\\b(GLOB_(MARK|BRACE|NO(SORT|CHECK|ESCAPE)|ONLYDIR|ERR|AVAILABLE_FLAGS)|XML_(SAX_IMPL|HTML_DOCUMENT_NODE|N(OTATION_NODE|AMESPACE_DECL_NODE)|C(OMMENT_NODE|DATA_SECTION_NODE)|TEXT_NODE|OPTION_(SKIP_(TAGSTART|WHITE)|CASE_FOLDING|TARGET_ENCODING)|D(TD_NODE|OCUMENT_(NODE|TYPE_NODE|FRAG_NODE))|PI_NODE|E(RROR_(RECURSIVE_ENTITY_REF|MISPLACED_XML_PI|B(INARY_ENTITY_REF|AD_CHAR_REF)|SYNTAX|NO(NE|_(MEMORY|ELEMENTS))|TAG_MISMATCH|IN(CORRECT_ENCODING|VALID_TOKEN)|DUPLICATE_ATTRIBUTE|UN(CLOSED_(CDATA_SECTION|TOKEN)|DEFINED_ENTITY|KNOWN_ENCODING)|JUNK_AFTER_DOC_ELEMENT|PAR(TIAL_CHAR|AM_ENTITY_REF)|EXTERNAL_ENTITY_HANDLING|A(SYNC_ENTITY|TTRIBUTE_EXTERNAL_ENTITY_REF))|NTITY_(REF_NODE|NODE|DECL_NODE)|LEMENT_(NODE|DECL_NODE))|LOCAL_NAMESPACE|ATTRIBUTE_(N(MTOKEN(S)?|O(TATION|DE))|CDATA|ID(REF(S)?)?|DECL_NODE|EN(TITY|UMERATION)))|M(HASH_(RIPEMD(1(28|60)|256|320)|GOST|MD(2|4|5)|S(HA(1|2(24|56)|384|512)|NEFRU256)|HAVAL(1(28|92|60)|2(24|56))|CRC32(B)?|TIGER(1(28|60))?|WHIRLPOOL|ADLER32)|YSQL(_(BOTH|NUM|CLIENT_(SSL|COMPRESS|I(GNORE_SPACE|NTERACTIVE))|ASSOC)|I_(RE(PORT_(STRICT|INDEX|OFF|ERROR|ALL)|FRESH_(GRANT|MASTER|BACKUP_LOG|S(TATUS|LAVE)|HOSTS|T(HREADS|ABLES)|LOG)|AD_DEFAULT_(GROUP|FILE))|GROUP_FLAG|MULTIPLE_KEY_FLAG|B(INARY_FLAG|OTH|LOB_FLAG)|S(T(MT_ATTR_(CURSOR_TYPE|UPDATE_MAX_LENGTH|PREFETCH_ROWS)|ORE_RESULT)|E(RVER_QUERY_(NO_(GOOD_INDEX_USED|INDEX_USED)|WAS_SLOW)|T_(CHARSET_NAME|FLAG)))|N(O(_D(EFAULT_VALUE_FLAG|ATA)|T_NULL_FLAG)|UM(_FLAG)?)|C(URSOR_TYPE_(READ_ONLY|SCROLLABLE|NO_CURSOR|FOR_UPDATE)|LIENT_(SSL|NO_SCHEMA|COMPRESS|I(GNORE_SPACE|NTERACTIVE)|FOUND_ROWS))|T(YPE_(GEOMETRY|MEDIUM_BLOB|B(IT|LOB)|S(HORT|TRING|ET)|YEAR|N(ULL|EWD(ECIMAL|ATE))|CHAR|TI(ME(STAMP)?|NY(_BLOB)?)|INT(24|ERVAL)|D(OUBLE|ECIMAL|ATE(TIME)?)|ENUM|VAR_STRING|FLOAT|LONG(_BLOB|LONG)?)|IMESTAMP_FLAG)|INIT_COMMAND|ZEROFILL_FLAG|O(N_UPDATE_NOW_FLAG|PT_(NET_(READ_BUFFER_SIZE|CMD_BUFFER_SIZE)|CONNECT_TIMEOUT|INT_AND_FLOAT_NATIVE|LOCAL_INFILE))|D(EBUG_TRACE_ENABLED|ATA_TRUNCATED)|U(SE_RESULT|N(SIGNED_FLAG|IQUE_KEY_FLAG))|P(RI_KEY_FLAG|ART_KEY_FLAG)|ENUM_FLAG|A(S(SOC|YNC)|UTO_INCREMENT_FLAG)))|CRYPT_(R(C(2|6)|IJNDAEL_(1(28|92)|256)|AND)|GOST|XTEA|M(ODE_(STREAM|NOFB|C(BC|FB)|OFB|ECB)|ARS)|BLOWFISH(_COMPAT)?|S(ERPENT|KIPJACK|AFER(128|PLUS|64))|C(RYPT|AST_(128|256))|T(RIPLEDES|HREEWAY|WOFISH)|IDEA|3DES|DE(S|CRYPT|V_(RANDOM|URANDOM))|PANAMA|EN(CRYPT|IGNA)|WAKE|LOKI97|ARCFOUR(_IV)?))|S(TREAM_(REPORT_ERRORS|M(UST_SEEK|KDIR_RECURSIVE)|BUFFER_(NONE|FULL|LINE)|S(HUT_(RD(WR)?|WR)|OCK_(R(DM|AW)|S(TREAM|EQPACKET)|DGRAM)|ERVER_(BIND|LISTEN))|NOTIFY_(RE(SOLVE|DIRECTED)|MIME_TYPE_IS|SEVERITY_(INFO|ERR|WARN)|CO(MPLETED|NNECT)|PROGRESS|F(ILE_SIZE_IS|AILURE)|AUTH_RE(SULT|QUIRED))|C(RYPTO_METHOD_(SSLv(2(_(SERVER|CLIENT)|3_(SERVER|CLIENT))|3_(SERVER|CLIENT))|TLS_(SERVER|CLIENT))|LIENT_(CONNECT|PERSISTENT|ASYNC_CONNECT)|AST_(FOR_SELECT|AS_STREAM))|I(GNORE_URL|S_URL|PPROTO_(RAW|TCP|I(CMP|P)|UDP))|O(OB|PTION_(READ_(BUFFER|TIMEOUT)|BLOCKING|WRITE_BUFFER))|U(RL_STAT_(QUIET|LINK)|SE_PATH)|P(EEK|F_(INET(6)?|UNIX))|ENFORCE_SAFE_MODE|FILTER_(READ|WRITE|ALL))|UNFUNCS_RET_(STRING|TIMESTAMP|DOUBLE)|QLITE(_(R(OW|EADONLY)|MIS(MATCH|USE)|B(OTH|USY)|SCHEMA|N(O(MEM|T(FOUND|ADB)|LFS)|UM)|C(O(RRUPT|NSTRAINT)|ANTOPEN)|TOOBIG|I(NTER(RUPT|NAL)|OERR)|OK|DONE|P(ROTOCOL|ERM)|E(RROR|MPTY)|F(ORMAT|ULL)|LOCKED|A(BORT|SSOC|UTH))|3_(B(OTH|LOB)|NU(M|LL)|TEXT|INTEGER|OPEN_(READ(ONLY|WRITE)|CREATE)|FLOAT|ASSOC)))|CURL(M(SG_DONE|_(BAD_(HANDLE|EASY_HANDLE)|CALL_MULTI_PERFORM|INTERNAL_ERROR|O(UT_OF_MEMORY|K)))|SSH_AUTH_(HOST|NONE|DEFAULT|P(UBLICKEY|ASSWORD)|KEYBOARD)|CLOSEPOLICY_(SLOWEST|CALLBACK|OLDEST|LEAST_(RECENTLY_USED|TRAFFIC))|_(HTTP_VERSION_(1_(1|0)|NONE)|NETRC_(REQUIRED|IGNORED|OPTIONAL)|TIMECOND_(IF(MODSINCE|UNMODSINCE)|LASTMOD)|IPRESOLVE_(V(4|6)|WHATEVER)|VERSION_(SSL|IPV6|KERBEROS4|LIBZ))|INFO_(RE(DIRECT_(COUNT|TIME)|QUEST_SIZE)|S(SL_VERIFYRESULT|TARTTRANSFER_TIME|IZE_(DOWNLOAD|UPLOAD)|PEED_(DOWNLOAD|UPLOAD))|H(TTP_CODE|EADER_(SIZE|OUT))|NAMELOOKUP_TIME|C(ON(NECT_TIME|TENT_(TYPE|LENGTH_(DOWNLOAD|UPLOAD)))|ERTINFO)|TOTAL_TIME|PR(IVATE|ETRANSFER_TIME)|EFFECTIVE_URL|FILETIME)|OPT_(R(E(SUME_FROM|TURNTRANSFER|DIR_PROTOCOLS|FERER|AD(DATA|FUNCTION))|AN(GE|DOM_FILE))|MAX(REDIRS|CONNECTS)|B(INARYTRANSFER|UFFERSIZE)|S(S(H_(HOST_PUBLIC_KEY_MD5|P(RIVATE_KEYFILE|UBLIC_KEYFILE)|AUTH_TYPES)|L(CERT(TYPE|PASSWD)?|_(CIPHER_LIST|VERIFY(HOST|PEER))|ENGINE(_DEFAULT)?|VERSION|KEY(TYPE|PASSWD)?))|TDERR)|H(TTP(GET|HEADER|200ALIASES|_VERSION|PROXYTUNNEL|AUTH)|EADER(FUNCTION)?)|N(O(BODY|SIGNAL|PROGRESS)|ETRC)|C(RLF|O(NNECTTIMEOUT(_MS)?|OKIE(SESSION|JAR|FILE)?)|USTOMREQUEST|ERTINFO|LOSEPOLICY|A(INFO|PATH))|T(RANSFERTEXT|CP_NODELAY|IME(CONDITION|OUT(_MS)?|VALUE))|I(N(TERFACE|FILE(SIZE)?)|PRESOLVE)|DNS_(CACHE_TIMEOUT|USE_GLOBAL_CACHE)|U(RL|SER(PWD|AGENT)|NRESTRICTED_AUTH|PLOAD)|P(R(IVATE|O(GRESSFUNCTION|XY(TYPE|USERPWD|PORT|AUTH)?|TOCOLS))|O(RT|ST(REDIR|QUOTE|FIELDS)?)|UT)|E(GDSOCKET|NCODING)|VERBOSE|K(RB4LEVEL|EYPASSWD)|QUOTE|F(RESH_CONNECT|TP(SSLAUTH|_(S(SL|KIP_PASV_IP)|CREATE_MISSING_DIRS|USE_EP(RT|SV)|FILEMETHOD)|PORT|LISTONLY|APPEND)|ILE(TIME)?|O(RBID_REUSE|LLOWLOCATION)|AILONERROR)|WRITE(HEADER|FUNCTION)|LOW_SPEED_(TIME|LIMIT)|AUTOREFERER)|PRO(XY_(SOCKS(4|5)|HTTP)|TO_(S(CP|FTP)|HTTP(S)?|T(ELNET|FTP)|DICT|F(TP(S)?|ILE)|LDAP(S)?|ALL))|E_(RE(CV_ERROR|AD_ERROR)|GOT_NOTHING|MALFORMAT_USER|BAD_(C(ONTENT_ENCODING|ALLING_ORDER)|PASSWORD_ENTERED|FUNCTION_ARGUMENT)|S(S(H|L_(C(IPHER|ONNECT_ERROR|ERTPROBLEM|ACERT)|PEER_CERTIFICATE|ENGINE_(SETFAILED|NOTFOUND)))|HARE_IN_USE|END_ERROR)|HTTP_(RANGE_ERROR|NOT_FOUND|PO(RT_FAILED|ST_ERROR))|COULDNT_(RESOLVE_(HOST|PROXY)|CONNECT)|T(OO_MANY_REDIRECTS|ELNET_OPTION_SYNTAX)|O(BSOLETE|UT_OF_MEMORY|PERATION_TIMEOUTED|K)|U(RL_MALFORMAT(_USER)?|N(SUPPORTED_PROTOCOL|KNOWN_TELNET_OPTION))|PARTIAL_FILE|F(TP_(BAD_DOWNLOAD_RESUME|SSL_FAILED|C(OULDNT_(RETR_FILE|GET_SIZE|S(TOR_FILE|ET_(BINARY|ASCII))|USE_REST)|ANT_(RECONNECT|GET_HOST))|USER_PASSWORD_INCORRECT|PORT_FAILED|QUOTE_ERROR|W(RITE_ERROR|EIRD_(SERVER_REPLY|227_FORMAT|USER_REPLY|PAS(S_REPLY|V_REPLY)))|ACCESS_DENIED)|ILE(SIZE_EXCEEDED|_COULDNT_READ_FILE)|UNCTION_NOT_FOUND|AILED_INIT)|WRITE_ERROR|L(IBRARY_NOT_FOUND|DAP_(SEARCH_FAILED|CANNOT_BIND|INVALID_URL))|ABORTED_BY_CALLBACK)|VERSION_NOW|FTP(METHOD_(MULTICWD|SINGLECWD|NOCWD)|SSL_(NONE|CONTROL|TRY|ALL)|AUTH_(SSL|TLS|DEFAULT))|AUTH_(GSSNEGOTIATE|BASIC|NTLM|DIGEST|ANY(SAFE)?))|I(MAGETYPE_(GIF|XBM|BMP|SWF|COUNT|TIFF_(MM|II)|I(CO|FF)|UNKNOWN|J(B2|P(X|2|C|EG(2000)?))|P(SD|NG)|WBMP)|NPUT_(REQUEST|GET|SE(RVER|SSION)|COOKIE|POST|ENV)|CONV_(MIME_DECODE_(STRICT|CONTINUE_ON_ERROR)|IMPL|VERSION))|D(NS_(MX|S(RV|OA)|HINFO|N(S|APTR)|CNAME|TXT|PTR|A(NY|LL|AAA|6)?)|OM(STRING_SIZE_ERR|_(SYNTAX_ERR|HIERARCHY_REQUEST_ERR|N(O(_(MODIFICATION_ALLOWED_ERR|DATA_ALLOWED_ERR)|T_(SUPPORTED_ERR|FOUND_ERR))|AMESPACE_ERR)|IN(DEX_SIZE_ERR|USE_ATTRIBUTE_ERR|VALID_(MODIFICATION_ERR|STATE_ERR|CHARACTER_ERR|ACCESS_ERR))|PHP_ERR|VALIDATION_ERR|WRONG_DOCUMENT_ERR)))|JSON_(HEX_(TAG|QUOT|A(MP|POS))|NUMERIC_CHECK|ERROR_(S(YNTAX|TATE_MISMATCH)|NONE|CTRL_CHAR|DEPTH|UTF8)|FORCE_OBJECT)|P(REG_(RECURSION_LIMIT_ERROR|GREP_INVERT|BA(CKTRACK_LIMIT_ERROR|D_UTF8_(OFFSET_ERROR|ERROR))|S(PLIT_(NO_EMPTY|OFFSET_CAPTURE|DELIM_CAPTURE)|ET_ORDER)|NO_ERROR|INTERNAL_ERROR|OFFSET_CAPTURE|PATTERN_ORDER)|SFS_(PASS_ON|ERR_FATAL|F(EED_ME|LAG_(NORMAL|FLUSH_(CLOSE|INC))))|CRE_VERSION|OSIX_(R_OK|X_OK|S_IF(REG|BLK|SOCK|CHR|IFO)|F_OK|W_OK))|F(NM_(NOESCAPE|CASEFOLD|P(ERIOD|ATHNAME))|IL(TER_(REQUIRE_(SCALAR|ARRAY)|SANITIZE_(MAGIC_QUOTES|S(TRI(NG|PPED)|PECIAL_CHARS)|NUMBER_(INT|FLOAT)|URL|E(MAIL|NCODED)|FULL_SPECIAL_CHARS)|NULL_ON_FAILURE|CALLBACK|DEFAULT|UNSAFE_RAW|VALIDATE_(REGEXP|BOOLEAN|I(NT|P)|URL|EMAIL|FLOAT)|F(ORCE_ARRAY|LAG_(S(CHEME_REQUIRED|TRIP_(BACKTICK|HIGH|LOW))|HOST_REQUIRED|NO(NE|_(RES_RANGE|PRIV_RANGE|ENCODE_QUOTES))|IPV(4|6)|PATH_REQUIRED|E(MPTY_STRING_NULL|NCODE_(HIGH|LOW|AMP))|QUERY_REQUIRED|ALLOW_(SCIENTIFIC|HEX|THOUSAND|OCTAL|FRACTION))))|E(_(BINARY|SKIP_EMPTY_LINES|NO_DEFAULT_CONTEXT|TEXT|IGNORE_NEW_LINES|USE_INCLUDE_PATH|APPEND)|INFO_(RAW|MIME(_(TYPE|ENCODING))?|SYMLINK|NONE|CONTINUE|DEVICES|PRESERVE_ATIME)))|ORCE_(GZIP|DEFLATE))|LIBXML_(XINCLUDE|N(SCLEAN|O(XMLDECL|BLANKS|NET|CDATA|E(RROR|MPTYTAG|NT)|WARNING))|COMPACT|D(TD(VALID|LOAD|ATTR)|OTTED_VERSION)|PARSEHUGE|ERR_(NONE|ERROR|FATAL|WARNING)|VERSION|LOADED_VERSION))\\b", + "name": "support.constant.ext.php" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + }, + "match": "(\\\\)?\\bT_(RE(TURN|QUIRE(_ONCE)?)|G(OTO|LOBAL)|XOR_EQUAL|M(INUS_EQUAL|OD_EQUAL|UL_EQUAL|ETHOD_C|L_COMMENT)|B(REAK|OOL(_CAST|EAN_(OR|AND))|AD_CHARACTER)|S(R(_EQUAL)?|T(RING(_(CAST|VARNAME))?|A(RT_HEREDOC|TIC))|WITCH|L(_EQUAL)?)|HALT_COMPILER|N(S_(SEPARATOR|C)|UM_STRING|EW|AMESPACE)|C(HARACTER|O(MMENT|N(ST(ANT_ENCAPSED_STRING)?|CAT_EQUAL|TINUE))|URLY_OPEN|L(O(SE_TAG|NE)|ASS(_C)?)|A(SE|TCH))|T(RY|HROW)|I(MPLEMENTS|S(SET|_(GREATER_OR_EQUAL|SMALLER_OR_EQUAL|NOT_(IDENTICAL|EQUAL)|IDENTICAL|EQUAL))|N(STANCEOF|C(LUDE(_ONCE)?)?|T(_CAST|ERFACE)|LINE_HTML)|F)|O(R_EQUAL|BJECT_(CAST|OPERATOR)|PEN_TAG(_WITH_ECHO)?|LD_FUNCTION)|D(NUMBER|I(R|V_EQUAL)|O(C_COMMENT|UBLE_(C(OLON|AST)|ARROW)|LLAR_OPEN_CURLY_BRACES)?|E(C(LARE)?|FAULT))|U(SE|NSET(_CAST)?)|P(R(I(NT|VATE)|OTECTED)|UBLIC|LUS_EQUAL|AAMAYIM_NEKUDOTAYIM)|E(X(TENDS|IT)|MPTY|N(CAPSED_AND_WHITESPACE|D(SWITCH|_HEREDOC|IF|DECLARE|FOR(EACH)?|WHILE))|CHO|VAL|LSE(IF)?)|VAR(IABLE)?|F(I(NAL|LE)|OR(EACH)?|UNC(_C|TION))|WHI(TESPACE|LE)|L(NUMBER|I(ST|NE)|OGICAL_(XOR|OR|AND))|A(RRAY(_CAST)?|BSTRACT|S|ND_EQUAL))\\b", + "name": "support.constant.parser-token.php" + }, + { + "comment": "In PHP, any identifier which is not a variable is taken to be a constant.\nHowever, if there is no constant defined with the given name then a notice\nis generated and the constant is assumed to have the value of its name.", + "match": "[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*", + "name": "constant.other.php" + } + ] + } + ] + }, + "function-return-type": { + "patterns": [ + { + "begin": "(:)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.type.php" + } + }, + "end": "(?=[{;])", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#type-annotation" + }, + { + "include": "#class-name" + } + ] + } + ] + }, + "type-annotation": { + "name": "support.type.php", + "patterns": [ + { + "match": "\\b(?:bool|int|float|string|resource|mixed|arraykey|nonnull|dict|vec|keyset)\\b", + "name": "support.type.php" + }, + { + "begin": "([A-Za-z_][A-Za-z0-9_]*)<", + "beginCaptures": { + "1": { + "name": "support.class.php" + } + }, + "end": ">", + "patterns": [ + { + "include": "#type-annotation" + } + ] + }, + { + "begin": "(shape\\()", + "end": "((,|\\.\\.\\.)?\\s*\\))", + "endCaptures": { + "1": { + "name": "keyword.operator.key.php" + } + }, + "name": "storage.type.shape.php", + "patterns": [ + { + "include": "#type-annotation" + }, + { + "include": "#strings" + }, + { + "include": "#constants" + } + ] + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#type-annotation" + } + ] + }, + { + "include": "#class-name" + }, + { + "include": "#comments" + } + ] + }, + "function-arguments": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#attributes" + }, + { + "include": "#type-annotation" + }, + { + "begin": "(?xi)((\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # The variable name", + "end": "(?xi)\n\\s*(?=,|\\)|$) # A closing parentheses (end of argument list) or a comma", + "beginCaptures": { + "1": { + "name": "variable.other.php" + }, + "2": { + "name": "punctuation.definition.variable.php" + } + }, + "patterns": [ + { + "begin": "(=)", + "end": "(?=,|\\))", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + } + ] + } + ] + }, + "literal-collections": { + "patterns": [ + { + "begin": "(Vector|ImmVector|Set|ImmSet|Map|ImmMap|Pair)\\s*({)", + "end": "(})", + "beginCaptures": { + "1": { + "name": "support.class.php" + }, + "2": { + "name": "punctuation.section.array.begin.php" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.section.array.end.php" + } + }, + "name": "meta.collection.literal.php", + "patterns": [ + { + "include": "#language" + } + ] + } + ] + }, + "function-call": { + "patterns": [ + { + "begin": "(?i)(?=\\\\?[a-z_0-9\\\\]+\\\\[a-z_][a-z0-9_]*\\s*\\()", + "comment": "Functions in a user-defined namespace (overrides any built-ins)", + "end": "(?=\\s*\\()", + "patterns": [ + { + "include": "#user-function-call" + } + ] + }, + { + "match": "(?i)\\b(print|echo)\\b", + "name": "support.function.construct.php" + }, + { + "begin": "(?i)(\\\\)?(?=\\b[a-z_][a-z_0-9]*\\s*\\()", + "beginCaptures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + }, + "comment": "Root namespace function calls (built-in or user)", + "end": "(?=\\s*\\()", + "patterns": [ + { + "match": "(?i)\\b(isset|unset|e(val|mpty)|list)(?=\\s*\\()", + "name": "support.function.construct.php" + }, + { + "include": "#support" + }, + { + "include": "#user-function-call" + } + ] + } + ] + }, + "heredoc": { + "patterns": [ + { + "begin": "<<<\\s*(\"?)([a-zA-Z_]+[a-zA-Z0-9_]*)(\\1)\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.operator.heredoc.php" + } + }, + "end": "^(\\2)(?=;?$)", + "endCaptures": { + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "string.unquoted.heredoc.php", + "patterns": [ + { + "include": "#interpolation" + } + ] + }, + { + "begin": "<<<\\s*('?)([a-zA-Z_]+[a-zA-Z0-9_]*)(\\1)\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.operator.heredoc.php" + } + }, + "end": "^(\\2)(?=;?$)", + "endCaptures": { + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "string.unquoted.heredoc.nowdoc.php" + } + ] + }, + "instantiation": { + "begin": "(?i)(new)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.other.new.php" + } + }, + "end": "(?i)(?=[^$a-z0-9_\\\\])", + "patterns": [ + { + "match": "(parent|static|self)(?=[^a-z0-9_])", + "name": "support.type.php" + }, + { + "include": "#class-name" + }, + { + "include": "#variable-name" + } + ] + }, + "interpolation": { + "comment": "http://www.php.net/manual/en/language.types.string.php#language.types.string.parsing", + "patterns": [ + { + "comment": "Interpolating octal values e.g. \\01 or \\07.", + "match": "\\\\[0-7]{1,3}", + "name": "constant.numeric.octal.php" + }, + { + "comment": "Interpolating hex values e.g. \\x1 or \\xFF.", + "match": "\\\\x[0-9A-Fa-f]{1,2}", + "name": "constant.numeric.hex.php" + }, + { + "comment": "Escaped characters in double-quoted strings e.g. \\n or \\t.", + "match": "\\\\[nrt\\\\\\$\\\"]", + "name": "constant.character.escape.php" + }, + { + "comment": "Interpolating expressions in double-quoted strings with {} e.g. {$x->y->z[0][1]}.", + "match": "(\\{\\$.*?\\})", + "name": "variable.other.php" + }, + { + "comment": "Interpolating simple variables, e.g. $x, $x->y, $x[z] but not $x->y->z.", + "match": "(\\$[a-zA-Z_][a-zA-Z0-9_]*((->[a-zA-Z_][a-zA-Z0-9_]*)|(\\[[a-zA-Z0-9_]+\\]))?)", + "name": "variable.other.php" + } + ] + }, + "invoke-call": { + "captures": { + "1": { + "name": "punctuation.definition.variable.php" + }, + "2": { + "name": "variable.other.php" + } + }, + "match": "(?i)(\\$+)([a-z_][a-z_0-9]*)(?=\\s*\\()", + "name": "meta.function-call.invoke.php" + }, + "interface": { + "begin": "^(?i)\\s*(?:(public|internal)\\s+)?(interface)\\b", + "beginCaptures": { + "1": { + "name": "storage.modifier.php" + }, + "2": { + "name": "storage.type.interface.php" + } + }, + "name": "meta.interface.php", + "end": "(?=[;{])", + "patterns": [ + { + "include": "#comments" + }, + { + "match": "\\b(extends)\\b", + "captures": { + "1": { + "name": "storage.modifier.extends.php" + } + } + }, + { + "include": "#generics" + }, + { + "include": "#namespace" + }, + { + "match": "(?i)[a-z0-9_]+", + "name": "entity.name.type.class.php" + } + ] + }, + "language": { + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "(?=^\\s*<<)", + "end": "(?<=>>)", + "patterns": [ + { + "include": "#attributes" + } + ] + }, + { + "include": "#xhp" + }, + { + "include": "#interface" + }, + { + "begin": "(?xi)\n^\\s*\n(?:(module)\\s*)?(type|newtype)\n\\s+\n([a-z0-9_]+)", + "beginCaptures": { + "1": { + "name": "storage.modifier.php" + }, + "2": { + "name": "storage.type.typedecl.php" + }, + "3": { + "name": "entity.name.type.typedecl.php" + } + }, + "end": "(;)", + "endCaptures": { + "1": { + "name": "punctuation.termination.expression.php" + } + }, + "name": "meta.typedecl.php", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#generics" + }, + { + "match": "(=)", + "name": "keyword.operator.assignment.php" + }, + { + "include": "#type-annotation" + } + ] + }, + { + "begin": "(?i)^\\s*(?:(public|internal)\\s+)?(enum)\\s+(class)\\s+([a-z0-9_]+)\\s*:?", + "beginCaptures": { + "1": { + "name": "storage.modifier.php" + }, + "2": { + "name": "storage.modifier.php" + }, + "3": { + "name": "storage.type.class.enum.php" + }, + "4": { + "name": "entity.name.type.class.enum.php" + } + }, + "end": "(?=[{])", + "name": "meta.class.enum.php", + "patterns": [ + { + "match": "\\b(extends)\\b", + "name": "storage.modifier.extends.php" + }, + { + "include": "#type-annotation" + } + ] + }, + { + "begin": "(?i)^\\s*(?:(public|internal)\\s+)?(enum)\\s+([a-z0-9_]+)\\s*:?", + "beginCaptures": { + "1": { + "name": "storage.modifier.php" + }, + "2": { + "name": "storage.type.enum.php" + }, + "3": { + "name": "entity.name.type.enum.php" + } + }, + "end": "\\{", + "name": "meta.enum.php", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#type-annotation" + } + ] + }, + { + "begin": "(?i)^\\s*(?:(public|internal)\\s+)?(trait)\\s+([a-z0-9_]+)\\s*", + "beginCaptures": { + "1": { + "name": "storage.modifier.php" + }, + "2": { + "name": "storage.type.trait.php" + }, + "3": { + "name": "entity.name.type.class.php" + } + }, + "end": "(?=[{])", + "name": "meta.trait.php", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#generics" + }, + { + "include": "#implements" + } + ] + }, + { + "begin": "^\\s*(new)\\s+(module)\\s+([A-Za-z0-9_\\.]+)\\b", + "beginCaptures": { + "1": { + "name": "storage.type.module.php" + }, + "2": { + "name": "storage.type.module.php" + }, + "3": { + "name": "entity.name.type.module.php" + } + }, + "end": "(?=[{])", + "name": "meta.module.php", + "patterns": [ + { + "include": "#comments" + } + ] + }, + { + "begin": "^\\s*(module)\\s+([A-Za-z0-9_\\.]+)\\b", + "beginCaptures": { + "1": { + "name": "keyword.other.module.php" + }, + "2": { + "name": "entity.name.type.module.php" + } + }, + "end": "$|(?=[\\s;])", + "name": "meta.use.module.php", + "patterns": [ + { + "include": "#comments" + } + ] + }, + { + "begin": "(?i)(?:^\\s*|\\s*)(namespace)\\b\\s+(?=([a-z0-9_\\\\]*\\s*($|[;{]|(\\/[\\/*])))|$)", + "beginCaptures": { + "1": { + "name": "keyword.other.namespace.php" + } + }, + "contentName": "entity.name.type.namespace.php", + "end": "(?i)(?=\\s*$|[^a-z0-9_\\\\])", + "name": "meta.namespace.php", + "patterns": [ + { + "match": "\\\\", + "name": "punctuation.separator.inheritance.php" + } + ] + }, + { + "begin": "(?i)\\s*\\b(use)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.other.use.php" + } + }, + "end": "(?=;|(?:^\\s*$))", + "name": "meta.use.php", + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "(?i)\\s*(?=[a-z_0-9\\\\])", + "end": "(?xi)\n(?:\n (?:\\s*(as)\\b\\s*([a-z_0-9]*)\\s*(?=,|;|$))|\n (?=,|;|$)\n)", + "endCaptures": { + "1": { + "name": "keyword.other.use-as.php" + }, + "2": { + "name": "support.other.namespace.use-as.php" + } + }, + "patterns": [ + { + "include": "#class-builtin" + }, + { + "begin": "(?i)\\s*(?=[\\\\a-z_0-9])", + "end": "$|(?=[\\s,;])", + "name": "support.other.namespace.use.php", + "patterns": [ + { + "match": "\\\\", + "name": "punctuation.separator.inheritance.php" + } + ] + } + ] + }, + { + "match": "\\s*,\\s*" + } + ] + }, + { + "begin": "(?i)^\\s*((?:(?:final|abstract|public|internal)\\s+)*)(class)\\s+([a-z0-9_]+)\\s*", + "beginCaptures": { + "1": { + "patterns": [ + { + "match": "final|abstract|public|internal", + "name": "storage.modifier.php" + } + ] + }, + "2": { + "name": "storage.type.class.php" + }, + "3": { + "name": "entity.name.type.class.php" + } + }, + "end": "(?=[;{])", + "name": "meta.class.php", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#generics" + }, + { + "include": "#implements" + }, + { + "begin": "(?i)(extends)\\s+", + "beginCaptures": { + "1": { + "name": "storage.modifier.extends.php" + } + }, + "contentName": "meta.other.inherited-class.php", + "end": "(?i)(?=[^a-z_0-9\\\\])", + "patterns": [ + { + "begin": "(?i)(?=\\\\?[a-z_0-9]+\\\\)", + "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])", + "endCaptures": { + "1": { + "name": "entity.other.inherited-class.php" + } + }, + "patterns": [ + { + "include": "#namespace" + } + ] + }, + { + "include": "#class-builtin" + }, + { + "include": "#namespace" + }, + { + "match": "(?i)[a-z_][a-z_0-9]*", + "name": "entity.other.inherited-class.php" + } + ] + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.control.php" + } + }, + "match": "\\s*\\b(await|break|c(ase|ontinue)|concurrent|default|do|else|for(each)?|if|return|switch|use|while)\\b" + }, + { + "begin": "(?i)\\b((?:require|include)(?:_once)?)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.import.include.php" + } + }, + "end": "(?=\\s|;|$)", + "name": "meta.include.php", + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "begin": "\\b(catch)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.control.exception.catch.php" + }, + "2": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.php" + } + }, + "name": "meta.catch.php", + "patterns": [ + { + "include": "#namespace" + }, + { + "match": "(?xi)\n([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Exception class\n((?:\\s*\\|\\s*[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)*) # Optional additional exception classes\n\\s*\n((\\$+)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable", + "captures": { + "1": { + "name": "support.class.exception.php" + }, + "2": { + "patterns": [ + { + "match": "(?i)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*", + "name": "support.class.exception.php" + }, + { + "match": "\\|", + "name": "punctuation.separator.delimiter.php" + } + ] + }, + "3": { + "name": "variable.other.php" + }, + "4": { + "name": "punctuation.definition.variable.php" + } + } + } + ] + }, + { + "match": "\\b(catch|try|throw|exception|finally)\\b", + "name": "keyword.control.exception.php" + }, + { + "begin": "(?i)\\s*(?:(public|internal)\\s+)?(function)\\s*(?=\\()", + "beginCaptures": { + "1": { + "name": "storage.modifier.php" + }, + "2": { + "name": "storage.type.function.php" + } + }, + "end": "\\{|\\)", + "name": "meta.function.closure.php", + "patterns": [ + { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.parameters.begin.php" + } + }, + "contentName": "meta.function.arguments.php", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.php" + } + }, + "patterns": [ + { + "include": "#function-arguments" + } + ] + }, + { + "begin": "(?i)(use)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.function.use.php" + }, + "2": { + "name": "punctuation.definition.parameters.begin.php" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.php" + } + }, + "patterns": [ + { + "captures": { + "1": { + "name": "storage.modifier.reference.php" + }, + "2": { + "name": "variable.other.php" + }, + "3": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(?:\\s*(&))?\\s*((\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\\s*(?=,|\\))", + "name": "meta.function.closure.use.php" + } + ] + } + ] + }, + { + "begin": "(?x)\n\\s*((?:(?:final|abstract|public|private|protected|internal|static|async)\\s+)*)\n(function)\n(?:\\s+)\n(?:\n (__(?:call|construct|destruct|get|set|isset|unset|tostring|clone|set_state|sleep|wakeup|autoload|invoke|callStatic|dispose|disposeAsync)(?=[^a-zA-Z0-9_\\x7f-\\xff]))\n |\n ([a-zA-Z0-9_]+)\n)", + "beginCaptures": { + "1": { + "patterns": [ + { + "match": "final|abstract|public|private|protected|internal|static|async", + "name": "storage.modifier.php" + } + ] + }, + "2": { + "name": "storage.type.function.php" + }, + "3": { + "name": "support.function.magic.php" + }, + "4": { + "name": "entity.name.function.php" + }, + "5": { + "name": "meta.function.generics.php" + } + }, + "end": "(?=[{;])", + "name": "meta.function.php", + "patterns": [ + { + "include": "#generics" + }, + { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.parameters.begin.php" + } + }, + "end": "(?=\\))", + "contentName": "meta.function.arguments.php", + "patterns": [ + { + "include": "#function-arguments" + } + ] + }, + { + "begin": "(\\))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.php" + } + }, + "end": "(?=[{;])", + "patterns": [ + { + "include": "#function-return-type" + } + ] + } + ] + }, + { + "include": "#invoke-call" + }, + { + "begin": "(?xi)\n\\s*\n (?=\n [a-z_0-9$\\\\]+(::)\n (?:\n ([a-z_][a-z_0-9]*)\\s*\\(\n |\n ((\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n |\n ([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n )?\n )", + "end": "(?x)\n(::)\n(?:\n ([A-Za-z_][A-Za-z_0-9]*)\\s*\\(\n |\n ((\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n |\n ([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n)?", + "endCaptures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "meta.function-call.static.php" + }, + "3": { + "name": "variable.other.class.php" + }, + "4": { + "name": "punctuation.definition.variable.php" + }, + "5": { + "name": "constant.other.class.php" + } + }, + "patterns": [ + { + "match": "(self|static|parent)\\b", + "name": "support.type.php" + }, + { + "include": "#class-name" + }, + { + "include": "#variable-name" + } + ] + }, + { + "include": "#variables" + }, + { + "include": "#strings" + }, + { + "captures": { + "1": { + "name": "support.function.construct.php" + }, + "2": { + "name": "punctuation.definition.array.begin.php" + }, + "3": { + "name": "punctuation.definition.array.end.php" + } + }, + "match": "(array)(\\()(\\))", + "name": "meta.array.empty.php" + }, + { + "begin": "(array)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.construct.php" + }, + "2": { + "name": "punctuation.definition.array.begin.php" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.php" + } + }, + "name": "meta.array.php", + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "captures": { + "1": { + "name": "support.type.php" + } + }, + "match": "(?i)\\s*\\(\\s*(array|real|double|float|int(eger)?|bool(ean)?|string|object|binary|unset|arraykey|nonnull|dict|vec|keyset)\\s*\\)" + }, + { + "match": "(?i)\\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|clone|var|function|interface|trait|parent|self|object|arraykey|nonnull|dict|vec|keyset)\\b", + "name": "support.type.php" + }, + { + "match": "(?i)\\b(global|abstract|const|extends|implements|final|p(r(ivate|otected)|ublic)|internal|static)\\b", + "name": "storage.modifier.php" + }, + { + "include": "#object" + }, + { + "match": ";", + "name": "punctuation.terminator.expression.php" + }, + { + "include": "#heredoc" + }, + { + "match": "\\.=?", + "name": "keyword.operator.string.php" + }, + { + "match": "=>", + "name": "keyword.operator.key.php" + }, + { + "match": "==>", + "name": "keyword.operator.lambda.php" + }, + { + "match": "\\|>", + "name": "keyword.operator.pipe.php" + }, + { + "match": "(!==|!=|===|==)", + "name": "keyword.operator.comparison.php" + }, + { + "match": "=|\\+=|\\-=|\\*=|/=|%=|&=|\\|=|\\^=|<<=|>>=", + "name": "keyword.operator.assignment.php" + }, + { + "match": "(<=|>=|<|>)", + "name": "keyword.operator.comparison.php" + }, + { + "match": "(\\-\\-|\\+\\+)", + "name": "keyword.operator.increment-decrement.php" + }, + { + "match": "(\\-|\\+|\\*|/|%)", + "name": "keyword.operator.arithmetic.php" + }, + { + "match": "(!|&&|\\|\\|)", + "name": "keyword.operator.logical.php" + }, + { + "begin": "(?i)\\b(as|is)\\b\\s+(?=[\\\\$a-z_])", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.php" + } + }, + "end": "(?=[^\\\\$A-Za-z_0-9])", + "patterns": [ + { + "include": "#class-name" + }, + { + "include": "#variable-name" + } + ] + }, + { + "match": "(?i)\\b(is|as)\\b", + "name": "keyword.operator.type.php" + }, + { + "include": "#function-call" + }, + { + "match": "<<|>>|~|\\^|&|\\|", + "name": "keyword.operator.bitwise.php" + }, + { + "include": "#numbers" + }, + { + "include": "#instantiation" + }, + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.php" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "include": "#literal-collections" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.scope.begin.php" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.scope.end.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "include": "#constants" + } + ] + }, + "namespace": { + "begin": "(?i)((namespace)|[a-z0-9_]+)?(\\\\)(?=.*?[^a-z_0-9\\\\])", + "beginCaptures": { + "1": { + "name": "entity.name.type.namespace.php" + }, + "3": { + "name": "punctuation.separator.inheritance.php" + } + }, + "end": "(?i)(?=[a-z0-9_]*[^a-z0-9_\\\\])", + "name": "support.other.namespace.php", + "patterns": [ + { + "name": "entity.name.type.namespace.php", + "match": "(?i)[a-z0-9_]+(?=\\\\)" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + }, + "match": "(?i)(\\\\)" + } + ] + }, + "numbers": { + "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b", + "name": "constant.numeric.php" + }, + "object": { + "patterns": [ + { + "begin": "(->)(\\$?\\{)", + "beginCaptures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "punctuation.definition.variable.php" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.variable.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "meta.function-call.object.php" + }, + "3": { + "name": "variable.other.property.php" + }, + "4": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(?x)\n(->)\n (?:\n ([A-Za-z_][A-Za-z_0-9]*)\\s*\\(\n |\n ((\\$+)?[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n )?" + } + ] + }, + "parameter-default-types": { + "patterns": [ + { + "include": "#strings" + }, + { + "include": "#numbers" + }, + { + "include": "#variables" + }, + { + "match": "=>", + "name": "keyword.operator.key.php" + }, + { + "match": "=", + "name": "keyword.operator.assignment.php" + }, + { + "include": "#instantiation" + }, + { + "begin": "(?xi)\n\\s*\n(?=\n [a-z_0-9\\\\]+(::)\n ([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?\n)", + "end": "(?i)(::)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?", + "endCaptures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "constant.other.class.php" + } + }, + "patterns": [ + { + "include": "#class-name" + } + ] + }, + { + "include": "#constants" + } + ] + }, + "php_doc": { + "patterns": [ + { + "comment": "PHPDocumentor only recognises lines with an asterisk as the first non-whitespaces character", + "match": "^(?!\\s*\\*).*$\\n?", + "name": "invalid.illegal.missing-asterisk.phpdoc.php" + }, + { + "captures": { + "1": { + "name": "keyword.other.phpdoc.php" + }, + "3": { + "name": "storage.modifier.php" + }, + "4": { + "name": "invalid.illegal.wrong-access-type.phpdoc.php" + } + }, + "match": "^\\s*\\*\\s*(@access)\\s+((public|private|protected|internal)|(.+))\\s*$" + }, + { + "captures": { + "1": { + "name": "keyword.other.phpdoc.php" + }, + "2": { + "name": "markup.underline.link.php" + } + }, + "match": "(@xlink)\\s+(.+)\\s*$" + }, + { + "match": "\\@(a(bstract|uthor)|c(ategory|opyright)|example|global|internal|li(cense|nk)|pa(ckage|ram)|return|s(ee|ince|tatic|ubpackage)|t(hrows|odo)|v(ar|ersion)|uses|deprecated|final|ignore)\\b", + "name": "keyword.other.phpdoc.php" + }, + { + "captures": { + "1": { + "name": "keyword.other.phpdoc.php" + } + }, + "match": "\\{(@(link)).+?\\}", + "name": "meta.tag.inline.phpdoc.php" + } + ] + }, + "regex-double-quoted": { + "begin": "(?x)\n(?<=re)\"/ (?=(\\\\.|[^\"/])++/[imsxeADSUXu]*\")", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "end": "(/)([imsxeADSUXu]*)(\")", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.regexp.double-quoted.php", + "patterns": [ + { + "comment": "Escaped from the regexp – there can also be 2 backslashes (since 1 will escape the first)", + "match": "(\\\\){1,2}[.$^\\[\\]{}]", + "name": "constant.character.escape.regex.php" + }, + { + "include": "#interpolation" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.arbitrary-repetition.php" + }, + "3": { + "name": "punctuation.definition.arbitrary-repetition.php" + } + }, + "match": "(\\{)\\d+(,\\d+)?(\\})", + "name": "string.regexp.arbitrary-repetition.php" + }, + { + "begin": "\\[(?:\\^?\\])?", + "captures": { + "0": { + "name": "punctuation.definition.character-class.php" + } + }, + "end": "\\]", + "name": "string.regexp.character-class.php", + "patterns": [ + { + "include": "#interpolation" + } + ] + }, + { + "match": "[$^+*]", + "name": "keyword.operator.regexp.php" + } + ] + }, + "regex-single-quoted": { + "begin": "(?x)\n(?<=re)'/ (?=(\\\\.|[^'/])++/[imsxeADSUXu]*')", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "end": "(/)([imsxeADSUXu]*)(')", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.regexp.single-quoted.php", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.arbitrary-repetition.php" + }, + "3": { + "name": "punctuation.definition.arbitrary-repetition.php" + } + }, + "match": "(\\{)\\d+(,\\d+)?(\\})", + "name": "string.regexp.arbitrary-repetition.php" + }, + { + "comment": "Escaped from the regexp – there can also be 2 backslashes (since 1 will escape the first)", + "match": "(\\\\){1,2}[.$^\\[\\]{}]", + "name": "constant.character.escape.regex.php" + }, + { + "comment": "Escaped from the PHP string – there can also be 2 backslashes (since 1 will escape the first)", + "match": "\\\\{1,2}[\\\\']", + "name": "constant.character.escape.php" + }, + { + "begin": "\\[(?:\\^?\\])?", + "captures": { + "0": { + "name": "punctuation.definition.character-class.php" + } + }, + "end": "\\]", + "name": "string.regexp.character-class.php", + "patterns": [ + { + "match": "\\\\[\\\\'\\[\\]]", + "name": "constant.character.escape.php" + } + ] + }, + { + "match": "[$^+*]", + "name": "keyword.operator.regexp.php" + } + ] + }, + "sql-string-double-quoted": { + "begin": "\"\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\\b)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "contentName": "source.sql.embedded.php", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.quoted.double.sql.php", + "patterns": [ + { + "comment": "Open parens cause the next escaped character to not be captured as an\nescape character. Example: $x = \"SELECT (\")\";", + "match": "\\(", + "name": "punctuation.definition.parameters.begin.bracket.round.php" + }, + { + "match": "#(\\\\\"|[^\"])*(?=\"|$\\n?)", + "name": "comment.line.number-sign.sql" + }, + { + "match": "--(\\\\\"|[^\"])*(?=\"|$\\n?)", + "name": "comment.line.double-dash.sql" + }, + { + "match": "\\\\[\\\\\"`']", + "name": "constant.character.escape.php" + }, + { + "comment": "Unclosed strings must be captured to avoid them eating the remainder of the PHP script\nSample case: $sql = \"SELECT * FROM bar WHERE foo = '\" . $variable . \"'\"", + "match": "'(?=((\\\\')|[^'\"])*(\"|$))", + "name": "string.quoted.single.unclosed.sql" + }, + { + "comment": "Unclosed strings must be captured to avoid them eating the remainder of the PHP script\nSample case: $sql = \"SELECT * FROM bar WHERE foo = '\" . $variable . \"'\"", + "match": "`(?=((\\\\`)|[^`\"])*(\"|$))", + "name": "string.quoted.other.backtick.unclosed.sql" + }, + { + "begin": "'", + "end": "'", + "name": "string.quoted.single.sql", + "patterns": [ + { + "include": "#interpolation" + } + ] + }, + { + "begin": "`", + "end": "`", + "name": "string.quoted.other.backtick.sql", + "patterns": [ + { + "include": "#interpolation" + } + ] + }, + { + "include": "#interpolation" + }, + { + "include": "source.sql" + } + ] + }, + "sql-string-single-quoted": { + "begin": "'\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\\b)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "contentName": "source.sql.embedded.php", + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.quoted.single.sql.php", + "patterns": [ + { + "comment": "Open parens cause the next escaped character to not be captured as an\nescape character. Example: $x = 'SELECT (')';", + "match": "\\(", + "name": "punctuation.definition.parameters.begin.bracket.round.php" + }, + { + "match": "#(\\\\'|[^'])*(?='|$\\n?)", + "name": "comment.line.number-sign.sql" + }, + { + "match": "--(\\\\'|[^'])*(?='|$\\n?)", + "name": "comment.line.double-dash.sql" + }, + { + "match": "\\\\[\\\\'`\"]", + "name": "constant.character.escape.php" + }, + { + "comment": "Unclosed strings must be captured to avoid them eating the remainder of the PHP script\nSample case: $sql = \"SELECT * FROM bar WHERE foo = '\" . $variable . \"'\"", + "match": "`(?=((\\\\`)|[^`'])*('|$))", + "name": "string.quoted.other.backtick.unclosed.sql" + }, + { + "comment": "Unclosed strings must be captured to avoid them eating the remainder of the PHP script\nSample case: $sql = \"SELECT * FROM bar WHERE foo = '\" . $variable . \"'\"", + "match": "\"(?=((\\\\\")|[^\"'])*('|$))", + "name": "string.quoted.double.unclosed.sql" + }, + { + "include": "source.sql" + } + ] + }, + "string-double-quoted": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "comment": "This contentName is just to allow the usage of “select scope” to select the string contents first, then the string with quotes", + "contentName": "meta.string-contents.quoted.double.php", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.quoted.double.php", + "patterns": [ + { + "include": "#interpolation" + } + ] + }, + "string-single-quoted": { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "contentName": "meta.string-contents.quoted.single.php", + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.quoted.single.php", + "patterns": [ + { + "match": "\\\\[\\\\']", + "name": "constant.character.escape.php" + } + ] + }, + "strings": { + "patterns": [ + { + "include": "#regex-double-quoted" + }, + { + "include": "#sql-string-double-quoted" + }, + { + "include": "#string-double-quoted" + }, + { + "include": "#regex-single-quoted" + }, + { + "include": "#sql-string-single-quoted" + }, + { + "include": "#string-single-quoted" + } + ] + }, + "support": { + "patterns": [ + { + "match": "(?i)\\bapc_(s(tore|ma_info)|c(ompile_file|lear_cache|a(s|che_info))|inc|de(c|fine_constants|lete(_file)?)|exists|fetch|load_constants|add|bin_(dump(file)?|load(file)?))\\b", + "name": "support.function.apc.php" + }, + { + "match": "(?i)\\b(s(huffle|izeof|ort)|n(ext|at(sort|casesort))|c(o(unt|mpact)|urrent)|in_array|u(sort|ksort|asort)|p(os|rev)|e(nd|ach|xtract)|k(sort|ey|rsort)|list|a(sort|r(sort|ray(_(s(hift|um|plice|earch|lice)|c(h(unk|ange_key_case)|o(unt_values|mbine))|intersect(_(u(key|assoc)|key|assoc))?|diff(_(u(key|assoc)|key|assoc))?|u(n(shift|ique)|intersect(_(uassoc|assoc))?|diff(_(uassoc|assoc))?)|p(op|ush|ad|roduct)|values|key(s|_exists)|f(il(ter|l(_keys)?)|lip)|walk(_recursive)?|r(e(duce|place(_recursive)?|verse)|and)|m(ultisort|erge(_recursive)?|ap)))?))|r(sort|eset|ange))\\b", + "name": "support.function.array.php" + }, + { + "match": "(?i)\\b(s(how_source|ys_getloadavg|leep)|highlight_(string|file)|con(stant|nection_(status|timeout|aborted))|time_(sleep_until|nanosleep)|ignore_user_abort|d(ie|efine(d)?)|u(sleep|n(iqid|pack))|__halt_compiler|p(hp_(strip_whitespace|check_syntax)|ack)|e(val|xit)|get_browser)\\b", + "name": "support.function.basic_functions.php" + }, + { + "match": "(?i)\\bbc(s(cale|ub|qrt)|comp|div|pow(mod)?|add|m(od|ul))\\b", + "name": "support.function.bcmath.php" + }, + { + "match": "(?i)\\bbz(c(ompress|lose)|open|decompress|err(str|no|or)|flush|write|read)\\b", + "name": "support.function.bz2.php" + }, + { + "match": "(?i)\\b(GregorianToJD|cal_(to_jd|info|days_in_month|from_jd)|unixtojd|jdto(unix|jewish)|easter_da(ys|te)|J(ulianToJD|ewishToJD|D(MonthName|To(Gregorian|Julian|French)|DayOfWeek))|FrenchToJD)\\b", + "name": "support.function.calendar.php" + }, + { + "match": "(?i)\\b(c(lass_(exists|alias)|all_user_method(_array)?)|trait_exists|i(s_(subclass_of|a)|nterface_exists)|__autoload|property_exists|get_(c(lass(_(vars|methods))?|alled_class)|object_vars|declared_(classes|traits|interfaces)|parent_class)|method_exists)\\b", + "name": "support.function.classobj.php" + }, + { + "match": "(?i)\\b(com_(set|create_guid|i(senum|nvoke)|pr(int_typeinfo|op(set|put|get))|event_sink|load(_typelib)?|addref|release|get(_active_object)?|message_pump)|variant_(s(ub|et(_type)?)|n(ot|eg)|c(a(st|t)|mp)|i(nt|div|mp)|or|d(iv|ate_(to_timestamp|from_timestamp))|pow|eqv|fix|a(nd|dd|bs)|round|get_type|xor|m(od|ul)))\\b", + "name": "support.function.com.php" + }, + { + "match": "(?i)\\bctype_(space|cntrl|digit|upper|p(unct|rint)|lower|al(num|pha)|graph|xdigit)\\b", + "name": "support.function.ctype.php" + }, + { + "match": "(?i)\\bcurl_(setopt(_array)?|c(opy_handle|lose)|init|e(rr(no|or)|xec)|version|getinfo|multi_(select|close|in(it|fo_read)|exec|add_handle|remove_handle|getcontent))\\b", + "name": "support.function.curl.php" + }, + { + "match": "(?i)\\b(str(totime|ptime|ftime)|checkdate|time(zone_(name_(from_abbr|get)|transitions_get|identifiers_list|o(pen|ffset_get)|version_get|location_get|abbreviations_list))?|idate|date(_(su(n(set|_info|rise)|b)|create(_from_format)?|time(stamp_(set|get)|zone_(set|get)|_set)|i(sodate_set|nterval_(create_from_date_string|format))|offset_get|d(iff|efault_timezone_(set|get)|ate_set)|parse(_from_format)?|format|add|get_last_errors|modify))?|localtime|g(et(timeofday|date)|m(strftime|date|mktime))|m(icrotime|ktime))\\b", + "name": "support.function.datetime.php" + }, + { + "match": "(?i)\\bdba_(sync|handlers|nextkey|close|insert|op(timize|en)|delete|popen|exists|key_split|f(irstkey|etch)|list|replace)\\b", + "name": "support.function.dba.php" + }, + { + "match": "(?i)\\bdbx_(sort|c(o(nnect|mpare)|lose)|e(scape_string|rror)|query|fetch_row)\\b", + "name": "support.function.dbx.php" + }, + { + "match": "(?i)\\b(scandir|c(h(dir|root)|losedir)|opendir|dir|re(winddir|addir)|getcwd)\\b", + "name": "support.function.dir.php" + }, + { + "match": "(?i)\\bdotnet_load\\b", + "name": "support.function.dotnet.php" + }, + { + "match": "(?i)\\beio_(s(y(nc(_file_range|fs)?|mlink)|tat(vfs)?|e(ndfile|t_m(in_parallel|ax_(idle|p(oll_(time|reqs)|arallel)))|ek))|n(threads|op|pending|re(qs|ady))|c(h(own|mod)|ustom|lose|ancel)|truncate|init|open|dup2|u(nlink|time)|poll|event_loop|f(s(ync|tat(vfs)?)|ch(own|mod)|truncate|datasync|utime|allocate)|write|l(stat|ink)|r(e(name|a(d(dir|link|ahead)?|lpath))|mdir)|g(et_(event_stream|last_error)|rp(_(cancel|limit|add))?)|mk(nod|dir)|busy)\\b", + "name": "support.function.eio.php" + }, + { + "match": "(?i)\\benchant_(dict_(s(tore_replacement|uggest)|check|is_in_session|describe|quick_check|add_to_(session|personal)|get_error)|broker_(set_ordering|init|d(ict_exists|escribe)|free(_dict)?|list_dicts|request_(dict|pwl_dict)|get_error))\\b", + "name": "support.function.enchant.php" + }, + { + "match": "(?i)\\b(s(plit(i)?|ql_regcase)|ereg(i(_replace)?|_replace)?)\\b", + "name": "support.function.ereg.php" + }, + { + "match": "(?i)\\b(set_e(rror_handler|xception_handler)|trigger_error|debug_(print_backtrace|backtrace)|user_error|error_(log|reporting|get_last)|restore_e(rror_handler|xception_handler))\\b", + "name": "support.function.errorfunc.php" + }, + { + "match": "(?i)\\b(s(hell_exec|ystem)|p(assthru|roc_(nice|close|terminate|open|get_status))|e(scapeshell(cmd|arg)|xec))\\b", + "name": "support.function.exec.php" + }, + { + "match": "(?i)\\b(exif_(t(humbnail|agname)|imagetype|read_data)|read_exif_data)\\b", + "name": "support.function.exif.php" + }, + { + "match": "(?i)\\b(s(ymlink|tat|et_file_buffer)|c(h(own|grp|mod)|opy|learstatcache)|t(ouch|empnam|mpfile)|is_(dir|uploaded_file|executable|file|writ(eable|able)|link|readable)|d(i(sk(_(total_space|free_space)|freespace)|rname)|elete)|u(nlink|mask)|p(close|open|a(thinfo|rse_ini_(string|file)))|f(s(canf|tat|eek)|nmatch|close|t(ell|runcate)|ile(size|ctime|type|inode|owner|_(put_contents|exists|get_contents)|perms|atime|group|mtime)?|open|p(ut(s|csv)|assthru)|eof|flush|write|lock|read|get(s(s)?|c(sv)?))|l(stat|ch(own|grp)|ink(info)?)|r(e(name|wind|a(d(file|link)|lpath(_cache_(size|get))?))|mdir)|glob|m(ove_uploaded_file|kdir)|basename)\\b", + "name": "support.function.file.php" + }, + { + "match": "(?i)\\b(finfo_(set_flags|close|open|file|buffer)|mime_content_type)\\b", + "name": "support.function.fileinfo.php" + }, + { + "match": "(?i)\\bfilter_(has_var|i(nput(_array)?|d)|var(_array)?|list)\\b", + "name": "support.function.filter.php" + }, + { + "match": "(?i)\\b(c(all_user_func(_array)?|reate_function)|unregister_tick_function|f(orward_static_call(_array)?|unc(tion_exists|_(num_args|get_arg(s)?)))|register_(shutdown_function|tick_function)|get_defined_functions)\\b", + "name": "support.function.funchand.php" + }, + { + "match": "(?i)\\b(ngettext|textdomain|d(ngettext|c(ngettext|gettext)|gettext)|gettext|bind(textdomain|_textdomain_codeset))\\b", + "name": "support.function.gettext.php" + }, + { + "match": "(?i)\\bgmp_(s(can(1|0)|trval|ign|ub|etbit|qrt(rem)?)|hamdist|ne(g|xtprime)|c(om|lrbit|mp)|testbit|in(tval|it|vert)|or|div(_(q(r)?|r)|exact)?|jacobi|p(o(pcount|w(m)?)|erfect_square|rob_prime)|fact|legendre|a(nd|dd|bs)|random|gcd(ext)?|xor|m(od|ul))\\b", + "name": "support.function.gmp.php" + }, + { + "match": "(?i)\\bhash(_(hmac(_file)?|copy|init|update(_(stream|file))?|pbkdf2|fi(nal|le)|algos))?\\b", + "name": "support.function.hash.php" + }, + { + "match": "(?i)\\b(http_(s(upport|end_(st(atus|ream)|content_(type|disposition)|data|file|last_modified))|head|negotiate_(c(harset|ontent_type)|language)|c(hunked_decode|ache_(etag|last_modified))|throttle|inflate|d(eflate|ate)|p(ost_(data|fields)|ut_(stream|data|file)|ersistent_handles_(c(ount|lean)|ident)|arse_(headers|cookie|params|message))|re(direct|quest(_(method_(name|unregister|exists|register)|body_encode))?)|get(_request_(headers|body(_stream)?))?|match_(etag|request_header|modified)|build_(str|cookie|url))|ob_(inflatehandler|deflatehandler|etaghandler))\\b", + "name": "support.function.http.php" + }, + { + "match": "(?i)\\b(iconv(_(s(tr(pos|len|rpos)|ubstr|et_encoding)|get_encoding|mime_(decode(_headers)?|encode)))?|ob_iconv_handler)\\b", + "name": "support.function.iconv.php" + }, + { + "match": "(?i)\\biis_(s(t(op_serv(ice|er)|art_serv(ice|er))|et_(s(cript_map|erver_rights)|dir_security|app_settings))|add_server|remove_server|get_(s(cript_map|erv(ice_state|er_(rights|by_(comment|path))))|dir_security))\\b", + "name": "support.function.iisfunc.php" + }, + { + "match": "(?i)\\b(i(ptc(parse|embed)|mage(s(y|tring(up)?|et(style|t(hickness|ile)|pixel|brush)|avealpha|x)|c(har(up)?|o(nvolution|py(res(ized|ampled)|merge(gray)?)?|lor(s(total|et|forindex)|closest(hwb|alpha)?|transparent|deallocate|exact(alpha)?|a(t|llocate(alpha)?)|resolve(alpha)?|match))|reate(truecolor|from(string|jpeg|png|wbmp|g(if|d(2(part)?)?)|x(pm|bm)))?)|t(ypes|tf(text|bbox)|ruecolortopalette)|i(struecolor|nterlace)|2wbmp|d(estroy|ashedline)|jpeg|_type_to_(extension|mime_type)|p(s(slantfont|text|e(ncodefont|xtendfont)|freefont|loadfont|bbox)|ng|olygon|alettecopy)|ellipse|f(t(text|bbox)|il(ter|l(toborder|ed(polygon|ellipse|arc|rectangle))?)|ont(height|width))|wbmp|l(ine|oadfont|ayereffect)|a(ntialias|lphablending|rc)|r(otate|ectangle)|g(if|d(2)?|ammacorrect|rab(screen|window))|xbm))|jpeg2wbmp|png2wbmp|g(d_info|etimagesize(fromstring)?))\\b", + "name": "support.function.image.php" + }, + { + "match": "(?i)\\b(s(ys_get_temp_dir|et_(time_limit|include_path|magic_quotes_runtime))|ini_(set|alter|restore|get(_all)?)|zend_(thread_id|version|logo_guid)|dl|p(hp(credits|info|_(sapi_name|ini_(scanned_files|loaded_file)|uname|logo_guid)|version)|utenv)|extension_loaded|version_compare|assert(_options)?|restore_include_path|g(c_(collect_cycles|disable|enable(d)?)|et(opt|_(c(urrent_user|fg_var)|include(d_files|_path)|defined_constants|extension_funcs|loaded_extensions|required_files|magic_quotes_(runtime|gpc))|env|lastmod|rusage|my(inode|uid|pid|gid)))|m(emory_get_(usage|peak_usage)|a(in|gic_quotes_runtime)))\\b", + "name": "support.function.info.php" + }, + { + "match": "(?i)\\bibase_(se(t_event_handler|rv(ice_(detach|attach)|er_info))|n(um_(params|fields)|ame_result)|c(o(nnect|mmit(_ret)?)|lose)|trans|d(elete_user|rop_db|b_info)|p(connect|aram_info|repare)|e(rr(code|msg)|xecute)|query|f(ield_info|etch_(object|assoc|row)|ree_(event_handler|query|result))|wait_event|a(dd_user|ffected_rows)|r(ollback(_ret)?|estore)|gen_id|m(odify_user|aintain_db)|b(lob_(c(lose|ancel|reate)|i(nfo|mport)|open|echo|add|get)|ackup))\\b", + "name": "support.function.interbase.php" + }, + { + "match": "(?i)\\b(n(ormalizer_(normalize|is_normalized)|umfmt_(set_(symbol|text_attribute|pattern|attribute)|create|parse(_currency)?|format(_currency)?|get_(symbol|text_attribute|pattern|error_(code|message)|locale|attribute)))|collator_(s(ort(_with_sort_keys)?|et_(strength|attribute))|c(ompare|reate)|asort|get_(s(trength|ort_key)|error_(code|message)|locale|attribute))|transliterator_(create(_(inverse|from_rules))?|transliterate|list_ids|get_error_(code|message))|i(ntl_(is_failure|error_name|get_error_(code|message))|dn_to_(u(nicode|tf8)|ascii))|datefmt_(set_(calendar|timezone(_id)?|pattern|lenient)|create|is_lenient|parse|format(_object)?|localtime|get_(calendar(_object)?|time(type|zone(_id)?)|datetype|pattern|error_(code|message)|locale))|locale_(set_default|compose|parse|filter_matches|lookup|accept_from_http|get_(script|d(isplay_(script|name|variant|language|region)|efault)|primary_language|keywords|all_variants|region))|resourcebundle_(c(ount|reate)|locales|get(_error_(code|message))?)|grapheme_(s(tr(str|i(str|pos)|pos|len|r(ipos|pos))|ubstr)|extract)|msgfmt_(set_pattern|create|parse(_message)?|format(_message)?|get_(pattern|error_(code|message)|locale)))\\b", + "name": "support.function.intl.php" + }, + { + "match": "(?i)\\bjson_(decode|encode|last_error)\\b", + "name": "support.function.json.php" + }, + { + "match": "(?i)\\bldap_(s(tart_tls|ort|e(t_(option|rebind_proc)|arch)|asl_bind)|next_(entry|attribute|reference)|c(o(n(nect|trol_paged_result(_response)?)|unt_entries|mpare)|lose)|t61_to_8859|d(n2ufn|elete)|8859_to_t61|unbind|parse_re(sult|ference)|e(rr(no|2str|or)|xplode_dn)|f(irst_(entry|attribute|reference)|ree_result)|list|add|re(name|ad)|get_(option|dn|entries|values(_len)?|attributes)|mod(ify|_(del|add|replace))|bind)\\b", + "name": "support.function.ldap.php" + }, + { + "match": "(?i)\\blibxml_(set_(streams_context|external_entity_loader)|clear_errors|disable_entity_loader|use_internal_errors|get_(errors|last_error))\\b", + "name": "support.function.libxml.php" + }, + { + "match": "(?i)\\b(ezmlm_hash|mail)\\b", + "name": "support.function.mail.php" + }, + { + "match": "(?i)\\b(s(in(h)?|qrt|rand)|h(ypot|exdec)|c(os(h)?|eil)|tan(h)?|is_(nan|infinite|finite)|octdec|de(c(hex|oct|bin)|g2rad)|p(i|ow)|exp(m1)?|f(loor|mod)|l(cg_value|og(1(p|0))?)|a(sin(h)?|cos(h)?|tan(h|2)?|bs)|r(ound|a(nd|d2deg))|getrandmax|m(t_(srand|rand|getrandmax)|in|ax)|b(indec|ase_convert))\\b", + "name": "support.function.math.php" + }, + { + "match": "(?i)\\bmb_(s(tr(str|cut|to(upper|lower)|i(str|pos|mwidth)|pos|width|len|r(chr|i(chr|pos)|pos))|ubst(itute_character|r(_count)?)|plit|end_mail)|http_(input|output)|c(heck_encoding|onvert_(case|encoding|variables|kana))|internal_encoding|output_handler|de(code_(numericentity|mimeheader)|tect_(order|encoding))|p(arse_str|referred_mime_name)|e(ncod(ing_aliases|e_(numericentity|mimeheader))|reg(i(_replace)?|_(search(_(setpos|init|pos|regs|get(pos|regs)))?|replace(_callback)?|match))?)|l(ist_encodings|anguage)|regex_(set_options|encoding)|get_info)\\b", + "name": "support.function.mbstring.php" + }, + { + "match": "(?i)\\bm(crypt_(c(fb|reate_iv|bc)|ofb|decrypt|e(nc(_(self_test|is_block_(algorithm(_mode)?|mode)|get_(supported_key_sizes|iv_size|key_size|algorithms_name|modes_name|block_size))|rypt)|cb)|list_(algorithms|modes)|ge(neric(_(init|deinit|end))?|t_(cipher_name|iv_size|key_size|block_size))|module_(self_test|close|is_block_(algorithm(_mode)?|mode)|open|get_(supported_key_sizes|algo_(key_size|block_size))))|decrypt_generic)\\b", + "name": "support.function.mcrypt.php" + }, + { + "match": "(?i)\\bmemcache_debug\\b", + "name": "support.function.memcache.php" + }, + { + "match": "(?i)\\bmhash(_(count|keygen_s2k|get_(hash_name|block_size)))?\\b", + "name": "support.function.mhash.php" + }, + { + "match": "(?i)\\bbson_(decode|encode)\\b", + "name": "support.function.mongo.php" + }, + { + "match": "(?i)\\bmysql_(s(tat|e(t_charset|lect_db))|num_(fields|rows)|c(onnect|l(ient_encoding|ose)|reate_db)|t(hread_id|ablename)|in(sert_id|fo)|d(ata_seek|rop_db|b_(name|query))|unbuffered_query|p(connect|ing)|e(scape_string|rr(no|or))|query|f(ield_(seek|name|t(ype|able)|flags|len)|etch_(object|field|lengths|a(ssoc|rray)|row)|ree_result)|list_(tables|dbs|processes|fields)|affected_rows|re(sult|al_escape_string)|get_(server_info|host_info|client_info|proto_info))\\b", + "name": "support.function.mysql.php" + }, + { + "match": "(?i)\\bmysqli_(s(sl_set|t(ore_result|at|mt_(s(tore_result|end_long_data)|next_result|close|init|data_seek|prepare|execute|f(etch|ree_result)|attr_(set|get)|res(ult_metadata|et)|get_(warnings|result)|more_results|bind_(param|result)))|e(nd_(query|long_data)|t_(charset|opt|local_infile_(handler|default))|lect_db)|lave_query)|next_result|c(ha(nge_user|racter_set_name)|o(nnect|mmit)|l(ient_encoding|ose))|thread_safe|init|options|d(isable_r(pl_parse|eads_from_master)|ump_debug_info|ebug|ata_seek)|use_result|p(ing|oll|aram_count|repare)|e(scape_string|nable_r(pl_parse|eads_from_master)|xecute|mbedded_server_(start|end))|kill|query|f(ield_seek|etch(_(object|field(s|_direct)?|a(ssoc|ll|rray)|row))?|ree_result)|autocommit|r(ollback|pl_(p(arse_enabled|robe)|query_type)|e(port|fresh|a(p_async_query|l_(connect|escape_string|query))))|get_(c(harset|onnection_stats|lient_(stats|info|version)|ache_stats)|warnings|metadata)|m(ore_results|ulti_query|aster_query)|bind_(param|result))\\b", + "name": "support.function.mysqli.php" + }, + { + "match": "(?i)\\bmysqlnd_memcache_(set|get_config)\\b", + "name": "support.function.mysqlnd-memcache.php" + }, + { + "match": "(?i)\\bmysqlnd_ms_(set_(user_pick_server|qos)|query_is_select|get_(stats|last_(used_connection|gtid))|match_wild)\\b", + "name": "support.function.mysqlnd-ms.php" + }, + { + "match": "(?i)\\bmysqlnd_qc_(set_(storage_handler|cache_condition|is_select|user_handlers)|clear_cache|get_(normalized_query_trace_log|c(ore_stats|ache_info)|query_trace_log|available_handlers))\\b", + "name": "support.function.mysqlnd-qc.php" + }, + { + "match": "(?i)\\bmysqlnd_uh_(set_(statement_proxy|connection_proxy)|convert_to_mysqlnd)\\b", + "name": "support.function.mysqlnd-uh.php" + }, + { + "match": "(?i)\\b(s(yslog|ocket_(set_(timeout|blocking)|get_status)|et(cookie|rawcookie))|h(ttp_response_code|eader(s_(sent|list)|_re(gister_callback|move))?)|c(heckdnsrr|loselog)|i(net_(ntop|pton)|p2long)|openlog|d(ns_(check_record|get_(record|mx))|efine_syslog_variables)|pfsockopen|fsockopen|long2ip|get(servby(name|port)|host(name|by(name(l)?|addr))|protobyn(umber|ame)|mxrr))\\b", + "name": "support.function.network.php" + }, + { + "match": "(?i)\\bnsapi_(virtual|re(sponse_headers|quest_headers))\\b", + "name": "support.function.nsapi.php" + }, + { + "match": "(?i)\\b(deaggregate|aggregat(ion_info|e(_(info|properties(_by_(list|regexp))?|methods(_by_(list|regexp))?))?))\\b", + "name": "support.function.objaggregation.php" + }, + { + "match": "(?i)\\boci(s(tatementtype|e(tprefetch|rverversion)|avelob(file)?)|n(umcols|ew(c(ollection|ursor)|descriptor)|logon)|c(o(l(umn(s(cale|ize)|name|type(raw)?|isnull|precision)|l(size|trim|a(ssign(elem)?|ppend)|getelem|max))|mmit)|loselob|ancel)|internaldebug|definebyname|_(s(tatement_type|e(t_(client_i(nfo|dentifier)|prefetch|edition|action|module_name)|rver_version))|n(um_(fields|rows)|ew_(c(o(nnect|llection)|ursor)|descriptor))|c(o(nnect|mmit)|l(ient_version|ose)|ancel)|internal_debug|define_by_name|p(connect|a(ssword_change|rse))|e(rror|xecute)|f(ield_(s(cale|ize)|name|type(_raw)?|is_null|precision)|etch(_(object|a(ssoc|ll|rray)|row))?|ree_(statement|descriptor))|lob_(copy|is_equal)|r(ollback|esult)|bind_(array_by_name|by_name))|p(logon|arse)|e(rror|xecute)|f(etch(statement|into)?|ree(statement|c(ollection|ursor)|desc))|write(temporarylob|lobtofile)|lo(adlob|go(n|ff))|r(o(wcount|llback)|esult)|bindbyname)\\b", + "name": "support.function.oci8.php" + }, + { + "match": "(?i)\\bopenssl_(s(ign|eal)|c(sr_(sign|new|export(_to_file)?|get_(subject|public_key))|ipher_iv_length)|open|d(h_compute_key|igest|ecrypt)|p(ublic_(decrypt|encrypt)|k(cs(12_(export(_to_file)?|read)|7_(sign|decrypt|encrypt|verify))|ey_(new|export(_to_file)?|free|get_(details|p(ublic|rivate))))|rivate_(decrypt|encrypt))|e(ncrypt|rror_string)|verify|free_key|random_pseudo_bytes|get_(cipher_methods|p(ublickey|rivatekey)|md_methods)|x509_(check(_private_key|purpose)|parse|export(_to_file)?|free|read))\\b", + "name": "support.function.openssl.php" + }, + { + "match": "(?i)\\b(o(utput_(add_rewrite_var|reset_rewrite_vars)|b_(start|clean|implicit_flush|end_(clean|flush)|flush|list_handlers|g(zhandler|et_(status|c(ontents|lean)|flush|le(ngth|vel)))))|flush)\\b", + "name": "support.function.output.php" + }, + { + "match": "(?i)\\bpassword_(hash|needs_rehash|verify|get_info)\\b", + "name": "support.function.password.php" + }, + { + "match": "(?i)\\bpcntl_(s(ig(nal(_dispatch)?|timedwait|procmask|waitinfo)|etpriority)|exec|fork|w(stopsig|termsig|if(s(topped|ignaled)|exited)|exitstatus|ait(pid)?)|alarm|getpriority)\\b", + "name": "support.function.pcntl.php" + }, + { + "match": "(?i)\\bpg_(se(nd_(prepare|execute|query(_params)?)|t_(client_encoding|error_verbosity)|lect)|host|num_(fields|rows)|c(o(n(nect(ion_(status|reset|busy))?|vert)|py_(to|from))|l(ient_encoding|ose)|ancel_query)|t(ty|ra(nsaction_status|ce))|insert|options|d(elete|bname)|u(n(trace|escape_bytea)|pdate)|p(connect|ing|ort|ut_line|arameter_status|repare)|e(scape_(string|identifier|literal|bytea)|nd_copy|xecute)|version|query(_params)?|f(ield_(size|n(um|ame)|t(ype(_oid)?|able)|is_null|prtlen)|etch_(object|a(ssoc|ll(_columns)?|rray)|r(ow|esult))|ree_result)|l(o_(seek|c(lose|reate)|tell|import|open|unlink|export|write|read(_all)?)|ast_(notice|oid|error))|affected_rows|result_(s(tatus|eek)|error(_field)?)|get_(notify|pid|result)|meta_data)\\b", + "name": "support.function.pgsql.php" + }, + { + "match": "(?i)\\b(virtual|apache_(setenv|note|child_terminate|lookup_uri|re(s(ponse_headers|et_timeout)|quest_headers)|get(_(version|modules)|env))|getallheaders)\\b", + "name": "support.function.php_apache.php" + }, + { + "match": "(?i)\\bdom_import_simplexml\\b", + "name": "support.function.php_dom.php" + }, + { + "match": "(?i)\\bftp_(s(sl_connect|ystype|i(te|ze)|et_option)|n(list|b_(continue|put|f(put|get)|get))|c(h(dir|mod)|onnect|dup|lose)|delete|p(ut|wd|asv)|exec|quit|f(put|get)|login|alloc|r(ename|aw(list)?|mdir)|get(_option)?|m(dtm|kdir))\\b", + "name": "support.function.php_ftp.php" + }, + { + "match": "(?i)\\bimap_(s(can(mailbox)?|tatus|ort|ubscribe|e(t(_quota|flag_full|acl)|arch)|avebody)|header(s|info)?|num_(recent|msg)|c(heck|l(ose|earflag_full)|reate(mailbox)?)|t(hread|imeout)|open|delete(mailbox)?|8bit|u(n(subscribe|delete)|tf(7_(decode|encode)|8)|id)|ping|e(rrors|xpunge)|qprint|fetch(structure|header|text|_overview|mime|body)|l(sub|ist(s(can|ubscribed)|mailbox)?|ast_error)|a(ppend|lerts)|r(e(name(mailbox)?|open)|fc822_(parse_(headers|adrlist)|write_address))|g(c|et(subscribed|_quota(root)?|acl|mailboxes))|m(sgno|ime_header_decode|ail(_(co(py|mpose)|move)|boxmsginfo)?)|b(inary|ody(struct)?|ase64))\\b", + "name": "support.function.php_imap.php" + }, + { + "match": "(?i)\\bmssql_(select_db|n(um_(fields|rows)|ext_result)|c(onnect|lose)|init|data_seek|pconnect|execute|query|f(ield_(seek|name|type|length)|etch_(object|field|a(ssoc|rray)|row|batch)|ree_(statement|result))|r(ows_affected|esult)|g(uid_string|et_last_message)|min_(error_severity|message_severity)|bind)\\b", + "name": "support.function.php_mssql.php" + }, + { + "match": "(?i)\\bodbc_(s(tatistics|pecialcolumns|etoption)|n(um_(fields|rows)|ext_result)|c(o(nnect|lumn(s|privileges)|mmit)|ursor|lose(_all)?)|table(s|privileges)|d(o|ata_source)|p(connect|r(imarykeys|ocedure(s|columns)|epare))|e(rror(msg)?|xec(ute)?)|f(ield_(scale|n(um|ame)|type|precision|len)|oreignkeys|etch_(into|object|array|row)|ree_result)|longreadlen|autocommit|r(ollback|esult(_all)?)|gettypeinfo|binmode)\\b", + "name": "support.function.php_odbc.php" + }, + { + "match": "(?i)\\bpreg_(split|quote|filter|last_error|replace(_callback)?|grep|match(_all)?)\\b", + "name": "support.function.php_pcre.php" + }, + { + "match": "(?i)\\b(spl_(classes|object_hash|autoload(_(call|unregister|extensions|functions|register))?)|class_(implements|uses|parents)|iterator_(count|to_array|apply))\\b", + "name": "support.function.php_spl.php" + }, + { + "match": "(?i)\\bzip_(close|open|entry_(name|c(ompress(ionmethod|edsize)|lose)|open|filesize|read)|read)\\b", + "name": "support.function.php_zip.php" + }, + { + "match": "(?i)\\bposix_(s(trerror|et(sid|uid|pgid|e(uid|gid)|gid))|ctermid|t(tyname|imes)|i(satty|nitgroups)|uname|errno|kill|access|get(sid|cwd|uid|_last_error|p(id|pid|w(nam|uid)|g(id|rp))|e(uid|gid)|login|rlimit|g(id|r(nam|oups|gid)))|mk(nod|fifo))\\b", + "name": "support.function.posix.php" + }, + { + "match": "(?i)\\bset(threadtitle|proctitle)\\b", + "name": "support.function.proctitle.php" + }, + { + "match": "(?i)\\bpspell_(s(tore_replacement|uggest|ave_wordlist)|new(_(config|personal))?|c(heck|onfig_(save_repl|create|ignore|d(ict_dir|ata_dir)|personal|r(untogether|epl)|mode)|lear_session)|add_to_(session|personal))\\b", + "name": "support.function.pspell.php" + }, + { + "match": "(?i)\\breadline(_(c(ompletion_function|lear_history|allback_(handler_(install|remove)|read_char))|info|on_new_line|write_history|list_history|add_history|re(display|ad_history)))?\\b", + "name": "support.function.readline.php" + }, + { + "match": "(?i)\\brecode(_(string|file))?\\b", + "name": "support.function.recode.php" + }, + { + "match": "(?i)\\brrd_(create|tune|info|update|error|version|f(irst|etch)|last(update)?|restore|graph|xport)\\b", + "name": "support.function.rrd.php" + }, + { + "match": "(?i)\\b(s(hm_(has_var|detach|put_var|attach|remove(_var)?|get_var)|em_(acquire|re(lease|move)|get))|ftok|msg_(s(tat_queue|e(nd|t_queue))|queue_exists|re(ceive|move_queue)|get_queue))\\b", + "name": "support.function.sem.php" + }, + { + "match": "(?i)\\bsession_(s(ta(tus|rt)|et_(save_handler|cookie_params)|ave_path)|name|c(ommit|ache_(expire|limiter))|i(s_registered|d)|de(stroy|code)|un(set|register)|encode|write_close|reg(ister(_shutdown)?|enerate_id)|get_cookie_params|module_name)\\b", + "name": "support.function.session.php" + }, + { + "match": "(?i)\\bshmop_(size|close|open|delete|write|read)\\b", + "name": "support.function.shmop.php" + }, + { + "match": "(?i)\\bsimplexml_(import_dom|load_(string|file))\\b", + "name": "support.function.simplexml.php" + }, + { + "match": "(?i)\\bsnmp(set|2_(set|walk|real_walk|get(next)?)|_(set_(oid_(numeric_print|output_format)|enum_print|valueretrieval|quick_print)|read_mib|get_(valueretrieval|quick_print))|3_(set|walk|real_walk|get(next)?)|walk(oid)?|realwalk|get(next)?)\\b", + "name": "support.function.snmp.php" + }, + { + "match": "(?i)\\b(is_soap_fault|use_soap_error_handler)\\b", + "name": "support.function.soap.php" + }, + { + "match": "(?i)\\bsocket_(s(hutdown|trerror|e(nd(to)?|t_(nonblock|option|block)|lect))|c(onnect|l(ose|ear_error)|reate(_(pair|listen))?)|import_stream|write|l(isten|ast_error)|accept|re(cv(from)?|ad)|get(sockname|_option|peername)|bind)\\b", + "name": "support.function.sockets.php" + }, + { + "match": "(?i)\\bsqlite_(s(ingle_query|eek)|has_(prev|more)|n(um_(fields|rows)|ext)|c(hanges|olumn|urrent|lose|reate_(function|aggregate))|open|u(nbuffered_query|df_(decode_binary|encode_binary))|p(open|rev)|e(scape_string|rror_string|xec)|valid|key|query|f(ield_name|etch_(s(tring|ingle)|column_types|object|a(ll|rray))|actory)|l(ib(encoding|version)|ast_(insert_rowid|error))|array_query|rewind|busy_timeout)\\b", + "name": "support.function.sqlite.php" + }, + { + "match": "(?i)\\bsqlsrv_(se(nd_stream_data|rver_info)|has_rows|n(um_(fields|rows)|ext_result)|c(o(n(nect|figure)|mmit)|l(ient_info|ose)|ancel)|prepare|e(rrors|xecute)|query|f(ield_metadata|etch(_(object|array))?|ree_stmt)|ro(ws_affected|llback)|get_(config|field)|begin_transaction)\\b", + "name": "support.function.sqlsrv.php" + }, + { + "match": "(?i)\\bstats_(s(ta(ndard_deviation|t_(noncentral_t|correlation|in(nerproduct|dependent_t)|p(owersum|ercentile|aired_t)|gennch|binomial_coef))|kew)|harmonic_mean|c(ovariance|df_(n(oncentral_(chisquare|f)|egative_binomial)|c(hisquare|auchy)|t|uniform|poisson|exponential|f|weibull|l(ogistic|aplace)|gamma|b(inomial|eta)))|den(s_(n(ormal|egative_binomial)|c(hisquare|auchy)|t|pmf_(hypergeometric|poisson|binomial)|exponential|f|weibull|l(ogistic|aplace)|gamma|beta)|_uniform)|variance|kurtosis|absolute_deviation|rand_(setall|phrase_to_seeds|ranf|ge(n_(no(ncen(tral_(t|f)|ral_chisquare)|rmal)|chisquare|t|i(nt|uniform|poisson|binomial(_negative)?)|exponential|f(uniform)?|gamma|beta)|t_seeds)))\\b", + "name": "support.function.stats.php" + }, + { + "match": "(?i)\\bs(tream_(s(ocket_(s(hutdown|e(ndto|rver))|client|pair|enable_crypto|accept|recvfrom|get_name)|upports_lock|e(t_(chunk_size|timeout|write_buffer|read_buffer|blocking)|lect))|notification_callback|co(ntext_(set_(option|default|params)|create|get_(options|default|params))|py_to_stream)|is_local|encoding|filter_(prepend|append|re(gister|move))|wrapper_(unregister|re(store|gister))|re(solve_include_path|gister_wrapper)|get_(contents|transports|filters|wrappers|line|meta_data)|bucket_(new|prepend|append|make_writeable))|et_socket_blocking)\\b", + "name": "support.function.streamsfuncs.php" + }, + { + "match": "(?i)\\b(s(scanf|ha1(_file)?|tr(s(tr|pn)|n(c(asecmp|mp)|atc(asecmp|mp))|c(spn|hr|oll|asecmp|mp)|t(o(upper|k|lower)|r)|i(str|p(slashes|cslashes|os|_tags))|_(s(huffle|plit)|ireplace|pad|word_count|r(ot13|ep(eat|lace))|getcsv)|p(os|brk)|len|r(chr|ipos|pos|ev))|imilar_text|oundex|ubstr(_(co(unt|mpare)|replace))?|printf|etlocale)|h(tml(specialchars(_decode)?|_entity_decode|entities)|e(x2bin|brev(c)?))|n(umber_format|l(2br|_langinfo))|c(h(op|unk_split|r)|o(nvert_(cyr_string|uu(decode|encode))|unt_chars)|r(ypt|c32))|trim|implode|ord|uc(first|words)|join|p(arse_str|rint(f)?)|e(cho|xplode)|v(sprintf|printf|fprintf)|quote(d_printable_(decode|encode)|meta)|fprintf|wordwrap|l(cfirst|trim|ocaleconv|evenshtein)|add(slashes|cslashes)|rtrim|get_html_translation_table|m(oney_format|d5(_file)?|etaphone)|bin2hex)\\b", + "name": "support.function.string.php" + }, + { + "match": "(?i)\\bsybase_(se(t_message_handler|lect_db)|num_(fields|rows)|c(onnect|lose)|d(eadlock_retry_count|ata_seek)|unbuffered_query|pconnect|query|f(ield_seek|etch_(object|field|a(ssoc|rray)|row)|ree_result)|affected_rows|result|get_last_message|min_(server_severity|client_severity|error_severity|message_severity))\\b", + "name": "support.function.sybase.php" + }, + { + "match": "(?i)\\b(taint|is_tainted|untaint)\\b", + "name": "support.function.taint.php" + }, + { + "match": "(?i)\\b(tidy_(s(et(opt|_encoding)|ave_config)|c(onfig_count|lean_repair)|is_x(html|ml)|diagnose|parse_(string|file)|error_count|warning_count|load_config|access_count|re(set_config|pair_(string|file))|get(opt|_(status|h(tml(_ver)?|ead)|config|o(utput|pt_doc)|r(oot|elease)|body)))|ob_tidyhandler)\\b", + "name": "support.function.tidy.php" + }, + { + "match": "(?i)\\btoken_(name|get_all)\\b", + "name": "support.function.tokenizer.php" + }, + { + "match": "(?i)\\btrader_(s(t(och(f|rsi)?|ddev)|in(h)?|u(m|b)|et_(compat|unstable_period)|qrt|ar(ext)?|ma)|ht_(sine|trend(line|mode)|dcp(hase|eriod)|phasor)|natr|c(ci|o(s(h)?|rrel)|dl(s(ho(otingstar|rtline)|t(icksandwich|alledpattern)|pinningtop|eparatinglines)|h(i(kkake(mod)?|ghwave)|omingpigeon|a(ngingman|rami(cross)?|mmer))|c(o(ncealbabyswall|unterattack)|losingmarubozu)|t(hrusting|a(sukigap|kuri)|ristar)|i(n(neck|vertedhammer)|dentical3crows)|2crows|onneck|d(oji(star)?|arkcloudcover|ragonflydoji)|u(nique3river|psidegap2crows)|3(starsinsouth|inside|outside|whitesoldiers|linestrike|blackcrows)|piercing|e(ngulfing|vening(star|dojistar))|kicking(bylength)?|l(ongl(ine|eggeddoji)|adderbottom)|a(dvanceblock|bandonedbaby)|ri(sefall3methods|ckshawman)|g(apsidesidewhite|ravestonedoji)|xsidegap3methods|m(orning(star|dojistar)|a(t(hold|chinglow)|rubozu))|b(elthold|reakaway))|eil|mo)|t(sf|ypprice|3|ema|an(h)?|r(i(x|ma)|ange))|obv|d(iv|ema|x)|ultosc|p(po|lus_d(i|m))|e(rrno|xp|ma)|var|kama|floor|w(clprice|illr|ma)|l(n|inearreg(_(slope|intercept|angle))?|og10)|a(sin|cos|t(an|r)|d(osc|d|x(r)?)?|po|vgprice|roon(osc)?)|r(si|oc(p|r(100)?)?)|get_(compat|unstable_period)|m(i(n(index|us_d(i|m)|max(index)?)?|dp(oint|rice))|om|ult|edprice|fi|a(cd(ext|fix)?|vp|x(index)?|ma)?)|b(op|eta|bands))\\b", + "name": "support.function.trader.php" + }, + { + "match": "(?i)\\b(http_build_query|url(decode|encode)|parse_url|rawurl(decode|encode)|get_(headers|meta_tags)|base64_(decode|encode))\\b", + "name": "support.function.url.php" + }, + { + "match": "(?i)\\b(s(trval|e(ttype|rialize))|i(s(set|_(s(calar|tring)|nu(ll|meric)|callable|int(eger)?|object|double|float|long|array|re(source|al)|bool|arraykey|nonnull|dict|vec|keyset))|ntval|mport_request_variables)|d(oubleval|ebug_zval_dump)|unse(t|rialize)|print_r|empty|var_(dump|export)|floatval|get(type|_(defined_vars|resource_type))|boolval)\\b", + "name": "support.function.var.php" + }, + { + "match": "(?i)\\bwddx_(serialize_va(lue|rs)|deserialize|packet_(start|end)|add_vars)\\b", + "name": "support.function.wddx.php" + }, + { + "match": "(?i)\\bxhprof_(sample_(disable|enable)|disable|enable)\\b", + "name": "support.function.xhprof.php" + }, + { + "match": "(?i)\\b(utf8_(decode|encode)|xml_(set_(start_namespace_decl_handler|notation_decl_handler|character_data_handler|object|default_handler|unparsed_entity_decl_handler|processing_instruction_handler|e(nd_namespace_decl_handler|lement_handler|xternal_entity_ref_handler))|parse(_into_struct|r_(set_option|create(_ns)?|free|get_option))?|error_string|get_(current_(column_number|line_number|byte_index)|error_code)))\\b", + "name": "support.function.xml.php" + }, + { + "match": "(?i)\\bxmlrpc_(se(t_type|rver_(c(all_method|reate)|destroy|add_introspection_data|register_(introspection_callback|method)))|is_fault|decode(_request)?|parse_method_descriptions|encode(_request)?|get_type)\\b", + "name": "support.function.xmlrpc.php" + }, + { + "match": "(?i)\\bxmlwriter_(s(tart_(c(omment|data)|d(td(_(e(ntity|lement)|attlist))?|ocument)|pi|element(_ns)?|attribute(_ns)?)|et_indent(_string)?)|text|o(utput_memory|pen_(uri|memory))|end_(c(omment|data)|d(td(_(e(ntity|lement)|attlist))?|ocument)|pi|element|attribute)|f(ull_end_element|lush)|write_(c(omment|data)|dtd(_(e(ntity|lement)|attlist))?|pi|element(_ns)?|attribute(_ns)?|raw))\\b", + "name": "support.function.xmlwriter.php" + }, + { + "match": "(?i)\\bxslt_(set(opt|_(s(cheme_handler(s)?|ax_handler(s)?)|object|e(ncoding|rror_handler)|log|base))|create|process|err(no|or)|free|getopt|backend_(name|info|version))\\b", + "name": "support.function.xslt.php" + }, + { + "match": "(?i)\\b(zlib_(decode|encode|get_coding_type)|readgzfile|gz(seek|c(ompress|lose)|tell|inflate|open|de(code|flate)|uncompress|p(uts|assthru)|e(ncode|of)|file|write|re(wind|ad)|get(s(s)?|c)))\\b", + "name": "support.function.zlib.php" + }, + { + "match": "(?i)\\bis_int(eger)?\\b", + "name": "support.function.alias.php" + } + ] + }, + "user-function-call": { + "begin": "(?i)(?=[a-z_0-9\\\\]*[a-z_][a-z0-9_]*\\s*\\()", + "end": "(?i)[a-z_][a-z_0-9]*(?=\\s*\\()", + "endCaptures": { + "0": { + "name": "entity.name.function.php" + } + }, + "name": "meta.function-call.php", + "patterns": [ + { + "include": "#namespace" + } + ] + }, + "var_basic": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(?x)\n(\\$+)\n[a-zA-Z_\\x{7f}-\\x{ff}]\n[a-zA-Z0-9_\\x{7f}-\\x{ff}]*?\n\\b", + "name": "variable.other.php" + } + ] + }, + "var_global": { + "captures": { + "1": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(\\$)((_(COOKIE|FILES|GET|POST|REQUEST))|arg(v|c))\\b", + "name": "variable.other.global.php" + }, + "var_global_safer": { + "captures": { + "1": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(\\$)((GLOBALS|_(ENV|SERVER|SESSION)))", + "name": "variable.other.global.safer.php" + }, + "variable-name": { + "patterns": [ + { + "include": "#var_global" + }, + { + "include": "#var_global_safer" + }, + { + "captures": { + "1": { + "name": "variable.other.php" + }, + "2": { + "name": "punctuation.definition.variable.php" + }, + "4": { + "name": "keyword.operator.class.php" + }, + "5": { + "name": "variable.other.property.php" + }, + "6": { + "name": "punctuation.section.array.begin.php" + }, + "7": { + "name": "constant.numeric.index.php" + }, + "8": { + "name": "variable.other.index.php" + }, + "9": { + "name": "punctuation.definition.variable.php" + }, + "10": { + "name": "string.unquoted.index.php" + }, + "11": { + "name": "punctuation.section.array.end.php" + } + }, + "comment": "Simple syntax: $foo, $foo[0], $foo[$bar], $foo->bar", + "match": "(?x)\n((\\$)(?[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*))\n(?:\n (->)(\\g)\n |\n (\\[)\n (?:(\\d+)|((\\$)\\g)|(\\w+))\n (\\])\n)?" + }, + { + "captures": { + "1": { + "name": "variable.other.php" + }, + "2": { + "name": "punctuation.definition.variable.php" + }, + "4": { + "name": "punctuation.definition.variable.php" + } + }, + "comment": "Simple syntax with braces: \"foo${bar}baz\"", + "match": "(?x)\n((\\$\\{)(?[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(\\}))" + } + ] + }, + "variables": { + "patterns": [ + { + "include": "#var_global" + }, + { + "include": "#var_global_safer" + }, + { + "include": "#var_basic" + }, + { + "begin": "(\\$\\{)(?=.*?\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.variable.php" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.variable.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + } + ] + }, + "xhp": { + "comment": "Avoid < operator expressions as best we can using Zertosh's regex", + "patterns": [ + { + "contentName": "source.xhp", + "begin": "(?<=\\(|\\{|\\[|,|&&|\\|\\||\\?|:|=|=>|\\Wreturn|^return|^)\\s*(?=<[_\\p{L}])", + "end": "(?=.)", + "applyEndPatternLast": 1, + "patterns": [ + { + "include": "#xhp-tag-element-name" + } + ] + } + ] + }, + "xhp-tag-element-name": { + "patterns": [ + { + "comment": "Tags that end > are trapped in #xhp-tag-termination", + "begin": "\\s*(<)([_\\p{L}](?:[:\\p{L}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Nl}\\p{Pc}-])*+)(?=[/>\\s])(?)|(/>)|((?<=", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.xhp" + }, + "2": { + "name": "entity.name.tag.open.xhp" + } + }, + "endCaptures": { + "1": { + "name": "entity.name.tag.close.xhp" + }, + "2": { + "name": "punctuation.definition.tag.xhp" + }, + "3": { + "name": "punctuation.definition.tag.xhp" + }, + "4": { + "name": "invalid.illegal.termination.xhp" + } + }, + "patterns": [ + { + "include": "#xhp-tag-termination" + }, + { + "include": "#xhp-html-comments" + }, + { + "include": "#xhp-tag-attributes" + } + ] + } + ] + }, + "xhp-tag-termination": { + "patterns": [ + { + "comment": "uses non consuming search for ", + "begin": "(?", + "name": "comment.block.html", + "patterns": [ + { + "match": "\\G-?>", + "name": "invalid.illegal.characters-not-allowed-here.html" + }, + { + "match": ")", + "name": "invalid.illegal.characters-not-allowed-here.html" + }, + { + "match": "--!>", + "name": "invalid.illegal.characters-not-allowed-here.html" + } + ] + }, + "core-minus-invalid": { + "comment": "This should be the root pattern array includes minus #tags-invalid", + "patterns": [ + { + "include": "#xml-processing" + }, + { + "include": "#comment" + }, + { + "include": "#doctype" + }, + { + "include": "#cdata" + }, + { + "include": "#tags-valid" + }, + { + "include": "#entities" + } + ] + }, + "doctype": { + "begin": "", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.metadata.doctype.html", + "patterns": [ + { + "match": "\\G(?i:DOCTYPE)", + "name": "entity.name.tag.html" + }, + { + "begin": "\"", + "end": "\"", + "name": "string.quoted.double.html" + }, + { + "match": "[^\\s>]+", + "name": "entity.other.attribute-name.html" + } + ] + }, + "entities": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.entity.html" + }, + "912": { + "name": "punctuation.definition.entity.html" + } + }, + "comment": "Yes this is a bit ridiculous, there are quite a lot of these", + "match": "(?x)\n\t\t\t\t\t\t(&)\t(?=[a-zA-Z])\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(a(s(ymp(eq)?|cr|t)|n(d(slope|d|v|and)?|g(s(t|ph)|zarr|e|le|rt(vb(d)?)?|msd(a(h|c|d|e|f|a|g|b))?)?)|c(y|irc|d|ute|E)?|tilde|o(pf|gon)|uml|p(id|os|prox(eq)?|e|E|acir)?|elig|f(r)?|w(conint|int)|l(pha|e(ph|fsym))|acute|ring|grave|m(p|a(cr|lg))|breve)|A(s(sign|cr)|nd|MP|c(y|irc)|tilde|o(pf|gon)|uml|pplyFunction|fr|Elig|lpha|acute|ring|grave|macr|breve))\n\t\t\t\t\t\t | (B(scr|cy|opf|umpeq|e(cause|ta|rnoullis)|fr|a(ckslash|r(v|wed))|reve)|b(s(cr|im(e)?|ol(hsub|b)?|emi)|n(ot|e(quiv)?)|c(y|ong)|ig(s(tar|qcup)|c(irc|up|ap)|triangle(down|up)|o(times|dot|plus)|uplus|vee|wedge)|o(t(tom)?|pf|wtie|x(h(d|u|D|U)?|times|H(d|u|D|U)?|d(R|l|r|L)|u(R|l|r|L)|plus|D(R|l|r|L)|v(R|h|H|l|r|L)?|U(R|l|r|L)|V(R|h|H|l|r|L)?|minus|box))|Not|dquo|u(ll(et)?|mp(e(q)?|E)?)|prime|e(caus(e)?|t(h|ween|a)|psi|rnou|mptyv)|karow|fr|l(ock|k(1(2|4)|34)|a(nk|ck(square|triangle(down|left|right)?|lozenge)))|a(ck(sim(eq)?|cong|prime|epsilon)|r(vee|wed(ge)?))|r(eve|vbar)|brk(tbrk)?))\n\t\t\t\t\t\t | (c(s(cr|u(p(e)?|b(e)?))|h(cy|i|eck(mark)?)|ylcty|c(irc|ups(sm)?|edil|a(ps|ron))|tdot|ir(scir|c(eq|le(d(R|circ|S|dash|ast)|arrow(left|right)))?|e|fnint|E|mid)?|o(n(int|g(dot)?)|p(y(sr)?|f|rod)|lon(e(q)?)?|m(p(fn|le(xes|ment))?|ma(t)?))|dot|u(darr(l|r)|p(s|c(up|ap)|or|dot|brcap)?|e(sc|pr)|vee|wed|larr(p)?|r(vearrow(left|right)|ly(eq(succ|prec)|vee|wedge)|arr(m)?|ren))|e(nt(erdot)?|dil|mptyv)|fr|w(conint|int)|lubs(uit)?|a(cute|p(s|c(up|ap)|dot|and|brcup)?|r(on|et))|r(oss|arr))|C(scr|hi|c(irc|onint|edil|aron)|ircle(Minus|Times|Dot|Plus)|Hcy|o(n(tourIntegral|int|gruent)|unterClockwiseContourIntegral|p(f|roduct)|lon(e)?)|dot|up(Cap)?|OPY|e(nterDot|dilla)|fr|lo(seCurly(DoubleQuote|Quote)|ckwiseContourIntegral)|a(yleys|cute|p(italDifferentialD)?)|ross))\n\t\t\t\t\t\t | (d(s(c(y|r)|trok|ol)|har(l|r)|c(y|aron)|t(dot|ri(f)?)|i(sin|e|v(ide(ontimes)?|onx)?|am(s|ond(suit)?)?|gamma)|Har|z(cy|igrarr)|o(t(square|plus|eq(dot)?|minus)?|ublebarwedge|pf|wn(harpoon(left|right)|downarrows|arrow)|llar)|d(otseq|a(rr|gger))?|u(har|arr)|jcy|e(lta|g|mptyv)|f(isht|r)|wangle|lc(orn|rop)|a(sh(v)?|leth|rr|gger)|r(c(orn|rop)|bkarow)|b(karow|lac)|Arr)|D(s(cr|trok)|c(y|aron)|Scy|i(fferentialD|a(critical(Grave|Tilde|Do(t|ubleAcute)|Acute)|mond))|o(t(Dot|Equal)?|uble(Right(Tee|Arrow)|ContourIntegral|Do(t|wnArrow)|Up(DownArrow|Arrow)|VerticalBar|L(ong(RightArrow|Left(RightArrow|Arrow))|eft(RightArrow|Tee|Arrow)))|pf|wn(Right(TeeVector|Vector(Bar)?)|Breve|Tee(Arrow)?|arrow|Left(RightVector|TeeVector|Vector(Bar)?)|Arrow(Bar|UpArrow)?))|Zcy|el(ta)?|D(otrahd)?|Jcy|fr|a(shv|rr|gger)))\n\t\t\t\t\t\t | (e(s(cr|im|dot)|n(sp|g)|c(y|ir(c)?|olon|aron)|t(h|a)|o(pf|gon)|dot|u(ro|ml)|p(si(v|lon)?|lus|ar(sl)?)|e|D(ot|Dot)|q(s(im|lant(less|gtr))|c(irc|olon)|u(iv(DD)?|est|als)|vparsl)|f(Dot|r)|l(s(dot)?|inters|l)?|a(ster|cute)|r(Dot|arr)|g(s(dot)?|rave)?|x(cl|ist|p(onentiale|ectation))|m(sp(1(3|4))?|pty(set|v)?|acr))|E(s(cr|im)|c(y|irc|aron)|ta|o(pf|gon)|NG|dot|uml|TH|psilon|qu(ilibrium|al(Tilde)?)|fr|lement|acute|grave|x(ists|ponentialE)|m(pty(SmallSquare|VerySmallSquare)|acr)))\n\t\t\t\t\t\t | (f(scr|nof|cy|ilig|o(pf|r(k(v)?|all))|jlig|partint|emale|f(ilig|l(ig|lig)|r)|l(tns|lig|at)|allingdotseq|r(own|a(sl|c(1(2|8|3|4|5|6)|78|2(3|5)|3(8|4|5)|45|5(8|6)))))|F(scr|cy|illed(SmallSquare|VerySmallSquare)|o(uriertrf|pf|rAll)|fr))\n\t\t\t\t\t\t | (G(scr|c(y|irc|edil)|t|opf|dot|T|Jcy|fr|amma(d)?|reater(Greater|SlantEqual|Tilde|Equal(Less)?|FullEqual|Less)|g|breve)|g(s(cr|im(e|l)?)|n(sim|e(q(q)?)?|E|ap(prox)?)|c(y|irc)|t(c(c|ir)|dot|quest|lPar|r(sim|dot|eq(qless|less)|less|a(pprox|rr)))?|imel|opf|dot|jcy|e(s(cc|dot(o(l)?)?|l(es)?)?|q(slant|q)?|l)?|v(nE|ertneqq)|fr|E(l)?|l(j|E|a)?|a(cute|p|mma(d)?)|rave|g(g)?|breve))\n\t\t\t\t\t\t | (h(s(cr|trok|lash)|y(phen|bull)|circ|o(ok(leftarrow|rightarrow)|pf|arr|rbar|mtht)|e(llip|arts(uit)?|rcon)|ks(earow|warow)|fr|a(irsp|lf|r(dcy|r(cir|w)?)|milt)|bar|Arr)|H(s(cr|trok)|circ|ilbertSpace|o(pf|rizontalLine)|ump(DownHump|Equal)|fr|a(cek|t)|ARDcy))\n\t\t\t\t\t\t | (i(s(cr|in(s(v)?|dot|v|E)?)|n(care|t(cal|prod|e(rcal|gers)|larhk)?|odot|fin(tie)?)?|c(y|irc)?|t(ilde)?|i(nfin|i(nt|int)|ota)?|o(cy|ta|pf|gon)|u(kcy|ml)|jlig|prod|e(cy|xcl)|quest|f(f|r)|acute|grave|m(of|ped|a(cr|th|g(part|e|line))))|I(scr|n(t(e(rsection|gral))?|visible(Comma|Times))|c(y|irc)|tilde|o(ta|pf|gon)|dot|u(kcy|ml)|Ocy|Jlig|fr|Ecy|acute|grave|m(plies|a(cr|ginaryI))?))\n\t\t\t\t\t\t | (j(s(cr|ercy)|c(y|irc)|opf|ukcy|fr|math)|J(s(cr|ercy)|c(y|irc)|opf|ukcy|fr))\n\t\t\t\t\t\t | (k(scr|hcy|c(y|edil)|opf|jcy|fr|appa(v)?|green)|K(scr|c(y|edil)|Hcy|opf|Jcy|fr|appa))\n\t\t\t\t\t\t | (l(s(h|cr|trok|im(e|g)?|q(uo(r)?|b)|aquo)|h(ar(d|u(l)?)|blk)|n(sim|e(q(q)?)?|E|ap(prox)?)|c(y|ub|e(il|dil)|aron)|Barr|t(hree|c(c|ir)|imes|dot|quest|larr|r(i(e|f)?|Par))?|Har|o(ng(left(arrow|rightarrow)|rightarrow|mapsto)|times|z(enge|f)?|oparrow(left|right)|p(f|lus|ar)|w(ast|bar)|a(ng|rr)|brk)|d(sh|ca|quo(r)?|r(dhar|ushar))|ur(dshar|uhar)|jcy|par(lt)?|e(s(s(sim|dot|eq(qgtr|gtr)|approx|gtr)|cc|dot(o(r)?)?|g(es)?)?|q(slant|q)?|ft(harpoon(down|up)|threetimes|leftarrows|arrow(tail)?|right(squigarrow|harpoons|arrow(s)?))|g)?|v(nE|ertneqq)|f(isht|loor|r)|E(g)?|l(hard|corner|tri|arr)?|a(ng(d|le)?|cute|t(e(s)?|ail)?|p|emptyv|quo|rr(sim|hk|tl|pl|fs|lp|b(fs)?)?|gran|mbda)|r(har(d)?|corner|tri|arr|m)|g(E)?|m(idot|oust(ache)?)|b(arr|r(k(sl(d|u)|e)|ac(e|k))|brk)|A(tail|arr|rr))|L(s(h|cr|trok)|c(y|edil|aron)|t|o(ng(RightArrow|left(arrow|rightarrow)|rightarrow|Left(RightArrow|Arrow))|pf|wer(RightArrow|LeftArrow))|T|e(ss(Greater|SlantEqual|Tilde|EqualGreater|FullEqual|Less)|ft(Right(Vector|Arrow)|Ceiling|T(ee(Vector|Arrow)?|riangle(Bar|Equal)?)|Do(ubleBracket|wn(TeeVector|Vector(Bar)?))|Up(TeeVector|DownVector|Vector(Bar)?)|Vector(Bar)?|arrow|rightarrow|Floor|A(ngleBracket|rrow(RightArrow|Bar)?)))|Jcy|fr|l(eftarrow)?|a(ng|cute|placetrf|rr|mbda)|midot))\n\t\t\t\t\t\t | (M(scr|cy|inusPlus|opf|u|e(diumSpace|llintrf)|fr|ap)|m(s(cr|tpos)|ho|nplus|c(y|omma)|i(nus(d(u)?|b)?|cro|d(cir|dot|ast)?)|o(dels|pf)|dash|u(ltimap|map)?|p|easuredangle|DDot|fr|l(cp|dr)|a(cr|p(sto(down|up|left)?)?|l(t(ese)?|e)|rker)))\n\t\t\t\t\t\t | (n(s(hort(parallel|mid)|c(cue|e|r)?|im(e(q)?)?|u(cc(eq)?|p(set(eq(q)?)?|e|E)?|b(set(eq(q)?)?|e|E)?)|par|qsu(pe|be)|mid)|Rightarrow|h(par|arr|Arr)|G(t(v)?|g)|c(y|ong(dot)?|up|edil|a(p|ron))|t(ilde|lg|riangle(left(eq)?|right(eq)?)|gl)|i(s(d)?|v)?|o(t(ni(v(c|a|b))?|in(dot|v(c|a|b)|E)?)?|pf)|dash|u(m(sp|ero)?)?|jcy|p(olint|ar(sl|t|allel)?|r(cue|e(c(eq)?)?)?)|e(s(im|ear)|dot|quiv|ar(hk|r(ow)?)|xist(s)?|Arr)?|v(sim|infin|Harr|dash|Dash|l(t(rie)?|e|Arr)|ap|r(trie|Arr)|g(t|e))|fr|w(near|ar(hk|r(ow)?)|Arr)|V(dash|Dash)|l(sim|t(ri(e)?)?|dr|e(s(s)?|q(slant|q)?|ft(arrow|rightarrow))?|E|arr|Arr)|a(ng|cute|tur(al(s)?)?|p(id|os|prox|E)?|bla)|r(tri(e)?|ightarrow|arr(c|w)?|Arr)|g(sim|t(r)?|e(s|q(slant|q)?)?|E)|mid|L(t(v)?|eft(arrow|rightarrow)|l)|b(sp|ump(e)?))|N(scr|c(y|edil|aron)|tilde|o(nBreakingSpace|Break|t(R(ightTriangle(Bar|Equal)?|everseElement)|Greater(Greater|SlantEqual|Tilde|Equal|FullEqual|Less)?|S(u(cceeds(SlantEqual|Tilde|Equal)?|perset(Equal)?|bset(Equal)?)|quareSu(perset(Equal)?|bset(Equal)?))|Hump(DownHump|Equal)|Nested(GreaterGreater|LessLess)|C(ongruent|upCap)|Tilde(Tilde|Equal|FullEqual)?|DoubleVerticalBar|Precedes(SlantEqual|Equal)?|E(qual(Tilde)?|lement|xists)|VerticalBar|Le(ss(Greater|SlantEqual|Tilde|Equal|Less)?|ftTriangle(Bar|Equal)?))?|pf)|u|e(sted(GreaterGreater|LessLess)|wLine|gative(MediumSpace|Thi(nSpace|ckSpace)|VeryThinSpace))|Jcy|fr|acute))\n\t\t\t\t\t\t | (o(s(cr|ol|lash)|h(m|bar)|c(y|ir(c)?)|ti(lde|mes(as)?)|S|int|opf|d(sold|iv|ot|ash|blac)|uml|p(erp|lus|ar)|elig|vbar|f(cir|r)|l(c(ir|ross)|t|ine|arr)|a(st|cute)|r(slope|igof|or|d(er(of)?|f|m)?|v|arr)?|g(t|on|rave)|m(i(nus|cron|d)|ega|acr))|O(s(cr|lash)|c(y|irc)|ti(lde|mes)|opf|dblac|uml|penCurly(DoubleQuote|Quote)|ver(B(ar|rac(e|ket))|Parenthesis)|fr|Elig|acute|r|grave|m(icron|ega|acr)))\n\t\t\t\t\t\t | (p(s(cr|i)|h(i(v)?|one|mmat)|cy|i(tchfork|v)?|o(intint|und|pf)|uncsp|er(cnt|tenk|iod|p|mil)|fr|l(us(sim|cir|two|d(o|u)|e|acir|mn|b)?|an(ck(h)?|kv))|ar(s(im|l)|t|a(llel)?)?|r(sim|n(sim|E|ap)|cue|ime(s)?|o(d|p(to)?|f(surf|line|alar))|urel|e(c(sim|n(sim|eqq|approx)|curlyeq|eq|approx)?)?|E|ap)?|m)|P(s(cr|i)|hi|cy|i|o(incareplane|pf)|fr|lusMinus|artialD|r(ime|o(duct|portion(al)?)|ecedes(SlantEqual|Tilde|Equal)?)?))\n\t\t\t\t\t\t | (q(scr|int|opf|u(ot|est(eq)?|at(int|ernions))|prime|fr)|Q(scr|opf|UOT|fr))\n\t\t\t\t\t\t | (R(s(h|cr)|ho|c(y|edil|aron)|Barr|ight(Ceiling|T(ee(Vector|Arrow)?|riangle(Bar|Equal)?)|Do(ubleBracket|wn(TeeVector|Vector(Bar)?))|Up(TeeVector|DownVector|Vector(Bar)?)|Vector(Bar)?|arrow|Floor|A(ngleBracket|rrow(Bar|LeftArrow)?))|o(undImplies|pf)|uleDelayed|e(verse(UpEquilibrium|E(quilibrium|lement)))?|fr|EG|a(ng|cute|rr(tl)?)|rightarrow)|r(s(h|cr|q(uo(r)?|b)|aquo)|h(o(v)?|ar(d|u(l)?))|nmid|c(y|ub|e(il|dil)|aron)|Barr|t(hree|imes|ri(e|f|ltri)?)|i(singdotseq|ng|ght(squigarrow|harpoon(down|up)|threetimes|left(harpoons|arrows)|arrow(tail)?|rightarrows))|Har|o(times|p(f|lus|ar)|a(ng|rr)|brk)|d(sh|ca|quo(r)?|ldhar)|uluhar|p(polint|ar(gt)?)|e(ct|al(s|ine|part)?|g)|f(isht|loor|r)|l(har|arr|m)|a(ng(d|e|le)?|c(ute|e)|t(io(nals)?|ail)|dic|emptyv|quo|rr(sim|hk|c|tl|pl|fs|w|lp|ap|b(fs)?)?)|rarr|x|moust(ache)?|b(arr|r(k(sl(d|u)|e)|ac(e|k))|brk)|A(tail|arr|rr)))\n\t\t\t\t\t\t | (s(s(cr|tarf|etmn|mile)|h(y|c(hcy|y)|ort(parallel|mid)|arp)|c(sim|y|n(sim|E|ap)|cue|irc|polint|e(dil)?|E|a(p|ron))?|t(ar(f)?|r(ns|aight(phi|epsilon)))|i(gma(v|f)?|m(ne|dot|plus|e(q)?|l(E)?|rarr|g(E)?)?)|zlig|o(pf|ftcy|l(b(ar)?)?)|dot(e|b)?|u(ng|cc(sim|n(sim|eqq|approx)|curlyeq|eq|approx)?|p(s(im|u(p|b)|et(neq(q)?|eq(q)?)?)|hs(ol|ub)|1|n(e|E)|2|d(sub|ot)|3|plus|e(dot)?|E|larr|mult)?|m|b(s(im|u(p|b)|et(neq(q)?|eq(q)?)?)|n(e|E)|dot|plus|e(dot)?|E|rarr|mult)?)|pa(des(uit)?|r)|e(swar|ct|tm(n|inus)|ar(hk|r(ow)?)|xt|mi|Arr)|q(su(p(set(eq)?|e)?|b(set(eq)?|e)?)|c(up(s)?|ap(s)?)|u(f|ar(e|f))?)|fr(own)?|w(nwar|ar(hk|r(ow)?)|Arr)|larr|acute|rarr|m(t(e(s)?)?|i(d|le)|eparsl|a(shp|llsetminus))|bquo)|S(scr|hort(RightArrow|DownArrow|UpArrow|LeftArrow)|c(y|irc|edil|aron)?|tar|igma|H(cy|CHcy)|opf|u(c(hThat|ceeds(SlantEqual|Tilde|Equal)?)|p(set|erset(Equal)?)?|m|b(set(Equal)?)?)|OFTcy|q(uare(Su(perset(Equal)?|bset(Equal)?)|Intersection|Union)?|rt)|fr|acute|mallCircle))\n\t\t\t\t\t\t | (t(s(hcy|c(y|r)|trok)|h(i(nsp|ck(sim|approx))|orn|e(ta(sym|v)?|re(4|fore))|k(sim|ap))|c(y|edil|aron)|i(nt|lde|mes(d|b(ar)?)?)|o(sa|p(cir|f(ork)?|bot)?|ea)|dot|prime|elrec|fr|w(ixt|ohead(leftarrow|rightarrow))|a(u|rget)|r(i(sb|time|dot|plus|e|angle(down|q|left(eq)?|right(eq)?)?|minus)|pezium|ade)|brk)|T(s(cr|trok)|RADE|h(i(nSpace|ckSpace)|e(ta|refore))|c(y|edil|aron)|S(cy|Hcy)|ilde(Tilde|Equal|FullEqual)?|HORN|opf|fr|a(u|b)|ripleDot))\n\t\t\t\t\t\t | (u(scr|h(ar(l|r)|blk)|c(y|irc)|t(ilde|dot|ri(f)?)|Har|o(pf|gon)|d(har|arr|blac)|u(arr|ml)|p(si(h|lon)?|harpoon(left|right)|downarrow|uparrows|lus|arrow)|f(isht|r)|wangle|l(c(orn(er)?|rop)|tri)|a(cute|rr)|r(c(orn(er)?|rop)|tri|ing)|grave|m(l|acr)|br(cy|eve)|Arr)|U(scr|n(ion(Plus)?|der(B(ar|rac(e|ket))|Parenthesis))|c(y|irc)|tilde|o(pf|gon)|dblac|uml|p(si(lon)?|downarrow|Tee(Arrow)?|per(RightArrow|LeftArrow)|DownArrow|Equilibrium|arrow|Arrow(Bar|DownArrow)?)|fr|a(cute|rr(ocir)?)|ring|grave|macr|br(cy|eve)))\n\t\t\t\t\t\t | (v(s(cr|u(pn(e|E)|bn(e|E)))|nsu(p|b)|cy|Bar(v)?|zigzag|opf|dash|prop|e(e(eq|bar)?|llip|r(t|bar))|Dash|fr|ltri|a(ngrt|r(s(igma|u(psetneq(q)?|bsetneq(q)?))|nothing|t(heta|riangle(left|right))|p(hi|i|ropto)|epsilon|kappa|r(ho)?))|rtri|Arr)|V(scr|cy|opf|dash(l)?|e(e|r(yThinSpace|t(ical(Bar|Separator|Tilde|Line))?|bar))|Dash|vdash|fr|bar))\n\t\t\t\t\t\t | (w(scr|circ|opf|p|e(ierp|d(ge(q)?|bar))|fr|r(eath)?)|W(scr|circ|opf|edge|fr))\n\t\t\t\t\t\t | (X(scr|i|opf|fr)|x(s(cr|qcup)|h(arr|Arr)|nis|c(irc|up|ap)|i|o(time|dot|p(f|lus))|dtri|u(tri|plus)|vee|fr|wedge|l(arr|Arr)|r(arr|Arr)|map))\n\t\t\t\t\t\t | (y(scr|c(y|irc)|icy|opf|u(cy|ml)|en|fr|ac(y|ute))|Y(scr|c(y|irc)|opf|uml|Icy|Ucy|fr|acute|Acy))\n\t\t\t\t\t\t | (z(scr|hcy|c(y|aron)|igrarr|opf|dot|e(ta|etrf)|fr|w(nj|j)|acute)|Z(scr|c(y|aron)|Hcy|opf|dot|e(ta|roWidthSpace)|fr|acute))\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(;)\n\t\t\t\t\t", + "name": "constant.character.entity.named.$2.html" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.html" + }, + "3": { + "name": "punctuation.definition.entity.html" + } + }, + "match": "(&)#[0-9]+(;)", + "name": "constant.character.entity.numeric.decimal.html" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.html" + }, + "3": { + "name": "punctuation.definition.entity.html" + } + }, + "match": "(&)#[xX][0-9a-fA-F]+(;)", + "name": "constant.character.entity.numeric.hexadecimal.html" + }, + { + "match": "&(?=[a-zA-Z0-9]+;)", + "name": "invalid.illegal.ambiguous-ampersand.html" + } + ] + }, + "math": { + "patterns": [ + { + "begin": "(?i)(<)(math)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?", + "beginCaptures": { + "0": { + "name": "meta.tag.structure.$2.start.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "end": "(?i)()", + "endCaptures": { + "0": { + "name": "meta.tag.structure.$2.end.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.element.structure.$2.html", + "patterns": [ + { + "begin": "(?)\\G", + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.structure.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "include": "#tags" + } + ] + } + ], + "repository": { + "attribute": { + "patterns": [ + { + "begin": "(s(hift|ymmetric|cript(sizemultiplier|level|minsize)|t(ackalign|retchy)|ide|u(pscriptshift|bscriptshift)|e(parator(s)?|lection)|rc)|h(eight|ref)|n(otation|umalign)|c(haralign|olumn(spa(n|cing)|width|lines|align)|lose|rossout)|i(n(dent(shift(first|last)?|target|align(first|last)?)|fixlinebreakstyle)|d)|o(pen|verflow)|d(i(splay(style)?|r)|e(nomalign|cimalpoint|pth))|position|e(dge|qual(columns|rows))|voffset|f(orm|ence|rame(spacing)?)|width|l(space|ine(thickness|leading|break(style|multchar)?)|o(ngdivstyle|cation)|ength|quote|argeop)|a(c(cent(under)?|tiontype)|l(t(text|img(-(height|valign|width))?)|ign(mentscope)?))|r(space|ow(spa(n|cing)|lines|align)|quote)|groupalign|x(link:href|mlns)|m(in(size|labelspacing)|ovablelimits|a(th(size|color|variant|background)|xsize))|bevelled)(?![\\w:-])", + "beginCaptures": { + "0": { + "name": "entity.other.attribute-name.html" + } + }, + "end": "(?=\\s*+[^=\\s])", + "name": "meta.attribute.$1.html", + "patterns": [ + { + "include": "#attribute-interior" + } + ] + }, + { + "begin": "([^\\x{0020}\"'<>/=\\x{0000}-\\x{001F}\\x{007F}-\\x{009F}\\x{FDD0}-\\x{FDEF}\\x{FFFE}\\x{FFFF}\\x{1FFFE}\\x{1FFFF}\\x{2FFFE}\\x{2FFFF}\\x{3FFFE}\\x{3FFFF}\\x{4FFFE}\\x{4FFFF}\\x{5FFFE}\\x{5FFFF}\\x{6FFFE}\\x{6FFFF}\\x{7FFFE}\\x{7FFFF}\\x{8FFFE}\\x{8FFFF}\\x{9FFFE}\\x{9FFFF}\\x{AFFFE}\\x{AFFFF}\\x{BFFFE}\\x{BFFFF}\\x{CFFFE}\\x{CFFFF}\\x{DFFFE}\\x{DFFFF}\\x{EFFFE}\\x{EFFFF}\\x{FFFFE}\\x{FFFFF}\\x{10FFFE}\\x{10FFFF}]+)", + "beginCaptures": { + "0": { + "name": "entity.other.attribute-name.html" + } + }, + "comment": "Anything else that is valid", + "end": "(?=\\s*+[^=\\s])", + "name": "meta.attribute.unrecognized.$1.html", + "patterns": [ + { + "include": "#attribute-interior" + } + ] + }, + { + "match": "[^\\s>]+", + "name": "invalid.illegal.character-not-allowed-here.html" + } + ] + }, + "tags": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#cdata" + }, + { + "captures": { + "0": { + "name": "meta.tag.structure.math.$2.void.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "match": "(?i)(<)(annotation|annotation-xml|semantics|menclose|merror|mfenced|mfrac|mpadded|mphantom|mroot|mrow|msqrt|mstyle|mmultiscripts|mover|mprescripts|msub|msubsup|msup|munder|munderover|none|mlabeledtr|mtable|mtd|mtr|mlongdiv|mscarries|mscarry|msgroup|msline|msrow|mstack|maction)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>))", + "name": "meta.element.structure.math.$2.html" + }, + { + "begin": "(?i)(<)(annotation|annotation-xml|semantics|menclose|merror|mfenced|mfrac|mpadded|mphantom|mroot|mrow|msqrt|mstyle|mmultiscripts|mover|mprescripts|msub|msubsup|msup|munder|munderover|none|mlabeledtr|mtable|mtd|mtr|mlongdiv|mscarries|mscarry|msgroup|msline|msrow|mstack|maction)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?", + "beginCaptures": { + "0": { + "name": "meta.tag.structure.math.$2.start.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "end": "(?i)()|(/>)|(?=)\\G", + "end": "(?=/>)|>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.structure.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "include": "#tags" + } + ] + }, + { + "captures": { + "0": { + "name": "meta.tag.inline.math.$2.void.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "match": "(?i)(<)(mi|mn|mo|ms|mspace|mtext|maligngroup|malignmark)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>))", + "name": "meta.element.inline.math.$2.html" + }, + { + "begin": "(?i)(<)(mi|mn|mo|ms|mspace|mtext|maligngroup|malignmark)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?", + "beginCaptures": { + "0": { + "name": "meta.tag.inline.math.$2.start.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "end": "(?i)()|(/>)|(?=)\\G", + "end": "(?=/>)|>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.inline.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "include": "#tags" + } + ] + }, + { + "captures": { + "0": { + "name": "meta.tag.object.math.$2.void.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "match": "(?i)(<)(mglyph)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>))", + "name": "meta.element.object.math.$2.html" + }, + { + "begin": "(?i)(<)(mglyph)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?", + "beginCaptures": { + "0": { + "name": "meta.tag.object.math.$2.start.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "end": "(?i)()|(/>)|(?=)\\G", + "end": "(?=/>)|>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.object.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "include": "#tags" + } + ] + }, + { + "captures": { + "0": { + "name": "meta.tag.other.invalid.void.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "invalid.illegal.unrecognized-tag.html" + }, + "4": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "6": { + "name": "punctuation.definition.tag.end.html" + } + }, + "match": "(?i)(<)(([\\w:]+))(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>))", + "name": "meta.element.other.invalid.html" + }, + { + "begin": "(?i)(<)((\\w[^\\s>]*))(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?", + "beginCaptures": { + "0": { + "name": "meta.tag.other.invalid.start.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "invalid.illegal.unrecognized-tag.html" + }, + "4": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "6": { + "name": "punctuation.definition.tag.end.html" + } + }, + "end": "(?i)()|(/>)|(?=)\\G", + "end": "(?=/>)|>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.other.invalid.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "include": "#tags" + } + ] + }, + { + "include": "#tags-invalid" + } + ] + } + } + }, + "svg": { + "patterns": [ + { + "begin": "(?i)(<)(svg)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?", + "beginCaptures": { + "0": { + "name": "meta.tag.structure.$2.start.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "end": "(?i)()", + "endCaptures": { + "0": { + "name": "meta.tag.structure.$2.end.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.element.structure.$2.html", + "patterns": [ + { + "begin": "(?)\\G", + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.structure.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "include": "#tags" + } + ] + } + ], + "repository": { + "attribute": { + "patterns": [ + { + "begin": "(s(hape-rendering|ystemLanguage|cale|t(yle|itchTiles|op-(color|opacity)|dDeviation|em(h|v)|artOffset|r(i(ng|kethrough-(thickness|position))|oke(-(opacity|dash(offset|array)|width|line(cap|join)|miterlimit))?))|urfaceScale|p(e(cular(Constant|Exponent)|ed)|acing|readMethod)|eed|lope)|h(oriz-(origin-x|adv-x)|eight|anging|ref(lang)?)|y(1|2|ChannelSelector)?|n(umOctaves|ame)|c(y|o(ntentS(criptType|tyleType)|lor(-(interpolation(-filters)?|profile|rendering))?)|ursor|l(ip(-(path|rule)|PathUnits)?|ass)|a(p-height|lcMode)|x)|t(ype|o|ext(-(decoration|anchor|rendering)|Length)|a(rget(X|Y)?|b(index|leValues))|ransform)|i(n(tercept|2)?|d(eographic)?|mage-rendering)|z(oomAndPan)?|o(p(erator|acity)|ver(flow|line-(thickness|position))|ffset|r(i(ent(ation)?|gin)|der))|d(y|i(splay|visor|ffuseConstant|rection)|ominant-baseline|ur|e(scent|celerate)|x)?|u(1|n(i(code(-(range|bidi))?|ts-per-em)|derline-(thickness|position))|2)|p(ing|oint(s(At(X|Y|Z))?|er-events)|a(nose-1|t(h(Length)?|tern(ContentUnits|Transform|Units))|int-order)|r(imitiveUnits|eserveA(spectRatio|lpha)))|e(n(d|able-background)|dgeMode|levation|x(ternalResourcesRequired|ponent))|v(i(sibility|ew(Box|Target))|-(hanging|ideographic|alphabetic|mathematical)|e(ctor-effect|r(sion|t-(origin-(y|x)|adv-y)))|alues)|k(1|2|3|e(y(Splines|Times|Points)|rn(ing|el(Matrix|UnitLength)))|4)?|f(y|il(ter(Res|Units)?|l(-(opacity|rule))?)|o(nt-(s(t(yle|retch)|ize(-adjust)?)|variant|family|weight)|rmat)|lood-(color|opacity)|r(om)?|x)|w(idth(s)?|ord-spacing|riting-mode)|l(i(ghting-color|mitingConeAngle)|ocal|e(ngthAdjust|tter-spacing)|ang)|a(scent|cc(umulate|ent-height)|ttribute(Name|Type)|zimuth|dditive|utoReverse|l(ignment-baseline|phabetic|lowReorder)|rabic-form|mplitude)|r(y|otate|e(s(tart|ult)|ndering-intent|peat(Count|Dur)|quired(Extensions|Features)|f(X|Y|errerPolicy)|l)|adius|x)?|g(1|2|lyph(Ref|-(name|orientation-(horizontal|vertical)))|radient(Transform|Units))|x(1|2|ChannelSelector|-height|link:(show|href|t(ype|itle)|a(ctuate|rcrole)|role)|ml:(space|lang|base))?|m(in|ode|e(thod|dia)|a(sk(ContentUnits|Units)?|thematical|rker(Height|-(start|end|mid)|Units|Width)|x))|b(y|ias|egin|ase(Profile|line-shift|Frequency)|box))(?![\\w:-])", + "beginCaptures": { + "0": { + "name": "entity.other.attribute-name.html" + } + }, + "end": "(?=\\s*+[^=\\s])", + "name": "meta.attribute.$1.html", + "patterns": [ + { + "include": "#attribute-interior" + } + ] + }, + { + "begin": "([^\\x{0020}\"'<>/=\\x{0000}-\\x{001F}\\x{007F}-\\x{009F}\\x{FDD0}-\\x{FDEF}\\x{FFFE}\\x{FFFF}\\x{1FFFE}\\x{1FFFF}\\x{2FFFE}\\x{2FFFF}\\x{3FFFE}\\x{3FFFF}\\x{4FFFE}\\x{4FFFF}\\x{5FFFE}\\x{5FFFF}\\x{6FFFE}\\x{6FFFF}\\x{7FFFE}\\x{7FFFF}\\x{8FFFE}\\x{8FFFF}\\x{9FFFE}\\x{9FFFF}\\x{AFFFE}\\x{AFFFF}\\x{BFFFE}\\x{BFFFF}\\x{CFFFE}\\x{CFFFF}\\x{DFFFE}\\x{DFFFF}\\x{EFFFE}\\x{EFFFF}\\x{FFFFE}\\x{FFFFF}\\x{10FFFE}\\x{10FFFF}]+)", + "beginCaptures": { + "0": { + "name": "entity.other.attribute-name.html" + } + }, + "comment": "Anything else that is valid", + "end": "(?=\\s*+[^=\\s])", + "name": "meta.attribute.unrecognized.$1.html", + "patterns": [ + { + "include": "#attribute-interior" + } + ] + }, + { + "match": "[^\\s>]+", + "name": "invalid.illegal.character-not-allowed-here.html" + } + ] + }, + "tags": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#cdata" + }, + { + "captures": { + "0": { + "name": "meta.tag.metadata.svg.$2.void.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "match": "(?i)(<)(color-profile|desc|metadata|script|style|title)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>))", + "name": "meta.element.metadata.svg.$2.html" + }, + { + "begin": "(?i)(<)(color-profile|desc|metadata|script|style|title)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?", + "beginCaptures": { + "0": { + "name": "meta.tag.metadata.svg.$2.start.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "end": "(?i)()|(/>)|(?=)\\G", + "end": "(?=/>)|>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.metadata.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "include": "#tags" + } + ] + }, + { + "captures": { + "0": { + "name": "meta.tag.structure.svg.$2.void.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "match": "(?i)(<)(animateMotion|clipPath|defs|feComponentTransfer|feDiffuseLighting|feMerge|feSpecularLighting|filter|g|hatch|linearGradient|marker|mask|mesh|meshgradient|meshpatch|meshrow|pattern|radialGradient|switch|text|textPath)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>))", + "name": "meta.element.structure.svg.$2.html" + }, + { + "begin": "(?i)(<)(animateMotion|clipPath|defs|feComponentTransfer|feDiffuseLighting|feMerge|feSpecularLighting|filter|g|hatch|linearGradient|marker|mask|mesh|meshgradient|meshpatch|meshrow|pattern|radialGradient|switch|text|textPath)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?", + "beginCaptures": { + "0": { + "name": "meta.tag.structure.svg.$2.start.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "end": "(?i)()|(/>)|(?=)\\G", + "end": "(?=/>)|>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.structure.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "include": "#tags" + } + ] + }, + { + "captures": { + "0": { + "name": "meta.tag.inline.svg.$2.void.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "match": "(?i)(<)(a|animate|discard|feBlend|feColorMatrix|feComposite|feConvolveMatrix|feDisplacementMap|feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feMergeNode|feMorphology|feOffset|fePointLight|feSpotLight|feTile|feTurbulence|hatchPath|mpath|set|solidcolor|stop|tspan)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>))", + "name": "meta.element.inline.svg.$2.html" + }, + { + "begin": "(?i)(<)(a|animate|discard|feBlend|feColorMatrix|feComposite|feConvolveMatrix|feDisplacementMap|feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feMergeNode|feMorphology|feOffset|fePointLight|feSpotLight|feTile|feTurbulence|hatchPath|mpath|set|solidcolor|stop|tspan)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?", + "beginCaptures": { + "0": { + "name": "meta.tag.inline.svg.$2.start.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "end": "(?i)()|(/>)|(?=)\\G", + "end": "(?=/>)|>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.inline.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "include": "#tags" + } + ] + }, + { + "captures": { + "0": { + "name": "meta.tag.object.svg.$2.void.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "match": "(?i)(<)(circle|ellipse|feImage|foreignObject|image|line|path|polygon|polyline|rect|symbol|use|view)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>))", + "name": "meta.element.object.svg.$2.html" + }, + { + "begin": "(?i)(<)(a|circle|ellipse|feImage|foreignObject|image|line|path|polygon|polyline|rect|symbol|use|view)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?", + "beginCaptures": { + "0": { + "name": "meta.tag.object.svg.$2.start.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "end": "(?i)()|(/>)|(?=)\\G", + "end": "(?=/>)|>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.object.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "include": "#tags" + } + ] + }, + { + "captures": { + "0": { + "name": "meta.tag.other.svg.$2.void.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "invalid.deprecated.html" + }, + "4": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "6": { + "name": "punctuation.definition.tag.end.html" + } + }, + "match": "(?i)(<)((altGlyph|altGlyphDef|altGlyphItem|animateColor|animateTransform|cursor|font|font-face|font-face-format|font-face-name|font-face-src|font-face-uri|glyph|glyphRef|hkern|missing-glyph|tref|vkern))(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>))", + "name": "meta.element.other.svg.$2.html" + }, + { + "begin": "(?i)(<)((altGlyph|altGlyphDef|altGlyphItem|animateColor|animateTransform|cursor|font|font-face|font-face-format|font-face-name|font-face-src|font-face-uri|glyph|glyphRef|hkern|missing-glyph|tref|vkern))(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?", + "beginCaptures": { + "0": { + "name": "meta.tag.other.svg.$2.start.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "invalid.deprecated.html" + }, + "4": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "6": { + "name": "punctuation.definition.tag.end.html" + } + }, + "end": "(?i)()|(/>)|(?=)\\G", + "end": "(?=/>)|>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.other.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "include": "#tags" + } + ] + }, + { + "captures": { + "0": { + "name": "meta.tag.other.invalid.void.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "invalid.illegal.unrecognized-tag.html" + }, + "4": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "6": { + "name": "punctuation.definition.tag.end.html" + } + }, + "match": "(?i)(<)(([\\w:]+))(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>))", + "name": "meta.element.other.invalid.html" + }, + { + "begin": "(?i)(<)((\\w[^\\s>]*))(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?", + "beginCaptures": { + "0": { + "name": "meta.tag.other.invalid.start.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "invalid.illegal.unrecognized-tag.html" + }, + "4": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "6": { + "name": "punctuation.definition.tag.end.html" + } + }, + "end": "(?i)()|(/>)|(?=)\\G", + "end": "(?=/>)|>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.other.invalid.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "include": "#tags" + } + ] + }, + { + "include": "#tags-invalid" + } + ] + } + } + }, + "tags-invalid": { + "patterns": [ + { + "begin": "(]*))(?)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.other.$2.html", + "patterns": [ + { + "include": "#attribute" + } + ] + } + ] + }, + "tags-valid": { + "patterns": [ + { + "begin": "(^[ \\t]+)?(?=<(?i:style)\\b(?!-))", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.embedded.leading.html" + } + }, + "end": "(?!\\G)([ \\t]*$\\n?)?", + "endCaptures": { + "1": { + "name": "punctuation.whitespace.embedded.trailing.html" + } + }, + "patterns": [ + { + "begin": "(?i)(<)(style)(?=\\s|/?>)", + "beginCaptures": { + "0": { + "name": "meta.tag.metadata.style.start.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": "(?i)((<)/)(style)\\s*(>)", + "endCaptures": { + "0": { + "name": "meta.tag.metadata.style.end.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "source.css-ignored-vscode" + }, + "3": { + "name": "entity.name.tag.html" + }, + "4": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.embedded.block.html", + "patterns": [ + { + "begin": "\\G", + "captures": { + "1": { + "name": "punctuation.definition.tag.end.html" + } + }, + "end": "(>)", + "name": "meta.tag.metadata.style.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?!\\G)", + "end": "(?=)", + "endCaptures": { + "0": { + "name": "meta.tag.metadata.script.end.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.embedded.block.html", + "patterns": [ + { + "begin": "\\G", + "end": "(?=/)", + "patterns": [ + { + "begin": "(>)", + "beginCaptures": { + "0": { + "name": "meta.tag.metadata.script.start.html" + }, + "1": { + "name": "punctuation.definition.tag.end.html" + } + }, + "end": "((<))(?=/(?i:script))", + "endCaptures": { + "0": { + "name": "meta.tag.metadata.script.end.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "source.js-ignored-vscode" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(?=\t\t\t\t\t\t\t\t\t\t\t# Tag without type attribute\n\t\t\t\t\t\t\t\t\t\t\t\t | type(?=[\\s=])\n\t\t\t\t\t\t\t\t\t\t\t\t \t(?!\\s*=\\s*\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t''\t\t\t\t\t\t\t\t# Empty\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t | \"\"\t\t\t\t\t\t\t\t\t# Values\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t | ('|\"|)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttext/\t\t\t\t\t\t\t# Text mime-types\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavascript(1\\.[0-5])?\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t | x-javascript\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t | jscript\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t | livescript\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t | (x-)?ecmascript\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t | babel\t\t\t\t\t\t# Javascript variant currently\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t# recognized as such\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t | application/\t\t\t\t\t# Application mime-types\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(x-)?javascript\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t | (x-)?ecmascript\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t | module\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\\s\"'>]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t)", + "name": "meta.tag.metadata.script.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?ix:\n\t\t\t\t\t\t\t\t\t\t\t\t(?=\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype\\s*=\\s*\n\t\t\t\t\t\t\t\t\t\t\t\t\t('|\"|)\n\t\t\t\t\t\t\t\t\t\t\t\t\ttext/\n\t\t\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx-handlebars\n\t\t\t\t\t\t\t\t\t\t\t\t\t | (x-(handlebars-)?|ng-)?template\n\t\t\t\t\t\t\t\t\t\t\t\t\t | html\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t[\\s\"'>]\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t)", + "end": "((<))(?=/(?i:script))", + "endCaptures": { + "0": { + "name": "meta.tag.metadata.script.end.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "text.html.basic" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.metadata.script.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?!\\G)", + "end": "(?=)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.metadata.script.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?!\\G)", + "end": "(?=)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": "/?>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.metadata.$2.void.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)(<)(noscript|title)(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.metadata.$2.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.metadata.$2.end.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)(<)(col|hr|input)(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": "/?>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.structure.$2.void.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)(<)(address|article|aside|blockquote|body|button|caption|colgroup|datalist|dd|details|dialog|div|dl|dt|fieldset|figcaption|figure|footer|form|head|header|hgroup|html|h[1-6]|label|legend|li|main|map|menu|meter|nav|ol|optgroup|option|output|p|pre|progress|section|select|slot|summary|table|tbody|td|template|textarea|tfoot|th|thead|tr|ul)(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.structure.$2.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.structure.$2.end.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)(<)(area|br|wbr)(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": "/?>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.inline.$2.void.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)(<)(a|abbr|b|bdi|bdo|cite|code|data|del|dfn|em|i|ins|kbd|mark|q|rp|rt|ruby|s|samp|small|span|strong|sub|sup|time|u|var)(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.inline.$2.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.inline.$2.end.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)(<)(embed|img|param|source|track)(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": "/?>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.object.$2.void.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)(<)(audio|canvas|iframe|object|picture|video)(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.object.$2.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.object.$2.end.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)(<)((basefont|isindex))(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "invalid.deprecated.html" + } + }, + "end": "/?>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.metadata.$2.void.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)(<)((center|frameset|noembed|noframes))(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "invalid.deprecated.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.structure.$2.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "invalid.deprecated.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.structure.$2.end.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)(<)((acronym|big|blink|font|strike|tt|xmp))(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "invalid.deprecated.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.inline.$2.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "invalid.deprecated.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.inline.$2.end.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)(<)((frame))(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "invalid.deprecated.html" + } + }, + "end": "/?>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.object.$2.void.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)(<)((applet))(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "invalid.deprecated.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.object.$2.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "invalid.deprecated.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.object.$2.end.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)(<)((dir|keygen|listing|menuitem|plaintext|spacer))(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "invalid.illegal.no-longer-supported.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.other.$2.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "(?i)()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "invalid.illegal.no-longer-supported.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.other.$2.end.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "include": "#math" + }, + { + "include": "#svg" + }, + { + "begin": "(<)([a-zA-Z][.0-9_a-zA-Z\\x{00B7}\\x{00C0}-\\x{00D6}\\x{00D8}-\\x{00F6}\\x{00F8}-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}-\\x{200D}\\x{203F}-\\x{2040}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}]*-[\\-.0-9_a-zA-Z\\x{00B7}\\x{00C0}-\\x{00D6}\\x{00D8}-\\x{00F6}\\x{00F8}-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}-\\x{200D}\\x{203F}-\\x{2040}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}]*)(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": "/?>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.custom.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "begin": "()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.custom.end.html", + "patterns": [ + { + "include": "#attribute" + } + ] + } + ] + }, + "xml-processing": { + "begin": "(<\\?)(xml)", + "captures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": "(\\?>)", + "name": "meta.tag.metadata.processing.xml.html", + "patterns": [ + { + "include": "#attribute" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/http.tmLanguage.json b/src/lib/shiki/languages/http.tmLanguage.json new file mode 100644 index 0000000..80f1614 --- /dev/null +++ b/src/lib/shiki/languages/http.tmLanguage.json @@ -0,0 +1,297 @@ +{ + "scopeName": "source.http", + "fileTypes": ["http", "rest"], + "keyEquivalent": "^~H", + "name": "http", + "patterns": [ + { + "begin": "^\\s*(?=curl)", + "name": "http.request.curl", + "end": "^\\s*(\\#{3,}.*?)?\\s*$", + "endCaptures": { + "0": { + "name": "comment.line.sharp.http" + } + }, + "patterns": [ + { + "include": "source.shell" + } + ] + }, + { + "begin": "\\s*(?=(\\[|{[^{]))", + "name": "http.request.body.json", + "end": "^\\s*(\\#{3,}.*?)?\\s*$", + "endCaptures": { + "0": { + "name": "comment.line.sharp.http" + } + }, + "patterns": [ + { + "include": "source.json" + } + ] + }, + { + "begin": "^\\s*(?=<\\S)", + "name": "http.request.body.xml", + "end": "^\\s*(\\#{3,}.*?)?\\s*$", + "endCaptures": { + "0": { + "name": "comment.line.sharp.http" + } + }, + "patterns": [ + { + "include": "text.xml" + } + ] + }, + { + "begin": "\\s*(?=(query|mutation))", + "name": "http.request.body.graphql", + "end": "^\\s*(\\#{3,}.*?)?\\s*$", + "endCaptures": { + "0": { + "name": "comment.line.sharp.http" + } + }, + "patterns": [ + { + "include": "source.graphql" + } + ] + }, + { + "begin": "\\s*(?=(query|mutation))", + "name": "http.request.body.graphql", + "end": "^\\{\\s*$", + "patterns": [ + { + "include": "source.graphql" + } + ] + }, + { + "include": "#metadata" + }, + { + "include": "#comments" + }, + { + "captures": { + "1": { + "name": "keyword.other.http" + }, + "2": { + "name": "variable.other.http" + }, + "3": { + "name": "string.other.http" + } + }, + "match": "^\\s*(@)([^\\s=]+)\\s*=\\s*(.*?)\\s*$", + "name": "http.filevariable" + }, + { + "captures": { + "1": { + "name": "keyword.operator.http" + }, + "2": { + "name": "variable.other.http" + }, + "3": { + "name": "string.other.http" + } + }, + "match": "^\\s*(\\?|&)([^=\\s]+)=(.*)$", + "name": "http.query" + }, + { + "captures": { + "1": { + "name": "entity.name.tag.http" + }, + "2": { + "name": "keyword.other.http" + }, + "3": { + "name": "string.other.http" + } + }, + "match": "^([\\w\\-]+)\\s*(\\:)\\s*([^/].*?)\\s*$", + "name": "http.headers" + }, + { + "include": "#request-line" + }, + { + "include": "#response-line" + } + ], + "repository": { + "metadata": { + "patterns": [ + { + "match": "^\\s*\\#{1,}\\s+(?:((@)name)\\s+([^\\s\\.]+))$", + "captures": { + "1": { + "name": "entity.other.attribute-name" + }, + "2": { + "name": "punctuation.definition.block.tag.metadata" + }, + "3": { + "name": "entity.name.type.http" + } + }, + "name": "comment.line.sharp.http" + }, + { + "match": "^\\s*\\/{2,}\\s+(?:((@)name)\\s+([^\\s\\.]+))$", + "captures": { + "1": { + "name": "entity.other.attribute-name" + }, + "2": { + "name": "punctuation.definition.block.tag.metadata" + }, + "3": { + "name": "entity.name.type.http" + } + }, + "name": "comment.line.double-slash.http" + }, + { + "match": "^\\s*\\#{1,}\\s+((@)note)\\s*$", + "captures": { + "1": { + "name": "entity.other.attribute-name" + }, + "2": { + "name": "punctuation.definition.block.tag.metadata" + } + }, + "name": "comment.line.sharp.http" + }, + { + "match": "^\\s*\\/{2,}\\s+((@)note)\\s*$", + "captures": { + "1": { + "name": "entity.other.attribute-name" + }, + "2": { + "name": "punctuation.definition.block.tag.metadata" + } + }, + "name": "comment.line.double-slash.http" + }, + { + "match": "^\\s*\\#{1,}\\s+(?:((@)prompt)\\s+([^\\s]+)(?:\\s+(.*))?\\s*)$", + "captures": { + "1": { + "name": "entity.other.attribute-name" + }, + "2": { + "name": "punctuation.definition.block.tag.metadata" + }, + "3": { + "name": "variable.other.http" + }, + "4": { + "name": "string.other.http" + } + }, + "name": "comment.line.sharp.http" + }, + { + "match": "^\\s*\\/{2,}\\s+(?:((@)prompt)\\s+([^\\s]+)(?:\\s+(.*))?\\s*)$", + "captures": { + "1": { + "name": "entity.other.attribute-name" + }, + "2": { + "name": "punctuation.definition.block.tag.metadata" + }, + "3": { + "name": "variable.other.http" + }, + "4": { + "name": "string.other.http" + } + }, + "name": "comment.line.double-slash.http" + } + ] + }, + "comments": { + "patterns": [ + { + "match": "^\\s*\\#{1,}.*$", + "name": "comment.line.sharp.http" + }, + { + "match": "^\\s*\\/{2,}.*$", + "name": "comment.line.double-slash.http" + } + ] + }, + "request-line": { + "captures": { + "1": { + "name": "keyword.control.http" + }, + "2": { + "name": "const.language.http" + }, + "3": { + "patterns": [ + { + "include": "#protocol" + } + ] + } + }, + "match": "(?i)^(?:(get|post|put|delete|patch|head|options|connect|trace)\\s+)?\\s*(.+?)(?:\\s+(HTTP\\/\\S+))?$", + "name": "http.requestline" + }, + "response-line": { + "captures": { + "1": { + "patterns": [ + { + "include": "#protocol" + } + ] + }, + "2": { + "name": "constant.numeric.http" + }, + "3": { + "name": "string.other.http" + } + }, + "match": "(?i)^\\s*(HTTP\\/\\S+)\\s([1-5][0-9][0-9])\\s(.*)$", + "name": "http.responseLine" + }, + "protocol": { + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.other.http" + }, + "2": { + "name": "constant.numeric.http" + } + }, + "name": "http.version", + "match": "(HTTP)/(\\d+.\\d+)" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/imba.tmLanguage.json b/src/lib/shiki/languages/imba.tmLanguage.json new file mode 100644 index 0000000..d6f366d --- /dev/null +++ b/src/lib/shiki/languages/imba.tmLanguage.json @@ -0,0 +1,2693 @@ +{ + "name": "imba", + "scopeName": "source.imba", + "fileTypes": ["imba", "imba2"], + "uuid": "ef98eb90-bf9b-11e4-bb52-0800200c9a67", + "patterns": [ + { + "include": "#root" + }, + { + "name": "comment.line.shebang.imba", + "match": "\\A(#!).*(?=$)", + "captures": { + "1": { + "name": "punctuation.definition.comment.imba" + } + } + } + ], + "repository": { + "root": { + "patterns": [ + { + "include": "#block" + } + ] + }, + "block": { + "patterns": [ + { + "include": "#style-declaration" + }, + { + "include": "#object-keys" + }, + { + "include": "#tag-literal" + }, + { + "include": "#regex" + }, + { + "include": "#keywords" + }, + { + "include": "#comment" + }, + { + "include": "#literal" + }, + { + "include": "#plain-identifiers" + }, + { + "include": "#plain-accessors" + }, + { + "include": "#pairs" + }, + { + "include": "#invalid-indentation" + } + ] + }, + "expr": { + "patterns": [ + { + "include": "#style-declaration" + }, + { + "include": "#object-keys" + }, + { + "include": "#tag-literal" + }, + { + "include": "#regex" + }, + { + "include": "#keywords" + }, + { + "include": "#comment" + }, + { + "include": "#literal" + }, + { + "include": "#plain-identifiers" + }, + { + "include": "#plain-accessors" + }, + { + "include": "#pairs" + } + ] + }, + "literal": { + "patterns": [ + { + "include": "#number-with-unit-literal" + }, + { + "include": "#numeric-literal" + }, + { + "include": "#boolean-literal" + }, + { + "include": "#null-literal" + }, + { + "include": "#undefined-literal" + }, + { + "include": "#numericConstant-literal" + }, + { + "include": "#this-literal" + }, + { + "include": "#global-literal" + }, + { + "include": "#super-literal" + }, + { + "include": "#type-literal" + }, + { + "include": "#string" + } + ] + }, + "pairs": { + "patterns": [ + { + "include": "#curly-braces" + }, + { + "include": "#square-braces" + }, + { + "include": "#round-braces" + } + ] + }, + "curly-braces": { + "begin": "\\s*(\\{)", + "beginCaptures": { + "1": { + "name": "meta.brace.curly.imba" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "meta.brace.curly.imba" + } + }, + "patterns": [ + { + "include": "#expr" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "square-braces": { + "begin": "\\s*(\\[)", + "beginCaptures": { + "1": { + "name": "meta.brace.square.imba" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "meta.brace.square.imba" + } + }, + "patterns": [ + { + "include": "#expr" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "round-braces": { + "begin": "\\s*(\\()", + "beginCaptures": { + "1": { + "name": "meta.brace.round.imba" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.imba" + } + }, + "patterns": [ + { + "include": "#expr" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "keywords": { + "patterns": [ + { + "name": "keyword.control.imba", + "match": "(if|elif|else|unless|switch|when|then|do|import|export|for own|for|while|until|return|try|catch|await|finally|throw|as|continue|break|extend|augment)(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.control.imba", + "match": "(?<=export\\s+)(default)(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.control.imba", + "match": "(?<=import\\s+)(type)(?=\\s+[\\w\\{\\$\\_])" + }, + { + "name": "keyword.control.imba", + "match": "(extend)\\s+(?=class|tag)" + }, + { + "name": "keyword.control.imba", + "match": "(?<=[\\*\\}\\w\\$]\\s+)(from)(?=\\s+[\\\"\\'])" + }, + { + "name": "storage.type.function.imba", + "match": "(def|get|set)(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "storage.type.class.imba", + "match": "(tag|class|struct)(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "storage.type.imba", + "match": "(let|const|constructor)(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "storage.type.imba", + "match": "(prop|attr)(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "storage.modifier.imba", + "match": "(static)\\s+" + }, + { + "include": "#ops" + }, + { + "name": "keyword.operator.assignment.imba", + "match": "(=|\\|\\|=|\\?\\?=|\\&\\&=|\\+=|\\-=|\\*=|\\^=|\\%=)" + }, + { + "name": "keyword.operator.imba", + "match": "(\\>\\=?|\\<\\=?)" + }, + { + "name": "keyword.operator.imba", + "match": "(of|delete|\\!?isa|typeof|in|new)(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + } + ] + }, + "ops": { + "patterns": [ + { + "name": "keyword.operator.spread.imba", + "match": "\\.\\.\\." + }, + { + "name": "keyword.operator.assignment.compound.imba", + "match": "\\*=|(?>=|>>>=|\\|=" + }, + { + "name": "keyword.operator.bitwise.shift.imba", + "match": "<<|>>>|>>" + }, + { + "name": "keyword.operator.comparison.imba", + "match": "===|!==|==|!=|~=" + }, + { + "name": "keyword.operator.relational.imba", + "match": "<=|>=|<>|<|>" + }, + { + "match": "(\\!)\\s*(/)(?![/*])", + "captures": { + "1": { + "name": "keyword.operator.logical.imba" + }, + "2": { + "name": "keyword.operator.arithmetic.imba" + } + } + }, + { + "name": "keyword.operator.logical.imba", + "match": "\\!|&&|\\|\\||\\?\\?|or\\b(?=\\s|$)|and\\b(?=\\s|$)" + }, + { + "name": "keyword.operator.bitwise.imba", + "match": "\\&|~|\\^|\\|" + }, + { + "name": "keyword.operator.assignment.imba", + "match": "\\=" + }, + { + "name": "keyword.operator.decrement.imba", + "match": "--" + }, + { + "name": "keyword.operator.increment.imba", + "match": "\\+\\+" + }, + { + "name": "keyword.operator.arithmetic.imba", + "match": "%|\\*|/|-|\\+" + } + ] + }, + "object-keys": { + "patterns": [ + { + "match": "[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?\\:", + "name": "meta.object-literal.key" + } + ] + }, + "invalid-indentation": { + "patterns": [ + { + "name": "invalid.whitespace", + "match": "^[\\ ]+" + }, + { + "name": "invalid.whitespace", + "match": "^\\t+\\s+" + } + ] + }, + "style-property": { + "patterns": [ + { + "name": "meta.property-name.css", + "begin": "(?=(?:[\\@\\.]+[\\!\\<\\>]?)?[\\w\\-\\$]+(?:[\\@\\.]+[\\!\\<\\>]?[\\w\\-\\$]+)*(?:\\s*\\:))", + "beginCaptures": { + "1": { + "name": "support.function.calc.css" + }, + "2": { + "name": "punctuation.section.function.begin.bracket.round.css" + } + }, + "end": "\\s*\\:", + "endCaptures": { + "0": { + "name": "punctuation.separator.key-value.css" + } + }, + "patterns": [ + { + "name": "support.type.property-name.variable.css", + "match": "(?:--|\\$)[\\w\\-\\$]+" + }, + { + "name": "support.type.property-name.modifier.breakpoint.css", + "match": "\\@[\\!\\<\\>]?[0-9]+" + }, + { + "name": "support.type.property-name.modifier.css", + "match": "\\@[\\w\\-\\$]+" + }, + { + "name": "support.type.property-name.modifier.up.css", + "match": "\\.\\.[\\w\\-\\$]+" + }, + { + "name": "support.type.property-name.modifier.is.css", + "match": "\\.[\\w\\-\\$]+" + }, + { + "name": "support.type.property-name.css", + "match": "[\\w\\-\\$]+" + } + ] + } + ] + }, + "style-expr": { + "patterns": [ + { + "match": "(\\b[0-9][0-9_]*)(\\w+|%)?", + "captures": { + "1": { + "name": "constant.numeric.integer.decimal.css" + }, + "2": { + "name": "keyword.other.unit.css" + } + } + }, + { + "name": "support.constant.property-value.var.css", + "match": "--[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?" + }, + { + "name": "support.constant.property-value.size.css", + "match": "(x+s|sm-|md-|lg-|sm|md|lg|x+l|hg|x+h)(?![\\w-])" + }, + { + "name": "support.constant.property-value.css", + "match": "[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?" + }, + { + "name": "meta.function.css", + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.section.function.begin.bracket.round.css" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#style-expr" + } + ] + } + ] + }, + "inline-styles": { + "patterns": [ + { + "include": "#style-property" + }, + { + "include": "#css-property-values" + }, + { + "include": "#style-expr" + } + ] + }, + "style-declaration": { + "name": "meta.style.imba", + "begin": "^(\\t*)(?:(global|local|export)\\s+)?(?:(scoped)\\s+)?(css)\\s", + "beginCaptures": { + "2": { + "name": "keyword.control.export.imba" + }, + "3": { + "name": "storage.modifier.imba" + }, + "4": { + "name": "storage.type.style.imba" + } + }, + "end": "^(?!(\\1\\t|\\s*$))", + "patterns": [ + { + "include": "#css-selector" + }, + { + "include": "#css-comment" + }, + { + "include": "#nested-css-selector" + }, + { + "include": "#inline-styles" + } + ] + }, + "nested-style-declaration": { + "name": "meta.style.imba", + "begin": "^(\\t+)(?=[\\n^]*\\&)", + "end": "^(?!(\\1\\t|\\s*$))", + "patterns": [ + { + "include": "#nested-css-selector" + }, + { + "include": "#inline-styles" + } + ] + }, + "css-size-keywords": [ + { + "name": "support.constant.size.property-value.css", + "match": "(x+s|sm-|md-|lg-|sm|md|lg|x+l|hg|x+h)(?![\\w-])" + } + ], + "css-color-keywords": { + "patterns": [ + { + "name": "support.constant.color.w3c-standard-color-name.css", + "match": "(?i)(?>>|>>|>|\\+|~" + }, + { + "name": "keyword.other.parent-selector.css", + "match": "&" + } + ] + }, + "css-pseudo-classes": { + "name": "entity.other.attribute-name.pseudo-class.css", + "match": "(?xi)\n(:)(:*)\n(?: active|any-link|checked|default|defined|disabled|empty|enabled|first\n | (?:first|last|only)-(?:child|of-type)|focus|focus-visible|focus-within\n | fullscreen|host|hover|in-range|indeterminate|invalid|left|link\n | optional|out-of-range|placeholder-shown|read-only|read-write\n | required|right|root|scope|target|unresolved\n | valid|visited\n)(?![\\w-]|\\s*[;}])", + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + }, + "2": { + "name": "invalid.illegal.colon.css" + } + } + }, + "css-pseudo-elements": { + "name": "entity.other.attribute-name.pseudo-element.css", + "match": "(?xi)\n(?:\n (::?) # Elements using both : and :: notation\n (?: after\n | before\n | first-letter\n | first-line\n | (?:-(?:ah|apple|atsc|epub|hp|khtml|moz\n |ms|o|rim|ro|tc|wap|webkit|xv)\n | (?:mso|prince))\n -[a-z-]+\n )\n |\n (::) # Double-colon only\n (?: backdrop\n | content\n | grammar-error\n | marker\n | placeholder\n | selection\n | shadow\n | spelling-error\n )\n)\n(?![\\w-]|\\s*[;}])", + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + }, + "2": { + "name": "punctuation.definition.entity.css" + } + } + }, + "css-commas": { + "name": "punctuation.separator.list.comma.css", + "match": "," + }, + "css-comment": { + "patterns": [ + { + "name": "comment.line.imba", + "match": "\\#(\\s.+)?(\\n|$)" + }, + { + "name": "comment.line.imba", + "match": "(^\\t+)(\\#(\\s.+)?(\\n|$))" + } + ] + }, + "css-escapes": { + "patterns": [ + { + "name": "constant.character.escape.codepoint.css", + "match": "\\\\[0-9a-fA-F]{1,6}" + }, + { + "name": "constant.character.escape.newline.css", + "begin": "\\\\$\\s*", + "end": "^(?]?)?[\\w\\-\\$]+(?:[\\@\\.]+[\\!\\<\\>]?[\\w\\-\\$]+)*(?:\\s*\\:))", + "end": "(\\s*(?=(?:[\\@\\.]+[\\!\\<\\>]?)?[\\w\\-\\$]+(?:[\\@\\.]+[\\!\\<\\>]?[\\w\\-\\$]+)*(?:\\s*\\:))|\\s*$|(?=\\s+\\#\\s))", + "endCaptures": { + "0": { + "name": "punctuation.separator.sel-properties.css" + } + }, + "patterns": [ + { + "include": "#css-selector-innards" + } + ] + }, + "nested-css-selector": { + "name": "meta.selector.css", + "begin": "(^\\t+)(?!(?:[\\@\\.]+[\\!\\<\\>]?)?[\\w\\-\\$]+(?:[\\@\\.]+[\\!\\<\\>]?[\\w\\-\\$]+)*(?:\\s*\\:))", + "end": "(\\s*(?=(?:[\\@\\.]+[\\!\\<\\>]?)?[\\w\\-\\$]+(?:[\\@\\.]+[\\!\\<\\>]?[\\w\\-\\$]+)*(?:\\s*\\:))|\\s*$|(?=\\s+\\#\\s))", + "endCaptures": { + "0": { + "name": "punctuation.separator.sel-properties.css" + } + }, + "patterns": [ + { + "include": "#css-selector-innards" + } + ] + }, + "inline-css-selector": { + "name": "meta.selector.css", + "begin": "(^\\t+)(?!(?:[\\@\\.]+[\\!\\<\\>]?)?[\\w\\-\\$]+(?:[\\@\\.]+[\\!\\<\\>]?[\\w\\-\\$]+)*(?:\\s*\\:))", + "end": "(\\s*(?=(?:[\\@\\.]+[\\!\\<\\>]?)?[\\w\\-\\$]+(?:[\\@\\.]+[\\!\\<\\>]?[\\w\\-\\$]+)*(?:\\s*\\:)|\\)|\\])|\\s*$)", + "endCaptures": { + "0": { + "name": "punctuation.separator.sel-properties.css" + } + }, + "patterns": [ + { + "include": "#css-selector-innards" + } + ] + }, + "css-selector-innards": { + "patterns": [ + { + "include": "#css-commas" + }, + { + "include": "#css-escapes" + }, + { + "include": "#css-combinators" + }, + { + "name": "entity.name.tag.wildcard.css", + "match": "\\*" + }, + { + "name": "meta.attribute-selector.css", + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.entity.begin.bracket.square.css" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.entity.end.bracket.square.css" + } + }, + "patterns": [ + { + "include": "#string" + }, + { + "match": "(?<=[\"'\\s]|^|\\*/)\\s*([iI])\\s*(?=[\\s\\]]|/\\*|$)", + "captures": { + "1": { + "name": "storage.modifier.ignore-case.css" + } + } + }, + { + "match": "(?x)(?<==)\\s*((?!/\\*)(?:[^\\\\\"'\\s\\]]|\\\\.)+)", + "captures": { + "1": { + "name": "string.unquoted.attribute-value.css" + } + } + }, + { + "include": "#css-escapes" + }, + { + "name": "keyword.operator.pattern.css", + "match": "[~|^$*]?=" + }, + { + "name": "punctuation.separator.css", + "match": "\\|" + }, + { + "match": "(?x)\n# Qualified namespace prefix\n( -?(?!\\d)(?:[\\w-]|[^\\\\x00-\\\\x7F]|\\\\(?:[0-9a-fA-F]{1,6}|.))+\n| \\*\n)\n# Lookahead to ensure there's a valid identifier ahead\n(?=\n \\| (?!\\s|=|$|\\])\n (?: -?(?!\\d)\n | [\\\\\\w-]\n | [^\\\\x00-\\\\x7F]\n )\n)", + "captures": { + "1": { + "name": "entity.other.namespace-prefix.css" + } + } + }, + { + "match": "(?x)\n(-?(?!\\d)(?>[\\w-]|[^\\\\x00-\\\\x7F]|\\\\(?:[0-9a-fA-F]{1,6}|.))+)\n\\s*\n(?=[~|^\\]$*=]|/\\*)", + "captures": { + "1": { + "name": "entity.other.attribute-name.css" + } + } + } + ] + }, + { + "include": "#css-pseudo-classes" + }, + { + "include": "#css-pseudo-elements" + } + ] + }, + "css-property-values": { + "patterns": [ + { + "include": "#css-commas" + }, + { + "include": "#css-escapes" + }, + { + "include": "#css-functions" + }, + { + "include": "#css-numeric-values" + }, + { + "include": "#css-size-keywords" + }, + { + "include": "#css-color-keywords" + }, + { + "include": "#string" + }, + { + "name": "keyword.other.important.css", + "match": "!\\s*important(?![\\w-])" + } + ] + }, + "tag-literal": { + "patterns": [ + { + "name": "meta.tag.imba", + "begin": "(<)(?=[\\w\\{\\[\\.\\#\\$\\@])", + "beginCaptures": { + "1": { + "name": "punctuation.section.tag.open.imba" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "punctuation.section.tag.close.imba" + } + }, + "patterns": [ + { + "include": "#tag-content" + } + ], + "contentName": "meta.tag.attributes.imba" + } + ] + }, + "tag-content": { + "patterns": [ + { + "include": "#tag-name" + }, + { + "include": "#tag-expr-name" + }, + { + "include": "#tag-interpolated-content" + }, + { + "include": "#tag-interpolated-parens" + }, + { + "include": "#tag-interpolated-brackets" + }, + { + "include": "#tag-event-handler" + }, + { + "include": "#tag-classname" + }, + { + "include": "#tag-ref" + }, + { + "include": "#tag-attr-value" + }, + { + "include": "#tag-attr-name" + }, + { + "include": "#comment" + } + ] + }, + "tag-name": { + "patterns": [ + { + "name": "entity.name.tag.special.imba", + "match": "(?<=<)(self|global|slot)(?=[\\.\\[\\>\\s\\(])" + } + ] + }, + "tag-expr-name": { + "begin": "(?<=<)(?=[\\w\\{])", + "contentName": "entity.name.tag.imba", + "end": "(?=[\\.\\[\\>\\s\\(])", + "patterns": [ + { + "include": "#tag-interpolated-content" + } + ] + }, + "tag-interpolated-content": { + "name": "meta.tag.expression.imba", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.tag.imba" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.tag.imba" + } + }, + "patterns": [ + { + "include": "#expression" + } + ], + "contentName": "meta.embedded.line.imba" + }, + "tag-interpolated-parens": { + "name": "meta.tag.expression.imba", + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.tag.imba" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.tag.imba" + } + }, + "patterns": [ + { + "include": "#expression" + } + ], + "contentName": "meta.embedded.line.imba" + }, + "tag-interpolated-brackets": { + "name": "meta.tag.expression.imba", + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.tag.imba" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.section.tag.imba" + } + }, + "patterns": [ + { + "include": "#inline-css-selector" + }, + { + "include": "#inline-styles" + } + ], + "contentName": "meta.embedded.line.imba" + }, + "tag-classname": { + "begin": "\\.", + "patterns": [ + { + "include": "#tag-interpolated-content" + } + ], + "end": "(?=[\\.\\[\\>\\s\\(\\=])", + "contentName": "entity.other.attribute-name.class.css" + }, + "tag-ref": { + "match": "(\\$[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?)", + "name": "entity.other.attribute-name.reference.css" + }, + "tag-event-handler": { + "begin": "(\\@[\\w$_]+(?:\\-[\\w$_]+)*)", + "beginCaptures": { + "0": { + "name": "entity.other.event-name.imba" + } + }, + "patterns": [ + { + "include": "#tag-interpolated-content" + }, + { + "include": "#tag-interpolated-parens" + }, + { + "name": "entity.other.event-modifier.imba", + "begin": "\\.", + "beginCaptures": { + "0": { + "name": "punctuation.section.tag" + } + }, + "patterns": [ + { + "include": "#tag-interpolated-parens" + }, + { + "include": "#tag-interpolated-content" + } + ], + "end": "(?=[\\.\\[\\>\\s\\=]|$)" + } + ], + "end": "(?=[\\[\\>\\s\\=])", + "contentName": "entity.other.tag.event" + }, + "tag-attr-name": { + "begin": "([\\w$_]+(?:\\-[\\w$_]+)*)", + "beginCaptures": { + "0": { + "name": "entity.other.attribute-name.imba" + } + }, + "end": "(?=[\\s\\.\\[\\>\\=])", + "contentName": "entity.other.attribute-name.imba" + }, + "tag-attr-value": { + "begin": "(\\=)", + "beginCaptures": { + "0": { + "name": "keyword.operator.tag.assignment" + } + }, + "end": "(?=>|\\s)", + "contentName": "meta.tag.attribute-value.imba", + "patterns": [ + { + "include": "#expr" + } + ] + }, + "expression": { + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.imba" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.imba" + } + }, + "patterns": [ + { + "include": "#expr" + } + ] + }, + { + "include": "#tag-literal" + }, + { + "include": "#expressionWithoutIdentifiers" + }, + { + "include": "#identifiers" + }, + { + "include": "#expressionPunctuations" + } + ] + }, + "expressionWithoutIdentifiers": { + "patterns": [ + { + "include": "#string" + }, + { + "include": "#regex" + }, + { + "include": "#comment" + }, + { + "include": "#function-expression" + }, + { + "include": "#class-expression" + }, + { + "include": "#ternary-expression" + }, + { + "include": "#new-expr" + }, + { + "include": "#instanceof-expr" + }, + { + "include": "#object-literal" + }, + { + "include": "#expression-operators" + }, + { + "include": "#literal" + }, + { + "include": "#support-objects" + } + ] + }, + "expressionPunctuations": { + "patterns": [ + { + "include": "#punctuation-comma" + }, + { + "include": "#punctuation-accessor" + } + ] + }, + "decorator": { + "name": "meta.decorator.imba", + "begin": "(?", + "patterns": [ + { + "include": "#type-brackets" + } + ] + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#type-brackets" + } + ] + } + ] + }, + "numeric-literal": { + "patterns": [ + { + "name": "constant.numeric.hex.imba", + "match": "\\b(?|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([gimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.imba" + } + }, + "end": "(/)([gimsuy]*)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.imba" + }, + "2": { + "name": "keyword.other.imba" + } + }, + "patterns": [ + { + "include": "#regexp" + } + ] + }, + { + "name": "string.regexp.imba", + "begin": "((?", + "captures": { + "0": { + "name": "keyword.other.back-reference.regexp" + }, + "1": { + "name": "variable.other.regexp" + } + } + }, + { + "name": "keyword.operator.quantifier.regexp", + "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??" + }, + { + "name": "keyword.operator.or.regexp", + "match": "\\|" + }, + { + "name": "meta.group.assertion.regexp", + "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?))?", + "beginCaptures": { + "0": { + "name": "punctuation.definition.group.regexp" + }, + "1": { + "name": "punctuation.definition.group.no-capture.regexp" + }, + "2": { + "name": "variable.other.regexp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.group.regexp" + } + }, + "patterns": [ + { + "include": "#regexp" + } + ] + }, + { + "name": "constant.other.character-class.set.regexp", + "begin": "(\\[)(\\^)?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.character-class.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + } + }, + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.definition.character-class.regexp" + } + }, + "patterns": [ + { + "name": "constant.other.character-class.range.regexp", + "match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))", + "captures": { + "1": { + "name": "constant.character.numeric.regexp" + }, + "2": { + "name": "constant.character.control.regexp" + }, + "3": { + "name": "constant.character.escape.backslash.regexp" + }, + "4": { + "name": "constant.character.numeric.regexp" + }, + "5": { + "name": "constant.character.control.regexp" + }, + "6": { + "name": "constant.character.escape.backslash.regexp" + } + } + }, + { + "include": "#regex-character-class" + } + ] + }, + { + "include": "#regex-character-class" + } + ] + }, + "regex-character-class": { + "patterns": [ + { + "name": "constant.other.character-class.regexp", + "match": "\\\\[wWsSdDtrnvf]|\\." + }, + { + "name": "constant.character.numeric.regexp", + "match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})" + }, + { + "name": "constant.character.control.regexp", + "match": "\\\\c[A-Z]" + }, + { + "name": "constant.character.escape.backslash.regexp", + "match": "\\\\." + } + ] + }, + "comment": { + "patterns": [ + { + "name": "comment.block.documentation.imba", + "begin": "/\\*\\*(?!/)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.imba" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.imba" + } + }, + "patterns": [ + { + "include": "#docblock" + } + ] + }, + { + "name": "comment.block.imba", + "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.imba" + }, + "2": { + "name": "storage.type.internaldeclaration.imba" + }, + "3": { + "name": "punctuation.decorator.internaldeclaration.imba" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.imba" + } + } + }, + { + "name": "comment.block.imba", + "begin": "(###)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.imba" + } + }, + "end": "###(?:[ \\t]*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.imba" + } + } + }, + { + "begin": "(^[ \\t]+)?((//|\\#\\s)(?:\\s*((@)internal)(?=\\s|$))?)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.imba" + }, + "2": { + "name": "comment.line.double-slash.imba" + }, + "3": { + "name": "punctuation.definition.comment.imba" + }, + "4": { + "name": "storage.type.internaldeclaration.imba" + }, + "5": { + "name": "punctuation.decorator.internaldeclaration.imba" + } + }, + "end": "(?=$)", + "contentName": "comment.line.double-slash.imba" + } + ] + }, + "single-line-comment-consuming-line-ending": { + "begin": "(^[ \\t]+)?((//|\\#\\s)(?:\\s*((@)internal)(?=\\s|$))?)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.imba" + }, + "2": { + "name": "comment.line.double-slash.imba" + }, + "3": { + "name": "punctuation.definition.comment.imba" + }, + "4": { + "name": "storage.type.internaldeclaration.imba" + }, + "5": { + "name": "punctuation.decorator.internaldeclaration.imba" + } + }, + "end": "(?=^)", + "contentName": "comment.line.double-slash.imba" + }, + "directives": { + "name": "comment.line.triple-slash.directive.imba", + "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.imba" + } + }, + "end": "(?=$)", + "patterns": [ + { + "name": "meta.tag.imba", + "begin": "(<)(reference|amd-dependency|amd-module)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.directive.imba" + }, + "2": { + "name": "entity.name.tag.directive.imba" + } + }, + "end": "/>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.directive.imba" + } + }, + "patterns": [ + { + "name": "entity.other.attribute-name.directive.imba", + "match": "path|types|no-default-lib|lib|name" + }, + { + "name": "keyword.operator.assignment.imba", + "match": "=" + }, + { + "include": "#string" + } + ] + } + ] + }, + "docblock": { + "patterns": [ + { + "match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "constant.language.access-type.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "entity.name.type.instance.jsdoc" + }, + "4": { + "name": "punctuation.definition.bracket.angle.begin.jsdoc" + }, + "5": { + "name": "constant.other.email.link.underline.jsdoc" + }, + "6": { + "name": "punctuation.definition.bracket.angle.end.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # \n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # ", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "entity.name.type.instance.jsdoc" + }, + "4": { + "name": "keyword.operator.control.jsdoc" + }, + "5": { + "name": "entity.name.type.instance.jsdoc" + } + } + }, + { + "name": "meta.example.jsdoc", + "begin": "((@)example)\\s+", + "end": "(?=@|\\*/)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "patterns": [ + { + "match": "^\\s\\*\\s+" + }, + { + "contentName": "constant.other.description.jsdoc", + "begin": "\\G(<)caption(>)", + "beginCaptures": { + "0": { + "name": "entity.name.tag.inline.jsdoc" + }, + "1": { + "name": "punctuation.definition.bracket.angle.begin.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.angle.end.jsdoc" + } + }, + "end": "()|(?=\\*/)", + "endCaptures": { + "0": { + "name": "entity.name.tag.inline.jsdoc" + }, + "1": { + "name": "punctuation.definition.bracket.angle.begin.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.angle.end.jsdoc" + } + } + }, + { + "match": "[^\\s@*](?:[^*]|\\*[^/])*", + "captures": { + "0": { + "name": "source.embedded.imba" + } + } + } + ] + }, + { + "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "constant.language.symbol-type.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!\n # Avoid matching bare URIs (also acceptable as links)\n https?://\n |\n # Avoid matching {@inline tags}; we match those below\n (?:\\[[^\\[\\]]*\\])? # Possible description [preceding]{@tag}\n {@(?:link|linkcode|linkplain|tutorial)\\b\n )\n # Matched namepath\n (?:[^@\\s*/]|\\*[^/])+\n )\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.link.underline.jsdoc" + }, + "4": { + "name": "entity.name.type.instance.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)template)\n\\s+\n# One or more valid identifiers\n(\n [A-Za-z_$] # First character: non-numeric word character\n [\\w$.\\[\\]]* # Rest of identifier\n (?: # Possible list of additional identifiers\n \\s* , \\s*\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n )*\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + } + } + }, + { + "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + } + } + }, + { + "begin": "((@)typedef)\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + }, + { + "name": "entity.name.type.instance.jsdoc", + "match": "(?:[^@\\s*/]|\\*[^/])+" + } + ] + }, + { + "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + }, + { + "name": "variable.other.jsdoc", + "match": "([A-Za-z_$][\\w$.\\[\\]]*)" + }, + { + "name": "variable.other.jsdoc", + "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[ ].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?>\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])* # Everything else\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))", + "captures": { + "1": { + "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc" + }, + "2": { + "name": "keyword.operator.assignment.jsdoc" + }, + "3": { + "name": "source.embedded.imba" + }, + "4": { + "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc" + }, + "5": { + "name": "invalid.illegal.syntax.jsdoc" + } + } + } + ] + }, + { + "begin": "(?x)\n(\n (@)\n (?:define|enum|exception|export|extends|lends|implements|modifies\n |namespace|private|protected|returns?|suppress|this|throws|type\n |yields?)\n)\n\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + } + ] + }, + { + "match": "(?x)\n(\n (@)\n (?:alias|augments|callback|constructs|emits|event|fires|exports?\n |extends|external|function|func|host|lends|listens|interface|memberof!?\n |method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "entity.name.type.instance.jsdoc" + } + } + }, + { + "contentName": "variable.other.jsdoc", + "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + }, + "4": { + "name": "punctuation.definition.string.begin.jsdoc" + } + }, + "end": "(\\3)|(?=$|\\*/)", + "endCaptures": { + "0": { + "name": "variable.other.jsdoc" + }, + "1": { + "name": "punctuation.definition.string.end.jsdoc" + } + } + }, + { + "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + } + } + }, + { + "name": "storage.type.class.jsdoc", + "match": "(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \\b", + "captures": { + "1": { + "name": "punctuation.definition.block.tag.jsdoc" + } + } + }, + { + "include": "#inline-tags" + }, + { + "match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?))(?=\\s+)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + } + } + ] + }, + "brackets": { + "patterns": [ + { + "begin": "{", + "end": "}|(?=\\*/)", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\[", + "end": "\\]|(?=\\*/)", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "inline-tags": { + "patterns": [ + { + "name": "constant.other.description.jsdoc", + "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))", + "captures": { + "1": { + "name": "punctuation.definition.bracket.square.begin.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.square.end.jsdoc" + } + } + }, + { + "name": "entity.name.type.instance.jsdoc", + "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*", + "beginCaptures": { + "1": { + "name": "punctuation.definition.bracket.curly.begin.jsdoc" + }, + "2": { + "name": "storage.type.class.jsdoc" + }, + "3": { + "name": "punctuation.definition.inline.tag.jsdoc" + } + }, + "end": "}|(?=\\*/)", + "endCaptures": { + "0": { + "name": "punctuation.definition.bracket.curly.end.jsdoc" + } + }, + "patterns": [ + { + "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?", + "captures": { + "1": { + "name": "variable.other.link.underline.jsdoc" + }, + "2": { + "name": "punctuation.separator.pipe.jsdoc" + } + } + }, + { + "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?", + "captures": { + "1": { + "name": "variable.other.description.jsdoc" + }, + "2": { + "name": "punctuation.separator.pipe.jsdoc" + } + } + } + ] + } + ] + }, + "jsdoctype": { + "patterns": [ + { + "name": "invalid.illegal.type.jsdoc", + "match": "\\G{(?:[^}*]|\\*[^/}])+$" + }, + { + "contentName": "entity.name.type.instance.jsdoc", + "begin": "\\G({)", + "beginCaptures": { + "0": { + "name": "entity.name.type.instance.jsdoc" + }, + "1": { + "name": "punctuation.definition.bracket.curly.begin.jsdoc" + } + }, + "end": "((}))\\s*|(?=\\*/)", + "endCaptures": { + "1": { + "name": "entity.name.type.instance.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.curly.end.jsdoc" + } + }, + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + } + } +} diff --git a/src/lib/shiki/languages/ini.tmLanguage.json b/src/lib/shiki/languages/ini.tmLanguage.json new file mode 100644 index 0000000..3a38fb4 --- /dev/null +++ b/src/lib/shiki/languages/ini.tmLanguage.json @@ -0,0 +1,113 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/ini.tmbundle/blob/master/Syntaxes/Ini.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/textmate/ini.tmbundle/commit/2af0cbb0704940f967152616f2f1ff0aae6287a6", + "name": "ini", + "scopeName": "source.ini", + "patterns": [ + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.ini" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.ini" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.ini" + } + ] + }, + { + "begin": "(^[ \\t]+)?(?=;)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.ini" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": ";", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.ini" + } + }, + "end": "\\n", + "name": "comment.line.semicolon.ini" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.other.definition.ini" + }, + "2": { + "name": "punctuation.separator.key-value.ini" + } + }, + "match": "\\b([a-zA-Z0-9_.-]+)\\b\\s*(=)" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.ini" + }, + "3": { + "name": "punctuation.definition.entity.ini" + } + }, + "match": "^(\\[)(.*?)(\\])", + "name": "entity.name.section.group-title.ini" + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ini" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ini" + } + }, + "name": "string.quoted.single.ini", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.ini" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ini" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ini" + } + }, + "name": "string.quoted.double.ini" + } + ] +} diff --git a/src/lib/shiki/languages/java.tmLanguage.json b/src/lib/shiki/languages/java.tmLanguage.json new file mode 100644 index 0000000..62c7e09 --- /dev/null +++ b/src/lib/shiki/languages/java.tmLanguage.json @@ -0,0 +1,1894 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/redhat-developer/vscode-java/blob/master/language-support/java/java.tmLanguage.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/redhat-developer/vscode-java/commit/5fb57e8e1c5d776b21be13cd7227b25b87edf4a6", + "name": "java", + "scopeName": "source.java", + "patterns": [ + { + "begin": "\\b(package)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.other.package.java" + } + }, + "end": "\\s*(;)", + "endCaptures": { + "1": { + "name": "punctuation.terminator.java" + } + }, + "name": "meta.package.java", + "contentName": "storage.modifier.package.java", + "patterns": [ + { + "include": "#comments" + }, + { + "match": "(?<=\\.)\\s*\\.|\\.(?=\\s*;)", + "name": "invalid.illegal.character_not_allowed_here.java" + }, + { + "match": "(?", + "endCaptures": { + "0": { + "name": "punctuation.bracket.angle.java" + } + }, + "patterns": [ + { + "match": "\\b(extends|super)\\b", + "name": "storage.modifier.$1.java" + }, + { + "match": "(?>>?|~|\\^)", + "name": "keyword.operator.bitwise.java" + }, + { + "match": "((&|\\^|\\||<<|>>>?)=)", + "name": "keyword.operator.assignment.bitwise.java" + }, + { + "match": "(===?|!=|<=|>=|<>|<|>)", + "name": "keyword.operator.comparison.java" + }, + { + "match": "([+*/%-]=)", + "name": "keyword.operator.assignment.arithmetic.java" + }, + { + "match": "(=)", + "name": "keyword.operator.assignment.java" + }, + { + "match": "(\\-\\-|\\+\\+)", + "name": "keyword.operator.increment-decrement.java" + }, + { + "match": "(\\-|\\+|\\*|\\/|%)", + "name": "keyword.operator.arithmetic.java" + }, + { + "match": "(!|&&|\\|\\|)", + "name": "keyword.operator.logical.java" + }, + { + "match": "(\\||&)", + "name": "keyword.operator.bitwise.java" + }, + { + "match": "\\b(const|goto)\\b", + "name": "keyword.reserved.java" + } + ] + }, + "lambda-expression": { + "patterns": [ + { + "match": "->", + "name": "storage.type.function.arrow.java" + } + ] + }, + "member-variables": { + "begin": "(?=private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final)", + "end": "(?=\\=|;)", + "patterns": [ + { + "include": "#storage-modifiers" + }, + { + "include": "#variables" + }, + { + "include": "#primitive-arrays" + }, + { + "include": "#object-types" + } + ] + }, + "method-call": { + "begin": "(\\.)\\s*([A-Za-z_$][\\w$]*)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.separator.period.java" + }, + "2": { + "name": "entity.name.function.java" + }, + "3": { + "name": "punctuation.definition.parameters.begin.bracket.round.java" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.java" + } + }, + "name": "meta.method-call.java", + "patterns": [ + { + "include": "#code" + } + ] + }, + "methods": { + "begin": "(?!new)(?=[\\w<].*\\s+)(?=([^=/]|/(?!/))+\\()", + "end": "(})|(?=;)", + "endCaptures": { + "1": { + "name": "punctuation.section.method.end.bracket.curly.java" + } + }, + "name": "meta.method.java", + "patterns": [ + { + "include": "#storage-modifiers" + }, + { + "begin": "(\\w+)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.java" + }, + "2": { + "name": "punctuation.definition.parameters.begin.bracket.round.java" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.java" + } + }, + "name": "meta.method.identifier.java", + "patterns": [ + { + "include": "#parameters" + }, + { + "include": "#parens" + }, + { + "include": "#comments" + } + ] + }, + { + "include": "#generics" + }, + { + "begin": "(?=\\w.*\\s+\\w+\\s*\\()", + "end": "(?=\\s+\\w+\\s*\\()", + "name": "meta.method.return-type.java", + "patterns": [ + { + "include": "#all-types" + }, + { + "include": "#parens" + }, + { + "include": "#comments" + } + ] + }, + { + "include": "#throws" + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.method.begin.bracket.curly.java" + } + }, + "end": "(?=})", + "contentName": "meta.method.body.java", + "patterns": [ + { + "include": "#code" + } + ] + }, + { + "include": "#comments" + } + ] + }, + "module": { + "begin": "((open)\\s)?(module)\\s+(\\w+)", + "end": "}", + "beginCaptures": { + "1": { + "name": "storage.modifier.java" + }, + "3": { + "name": "storage.modifier.java" + }, + "4": { + "name": "entity.name.type.module.java" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.module.end.bracket.curly.java" + } + }, + "name": "meta.module.java", + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.module.begin.bracket.curly.java" + } + }, + "end": "(?=})", + "contentName": "meta.module.body.java", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#comments-javadoc" + }, + { + "match": "\\b(requires|transitive|exports|opens|to|uses|provides|with)\\b", + "name": "keyword.module.java" + } + ] + } + ] + }, + "numbers": { + "patterns": [ + { + "match": "(?x)\n\\b(?)?(\\()", + "beginCaptures": { + "1": { + "name": "storage.modifier.java" + }, + "2": { + "name": "entity.name.type.record.java" + }, + "3": { + "patterns": [ + { + "include": "#generics" + } + ] + }, + "4": { + "name": "punctuation.definition.parameters.begin.bracket.round.java" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.java" + } + }, + "name": "meta.record.identifier.java", + "patterns": [ + { + "include": "#code" + } + ] + }, + { + "begin": "(implements)\\s", + "beginCaptures": { + "1": { + "name": "storage.modifier.implements.java" + } + }, + "end": "(?=\\s*\\{)", + "name": "meta.definition.class.implemented.interfaces.java", + "patterns": [ + { + "include": "#object-types-inherited" + }, + { + "include": "#comments" + } + ] + }, + { + "include": "#record-body" + } + ] + }, + "record-body": { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.class.begin.bracket.curly.java" + } + }, + "end": "(?=})", + "name": "meta.record.body.java", + "patterns": [ + { + "include": "#record-constructor" + }, + { + "include": "#class-body" + } + ] + }, + "record-constructor": { + "begin": "(?!new)(?=[\\w<].*\\s+)(?=([^\\(=/]|/(?!/))+(?={))", + "end": "(})|(?=;)", + "endCaptures": { + "1": { + "name": "punctuation.section.method.end.bracket.curly.java" + } + }, + "name": "meta.method.java", + "patterns": [ + { + "include": "#storage-modifiers" + }, + { + "begin": "(\\w+)", + "beginCaptures": { + "1": { + "name": "entity.name.function.java" + } + }, + "end": "(?=\\s*{)", + "name": "meta.method.identifier.java", + "patterns": [ + { + "include": "#comments" + } + ] + }, + { + "include": "#comments" + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.method.begin.bracket.curly.java" + } + }, + "end": "(?=})", + "contentName": "meta.method.body.java", + "patterns": [ + { + "include": "#code" + } + ] + } + ] + }, + "static-initializer": { + "patterns": [ + { + "include": "#anonymous-block-and-instance-initializer" + }, + { + "match": "static", + "name": "storage.modifier.java" + } + ] + }, + "storage-modifiers": { + "match": "\\b(public|private|protected|static|final|native|synchronized|abstract|threadsafe|transient|volatile|default|strictfp|sealed|non-sealed)\\b", + "name": "storage.modifier.java" + }, + "strings": { + "patterns": [ + { + "begin": "\"\"\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.java" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.java" + } + }, + "name": "string.quoted.triple.java", + "patterns": [ + { + "match": "\\\\\"\"\"", + "name": "constant.character.escape.java" + }, + { + "match": "\\\\.", + "name": "constant.character.escape.java" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.java" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.java" + } + }, + "name": "string.quoted.double.java", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.java" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.java" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.java" + } + }, + "name": "string.quoted.single.java", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.java" + } + ] + } + ] + }, + "throws": { + "begin": "throws", + "beginCaptures": { + "0": { + "name": "storage.modifier.java" + } + }, + "end": "(?={|;)", + "name": "meta.throwables.java", + "patterns": [ + { + "match": ",", + "name": "punctuation.separator.delimiter.java" + }, + { + "match": "[a-zA-Z$_][\\.a-zA-Z0-9$_]*", + "name": "storage.type.java" + }, + { + "include": "#comments" + } + ] + }, + "try-catch-finally": { + "patterns": [ + { + "begin": "\\btry\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.try.java" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.try.end.bracket.curly.java" + } + }, + "name": "meta.try.java", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.try.resources.begin.bracket.round.java" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.try.resources.end.bracket.round.java" + } + }, + "name": "meta.try.resources.java", + "patterns": [ + { + "include": "#code" + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.try.begin.bracket.curly.java" + } + }, + "end": "(?=})", + "contentName": "meta.try.body.java", + "patterns": [ + { + "include": "#code" + } + ] + } + ] + }, + { + "begin": "\\b(catch)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.catch.java" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.catch.end.bracket.curly.java" + } + }, + "name": "meta.catch.java", + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.parameters.begin.bracket.round.java" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.java" + } + }, + "contentName": "meta.catch.parameters.java", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#storage-modifiers" + }, + { + "begin": "[a-zA-Z$_][\\.a-zA-Z0-9$_]*", + "beginCaptures": { + "0": { + "name": "storage.type.java" + } + }, + "end": "(\\|)|(?=\\))", + "endCaptures": { + "1": { + "name": "punctuation.catch.separator.java" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "match": "\\w+", + "captures": { + "0": { + "name": "variable.parameter.java" + } + } + } + ] + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.catch.begin.bracket.curly.java" + } + }, + "end": "(?=})", + "contentName": "meta.catch.body.java", + "patterns": [ + { + "include": "#code" + } + ] + } + ] + }, + { + "begin": "\\bfinally\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.finally.java" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.finally.end.bracket.curly.java" + } + }, + "name": "meta.finally.java", + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.finally.begin.bracket.curly.java" + } + }, + "end": "(?=})", + "contentName": "meta.finally.body.java", + "patterns": [ + { + "include": "#code" + } + ] + } + ] + } + ] + }, + "variables": { + "begin": "(?x)\n(?=\n \\b\n (\n (void|boolean|byte|char|short|int|float|long|double)\n |\n (?>(\\w+\\.)*[A-Z_]+\\w*) # e.g. `javax.ws.rs.Response`, or `String`\n )\n \\b\n \\s*\n (\n <[\\w<>,\\.?\\s\\[\\]]*> # e.g. `HashMap`, or `List`\n )?\n \\s*\n (\n (\\[\\])* # int[][]\n )?\n \\s+\n [A-Za-z_$][\\w$]* # At least one identifier after space\n ([\\w\\[\\],$][\\w\\[\\],\\s]*)? # possibly primitive array or additional identifiers\n \\s*(=|:|;)\n)", + "end": "(?=\\=|:|;)", + "name": "meta.definition.variable.java", + "patterns": [ + { + "match": "([A-Za-z$_][\\w$]*)(?=\\s*(\\[\\])*\\s*(;|:|=|,))", + "captures": { + "1": { + "name": "variable.other.definition.java" + } + } + }, + { + "include": "#all-types" + }, + { + "include": "#code" + } + ] + }, + "variables-local": { + "begin": "(?=\\b(var)\\b\\s+[A-Za-z_$][\\w$]*\\s*(=|:|;))", + "end": "(?=\\=|:|;)", + "name": "meta.definition.variable.local.java", + "patterns": [ + { + "match": "\\bvar\\b", + "name": "storage.type.local.java" + }, + { + "match": "([A-Za-z$_][\\w$]*)(?=\\s*(\\[\\])*\\s*(=|:|;))", + "captures": { + "1": { + "name": "variable.other.definition.java" + } + } + }, + { + "include": "#code" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/javascript.tmLanguage.json b/src/lib/shiki/languages/javascript.tmLanguage.json new file mode 100644 index 0000000..6917aa9 --- /dev/null +++ b/src/lib/shiki/languages/javascript.tmLanguage.json @@ -0,0 +1,5989 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/8c7482b94b548eab56da64dbfb30b82589b3f747", + "name": "javascript", + "scopeName": "source.js", + "patterns": [ + { + "include": "#directives" + }, + { + "include": "#statements" + }, + { + "include": "#shebang" + } + ], + "repository": { + "shebang": { + "name": "comment.line.shebang.js", + "match": "\\A(#!).*(?=$)", + "captures": { + "1": { + "name": "punctuation.definition.comment.js" + } + } + }, + "statements": { + "patterns": [ + { + "include": "#declaration" + }, + { + "include": "#control-statement" + }, + { + "include": "#after-operator-block-as-object-literal" + }, + { + "include": "#decl-block" + }, + { + "include": "#label" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-semicolon" + }, + { + "include": "#string" + }, + { + "include": "#comment" + } + ] + }, + "declaration": { + "patterns": [ + { + "include": "#decorator" + }, + { + "include": "#var-expr" + }, + { + "include": "#function-declaration" + }, + { + "include": "#class-declaration" + }, + { + "include": "#interface-declaration" + }, + { + "include": "#enum-declaration" + }, + { + "include": "#namespace-declaration" + }, + { + "include": "#type-alias-declaration" + }, + { + "include": "#import-equals-declaration" + }, + { + "include": "#import-declaration" + }, + { + "include": "#export-declaration" + }, + { + "name": "storage.modifier.js", + "match": "(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "beginCaptures": { + "1": { + "name": "meta.definition.variable.js entity.name.function.js" + }, + "2": { + "name": "keyword.operator.definiteassignment.js" + } + }, + "end": "(?=$|^|[;,=}]|((?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "beginCaptures": { + "1": { + "name": "meta.definition.variable.js variable.other.constant.js entity.name.function.js" + } + }, + "end": "(?=$|^|[;,=}]|((?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "1": { + "name": "storage.modifier.js" + }, + "2": { + "name": "keyword.operator.rest.js" + }, + "3": { + "name": "entity.name.function.js variable.language.this.js" + }, + "4": { + "name": "entity.name.function.js" + }, + "5": { + "name": "keyword.operator.optional.js" + } + } + }, + { + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "1": { + "name": "meta.definition.property.js entity.name.function.js" + }, + "2": { + "name": "keyword.operator.optional.js" + }, + "3": { + "name": "keyword.operator.definiteassignment.js" + } + } + }, + { + "name": "meta.definition.property.js variable.object.property.js", + "match": "\\#?[_$[:alpha:]][_$[:alnum:]]*" + }, + { + "name": "keyword.operator.optional.js", + "match": "\\?" + }, + { + "name": "keyword.operator.definiteassignment.js", + "match": "\\!" + } + ] + }, + "variable-initializer": { + "patterns": [ + { + "begin": "(?\\s*$)", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.js" + } + }, + "end": "(?=$|^|[,);}\\]]|((?]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", + "beginCaptures": { + "1": { + "name": "storage.modifier.js" + }, + "2": { + "name": "storage.modifier.js" + }, + "3": { + "name": "storage.modifier.js" + }, + "4": { + "name": "storage.modifier.async.js" + }, + "5": { + "name": "keyword.operator.new.js" + }, + "6": { + "name": "keyword.generator.asterisk.js" + } + }, + "end": "(?=\\}|;|,|$)|(?<=\\})", + "patterns": [ + { + "include": "#method-declaration-name" + }, + { + "include": "#function-body" + } + ] + }, + { + "name": "meta.method.declaration.js", + "begin": "(?x)(?]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", + "beginCaptures": { + "1": { + "name": "storage.modifier.js" + }, + "2": { + "name": "storage.modifier.js" + }, + "3": { + "name": "storage.modifier.js" + }, + "4": { + "name": "storage.modifier.async.js" + }, + "5": { + "name": "storage.type.property.js" + }, + "6": { + "name": "keyword.generator.asterisk.js" + } + }, + "end": "(?=\\}|;|,|$)|(?<=\\})", + "patterns": [ + { + "include": "#method-declaration-name" + }, + { + "include": "#function-body" + } + ] + } + ] + }, + "object-literal-method-declaration": { + "name": "meta.method.declaration.js", + "begin": "(?x)(?]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.js" + }, + "2": { + "name": "storage.type.property.js" + }, + "3": { + "name": "keyword.generator.asterisk.js" + } + }, + "end": "(?=\\}|;|,)|(?<=\\})", + "patterns": [ + { + "include": "#method-declaration-name" + }, + { + "include": "#function-body" + }, + { + "begin": "(?x)(?]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.js" + }, + "2": { + "name": "storage.type.property.js" + }, + "3": { + "name": "keyword.generator.asterisk.js" + } + }, + "end": "(?=\\(|\\<)", + "patterns": [ + { + "include": "#method-declaration-name" + } + ] + } + ] + }, + "method-declaration-name": { + "begin": "(?x)(?=((\\b(?)", + "captures": { + "1": { + "name": "storage.modifier.async.js" + }, + "2": { + "name": "variable.parameter.js" + } + } + }, + { + "name": "meta.arrow.js", + "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.js" + } + }, + "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-parameters" + }, + { + "include": "#function-parameters" + }, + { + "include": "#arrow-return-type" + }, + { + "include": "#possibly-arrow-return-type" + } + ] + }, + { + "name": "meta.arrow.js", + "begin": "=>", + "beginCaptures": { + "0": { + "name": "storage.type.function.arrow.js" + } + }, + "end": "((?<=\\}|\\S)(?)|((?!\\{)(?=\\S)))(?!\\/[\\/\\*])", + "patterns": [ + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#decl-block" + }, + { + "include": "#expression" + } + ] + } + ] + }, + "indexer-declaration": { + "name": "meta.indexer.declaration.js", + "begin": "(?:(?]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.block.js" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.js" + } + }, + "patterns": [ + { + "include": "#object-member" + } + ] + }, + "object-literal": { + "name": "meta.objectliteral.js", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.js" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.js" + } + }, + "patterns": [ + { + "include": "#object-member" + } + ] + }, + "object-member": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#object-literal-method-declaration" + }, + { + "name": "meta.object.member.js meta.object-literal.key.js", + "begin": "(?=\\[)", + "end": "(?=:)|((?<=[\\]])(?=\\s*[\\(\\<]))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#array-literal" + } + ] + }, + { + "name": "meta.object.member.js meta.object-literal.key.js", + "begin": "(?=[\\'\\\"\\`])", + "end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\s+(as|satisifies)\\s+))))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + } + ] + }, + { + "name": "meta.object.member.js meta.object-literal.key.js", + "begin": "(?x)(?=(\\b(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "0": { + "name": "meta.object-literal.key.js" + }, + "1": { + "name": "entity.name.function.js" + } + } + }, + { + "name": "meta.object.member.js", + "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)", + "captures": { + "0": { + "name": "meta.object-literal.key.js" + } + } + }, + { + "name": "meta.object.member.js", + "begin": "\\.\\.\\.", + "beginCaptures": { + "0": { + "name": "keyword.operator.spread.js" + } + }, + "end": "(?=,|\\})", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "meta.object.member.js", + "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$|\\/\\/|\\/\\*)", + "captures": { + "1": { + "name": "variable.other.readwrite.js" + } + } + }, + { + "name": "meta.object.member.js", + "match": "(?]|\\|\\||\\&\\&|\\!\\=\\=|$|^|((?]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.js" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#type-parameters" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.js" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.js" + } + }, + "patterns": [ + { + "include": "#expression-inside-possibly-arrow-parens" + } + ] + } + ] + }, + { + "begin": "(?<=:)\\s*(async)?\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.js" + }, + "2": { + "name": "meta.brace.round.js" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.js" + } + }, + "patterns": [ + { + "include": "#expression-inside-possibly-arrow-parens" + } + ] + }, + { + "begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.js" + } + }, + "end": "(?<=\\>)", + "patterns": [ + { + "include": "#type-parameters" + } + ] + }, + { + "begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", + "beginCaptures": { + "1": { + "name": "meta.brace.round.js" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.js" + } + }, + "patterns": [ + { + "include": "#expression-inside-possibly-arrow-parens" + } + ] + }, + { + "include": "#possibly-arrow-return-type" + }, + { + "include": "#expression" + } + ] + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#decl-block" + } + ] + }, + "ternary-expression": { + "begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)(?!\\?)", + "beginCaptures": { + "1": { + "name": "keyword.operator.ternary.js" + } + }, + "end": "\\s*(:)", + "endCaptures": { + "1": { + "name": "keyword.operator.ternary.js" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "function-call": { + "patterns": [ + { + "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?))*(?)*(?\\s*)?\\())", + "end": "(?<=\\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?))*(?)*(?\\s*)?\\())", + "patterns": [ + { + "name": "meta.function-call.js", + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))", + "end": "(?=\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?))*(?)*(?\\s*)?\\())", + "patterns": [ + { + "include": "#function-call-target" + } + ] + }, + { + "include": "#comment" + }, + { + "include": "#function-call-optionals" + }, + { + "include": "#type-arguments" + }, + { + "include": "#paren-expression" + } + ] + }, + { + "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))", + "end": "(?<=\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))", + "patterns": [ + { + "name": "meta.function-call.js", + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))", + "end": "(?=(<\\s*[\\{\\[\\(]\\s*$))", + "patterns": [ + { + "include": "#function-call-target" + } + ] + }, + { + "include": "#comment" + }, + { + "include": "#function-call-optionals" + }, + { + "include": "#type-arguments" + } + ] + } + ] + }, + "function-call-target": { + "patterns": [ + { + "include": "#support-function-call-identifiers" + }, + { + "name": "entity.name.function.js", + "match": "(\\#?[_$[:alpha:]][_$[:alnum:]]*)" + } + ] + }, + "function-call-optionals": { + "patterns": [ + { + "name": "meta.function-call.js punctuation.accessor.optional.js", + "match": "\\?\\." + }, + { + "name": "meta.function-call.js keyword.operator.definiteassignment.js", + "match": "\\!" + } + ] + }, + "support-function-call-identifiers": { + "patterns": [ + { + "include": "#literal" + }, + { + "include": "#support-objects" + }, + { + "include": "#object-identifiers" + }, + { + "include": "#punctuation-accessor" + }, + { + "name": "keyword.operator.expression.import.js", + "match": "(?:(?]|\\|\\||\\&\\&|\\!\\=\\=|$|((?]|\\|\\||\\&\\&|\\!\\=\\=|$|(===|!==|==|!=)|(([\\&\\~\\^\\|]\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s+instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.js" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#paren-expression-possibly-arrow-with-typeparameters" + } + ] + }, + { + "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\()|(<)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)))\\s*$)", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.js" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#paren-expression-possibly-arrow-with-typeparameters" + } + ] + }, + { + "include": "#possibly-arrow-return-type" + } + ] + }, + "paren-expression-possibly-arrow-with-typeparameters": { + "patterns": [ + { + "include": "#type-parameters" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.js" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.js" + } + }, + "patterns": [ + { + "include": "#expression-inside-possibly-arrow-parens" + } + ] + } + ] + }, + "expression-inside-possibly-arrow-parens": { + "patterns": [ + { + "include": "#expressionWithoutIdentifiers" + }, + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "include": "#decorator" + }, + { + "include": "#destructuring-parameter" + }, + { + "match": "(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "1": { + "name": "storage.modifier.js" + }, + "2": { + "name": "keyword.operator.rest.js" + }, + "3": { + "name": "entity.name.function.js variable.language.this.js" + }, + "4": { + "name": "entity.name.function.js" + }, + "5": { + "name": "keyword.operator.optional.js" + } + } + }, + { + "match": "(?x)(?:(?]|\\|\\||\\&\\&|\\!\\=\\=|$|((?>=|>>>=|\\|=" + }, + { + "name": "keyword.operator.bitwise.shift.js", + "match": "<<|>>>|>>" + }, + { + "name": "keyword.operator.comparison.js", + "match": "===|!==|==|!=" + }, + { + "name": "keyword.operator.relational.js", + "match": "<=|>=|<>|<|>" + }, + { + "match": "(?<=[_$[:alnum:]])(\\!)\\s*(?:(/=)|(?:(/)(?![/*])))", + "captures": { + "1": { + "name": "keyword.operator.logical.js" + }, + "2": { + "name": "keyword.operator.assignment.compound.js" + }, + "3": { + "name": "keyword.operator.arithmetic.js" + } + } + }, + { + "name": "keyword.operator.logical.js", + "match": "\\!|&&|\\|\\||\\?\\?" + }, + { + "name": "keyword.operator.bitwise.js", + "match": "\\&|~|\\^|\\|" + }, + { + "name": "keyword.operator.assignment.js", + "match": "\\=" + }, + { + "name": "keyword.operator.decrement.js", + "match": "--" + }, + { + "name": "keyword.operator.increment.js", + "match": "\\+\\+" + }, + { + "name": "keyword.operator.arithmetic.js", + "match": "%|\\*|/|-|\\+" + }, + { + "begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(?:(/=)|(?:(/)(?![/*]))))", + "end": "(?:(/=)|(?:(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)))", + "endCaptures": { + "1": { + "name": "keyword.operator.assignment.compound.js" + }, + "2": { + "name": "keyword.operator.arithmetic.js" + } + }, + "patterns": [ + { + "include": "#comment" + } + ] + }, + { + "match": "(?<=[_$[:alnum:])\\]])\\s*(?:(/=)|(?:(/)(?![/*])))", + "captures": { + "1": { + "name": "keyword.operator.assignment.compound.js" + }, + "2": { + "name": "keyword.operator.arithmetic.js" + } + } + } + ] + }, + "typeof-operator": { + "begin": "(?:&|{\\?]|(extends\\s+)|$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#type-arguments" + }, + { + "include": "#expression" + } + ] + }, + "literal": { + "patterns": [ + { + "include": "#numeric-literal" + }, + { + "include": "#boolean-literal" + }, + { + "include": "#null-literal" + }, + { + "include": "#undefined-literal" + }, + { + "include": "#numericConstant-literal" + }, + { + "include": "#array-literal" + }, + { + "include": "#this-literal" + }, + { + "include": "#super-literal" + } + ] + }, + "array-literal": { + "name": "meta.array.literal.js", + "begin": "\\s*(\\[)", + "beginCaptures": { + "1": { + "name": "meta.brace.square.js" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "meta.brace.square.js" + } + }, + "patterns": [ + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "numeric-literal": { + "patterns": [ + { + "name": "constant.numeric.hex.js", + "match": "\\b(?]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))", + "captures": { + "1": { + "name": "punctuation.accessor.js" + }, + "2": { + "name": "punctuation.accessor.optional.js" + }, + "3": { + "name": "support.variable.property.js" + }, + "4": { + "name": "support.constant.js" + } + } + }, + { + "match": "(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "captures": { + "1": { + "name": "punctuation.accessor.js" + }, + "2": { + "name": "punctuation.accessor.optional.js" + }, + "3": { + "name": "entity.name.function.js" + } + } + }, + { + "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])", + "captures": { + "1": { + "name": "punctuation.accessor.js" + }, + "2": { + "name": "punctuation.accessor.optional.js" + }, + "3": { + "name": "variable.other.constant.property.js" + } + } + }, + { + "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "punctuation.accessor.js" + }, + "2": { + "name": "punctuation.accessor.optional.js" + }, + "3": { + "name": "variable.other.property.js" + } + } + }, + { + "name": "variable.other.constant.js", + "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])" + }, + { + "name": "variable.other.readwrite.js", + "match": "[_$[:alpha:]][_$[:alnum:]]*" + } + ] + }, + "object-identifiers": { + "patterns": [ + { + "name": "support.class.js", + "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))" + }, + { + "match": "(?x)(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n (\\#?[[:upper:]][_$[:digit:][:upper:]]*) |\n (\\#?[_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "punctuation.accessor.js" + }, + "2": { + "name": "punctuation.accessor.optional.js" + }, + "3": { + "name": "variable.other.constant.object.property.js" + }, + "4": { + "name": "variable.other.object.property.js" + } + } + }, + { + "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "variable.other.constant.object.js" + }, + "2": { + "name": "variable.other.object.js" + } + } + } + ] + }, + "type-annotation": { + "patterns": [ + { + "name": "meta.type.annotation.js", + "begin": "(:)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.js" + } + }, + "end": "(?])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "name": "meta.type.annotation.js", + "begin": "(:)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.js" + } + }, + "end": "(?])|(?=^\\s*$)|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", + "patterns": [ + { + "include": "#type" + } + ] + } + ] + }, + "parameter-type-annotation": { + "patterns": [ + { + "name": "meta.type.annotation.js", + "begin": "(:)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.js" + } + }, + "end": "(?=[,)])|(?==[^>])", + "patterns": [ + { + "include": "#type" + } + ] + } + ] + }, + "return-type": { + "patterns": [ + { + "name": "meta.return.type.js", + "begin": "(?<=\\))\\s*(:)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.js" + } + }, + "end": "(?|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))", + "patterns": [ + { + "include": "#arrow-return-type-body" + } + ] + }, + "possibly-arrow-return-type": { + "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)", + "beginCaptures": { + "1": { + "name": "meta.arrow.js meta.return.type.arrow.js keyword.operator.type.annotation.js" + } + }, + "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))", + "contentName": "meta.arrow.js meta.return.type.arrow.js", + "patterns": [ + { + "include": "#arrow-return-type-body" + } + ] + }, + "arrow-return-type-body": { + "patterns": [ + { + "begin": "(?<=[:])(?=\\s*\\{)", + "end": "(?<=\\})", + "patterns": [ + { + "include": "#type-object" + } + ] + }, + { + "include": "#type-predicate-operator" + }, + { + "include": "#type" + } + ] + }, + "type-parameters": { + "name": "meta.type.parameters.js", + "begin": "(<)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.typeparameters.begin.js" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.typeparameters.end.js" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "name": "storage.modifier.js", + "match": "(?)" + } + ] + }, + "type-arguments": { + "name": "meta.type.parameters.js", + "begin": "\\<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.begin.js" + } + }, + "end": "\\>", + "endCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.end.js" + } + }, + "patterns": [ + { + "include": "#type-arguments-body" + } + ] + }, + "type-arguments-body": { + "patterns": [ + { + "match": "(?)\n ))\n ))\n)) |\n(:\\s*(?\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))))", + "captures": { + "1": { + "name": "storage.modifier.js" + }, + "2": { + "name": "keyword.operator.rest.js" + }, + "3": { + "name": "entity.name.function.js variable.language.this.js" + }, + "4": { + "name": "entity.name.function.js" + }, + "5": { + "name": "keyword.operator.optional.js" + } + } + }, + { + "match": "(?x)(?:(?)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-parameters" + } + ] + }, + { + "name": "meta.type.constructor.js", + "begin": "(?)\n ))\n )\n )\n)", + "end": "(?<=\\))", + "patterns": [ + { + "include": "#function-parameters" + } + ] + } + ] + }, + "type-function-return-type": { + "patterns": [ + { + "name": "meta.type.function.return.js", + "begin": "(=>)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "storage.type.function.arrow.js" + } + }, + "end": "(?)(?:\\?]|//|$)", + "patterns": [ + { + "include": "#type-function-return-type-core" + } + ] + }, + { + "name": "meta.type.function.return.js", + "begin": "=>", + "beginCaptures": { + "0": { + "name": "storage.type.function.arrow.js" + } + }, + "end": "(?)(?]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))", + "patterns": [ + { + "include": "#type-function-return-type-core" + } + ] + } + ] + }, + "type-function-return-type-core": { + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?<==>)(?=\\s*\\{)", + "end": "(?<=\\})", + "patterns": [ + { + "include": "#type-object" + } + ] + }, + { + "include": "#type-predicate-operator" + }, + { + "include": "#type" + } + ] + }, + "type-operators": { + "patterns": [ + { + "include": "#typeof-operator" + }, + { + "include": "#type-infer" + }, + { + "begin": "([&|])(?=\\s*\\{)", + "beginCaptures": { + "0": { + "name": "keyword.operator.type.js" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#type-object" + } + ] + }, + { + "begin": "[&|]", + "beginCaptures": { + "0": { + "name": "keyword.operator.type.js" + } + }, + "end": "(?=\\S)" + }, + { + "name": "keyword.operator.expression.keyof.js", + "match": "(?)", + "endCaptures": { + "1": { + "name": "meta.type.parameters.js punctuation.definition.typeparameters.end.js" + } + }, + "contentName": "meta.type.parameters.js", + "patterns": [ + { + "include": "#type-arguments-body" + } + ] + }, + { + "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(<)", + "beginCaptures": { + "1": { + "name": "entity.name.type.js" + }, + "2": { + "name": "meta.type.parameters.js punctuation.definition.typeparameters.begin.js" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "meta.type.parameters.js punctuation.definition.typeparameters.end.js" + } + }, + "contentName": "meta.type.parameters.js", + "patterns": [ + { + "include": "#type-arguments-body" + } + ] + }, + { + "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", + "captures": { + "1": { + "name": "entity.name.type.module.js" + }, + "2": { + "name": "punctuation.accessor.js" + }, + "3": { + "name": "punctuation.accessor.optional.js" + } + } + }, + { + "name": "entity.name.type.js", + "match": "[_$[:alpha:]][_$[:alnum:]]*" + } + ] + }, + "punctuation-comma": { + "name": "punctuation.separator.comma.js", + "match": "," + }, + "punctuation-semicolon": { + "name": "punctuation.terminator.statement.js", + "match": ";" + }, + "punctuation-accessor": { + "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", + "captures": { + "1": { + "name": "punctuation.accessor.js" + }, + "2": { + "name": "punctuation.accessor.optional.js" + } + } + }, + "string": { + "patterns": [ + { + "include": "#qstring-single" + }, + { + "include": "#qstring-double" + }, + { + "include": "#template" + } + ] + }, + "qstring-double": { + "name": "string.quoted.double.js", + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.js" + } + }, + "end": "(\")|((?:[^\\\\\\n])$)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.js" + }, + "2": { + "name": "invalid.illegal.newline.js" + } + }, + "patterns": [ + { + "include": "#string-character-escape" + } + ] + }, + "qstring-single": { + "name": "string.quoted.single.js", + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.js" + } + }, + "end": "(\\')|((?:[^\\\\\\n])$)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.js" + }, + "2": { + "name": "invalid.illegal.newline.js" + } + }, + "patterns": [ + { + "include": "#string-character-escape" + } + ] + }, + "string-character-escape": { + "name": "constant.character.escape.js", + "match": "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\\{[0-9A-Fa-f]+\\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)" + }, + "template": { + "patterns": [ + { + "include": "#template-call" + }, + { + "contentName": "string.template.js", + "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)", + "beginCaptures": { + "1": { + "name": "entity.name.function.tagged-template.js" + }, + "2": { + "name": "string.template.js punctuation.definition.string.template.begin.js" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "string.template.js punctuation.definition.string.template.end.js" + } + }, + "patterns": [ + { + "include": "#template-substitution-element" + }, + { + "include": "#string-character-escape" + } + ] + } + ] + }, + "template-call": { + "patterns": [ + { + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?))*(?)*(?\\s*)?`)", + "end": "(?=`)", + "patterns": [ + { + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))", + "end": "(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?))*(?)*(?\\s*)?`)", + "patterns": [ + { + "include": "#support-function-call-identifiers" + }, + { + "name": "entity.name.function.tagged-template.js", + "match": "([_$[:alpha:]][_$[:alnum:]]*)" + } + ] + }, + { + "include": "#type-arguments" + } + ] + }, + { + "begin": "([_$[:alpha:]][_$[:alnum:]]*)?\\s*(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?))*(?)*(?\\s*)`)", + "beginCaptures": { + "1": { + "name": "entity.name.function.tagged-template.js" + } + }, + "end": "(?=`)", + "patterns": [ + { + "include": "#type-arguments" + } + ] + } + ] + }, + "template-substitution-element": { + "name": "meta.template.expression.js", + "begin": "\\$\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.template-expression.begin.js" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.template-expression.end.js" + } + }, + "patterns": [ + { + "include": "#expression" + } + ], + "contentName": "meta.embedded.line.js" + }, + "type-string": { + "patterns": [ + { + "include": "#qstring-single" + }, + { + "include": "#qstring-double" + }, + { + "include": "#template-type" + } + ] + }, + "template-type": { + "patterns": [ + { + "include": "#template-call" + }, + { + "contentName": "string.template.js", + "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)", + "beginCaptures": { + "1": { + "name": "entity.name.function.tagged-template.js" + }, + "2": { + "name": "string.template.js punctuation.definition.string.template.begin.js" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "string.template.js punctuation.definition.string.template.end.js" + } + }, + "patterns": [ + { + "include": "#template-type-substitution-element" + }, + { + "include": "#string-character-escape" + } + ] + } + ] + }, + "template-type-substitution-element": { + "name": "meta.template.expression.js", + "begin": "\\$\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.template-expression.begin.js" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.template-expression.end.js" + } + }, + "patterns": [ + { + "include": "#type" + } + ], + "contentName": "meta.embedded.line.js" + }, + "regex": { + "patterns": [ + { + "name": "string.regexp.js", + "begin": "(?|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.js" + } + }, + "end": "(/)([dgimsuy]*)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.js" + }, + "2": { + "name": "keyword.other.js" + } + }, + "patterns": [ + { + "include": "#regexp" + } + ] + }, + { + "name": "string.regexp.js", + "begin": "((?", + "captures": { + "0": { + "name": "keyword.other.back-reference.regexp" + }, + "1": { + "name": "variable.other.regexp" + } + } + }, + { + "name": "keyword.operator.quantifier.regexp", + "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??" + }, + { + "name": "keyword.operator.or.regexp", + "match": "\\|" + }, + { + "name": "meta.group.assertion.regexp", + "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?))?", + "beginCaptures": { + "0": { + "name": "punctuation.definition.group.regexp" + }, + "1": { + "name": "punctuation.definition.group.no-capture.regexp" + }, + "2": { + "name": "variable.other.regexp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.group.regexp" + } + }, + "patterns": [ + { + "include": "#regexp" + } + ] + }, + { + "name": "constant.other.character-class.set.regexp", + "begin": "(\\[)(\\^)?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.character-class.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + } + }, + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.definition.character-class.regexp" + } + }, + "patterns": [ + { + "name": "constant.other.character-class.range.regexp", + "match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))", + "captures": { + "1": { + "name": "constant.character.numeric.regexp" + }, + "2": { + "name": "constant.character.control.regexp" + }, + "3": { + "name": "constant.character.escape.backslash.regexp" + }, + "4": { + "name": "constant.character.numeric.regexp" + }, + "5": { + "name": "constant.character.control.regexp" + }, + "6": { + "name": "constant.character.escape.backslash.regexp" + } + } + }, + { + "include": "#regex-character-class" + } + ] + }, + { + "include": "#regex-character-class" + } + ] + }, + "regex-character-class": { + "patterns": [ + { + "name": "constant.other.character-class.regexp", + "match": "\\\\[wWsSdDtrnvf]|\\." + }, + { + "name": "constant.character.numeric.regexp", + "match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})" + }, + { + "name": "constant.character.control.regexp", + "match": "\\\\c[A-Z]" + }, + { + "name": "constant.character.escape.backslash.regexp", + "match": "\\\\." + } + ] + }, + "comment": { + "patterns": [ + { + "name": "comment.block.documentation.js", + "begin": "/\\*\\*(?!/)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.js" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.js" + } + }, + "patterns": [ + { + "include": "#docblock" + } + ] + }, + { + "name": "comment.block.js", + "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.js" + }, + "2": { + "name": "storage.type.internaldeclaration.js" + }, + "3": { + "name": "punctuation.decorator.internaldeclaration.js" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.js" + } + } + }, + { + "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.js" + }, + "2": { + "name": "comment.line.double-slash.js" + }, + "3": { + "name": "punctuation.definition.comment.js" + }, + "4": { + "name": "storage.type.internaldeclaration.js" + }, + "5": { + "name": "punctuation.decorator.internaldeclaration.js" + } + }, + "end": "(?=$)", + "contentName": "comment.line.double-slash.js" + } + ] + }, + "single-line-comment-consuming-line-ending": { + "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.js" + }, + "2": { + "name": "comment.line.double-slash.js" + }, + "3": { + "name": "punctuation.definition.comment.js" + }, + "4": { + "name": "storage.type.internaldeclaration.js" + }, + "5": { + "name": "punctuation.decorator.internaldeclaration.js" + } + }, + "end": "(?=^)", + "contentName": "comment.line.double-slash.js" + }, + "directives": { + "name": "comment.line.triple-slash.directive.js", + "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.js" + } + }, + "end": "(?=$)", + "patterns": [ + { + "name": "meta.tag.js", + "begin": "(<)(reference|amd-dependency|amd-module)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.directive.js" + }, + "2": { + "name": "entity.name.tag.directive.js" + } + }, + "end": "/>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.directive.js" + } + }, + "patterns": [ + { + "name": "entity.other.attribute-name.directive.js", + "match": "path|types|no-default-lib|lib|name|resolution-mode" + }, + { + "name": "keyword.operator.assignment.js", + "match": "=" + }, + { + "include": "#string" + } + ] + } + ] + }, + "docblock": { + "patterns": [ + { + "match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "constant.language.access-type.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "entity.name.type.instance.jsdoc" + }, + "4": { + "name": "punctuation.definition.bracket.angle.begin.jsdoc" + }, + "5": { + "name": "constant.other.email.link.underline.jsdoc" + }, + "6": { + "name": "punctuation.definition.bracket.angle.end.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # \n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # ", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "entity.name.type.instance.jsdoc" + }, + "4": { + "name": "keyword.operator.control.jsdoc" + }, + "5": { + "name": "entity.name.type.instance.jsdoc" + } + } + }, + { + "name": "meta.example.jsdoc", + "begin": "((@)example)\\s+", + "end": "(?=@|\\*/)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "patterns": [ + { + "match": "^\\s\\*\\s+" + }, + { + "contentName": "constant.other.description.jsdoc", + "begin": "\\G(<)caption(>)", + "beginCaptures": { + "0": { + "name": "entity.name.tag.inline.jsdoc" + }, + "1": { + "name": "punctuation.definition.bracket.angle.begin.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.angle.end.jsdoc" + } + }, + "end": "()|(?=\\*/)", + "endCaptures": { + "0": { + "name": "entity.name.tag.inline.jsdoc" + }, + "1": { + "name": "punctuation.definition.bracket.angle.begin.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.angle.end.jsdoc" + } + } + }, + { + "match": "[^\\s@*](?:[^*]|\\*[^/])*", + "captures": { + "0": { + "name": "source.embedded.js" + } + } + } + ] + }, + { + "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "constant.language.symbol-type.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!\n # Avoid matching bare URIs (also acceptable as links)\n https?://\n |\n # Avoid matching {@inline tags}; we match those below\n (?:\\[[^\\[\\]]*\\])? # Possible description [preceding]{@tag}\n {@(?:link|linkcode|linkplain|tutorial)\\b\n )\n # Matched namepath\n (?:[^@\\s*/]|\\*[^/])+\n )\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.link.underline.jsdoc" + }, + "4": { + "name": "entity.name.type.instance.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)template)\n\\s+\n# One or more valid identifiers\n(\n [A-Za-z_$] # First character: non-numeric word character\n [\\w$.\\[\\]]* # Rest of identifier\n (?: # Possible list of additional identifiers\n \\s* , \\s*\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n )*\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + } + } + }, + { + "begin": "(?x)((@)template)\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + }, + { + "name": "variable.other.jsdoc", + "match": "([A-Za-z_$][\\w$.\\[\\]]*)" + } + ] + }, + { + "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + } + } + }, + { + "begin": "((@)typedef)\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + }, + { + "name": "entity.name.type.instance.jsdoc", + "match": "(?:[^@\\s*/]|\\*[^/])+" + } + ] + }, + { + "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + }, + { + "name": "variable.other.jsdoc", + "match": "([A-Za-z_$][\\w$.\\[\\]]*)" + }, + { + "name": "variable.other.jsdoc", + "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[ ].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?>\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])* # Everything else\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))", + "captures": { + "1": { + "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc" + }, + "2": { + "name": "keyword.operator.assignment.jsdoc" + }, + "3": { + "name": "source.embedded.js" + }, + "4": { + "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc" + }, + "5": { + "name": "invalid.illegal.syntax.jsdoc" + } + } + } + ] + }, + { + "begin": "(?x)\n(\n (@)\n (?:define|enum|exception|export|extends|lends|implements|modifies\n |namespace|private|protected|returns?|satisfies|suppress|this|throws|type\n |yields?)\n)\n\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + } + ] + }, + { + "match": "(?x)\n(\n (@)\n (?:alias|augments|callback|constructs|emits|event|fires|exports?\n |extends|external|function|func|host|lends|listens|interface|memberof!?\n |method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "entity.name.type.instance.jsdoc" + } + } + }, + { + "contentName": "variable.other.jsdoc", + "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + }, + "4": { + "name": "punctuation.definition.string.begin.jsdoc" + } + }, + "end": "(\\3)|(?=$|\\*/)", + "endCaptures": { + "0": { + "name": "variable.other.jsdoc" + }, + "1": { + "name": "punctuation.definition.string.end.jsdoc" + } + } + }, + { + "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + } + } + }, + { + "name": "storage.type.class.jsdoc", + "match": "(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \\b", + "captures": { + "1": { + "name": "punctuation.definition.block.tag.jsdoc" + } + } + }, + { + "include": "#inline-tags" + }, + { + "match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\s+)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + } + } + ] + }, + "brackets": { + "patterns": [ + { + "begin": "{", + "end": "}|(?=\\*/)", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\[", + "end": "\\]|(?=\\*/)", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "inline-tags": { + "patterns": [ + { + "name": "constant.other.description.jsdoc", + "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))", + "captures": { + "1": { + "name": "punctuation.definition.bracket.square.begin.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.square.end.jsdoc" + } + } + }, + { + "name": "entity.name.type.instance.jsdoc", + "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*", + "beginCaptures": { + "1": { + "name": "punctuation.definition.bracket.curly.begin.jsdoc" + }, + "2": { + "name": "storage.type.class.jsdoc" + }, + "3": { + "name": "punctuation.definition.inline.tag.jsdoc" + } + }, + "end": "}|(?=\\*/)", + "endCaptures": { + "0": { + "name": "punctuation.definition.bracket.curly.end.jsdoc" + } + }, + "patterns": [ + { + "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?", + "captures": { + "1": { + "name": "variable.other.link.underline.jsdoc" + }, + "2": { + "name": "punctuation.separator.pipe.jsdoc" + } + } + }, + { + "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?", + "captures": { + "1": { + "name": "variable.other.description.jsdoc" + }, + "2": { + "name": "punctuation.separator.pipe.jsdoc" + } + } + } + ] + } + ] + }, + "jsdoctype": { + "patterns": [ + { + "contentName": "entity.name.type.instance.jsdoc", + "begin": "\\G({)", + "beginCaptures": { + "0": { + "name": "entity.name.type.instance.jsdoc" + }, + "1": { + "name": "punctuation.definition.bracket.curly.begin.jsdoc" + } + }, + "end": "((}))\\s*|(?=\\*/)", + "endCaptures": { + "1": { + "name": "entity.name.type.instance.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.curly.end.jsdoc" + } + }, + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "jsx": { + "patterns": [ + { + "include": "#jsx-tag-without-attributes-in-expression" + }, + { + "include": "#jsx-tag-in-expression" + } + ] + }, + "jsx-tag-without-attributes-in-expression": { + "begin": "(?:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", + "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", + "patterns": [ + { + "include": "#jsx-tag-without-attributes" + } + ] + }, + "jsx-tag-without-attributes": { + "name": "meta.tag.without-attributes.js", + "begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?)", + "end": "()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.js" + }, + "2": { + "name": "entity.name.tag.namespace.js" + }, + "3": { + "name": "punctuation.separator.namespace.js" + }, + "4": { + "name": "entity.name.tag.js" + }, + "5": { + "name": "support.class.component.js" + }, + "6": { + "name": "punctuation.definition.tag.end.js" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.js" + }, + "2": { + "name": "entity.name.tag.namespace.js" + }, + "3": { + "name": "punctuation.separator.namespace.js" + }, + "4": { + "name": "entity.name.tag.js" + }, + "5": { + "name": "support.class.component.js" + }, + "6": { + "name": "punctuation.definition.tag.end.js" + } + }, + "contentName": "meta.jsx.children.js", + "patterns": [ + { + "include": "#jsx-children" + } + ] + }, + "jsx-tag-in-expression": { + "begin": "(?x)\n (?:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", + "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", + "patterns": [ + { + "include": "#jsx-tag" + } + ] + }, + "jsx-tag": { + "name": "meta.tag.js", + "begin": "(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", + "end": "(/>)|(?:())", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.js" + }, + "2": { + "name": "punctuation.definition.tag.begin.js" + }, + "3": { + "name": "entity.name.tag.namespace.js" + }, + "4": { + "name": "punctuation.separator.namespace.js" + }, + "5": { + "name": "entity.name.tag.js" + }, + "6": { + "name": "support.class.component.js" + }, + "7": { + "name": "punctuation.definition.tag.end.js" + } + }, + "patterns": [ + { + "begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.js" + }, + "2": { + "name": "entity.name.tag.namespace.js" + }, + "3": { + "name": "punctuation.separator.namespace.js" + }, + "4": { + "name": "entity.name.tag.js" + }, + "5": { + "name": "support.class.component.js" + } + }, + "end": "(?=[/]?>)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-arguments" + }, + { + "include": "#jsx-tag-attributes" + } + ] + }, + { + "begin": "(>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.end.js" + } + }, + "end": "(?=)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#jsx-tag-attribute-name" + }, + { + "include": "#jsx-tag-attribute-assignment" + }, + { + "include": "#jsx-string-double-quoted" + }, + { + "include": "#jsx-string-single-quoted" + }, + { + "include": "#jsx-evaluated-code" + }, + { + "include": "#jsx-tag-attributes-illegal" + } + ] + }, + "jsx-tag-attribute-name": { + "match": "(?x)\n \\s*\n (?:([_$[:alpha:]][-_$[:alnum:].]*)(:))?\n ([_$[:alpha:]][-_$[:alnum:]]*)\n (?=\\s|=|/?>|/\\*|//)", + "captures": { + "1": { + "name": "entity.other.attribute-name.namespace.js" + }, + "2": { + "name": "punctuation.separator.namespace.js" + }, + "3": { + "name": "entity.other.attribute-name.js" + } + } + }, + "jsx-tag-attribute-assignment": { + "name": "keyword.operator.assignment.js", + "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))" + }, + "jsx-string-double-quoted": { + "name": "string.quoted.double.js", + "begin": "\"", + "end": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.js" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.js" + } + }, + "patterns": [ + { + "include": "#jsx-entities" + } + ] + }, + "jsx-string-single-quoted": { + "name": "string.quoted.single.js", + "begin": "'", + "end": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.js" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.js" + } + }, + "patterns": [ + { + "include": "#jsx-entities" + } + ] + }, + "jsx-tag-attributes-illegal": { + "name": "invalid.illegal.attribute.js", + "match": "\\S+" + } + } +} diff --git a/src/lib/shiki/languages/jinja-html.tmLanguage.json b/src/lib/shiki/languages/jinja-html.tmLanguage.json new file mode 100644 index 0000000..dfc74b5 --- /dev/null +++ b/src/lib/shiki/languages/jinja-html.tmLanguage.json @@ -0,0 +1,16 @@ +{ + "name": "jinja-html", + "scopeName": "text.html.jinja", + "comment": "Jinja HTML Templates", + "firstLineMatch": "^{% extends [\"'][^\"']+[\"'] %}", + "foldingStartMarker": "(<(?i:(head|table|tr|div|style|script|ul|ol|form|dl))\\b.*?>|{%\\s*(block|filter|for|if|macro|raw))", + "foldingStopMarker": "(|{%\\s*(endblock|endfilter|endfor|endif|endmacro|endraw)\\s*%})", + "patterns": [ + { + "include": "source.jinja" + }, + { + "include": "text.html.basic" + } + ] +} diff --git a/src/lib/shiki/languages/jinja.tmLanguage.json b/src/lib/shiki/languages/jinja.tmLanguage.json new file mode 100644 index 0000000..aafd061 --- /dev/null +++ b/src/lib/shiki/languages/jinja.tmLanguage.json @@ -0,0 +1,345 @@ +{ + "name": "jinja", + "scopeName": "source.jinja", + "comment": "Jinja Templates", + "foldingStartMarker": "({%\\s*(block|filter|for|if|macro|raw))", + "foldingStopMarker": "({%\\s*(endblock|endfilter|endfor|endif|endmacro|endraw)\\s*%})", + "patterns": [ + { + "begin": "({%)\\s*(raw)\\s*(%})", + "captures": { + "1": { + "name": "entity.other.jinja.delimiter.tag" + }, + "2": { + "name": "keyword.control.jinja" + }, + "3": { + "name": "entity.other.jinja.delimiter.tag" + } + }, + "end": "({%)\\s*(endraw)\\s*(%})", + "name": "comment.block.jinja.raw" + }, + { + "include": "#comments" + }, + { + "begin": "{{-?", + "captures": [ + { + "name": "variable.entity.other.jinja.delimiter" + } + ], + "end": "-?}}", + "name": "variable.meta.scope.jinja", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "begin": "{%-?", + "captures": [ + { + "name": "entity.other.jinja.delimiter.tag" + } + ], + "end": "-?%}", + "name": "meta.scope.jinja.tag", + "patterns": [ + { + "include": "#expression" + } + ] + } + ], + "repository": { + "comments": { + "begin": "{#-?", + "captures": [ + { + "name": "entity.other.jinja.delimiter.comment" + } + ], + "end": "-?#}", + "name": "comment.block.jinja", + "patterns": [ + { + "include": "#comments" + } + ] + }, + "escaped_char": { + "match": "\\\\x[0-9A-F]{2}", + "name": "constant.character.escape.hex.jinja" + }, + "escaped_unicode_char": { + "captures": { + "1": { + "name": "constant.character.escape.unicode.16-bit-hex.jinja" + }, + "2": { + "name": "constant.character.escape.unicode.32-bit-hex.jinja" + }, + "3": { + "name": "constant.character.escape.unicode.name.jinja" + } + }, + "match": "(\\\\U[0-9A-Fa-f]{8})|(\\\\u[0-9A-Fa-f]{4})|(\\\\N\\{[a-zA-Z ]+\\})" + }, + "expression": { + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.control.jinja" + }, + "2": { + "name": "variable.other.jinja.block" + } + }, + "match": "\\s*\\b(block)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.control.jinja" + }, + "2": { + "name": "variable.other.jinja.filter" + } + }, + "match": "\\s*\\b(filter)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.control.jinja" + }, + "2": { + "name": "variable.other.jinja.test" + } + }, + "match": "\\s*\\b(is)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.control.jinja" + } + }, + "match": "(?<=\\{\\%-|\\{\\%)\\s*\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?!\\s*[,=])" + }, + { + "match": "\\b(and|else|if|in|import|not|or|recursive|with(out)?\\s+context)\\b", + "name": "keyword.control.jinja" + }, + { + "match": "\\b(true|false|none)\\b", + "name": "constant.language.jinja" + }, + { + "match": "\\b(loop|super|self|varargs|kwargs)\\b", + "name": "variable.language.jinja" + }, + { + "match": "[a-zA-Z_][a-zA-Z0-9_]*", + "name": "variable.other.jinja" + }, + { + "match": "(\\+|\\-|\\*\\*|\\*|//|/|%)", + "name": "keyword.operator.arithmetic.jinja" + }, + { + "captures": { + "1": { + "name": "punctuation.other.jinja" + }, + "2": { + "name": "variable.other.jinja.filter" + } + }, + "match": "(\\|)([a-zA-Z_][a-zA-Z0-9_]*)" + }, + { + "captures": { + "1": { + "name": "punctuation.other.jinja" + }, + "2": { + "name": "variable.other.jinja.attribute" + } + }, + "match": "(\\.)([a-zA-Z_][a-zA-Z0-9_]*)" + }, + { + "begin": "\\[", + "captures": [ + { + "name": "punctuation.other.jinja" + } + ], + "end": "\\]", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "begin": "\\(", + "captures": [ + { + "name": "punctuation.other.jinja" + } + ], + "end": "\\)", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "begin": "\\{", + "captures": [ + { + "name": "punctuation.other.jinja" + } + ], + "end": "\\}", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "match": "(\\.|:|\\||,)", + "name": "punctuation.other.jinja" + }, + { + "match": "(==|<=|=>|<|>|!=)", + "name": "keyword.operator.comparison.jinja" + }, + { + "match": "=", + "name": "keyword.operator.assignment.jinja" + }, + { + "begin": "\"", + "beginCaptures": [ + { + "name": "punctuation.definition.string.begin.jinja" + } + ], + "end": "\"", + "endCaptures": [ + { + "name": "punctuation.definition.string.end.jinja" + } + ], + "name": "string.quoted.double.jinja", + "patterns": [ + { + "include": "#string" + } + ] + }, + { + "begin": "'", + "beginCaptures": [ + { + "name": "punctuation.definition.string.begin.jinja" + } + ], + "end": "'", + "endCaptures": [ + { + "name": "punctuation.definition.string.end.jinja" + } + ], + "name": "string.quoted.single.jinja", + "patterns": [ + { + "include": "#string" + } + ] + }, + { + "begin": "@/", + "beginCaptures": [ + { + "name": "punctuation.definition.regexp.begin.jinja" + } + ], + "end": "/", + "endCaptures": [ + { + "name": "punctuation.definition.regexp.end.jinja" + } + ], + "name": "string.regexp.jinja", + "patterns": [ + { + "include": "#simple_escapes" + } + ] + } + ] + }, + "simple_escapes": { + "captures": { + "1": { + "name": "constant.character.escape.newline.jinja" + }, + "2": { + "name": "constant.character.escape.backlash.jinja" + }, + "3": { + "name": "constant.character.escape.double-quote.jinja" + }, + "4": { + "name": "constant.character.escape.single-quote.jinja" + }, + "5": { + "name": "constant.character.escape.bell.jinja" + }, + "6": { + "name": "constant.character.escape.backspace.jinja" + }, + "7": { + "name": "constant.character.escape.formfeed.jinja" + }, + "8": { + "name": "constant.character.escape.linefeed.jinja" + }, + "9": { + "name": "constant.character.escape.return.jinja" + }, + "10": { + "name": "constant.character.escape.tab.jinja" + }, + "11": { + "name": "constant.character.escape.vertical-tab.jinja" + } + }, + "match": "(\\\\\\n)|(\\\\\\\\)|(\\\\\\\")|(\\\\')|(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)" + }, + "string": { + "patterns": [ + { + "include": "#simple_escapes" + }, + { + "include": "#escaped_char" + }, + { + "include": "#escaped_unicode_char" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/jison.tmLanguage.json b/src/lib/shiki/languages/jison.tmLanguage.json new file mode 100644 index 0000000..103ae9b --- /dev/null +++ b/src/lib/shiki/languages/jison.tmLanguage.json @@ -0,0 +1,712 @@ +{ + "name": "jison", + "scopeName": "source.jison", + "fileTypes": ["jison"], + "patterns": [ + { + "begin": "%%", + "end": "\\z", + "beginCaptures": { + "0": { + "name": "meta.separator.section.jison" + } + }, + "patterns": [ + { + "begin": "%%", + "end": "\\z", + "beginCaptures": { + "0": { + "name": "meta.separator.section.jison" + } + }, + "patterns": [ + { + "name": "meta.section.epilogue.jison", + "begin": "\\G", + "end": "\\z", + "contentName": "source.js.embedded.jison", + "patterns": [ + { + "include": "#epilogue_section" + } + ] + } + ] + }, + { + "name": "meta.section.rules.jison", + "begin": "\\G", + "end": "(?=%%)", + "patterns": [ + { + "include": "#rules_section" + } + ] + } + ] + }, + { + "name": "meta.section.declarations.jison", + "begin": "^", + "end": "(?=%%)", + "patterns": [ + { + "include": "#declarations_section" + } + ] + } + ], + "repository": { + "declarations_section": { + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "^\\s*(%lex)\\s*$", + "end": "^\\s*(/lex)\\b", + "beginCaptures": { + "1": { + "name": "entity.name.tag.lexer.begin.jison" + } + }, + "endCaptures": { + "1": { + "name": "entity.name.tag.lexer.end.jison" + } + }, + "patterns": [ + { + "begin": "%%", + "end": "(?=/lex)", + "beginCaptures": { + "0": { + "name": "meta.separator.section.jisonlex" + } + }, + "patterns": [ + { + "begin": "^%%", + "end": "(?=/lex)", + "beginCaptures": { + "0": { + "name": "meta.separator.section.jisonlex" + } + }, + "patterns": [ + { + "name": "meta.section.user-code.jisonlex", + "begin": "\\G", + "end": "(?=/lex)", + "contentName": "source.js.embedded.jisonlex", + "patterns": [ + { + "include": "source.jisonlex#user_code_section" + } + ] + } + ] + }, + { + "name": "meta.section.rules.jisonlex", + "begin": "\\G", + "end": "^(?=%%|/lex)", + "patterns": [ + { + "include": "source.jisonlex#rules_section" + } + ] + } + ] + }, + { + "name": "meta.section.definitions.jisonlex", + "begin": "^", + "end": "(?=%%|/lex)", + "patterns": [ + { + "include": "source.jisonlex#definitions_section" + } + ] + } + ] + }, + { + "name": "meta.section.prologue.jison", + "begin": "(?=%\\{)", + "end": "(?<=%\\})", + "patterns": [ + { + "include": "#user_code_blocks" + } + ] + }, + { + "include": "#options_declarations" + }, + { + "name": "keyword.other.declaration.$1.jison", + "match": "%(ebnf|left|nonassoc|parse-param|right|start)\\b" + }, + { + "include": "#include_declarations" + }, + { + "name": "meta.code.jison", + "begin": "%(code)\\b", + "end": "$", + "beginCaptures": { + "0": { + "name": "keyword.other.declaration.$1.jison" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#rule_actions" + }, + { + "name": "keyword.other.code-qualifier.$1.jison", + "match": "(init|required)" + }, + { + "include": "#quoted_strings" + }, + { + "name": "string.unquoted.jison", + "match": "\\b[[:alpha:]_](?:[\\w-]*\\w)?\\b" + } + ] + }, + { + "name": "meta.parser-type.jison", + "begin": "%(parser-type)\\b", + "end": "$", + "beginCaptures": { + "0": { + "name": "keyword.other.declaration.$1.jison" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#quoted_strings" + }, + { + "name": "string.unquoted.jison", + "match": "\\b[[:alpha:]_](?:[\\w-]*\\w)?\\b" + } + ] + }, + { + "name": "meta.token.jison", + "begin": "%(token)\\b", + "end": "$|(%%|;)", + "beginCaptures": { + "0": { + "name": "keyword.other.declaration.$1.jison" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.terminator.declaration.token.jison" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#numbers" + }, + { + "include": "#quoted_strings" + }, + { + "name": "invalid.unimplemented.jison", + "match": "<[[:alpha:]_](?:[\\w-]*\\w)?>" + }, + { + "name": "entity.other.token.jison", + "match": "\\S+" + } + ] + }, + { + "name": "keyword.other.declaration.$1.jison", + "match": "%(debug|import)\\b" + }, + { + "name": "invalid.illegal.jison", + "match": "%prec\\b" + }, + { + "name": "invalid.unimplemented.jison", + "match": "%[[:alpha:]_](?:[\\w-]*\\w)?\\b" + }, + { + "include": "#numbers" + }, + { + "include": "#quoted_strings" + } + ] + }, + "rules_section": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#actions" + }, + { + "include": "#include_declarations" + }, + { + "name": "meta.rule.jison", + "begin": "\\b[[:alpha:]_](?:[\\w-]*\\w)?\\b", + "end": ";", + "beginCaptures": { + "0": { + "name": "entity.name.constant.rule-result.jison" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.rule.jison" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "name": "meta.rule-components.jison", + "begin": ":", + "end": "(?=;)", + "beginCaptures": { + "0": { + "name": "keyword.operator.rule-components.assignment.jison" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#quoted_strings" + }, + { + "match": "(\\[)([[:alpha:]_](?:[\\w-]*\\w)?)(\\])", + "captures": { + "1": { + "name": "punctuation.definition.named-reference.begin.jison" + }, + "2": { + "name": "entity.name.other.reference.jison" + }, + "3": { + "name": "punctuation.definition.named-reference.end.jison" + } + } + }, + { + "name": "meta.prec.jison", + "begin": "(%(prec))\\s*", + "end": "(?<=['\"])|(?=\\s)", + "beginCaptures": { + "1": { + "name": "keyword.other.$2.jison" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#quoted_strings" + }, + { + "name": "constant.other.token.jison", + "begin": "(?=\\S)", + "end": "(?=\\s)" + } + ] + }, + { + "name": "keyword.operator.rule-components.separator.jison", + "match": "\\|" + }, + { + "name": "keyword.other.$0.jison", + "match": "\\b(?:EOF|error)\\b" + }, + { + "name": "keyword.other.empty.jison", + "match": "(?:%(?:e(?:mpty|psilon))|\\b[Ɛɛεϵ])\\b" + }, + { + "include": "#rule_actions" + } + ] + } + ] + } + ] + }, + "epilogue_section": { + "patterns": [ + { + "include": "#user_code_include_declarations" + }, + { + "include": "source.js" + } + ] + }, + "actions": { + "patterns": [ + { + "name": "meta.action.jison", + "begin": "\\{\\{", + "end": "\\}\\}", + "beginCaptures": { + "0": { + "name": "punctuation.definition.action.begin.jison" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.action.end.jison" + } + }, + "contentName": "source.js.embedded.jison", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "name": "meta.action.jison", + "begin": "(?=%\\{)", + "end": "(?<=%\\})", + "patterns": [ + { + "include": "#user_code_blocks" + } + ] + } + ] + }, + "rule_actions": { + "patterns": [ + { + "include": "#actions" + }, + { + "name": "meta.action.jison", + "begin": "\\{", + "end": "\\}", + "beginCaptures": { + "0": { + "name": "punctuation.definition.action.begin.jison" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.action.end.jison" + } + }, + "contentName": "source.js.embedded.jison", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "include": "#include_declarations" + }, + { + "name": "meta.action.jison", + "begin": "->|→", + "end": "$", + "beginCaptures": { + "0": { + "name": "punctuation.definition.action.arrow.jison" + } + }, + "contentName": "source.js.embedded.jison", + "patterns": [ + { + "include": "source.js" + } + ] + } + ] + }, + "comments": { + "patterns": [ + { + "name": "comment.line.double-slash.jison", + "begin": "//", + "end": "$", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.jison" + } + } + }, + { + "name": "comment.block.jison", + "begin": "/\\*", + "end": "\\*/", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.jison" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.jison" + } + } + } + ] + }, + "include_declarations": { + "patterns": [ + { + "name": "meta.include.jison", + "begin": "(%(include))\\s*", + "end": "(?<=['\"])|(?=\\s)", + "beginCaptures": { + "1": { + "name": "keyword.other.declaration.$2.jison" + } + }, + "patterns": [ + { + "include": "#include_paths" + } + ] + } + ] + }, + "user_code_include_declarations": { + "patterns": [ + { + "name": "meta.include.jison", + "begin": "^(%(include))\\s*", + "end": "(?<=['\"])|(?=\\s)", + "beginCaptures": { + "1": { + "name": "keyword.other.declaration.$2.jison" + } + }, + "patterns": [ + { + "include": "#include_paths" + } + ] + } + ] + }, + "include_paths": { + "patterns": [ + { + "include": "#quoted_strings" + }, + { + "name": "string.unquoted.jison", + "begin": "(?=\\S)", + "end": "(?=\\s)", + "patterns": [ + { + "include": "source.js#string_escapes" + } + ] + } + ] + }, + "numbers": { + "patterns": [ + { + "match": "(0[Xx])([0-9A-Fa-f]+)", + "captures": { + "1": { + "name": "storage.type.number.jison" + }, + "2": { + "name": "constant.numeric.integer.hexadecimal.jison" + } + } + }, + { + "name": "constant.numeric.integer.decimal.jison", + "match": "\\d+" + } + ] + }, + "options_declarations": { + "patterns": [ + { + "name": "meta.options.jison", + "begin": "%options\\b", + "end": "^(?=\\S|\\s*$)", + "beginCaptures": { + "0": { + "name": "keyword.other.options.jison" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "name": "entity.name.constant.jison", + "match": "\\b[[:alpha:]_](?:[\\w-]*\\w)?\\b" + }, + { + "begin": "(=)\\s*", + "end": "(?<=['\"])|(?=\\s)", + "beginCaptures": { + "1": { + "name": "keyword.operator.option.assignment.jison" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "name": "constant.language.boolean.$1.jison", + "match": "\\b(true|false)\\b" + }, + { + "include": "#numbers" + }, + { + "include": "#quoted_strings" + }, + { + "name": "string.unquoted.jison", + "match": "\\S+" + } + ] + }, + { + "include": "#quoted_strings" + } + ] + } + ] + }, + "quoted_strings": { + "patterns": [ + { + "name": "string.quoted.double.jison", + "begin": "\"", + "end": "\"", + "patterns": [ + { + "include": "source.js#string_escapes" + } + ] + }, + { + "name": "string.quoted.single.jison", + "begin": "'", + "end": "'", + "patterns": [ + { + "include": "source.js#string_escapes" + } + ] + } + ] + }, + "user_code_blocks": { + "patterns": [ + { + "name": "meta.user-code-block.jison", + "begin": "%\\{", + "end": "%\\}", + "beginCaptures": { + "0": { + "name": "punctuation.definition.user-code-block.begin.jison" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.user-code-block.end.jison" + } + }, + "contentName": "source.js.embedded.jison", + "patterns": [ + { + "include": "source.js" + } + ] + } + ] + } + }, + "injections": { + "L:(meta.action.jison - (comment | string)), source.js.embedded.jison - (comment | string), source.js.embedded.source - (comment | string.quoted.double | string.quoted.single)": { + "patterns": [ + { + "name": "variable.language.semantic-value.jison", + "match": "\\${2}" + }, + { + "name": "variable.language.result-location.jison", + "match": "@\\$" + }, + { + "name": "variable.language.stack-index-0.jison", + "match": "##\\$|\\byysp\\b" + }, + { + "name": "support.variable.token-reference.jison", + "match": "#\\S+#" + }, + { + "name": "variable.language.result-id.jison", + "match": "#\\$" + }, + { + "name": "support.variable.token-value.jison", + "match": "\\$(?:-?\\d+|[[:alpha:]_](?:[\\w-]*\\w)?)" + }, + { + "name": "support.variable.token-location.jison", + "match": "@(?:-?\\d+|[[:alpha:]_](?:[\\w-]*\\w)?)" + }, + { + "name": "support.variable.stack-index.jison", + "match": "##(?:-?\\d+|[[:alpha:]_](?:[\\w-]*\\w)?)" + }, + { + "name": "support.variable.token-id.jison", + "match": "#(?:-?\\d+|[[:alpha:]_](?:[\\w-]*\\w)?)" + }, + { + "name": "variable.language.jison", + "match": "\\byy(?:l(?:eng|ineno|oc|stack)|rulelength|s(?:tate|s?tack)|text|vstack)\\b" + }, + { + "name": "keyword.other.jison", + "match": "\\byy(?:clearin|erro[kr])\\b" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/json.tmLanguage.json b/src/lib/shiki/languages/json.tmLanguage.json new file mode 100644 index 0000000..f11db55 --- /dev/null +++ b/src/lib/shiki/languages/json.tmLanguage.json @@ -0,0 +1,213 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/microsoft/vscode-JSON.tmLanguage/blob/master/JSON.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/microsoft/vscode-JSON.tmLanguage/commit/9bd83f1c252b375e957203f21793316203f61f70", + "name": "json", + "scopeName": "source.json", + "patterns": [ + { + "include": "#value" + } + ], + "repository": { + "array": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.json" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.json" + } + }, + "name": "meta.structure.array.json", + "patterns": [ + { + "include": "#value" + }, + { + "match": ",", + "name": "punctuation.separator.array.json" + }, + { + "match": "[^\\s\\]]", + "name": "invalid.illegal.expected-array-separator.json" + } + ] + }, + "comments": { + "patterns": [ + { + "begin": "/\\*\\*(?!/)", + "captures": { + "0": { + "name": "punctuation.definition.comment.json" + } + }, + "end": "\\*/", + "name": "comment.block.documentation.json" + }, + { + "begin": "/\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.json" + } + }, + "end": "\\*/", + "name": "comment.block.json" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.comment.json" + } + }, + "match": "(//).*$\\n?", + "name": "comment.line.double-slash.js" + } + ] + }, + "constant": { + "match": "\\b(?:true|false|null)\\b", + "name": "constant.language.json" + }, + "number": { + "match": "(?x) # turn on extended mode\n -? # an optional minus\n (?:\n 0 # a zero\n | # ...or...\n [1-9] # a 1-9 character\n \\d* # followed by zero or more digits\n )\n (?:\n (?:\n \\. # a period\n \\d+ # followed by one or more digits\n )?\n (?:\n [eE] # an e character\n [+-]? # followed by an option +/-\n \\d+ # followed by one or more digits\n )? # make exponent optional\n )? # make decimal portion optional", + "name": "constant.numeric.json" + }, + "object": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json" + } + }, + "name": "meta.structure.dictionary.json", + "patterns": [ + { + "comment": "the JSON object key", + "include": "#objectkey" + }, + { + "include": "#comments" + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json" + } + }, + "end": "(,)|(?=\\})", + "endCaptures": { + "1": { + "name": "punctuation.separator.dictionary.pair.json" + } + }, + "name": "meta.structure.dictionary.value.json", + "patterns": [ + { + "comment": "the JSON object value", + "include": "#value" + }, + { + "match": "[^\\s,]", + "name": "invalid.illegal.expected-dictionary-separator.json" + } + ] + }, + { + "match": "[^\\s\\}]", + "name": "invalid.illegal.expected-dictionary-separator.json" + } + ] + }, + "string": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json" + } + }, + "name": "string.quoted.double.json", + "patterns": [ + { + "include": "#stringcontent" + } + ] + }, + "objectkey": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.support.type.property-name.begin.json" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.support.type.property-name.end.json" + } + }, + "name": "string.json support.type.property-name.json", + "patterns": [ + { + "include": "#stringcontent" + } + ] + }, + "stringcontent": { + "patterns": [ + { + "match": "(?x) # turn on extended mode\n \\\\ # a literal backslash\n (?: # ...followed by...\n [\"\\\\/bfnrt] # one of these characters\n | # ...or...\n u # a u\n [0-9a-fA-F]{4}) # and four hex digits", + "name": "constant.character.escape.json" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unrecognized-string-escape.json" + } + ] + }, + "value": { + "patterns": [ + { + "include": "#constant" + }, + { + "include": "#number" + }, + { + "include": "#string" + }, + { + "include": "#array" + }, + { + "include": "#object" + }, + { + "include": "#comments" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/json5.tmLanguage.json b/src/lib/shiki/languages/json5.tmLanguage.json new file mode 100644 index 0000000..d95c20e --- /dev/null +++ b/src/lib/shiki/languages/json5.tmLanguage.json @@ -0,0 +1,241 @@ +{ + "scopeName": "source.json5", + "fileTypes": ["json5"], + "name": "json5", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#value" + } + ], + "repository": { + "array": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.json5" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.json5" + } + }, + "name": "meta.structure.array.json5", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#value" + }, + { + "match": ",", + "name": "punctuation.separator.array.json5" + }, + { + "match": "[^\\s\\]]", + "name": "invalid.illegal.expected-array-separator.json5" + } + ] + }, + "constant": { + "match": "\\b(?:true|false|null|Infinity|NaN)\\b", + "name": "constant.language.json5" + }, + "infinity": { + "match": "(-)*\\b(?:Infinity|NaN)\\b", + "name": "constant.language.json5" + }, + "number": { + "patterns": [ + { + "comment": "handles hexadecimal numbers", + "match": "(0x)[0-9a-fA-f]*", + "name": "constant.hex.numeric.json5" + }, + { + "comment": "handles integer and decimal numbers", + "match": "[+-.]?(?=[1-9]|0(?!\\d))\\d+(\\.\\d+)?([eE][+-]?\\d+)?", + "name": "constant.dec.numeric.json5" + } + ] + }, + "object": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json5" + } + }, + "comment": "a json5 object", + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json5" + } + }, + "name": "meta.structure.dictionary.json5", + "patterns": [ + { + "include": "#comments" + }, + { + "comment": "the json5 object key", + "include": "#key" + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json5" + } + }, + "end": "(,)|(?=\\})", + "endCaptures": { + "1": { + "name": "punctuation.separator.dictionary.pair.json5" + } + }, + "name": "meta.structure.dictionary.value.json5", + "patterns": [ + { + "comment": "the json5 object value", + "include": "#value" + }, + { + "match": "[^\\s,]", + "name": "invalid.illegal.expected-dictionary-separator.json5" + } + ] + }, + { + "match": "[^\\s\\}]", + "name": "invalid.illegal.expected-dictionary-separator.json5" + } + ] + }, + "stringSingle": { + "begin": "[']", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json5" + } + }, + "end": "[']", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json5" + } + }, + "name": "string.quoted.json5", + "patterns": [ + { + "match": "(?x: # turn on extended mode\n \\\\ # a literal backslash\n (?: # ...followed by...\n [\"\\\\/bfnrt] # one of these characters\n | # ...or...\n u # a u\n [0-9a-fA-F]{4} # and four hex digits\n )\n )", + "name": "constant.character.escape.json5" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unrecognized-string-escape.json5" + } + ] + }, + "stringDouble": { + "begin": "[\"]", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json5" + } + }, + "end": "[\"]", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json5" + } + }, + "name": "string.quoted.json5", + "patterns": [ + { + "match": "(?x: # turn on extended mode\n \\\\ # a literal backslash\n (?: # ...followed by...\n [\"\\\\/bfnrt] # one of these characters\n | # ...or...\n u # a u\n [0-9a-fA-F]{4} # and four hex digits\n )\n )", + "name": "constant.character.escape.json5" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unrecognized-string-escape.json5" + } + ] + }, + "key": { + "name": "string.key.json5", + "patterns": [ + { + "include": "#stringSingle" + }, + { + "include": "#stringDouble" + }, + { + "match": "[a-zA-Z0-9_-]", + "name": "string.key.json5" + } + ] + }, + "value": { + "comment": "the 'value' diagram at http://json.org", + "patterns": [ + { + "include": "#constant" + }, + { + "include": "#infinity" + }, + { + "include": "#number" + }, + { + "include": "#stringSingle" + }, + { + "include": "#stringDouble" + }, + { + "include": "#array" + }, + { + "include": "#object" + } + ] + }, + "comments": { + "patterns": [ + { + "match": "/{2}.*", + "name": "comment.single.json5" + }, + { + "begin": "/\\*\\*(?!/)", + "captures": { + "0": { + "name": "punctuation.definition.comment.json5" + } + }, + "end": "\\*/", + "name": "comment.block.documentation.json5" + }, + { + "begin": "/\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.json5" + } + }, + "end": "\\*/", + "name": "comment.block.json5" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/jsonc.tmLanguage.json b/src/lib/shiki/languages/jsonc.tmLanguage.json new file mode 100644 index 0000000..a440d4d --- /dev/null +++ b/src/lib/shiki/languages/jsonc.tmLanguage.json @@ -0,0 +1,213 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/microsoft/vscode-JSON.tmLanguage/blob/master/JSON.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/microsoft/vscode-JSON.tmLanguage/commit/9bd83f1c252b375e957203f21793316203f61f70", + "name": "jsonc", + "scopeName": "source.json.comments", + "patterns": [ + { + "include": "#value" + } + ], + "repository": { + "array": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.json.comments" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.json.comments" + } + }, + "name": "meta.structure.array.json.comments", + "patterns": [ + { + "include": "#value" + }, + { + "match": ",", + "name": "punctuation.separator.array.json.comments" + }, + { + "match": "[^\\s\\]]", + "name": "invalid.illegal.expected-array-separator.json.comments" + } + ] + }, + "comments": { + "patterns": [ + { + "begin": "/\\*\\*(?!/)", + "captures": { + "0": { + "name": "punctuation.definition.comment.json.comments" + } + }, + "end": "\\*/", + "name": "comment.block.documentation.json.comments" + }, + { + "begin": "/\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.json.comments" + } + }, + "end": "\\*/", + "name": "comment.block.json.comments" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.comment.json.comments" + } + }, + "match": "(//).*$\\n?", + "name": "comment.line.double-slash.js" + } + ] + }, + "constant": { + "match": "\\b(?:true|false|null)\\b", + "name": "constant.language.json.comments" + }, + "number": { + "match": "(?x) # turn on extended mode\n -? # an optional minus\n (?:\n 0 # a zero\n | # ...or...\n [1-9] # a 1-9 character\n \\d* # followed by zero or more digits\n )\n (?:\n (?:\n \\. # a period\n \\d+ # followed by one or more digits\n )?\n (?:\n [eE] # an e character\n [+-]? # followed by an option +/-\n \\d+ # followed by one or more digits\n )? # make exponent optional\n )? # make decimal portion optional", + "name": "constant.numeric.json.comments" + }, + "object": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.comments" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.comments" + } + }, + "name": "meta.structure.dictionary.json.comments", + "patterns": [ + { + "comment": "the JSON object key", + "include": "#objectkey" + }, + { + "include": "#comments" + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.comments" + } + }, + "end": "(,)|(?=\\})", + "endCaptures": { + "1": { + "name": "punctuation.separator.dictionary.pair.json.comments" + } + }, + "name": "meta.structure.dictionary.value.json.comments", + "patterns": [ + { + "comment": "the JSON object value", + "include": "#value" + }, + { + "match": "[^\\s,]", + "name": "invalid.illegal.expected-dictionary-separator.json.comments" + } + ] + }, + { + "match": "[^\\s\\}]", + "name": "invalid.illegal.expected-dictionary-separator.json.comments" + } + ] + }, + "string": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.comments" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.comments" + } + }, + "name": "string.quoted.double.json.comments", + "patterns": [ + { + "include": "#stringcontent" + } + ] + }, + "objectkey": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.support.type.property-name.begin.json.comments" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.support.type.property-name.end.json.comments" + } + }, + "name": "string.json.comments support.type.property-name.json.comments", + "patterns": [ + { + "include": "#stringcontent" + } + ] + }, + "stringcontent": { + "patterns": [ + { + "match": "(?x) # turn on extended mode\n \\\\ # a literal backslash\n (?: # ...followed by...\n [\"\\\\/bfnrt] # one of these characters\n | # ...or...\n u # a u\n [0-9a-fA-F]{4}) # and four hex digits", + "name": "constant.character.escape.json.comments" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unrecognized-string-escape.json.comments" + } + ] + }, + "value": { + "patterns": [ + { + "include": "#constant" + }, + { + "include": "#number" + }, + { + "include": "#string" + }, + { + "include": "#array" + }, + { + "include": "#object" + }, + { + "include": "#comments" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/jsonl.tmLanguage.json b/src/lib/shiki/languages/jsonl.tmLanguage.json new file mode 100644 index 0000000..f925d27 --- /dev/null +++ b/src/lib/shiki/languages/jsonl.tmLanguage.json @@ -0,0 +1,213 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/microsoft/vscode-JSON.tmLanguage/blob/master/JSON.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/microsoft/vscode-JSON.tmLanguage/commit/9bd83f1c252b375e957203f21793316203f61f70", + "name": "jsonl", + "scopeName": "source.json.lines", + "patterns": [ + { + "include": "#value" + } + ], + "repository": { + "array": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.json.lines" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.json.lines" + } + }, + "name": "meta.structure.array.json.lines", + "patterns": [ + { + "include": "#value" + }, + { + "match": ",", + "name": "punctuation.separator.array.json.lines" + }, + { + "match": "[^\\s\\]]", + "name": "invalid.illegal.expected-array-separator.json.lines" + } + ] + }, + "comments": { + "patterns": [ + { + "begin": "/\\*\\*(?!/)", + "captures": { + "0": { + "name": "punctuation.definition.comment.json.lines" + } + }, + "end": "\\*/", + "name": "comment.block.documentation.json.lines" + }, + { + "begin": "/\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.json.lines" + } + }, + "end": "\\*/", + "name": "comment.block.json.lines" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.comment.json.lines" + } + }, + "match": "(//).*$\\n?", + "name": "comment.line.double-slash.js" + } + ] + }, + "constant": { + "match": "\\b(?:true|false|null)\\b", + "name": "constant.language.json.lines" + }, + "number": { + "match": "(?x) # turn on extended mode\n -? # an optional minus\n (?:\n 0 # a zero\n | # ...or...\n [1-9] # a 1-9 character\n \\d* # followed by zero or more digits\n )\n (?:\n (?:\n \\. # a period\n \\d+ # followed by one or more digits\n )?\n (?:\n [eE] # an e character\n [+-]? # followed by an option +/-\n \\d+ # followed by one or more digits\n )? # make exponent optional\n )? # make decimal portion optional", + "name": "constant.numeric.json.lines" + }, + "object": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dictionary.begin.json.lines" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.dictionary.end.json.lines" + } + }, + "name": "meta.structure.dictionary.json.lines", + "patterns": [ + { + "comment": "the JSON object key", + "include": "#objectkey" + }, + { + "include": "#comments" + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.dictionary.key-value.json.lines" + } + }, + "end": "(,)|(?=\\})", + "endCaptures": { + "1": { + "name": "punctuation.separator.dictionary.pair.json.lines" + } + }, + "name": "meta.structure.dictionary.value.json.lines", + "patterns": [ + { + "comment": "the JSON object value", + "include": "#value" + }, + { + "match": "[^\\s,]", + "name": "invalid.illegal.expected-dictionary-separator.json.lines" + } + ] + }, + { + "match": "[^\\s\\}]", + "name": "invalid.illegal.expected-dictionary-separator.json.lines" + } + ] + }, + "string": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.json.lines" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.json.lines" + } + }, + "name": "string.quoted.double.json.lines", + "patterns": [ + { + "include": "#stringcontent" + } + ] + }, + "objectkey": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.support.type.property-name.begin.json.lines" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.support.type.property-name.end.json.lines" + } + }, + "name": "string.json.lines support.type.property-name.json.lines", + "patterns": [ + { + "include": "#stringcontent" + } + ] + }, + "stringcontent": { + "patterns": [ + { + "match": "(?x) # turn on extended mode\n \\\\ # a literal backslash\n (?: # ...followed by...\n [\"\\\\/bfnrt] # one of these characters\n | # ...or...\n u # a u\n [0-9a-fA-F]{4}) # and four hex digits", + "name": "constant.character.escape.json.lines" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unrecognized-string-escape.json.lines" + } + ] + }, + "value": { + "patterns": [ + { + "include": "#constant" + }, + { + "include": "#number" + }, + { + "include": "#string" + }, + { + "include": "#array" + }, + { + "include": "#object" + }, + { + "include": "#comments" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/jsonnet.tmLanguage.json b/src/lib/shiki/languages/jsonnet.tmLanguage.json new file mode 100644 index 0000000..231f6e4 --- /dev/null +++ b/src/lib/shiki/languages/jsonnet.tmLanguage.json @@ -0,0 +1,211 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "jsonnet", + "patterns": [ + { + "include": "#expression" + }, + { + "include": "#keywords" + } + ], + "repository": { + "builtin-functions": { + "patterns": [ + { + "match": "\\bstd[.](acos|asin|atan|ceil|char|codepoint|cos|exp|exponent)\\b", + "name": "support.function.jsonnet" + }, + { + "match": "\\bstd[.](filter|floor|force|length|log|makeArray|mantissa)\\b", + "name": "support.function.jsonnet" + }, + { + "match": "\\bstd[.](objectFields|objectHas|pow|sin|sqrt|tan|type|thisFile)\\b", + "name": "support.function.jsonnet" + }, + { + "match": "\\bstd[.](acos|asin|atan|ceil|char|codepoint|cos|exp|exponent)\\b", + "name": "support.function.jsonnet" + }, + { + "match": "\\bstd[.](abs|assertEqual|escapeString(Bash|Dollars|Json|Python))\\b", + "name": "support.function.jsonnet" + }, + { + "match": "\\bstd[.](filterMap|flattenArrays|foldl|foldr|format|join)\\b", + "name": "support.function.jsonnet" + }, + { + "match": "\\bstd[.](lines|manifest(Ini|Python(Vars)?)|map|max|min|mod)\\b", + "name": "support.function.jsonnet" + }, + { + "match": "\\bstd[.](set|set(Diff|Inter|Member|Union)|sort)\\b", + "name": "support.function.jsonnet" + }, + { + "match": "\\bstd[.](range|split|stringChars|substr|toString|uniq)\\b", + "name": "support.function.jsonnet" + } + ] + }, + "comment": { + "patterns": [ + { + "begin": "/\\*", + "end": "\\*/", + "name": "comment.block.jsonnet" + }, + { + "match": "//.*$", + "name": "comment.line.jsonnet" + }, + { + "match": "#.*$", + "name": "comment.block.jsonnet" + } + ] + }, + "double-quoted-strings": { + "begin": "\"", + "end": "\"", + "name": "string.quoted.double.jsonnet", + "patterns": [ + { + "match": "\\\\([\"\\\\/bfnrt]|(u[0-9a-fA-F]{4}))", + "name": "constant.character.escape.jsonnet" + }, + { + "match": "\\\\[^\"\\\\/bfnrtu]", + "name": "invalid.illegal.jsonnet" + } + ] + }, + "expression": { + "patterns": [ + { + "include": "#literals" + }, + { + "include": "#comment" + }, + { + "include": "#single-quoted-strings" + }, + { + "include": "#double-quoted-strings" + }, + { + "include": "#triple-quoted-strings" + }, + { + "include": "#builtin-functions" + }, + { + "include": "#functions" + } + ] + }, + "functions": { + "patterns": [ + { + "begin": "\\b([a-zA-Z_][a-z0-9A-Z_]*)\\s*\\(", + "beginCaptures": { + "1": { + "name": "entity.name.function.jsonnet" + } + }, + "end": "\\)", + "name": "meta.function", + "patterns": [ + { + "include": "#expression" + } + ] + } + ] + }, + "keywords": { + "patterns": [ + { + "match": "[!:~\\+\\-&\\|\\^=<>\\*\\/%]", + "name": "keyword.operator.jsonnet" + }, + { + "match": "\\$", + "name": "keyword.other.jsonnet" + }, + { + "match": "\\b(self|super|import|importstr|local|tailstrict)\\b", + "name": "keyword.other.jsonnet" + }, + { + "match": "\\b(if|then|else|for|in|error|assert)\\b", + "name": "keyword.control.jsonnet" + }, + { + "match": "\\b(function)\\b", + "name": "storage.type.jsonnet" + }, + { + "match": "[a-zA-Z_][a-z0-9A-Z_]*\\s*(:::|\\+:::)", + "name": "variable.parameter.jsonnet" + }, + { + "match": "[a-zA-Z_][a-z0-9A-Z_]*\\s*(::|\\+::)", + "name": "entity.name.type" + }, + { + "match": "[a-zA-Z_][a-z0-9A-Z_]*\\s*(:|\\+:)", + "name": "variable.parameter.jsonnet" + } + ] + }, + "literals": { + "patterns": [ + { + "match": "\\b(true|false|null)\\b", + "name": "constant.language.jsonnet" + }, + { + "match": "\\b(\\d+([Ee][+-]?\\d+)?)\\b", + "name": "constant.numeric.jsonnet" + }, + { + "match": "\\b\\d+[.]\\d*([Ee][+-]?\\d+)?\\b", + "name": "constant.numeric.jsonnet" + }, + { + "match": "\\b[.]\\d+([Ee][+-]?\\d+)?\\b", + "name": "constant.numeric.jsonnet" + } + ] + }, + "single-quoted-strings": { + "begin": "'", + "end": "'", + "name": "string.quoted.double.jsonnet", + "patterns": [ + { + "match": "\\\\(['\\\\/bfnrt]|(u[0-9a-fA-F]{4}))", + "name": "constant.character.escape.jsonnet" + }, + { + "match": "\\\\[^'\\\\/bfnrtu]", + "name": "invalid.illegal.jsonnet" + } + ] + }, + "triple-quoted-strings": { + "patterns": [ + { + "begin": "\\|\\|\\|", + "end": "\\|\\|\\|", + "name": "string.quoted.triple.jsonnet" + } + ] + } + }, + "scopeName": "source.jsonnet" +} diff --git a/src/lib/shiki/languages/jssm.tmLanguage.json b/src/lib/shiki/languages/jssm.tmLanguage.json new file mode 100644 index 0000000..d251ac0 --- /dev/null +++ b/src/lib/shiki/languages/jssm.tmLanguage.json @@ -0,0 +1,156 @@ +{ + "fileTypes": ["jssm", "jssm_state"], + "name": "jssm", + "patterns": [ + { + "begin": "/\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.mn" + } + }, + "comment": "block comment", + "end": "\\*/", + "name": "comment.block.jssm" + }, + { + "begin": "//", + "comment": "block comment", + "end": "$", + "name": "comment.line.jssm" + }, + { + "begin": "\\${", + "captures": { + "0": { + "name": "entity.name.function" + } + }, + "comment": "js outcalls", + "end": "}", + "name": "keyword.other" + }, + { + "comment": "semver", + "match": "([0-9]*)(\\.)([0-9]*)(\\.)([0-9]*)", + "name": "constant.numeric" + }, + { + "comment": "jssm language tokens", + "match": "graph_layout(\\s*)(:)", + "name": "constant.language.jssmLanguage" + }, + { + "comment": "jssm language tokens", + "match": "machine_name(\\s*)(:)", + "name": "constant.language.jssmLanguage" + }, + { + "comment": "jssm language tokens", + "match": "machine_version(\\s*)(:)", + "name": "constant.language.jssmLanguage" + }, + { + "comment": "jssm language tokens", + "match": "jssm_version(\\s*)(:)", + "name": "constant.language.jssmLanguage" + }, + { + "comment": "transitions", + "match": "<->", + "name": "keyword.control.transition.jssmArrow.legal_legal" + }, + { + "comment": "transitions", + "match": "<-", + "name": "keyword.control.transition.jssmArrow.legal_none" + }, + { + "comment": "transitions", + "match": "->", + "name": "keyword.control.transition.jssmArrow.none_legal" + }, + { + "comment": "transitions", + "match": "<=>", + "name": "keyword.control.transition.jssmArrow.main_main" + }, + { + "comment": "transitions", + "match": "=>", + "name": "keyword.control.transition.jssmArrow.none_main" + }, + { + "comment": "transitions", + "match": "<=", + "name": "keyword.control.transition.jssmArrow.main_none" + }, + { + "comment": "transitions", + "match": "<~>", + "name": "keyword.control.transition.jssmArrow.forced_forced" + }, + { + "comment": "transitions", + "match": "~>", + "name": "keyword.control.transition.jssmArrow.none_forced" + }, + { + "comment": "transitions", + "match": "<~", + "name": "keyword.control.transition.jssmArrow.forced_none" + }, + { + "comment": "transitions", + "match": "<-=>", + "name": "keyword.control.transition.jssmArrow.legal_main" + }, + { + "comment": "transitions", + "match": "<=->", + "name": "keyword.control.transition.jssmArrow.main_legal" + }, + { + "comment": "transitions", + "match": "<-~>", + "name": "keyword.control.transition.jssmArrow.legal_forced" + }, + { + "comment": "transitions", + "match": "<~->", + "name": "keyword.control.transition.jssmArrow.forced_legal" + }, + { + "comment": "transitions", + "match": "<=~>", + "name": "keyword.control.transition.jssmArrow.main_forced" + }, + { + "comment": "transitions", + "match": "<~=>", + "name": "keyword.control.transition.jssmArrow.forced_main" + }, + { + "comment": "edge probability annotation", + "match": "([0-9]+)%", + "name": "constant.numeric.jssmProbability" + }, + { + "comment": "action annotation", + "match": "\\'[^']*\\'", + "name": "constant.character.jssmAction" + }, + { + "comment": "jssm label annotation", + "match": "\\\"[^\"]*\\\"", + "name": "entity.name.tag.jssmLabel.doublequoted" + }, + { + "comment": "jssm label annotation", + "match": "([a-zA-Z0-9_.+&()#@!?,])", + "name": "entity.name.tag.jssmLabel.atom" + } + ], + "scopeName": "source.jssm", + "uuid": "2bb22b55-e811-4383-9929-ae6d0ab92aca" +} diff --git a/src/lib/shiki/languages/jsx.tmLanguage.json b/src/lib/shiki/languages/jsx.tmLanguage.json new file mode 100644 index 0000000..fd2a14e --- /dev/null +++ b/src/lib/shiki/languages/jsx.tmLanguage.json @@ -0,0 +1,5989 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/8c7482b94b548eab56da64dbfb30b82589b3f747", + "name": "jsx", + "scopeName": "source.js.jsx", + "patterns": [ + { + "include": "#directives" + }, + { + "include": "#statements" + }, + { + "include": "#shebang" + } + ], + "repository": { + "shebang": { + "name": "comment.line.shebang.js.jsx", + "match": "\\A(#!).*(?=$)", + "captures": { + "1": { + "name": "punctuation.definition.comment.js.jsx" + } + } + }, + "statements": { + "patterns": [ + { + "include": "#declaration" + }, + { + "include": "#control-statement" + }, + { + "include": "#after-operator-block-as-object-literal" + }, + { + "include": "#decl-block" + }, + { + "include": "#label" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-semicolon" + }, + { + "include": "#string" + }, + { + "include": "#comment" + } + ] + }, + "declaration": { + "patterns": [ + { + "include": "#decorator" + }, + { + "include": "#var-expr" + }, + { + "include": "#function-declaration" + }, + { + "include": "#class-declaration" + }, + { + "include": "#interface-declaration" + }, + { + "include": "#enum-declaration" + }, + { + "include": "#namespace-declaration" + }, + { + "include": "#type-alias-declaration" + }, + { + "include": "#import-equals-declaration" + }, + { + "include": "#import-declaration" + }, + { + "include": "#export-declaration" + }, + { + "name": "storage.modifier.js.jsx", + "match": "(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "beginCaptures": { + "1": { + "name": "meta.definition.variable.js.jsx entity.name.function.js.jsx" + }, + "2": { + "name": "keyword.operator.definiteassignment.js.jsx" + } + }, + "end": "(?=$|^|[;,=}]|((?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "beginCaptures": { + "1": { + "name": "meta.definition.variable.js.jsx variable.other.constant.js.jsx entity.name.function.js.jsx" + } + }, + "end": "(?=$|^|[;,=}]|((?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "1": { + "name": "storage.modifier.js.jsx" + }, + "2": { + "name": "keyword.operator.rest.js.jsx" + }, + "3": { + "name": "entity.name.function.js.jsx variable.language.this.js.jsx" + }, + "4": { + "name": "entity.name.function.js.jsx" + }, + "5": { + "name": "keyword.operator.optional.js.jsx" + } + } + }, + { + "match": "(?x)(?:(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "1": { + "name": "meta.definition.property.js.jsx entity.name.function.js.jsx" + }, + "2": { + "name": "keyword.operator.optional.js.jsx" + }, + "3": { + "name": "keyword.operator.definiteassignment.js.jsx" + } + } + }, + { + "name": "meta.definition.property.js.jsx variable.object.property.js.jsx", + "match": "\\#?[_$[:alpha:]][_$[:alnum:]]*" + }, + { + "name": "keyword.operator.optional.js.jsx", + "match": "\\?" + }, + { + "name": "keyword.operator.definiteassignment.js.jsx", + "match": "\\!" + } + ] + }, + "variable-initializer": { + "patterns": [ + { + "begin": "(?\\s*$)", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.js.jsx" + } + }, + "end": "(?=$|^|[,);}\\]]|((?]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", + "beginCaptures": { + "1": { + "name": "storage.modifier.js.jsx" + }, + "2": { + "name": "storage.modifier.js.jsx" + }, + "3": { + "name": "storage.modifier.js.jsx" + }, + "4": { + "name": "storage.modifier.async.js.jsx" + }, + "5": { + "name": "keyword.operator.new.js.jsx" + }, + "6": { + "name": "keyword.generator.asterisk.js.jsx" + } + }, + "end": "(?=\\}|;|,|$)|(?<=\\})", + "patterns": [ + { + "include": "#method-declaration-name" + }, + { + "include": "#function-body" + } + ] + }, + { + "name": "meta.method.declaration.js.jsx", + "begin": "(?x)(?]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", + "beginCaptures": { + "1": { + "name": "storage.modifier.js.jsx" + }, + "2": { + "name": "storage.modifier.js.jsx" + }, + "3": { + "name": "storage.modifier.js.jsx" + }, + "4": { + "name": "storage.modifier.async.js.jsx" + }, + "5": { + "name": "storage.type.property.js.jsx" + }, + "6": { + "name": "keyword.generator.asterisk.js.jsx" + } + }, + "end": "(?=\\}|;|,|$)|(?<=\\})", + "patterns": [ + { + "include": "#method-declaration-name" + }, + { + "include": "#function-body" + } + ] + } + ] + }, + "object-literal-method-declaration": { + "name": "meta.method.declaration.js.jsx", + "begin": "(?x)(?]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.js.jsx" + }, + "2": { + "name": "storage.type.property.js.jsx" + }, + "3": { + "name": "keyword.generator.asterisk.js.jsx" + } + }, + "end": "(?=\\}|;|,)|(?<=\\})", + "patterns": [ + { + "include": "#method-declaration-name" + }, + { + "include": "#function-body" + }, + { + "begin": "(?x)(?]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.js.jsx" + }, + "2": { + "name": "storage.type.property.js.jsx" + }, + "3": { + "name": "keyword.generator.asterisk.js.jsx" + } + }, + "end": "(?=\\(|\\<)", + "patterns": [ + { + "include": "#method-declaration-name" + } + ] + } + ] + }, + "method-declaration-name": { + "begin": "(?x)(?=((\\b(?)", + "captures": { + "1": { + "name": "storage.modifier.async.js.jsx" + }, + "2": { + "name": "variable.parameter.js.jsx" + } + } + }, + { + "name": "meta.arrow.js.jsx", + "begin": "(?x) (?:\n (? is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.js.jsx" + } + }, + "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-parameters" + }, + { + "include": "#function-parameters" + }, + { + "include": "#arrow-return-type" + }, + { + "include": "#possibly-arrow-return-type" + } + ] + }, + { + "name": "meta.arrow.js.jsx", + "begin": "=>", + "beginCaptures": { + "0": { + "name": "storage.type.function.arrow.js.jsx" + } + }, + "end": "((?<=\\}|\\S)(?)|((?!\\{)(?=\\S)))(?!\\/[\\/\\*])", + "patterns": [ + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#decl-block" + }, + { + "include": "#expression" + } + ] + } + ] + }, + "indexer-declaration": { + "name": "meta.indexer.declaration.js.jsx", + "begin": "(?:(?]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.block.js.jsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.js.jsx" + } + }, + "patterns": [ + { + "include": "#object-member" + } + ] + }, + "object-literal": { + "name": "meta.objectliteral.js.jsx", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.js.jsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.js.jsx" + } + }, + "patterns": [ + { + "include": "#object-member" + } + ] + }, + "object-member": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#object-literal-method-declaration" + }, + { + "name": "meta.object.member.js.jsx meta.object-literal.key.js.jsx", + "begin": "(?=\\[)", + "end": "(?=:)|((?<=[\\]])(?=\\s*[\\(\\<]))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#array-literal" + } + ] + }, + { + "name": "meta.object.member.js.jsx meta.object-literal.key.js.jsx", + "begin": "(?=[\\'\\\"\\`])", + "end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\s+(as|satisifies)\\s+))))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + } + ] + }, + { + "name": "meta.object.member.js.jsx meta.object-literal.key.js.jsx", + "begin": "(?x)(?=(\\b(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "0": { + "name": "meta.object-literal.key.js.jsx" + }, + "1": { + "name": "entity.name.function.js.jsx" + } + } + }, + { + "name": "meta.object.member.js.jsx", + "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)", + "captures": { + "0": { + "name": "meta.object-literal.key.js.jsx" + } + } + }, + { + "name": "meta.object.member.js.jsx", + "begin": "\\.\\.\\.", + "beginCaptures": { + "0": { + "name": "keyword.operator.spread.js.jsx" + } + }, + "end": "(?=,|\\})", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "meta.object.member.js.jsx", + "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$|\\/\\/|\\/\\*)", + "captures": { + "1": { + "name": "variable.other.readwrite.js.jsx" + } + } + }, + { + "name": "meta.object.member.js.jsx", + "match": "(?]|\\|\\||\\&\\&|\\!\\=\\=|$|^|((?]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.js.jsx" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#type-parameters" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.js.jsx" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.js.jsx" + } + }, + "patterns": [ + { + "include": "#expression-inside-possibly-arrow-parens" + } + ] + } + ] + }, + { + "begin": "(?<=:)\\s*(async)?\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.js.jsx" + }, + "2": { + "name": "meta.brace.round.js.jsx" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.js.jsx" + } + }, + "patterns": [ + { + "include": "#expression-inside-possibly-arrow-parens" + } + ] + }, + { + "begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.js.jsx" + } + }, + "end": "(?<=\\>)", + "patterns": [ + { + "include": "#type-parameters" + } + ] + }, + { + "begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", + "beginCaptures": { + "1": { + "name": "meta.brace.round.js.jsx" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.js.jsx" + } + }, + "patterns": [ + { + "include": "#expression-inside-possibly-arrow-parens" + } + ] + }, + { + "include": "#possibly-arrow-return-type" + }, + { + "include": "#expression" + } + ] + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#decl-block" + } + ] + }, + "ternary-expression": { + "begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)(?!\\?)", + "beginCaptures": { + "1": { + "name": "keyword.operator.ternary.js.jsx" + } + }, + "end": "\\s*(:)", + "endCaptures": { + "1": { + "name": "keyword.operator.ternary.js.jsx" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "function-call": { + "patterns": [ + { + "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?))*(?)*(?\\s*)?\\())", + "end": "(?<=\\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?))*(?)*(?\\s*)?\\())", + "patterns": [ + { + "name": "meta.function-call.js.jsx", + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))", + "end": "(?=\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?))*(?)*(?\\s*)?\\())", + "patterns": [ + { + "include": "#function-call-target" + } + ] + }, + { + "include": "#comment" + }, + { + "include": "#function-call-optionals" + }, + { + "include": "#type-arguments" + }, + { + "include": "#paren-expression" + } + ] + }, + { + "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))", + "end": "(?<=\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))", + "patterns": [ + { + "name": "meta.function-call.js.jsx", + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))", + "end": "(?=(<\\s*[\\{\\[\\(]\\s*$))", + "patterns": [ + { + "include": "#function-call-target" + } + ] + }, + { + "include": "#comment" + }, + { + "include": "#function-call-optionals" + }, + { + "include": "#type-arguments" + } + ] + } + ] + }, + "function-call-target": { + "patterns": [ + { + "include": "#support-function-call-identifiers" + }, + { + "name": "entity.name.function.js.jsx", + "match": "(\\#?[_$[:alpha:]][_$[:alnum:]]*)" + } + ] + }, + "function-call-optionals": { + "patterns": [ + { + "name": "meta.function-call.js.jsx punctuation.accessor.optional.js.jsx", + "match": "\\?\\." + }, + { + "name": "meta.function-call.js.jsx keyword.operator.definiteassignment.js.jsx", + "match": "\\!" + } + ] + }, + "support-function-call-identifiers": { + "patterns": [ + { + "include": "#literal" + }, + { + "include": "#support-objects" + }, + { + "include": "#object-identifiers" + }, + { + "include": "#punctuation-accessor" + }, + { + "name": "keyword.operator.expression.import.js.jsx", + "match": "(?:(?]|\\|\\||\\&\\&|\\!\\=\\=|$|((?]|\\|\\||\\&\\&|\\!\\=\\=|$|(===|!==|==|!=)|(([\\&\\~\\^\\|]\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s+instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.js.jsx" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#paren-expression-possibly-arrow-with-typeparameters" + } + ] + }, + { + "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\()|(<)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)))\\s*$)", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.js.jsx" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#paren-expression-possibly-arrow-with-typeparameters" + } + ] + }, + { + "include": "#possibly-arrow-return-type" + } + ] + }, + "paren-expression-possibly-arrow-with-typeparameters": { + "patterns": [ + { + "include": "#type-parameters" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.js.jsx" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.js.jsx" + } + }, + "patterns": [ + { + "include": "#expression-inside-possibly-arrow-parens" + } + ] + } + ] + }, + "expression-inside-possibly-arrow-parens": { + "patterns": [ + { + "include": "#expressionWithoutIdentifiers" + }, + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "include": "#decorator" + }, + { + "include": "#destructuring-parameter" + }, + { + "match": "(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "1": { + "name": "storage.modifier.js.jsx" + }, + "2": { + "name": "keyword.operator.rest.js.jsx" + }, + "3": { + "name": "entity.name.function.js.jsx variable.language.this.js.jsx" + }, + "4": { + "name": "entity.name.function.js.jsx" + }, + "5": { + "name": "keyword.operator.optional.js.jsx" + } + } + }, + { + "match": "(?x)(?:(?]|\\|\\||\\&\\&|\\!\\=\\=|$|((?>=|>>>=|\\|=" + }, + { + "name": "keyword.operator.bitwise.shift.js.jsx", + "match": "<<|>>>|>>" + }, + { + "name": "keyword.operator.comparison.js.jsx", + "match": "===|!==|==|!=" + }, + { + "name": "keyword.operator.relational.js.jsx", + "match": "<=|>=|<>|<|>" + }, + { + "match": "(?<=[_$[:alnum:]])(\\!)\\s*(?:(/=)|(?:(/)(?![/*])))", + "captures": { + "1": { + "name": "keyword.operator.logical.js.jsx" + }, + "2": { + "name": "keyword.operator.assignment.compound.js.jsx" + }, + "3": { + "name": "keyword.operator.arithmetic.js.jsx" + } + } + }, + { + "name": "keyword.operator.logical.js.jsx", + "match": "\\!|&&|\\|\\||\\?\\?" + }, + { + "name": "keyword.operator.bitwise.js.jsx", + "match": "\\&|~|\\^|\\|" + }, + { + "name": "keyword.operator.assignment.js.jsx", + "match": "\\=" + }, + { + "name": "keyword.operator.decrement.js.jsx", + "match": "--" + }, + { + "name": "keyword.operator.increment.js.jsx", + "match": "\\+\\+" + }, + { + "name": "keyword.operator.arithmetic.js.jsx", + "match": "%|\\*|/|-|\\+" + }, + { + "begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(?:(/=)|(?:(/)(?![/*]))))", + "end": "(?:(/=)|(?:(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)))", + "endCaptures": { + "1": { + "name": "keyword.operator.assignment.compound.js.jsx" + }, + "2": { + "name": "keyword.operator.arithmetic.js.jsx" + } + }, + "patterns": [ + { + "include": "#comment" + } + ] + }, + { + "match": "(?<=[_$[:alnum:])\\]])\\s*(?:(/=)|(?:(/)(?![/*])))", + "captures": { + "1": { + "name": "keyword.operator.assignment.compound.js.jsx" + }, + "2": { + "name": "keyword.operator.arithmetic.js.jsx" + } + } + } + ] + }, + "typeof-operator": { + "begin": "(?:&|{\\?]|(extends\\s+)|$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#type-arguments" + }, + { + "include": "#expression" + } + ] + }, + "literal": { + "patterns": [ + { + "include": "#numeric-literal" + }, + { + "include": "#boolean-literal" + }, + { + "include": "#null-literal" + }, + { + "include": "#undefined-literal" + }, + { + "include": "#numericConstant-literal" + }, + { + "include": "#array-literal" + }, + { + "include": "#this-literal" + }, + { + "include": "#super-literal" + } + ] + }, + "array-literal": { + "name": "meta.array.literal.js.jsx", + "begin": "\\s*(\\[)", + "beginCaptures": { + "1": { + "name": "meta.brace.square.js.jsx" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "meta.brace.square.js.jsx" + } + }, + "patterns": [ + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "numeric-literal": { + "patterns": [ + { + "name": "constant.numeric.hex.js.jsx", + "match": "\\b(?]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))", + "captures": { + "1": { + "name": "punctuation.accessor.js.jsx" + }, + "2": { + "name": "punctuation.accessor.optional.js.jsx" + }, + "3": { + "name": "support.variable.property.js.jsx" + }, + "4": { + "name": "support.constant.js.jsx" + } + } + }, + { + "match": "(?)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "captures": { + "1": { + "name": "punctuation.accessor.js.jsx" + }, + "2": { + "name": "punctuation.accessor.optional.js.jsx" + }, + "3": { + "name": "entity.name.function.js.jsx" + } + } + }, + { + "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])", + "captures": { + "1": { + "name": "punctuation.accessor.js.jsx" + }, + "2": { + "name": "punctuation.accessor.optional.js.jsx" + }, + "3": { + "name": "variable.other.constant.property.js.jsx" + } + } + }, + { + "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "punctuation.accessor.js.jsx" + }, + "2": { + "name": "punctuation.accessor.optional.js.jsx" + }, + "3": { + "name": "variable.other.property.js.jsx" + } + } + }, + { + "name": "variable.other.constant.js.jsx", + "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])" + }, + { + "name": "variable.other.readwrite.js.jsx", + "match": "[_$[:alpha:]][_$[:alnum:]]*" + } + ] + }, + "object-identifiers": { + "patterns": [ + { + "name": "support.class.js.jsx", + "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))" + }, + { + "match": "(?x)(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n (\\#?[[:upper:]][_$[:digit:][:upper:]]*) |\n (\\#?[_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "punctuation.accessor.js.jsx" + }, + "2": { + "name": "punctuation.accessor.optional.js.jsx" + }, + "3": { + "name": "variable.other.constant.object.property.js.jsx" + }, + "4": { + "name": "variable.other.object.property.js.jsx" + } + } + }, + { + "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "variable.other.constant.object.js.jsx" + }, + "2": { + "name": "variable.other.object.js.jsx" + } + } + } + ] + }, + "type-annotation": { + "patterns": [ + { + "name": "meta.type.annotation.js.jsx", + "begin": "(:)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.js.jsx" + } + }, + "end": "(?])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "name": "meta.type.annotation.js.jsx", + "begin": "(:)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.js.jsx" + } + }, + "end": "(?])|(?=^\\s*$)|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", + "patterns": [ + { + "include": "#type" + } + ] + } + ] + }, + "parameter-type-annotation": { + "patterns": [ + { + "name": "meta.type.annotation.js.jsx", + "begin": "(:)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.js.jsx" + } + }, + "end": "(?=[,)])|(?==[^>])", + "patterns": [ + { + "include": "#type" + } + ] + } + ] + }, + "return-type": { + "patterns": [ + { + "name": "meta.return.type.js.jsx", + "begin": "(?<=\\))\\s*(:)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.js.jsx" + } + }, + "end": "(?|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))", + "patterns": [ + { + "include": "#arrow-return-type-body" + } + ] + }, + "possibly-arrow-return-type": { + "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)", + "beginCaptures": { + "1": { + "name": "meta.arrow.js.jsx meta.return.type.arrow.js.jsx keyword.operator.type.annotation.js.jsx" + } + }, + "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))", + "contentName": "meta.arrow.js.jsx meta.return.type.arrow.js.jsx", + "patterns": [ + { + "include": "#arrow-return-type-body" + } + ] + }, + "arrow-return-type-body": { + "patterns": [ + { + "begin": "(?<=[:])(?=\\s*\\{)", + "end": "(?<=\\})", + "patterns": [ + { + "include": "#type-object" + } + ] + }, + { + "include": "#type-predicate-operator" + }, + { + "include": "#type" + } + ] + }, + "type-parameters": { + "name": "meta.type.parameters.js.jsx", + "begin": "(<)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.typeparameters.begin.js.jsx" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.typeparameters.end.js.jsx" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "name": "storage.modifier.js.jsx", + "match": "(?)" + } + ] + }, + "type-arguments": { + "name": "meta.type.parameters.js.jsx", + "begin": "\\<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.begin.js.jsx" + } + }, + "end": "\\>", + "endCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.end.js.jsx" + } + }, + "patterns": [ + { + "include": "#type-arguments-body" + } + ] + }, + "type-arguments-body": { + "patterns": [ + { + "match": "(?)\n ))\n ))\n)) |\n(:\\s*(?\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))))", + "captures": { + "1": { + "name": "storage.modifier.js.jsx" + }, + "2": { + "name": "keyword.operator.rest.js.jsx" + }, + "3": { + "name": "entity.name.function.js.jsx variable.language.this.js.jsx" + }, + "4": { + "name": "entity.name.function.js.jsx" + }, + "5": { + "name": "keyword.operator.optional.js.jsx" + } + } + }, + { + "match": "(?x)(?:(?)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-parameters" + } + ] + }, + { + "name": "meta.type.constructor.js.jsx", + "begin": "(?)\n ))\n )\n )\n)", + "end": "(?<=\\))", + "patterns": [ + { + "include": "#function-parameters" + } + ] + } + ] + }, + "type-function-return-type": { + "patterns": [ + { + "name": "meta.type.function.return.js.jsx", + "begin": "(=>)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "storage.type.function.arrow.js.jsx" + } + }, + "end": "(?)(?:\\?]|//|$)", + "patterns": [ + { + "include": "#type-function-return-type-core" + } + ] + }, + { + "name": "meta.type.function.return.js.jsx", + "begin": "=>", + "beginCaptures": { + "0": { + "name": "storage.type.function.arrow.js.jsx" + } + }, + "end": "(?)(?]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))", + "patterns": [ + { + "include": "#type-function-return-type-core" + } + ] + } + ] + }, + "type-function-return-type-core": { + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?<==>)(?=\\s*\\{)", + "end": "(?<=\\})", + "patterns": [ + { + "include": "#type-object" + } + ] + }, + { + "include": "#type-predicate-operator" + }, + { + "include": "#type" + } + ] + }, + "type-operators": { + "patterns": [ + { + "include": "#typeof-operator" + }, + { + "include": "#type-infer" + }, + { + "begin": "([&|])(?=\\s*\\{)", + "beginCaptures": { + "0": { + "name": "keyword.operator.type.js.jsx" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#type-object" + } + ] + }, + { + "begin": "[&|]", + "beginCaptures": { + "0": { + "name": "keyword.operator.type.js.jsx" + } + }, + "end": "(?=\\S)" + }, + { + "name": "keyword.operator.expression.keyof.js.jsx", + "match": "(?)", + "endCaptures": { + "1": { + "name": "meta.type.parameters.js.jsx punctuation.definition.typeparameters.end.js.jsx" + } + }, + "contentName": "meta.type.parameters.js.jsx", + "patterns": [ + { + "include": "#type-arguments-body" + } + ] + }, + { + "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(<)", + "beginCaptures": { + "1": { + "name": "entity.name.type.js.jsx" + }, + "2": { + "name": "meta.type.parameters.js.jsx punctuation.definition.typeparameters.begin.js.jsx" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "meta.type.parameters.js.jsx punctuation.definition.typeparameters.end.js.jsx" + } + }, + "contentName": "meta.type.parameters.js.jsx", + "patterns": [ + { + "include": "#type-arguments-body" + } + ] + }, + { + "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", + "captures": { + "1": { + "name": "entity.name.type.module.js.jsx" + }, + "2": { + "name": "punctuation.accessor.js.jsx" + }, + "3": { + "name": "punctuation.accessor.optional.js.jsx" + } + } + }, + { + "name": "entity.name.type.js.jsx", + "match": "[_$[:alpha:]][_$[:alnum:]]*" + } + ] + }, + "punctuation-comma": { + "name": "punctuation.separator.comma.js.jsx", + "match": "," + }, + "punctuation-semicolon": { + "name": "punctuation.terminator.statement.js.jsx", + "match": ";" + }, + "punctuation-accessor": { + "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", + "captures": { + "1": { + "name": "punctuation.accessor.js.jsx" + }, + "2": { + "name": "punctuation.accessor.optional.js.jsx" + } + } + }, + "string": { + "patterns": [ + { + "include": "#qstring-single" + }, + { + "include": "#qstring-double" + }, + { + "include": "#template" + } + ] + }, + "qstring-double": { + "name": "string.quoted.double.js.jsx", + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.js.jsx" + } + }, + "end": "(\")|((?:[^\\\\\\n])$)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.js.jsx" + }, + "2": { + "name": "invalid.illegal.newline.js.jsx" + } + }, + "patterns": [ + { + "include": "#string-character-escape" + } + ] + }, + "qstring-single": { + "name": "string.quoted.single.js.jsx", + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.js.jsx" + } + }, + "end": "(\\')|((?:[^\\\\\\n])$)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.js.jsx" + }, + "2": { + "name": "invalid.illegal.newline.js.jsx" + } + }, + "patterns": [ + { + "include": "#string-character-escape" + } + ] + }, + "string-character-escape": { + "name": "constant.character.escape.js.jsx", + "match": "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\\{[0-9A-Fa-f]+\\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)" + }, + "template": { + "patterns": [ + { + "include": "#template-call" + }, + { + "contentName": "string.template.js.jsx", + "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)", + "beginCaptures": { + "1": { + "name": "entity.name.function.tagged-template.js.jsx" + }, + "2": { + "name": "string.template.js.jsx punctuation.definition.string.template.begin.js.jsx" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "string.template.js.jsx punctuation.definition.string.template.end.js.jsx" + } + }, + "patterns": [ + { + "include": "#template-substitution-element" + }, + { + "include": "#string-character-escape" + } + ] + } + ] + }, + "template-call": { + "patterns": [ + { + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?))*(?)*(?\\s*)?`)", + "end": "(?=`)", + "patterns": [ + { + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))", + "end": "(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?))*(?)*(?\\s*)?`)", + "patterns": [ + { + "include": "#support-function-call-identifiers" + }, + { + "name": "entity.name.function.tagged-template.js.jsx", + "match": "([_$[:alpha:]][_$[:alnum:]]*)" + } + ] + }, + { + "include": "#type-arguments" + } + ] + }, + { + "begin": "([_$[:alpha:]][_$[:alnum:]]*)?\\s*(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?))*(?)*(?\\s*)`)", + "beginCaptures": { + "1": { + "name": "entity.name.function.tagged-template.js.jsx" + } + }, + "end": "(?=`)", + "patterns": [ + { + "include": "#type-arguments" + } + ] + } + ] + }, + "template-substitution-element": { + "name": "meta.template.expression.js.jsx", + "begin": "\\$\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.template-expression.begin.js.jsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.template-expression.end.js.jsx" + } + }, + "patterns": [ + { + "include": "#expression" + } + ], + "contentName": "meta.embedded.line.js.jsx" + }, + "type-string": { + "patterns": [ + { + "include": "#qstring-single" + }, + { + "include": "#qstring-double" + }, + { + "include": "#template-type" + } + ] + }, + "template-type": { + "patterns": [ + { + "include": "#template-call" + }, + { + "contentName": "string.template.js.jsx", + "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)", + "beginCaptures": { + "1": { + "name": "entity.name.function.tagged-template.js.jsx" + }, + "2": { + "name": "string.template.js.jsx punctuation.definition.string.template.begin.js.jsx" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "string.template.js.jsx punctuation.definition.string.template.end.js.jsx" + } + }, + "patterns": [ + { + "include": "#template-type-substitution-element" + }, + { + "include": "#string-character-escape" + } + ] + } + ] + }, + "template-type-substitution-element": { + "name": "meta.template.expression.js.jsx", + "begin": "\\$\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.template-expression.begin.js.jsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.template-expression.end.js.jsx" + } + }, + "patterns": [ + { + "include": "#type" + } + ], + "contentName": "meta.embedded.line.js.jsx" + }, + "regex": { + "patterns": [ + { + "name": "string.regexp.js.jsx", + "begin": "(?|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.js.jsx" + } + }, + "end": "(/)([dgimsuy]*)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.js.jsx" + }, + "2": { + "name": "keyword.other.js.jsx" + } + }, + "patterns": [ + { + "include": "#regexp" + } + ] + }, + { + "name": "string.regexp.js.jsx", + "begin": "((?", + "captures": { + "0": { + "name": "keyword.other.back-reference.regexp" + }, + "1": { + "name": "variable.other.regexp" + } + } + }, + { + "name": "keyword.operator.quantifier.regexp", + "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??" + }, + { + "name": "keyword.operator.or.regexp", + "match": "\\|" + }, + { + "name": "meta.group.assertion.regexp", + "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?))?", + "beginCaptures": { + "0": { + "name": "punctuation.definition.group.regexp" + }, + "1": { + "name": "punctuation.definition.group.no-capture.regexp" + }, + "2": { + "name": "variable.other.regexp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.group.regexp" + } + }, + "patterns": [ + { + "include": "#regexp" + } + ] + }, + { + "name": "constant.other.character-class.set.regexp", + "begin": "(\\[)(\\^)?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.character-class.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + } + }, + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.definition.character-class.regexp" + } + }, + "patterns": [ + { + "name": "constant.other.character-class.range.regexp", + "match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))", + "captures": { + "1": { + "name": "constant.character.numeric.regexp" + }, + "2": { + "name": "constant.character.control.regexp" + }, + "3": { + "name": "constant.character.escape.backslash.regexp" + }, + "4": { + "name": "constant.character.numeric.regexp" + }, + "5": { + "name": "constant.character.control.regexp" + }, + "6": { + "name": "constant.character.escape.backslash.regexp" + } + } + }, + { + "include": "#regex-character-class" + } + ] + }, + { + "include": "#regex-character-class" + } + ] + }, + "regex-character-class": { + "patterns": [ + { + "name": "constant.other.character-class.regexp", + "match": "\\\\[wWsSdDtrnvf]|\\." + }, + { + "name": "constant.character.numeric.regexp", + "match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})" + }, + { + "name": "constant.character.control.regexp", + "match": "\\\\c[A-Z]" + }, + { + "name": "constant.character.escape.backslash.regexp", + "match": "\\\\." + } + ] + }, + "comment": { + "patterns": [ + { + "name": "comment.block.documentation.js.jsx", + "begin": "/\\*\\*(?!/)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.js.jsx" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.js.jsx" + } + }, + "patterns": [ + { + "include": "#docblock" + } + ] + }, + { + "name": "comment.block.js.jsx", + "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.js.jsx" + }, + "2": { + "name": "storage.type.internaldeclaration.js.jsx" + }, + "3": { + "name": "punctuation.decorator.internaldeclaration.js.jsx" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.js.jsx" + } + } + }, + { + "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.js.jsx" + }, + "2": { + "name": "comment.line.double-slash.js.jsx" + }, + "3": { + "name": "punctuation.definition.comment.js.jsx" + }, + "4": { + "name": "storage.type.internaldeclaration.js.jsx" + }, + "5": { + "name": "punctuation.decorator.internaldeclaration.js.jsx" + } + }, + "end": "(?=$)", + "contentName": "comment.line.double-slash.js.jsx" + } + ] + }, + "single-line-comment-consuming-line-ending": { + "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.js.jsx" + }, + "2": { + "name": "comment.line.double-slash.js.jsx" + }, + "3": { + "name": "punctuation.definition.comment.js.jsx" + }, + "4": { + "name": "storage.type.internaldeclaration.js.jsx" + }, + "5": { + "name": "punctuation.decorator.internaldeclaration.js.jsx" + } + }, + "end": "(?=^)", + "contentName": "comment.line.double-slash.js.jsx" + }, + "directives": { + "name": "comment.line.triple-slash.directive.js.jsx", + "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.js.jsx" + } + }, + "end": "(?=$)", + "patterns": [ + { + "name": "meta.tag.js.jsx", + "begin": "(<)(reference|amd-dependency|amd-module)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.directive.js.jsx" + }, + "2": { + "name": "entity.name.tag.directive.js.jsx" + } + }, + "end": "/>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.directive.js.jsx" + } + }, + "patterns": [ + { + "name": "entity.other.attribute-name.directive.js.jsx", + "match": "path|types|no-default-lib|lib|name|resolution-mode" + }, + { + "name": "keyword.operator.assignment.js.jsx", + "match": "=" + }, + { + "include": "#string" + } + ] + } + ] + }, + "docblock": { + "patterns": [ + { + "match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "constant.language.access-type.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "entity.name.type.instance.jsdoc" + }, + "4": { + "name": "punctuation.definition.bracket.angle.begin.jsdoc" + }, + "5": { + "name": "constant.other.email.link.underline.jsdoc" + }, + "6": { + "name": "punctuation.definition.bracket.angle.end.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # \n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # ", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "entity.name.type.instance.jsdoc" + }, + "4": { + "name": "keyword.operator.control.jsdoc" + }, + "5": { + "name": "entity.name.type.instance.jsdoc" + } + } + }, + { + "name": "meta.example.jsdoc", + "begin": "((@)example)\\s+", + "end": "(?=@|\\*/)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "patterns": [ + { + "match": "^\\s\\*\\s+" + }, + { + "contentName": "constant.other.description.jsdoc", + "begin": "\\G(<)caption(>)", + "beginCaptures": { + "0": { + "name": "entity.name.tag.inline.jsdoc" + }, + "1": { + "name": "punctuation.definition.bracket.angle.begin.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.angle.end.jsdoc" + } + }, + "end": "()|(?=\\*/)", + "endCaptures": { + "0": { + "name": "entity.name.tag.inline.jsdoc" + }, + "1": { + "name": "punctuation.definition.bracket.angle.begin.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.angle.end.jsdoc" + } + } + }, + { + "match": "[^\\s@*](?:[^*]|\\*[^/])*", + "captures": { + "0": { + "name": "source.embedded.js.jsx" + } + } + } + ] + }, + { + "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "constant.language.symbol-type.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!\n # Avoid matching bare URIs (also acceptable as links)\n https?://\n |\n # Avoid matching {@inline tags}; we match those below\n (?:\\[[^\\[\\]]*\\])? # Possible description [preceding]{@tag}\n {@(?:link|linkcode|linkplain|tutorial)\\b\n )\n # Matched namepath\n (?:[^@\\s*/]|\\*[^/])+\n )\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.link.underline.jsdoc" + }, + "4": { + "name": "entity.name.type.instance.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)template)\n\\s+\n# One or more valid identifiers\n(\n [A-Za-z_$] # First character: non-numeric word character\n [\\w$.\\[\\]]* # Rest of identifier\n (?: # Possible list of additional identifiers\n \\s* , \\s*\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n )*\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + } + } + }, + { + "begin": "(?x)((@)template)\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + }, + { + "name": "variable.other.jsdoc", + "match": "([A-Za-z_$][\\w$.\\[\\]]*)" + } + ] + }, + { + "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + } + } + }, + { + "begin": "((@)typedef)\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + }, + { + "name": "entity.name.type.instance.jsdoc", + "match": "(?:[^@\\s*/]|\\*[^/])+" + } + ] + }, + { + "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + }, + { + "name": "variable.other.jsdoc", + "match": "([A-Za-z_$][\\w$.\\[\\]]*)" + }, + { + "name": "variable.other.jsdoc", + "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[ ].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?>\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])* # Everything else\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))", + "captures": { + "1": { + "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc" + }, + "2": { + "name": "keyword.operator.assignment.jsdoc" + }, + "3": { + "name": "source.embedded.js.jsx" + }, + "4": { + "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc" + }, + "5": { + "name": "invalid.illegal.syntax.jsdoc" + } + } + } + ] + }, + { + "begin": "(?x)\n(\n (@)\n (?:define|enum|exception|export|extends|lends|implements|modifies\n |namespace|private|protected|returns?|satisfies|suppress|this|throws|type\n |yields?)\n)\n\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + } + ] + }, + { + "match": "(?x)\n(\n (@)\n (?:alias|augments|callback|constructs|emits|event|fires|exports?\n |extends|external|function|func|host|lends|listens|interface|memberof!?\n |method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "entity.name.type.instance.jsdoc" + } + } + }, + { + "contentName": "variable.other.jsdoc", + "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + }, + "4": { + "name": "punctuation.definition.string.begin.jsdoc" + } + }, + "end": "(\\3)|(?=$|\\*/)", + "endCaptures": { + "0": { + "name": "variable.other.jsdoc" + }, + "1": { + "name": "punctuation.definition.string.end.jsdoc" + } + } + }, + { + "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + } + } + }, + { + "name": "storage.type.class.jsdoc", + "match": "(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \\b", + "captures": { + "1": { + "name": "punctuation.definition.block.tag.jsdoc" + } + } + }, + { + "include": "#inline-tags" + }, + { + "match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\s+)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + } + } + ] + }, + "brackets": { + "patterns": [ + { + "begin": "{", + "end": "}|(?=\\*/)", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\[", + "end": "\\]|(?=\\*/)", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "inline-tags": { + "patterns": [ + { + "name": "constant.other.description.jsdoc", + "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))", + "captures": { + "1": { + "name": "punctuation.definition.bracket.square.begin.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.square.end.jsdoc" + } + } + }, + { + "name": "entity.name.type.instance.jsdoc", + "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*", + "beginCaptures": { + "1": { + "name": "punctuation.definition.bracket.curly.begin.jsdoc" + }, + "2": { + "name": "storage.type.class.jsdoc" + }, + "3": { + "name": "punctuation.definition.inline.tag.jsdoc" + } + }, + "end": "}|(?=\\*/)", + "endCaptures": { + "0": { + "name": "punctuation.definition.bracket.curly.end.jsdoc" + } + }, + "patterns": [ + { + "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?", + "captures": { + "1": { + "name": "variable.other.link.underline.jsdoc" + }, + "2": { + "name": "punctuation.separator.pipe.jsdoc" + } + } + }, + { + "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?", + "captures": { + "1": { + "name": "variable.other.description.jsdoc" + }, + "2": { + "name": "punctuation.separator.pipe.jsdoc" + } + } + } + ] + } + ] + }, + "jsdoctype": { + "patterns": [ + { + "contentName": "entity.name.type.instance.jsdoc", + "begin": "\\G({)", + "beginCaptures": { + "0": { + "name": "entity.name.type.instance.jsdoc" + }, + "1": { + "name": "punctuation.definition.bracket.curly.begin.jsdoc" + } + }, + "end": "((}))\\s*|(?=\\*/)", + "endCaptures": { + "1": { + "name": "entity.name.type.instance.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.curly.end.jsdoc" + } + }, + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "jsx": { + "patterns": [ + { + "include": "#jsx-tag-without-attributes-in-expression" + }, + { + "include": "#jsx-tag-in-expression" + } + ] + }, + "jsx-tag-without-attributes-in-expression": { + "begin": "(?:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", + "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", + "patterns": [ + { + "include": "#jsx-tag-without-attributes" + } + ] + }, + "jsx-tag-without-attributes": { + "name": "meta.tag.without-attributes.js.jsx", + "begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?)", + "end": "()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.js.jsx" + }, + "2": { + "name": "entity.name.tag.namespace.js.jsx" + }, + "3": { + "name": "punctuation.separator.namespace.js.jsx" + }, + "4": { + "name": "entity.name.tag.js.jsx" + }, + "5": { + "name": "support.class.component.js.jsx" + }, + "6": { + "name": "punctuation.definition.tag.end.js.jsx" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.js.jsx" + }, + "2": { + "name": "entity.name.tag.namespace.js.jsx" + }, + "3": { + "name": "punctuation.separator.namespace.js.jsx" + }, + "4": { + "name": "entity.name.tag.js.jsx" + }, + "5": { + "name": "support.class.component.js.jsx" + }, + "6": { + "name": "punctuation.definition.tag.end.js.jsx" + } + }, + "contentName": "meta.jsx.children.js.jsx", + "patterns": [ + { + "include": "#jsx-children" + } + ] + }, + "jsx-tag-in-expression": { + "begin": "(?x)\n (?:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", + "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", + "patterns": [ + { + "include": "#jsx-tag" + } + ] + }, + "jsx-tag": { + "name": "meta.tag.js.jsx", + "begin": "(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", + "end": "(/>)|(?:())", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.js.jsx" + }, + "2": { + "name": "punctuation.definition.tag.begin.js.jsx" + }, + "3": { + "name": "entity.name.tag.namespace.js.jsx" + }, + "4": { + "name": "punctuation.separator.namespace.js.jsx" + }, + "5": { + "name": "entity.name.tag.js.jsx" + }, + "6": { + "name": "support.class.component.js.jsx" + }, + "7": { + "name": "punctuation.definition.tag.end.js.jsx" + } + }, + "patterns": [ + { + "begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.js.jsx" + }, + "2": { + "name": "entity.name.tag.namespace.js.jsx" + }, + "3": { + "name": "punctuation.separator.namespace.js.jsx" + }, + "4": { + "name": "entity.name.tag.js.jsx" + }, + "5": { + "name": "support.class.component.js.jsx" + } + }, + "end": "(?=[/]?>)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-arguments" + }, + { + "include": "#jsx-tag-attributes" + } + ] + }, + { + "begin": "(>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.end.js.jsx" + } + }, + "end": "(?=)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#jsx-tag-attribute-name" + }, + { + "include": "#jsx-tag-attribute-assignment" + }, + { + "include": "#jsx-string-double-quoted" + }, + { + "include": "#jsx-string-single-quoted" + }, + { + "include": "#jsx-evaluated-code" + }, + { + "include": "#jsx-tag-attributes-illegal" + } + ] + }, + "jsx-tag-attribute-name": { + "match": "(?x)\n \\s*\n (?:([_$[:alpha:]][-_$[:alnum:].]*)(:))?\n ([_$[:alpha:]][-_$[:alnum:]]*)\n (?=\\s|=|/?>|/\\*|//)", + "captures": { + "1": { + "name": "entity.other.attribute-name.namespace.js.jsx" + }, + "2": { + "name": "punctuation.separator.namespace.js.jsx" + }, + "3": { + "name": "entity.other.attribute-name.js.jsx" + } + } + }, + "jsx-tag-attribute-assignment": { + "name": "keyword.operator.assignment.js.jsx", + "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))" + }, + "jsx-string-double-quoted": { + "name": "string.quoted.double.js.jsx", + "begin": "\"", + "end": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.js.jsx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.js.jsx" + } + }, + "patterns": [ + { + "include": "#jsx-entities" + } + ] + }, + "jsx-string-single-quoted": { + "name": "string.quoted.single.js.jsx", + "begin": "'", + "end": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.js.jsx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.js.jsx" + } + }, + "patterns": [ + { + "include": "#jsx-entities" + } + ] + }, + "jsx-tag-attributes-illegal": { + "name": "invalid.illegal.attribute.js.jsx", + "match": "\\S+" + } + } +} diff --git a/src/lib/shiki/languages/julia.tmLanguage.json b/src/lib/shiki/languages/julia.tmLanguage.json new file mode 100644 index 0000000..32a91bf --- /dev/null +++ b/src/lib/shiki/languages/julia.tmLanguage.json @@ -0,0 +1,983 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/JuliaEditorSupport/atom-language-julia/blob/master/grammars/julia_vscode.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/JuliaEditorSupport/atom-language-julia/commit/ccc0277c9ee9af34a0b50e5fa27a6f5191601b8c", + "name": "julia", + "scopeName": "source.julia", + "comment": "This grammar is used by Atom (Oniguruma), GitHub (PCRE), and VSCode (Oniguruma),\nso all regexps must be compatible with both engines.\n\nSpecs:\n- https://github.com/kkos/oniguruma/blob/master/doc/RE\n- https://www.pcre.org/current/doc/html/", + "patterns": [ + { + "include": "#operator" + }, + { + "include": "#array" + }, + { + "include": "#string" + }, + { + "include": "#parentheses" + }, + { + "include": "#bracket" + }, + { + "include": "#function_decl" + }, + { + "include": "#function_call" + }, + { + "include": "#keyword" + }, + { + "include": "#number" + }, + { + "include": "#comment" + }, + { + "include": "#type_decl" + }, + { + "include": "#symbol" + } + ], + "repository": { + "array": { + "patterns": [ + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "meta.bracket.julia" + } + }, + "end": "(\\])((?:\\.)?'*)", + "endCaptures": { + "1": { + "name": "meta.bracket.julia" + }, + "2": { + "name": "keyword.operator.transpose.julia" + } + }, + "name": "meta.array.julia", + "patterns": [ + { + "match": "\\bbegin\\b", + "name": "constant.numeric.julia" + }, + { + "match": "\\bend\\b", + "name": "constant.numeric.julia" + }, + { + "match": "\\bfor\\b", + "name": "keyword.control.julia" + }, + { + "include": "$self" + } + ] + } + ] + }, + "parentheses": { + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.bracket.julia" + } + }, + "end": "(\\))((?:\\.)?'*)", + "endCaptures": { + "1": { + "name": "meta.bracket.julia" + }, + "2": { + "name": "keyword.operator.transpose.julia" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "bracket": { + "patterns": [ + { + "match": "(?:\\(|\\)|\\[|\\]|\\{|\\}|,|;)(?!('|(?:\\.'))*\\.?')", + "name": "meta.bracket.julia" + } + ] + }, + "comment_tags": { + "patterns": [ + { + "match": "\\bTODO\\b", + "name": "keyword.other.comment-annotation.julia" + }, + { + "match": "\\bFIXME\\b", + "name": "keyword.other.comment-annotation.julia" + }, + { + "match": "\\bCHANGED\\b", + "name": "keyword.other.comment-annotation.julia" + }, + { + "match": "\\bXXX\\b", + "name": "keyword.other.comment-annotation.julia" + } + ] + }, + "comment": { + "patterns": [ + { + "include": "#comment_block" + }, + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.julia" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.julia", + "patterns": [ + { + "include": "#comment_tags" + } + ] + } + ] + }, + "comment_block": { + "patterns": [ + { + "begin": "#=", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.julia" + } + }, + "end": "=#", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.julia" + } + }, + "name": "comment.block.number-sign-equals.julia", + "patterns": [ + { + "include": "#comment_tags" + }, + { + "include": "#comment_block" + } + ] + } + ] + }, + "function_call": { + "patterns": [ + { + "begin": "((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)({(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})?\\.?(\\()", + "beginCaptures": { + "1": { + "name": "support.function.julia" + }, + "2": { + "name": "support.type.julia" + }, + "3": { + "name": "meta.bracket.julia" + } + }, + "end": "\\)(('|(\\.'))*\\.?')?", + "endCaptures": { + "0": { + "name": "meta.bracket.julia" + }, + "1": { + "name": "keyword.operator.transposed-func.julia" + } + }, + "patterns": [ + { + "match": "\\bfor\\b", + "name": "keyword.control.julia" + }, + { + "include": "$self" + } + ] + } + ] + }, + "function_decl": { + "patterns": [ + { + "captures": { + "1": { + "name": "entity.name.function.julia" + }, + "2": { + "name": "support.type.julia" + } + }, + "match": "((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)({(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})?(?=\\([^#]*\\)(::[^\\s]+)?(\\s*\\bwhere\\b\\s+.+?)?\\s*?=(?![=>]))", + "comment": "first group is function name\nSecond group is type parameters (e.g. {T<:Number, S})\nThen open parens\nThen a lookahead ensures that we are followed by:\n - anything (function argumnets)\n - 0 or more spaces\n - Finally an equal sign\nNegative lookahead ensures we don't have another equal sign (not `==`)" + }, + { + "captures": { + "1": { + "name": "keyword.other.julia" + }, + "2": { + "name": "keyword.operator.dots.julia" + }, + "3": { + "name": "entity.name.function.julia" + }, + "4": { + "name": "support.type.julia" + } + }, + "match": "\\b(function|macro)(?:\\s+(?:(?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*(\\.))?((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)({(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})?|\\s*)(?=\\()", + "comment": "similar regex to previous, but with keyword not 1-line syntax" + } + ] + }, + "keyword": { + "patterns": [ + { + "match": "\\b(?|<-|-->|=>)", + "name": "keyword.operator.arrow.julia" + }, + { + "match": "(?::=|\\+=|-=|\\*=|//=|/=|\\.//=|\\./=|\\.\\*=|\\\\=|\\.\\\\=|\\^=|\\.\\^=|%=|\\.%=|÷=|\\.÷=|\\|=|&=|\\.&=|⊻=|\\.⊻=|\\$=|<<=|>>=|>>>=|=(?!=))", + "name": "keyword.operator.update.julia" + }, + { + "match": "(?:<<|>>>|>>|\\.>>>|\\.>>|\\.<<)", + "name": "keyword.operator.shift.julia" + }, + { + "match": "(?:\\s*(::|>:|<:)\\s*((?:(?:Union)?\\([^)]*\\)|[[:alpha:]_$∇][[:word:]⁺-ₜ!′\\.]*(?:(?:{(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})|(?:\".+?(?=|\\.>|\\.<=|\\.<|\\.≤|\\.≥|==|\\.!=|\\.=|\\.!|<:|>:|:>|(?)>=|(?|<|≥|≤)", + "name": "keyword.operator.relation.julia" + }, + { + "match": "(?<=\\s)(?:\\?)(?=\\s)", + "name": "keyword.operator.ternary.julia" + }, + { + "match": "(?<=\\s)(?:\\:)(?=\\s)", + "name": "keyword.operator.ternary.julia" + }, + { + "match": "(?:\\|\\||&&|(?)", + "name": "keyword.operator.applies.julia" + }, + { + "match": "(?:\\||\\.\\||\\&|\\.\\&|~|\\.~|⊻|\\.⊻)", + "name": "keyword.operator.bitwise.julia" + }, + { + "match": "(?:\\+\\+|--|\\+|\\.\\+|-|\\.\\-|\\*|\\.\\*|//(?!=)|\\.//(?!=)|/|\\./|%|\\.%|\\\\|\\.\\\\|\\^|\\.\\^|÷|\\.÷|⋅|\\.⋅|∩|\\.∩|∪|\\.∪|×|√|∛)", + "name": "keyword.operator.arithmetic.julia" + }, + { + "match": "(?:∘)", + "name": "keyword.operator.compose.julia" + }, + { + "match": "(?:::|(?<=\\s)isa(?=\\s))", + "name": "keyword.operator.isa.julia" + }, + { + "match": "(?:(?<=\\s)in(?=\\s))", + "name": "keyword.operator.relation.in.julia" + }, + { + "match": "(?:\\.(?=(?:@|_|\\p{L}))|\\.\\.+)", + "name": "keyword.operator.dots.julia" + }, + { + "match": "(?:\\$)(?=.+)", + "name": "keyword.operator.interpolation.julia" + }, + { + "captures": { + "2": { + "name": "keyword.operator.transposed-variable.julia" + } + }, + "match": "((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)(('|(\\.'))*\\.?')" + }, + { + "captures": { + "1": { + "name": "bracket.end.julia" + }, + "2": { + "name": "keyword.operator.transposed-matrix.julia" + } + }, + "match": "(\\])((?:'|(?:\\.'))*\\.?')" + }, + { + "captures": { + "1": { + "name": "bracket.end.julia" + }, + "2": { + "name": "keyword.operator.transposed-parens.julia" + } + }, + "match": "(\\))((?:'|(?:\\.'))*\\.?')" + } + ] + }, + "string": { + "patterns": [ + { + "begin": "(?:(@doc)\\s((?:doc)?\"\"\")|(doc\"\"\"))", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "(\"\"\") ?(->)?", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.julia" + }, + "2": { + "name": "keyword.operator.arrow.julia" + } + }, + "name": "string.docstring.julia", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(i?cxx)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.cxx.julia", + "contentName": "meta.embedded.inline.cpp", + "patterns": [ + { + "include": "source.cpp#root_context" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(py)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "([\\s\\w]*)(\"\"\")", + "endCaptures": { + "2": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.python.julia", + "contentName": "meta.embedded.inline.python", + "patterns": [ + { + "include": "source.python" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(js)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.js.julia", + "contentName": "meta.embedded.inline.javascript", + "patterns": [ + { + "include": "source.js" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(R)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.R.julia", + "contentName": "meta.embedded.inline.r", + "patterns": [ + { + "include": "source.r" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(raw)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "name": "string.quoted.other.julia", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + } + }, + { + "begin": "(raw)(\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"", + "name": "string.quoted.other.julia", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + } + }, + { + "begin": "(sql)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.sql.julia", + "contentName": "meta.embedded.inline.sql", + "patterns": [ + { + "include": "source.sql" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "var\"\"\"", + "end": "\"\"\"", + "name": "constant.other.symbol.julia" + }, + { + "begin": "var\"", + "end": "\"", + "name": "constant.other.symbol.julia" + }, + { + "begin": "^\\s?(doc)?(\"\"\")\\s?$", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "(\"\"\")", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "string.docstring.julia", + "comment": "This only matches docstrings that start and end with triple quotes on\ntheir own line in the void", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "'(?!')", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "string.quoted.single.julia", + "patterns": [ + { + "include": "#string_escaped_char" + } + ] + }, + { + "begin": "\"\"\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.multiline.begin.julia" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.multiline.end.julia" + } + }, + "name": "string.quoted.triple.double.julia", + "comment": "multi-line string with triple double quotes", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "name": "string.quoted.double.julia", + "begin": "\"(?!\"\")", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "comment": "String with single pair of double quotes. Regex matches isolated double quote", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "r\"\"\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.regexp.begin.julia" + } + }, + "end": "(\"\"\")([imsx]{0,4})?", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.regexp.end.julia" + }, + "2": { + "comment": "I took this scope name from python regex grammar", + "name": "keyword.other.option-toggle.regexp.julia" + } + }, + "name": "string.regexp.julia", + "patterns": [ + { + "include": "#string_escaped_char" + } + ] + }, + { + "begin": "r\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.regexp.begin.julia" + } + }, + "end": "(\")([imsx]{0,4})?", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.regexp.end.julia" + }, + "2": { + "comment": "I took this scope name from python regex grammar", + "name": "keyword.other.option-toggle.regexp.julia" + } + }, + "name": "string.regexp.julia", + "patterns": [ + { + "include": "#string_escaped_char" + } + ] + }, + { + "begin": "(?!:_)(?:struct|mutable\\s+struct|abstract\\s+type|primitive\\s+type)\\s+((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)(\\s*(<:)\\s*(?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*(?:{.*})?)?", + "name": "meta.type.julia" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/kotlin.tmLanguage.json b/src/lib/shiki/languages/kotlin.tmLanguage.json new file mode 100644 index 0000000..a48519c --- /dev/null +++ b/src/lib/shiki/languages/kotlin.tmLanguage.json @@ -0,0 +1,577 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "kotlin", + "scopeName": "source.kotlin", + "patterns": [ + { + "include": "#import" + }, + { + "include": "#package" + }, + { + "include": "#code" + } + ], + "fileTypes": ["kt", "kts"], + "repository": { + "import": { + "begin": "\\b(import)\\b\\s*", + "beginCaptures": { + "1": { + "name": "storage.type.import.kotlin" + } + }, + "end": ";|$", + "name": "meta.import.kotlin", + "contentName": "entity.name.package.kotlin", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#hard-keywords" + }, + { + "match": "\\*", + "name": "variable.language.wildcard.kotlin" + } + ] + }, + "package": { + "begin": "\\b(package)\\b\\s*", + "beginCaptures": { + "1": { + "name": "storage.type.package.kotlin" + } + }, + "end": ";|$", + "name": "meta.package.kotlin", + "contentName": "entity.name.package.kotlin", + "patterns": [ + { + "include": "#comments" + } + ] + }, + "code": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#keywords" + }, + { + "include": "#annotation-simple" + }, + { + "include": "#annotation-site-list" + }, + { + "include": "#annotation-site" + }, + { + "include": "#class-declaration" + }, + { + "include": "#object-declaration" + }, + { + "include": "#type-alias" + }, + { + "include": "#function-declaration" + }, + { + "include": "#variable-declaration" + }, + { + "include": "#type-constraint" + }, + { + "include": "#type-annotation" + }, + { + "include": "#function-call" + }, + { + "include": "#method-reference" + }, + { + "include": "#key" + }, + { + "include": "#string" + }, + { + "include": "#string-empty" + }, + { + "include": "#string-multiline" + }, + { + "include": "#character" + }, + { + "include": "#lambda-arrow" + }, + { + "include": "#operators" + }, + { + "include": "#self-reference" + }, + { + "include": "#decimal-literal" + }, + { + "include": "#hex-literal" + }, + { + "include": "#binary-literal" + }, + { + "include": "#boolean-literal" + }, + { + "include": "#null-literal" + } + ] + }, + "comments": { + "patterns": [ + { + "include": "#comment-line" + }, + { + "include": "#comment-block" + }, + { + "include": "#comment-javadoc" + } + ] + }, + "comment-line": { + "begin": "//", + "end": "$", + "name": "comment.line.double-slash.kotlin" + }, + "comment-block": { + "begin": "/\\*(?!\\*)", + "end": "\\*/", + "name": "comment.block.kotlin" + }, + "comment-javadoc": { + "patterns": [ + { + "begin": "/\\*\\*", + "end": "\\*/", + "name": "comment.block.javadoc.kotlin", + "patterns": [ + { + "match": "@(return|constructor|receiver|sample|see|author|since|suppress)\\b", + "name": "keyword.other.documentation.javadoc.kotlin" + }, + { + "match": "(@param|@property)\\s+(\\S+)", + "captures": { + "1": { + "name": "keyword.other.documentation.javadoc.kotlin" + }, + "2": { + "name": "variable.parameter.kotlin" + } + } + }, + { + "match": "(@param)\\[(\\S+)\\]", + "captures": { + "1": { + "name": "keyword.other.documentation.javadoc.kotlin" + }, + "2": { + "name": "variable.parameter.kotlin" + } + } + }, + { + "match": "(@(?:exception|throws))\\s+(\\S+)", + "captures": { + "1": { + "name": "keyword.other.documentation.javadoc.kotlin" + }, + "2": { + "name": "entity.name.type.class.kotlin" + } + } + }, + { + "match": "{(@link)\\s+(\\S+)?#([\\w$]+\\s*\\([^\\(\\)]*\\)).*}", + "captures": { + "1": { + "name": "keyword.other.documentation.javadoc.kotlin" + }, + "2": { + "name": "entity.name.type.class.kotlin" + }, + "3": { + "name": "variable.parameter.kotlin" + } + } + } + ] + } + ] + }, + "keywords": { + "patterns": [ + { + "include": "#prefix-modifiers" + }, + { + "include": "#postfix-modifiers" + }, + { + "include": "#soft-keywords" + }, + { + "include": "#hard-keywords" + }, + { + "include": "#control-keywords" + } + ] + }, + "prefix-modifiers": { + "match": "\\b(abstract|final|enum|open|annotation|sealed|data|override|final|lateinit|private|protected|public|internal|inner|companion|noinline|crossinline|vararg|reified|tailrec|operator|infix|inline|external|const|suspend|value)\\b", + "name": "storage.modifier.other.kotlin" + }, + "postfix-modifiers": { + "match": "\\b(where|by|get|set)\\b", + "name": "storage.modifier.other.kotlin" + }, + "soft-keywords": { + "match": "\\b(catch|finally|field)\\b", + "name": "keyword.soft.kotlin" + }, + "hard-keywords": { + "match": "\\b(as|typeof|is|in)\\b", + "name": "keyword.hard.kotlin" + }, + "control-keywords": { + "match": "\\b(if|else|while|do|when|try|throw|break|continue|return|for)\\b", + "name": "keyword.control.kotlin" + }, + "annotation-simple": { + "match": "(?<([^<>]|\\g)+>)?", + "captures": { + "1": { + "name": "storage.type.class.kotlin" + }, + "2": { + "name": "entity.name.type.class.kotlin" + }, + "3": { + "patterns": [ + { + "include": "#type-parameter" + } + ] + } + } + }, + "object-declaration": { + "match": "\\b(object)\\s+(\\b\\w+\\b|`[^`]+`)", + "captures": { + "1": { + "name": "storage.type.object.kotlin" + }, + "2": { + "name": "entity.name.type.object.kotlin" + } + } + }, + "type-alias": { + "match": "\\b(typealias)\\s+(\\b\\w+\\b|`[^`]+`)\\s*(?<([^<>]|\\g)+>)?", + "captures": { + "1": { + "name": "storage.type.alias.kotlin" + }, + "2": { + "name": "entity.name.type.kotlin" + }, + "3": { + "patterns": [ + { + "include": "#type-parameter" + } + ] + } + } + }, + "function-declaration": { + "match": "\\b(fun)\\b\\s*(?<([^<>]|\\g)+>)?\\s*(?:(\\w+)\\.)?(\\b\\w+\\b|`[^`]+`)", + "captures": { + "1": { + "name": "storage.type.function.kotlin" + }, + "2": { + "patterns": [ + { + "include": "#type-parameter" + } + ] + }, + "4": { + "name": "entity.name.type.class.extension.kotlin" + }, + "5": { + "name": "entity.name.function.declaration.kotlin" + } + } + }, + "variable-declaration": { + "match": "\\b(val|var)\\b\\s*(?<([^<>]|\\g)+>)?", + "captures": { + "1": { + "name": "storage.type.variable.kotlin" + }, + "2": { + "patterns": [ + { + "include": "#type-parameter" + } + ] + } + } + }, + "type-parameter": { + "patterns": [ + { + "match": "\\b\\w+\\b", + "name": "entity.name.type.kotlin" + }, + { + "match": "\\b(in|out)\\b", + "name": "storage.modifier.kotlin" + } + ] + }, + "type-annotation": { + "match": "(?|(?[<(]([^<>()\"']|\\g)+[)>]))+", + "captures": { + "0": { + "patterns": [ + { + "include": "#type-parameter" + } + ] + } + } + }, + "function-call": { + "match": "\\??\\.?(\\b\\w+\\b|`[^`]+`)\\s*(?<([^<>]|\\g)+>)?\\s*(?=[({])", + "captures": { + "1": { + "name": "entity.name.function.call.kotlin" + }, + "2": { + "patterns": [ + { + "include": "#type-parameter" + } + ] + } + } + }, + "method-reference": { + "match": "\\??::(\\b\\w+\\b|`[^`]+`)", + "captures": { + "1": { + "name": "entity.name.function.reference.kotlin" + } + } + }, + "key": { + "match": "\\b(\\w=)\\s*(=)", + "captures": { + "1": { + "name": "variable.parameter.kotlin" + }, + "2": { + "name": "keyword.operator.assignment.kotlin" + } + } + }, + "string-empty": { + "match": "(?", + "name": "storage.type.function.arrow.kotlin" + }, + "operators": { + "patterns": [ + { + "match": "(===?|\\!==?|<=|>=|<|>)", + "name": "keyword.operator.comparison.kotlin" + }, + { + "match": "([+*/%-]=)", + "name": "keyword.operator.assignment.arithmetic.kotlin" + }, + { + "match": "(=)", + "name": "keyword.operator.assignment.kotlin" + }, + { + "match": "([+*/%-])", + "name": "keyword.operator.arithmetic.kotlin" + }, + { + "match": "(!|&&|\\|\\|)", + "name": "keyword.operator.logical.kotlin" + }, + { + "match": "(--|\\+\\+)", + "name": "keyword.operator.increment-decrement.kotlin" + }, + { + "match": "(\\.\\.)", + "name": "keyword.operator.range.kotlin" + } + ] + }, + "self-reference": { + "match": "\\b(this|super)(@\\w+)?\\b", + "name": "variable.language.this.kotlin" + } + } +} diff --git a/src/lib/shiki/languages/kusto.tmLanguage.json b/src/lib/shiki/languages/kusto.tmLanguage.json new file mode 100644 index 0000000..4912664 --- /dev/null +++ b/src/lib/shiki/languages/kusto.tmLanguage.json @@ -0,0 +1,684 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "scopeName": "source.kusto", + "fileTypes": ["csl", "kusto", "kql"], + "name": "kusto", + "patterns": [ + { + "match": "\\b(by|from|of|to|step|with)\\b", + "name": "keyword.other.operator.kusto", + "comment": "Tabular operators: common helper operators" + }, + { + "match": "\\b(let|set|alias|declare|pattern|query_parameters|restrict|access|set)\\b", + "name": "keyword.control.kusto", + "comment": "Query statements: https://docs.microsoft.com/en-us/azure/kusto/query/statements" + }, + { + "match": "\\b(and|or|has_all|has_any|matches|regex)\\b", + "name": "keyword.other.operator.kusto", + "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatypes-string-operators" + }, + { + "match": "\\b(cluster|database)(?:\\s*\\(\\s*(.+?)\\s*\\))?(?!\\w)", + "captures": { + "1": { + "name": "support.function.kusto" + }, + "2": { + "patterns": [ + { + "include": "#Strings" + } + ] + } + }, + "name": "meta.special.database.kusto", + "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/clusterfunction" + }, + { + "match": "\\b(external_table|materialized_view|materialize|table|toscalar)\\b", + "name": "support.function.kusto", + "comment": "Special functions: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/tablefunction" + }, + { + "match": "(?]*([>\\]]))?(?:(\\[)[^\\]]*(\\]))?(\\{)", + "captures": { + "1": { + "name": "keyword.control.cite.latex" + }, + "2": { + "name": "punctuation.definition.keyword.latex" + }, + "3": { + "patterns": [ + { + "include": "#autocites-arg" + } + ] + }, + "4": { + "name": "punctuation.definition.arguments.optional.begin.latex" + }, + "5": { + "name": "punctuation.definition.arguments.optional.end.latex" + }, + "6": { + "name": "punctuation.definition.arguments.optional.begin.latex" + }, + "7": { + "name": "punctuation.definition.arguments.optional.end.latex" + }, + "8": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "name": "meta.citation.latex", + "patterns": [ + { + "captures": { + "1": { + "name": "comment.line.percentage.tex" + }, + "2": { + "name": "punctuation.definition.comment.tex" + } + }, + "match": "((%).*)$" + }, + { + "match": "[\\p{Alphabetic}\\p{Number}:.-]+", + "name": "constant.other.reference.citation.latex" + } + ] + }, + { + "begin": "((\\\\)bibentry)(\\{)", + "captures": { + "1": { + "name": "keyword.control.cite.latex" + }, + "2": { + "name": "punctuation.definition.keyword.latex" + }, + "3": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "name": "meta.citation.latex", + "patterns": [ + { + "match": "[\\p{Alphabetic}\\p{Number}:.]+", + "name": "constant.other.reference.citation.latex" + } + ] + }, + { + "begin": "((\\\\)(?:\\w*[rR]ef\\*?))(\\{)", + "beginCaptures": { + "1": { + "name": "keyword.control.ref.latex" + }, + "2": { + "name": "punctuation.definition.keyword.latex" + }, + "3": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "name": "meta.reference.label.latex", + "patterns": [ + { + "match": "[\\p{Alphabetic}\\p{Number}\\.,:/*!^_-]", + "name": "constant.other.reference.label.latex" + } + ] + }, + { + "include": "#definition-label" + }, + { + "begin": "((\\\\)(?:verb|Verb|spverb)\\*?)\\s*((\\\\)scantokens)(\\{)", + "beginCaptures": { + "1": { + "name": "support.function.verb.latex" + }, + "2": { + "name": "punctuation.definition.function.latex" + }, + "3": { + "name": "support.function.verb.latex" + }, + "4": { + "name": "punctuation.definition.verb.latex" + }, + "5": { + "name": "punctuation.definition.begin.latex" + } + }, + "contentName": "markup.raw.verb.latex", + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.end.latex" + } + }, + "name": "meta.function.verb.latex", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "captures": { + "1": { + "name": "support.function.verb.latex" + }, + "2": { + "name": "punctuation.definition.function.latex" + }, + "3": { + "name": "punctuation.definition.verb.latex" + }, + "4": { + "name": "markup.raw.verb.latex" + }, + "5": { + "name": "punctuation.definition.verb.latex" + } + }, + "match": "((\\\\)(?:verb|Verb|spverb)\\*?)\\s*((?<=\\s)\\S|[^a-zA-Z])(.*?)(\\3|$)", + "name": "meta.function.verb.latex" + }, + { + "captures": { + "1": { + "name": "support.function.verb.latex" + }, + "2": { + "name": "punctuation.definition.function.latex" + }, + "3": { + "patterns": [ + { + "include": "#optional-arg" + } + ] + }, + "4": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "5": { + "name": "punctuation.definition.arguments.end.latex" + }, + "6": { + "name": "punctuation.definition.verb.latex" + }, + "7": { + "name": "markup.raw.verb.latex" + }, + "8": { + "name": "punctuation.definition.verb.latex" + }, + "9": { + "name": "punctuation.definition.verb.latex" + }, + "10": { + "name": "markup.raw.verb.latex" + }, + "11": { + "name": "punctuation.definition.verb.latex" + } + }, + "match": "((\\\\)(?:mint|mintinline))((?:\\[[^\\[]*?\\])?)(\\{)[a-zA-Z]*(\\})(?:(?:([^a-zA-Z\\{])(.*?)(\\6))|(?:(\\{)(.*?)(\\})))", + "name": "meta.function.verb.latex" + }, + { + "captures": { + "1": { + "name": "support.function.verb.latex" + }, + "2": { + "name": "punctuation.definition.function.latex" + }, + "3": { + "patterns": [ + { + "include": "#optional-arg" + } + ] + }, + "4": { + "name": "punctuation.definition.verb.latex" + }, + "5": { + "name": "markup.raw.verb.latex" + }, + "6": { + "name": "punctuation.definition.verb.latex" + }, + "7": { + "name": "punctuation.definition.verb.latex" + }, + "8": { + "name": "markup.raw.verb.latex" + }, + "9": { + "name": "punctuation.definition.verb.latex" + } + }, + "match": "((\\\\)[a-z]+inline)((?:\\[[^\\[]*?\\])?)(?:(?:([^a-zA-Z\\{])(.*?)(\\4))|(?:(\\{)(.*?)(\\})))", + "name": "meta.function.verb.latex" + }, + { + "captures": { + "1": { + "name": "support.function.verb.latex" + }, + "2": { + "name": "punctuation.definition.function.latex" + }, + "3": { + "patterns": [ + { + "include": "#optional-arg" + } + ] + }, + "4": { + "name": "punctuation.definition.verb.latex" + }, + "5": { + "name": "source.python", + "patterns": [ + { + "include": "source.python" + } + ] + }, + "6": { + "name": "punctuation.definition.verb.latex" + }, + "7": { + "name": "punctuation.definition.verb.latex" + }, + "8": { + "name": "source.python", + "patterns": [ + { + "include": "source.python" + } + ] + }, + "9": { + "name": "punctuation.definition.verb.latex" + } + }, + "match": "((\\\\)(?:(?:py|pycon|pylab|pylabcon|sympy|sympycon)[cv]?|pyq|pycq|pyif))((?:\\[[^\\[]*?\\])?)(?:(?:([^a-zA-Z\\{])(.*?)(\\4))|(?:(\\{)(.*?)(\\})))", + "name": "meta.function.verb.latex" + }, + { + "captures": { + "1": { + "name": "support.function.verb.latex" + }, + "2": { + "name": "punctuation.definition.function.latex" + }, + "3": { + "patterns": [ + { + "include": "#optional-arg" + } + ] + }, + "4": { + "name": "punctuation.definition.verb.latex" + }, + "5": { + "name": "source.julia", + "patterns": [ + { + "include": "source.julia" + } + ] + }, + "6": { + "name": "punctuation.definition.verb.latex" + }, + "7": { + "name": "punctuation.definition.verb.latex" + }, + "8": { + "name": "source.julia", + "patterns": [ + { + "include": "source.julia" + } + ] + }, + "9": { + "name": "punctuation.definition.verb.latex" + } + }, + "match": "((\\\\)(?:jl|julia)[cv]?)((?:\\[[^\\[]*?\\])?)(?:(?:([^a-zA-Z\\{])(.*?)(\\4))|(?:(\\{)(.*?)(\\})))", + "name": "meta.function.verb.latex" + }, + { + "match": "\\\\(?:newline|pagebreak|clearpage|linebreak|pause)(?:\\b)", + "name": "keyword.control.layout.latex" + }, + { + "begin": "\\\\\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.latex" + } + }, + "end": "\\\\\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.latex" + } + }, + "name": "meta.math.block.latex support.class.math.block.environment.latex", + "patterns": [ + { + "include": "text.tex#math" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "(?)(\\{)\\$(\\})", + "name": "meta.column-specials.latex" + }, + { + "include": "text.tex" + } + ], + "repository": { + "optional-arg": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.arguments.optional.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.optional.end.latex" + } + }, + "match": "(\\[)([^\\[]*?)(\\])", + "name": "meta.parameter.optional.latex" + } + ] + }, + "multiline-optional-arg-no-highlight": { + "begin": "\\G\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.arguments.optional.begin.latex" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.optional.end.latex" + } + }, + "name": "meta.parameter.optional.latex", + "patterns": [ + { + "include": "$self" + } + ] + }, + "multiline-optional-arg": { + "begin": "\\G\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.arguments.optional.begin.latex" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.optional.end.latex" + } + }, + "name": "meta.parameter.optional.latex", + "contentName": "variable.parameter.function.latex", + "patterns": [ + { + "include": "$self" + } + ] + }, + "autocites-arg": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.arguments.optional.begin.latex" + }, + "2": { + "name": "punctuation.definition.arguments.optional.end.latex" + }, + "3": { + "name": "punctuation.definition.arguments.optional.begin.latex" + }, + "4": { + "name": "punctuation.definition.arguments.optional.end.latex" + }, + "5": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "6": { + "name": "constant.other.reference.citation.latex" + }, + "7": { + "name": "punctuation.definition.arguments.end.latex" + }, + "8": { + "patterns": [ + { + "include": "#autocites-arg" + } + ] + } + }, + "match": "(?:(\\()[^\\)]*(\\))){0,2}(?:(\\[)[^\\]]*(\\])){0,2}(\\{)([\\p{Alphabetic}\\p{Number}:.]+)(\\})(.*)" + } + ] + }, + "begin-env-tokenizer": { + "captures": { + "1": { + "name": "support.function.be.latex" + }, + "2": { + "name": "punctuation.definition.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "4": { + "name": "variable.parameter.function.latex" + }, + "5": { + "name": "punctuation.definition.arguments.end.latex" + }, + "6": { + "name": "punctuation.definition.arguments.optional.begin.latex" + }, + "7": { + "patterns": [ + { + "include": "$base" + } + ] + }, + "8": { + "name": "punctuation.definition.arguments.optional.end.latex" + }, + "9": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "10": { + "name": "variable.parameter.function.latex" + }, + "11": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "match": "\\s*((\\\\)(?:begin|end))(\\{)([a-zA-Z]*\\*?)(\\})(?:(\\[)(.*)(\\]))?(?:(\\{)([^{}]*)(\\}))?" + }, + "definition-label": { + "begin": "((\\\\)label)((?:\\[[^\\[]*?\\])*)(\\{)", + "beginCaptures": { + "1": { + "name": "keyword.control.label.latex" + }, + "2": { + "name": "punctuation.definition.keyword.latex" + }, + "3": { + "patterns": [ + { + "include": "#optional-arg" + } + ] + }, + "4": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "name": "meta.definition.label.latex", + "patterns": [ + { + "match": "[\\p{Alphabetic}\\p{Number}\\.,:/*!^_-]", + "name": "variable.parameter.definition.label.latex" + } + ] + } + }, + "scopeName": "text.tex.latex" +} diff --git a/src/lib/shiki/languages/less.tmLanguage.json b/src/lib/shiki/languages/less.tmLanguage.json new file mode 100644 index 0000000..1f265af --- /dev/null +++ b/src/lib/shiki/languages/less.tmLanguage.json @@ -0,0 +1,542 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-less/blob/master/grammars/less.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/atom/language-less/commit/87d4d59e8de6796b506b81a16e1dc1fafc99d30f", + "name": "less", + "scopeName": "source.css.less", + "patterns": [ + { + "include": "#strings" + }, + { + "captures": { + "1": { + "name": "entity.other.attribute-name.class.mixin.css" + } + }, + "match": "(\\.[_a-zA-Z][a-zA-Z0-9_-]*(?=\\())" + }, + { + "captures": { + "1": { + "name": "entity.other.attribute-name.class.css" + }, + "2": { + "name": "punctuation.definition.entity.css" + }, + "4": { + "name": "variable.other.interpolation.less" + } + }, + "match": "((\\.)([_a-zA-Z]|(@{[a-zA-Z0-9_-]+}))[a-zA-Z0-9_-]*)" + }, + { + "captures": { + "0": { + "name": "entity.other.attribute-name.parent-selector.css" + }, + "1": { + "name": "punctuation.definition.entity.css" + } + }, + "match": "(&)[a-zA-Z0-9_-]*" + }, + { + "begin": "(format|local|url|attr|counter|counters)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "support.function.misc.css" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.function.css" + } + }, + "patterns": [ + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.css" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.css" + } + }, + "name": "string.quoted.single.css", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.css" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.css" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.css" + } + }, + "name": "string.quoted.double.css", + "patterns": [ + { + "match": "\\\\(\\d{1,6}|.)", + "name": "constant.character.escape.css" + } + ] + }, + { + "match": "[^'\") \\t]+", + "name": "variable.parameter.misc.css" + } + ] + }, + { + "match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b(?!.*?(?(['\"])(?:[^\\\\]|\\\\.)*?(\\6)))))?\\s*(\\])", + "name": "meta.attribute-selector.css" + }, + { + "begin": "((@)import\\b)", + "beginCaptures": { + "1": { + "name": "keyword.control.at-rule.import.less" + }, + "2": { + "name": "punctuation.definition.keyword.less" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.terminator.rule.css" + } + }, + "name": "meta.at-rule.import.css", + "patterns": [ + { + "match": "(?<=\\(|,|\\s)\\b(reference|optional|once|multiple|less|inline)\\b(?=\\)|,)", + "name": "keyword.control.import.option.less" + }, + { + "include": "#brace_round" + }, + { + "include": "source.css#commas" + }, + { + "include": "#strings" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.control.at-rule.fontface.css" + }, + "2": { + "name": "punctuation.definition.keyword.css" + } + }, + "match": "^\\s*((@)font-face\\b)", + "name": "meta.at-rule.fontface.css" + }, + { + "captures": { + "1": { + "name": "keyword.control.at-rule.media.css" + }, + "2": { + "name": "punctuation.definition.keyword.css" + } + }, + "match": "^\\s*((@)media\\b)", + "name": "meta.at-rule.media.css" + }, + { + "include": "source.css#media-features" + }, + { + "match": "\\b(tv|tty|screen|projection|print|handheld|embossed|braille|aural|all)\\b", + "name": "support.constant.media-type.media.css" + }, + { + "match": "\\b(portrait|landscape)\\b", + "name": "support.constant.property-value.media-property.media.css" + }, + { + "captures": { + "1": { + "name": "support.function.less" + } + }, + "match": "(\\.[a-zA-Z0-9_-]+)\\s*(;|\\()" + }, + { + "begin": "(^[ \\t]+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.less" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.less" + } + }, + "end": "\\n", + "name": "comment.line.double-slash.less" + } + ] + }, + { + "match": "(@|\\-\\-)[\\w-]+(?=\\s*)", + "name": "variable.other.less", + "captures": { + "1": { + "name": "punctuation.definition.variable.less" + } + } + }, + { + "include": "#variable_interpolation" + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.property-list.begin.bracket.curly.css" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.property-list.end.bracket.curly.css" + } + }, + "name": "meta.property-list.css", + "patterns": [ + { + "include": "source.css#pseudo-elements" + }, + { + "include": "source.css#pseudo-classes" + }, + { + "include": "source.css#tag-names" + }, + { + "include": "source.css#commas" + }, + { + "include": "#variable_interpolation" + }, + { + "include": "source.css#property-names" + }, + { + "include": "#property_values" + }, + { + "include": "$self" + } + ] + }, + { + "match": "\\!\\s*important", + "name": "keyword.other.important.css" + }, + { + "match": "\\*|\\/|\\-|\\+|~|=|<=|>=|<|>", + "name": "keyword.operator.less" + }, + { + "match": "\\b(not|and|when)\\b", + "name": "keyword.control.logical.operator.less" + }, + { + "include": "source.css#tag-names" + }, + { + "match": "(?|\\<|\\>\\=|\\<\\=|or|and|contains)(?:(?=\\s)|\\b)", + "captures": { + "1": { + "name": "keyword.operator.expression.liquid" + } + } + }, + "language_constant": { + "match": "\\b(false|true|nil|blank)\\b|empty(?!\\?)", + "name": "constant.language.liquid" + }, + "attribute": { + "begin": "\\w+:", + "end": "(?=,|%}|}}|\\|)", + "beginCaptures": { + "0": { + "name": "entity.other.attribute-name.liquid" + } + }, + "patterns": [ + { + "include": "#value_expression" + } + ] + }, + "attribute_liquid": { + "begin": "\\w+:", + "end": "(?=,|\\|)|$", + "beginCaptures": { + "0": { + "name": "entity.other.attribute-name.liquid" + } + }, + "patterns": [ + { + "include": "#value_expression" + } + ] + }, + "filter": { + "match": "\\|\\s*((?![\\.0-9])[a-zA-Z0-9_-]+\\:?)\\s*", + "captures": { + "1": { + "name": "support.function.liquid" + } + } + }, + "value_expression": { + "patterns": [ + { + "match": "(\\[)(\\|)(?=[^\\]]*)(?=\\])", + "captures": { + "2": { + "name": "invalid.illegal.filter.liquid" + }, + "3": { + "name": "invalid.illegal.filter.liquid" + } + } + }, + { + "match": "(?<=\\s)(\\+|\\-|\\/|\\*)(?=\\s)", + "name": "invalid.illegal.filter.liquid" + }, + { + "include": "#language_constant" + }, + { + "include": "#operator" + }, + { + "include": "#invalid_range" + }, + { + "include": "#range" + }, + { + "include": "#number" + }, + { + "include": "#string" + }, + { + "include": "#variable_lookup" + } + ] + }, + "variable_lookup": { + "patterns": [ + { + "match": "\\b(additional_checkout_buttons|address|all_country_option_tags|all_products|article|articles|block|blog|blogs|canonical_url|cart|checkout|collection|collections|comment|content_for_additional_checkout_buttons|content_for_header|content_for_index|content_for_layout|country_option_tags|currency|current_page|current_tags|customer|customer_address|discount_allocation|discount_application|external_video|font|forloop|form|fulfillment|gift_card|handle|image|images|line_item|link|linklist|linklists|location|localization|metafield|model|model_source|order|page|page_description|page_image|page_title|pages|paginate|part|policy|powered_by_link|predictive_search|product|product_option|product_variant|recommendations|request|routes|script|scripts|search|section|selling_plan|selling_plan_allocation|selling_plan_group|settings|shipping_method|shop|shop_locale|store_availability|tablerow|tax_line|template|theme|transaction|unit_price_measurement|variant|video|video_source)\\b", + "name": "variable.language.liquid" + }, + { + "match": "((?<=\\w\\:\\s)\\w+)", + "name": "variable.parameter.liquid" + }, + { + "begin": "(?<=\\w)\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.brackets.begin.liquid" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.section.brackets.end.liquid" + } + }, + "name": "meta.brackets.liquid", + "patterns": [ + { + "include": "#string" + } + ] + }, + { + "match": "(?<=(\\w|\\])\\.)([-\\w]+\\??)", + "name": "variable.other.member.liquid" + }, + { + "match": "(?<=\\w)\\.(?=\\w)", + "name": "punctuation.accessor.liquid" + }, + { + "match": "(?i)[a-z_](\\w|(?:-(?!\\}\\})))*", + "name": "variable.other.liquid" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/lisp.tmLanguage.json b/src/lib/shiki/languages/lisp.tmLanguage.json new file mode 100644 index 0000000..e7ca6be --- /dev/null +++ b/src/lib/shiki/languages/lisp.tmLanguage.json @@ -0,0 +1,117 @@ +{ + "comment": "", + "fileTypes": ["lisp", "cl", "l", "mud", "el"], + "foldingStartMarker": "\\(", + "foldingStopMarker": "\\)", + "keyEquivalent": "^~L", + "name": "lisp", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.comment.lisp" + } + }, + "match": "(;).*$\\n?", + "name": "comment.line.semicolon.lisp" + }, + { + "captures": { + "1": { + "name": "storage.type.function-type.lisp" + }, + "2": { + "name": "entity.name.function.lisp" + } + }, + "match": "(?:\\()((?i:defgeneric|define-compiler-macro|define-method-combination|define-modify-macro|define-setf-expander|defmacro|defmethod|defsetf|defun||define-\\S+))\\s+((?:\\w|[+\\-<>/*&=.?!$%:@\\[\\]^{}~#|])+)", + "name": "meta.function.lisp" + }, + { + "match": "(?<=\\s)(?i:&allow-other-keys|&aux|&body|&environment|&key|&optional|&rest|&whole)(?=\\s+)", + "name": "meta.function-parameters.lisp" + }, + { + "captures": { + "1": { + "name": "storage.type.function-type.lisp" + }, + "2": { + "name": "entity.name.type.lisp" + } + }, + "match": "(?:\\()((?i:deftype|defstruct|define-condition|defpackage|defclass))\\s+((?:\\w|[+\\-<>/*&=.?!$%:@\\[\\]^{}~#|])+)" + }, + { + "captures": { + "1": { + "name": "storage.type.function-type.lisp" + }, + "2": { + "name": "entity.name.variable.lisp" + } + }, + "match": "(?:\\()((?i:defvar|defconstant|defparameter|define-symbol-macro))\\s+((?:\\w|[+\\-<>/*&=.?!$%:@\\[\\]^{}~#|])+)" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.lisp" + } + }, + "match": "(#)(\\w|[\\\\+-=<>'\"&#])+", + "name": "constant.character.lisp" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.lisp" + }, + "3": { + "name": "punctuation.definition.variable.lisp" + } + }, + "match": "(?<=^|\\s|[()])(\\*)(\\S*)(\\*)(?=$|\\s|[()])", + "name": "variable.other.global.lisp" + }, + { + "match": "(?<=^|\\s|[()]):(\\w|[+\\-<>/*&=.?!$%:@\\[\\]^{}~#|])*", + "name": "keyword.constant.lisp" + }, + { + "match": "(?<=\\()(?i:\\*|\\*\\*|\\*\\*\\*|\\+|\\+\\+|\\+\\+\\+|\\-|/|//|///|/=|1\\+|1\\-|<|<=|=|>|>=|abort|abs|acons|acos|acosh|add-method|adjoin|adjust-array|adjustable-array-p|allocate-instance|alpha-char-p|alphanumericp|and|append|apply|apropos|apropos-list|aref|arithmetic-error|arithmetic-error-operands|arithmetic-error-operation|array|array-dimension|array-dimension-limit|array-dimensions|array-displacement|array-element-type|array-has-fill-pointer-p|array-in-bounds-p|array-rank|array-rank-limit|array-row-major-index|array-total-size|array-total-size-limit|arrayp|ash|asin|asinh|assert|assoc|assoc-if|assoc-if-not|atan|atanh|atom|base-char|base-string|bignum|bit|bit-and|bit-andc1|bit-andc2|bit-eqv|bit-ior|bit-nand|bit-nor|bit-not|bit-orc1|bit-orc2|bit-vector|bit-vector-p|bit-xor|block|boole|boole-1|boole-2|boole-and|boole-andc1|boole-andc2|boole-c1|boole-c2|boole-clr|boole-eqv|boole-ior|boole-nand|boole-nor|boole-orc1|boole-orc2|boole-set|boole-xor|boolean|both-case-p|boundp|break|broadcast-stream|broadcast-stream-streams|built-in-class|butlast|byte|byte-position|byte-size|caaaar|caaadr|caaar|caadar|caaddr|caadr|caar|cadaar|cadadr|cadar|caddar|cadddr|caddr|cadr|call-arguments-limit|call-method|call-next-method|car|case|catch|ccase|cdaaar|cdaadr|cdaar|cdadar|cdaddr|cdadr|cdar|cddaar|cddadr|cddar|cdddar|cddddr|cdddr|cddr|cdr|ceiling|cell-error|cell-error-name|cerror|change-class|char|char-code|char-code-limit|char-downcase|char-equal|char-greaterp|char-int|char-lessp|char-name|char-not-equal|char-not-greaterp|char-not-lessp|char-upcase|char/=|char<|char<=|char=|char>|char>=|character|characterp|check-type|cis|class|class-name|class-of|clear-input|clear-output|close|clrhash|code-char|coerce|compilation-speed|compile|compile-file|compile-file-pathname|compiled-function|compiled-function-p|compiler-macro|compiler-macro-function|complement|complex|complexp|compute-applicable-methods|compute-restarts|concatenate|concatenated-stream|concatenated-stream-streams|cond|condition|conjugate|cons|consp|constantly|constantp|continue|control-error|copy-alist|copy-list|copy-pprint-dispatch|copy-readtable|copy-seq|copy-structure|copy-symbol|copy-tree|cos|cosh|count|count-if|count-if-not|ctypecase|debug|decf|declaim|declaration|declare|decode-float|decode-universal-time|defclass|defconstant|defgeneric|define-compiler-macro|define-condition|define-method-combination|define-modify-macro|define-setf-expander|define-symbol-macro|defmacro|defmethod|defpackage|defparameter|defsetf|defstruct|deftype|defun|defvar|delete|delete-duplicates|delete-file|delete-if|delete-if-not|delete-package|denominator|deposit-field|describe|describe-object|destructuring-bind|digit-char|digit-char-p|directory|directory-namestring|disassemble|division-by-zero|do|do\\*|do-all-symbols|do-external-symbols|do-symbols|documentation|dolist|dotimes|double-float|double-float-epsilon|double-float-negative-epsilon|dpb|dribble|dynamic-extent|ecase|echo-stream|echo-stream-input-stream|echo-stream-output-stream|ed|eighth|elt|encode-universal-time|end-of-file|endp|enough-namestring|ensure-directories-exist|ensure-generic-function|eq|eql|equal|equalp|error|etypecase|eval|eval-when|evenp|every|exp|export|expt|extended-char|fboundp|fceiling|fdefinition|ffloor|fifth|file-author|file-error|file-error-pathname|file-length|file-namestring|file-position|file-stream|file-string-length|file-write-date|fill|fill-pointer|find|find-all-symbols|find-class|find-if|find-if-not|find-method|find-package|find-restart|find-symbol|finish-output|first|fixnum|flet|float|float-digits|float-precision|float-radix|float-sign|floating-point-inexact|floating-point-invalid-operation|floating-point-overflow|floating-point-underflow|floatp|floor|fmakunbound|force-output|format|formatter|fourth|fresh-line|fround|ftruncate|ftype|funcall|function|function-keywords|function-lambda-expression|functionp|gcd|generic-function|gensym|gentemp|get|get-decoded-time|get-dispatch-macro-character|get-internal-real-time|get-internal-run-time|get-macro-character|get-output-stream-string|get-properties|get-setf-expansion|get-universal-time|getf|gethash|go|graphic-char-p|handler-bind|handler-case|hash-table|hash-table-count|hash-table-p|hash-table-rehash-size|hash-table-rehash-threshold|hash-table-size|hash-table-test|host-namestring|identity|if|ignorable|ignore|ignore-errors|imagpart|import|in-package|incf|initialize-instance|inline|input-stream-p|inspect|integer|integer-decode-float|integer-length|integerp|interactive-stream-p|intern|internal-time-units-per-second|intersection|invalid-method-error|invoke-debugger|invoke-restart|invoke-restart-interactively|isqrt|keyword|keywordp|labels|lambda|lambda-list-keywords|lambda-parameters-limit|last|lcm|ldb|ldb-test|ldiff|least-negative-double-float|least-negative-long-float|least-negative-normalized-double-float|least-negative-normalized-long-float|least-negative-normalized-short-float|least-negative-normalized-single-float|least-negative-short-float|least-negative-single-float|least-positive-double-float|least-positive-long-float|least-positive-normalized-double-float|least-positive-normalized-long-float|least-positive-normalized-short-float|least-positive-normalized-single-float|least-positive-short-float|least-positive-single-float|length|let|let\\*|lisp-implementation-type|lisp-implementation-version|list|list\\*|list-all-packages|list-length|listen|listp|load|load-logical-pathname-translations|load-time-value|locally|log|logand|logandc1|logandc2|logbitp|logcount|logeqv|logical-pathname|logical-pathname-translations|logior|lognand|lognor|lognot|logorc1|logorc2|logtest|logxor|long-float|long-float-epsilon|long-float-negative-epsilon|long-site-name|loop|loop-finish|lower-case-p|machine-instance|machine-type|machine-version|macro-function|macroexpand|macroexpand-1|macrolet|make-array|make-broadcast-stream|make-concatenated-stream|make-condition|make-dispatch-macro-character|make-echo-stream|make-hash-table|make-instance|make-instances-obsolete|make-list|make-load-form|make-load-form-saving-slots|make-method|make-package|make-pathname|make-random-state|make-sequence|make-string|make-string-input-stream|make-string-output-stream|make-symbol|make-synonym-stream|make-two-way-stream|makunbound|map|map-into|mapc|mapcan|mapcar|mapcon|maphash|mapl|maplist|mask-field|max|member|member-if|member-if-not|merge|merge-pathnames|method|method-combination|method-combination-error|method-qualifiers|min|minusp|mismatch|mod|most-negative-double-float|most-negative-fixnum|most-negative-long-float|most-negative-short-float|most-negative-single-float|most-positive-double-float|most-positive-fixnum|most-positive-long-float|most-positive-short-float|most-positive-single-float|muffle-warning|multiple-value-bind|multiple-value-call|multiple-value-list|multiple-value-prog1|multiple-value-setq|multiple-values-limit|name-char|namestring|nbutlast|nconc|next-method-p|nil|nintersection|ninth|no-applicable-method|no-next-method|not|notany|notevery|notinline|nreconc|nreverse|nset-difference|nset-exclusive-or|nstring-capitalize|nstring-downcase|nstring-upcase|nsublis|nsubst|nsubst-if|nsubst-if-not|nsubstitute|nsubstitute-if|nsubstitute-if-not|nth|nth-value|nthcdr|null|number|numberp|numerator|nunion|oddp|open|open-stream-p|optimize|or|otherwise|output-stream-p|package|package-error|package-error-package|package-name|package-nicknames|package-shadowing-symbols|package-use-list|package-used-by-list|packagep|pairlis|parse-error|parse-integer|parse-namestring|pathname|pathname-device|pathname-directory|pathname-host|pathname-match-p|pathname-name|pathname-type|pathname-version|pathnamep|peek-char|phase|pi|plusp|pop|position|position-if|position-if-not|pprint|pprint-dispatch|pprint-exit-if-list-exhausted|pprint-fill|pprint-indent|pprint-linear|pprint-logical-block|pprint-newline|pprint-pop|pprint-tab|pprint-tabular|prin1|prin1-to-string|princ|princ-to-string|print|print-not-readable|print-not-readable-object|print-object|print-unreadable-object|probe-file|proclaim|prog|prog\\*|prog1|prog2|progn|program-error|progv|provide|psetf|psetq|push|pushnew|quote|random|random-state|random-state-p|rassoc|rassoc-if|rassoc-if-not|ratio|rational|rationalize|rationalp|read|read-byte|read-char|read-char-no-hang|read-delimited-list|read-from-string|read-line|read-preserving-whitespace|read-sequence|reader-error|readtable|readtable-case|readtablep|real|realp|realpart|reduce|reinitialize-instance|rem|remf|remhash|remove|remove-duplicates|remove-if|remove-if-not|remove-method|remprop|rename-file|rename-package|replace|require|rest|restart|restart-bind|restart-case|restart-name|return|return-from|revappend|reverse|room|rotatef|round|row-major-aref|rplaca|rplacd|safety|satisfies|sbit|scale-float|schar|search|second|sequence|serious-condition|set|set-difference|set-dispatch-macro-character|set-exclusive-or|set-macro-character|set-pprint-dispatch|set-syntax-from-char|setf|setq|seventh|shadow|shadowing-import|shared-initialize|shiftf|short-float|short-float-epsilon|short-float-negative-epsilon|short-site-name|signal|signed-byte|signum|simple-array|simple-base-string|simple-bit-vector|simple-bit-vector-p|simple-condition|simple-condition-format-arguments|simple-condition-format-control|simple-error|simple-string|simple-string-p|simple-type-error|simple-vector|simple-vector-p|simple-warning|sin|single-float|single-float-epsilon|single-float-negative-epsilon|sinh|sixth|sleep|slot-boundp|slot-exists-p|slot-makunbound|slot-missing|slot-unbound|slot-value|software-type|software-version|some|sort|space|special|special-operator-p|speed|sqrt|stable-sort|standard|standard-char|standard-char-p|standard-class|standard-generic-function|standard-method|standard-object|step|storage-condition|store-value|stream|stream-element-type|stream-error|stream-error-stream|stream-external-format|streamp|string|string-capitalize|string-downcase|string-equal|string-greaterp|string-left-trim|string-lessp|string-not-equal|string-not-greaterp|string-not-lessp|string-right-trim|string-stream|string-trim|string-upcase|string/=|string<|string<=|string=|string>|string>=|stringp|structure|structure-class|structure-object|style-warning|sublis|subseq|subsetp|subst|subst-if|subst-if-not|substitute|substitute-if|substitute-if-not|subtypep|svref|sxhash|symbol|symbol-function|symbol-macrolet|symbol-name|symbol-package|symbol-plist|symbol-value|symbolp|synonym-stream|synonym-stream-symbol|t|tagbody|tailp|tan|tanh|tenth|terpri|the|third|throw|time|trace|translate-logical-pathname|translate-pathname|tree-equal|truename|truncate|two-way-stream|two-way-stream-input-stream|two-way-stream-output-stream|type|type-error|type-error-datum|type-error-expected-type|type-of|typecase|typep|unbound-slot|unbound-slot-instance|unbound-variable|undefined-function|unexport|unintern|union|unless|unread-char|unsigned-byte|untrace|unuse-package|unwind-protect|update-instance-for-different-class|update-instance-for-redefined-class|upgraded-array-element-type|upgraded-complex-part-type|upper-case-p|use-package|use-value|user-homedir-pathname|values|values-list|variable|vector|vector-pop|vector-push|vector-push-extend|vectorp|warn|warning|when|wild-pathname-p|with-accessors|with-compilation-unit|with-condition-restarts|with-hash-table-iterator|with-input-from-string|with-open-file|with-open-stream|with-output-to-string|with-package-iterator|with-simple-restart|with-slots|with-standard-io-syntax|write|write-byte|write-char|write-line|write-sequence|write-string|write-to-string|y-or-n-p|yes-or-no-p|zerop|with-\\S+)(?=\\s+)", + "name": "keyword.control.lisp" + }, + { + "match": "(?<=^|\\s|[()])(?i:nil|t)(?=$|\\s|[()])", + "name": "constant.language.lisp" + }, + { + "match": "\\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", + "name": "constant.numeric.lisp" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.lisp" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.lisp" + } + }, + "name": "string.quoted.double.lisp", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.lisp" + } + ] + } + ], + "scopeName": "source.lisp", + "uuid": "00D451C9-6B1D-11D9-8DFA-000D93589AF6" +} diff --git a/src/lib/shiki/languages/logo.tmLanguage.json b/src/lib/shiki/languages/logo.tmLanguage.json new file mode 100644 index 0000000..4abee2a --- /dev/null +++ b/src/lib/shiki/languages/logo.tmLanguage.json @@ -0,0 +1,56 @@ +{ + "comment": "Roughed out by Paul Bissex ", + "fileTypes": [], + "keyEquivalent": "^~L", + "name": "logo", + "patterns": [ + { + "match": "^to [\\w.]+", + "name": "entity.name.function.logo" + }, + { + "match": "continue|do\\.until|do\\.while|end|for(each)?|if(else|falsetrue|)|repeat|stop|until", + "name": "keyword.control.logo" + }, + { + "match": "\\b(\\.defmacro|\\.eq|\\.macro|\\.maybeoutput|\\.setbf|\\.setfirst|\\.setitem|\\.setsegmentsize|allopen|allowgetset|and|apply|arc|arctan|arity|array|arrayp|arraytolist|ascii|ashift|back|background|backslashedp|beforep|bitand|bitnot|bitor|bitxor|buried|buriedp|bury|buryall|buryname|butfirst|butfirsts|butlast|bye|cascade|case|caseignoredp|catch|char|clean|clearscreen|cleartext|close|closeall|combine|cond|contents|copydef|cos|count|crossmap|cursor|define|definedp|dequeue|difference|dribble|edall|edit|editfile|edn|edns|edpl|edpls|edps|emptyp|eofp|epspict|equalp|erall|erase|erasefile|ern|erns|erpl|erpls|erps|erract|error|exp|fence|filep|fill|filter|find|first|firsts|forever|form|forward|fput|fullprintp|fullscreen|fulltext|gc|gensym|global|goto|gprop|greaterp|heading|help|hideturtle|home|ignore|int|invoke|iseq|item|keyp|label|last|left|lessp|list|listp|listtoarray|ln|load|loadnoisily|loadpict|local|localmake|log10|lowercase|lput|lshift|macroexpand|macrop|make|map|map.se|mdarray|mditem|mdsetitem|member|memberp|minus|modulo|name|namelist|namep|names|nodes|nodribble|norefresh|not|numberp|openappend|openread|openupdate|openwrite|or|output|palette|parse|pause|pen|pencolor|pendown|pendownp|penerase|penmode|penpaint|penreverse|pensize|penup|pick|plist|plistp|plists|pllist|po|poall|pon|pons|pop|popl|popls|pops|pos|pot|pots|power|pprop|prefix|primitivep|print|printdepthlimit|printwidthlimit|procedurep|procedures|product|push|queue|quoted|quotient|radarctan|radcos|radsin|random|rawascii|readchar|readchars|reader|readlist|readpos|readrawline|readword|redefp|reduce|refresh|remainder|remdup|remove|remprop|repcount|rerandom|reverse|right|round|rseq|run|runparse|runresult|save|savel|savepict|screenmode|scrunch|sentence|setbackground|setcursor|seteditor|setheading|sethelploc|setitem|setlibloc|setmargins|setpalette|setpen|setpencolor|setpensize|setpos|setprefix|setread|setreadpos|setscrunch|settemploc|settextcolor|setwrite|setwritepos|setx|setxy|sety|shell|show|shownp|showturtle|sin|splitscreen|sqrt|standout|startup|step|stepped|steppedp|substringp|sum|tag|test|text|textscreen|thing|throw|towards|trace|traced|tracedp|transfer|turtlemode|type|unbury|unburyall|unburyname|unburyonedit|unstep|untrace|uppercase|usealternatenam|wait|while|window|word|wordp|wrap|writepos|writer|xcor|ycor)\\b", + "name": "keyword.other.logo" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.logo" + } + }, + "match": "(\\:)(?:\\|[^|]*\\||[-\\w.]*)+", + "name": "variable.parameter.logo" + }, + { + "match": "\"(?:\\|[^|]*\\||[-\\w.]*)+", + "name": "string.other.word.logo" + }, + { + "begin": "(^[ \\t]+)?(?=;)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.logo" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": ";", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.logo" + } + }, + "end": "\\n", + "name": "comment.line.semicolon.logo" + } + ] + } + ], + "scopeName": "source.logo", + "uuid": "7613EC24-B0F9-4D01-8706-1D54098BFFD8" +} diff --git a/src/lib/shiki/languages/lua.tmLanguage.json b/src/lib/shiki/languages/lua.tmLanguage.json new file mode 100644 index 0000000..bcd70cf --- /dev/null +++ b/src/lib/shiki/languages/lua.tmLanguage.json @@ -0,0 +1,942 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/sumneko/lua.tmbundle/blob/master/Syntaxes/Lua.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/sumneko/lua.tmbundle/commit/3a18700941737c3ab66ac5964696f141aee61800", + "name": "lua", + "scopeName": "source.lua", + "patterns": [ + { + "begin": "\\b(?:(local)\\s+)?(function)\\b(?![,:])", + "beginCaptures": { + "1": { + "name": "keyword.local.lua" + }, + "2": { + "name": "keyword.control.lua" + } + }, + "end": "(?<=[\\)\\-{}\\[\\]\"'])", + "name": "meta.function.lua", + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.parameters.begin.lua" + } + }, + "end": "(\\))|(?=[\\-\\.{}\\[\\]\"'])", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.finish.lua" + } + }, + "name": "meta.parameter.lua", + "patterns": [ + { + "include": "#comment" + }, + { + "match": "[a-zA-Z_][a-zA-Z0-9_]*", + "name": "variable.parameter.function.lua" + }, + { + "match": ",", + "name": "punctuation.separator.arguments.lua" + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.arguments.lua" + } + }, + "end": "(?=[\\),])", + "patterns": [ + { + "include": "#emmydoc.type" + } + ] + } + ] + }, + { + "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b\\s*(?=:)", + "name": "entity.name.class.lua" + }, + { + "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", + "name": "entity.name.function.lua" + } + ] + }, + { + "match": "(?", + "captures": { + "1": { + "name": "string.tag.lua" + } + } + }, + { + "match": "\\<[a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*\\>", + "name": "storage.type.generic.lua" + }, + { + "match": "\\b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|in)\\b", + "name": "keyword.control.lua" + }, + { + "match": "\\b(local|global)\\b", + "name": "keyword.local.lua" + }, + { + "match": "\\b(function)\\b(?![,:])", + "name": "keyword.control.lua" + }, + { + "match": "(?=?|(?|\\<", + "name": "keyword.operator.lua" + } + ] + }, + { + "begin": "(?<=---[ \\t]*)@see", + "beginCaptures": { + "0": { + "name": "storage.type.annotation.lua" + } + }, + "end": "(?=[\\n@#])", + "patterns": [ + { + "match": "\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)", + "name": "support.class.lua" + }, + { + "match": "#", + "name": "keyword.operator.lua" + } + ] + }, + { + "begin": "(?<=---[ \\t]*)@diagnostic", + "beginCaptures": { + "0": { + "name": "storage.type.annotation.lua" + } + }, + "end": "(?=[\\n@#])", + "patterns": [ + { + "begin": "([a-zA-Z_\\-0-9]+)[ \\t]*(:)?", + "beginCaptures": { + "1": { + "name": "keyword.other.unit" + }, + "2": { + "name": "keyword.operator.unit" + } + }, + "end": "(?=\\n)", + "patterns": [ + { + "match": "\\b([a-zA-Z_\\*][a-zA-Z0-9_\\-]*)", + "name": "support.class.lua" + }, + { + "match": ",", + "name": "keyword.operator.lua" + } + ] + } + ] + }, + { + "begin": "(?<=---[ \\t]*)@module", + "beginCaptures": { + "0": { + "name": "storage.type.annotation.lua" + } + }, + "end": "(?=[\\n@#])", + "patterns": [ + { + "include": "#string" + } + ] + }, + { + "match": "(?<=---[ \\t]*)@(async|nodiscard)", + "name": "storage.type.annotation.lua" + }, + { + "begin": "(?<=---)\\|\\s*[\\>\\+]?", + "beginCaptures": { + "0": { + "name": "storage.type.annotation.lua" + } + }, + "end": "(?=[\\n@#])", + "patterns": [ + { + "include": "#string" + } + ] + } + ] + }, + "emmydoc.type": { + "patterns": [ + { + "begin": "\\bfun\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.lua" + } + }, + "end": "(?=[\\s#])", + "patterns": [ + { + "match": "[\\(\\),:\\?][ \\t]*", + "name": "keyword.operator.lua" + }, + { + "match": "([a-zA-Z_][a-zA-Z0-9_\\.\\*\\[\\]\\<\\>\\,\\-]*)(?", + "name": "storage.type.generic.lua" + }, + { + "match": "\\basync\\b", + "name": "entity.name.tag.lua" + }, + { + "match": "[\\{\\}\\:\\,\\?\\|\\`][ \\t]*", + "name": "keyword.operator.lua" + }, + { + "begin": "(?=[a-zA-Z_\\.\\*\"'\\[])", + "end": "(?=[\\s\\)\\,\\?\\:\\}\\|#])", + "patterns": [ + { + "match": "([a-zA-Z0-9_\\.\\*\\[\\]\\<\\>\\,\\-]+)(?) ?", + "captures": { + "2": { + "name": "punctuation.definition.quote.begin.markdown" + } + }, + "name": "markup.quote.markdown", + "patterns": [ + { + "include": "#block" + } + ], + "while": "(^|\\G)\\s*(>) ?" + }, + "fenced_code_block_css": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(css|css.erb)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.css", + "patterns": [ + { + "include": "source.css" + } + ] + } + ] + }, + "fenced_code_block_basic": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(html|htm|shtml|xhtml|inc|tmpl|tpl)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.html", + "patterns": [ + { + "include": "text.html.basic" + } + ] + } + ] + }, + "fenced_code_block_ini": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ini|conf)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.ini", + "patterns": [ + { + "include": "source.ini" + } + ] + } + ] + }, + "fenced_code_block_java": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(java|bsh)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.java", + "patterns": [ + { + "include": "source.java" + } + ] + } + ] + }, + "fenced_code_block_lua": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(lua)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.lua", + "patterns": [ + { + "include": "source.lua" + } + ] + } + ] + }, + "fenced_code_block_makefile": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(Makefile|makefile|GNUmakefile|OCamlMakefile)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.makefile", + "patterns": [ + { + "include": "source.makefile" + } + ] + } + ] + }, + "fenced_code_block_perl": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(perl|pl|pm|pod|t|PL|psgi|vcl)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.perl", + "patterns": [ + { + "include": "source.perl" + } + ] + } + ] + }, + "fenced_code_block_r": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(R|r|s|S|Rprofile|\\{\\.r.+?\\})((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.r", + "patterns": [ + { + "include": "source.r" + } + ] + } + ] + }, + "fenced_code_block_ruby": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ruby|rb|rbx|rjs|Rakefile|rake|cgi|fcgi|gemspec|irbrc|Capfile|ru|prawn|Cheffile|Gemfile|Guardfile|Hobofile|Vagrantfile|Appraisals|Rantfile|Berksfile|Berksfile.lock|Thorfile|Puppetfile)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.ruby", + "patterns": [ + { + "include": "source.ruby" + } + ] + } + ] + }, + "fenced_code_block_php": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(php|php3|php4|php5|phpt|phtml|aw|ctp)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.php", + "patterns": [ + { + "include": "text.html.basic" + }, + { + "include": "source.php" + } + ] + } + ] + }, + "fenced_code_block_sql": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(sql|ddl|dml)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.sql", + "patterns": [ + { + "include": "source.sql" + } + ] + } + ] + }, + "fenced_code_block_vs_net": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(vb)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.vs_net", + "patterns": [ + { + "include": "source.asp.vb.net" + } + ] + } + ] + }, + "fenced_code_block_xml": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(xml|xsd|tld|jsp|pt|cpt|dtml|rss|opml)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.xml", + "patterns": [ + { + "include": "text.xml" + } + ] + } + ] + }, + "fenced_code_block_xsl": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(xsl|xslt)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.xsl", + "patterns": [ + { + "include": "text.xml.xsl" + } + ] + } + ] + }, + "fenced_code_block_yaml": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(yaml|yml)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.yaml", + "patterns": [ + { + "include": "source.yaml" + } + ] + } + ] + }, + "fenced_code_block_dosbatch": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(bat|batch)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.dosbatch", + "patterns": [ + { + "include": "source.batchfile" + } + ] + } + ] + }, + "fenced_code_block_clojure": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(clj|cljs|clojure)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.clojure", + "patterns": [ + { + "include": "source.clojure" + } + ] + } + ] + }, + "fenced_code_block_coffee": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(coffee|Cakefile|coffee.erb)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.coffee", + "patterns": [ + { + "include": "source.coffee" + } + ] + } + ] + }, + "fenced_code_block_c": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(c|h)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.c", + "patterns": [ + { + "include": "source.c" + } + ] + } + ] + }, + "fenced_code_block_cpp": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(cpp|c\\+\\+|cxx)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.cpp source.cpp", + "patterns": [ + { + "include": "source.cpp" + } + ] + } + ] + }, + "fenced_code_block_diff": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(patch|diff|rej)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.diff", + "patterns": [ + { + "include": "source.diff" + } + ] + } + ] + }, + "fenced_code_block_dockerfile": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(dockerfile|Dockerfile)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.dockerfile", + "patterns": [ + { + "include": "source.dockerfile" + } + ] + } + ] + }, + "fenced_code_block_git_commit": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(COMMIT_EDITMSG|MERGE_MSG)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.git_commit", + "patterns": [ + { + "include": "text.git-commit" + } + ] + } + ] + }, + "fenced_code_block_git_rebase": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(git-rebase-todo)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.git_rebase", + "patterns": [ + { + "include": "text.git-rebase" + } + ] + } + ] + }, + "fenced_code_block_go": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(go|golang)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.go", + "patterns": [ + { + "include": "source.go" + } + ] + } + ] + }, + "fenced_code_block_groovy": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(groovy|gvy)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.groovy", + "patterns": [ + { + "include": "source.groovy" + } + ] + } + ] + }, + "fenced_code_block_pug": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jade|pug)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.pug", + "patterns": [ + { + "include": "text.pug" + } + ] + } + ] + }, + "fenced_code_block_js": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(js|jsx|javascript|es6|mjs|cjs|dataviewjs|\\{\\.js.+?\\})((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.javascript", + "patterns": [ + { + "include": "source.js" + } + ] + } + ] + }, + "fenced_code_block_js_regexp": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(regexp)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.js_regexp", + "patterns": [ + { + "include": "source.js.regexp" + } + ] + } + ] + }, + "fenced_code_block_json": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(json|json5|sublime-settings|sublime-menu|sublime-keymap|sublime-mousemap|sublime-theme|sublime-build|sublime-project|sublime-completions)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.json", + "patterns": [ + { + "include": "source.json" + } + ] + } + ] + }, + "fenced_code_block_jsonc": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jsonc)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.jsonc", + "patterns": [ + { + "include": "source.json.comments" + } + ] + } + ] + }, + "fenced_code_block_less": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(less)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.less", + "patterns": [ + { + "include": "source.css.less" + } + ] + } + ] + }, + "fenced_code_block_objc": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(objectivec|objective-c|mm|objc|obj-c|m|h)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.objc", + "patterns": [ + { + "include": "source.objc" + } + ] + } + ] + }, + "fenced_code_block_swift": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(swift)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.swift", + "patterns": [ + { + "include": "source.swift" + } + ] + } + ] + }, + "fenced_code_block_scss": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(scss)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.scss", + "patterns": [ + { + "include": "source.css.scss" + } + ] + } + ] + }, + "fenced_code_block_perl6": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(perl6|p6|pl6|pm6|nqp)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.perl6", + "patterns": [ + { + "include": "source.perl.6" + } + ] + } + ] + }, + "fenced_code_block_powershell": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(powershell|ps1|psm1|psd1)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.powershell", + "patterns": [ + { + "include": "source.powershell" + } + ] + } + ] + }, + "fenced_code_block_python": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(python|py|py3|rpy|pyw|cpy|SConstruct|Sconstruct|sconstruct|SConscript|gyp|gypi|\\{\\.python.+?\\})((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.python", + "patterns": [ + { + "include": "source.python" + } + ] + } + ] + }, + "fenced_code_block_julia": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(julia|\\{\\.julia.+?\\})((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.julia", + "patterns": [ + { + "include": "source.julia" + } + ] + } + ] + }, + "fenced_code_block_regexp_python": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(re)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.regexp_python", + "patterns": [ + { + "include": "source.regexp.python" + } + ] + } + ] + }, + "fenced_code_block_rust": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(rust|rs|\\{\\.rust.+?\\})((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.rust", + "patterns": [ + { + "include": "source.rust" + } + ] + } + ] + }, + "fenced_code_block_scala": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(scala|sbt)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.scala", + "patterns": [ + { + "include": "source.scala" + } + ] + } + ] + }, + "fenced_code_block_shell": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(shell|sh|bash|zsh|bashrc|bash_profile|bash_login|profile|bash_logout|.textmate_init|\\{\\.bash.+?\\})((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.shellscript", + "patterns": [ + { + "include": "source.shell" + } + ] + } + ] + }, + "fenced_code_block_ts": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(typescript|ts)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.typescript", + "patterns": [ + { + "include": "source.ts" + } + ] + } + ] + }, + "fenced_code_block_tsx": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(tsx)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.typescriptreact", + "patterns": [ + { + "include": "source.tsx" + } + ] + } + ] + }, + "fenced_code_block_csharp": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(cs|csharp|c#)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.csharp", + "patterns": [ + { + "include": "source.cs" + } + ] + } + ] + }, + "fenced_code_block_fsharp": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(fs|fsharp|f#)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.fsharp", + "patterns": [ + { + "include": "source.fsharp" + } + ] + } + ] + }, + "fenced_code_block_dart": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(dart)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.dart", + "patterns": [ + { + "include": "source.dart" + } + ] + } + ] + }, + "fenced_code_block_handlebars": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(handlebars|hbs)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.handlebars", + "patterns": [ + { + "include": "text.html.handlebars" + } + ] + } + ] + }, + "fenced_code_block_markdown": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(markdown|md)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.markdown", + "patterns": [ + { + "include": "text.html.markdown" + } + ] + } + ] + }, + "fenced_code_block_log": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(log)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.log", + "patterns": [ + { + "include": "text.log" + } + ] + } + ] + }, + "fenced_code_block_erlang": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(erlang)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.erlang", + "patterns": [ + { + "include": "source.erlang" + } + ] + } + ] + }, + "fenced_code_block_elixir": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(elixir)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.elixir", + "patterns": [ + { + "include": "source.elixir" + } + ] + } + ] + }, + "fenced_code_block_latex": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(latex|tex)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.latex", + "patterns": [ + { + "include": "text.tex.latex" + } + ] + } + ] + }, + "fenced_code_block_bibtex": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(bibtex)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.bibtex", + "patterns": [ + { + "include": "text.bibtex" + } + ] + } + ] + }, + "fenced_code_block_twig": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(twig)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.twig", + "patterns": [ + { + "include": "source.twig" + } + ] + } + ] + }, + "fenced_code_block": { + "patterns": [ + { + "include": "#fenced_code_block_css" + }, + { + "include": "#fenced_code_block_basic" + }, + { + "include": "#fenced_code_block_ini" + }, + { + "include": "#fenced_code_block_java" + }, + { + "include": "#fenced_code_block_lua" + }, + { + "include": "#fenced_code_block_makefile" + }, + { + "include": "#fenced_code_block_perl" + }, + { + "include": "#fenced_code_block_r" + }, + { + "include": "#fenced_code_block_ruby" + }, + { + "include": "#fenced_code_block_php" + }, + { + "include": "#fenced_code_block_sql" + }, + { + "include": "#fenced_code_block_vs_net" + }, + { + "include": "#fenced_code_block_xml" + }, + { + "include": "#fenced_code_block_xsl" + }, + { + "include": "#fenced_code_block_yaml" + }, + { + "include": "#fenced_code_block_dosbatch" + }, + { + "include": "#fenced_code_block_clojure" + }, + { + "include": "#fenced_code_block_coffee" + }, + { + "include": "#fenced_code_block_c" + }, + { + "include": "#fenced_code_block_cpp" + }, + { + "include": "#fenced_code_block_diff" + }, + { + "include": "#fenced_code_block_dockerfile" + }, + { + "include": "#fenced_code_block_git_commit" + }, + { + "include": "#fenced_code_block_git_rebase" + }, + { + "include": "#fenced_code_block_go" + }, + { + "include": "#fenced_code_block_groovy" + }, + { + "include": "#fenced_code_block_pug" + }, + { + "include": "#fenced_code_block_js" + }, + { + "include": "#fenced_code_block_js_regexp" + }, + { + "include": "#fenced_code_block_json" + }, + { + "include": "#fenced_code_block_jsonc" + }, + { + "include": "#fenced_code_block_less" + }, + { + "include": "#fenced_code_block_objc" + }, + { + "include": "#fenced_code_block_swift" + }, + { + "include": "#fenced_code_block_scss" + }, + { + "include": "#fenced_code_block_perl6" + }, + { + "include": "#fenced_code_block_powershell" + }, + { + "include": "#fenced_code_block_python" + }, + { + "include": "#fenced_code_block_julia" + }, + { + "include": "#fenced_code_block_regexp_python" + }, + { + "include": "#fenced_code_block_rust" + }, + { + "include": "#fenced_code_block_scala" + }, + { + "include": "#fenced_code_block_shell" + }, + { + "include": "#fenced_code_block_ts" + }, + { + "include": "#fenced_code_block_tsx" + }, + { + "include": "#fenced_code_block_csharp" + }, + { + "include": "#fenced_code_block_fsharp" + }, + { + "include": "#fenced_code_block_dart" + }, + { + "include": "#fenced_code_block_handlebars" + }, + { + "include": "#fenced_code_block_markdown" + }, + { + "include": "#fenced_code_block_log" + }, + { + "include": "#fenced_code_block_erlang" + }, + { + "include": "#fenced_code_block_elixir" + }, + { + "include": "#fenced_code_block_latex" + }, + { + "include": "#fenced_code_block_bibtex" + }, + { + "include": "#fenced_code_block_twig" + }, + { + "include": "#fenced_code_block_unknown" + } + ] + }, + "fenced_code_block_unknown": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?=([^`]*)?$)", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language" + } + }, + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "name": "markup.fenced_code.block.markdown" + }, + "heading": { + "match": "(?:^|\\G)[ ]{0,3}(#{1,6}\\s+(.*?)(\\s+#{1,6})?\\s*)$", + "captures": { + "1": { + "patterns": [ + { + "match": "(#{6})\\s+(.*?)(?:\\s+(#+))?\\s*$", + "name": "heading.6.markdown", + "captures": { + "1": { + "name": "punctuation.definition.heading.markdown" + }, + "2": { + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "#inline" + }, + { + "include": "text.html.derivative" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.markdown" + } + } + }, + { + "match": "(#{5})\\s+(.*?)(?:\\s+(#+))?\\s*$", + "name": "heading.5.markdown", + "captures": { + "1": { + "name": "punctuation.definition.heading.markdown" + }, + "2": { + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "#inline" + }, + { + "include": "text.html.derivative" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.markdown" + } + } + }, + { + "match": "(#{4})\\s+(.*?)(?:\\s+(#+))?\\s*$", + "name": "heading.4.markdown", + "captures": { + "1": { + "name": "punctuation.definition.heading.markdown" + }, + "2": { + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "#inline" + }, + { + "include": "text.html.derivative" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.markdown" + } + } + }, + { + "match": "(#{3})\\s+(.*?)(?:\\s+(#+))?\\s*$", + "name": "heading.3.markdown", + "captures": { + "1": { + "name": "punctuation.definition.heading.markdown" + }, + "2": { + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "#inline" + }, + { + "include": "text.html.derivative" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.markdown" + } + } + }, + { + "match": "(#{2})\\s+(.*?)(?:\\s+(#+))?\\s*$", + "name": "heading.2.markdown", + "captures": { + "1": { + "name": "punctuation.definition.heading.markdown" + }, + "2": { + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "#inline" + }, + { + "include": "text.html.derivative" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.markdown" + } + } + }, + { + "match": "(#{1})\\s+(.*?)(?:\\s+(#+))?\\s*$", + "name": "heading.1.markdown", + "captures": { + "1": { + "name": "punctuation.definition.heading.markdown" + }, + "2": { + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "#inline" + }, + { + "include": "text.html.derivative" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.markdown" + } + } + } + ] + } + }, + "name": "markup.heading.markdown", + "patterns": [ + { + "include": "#inline" + } + ] + }, + "heading-setext": { + "patterns": [ + { + "match": "^(={3,})(?=[ \\t]*$\\n?)", + "name": "markup.heading.setext.1.markdown" + }, + { + "match": "^(-{3,})(?=[ \\t]*$\\n?)", + "name": "markup.heading.setext.2.markdown" + } + ] + }, + "html": { + "patterns": [ + { + "begin": "(^|\\G)\\s*()", + "name": "comment.block.html" + }, + { + "begin": "(?i)(^|\\G)\\s*(?=<(script|style|pre)(\\s|$|>)(?!.*?))", + "end": "(?i)(.*)(())", + "endCaptures": { + "1": { + "patterns": [ + { + "include": "text.html.derivative" + } + ] + }, + "2": { + "name": "meta.tag.structure.$4.end.html" + }, + "3": { + "name": "punctuation.definition.tag.begin.html" + }, + "4": { + "name": "entity.name.tag.html" + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "patterns": [ + { + "begin": "(\\s*|$)", + "patterns": [ + { + "include": "text.html.derivative" + } + ], + "while": "(?i)^(?!.*)" + } + ] + }, + { + "begin": "(?i)(^|\\G)\\s*(?=))", + "patterns": [ + { + "include": "text.html.derivative" + } + ], + "while": "^(?!\\s*$)" + }, + { + "begin": "(^|\\G)\\s*(?=(<[a-zA-Z0-9\\-](/?>|\\s.*?>)|)\\s*$)", + "patterns": [ + { + "include": "text.html.derivative" + } + ], + "while": "^(?!\\s*$)" + } + ] + }, + "link-def": { + "captures": { + "1": { + "name": "punctuation.definition.constant.markdown" + }, + "2": { + "name": "constant.other.reference.link.markdown" + }, + "3": { + "name": "punctuation.definition.constant.markdown" + }, + "4": { + "name": "punctuation.separator.key-value.markdown" + }, + "5": { + "name": "punctuation.definition.link.markdown" + }, + "6": { + "name": "markup.underline.link.markdown" + }, + "7": { + "name": "punctuation.definition.link.markdown" + }, + "8": { + "name": "markup.underline.link.markdown" + }, + "9": { + "name": "string.other.link.description.title.markdown" + }, + "10": { + "name": "punctuation.definition.string.begin.markdown" + }, + "11": { + "name": "punctuation.definition.string.end.markdown" + }, + "12": { + "name": "string.other.link.description.title.markdown" + }, + "13": { + "name": "punctuation.definition.string.begin.markdown" + }, + "14": { + "name": "punctuation.definition.string.end.markdown" + }, + "15": { + "name": "string.other.link.description.title.markdown" + }, + "16": { + "name": "punctuation.definition.string.begin.markdown" + }, + "17": { + "name": "punctuation.definition.string.end.markdown" + } + }, + "match": "(?x)\n \\s* # Leading whitespace\n (\\[)([^]]+?)(\\])(:) # Reference name\n [ \\t]* # Optional whitespace\n (?:(<)((?:\\\\[<>]|[^<>\\n])*)(>)|(\\S+?)) # The url\n [ \\t]* # Optional whitespace\n (?:\n ((\\().+?(\\))) # Match title in parens…\n | ((\").+?(\")) # or in double quotes…\n | ((').+?(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n $\n", + "name": "meta.link.reference.def.markdown" + }, + "list_paragraph": { + "begin": "(^|\\G)(?=\\S)(?![*+->]\\s|[0-9]+\\.\\s)", + "name": "meta.paragraph.markdown", + "patterns": [ + { + "include": "#inline" + }, + { + "include": "text.html.derivative" + }, + { + "include": "#heading-setext" + } + ], + "while": "(^|\\G)(?!\\s*$|#|[ ]{0,3}([-*_>][ ]{2,}){3,}[ \\t]*$\\n?|[ ]{0,3}[*+->]|[ ]{0,3}[0-9]+\\.)" + }, + "lists": { + "patterns": [ + { + "begin": "(^|\\G)([ ]{0,3})([*+-])([ \\t])", + "beginCaptures": { + "3": { + "name": "punctuation.definition.list.begin.markdown" + } + }, + "comment": "Currently does not support un-indented second lines.", + "name": "markup.list.unnumbered.markdown", + "patterns": [ + { + "include": "#block" + }, + { + "include": "#list_paragraph" + } + ], + "while": "((^|\\G)([ ]{2,4}|\\t))|(^[ \\t]*$)" + }, + { + "begin": "(^|\\G)([ ]{0,3})([0-9]+[\\.\\)])([ \\t])", + "beginCaptures": { + "3": { + "name": "punctuation.definition.list.begin.markdown" + } + }, + "name": "markup.list.numbered.markdown", + "patterns": [ + { + "include": "#block" + }, + { + "include": "#list_paragraph" + } + ], + "while": "((^|\\G)([ ]{2,4}|\\t))|(^[ \\t]*$)" + } + ] + }, + "paragraph": { + "begin": "(^|\\G)[ ]{0,3}(?=[^ \\t\\n])", + "name": "meta.paragraph.markdown", + "patterns": [ + { + "include": "#inline" + }, + { + "include": "text.html.derivative" + }, + { + "include": "#heading-setext" + } + ], + "while": "(^|\\G)((?=\\s*[-=]{3,}\\s*$)|[ ]{4,}(?=[^ \\t\\n]))" + }, + "raw_block": { + "begin": "(^|\\G)([ ]{4}|\\t)", + "name": "markup.raw.block.markdown", + "while": "(^|\\G)([ ]{4}|\\t)" + }, + "separator": { + "match": "(^|\\G)[ ]{0,3}([\\*\\-\\_])([ ]{0,2}\\2){2,}[ \\t]*$\\n?", + "name": "meta.separator.markdown" + }, + "frontMatter": { + "begin": "\\A-{3}\\s*$", + "contentName": "meta.embedded.block.frontmatter", + "patterns": [ + { + "include": "source.yaml" + } + ], + "end": "(^|\\G)-{3}|\\.{3}\\s*$" + }, + "table": { + "name": "markup.table.markdown", + "begin": "(^|\\G)(\\|)(?=[^|].+\\|\\s*$)", + "beginCaptures": { + "2": { + "name": "punctuation.definition.table.markdown" + } + }, + "while": "(^|\\G)(?=\\|)", + "patterns": [ + { + "match": "\\|", + "name": "punctuation.definition.table.markdown" + }, + { + "match": "(?<=\\|)\\s*(:?-+:?)\\s*(?=\\|)", + "captures": { + "1": { + "name": "punctuation.separator.table.markdown" + } + } + }, + { + "match": "(?<=\\|)\\s*(?=\\S)((\\\\\\||[^|])+)(?<=\\S)\\s*(?=\\|)", + "captures": { + "1": { + "patterns": [ + { + "include": "#inline" + } + ] + } + } + } + ] + }, + "inline": { + "patterns": [ + { + "include": "#ampersand" + }, + { + "include": "#bracket" + }, + { + "include": "#bold" + }, + { + "include": "#italic" + }, + { + "include": "#raw" + }, + { + "include": "#strikethrough" + }, + { + "include": "#escape" + }, + { + "include": "#image-inline" + }, + { + "include": "#image-ref" + }, + { + "include": "#link-email" + }, + { + "include": "#link-inet" + }, + { + "include": "#link-inline" + }, + { + "include": "#link-ref" + }, + { + "include": "#link-ref-literal" + }, + { + "include": "#link-ref-shortcut" + } + ] + }, + "ampersand": { + "comment": "Markdown will convert this for us. We match it so that the HTML grammar will not mark it up as invalid.", + "match": "&(?!([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);)", + "name": "meta.other.valid-ampersand.markdown" + }, + "bold": { + "begin": "(?x) (?(\\*\\*(?=\\w)|(?]*+> # HTML tags\n | (?`+)([^`]|(?!(?(?!`))`)*+\\k\n # Raw\n | \\\\[\\\\`*_{}\\[\\]()#.!+\\->]?+ # Escapes\n | \\[\n (\n (? # Named group\n [^\\[\\]\\\\] # Match most chars\n | \\\\. # Escaped chars\n | \\[ \\g*+ \\] # Nested brackets\n )*+\n \\]\n (\n ( # Reference Link\n [ ]? # Optional space\n \\[[^\\]]*+\\] # Ref name\n )\n | ( # Inline Link\n \\( # Opening paren\n [ \\t]*+ # Optional whitespace\n ? # URL\n [ \\t]*+ # Optional whitespace\n ( # Optional Title\n (?['\"])\n (.*?)\n \\k<title>\n )?\n \\)\n )\n )\n )\n | (?!(?<=\\S)\\k<open>). # Everything besides\n # style closer\n )++\n (?<=\\S)(?=__\\b|\\*\\*)\\k<open> # Close\n)\n", + "captures": { + "1": { + "name": "punctuation.definition.bold.markdown" + } + }, + "end": "(?<=\\S)(\\1)", + "name": "markup.bold.markdown", + "patterns": [ + { + "applyEndPatternLast": 1, + "begin": "(?=<[^>]*?>)", + "end": "(?<=>)", + "patterns": [ + { + "include": "text.html.derivative" + } + ] + }, + { + "include": "#escape" + }, + { + "include": "#ampersand" + }, + { + "include": "#bracket" + }, + { + "include": "#raw" + }, + { + "include": "#bold" + }, + { + "include": "#italic" + }, + { + "include": "#image-inline" + }, + { + "include": "#link-inline" + }, + { + "include": "#link-inet" + }, + { + "include": "#link-email" + }, + { + "include": "#image-ref" + }, + { + "include": "#link-ref-literal" + }, + { + "include": "#link-ref" + }, + { + "include": "#link-ref-shortcut" + }, + { + "include": "#strikethrough" + } + ] + }, + "bracket": { + "comment": "Markdown will convert this for us. We match it so that the HTML grammar will not mark it up as invalid.", + "match": "<(?![a-zA-Z/?\\$!])", + "name": "meta.other.valid-bracket.markdown" + }, + "escape": { + "match": "\\\\[-`*_#+.!(){}\\[\\]\\\\>]", + "name": "constant.character.escape.markdown" + }, + "image-inline": { + "captures": { + "1": { + "name": "punctuation.definition.link.description.begin.markdown" + }, + "2": { + "name": "string.other.link.description.markdown" + }, + "4": { + "name": "punctuation.definition.link.description.end.markdown" + }, + "5": { + "name": "punctuation.definition.metadata.markdown" + }, + "7": { + "name": "punctuation.definition.link.markdown" + }, + "8": { + "name": "markup.underline.link.image.markdown" + }, + "9": { + "name": "punctuation.definition.link.markdown" + }, + "10": { + "name": "markup.underline.link.image.markdown" + }, + "12": { + "name": "string.other.link.description.title.markdown" + }, + "13": { + "name": "punctuation.definition.string.begin.markdown" + }, + "14": { + "name": "punctuation.definition.string.end.markdown" + }, + "15": { + "name": "string.other.link.description.title.markdown" + }, + "16": { + "name": "punctuation.definition.string.begin.markdown" + }, + "17": { + "name": "punctuation.definition.string.end.markdown" + }, + "18": { + "name": "string.other.link.description.title.markdown" + }, + "19": { + "name": "punctuation.definition.string.begin.markdown" + }, + "20": { + "name": "punctuation.definition.string.end.markdown" + }, + "21": { + "name": "punctuation.definition.metadata.markdown" + } + }, + "match": "(?x)\n (\\!\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\n # Match the link text.\n (\\() # Opening paren for url\n # The url\n [ \\t]*\n (\n (<)((?:\\\\[<>]|[^<>\\n])*)(>)\n | ((?<url>(?>[^\\s()]+)|\\(\\g<url>*\\))*)\n )\n [ \\t]*\n (?:\n ((\\().+?(\\))) # Match title in parens…\n | ((\").+?(\")) # or in double quotes…\n | ((').+?(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n (\\))\n", + "name": "meta.image.inline.markdown" + }, + "image-ref": { + "captures": { + "1": { + "name": "punctuation.definition.link.description.begin.markdown" + }, + "2": { + "name": "string.other.link.description.markdown" + }, + "4": { + "name": "punctuation.definition.link.description.end.markdown" + }, + "5": { + "name": "punctuation.definition.constant.markdown" + }, + "6": { + "name": "constant.other.reference.link.markdown" + }, + "7": { + "name": "punctuation.definition.constant.markdown" + } + }, + "match": "(\\!\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])[ ]?(\\[)(.*?)(\\])", + "name": "meta.image.reference.markdown" + }, + "italic": { + "begin": "(?x) (?<open>(\\*(?=\\w)|(?<!\\w)\\*|(?<!\\w)\\b_))(?=\\S) # Open\n (?=\n (\n <[^>]*+> # HTML tags\n | (?<raw>`+)([^`]|(?!(?<!`)\\k<raw>(?!`))`)*+\\k<raw>\n # Raw\n | \\\\[\\\\`*_{}\\[\\]()#.!+\\->]?+ # Escapes\n | \\[\n (\n (?<square> # Named group\n [^\\[\\]\\\\] # Match most chars\n | \\\\. # Escaped chars\n | \\[ \\g<square>*+ \\] # Nested brackets\n )*+\n \\]\n (\n ( # Reference Link\n [ ]? # Optional space\n \\[[^\\]]*+\\] # Ref name\n )\n | ( # Inline Link\n \\( # Opening paren\n [ \\t]*+ # Optional whtiespace\n <?(.*?)>? # URL\n [ \\t]*+ # Optional whtiespace\n ( # Optional Title\n (?<title>['\"])\n (.*?)\n \\k<title>\n )?\n \\)\n )\n )\n )\n | \\k<open>\\k<open> # Must be bold closer\n | (?!(?<=\\S)\\k<open>). # Everything besides\n # style closer\n )++\n (?<=\\S)(?=_\\b|\\*)\\k<open> # Close\n )\n", + "captures": { + "1": { + "name": "punctuation.definition.italic.markdown" + } + }, + "end": "(?<=\\S)(\\1)((?!\\1)|(?=\\1\\1))", + "name": "markup.italic.markdown", + "patterns": [ + { + "applyEndPatternLast": 1, + "begin": "(?=<[^>]*?>)", + "end": "(?<=>)", + "patterns": [ + { + "include": "text.html.derivative" + } + ] + }, + { + "include": "#escape" + }, + { + "include": "#ampersand" + }, + { + "include": "#bracket" + }, + { + "include": "#raw" + }, + { + "include": "#bold" + }, + { + "include": "#image-inline" + }, + { + "include": "#link-inline" + }, + { + "include": "#link-inet" + }, + { + "include": "#link-email" + }, + { + "include": "#image-ref" + }, + { + "include": "#link-ref-literal" + }, + { + "include": "#link-ref" + }, + { + "include": "#link-ref-shortcut" + }, + { + "include": "#strikethrough" + } + ] + }, + "link-email": { + "captures": { + "1": { + "name": "punctuation.definition.link.markdown" + }, + "2": { + "name": "markup.underline.link.markdown" + }, + "4": { + "name": "punctuation.definition.link.markdown" + } + }, + "match": "(<)((?:mailto:)?[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*)(>)", + "name": "meta.link.email.lt-gt.markdown" + }, + "link-inet": { + "captures": { + "1": { + "name": "punctuation.definition.link.markdown" + }, + "2": { + "name": "markup.underline.link.markdown" + }, + "3": { + "name": "punctuation.definition.link.markdown" + } + }, + "match": "(<)((?:https?|ftp)://.*?)(>)", + "name": "meta.link.inet.markdown" + }, + "link-inline": { + "captures": { + "1": { + "name": "punctuation.definition.link.title.begin.markdown" + }, + "2": { + "name": "string.other.link.title.markdown", + "patterns": [ + { + "include": "#raw" + }, + { + "include": "#bold" + }, + { + "include": "#italic" + }, + { + "include": "#strikethrough" + }, + { + "include": "#image-inline" + } + ] + }, + "4": { + "name": "punctuation.definition.link.title.end.markdown" + }, + "5": { + "name": "punctuation.definition.metadata.markdown" + }, + "7": { + "name": "punctuation.definition.link.markdown" + }, + "8": { + "name": "markup.underline.link.markdown" + }, + "9": { + "name": "punctuation.definition.link.markdown" + }, + "10": { + "name": "markup.underline.link.markdown" + }, + "12": { + "name": "string.other.link.description.title.markdown" + }, + "13": { + "name": "punctuation.definition.string.begin.markdown" + }, + "14": { + "name": "punctuation.definition.string.end.markdown" + }, + "15": { + "name": "string.other.link.description.title.markdown" + }, + "16": { + "name": "punctuation.definition.string.begin.markdown" + }, + "17": { + "name": "punctuation.definition.string.end.markdown" + }, + "18": { + "name": "string.other.link.description.title.markdown" + }, + "19": { + "name": "punctuation.definition.string.begin.markdown" + }, + "20": { + "name": "punctuation.definition.string.end.markdown" + }, + "21": { + "name": "punctuation.definition.metadata.markdown" + } + }, + "match": "(?x)\n (\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\n # Match the link text.\n (\\() # Opening paren for url\n # The url\n [ \\t]*\n (\n (<)((?:\\\\[<>]|[^<>\\n])*)(>)\n | ((?<url>(?>[^\\s()]+)|\\(\\g<url>*\\))*)\n )\n [ \\t]*\n # The title \n (?:\n ((\\()[^()]*(\\))) # Match title in parens…\n | ((\")[^\"]*(\")) # or in double quotes…\n | ((')[^']*(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n (\\))\n", + "name": "meta.link.inline.markdown" + }, + "link-ref": { + "captures": { + "1": { + "name": "punctuation.definition.link.title.begin.markdown" + }, + "2": { + "name": "string.other.link.title.markdown", + "patterns": [ + { + "include": "#raw" + }, + { + "include": "#bold" + }, + { + "include": "#italic" + }, + { + "include": "#strikethrough" + }, + { + "include": "#image-inline" + } + ] + }, + "4": { + "name": "punctuation.definition.link.title.end.markdown" + }, + "5": { + "name": "punctuation.definition.constant.begin.markdown" + }, + "6": { + "name": "constant.other.reference.link.markdown" + }, + "7": { + "name": "punctuation.definition.constant.end.markdown" + } + }, + "match": "(?<![\\]\\\\])(\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])(\\[)([^\\]]*+)(\\])", + "name": "meta.link.reference.markdown" + }, + "link-ref-literal": { + "captures": { + "1": { + "name": "punctuation.definition.link.title.begin.markdown" + }, + "2": { + "name": "string.other.link.title.markdown" + }, + "4": { + "name": "punctuation.definition.link.title.end.markdown" + }, + "5": { + "name": "punctuation.definition.constant.begin.markdown" + }, + "6": { + "name": "punctuation.definition.constant.end.markdown" + } + }, + "match": "(?<![\\]\\\\])(\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])[ ]?(\\[)(\\])", + "name": "meta.link.reference.literal.markdown" + }, + "link-ref-shortcut": { + "captures": { + "1": { + "name": "punctuation.definition.link.title.begin.markdown" + }, + "2": { + "name": "string.other.link.title.markdown" + }, + "3": { + "name": "punctuation.definition.link.title.end.markdown" + } + }, + "match": "(?<![\\]\\\\])(\\[)(\\S+?)(\\])", + "name": "meta.link.reference.markdown" + }, + "raw": { + "captures": { + "1": { + "name": "punctuation.definition.raw.markdown" + }, + "3": { + "name": "punctuation.definition.raw.markdown" + } + }, + "match": "(`+)((?:[^`]|(?!(?<!`)\\1(?!`))`)*+)(\\1)", + "name": "markup.inline.raw.string.markdown" + }, + "strikethrough": { + "captures": { + "1": { + "name": "punctuation.definition.strikethrough.markdown" + }, + "2": { + "patterns": [ + { + "applyEndPatternLast": 1, + "begin": "(?=<[^>]*?>)", + "end": "(?<=>)", + "patterns": [ + { + "include": "text.html.derivative" + } + ] + }, + { + "include": "#escape" + }, + { + "include": "#ampersand" + }, + { + "include": "#bracket" + }, + { + "include": "#raw" + }, + { + "include": "#bold" + }, + { + "include": "#italic" + }, + { + "include": "#image-inline" + }, + { + "include": "#link-inline" + }, + { + "include": "#link-inet" + }, + { + "include": "#link-email" + }, + { + "include": "#image-ref" + }, + { + "include": "#link-ref-literal" + }, + { + "include": "#link-ref" + }, + { + "include": "#link-ref-shortcut" + } + ] + }, + "3": { + "name": "punctuation.definition.strikethrough.markdown" + } + }, + "match": "(?<!\\\\)(~{2,})((?:[^~]|(?!(?<![~\\\\])\\1(?!~))~)*+)(\\1)", + "name": "markup.strikethrough.markdown" + } + } +} diff --git a/src/lib/shiki/languages/marko.tmLanguage.json b/src/lib/shiki/languages/marko.tmLanguage.json new file mode 100644 index 0000000..db2f7a4 --- /dev/null +++ b/src/lib/shiki/languages/marko.tmLanguage.json @@ -0,0 +1,1342 @@ +{ + "fileTypes": ["marko"], + "name": "marko", + "patterns": [ + { + "begin": "^\\s*(style)\\s+(\\{)", + "beginCaptures": { + "1": { + "name": "storage.type.marko.css" + }, + "2": { + "name": "punctuation.section.scope.begin.marko.css" + } + }, + "comment": "CSS style block, eg: style { color: green }", + "contentName": "source.css", + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.scope.end.marko.css" + } + }, + "name": "meta.embedded.css", + "patterns": [ + { + "include": "source.css" + } + ] + }, + { + "begin": "^\\s*(style)\\.(less)\\s+(\\{)", + "beginCaptures": { + "1": { + "name": "storage.type.marko.css" + }, + "2": { + "name": "storage.modifier.marko.css" + }, + "3": { + "name": "punctuation.section.scope.begin.marko.css" + } + }, + "comment": "Less style block, eg: style.less { color: green }", + "contentName": "source.less", + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.scope.end.marko.css" + } + }, + "name": "meta.embedded.less", + "patterns": [ + { + "include": "source.css.less" + } + ] + }, + { + "begin": "^\\s*(style)\\.(scss)\\s+(\\{)", + "beginCaptures": { + "1": { + "name": "storage.type.marko.css" + }, + "2": { + "name": "storage.modifier.marko.css" + }, + "3": { + "name": "punctuation.section.scope.begin.marko.css" + } + }, + "comment": "SCSS style block, eg: style.scss { color: green }", + "contentName": "source.scss", + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.scope.end.marko.css" + } + }, + "name": "meta.embedded.scss", + "patterns": [ + { + "include": "source.css.scss" + } + ] + }, + { + "begin": "^\\s*(?:(static )|(?=(?:class|import|export) ))", + "beginCaptures": { + "1": { + "name": "keyword.control.static.marko" + } + }, + "comment": "Top level blocks parsed as JavaScript", + "contentName": "source.js", + "end": "(?=\\n|$)", + "name": "meta.embedded.js", + "patterns": [ + { + "include": "#javascript-statement" + } + ] + }, + { + "include": "#content-concise-mode" + } + ], + "repository": { + "attrs": { + "patterns": [ + { + "applyEndPatternLast": 1, + "begin": "(?:\\s+|,)(?:(key|on[a-zA-Z0-9_$-]+|[a-zA-Z0-9_$]+Change|no-update(?:-body)?(?:-if)?)|([a-zA-Z0-9_$][a-zA-Z0-9_$-]*))(:[a-zA-Z0-9_$][a-zA-Z0-9_$-]*)?", + "beginCaptures": { + "1": { + "name": "support.type.attribute-name.marko" + }, + "2": { + "name": "entity.other.attribute-name.marko" + }, + "3": { + "name": "support.function.attribute-name.marko" + } + }, + "comment": "Attribute with optional value", + "end": "(?=.|$)", + "name": "meta.marko-attribute", + "patterns": [ + { + "include": "#html-args-or-method" + }, + { + "applyEndPatternLast": 1, + "begin": "\\s*(:?=)\\s*", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "source.js" + } + ] + } + }, + "comment": "Attribute value", + "contentName": "source.js", + "end": "(?=.|$)", + "name": "meta.embedded.js", + "patterns": [ + { + "include": "#javascript-expression" + } + ] + } + ] + }, + { + "applyEndPatternLast": 1, + "begin": "(?:\\s+|,)\\.\\.\\.", + "beginCaptures": { + "1": { + "name": "keyword.operator.spread.marko" + } + }, + "comment": "A ...spread attribute", + "contentName": "source.js", + "end": "(?=.|$)", + "name": "meta.marko-spread-attribute", + "patterns": [ + { + "include": "#javascript-expression" + } + ] + }, + { + "begin": "\\s*(,(?!,))", + "captures": { + "1": { + "patterns": [ + { + "include": "source.js" + } + ] + } + }, + "comment": "Consume any whitespace after a comma", + "end": "(?!\\S)" + }, + { + "include": "#javascript-comment-multiline" + }, + { + "include": "#invalid" + } + ] + }, + "concise-html-block": { + "begin": "\\s*(--+)\\s*$", + "beginCaptures": { + "2": { + "name": "punctuation.section.scope.begin.marko" + } + }, + "comment": "--- HTML block within concise mode content. ---", + "end": "\\1", + "endCaptures": { + "1": { + "name": "punctuation.section.scope.end.marko" + } + }, + "name": "meta.section.marko-html-block", + "patterns": [ + { + "include": "#content-html-mode" + } + ] + }, + "concise-html-line": { + "captures": { + "1": { + "name": "punctuation.section.scope.begin.marko" + }, + "2": { + "patterns": [ + { + "include": "#html-comments" + }, + { + "include": "#tag-html" + }, + { + "match": "\\\\.", + "name": "string" + }, + { + "include": "#placeholder" + }, + { + "match": ".+?", + "name": "string" + } + ] + } + }, + "comment": "-- HTML line within concise mode content. (content-html-mode w/o scriptlet)", + "match": "\\s*(--+)(?=\\s+\\S)(.*$)", + "name": "meta.section.marko-html-line" + }, + "concise-open-tag-content": { + "patterns": [ + { + "include": "#tag-before-attrs" + }, + { + "begin": "\\s*\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.scope.begin.marko" + } + }, + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.section.scope.end.marko" + } + }, + "patterns": [ + { + "include": "#attrs" + }, + { + "include": "#invalid" + } + ] + }, + { + "begin": "(?!^)(?= )", + "end": "(?=--)|(?<!,)(?=\\n)", + "patterns": [ + { + "include": "#attrs" + }, + { + "include": "#invalid" + } + ] + } + ] + }, + "concise-script-block": { + "begin": "(\\s+)(--+)\\s*$", + "beginCaptures": { + "2": { + "name": "punctuation.section.scope.begin.marko" + } + }, + "comment": "--- Embedded concise script content block. ---", + "end": "(\\2)|(?=^(?!\\1)\\s*\\S)", + "endCaptures": { + "1": { + "name": "punctuation.section.scope.end.marko" + } + }, + "name": "meta.section.marko-script-block", + "patterns": [ + { + "include": "#content-embedded-script" + } + ] + }, + "concise-script-line": { + "applyEndPatternLast": 1, + "begin": "\\s*(--+)", + "beginCaptures": { + "1": { + "name": "punctuation.section.scope.begin.marko" + } + }, + "comment": "-- Embedded concise script content line.", + "end": "$", + "name": "meta.section.marko-script-line", + "patterns": [ + { + "include": "#content-embedded-script" + } + ] + }, + "concise-style-block": { + "begin": "(\\s+)(--+)\\s*$", + "beginCaptures": { + "2": { + "name": "punctuation.section.scope.begin.marko" + } + }, + "comment": "--- Embedded concise style content block. ---", + "contentName": "source.css", + "end": "(\\2)|(?=^(?!\\1)\\s*\\S)", + "endCaptures": { + "1": { + "name": "punctuation.section.scope.end.marko" + } + }, + "name": "meta.section.marko-style-block", + "patterns": [ + { + "include": "#content-embedded-style" + } + ] + }, + "concise-style-block-less": { + "begin": "(\\s+)(--+)\\s*$", + "beginCaptures": { + "2": { + "name": "punctuation.section.scope.begin.marko" + } + }, + "comment": "--- Embedded concise style content block. ---", + "contentName": "source.less", + "end": "(\\2)|(?=^(?!\\1)\\s*\\S)", + "endCaptures": { + "1": { + "name": "punctuation.section.scope.end.marko" + } + }, + "name": "meta.section.marko-style-block", + "patterns": [ + { + "include": "#content-embedded-style-less" + } + ] + }, + "concise-style-block-scss": { + "begin": "(\\s+)(--+)\\s*$", + "beginCaptures": { + "2": { + "name": "punctuation.section.scope.begin.marko" + } + }, + "comment": "--- Embedded concise style content block. ---", + "contentName": "source.scss", + "end": "(\\2)|(?=^(?!\\1)\\s*\\S)", + "endCaptures": { + "1": { + "name": "punctuation.section.scope.end.marko" + } + }, + "name": "meta.section.marko-style-block", + "patterns": [ + { + "include": "#content-embedded-style-scss" + } + ] + }, + "concise-style-line": { + "applyEndPatternLast": 1, + "begin": "\\s*(--+)", + "beginCaptures": { + "1": { + "name": "punctuation.section.scope.begin.marko" + } + }, + "comment": "-- Embedded concise style content line.", + "contentName": "source.css", + "end": "$", + "name": "meta.section.marko-style-line", + "patterns": [ + { + "include": "#content-embedded-style" + } + ] + }, + "concise-style-line-less": { + "applyEndPatternLast": 1, + "begin": "\\s*(--+)", + "beginCaptures": { + "1": { + "name": "punctuation.section.scope.begin.marko" + } + }, + "comment": "-- Embedded concise style content line.", + "contentName": "source.less", + "end": "$", + "name": "meta.section.marko-style-line", + "patterns": [ + { + "include": "#content-embedded-style-less" + } + ] + }, + "concise-style-line-scss": { + "applyEndPatternLast": 1, + "begin": "\\s*(--+)", + "beginCaptures": { + "1": { + "name": "punctuation.section.scope.begin.marko" + } + }, + "comment": "-- Embedded concise style content line.", + "contentName": "source.scss", + "end": "$", + "name": "meta.section.marko-style-line", + "patterns": [ + { + "include": "#content-embedded-style-scss" + } + ] + }, + "content-concise-mode": { + "comment": "Concise mode content block.", + "name": "meta.marko-concise-content", + "patterns": [ + { + "include": "#scriptlet" + }, + { + "include": "#javascript-comments" + }, + { + "include": "#html-comments" + }, + { + "include": "#concise-html-block" + }, + { + "include": "#concise-html-line" + }, + { + "include": "#tag-html" + }, + { + "comment": "A concise html tag.", + "patterns": [ + { + "begin": "^(\\s*)(?=style\\.less\\b)", + "comment": "Concise style tag less", + "patterns": [ + { + "include": "#concise-open-tag-content" + }, + { + "include": "#concise-style-block-less" + }, + { + "include": "#concise-style-line-less" + } + ], + "while": "(?=^\\1\\s+(\\S|$))" + }, + { + "begin": "^(\\s*)(?=style\\.scss\\b)", + "comment": "Concise style tag scss", + "patterns": [ + { + "include": "#concise-open-tag-content" + }, + { + "include": "#concise-style-block-scss" + }, + { + "include": "#concise-style-line-scss" + } + ], + "while": "(?=^\\1\\s+(\\S|$))" + }, + { + "begin": "^(\\s*)(?=style\\b)", + "comment": "Concise style tag", + "patterns": [ + { + "include": "#concise-open-tag-content" + }, + { + "include": "#concise-style-block" + }, + { + "include": "#concise-style-line" + } + ], + "while": "(?=^\\1\\s+(\\S|$))" + }, + { + "begin": "^(\\s*)(?=script\\b)", + "comment": "Concise script tag", + "patterns": [ + { + "include": "#concise-open-tag-content" + }, + { + "include": "#concise-script-block" + }, + { + "include": "#concise-script-line" + } + ], + "while": "(?=^\\1\\s+(\\S|$))" + }, + { + "begin": "^(\\s*)(?=[a-zA-Z0-9_$@])", + "comment": "Normal concise tag", + "patterns": [ + { + "include": "#concise-open-tag-content" + }, + { + "include": "#content-concise-mode" + } + ], + "while": "(?=^\\1\\s+(\\S|$))" + } + ] + }, + { + "include": "#invalid" + } + ] + }, + "content-embedded-script": { + "name": "meta.embedded.js", + "patterns": [ + { + "include": "#placeholder" + }, + { + "include": "source.js" + } + ] + }, + "content-embedded-style": { + "name": "meta.embedded.css", + "patterns": [ + { + "include": "#placeholder" + }, + { + "include": "source.css" + } + ] + }, + "content-embedded-style-less": { + "name": "meta.embedded.css.less", + "patterns": [ + { + "include": "#placeholder" + }, + { + "include": "source.css.less" + } + ] + }, + "content-embedded-style-scss": { + "name": "meta.embedded.css.scss", + "patterns": [ + { + "include": "#placeholder" + }, + { + "include": "source.css.scss" + } + ] + }, + "content-html-mode": { + "comment": "HTML mode content block.", + "patterns": [ + { + "include": "#scriptlet" + }, + { + "include": "#html-comments" + }, + { + "include": "#tag-html" + }, + { + "match": "\\\\.", + "name": "string" + }, + { + "include": "#placeholder" + }, + { + "match": ".+?", + "name": "string" + } + ] + }, + "html-args-or-method": { + "patterns": [ + { + "include": "#javascript-args" + }, + { + "begin": "(?<=\\))\\s*(?=\\{)", + "comment": "Attribute method shorthand following parens", + "contentName": "source.js", + "end": "(?<=\\})", + "name": "meta.embedded.js", + "patterns": [ + { + "include": "source.js" + } + ] + } + ] + }, + "html-comments": { + "patterns": [ + { + "begin": "\\s*(<!(--)?)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.marko" + } + }, + "comment": "HTML comments, doctypes & cdata", + "end": "\\2>", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.marko" + } + }, + "name": "comment.block.marko" + }, + { + "begin": "\\s*(<html-comment>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.marko" + } + }, + "comment": "Preserved HTML comment tag", + "end": "</html-comment>", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.marko" + } + }, + "name": "comment.block.marko" + } + ] + }, + "invalid": { + "match": "[^\\s]", + "name": "invalid.illegal.character-not-allowed-here.marko" + }, + "javascript-args": { + "begin": "(?=\\()", + "comment": "Javascript style arguments", + "contentName": "source.js", + "end": "(?<=\\))", + "name": "meta.embedded.js", + "patterns": [ + { + "include": "source.js" + } + ] + }, + "javascript-comment-line": { + "captures": { + "0": { + "patterns": [ + { + "include": "source.js" + } + ] + } + }, + "comment": "JavaScript // single line comment", + "contentName": "source.js", + "match": "\\s*//.*$" + }, + "javascript-comment-multiline": { + "begin": "\\s*(?=/\\*)", + "comment": "JavaScript /* block comment */", + "contentName": "source.js", + "end": "(?<=\\*/)", + "patterns": [ + { + "include": "source.js" + } + ] + }, + "javascript-comments": { + "patterns": [ + { + "include": "#javascript-comment-multiline" + }, + { + "include": "#javascript-comment-line" + } + ] + }, + "javascript-enclosed": { + "comment": "Matches JavaScript content and ensures enclosed blocks are matched.", + "patterns": [ + { + "include": "#javascript-comments" + }, + { + "include": "#javascript-args" + }, + { + "begin": "(?={)", + "end": "(?<=})", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "begin": "(?=\\[)", + "end": "(?<=])", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "begin": "(?=\")", + "end": "(?<=\")", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "begin": "(?=')", + "end": "(?<=')", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "begin": "(?=`)", + "end": "(?<=`)", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "begin": "/(?!<[\\]})A-Z0-9.<%]\\s*/)(?!/?>|$)", + "captures": { + "0": { + "name": "string.regexp.js" + } + }, + "contentName": "source.js", + "end": "/[gimsuy]*", + "patterns": [ + { + "include": "source.js#regexp" + }, + { + "include": "source.js" + } + ] + }, + { + "begin": "(?x)\\s*(?:\n\t\t\t\t\t\t\t\t(?:\\b(?:new|typeof|instanceof|in)\\b)| # Keyword operators\n\t\t\t\t\t\t\t\t\\&\\&|\\|\\|| # Logical operators\n\t\t\t\t\t\t\t\t[\\^|&]| # Bitwise operators\n\t\t\t\t\t\t\t\t[!=]=|[!=]==|<|<[=<]|=>| # Comparison operators (Note you cannot use * or ? here)\n\t\t\t\t\t\t\t\t[?:]| # Ternary operators\n\t\t\t\t\t\t\t\t[-+*%](?!-) # Arithmetic operators\n\t\t\t\t\t\t\t)", + "captures": { + "0": { + "patterns": [ + { + "include": "source.js" + } + ] + } + }, + "end": "(?=\\S)" + } + ] + }, + "javascript-expression": { + "patterns": [ + { + "include": "#javascript-enclosed" + }, + { + "captures": { + "0": { + "patterns": [ + { + "include": "source.js" + } + ] + } + }, + "comment": "Match identifiers and member expressions", + "match": "[0-9a-zA-Z$_.]+" + } + ] + }, + "javascript-statement": { + "patterns": [ + { + "include": "#javascript-enclosed" + }, + { + "include": "source.js" + } + ] + }, + "open-tag-content": { + "patterns": [ + { + "include": "#tag-before-attrs" + }, + { + "begin": "(?= )", + "comment": "Attributes begin after the first space within the tag name", + "end": "(?=/?>)", + "patterns": [ + { + "include": "#attrs" + } + ] + } + ] + }, + "placeholder": { + "begin": "\\$!?{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.template-expression.begin.js" + } + }, + "comment": "${ } placeholder", + "contentName": "source.js", + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.template-expression.end.js" + } + }, + "patterns": [ + { + "include": "source.js" + } + ] + }, + "scriptlet": { + "begin": "^\\s*(\\$)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.control.scriptlet.marko" + } + }, + "comment": "An inline JavaScript scriptlet.", + "contentName": "source.js", + "end": "$", + "name": "meta.embedded.js", + "patterns": [ + { + "include": "#javascript-statement" + } + ] + }, + "tag-before-attrs": { + "comment": "Everything in a tag before the attributes content", + "patterns": [ + { + "include": "#tag-name" + }, + { + "comment": "Shorthand class or ID attribute", + "match": "[#.][a-zA-Z0-9_$][a-zA-Z0-9_$-]*", + "name": "entity.other.attribute-name.marko" + }, + { + "begin": "/(?!/)", + "beginCaptures": { + "0": { + "name": "punctuation.separator.key-value.marko" + } + }, + "comment": "Variable for a tag", + "contentName": "source.js", + "end": "(?=:?\\=|\\s|>|$|\\||\\(|/)", + "name": "meta.embedded.js", + "patterns": [ + { + "comment": "Match identifiers", + "match": "[a-zA-Z$_][0-9a-zA-Z$_]*", + "name": "variable.other.constant.object.js" + }, + { + "include": "source.js#object-binding-pattern" + }, + { + "include": "source.js#array-binding-pattern" + }, + { + "include": "source.js#var-single-variable" + }, + { + "include": "#javascript-expression" + } + ] + }, + { + "applyEndPatternLast": 1, + "begin": "\\s*(:?=)\\s*", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "source.js" + } + ] + } + }, + "comment": "Default attribute value", + "contentName": "source.js", + "end": "(?=.|$)", + "name": "meta.embedded.js", + "patterns": [ + { + "include": "#javascript-expression" + } + ] + }, + { + "begin": "\\|", + "beginCaptures": { + "0": { + "name": "punctuation.section.scope.begin.marko" + } + }, + "comment": "Parameters for a tag", + "end": "\\|", + "endCaptures": { + "0": { + "name": "punctuation.section.scope.end.marko" + } + }, + "patterns": [ + { + "include": "source.js#function-parameters-body" + }, + { + "include": "source.js" + } + ] + }, + { + "include": "#html-args-or-method" + } + ] + }, + "tag-html": { + "comment": "Matches an HTML tag and its contents", + "patterns": [ + { + "begin": "\\s*(<)(?=(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)\\b)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "comment": "HTML void elements", + "end": "/?>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "patterns": [ + { + "include": "#open-tag-content" + } + ] + }, + { + "begin": "\\s*(<)(?=style\\.less\\b)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.marko" + } + }, + "comment": "HTML style tag with less", + "end": "/>|(?<=\\>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "patterns": [ + { + "include": "#open-tag-content" + }, + { + "begin": ">", + "beginCaptures": { + "0": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "comment": "Style body content", + "contentName": "source.less", + "end": "\\s*(</)(style)?(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.marko" + }, + "2": { + "patterns": [ + { + "include": "#tag-name" + } + ] + }, + "3": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "patterns": [ + { + "include": "#content-embedded-style-less" + } + ] + } + ] + }, + { + "begin": "\\s*(<)(?=style\\.scss\\b)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.marko" + } + }, + "comment": "HTML style tag with scss", + "end": "/>|(?<=\\>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "patterns": [ + { + "include": "#open-tag-content" + }, + { + "begin": ">", + "beginCaptures": { + "0": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "comment": "Style body content", + "contentName": "source.less", + "end": "\\s*(</)(style)?(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.marko" + }, + "2": { + "patterns": [ + { + "include": "#tag-name" + } + ] + }, + "3": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "patterns": [ + { + "include": "#content-embedded-style-scss" + } + ] + } + ] + }, + { + "begin": "\\s*(<)(?=style\\b)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.marko" + } + }, + "comment": "HTML style tag", + "end": "/>|(?<=\\>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "patterns": [ + { + "include": "#open-tag-content" + }, + { + "begin": ">", + "beginCaptures": { + "0": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "comment": "Style body content", + "contentName": "source.css", + "end": "\\s*(</)(style)?(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.marko" + }, + "2": { + "patterns": [ + { + "include": "#tag-name" + } + ] + }, + "3": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "patterns": [ + { + "include": "#content-embedded-style" + } + ] + } + ] + }, + { + "begin": "\\s*(<)(?=script\\b)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.marko" + } + }, + "comment": "HTML script tag", + "end": "/>|(?<=\\>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "patterns": [ + { + "include": "#open-tag-content" + }, + { + "begin": ">", + "beginCaptures": { + "0": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "comment": "Script body content", + "contentName": "source.js", + "end": "\\s*(</)(script)?(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.marko" + }, + "2": { + "patterns": [ + { + "include": "#tag-name" + } + ] + }, + "3": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "patterns": [ + { + "include": "#content-embedded-script" + } + ] + } + ] + }, + { + "begin": "\\s*(<)(?=[a-zA-Z0-9_$@])", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.marko" + } + }, + "comment": "HTML normal tag", + "end": "/>|(?<=\\>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "patterns": [ + { + "include": "#open-tag-content" + }, + { + "begin": ">", + "beginCaptures": { + "0": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "comment": "Body content", + "end": "\\s*(</)([a-zA-Z0-9_$:@-]+)?(.*?)(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.marko" + }, + "2": { + "patterns": [ + { + "include": "#tag-name" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#invalid" + } + ] + }, + "4": { + "name": "punctuation.definition.tag.end.marko" + } + }, + "patterns": [ + { + "include": "#content-html-mode" + } + ] + } + ] + } + ] + }, + "tag-name": { + "patterns": [ + { + "begin": "\\${", + "beginCaptures": { + "0": { + "name": "punctuation.definition.template-expression.begin.js" + } + }, + "comment": "Dynamic tag.", + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.template-expression.end.js" + } + }, + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "captures": { + "1": { + "name": "entity.name.tag.marko" + }, + "2": { + "name": "storage.type.marko.css" + }, + "3": { + "patterns": [ + { + "comment": "Core tag.", + "match": "(attrs|return|import)(?=\\b)", + "name": "support.type.builtin.marko" + }, + { + "comment": "Core tag.", + "match": "(for|if|while|else-if|else|macro|tag|await|let|const|effect|set|get|id|lifecycle)(?=\\b)", + "name": "support.function.marko" + }, + { + "comment": "Attribute tag.", + "match": "@.+", + "name": "entity.other.attribute-name.marko" + }, + { + "comment": "Native or userland tag.", + "match": ".+", + "name": "entity.name.tag.marko" + } + ] + } + }, + "match": "(style)\\.([a-zA-Z0-9$_-]+(?:\\.[a-zA-Z0-9$_-]+)*)|([a-zA-Z0-9_$@][a-zA-Z0-9_$@:-]*)" + } + ] + } + }, + "scopeName": "text.marko", + "uuid": "46c8c3f8-cabe-466a-a633-5deafdc51253" +} diff --git a/src/lib/shiki/languages/matlab.tmLanguage.json b/src/lib/shiki/languages/matlab.tmLanguage.json new file mode 100644 index 0000000..e9226ef --- /dev/null +++ b/src/lib/shiki/languages/matlab.tmLanguage.json @@ -0,0 +1,1130 @@ +{ + "fileTypes": ["m"], + "keyEquivalent": "^~M", + "name": "matlab", + "patterns": [ + { + "comment": "This and #all_after_command_dual are split out so #command_dual can be excluded in things like (), {}, []", + "include": "#all_before_command_dual" + }, + { + "include": "#command_dual" + }, + { + "include": "#all_after_command_dual" + } + ], + "repository": { + "all_before_command_dual": { + "patterns": [ + { + "include": "#classdef" + }, + { + "include": "#function" + }, + { + "include": "#blocks" + }, + { + "include": "#control_statements" + }, + { + "include": "#global_persistent" + }, + { + "include": "#parens" + }, + { + "include": "#square_brackets" + }, + { + "include": "#indexing_curly_brackets" + }, + { + "include": "#curly_brackets" + } + ] + }, + "all_after_command_dual": { + "patterns": [ + { + "include": "#string" + }, + { + "include": "#line_continuation" + }, + { + "include": "#comments" + }, + { + "include": "#conjugate_transpose" + }, + { + "include": "#transpose" + }, + { + "include": "#constants" + }, + { + "include": "#variables" + }, + { + "include": "#numbers" + }, + { + "include": "#operators" + } + ] + }, + "blocks": { + "patterns": [ + { + "begin": "\\s*(?:^|[\\s,;])(for)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.for.matlab" + } + }, + "end": "\\s*(?:^|[\\s,;])(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.for.matlab" + } + }, + "name": "meta.for.matlab", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\s*(?:^|[\\s,;])(if)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.if.matlab" + } + }, + "end": "\\s*(?:^|[\\s,;])(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.if.matlab" + }, + "2": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "name": "meta.if.matlab", + "patterns": [ + { + "captures": { + "2": { + "name": "keyword.control.elseif.matlab" + }, + "3": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "end": "^", + "match": "(\\s*)(?:^|[\\s,;])(elseif)\\b(.*)$\\n?", + "name": "meta.elseif.matlab" + }, + { + "captures": { + "2": { + "name": "keyword.control.else.matlab" + }, + "3": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "end": "^", + "match": "(\\s*)(?:^|[\\s,;])(else)\\b(.*)?$\\n?", + "name": "meta.else.matlab" + }, + { + "include": "$self" + } + ] + }, + { + "begin": "\\s*(?:^|[\\s,;])(parfor)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.for.matlab" + } + }, + "end": "\\s*(?:^|[\\s,;])(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.for.matlab" + } + }, + "name": "meta.parfor.matlab", + "patterns": [ + { + "begin": "\\G(?!$)", + "end": "$\\n?", + "name": "meta.parfor-quantity.matlab", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "$self" + } + ] + }, + { + "begin": "\\s*(?:^|[\\s,;])(spmd)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.spmd.matlab" + } + }, + "end": "\\s*(?:^|[\\s,;])(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.spmd.matlab" + } + }, + "name": "meta.spmd.matlab", + "patterns": [ + { + "begin": "\\G(?!$)", + "end": "$\\n?", + "name": "meta.spmd-statement.matlab", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "$self" + } + ] + }, + { + "begin": "\\s*(?:^|[\\s,;])(switch)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.switch.matlab" + } + }, + "end": "\\s*(?:^|[\\s,;])(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.switch.matlab" + } + }, + "name": "meta.switch.matlab", + "patterns": [ + { + "captures": { + "2": { + "name": "keyword.control.case.matlab" + }, + "3": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "end": "^", + "match": "(\\s*)(?:^|[\\s,;])(case)\\b(.*)$\\n?", + "name": "meta.case.matlab" + }, + { + "captures": { + "2": { + "name": "keyword.control.otherwise.matlab" + }, + "3": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "end": "^", + "match": "(\\s*)(?:^|[\\s,;])(otherwise)\\b(.*)?$\\n?", + "name": "meta.otherwise.matlab" + }, + { + "include": "$self" + } + ] + }, + { + "begin": "\\s*(?:^|[\\s,;])(try)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.try.matlab" + } + }, + "end": "\\s*(?:^|[\\s,;])(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.try.matlab" + } + }, + "name": "meta.try.matlab", + "patterns": [ + { + "captures": { + "2": { + "name": "keyword.control.catch.matlab" + }, + "3": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "end": "^", + "match": "(\\s*)(?:^|[\\s,;])(catch)\\b(.*)?$\\n?", + "name": "meta.catch.matlab" + }, + { + "include": "$self" + } + ] + }, + { + "begin": "\\s*(?:^|[\\s,;])(while)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.while.matlab" + } + }, + "end": "\\s*(?:^|[\\s,;])(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.while.matlab" + } + }, + "name": "meta.while.matlab", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "classdef": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t\t(^\\s*)\t\t\t\t\t\t\t\t# Leading whitespace\n\t\t\t\t\t\t\t(classdef)\n\t\t\t\t\t\t\t\\b\\s*\n\t\t\t\t\t\t\t(.*)\n\t\t\t\t\t", + "beginCaptures": { + "2": { + "name": "storage.type.class.matlab" + }, + "3": { + "patterns": [ + { + "match": "(?x)\n\t\t\t\t\t\t\t\t\t\t(\t\t\t\t\t\t\t\t\t# Optional attributes\n\t\t\t\t\t\t\t\t\t\t\t \\( [^)]* \\)\n\t\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*)\t\t\t# Class name\n\t\t\t\t\t\t\t\t\t\t\t(?:\t\t\t\t\t\t\t\t# Optional inheritance\n\t\t\t\t\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t\t\t\t\t(<)\n\t\t\t\t\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t\t\t\t\t([^%]*)\n\t\t\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\\s*($|(?=(%|...)).*)\n\t\t\t\t\t\t\t\t\t", + "captures": { + "1": { + "patterns": [ + { + "match": "[a-zA-Z][a-zA-Z0-9_]*", + "name": "variable.parameter.class.matlab" + }, + { + "begin": "=\\s*", + "end": ",|(?=\\))", + "patterns": [ + { + "match": "true|false", + "name": "constant.language.boolean.matlab" + }, + { + "include": "#string" + } + ] + } + ] + }, + "2": { + "name": "meta.class-declaration.matlab" + }, + "3": { + "name": "entity.name.section.class.matlab" + }, + "4": { + "name": "keyword.operator.other.matlab" + }, + "5": { + "patterns": [ + { + "match": "[a-zA-Z][a-zA-Z0-9_]*(\\.[a-zA-Z][a-zA-Z0-9_]*)*", + "name": "entity.other.inherited-class.matlab" + }, + { + "match": "&", + "name": "keyword.operator.other.matlab" + } + ] + }, + "6": { + "patterns": [ + { + "include": "$self" + } + ] + } + } + } + ] + } + }, + "end": "\\s*(?:^|[\\s,;])(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.class.matlab" + } + }, + "name": "meta.class.matlab", + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t\t\t\t(^\\s*)\t\t\t\t\t\t\t\t# Leading whitespace\n\t\t\t\t\t\t\t\t\t(properties)\\b([^%]*)\n\t\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t\t(\t\t\t\t\t\t\t\t\t# Optional attributes\n\t\t\t\t\t\t\t\t\t\t\\( [^)]* \\)\n\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t\\s*($|(?=%))\n\t\t\t\t\t\t\t\t", + "beginCaptures": { + "2": { + "name": "keyword.control.properties.matlab" + }, + "3": { + "patterns": [ + { + "match": "[a-zA-Z][a-zA-Z0-9_]*", + "name": "variable.parameter.properties.matlab" + }, + { + "begin": "=\\s*", + "end": ",|(?=\\))", + "patterns": [ + { + "match": "true|false", + "name": "constant.language.boolean.matlab" + }, + { + "match": "public|protected|private", + "name": "constant.language.access.matlab" + } + ] + } + ] + } + }, + "end": "\\s*(?:^|[\\s,;])(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.properties.matlab" + } + }, + "name": "meta.properties.matlab", + "patterns": [ + { + "include": "#validators" + }, + { + "include": "$self" + } + ] + }, + { + "begin": "(?x)\n\t\t\t\t\t\t\t\t\t(^\\s*)\t\t\t\t\t\t\t\t# Leading whitespace\n\t\t\t\t\t\t\t\t\t(methods)\\b([^%]*)\n\t\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t\t(\t\t\t\t\t\t\t\t\t# Optional attributes\n\t\t\t\t\t\t\t\t\t\t\\( [^)]* \\)\n\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t\\s*($|(?=%))\n\t\t\t\t\t\t\t\t", + "beginCaptures": { + "2": { + "name": "keyword.control.methods.matlab" + }, + "3": { + "patterns": [ + { + "match": "[a-zA-Z][a-zA-Z0-9_]*", + "name": "variable.parameter.methods.matlab" + }, + { + "begin": "=\\s*", + "end": ",|(?=\\))", + "patterns": [ + { + "match": "true|false", + "name": "constant.language.boolean.matlab" + }, + { + "match": "public|protected|private", + "name": "constant.language.access.matlab" + } + ] + } + ] + } + }, + "end": "\\s*(?:^|[\\s,;])(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.methods.matlab" + } + }, + "name": "meta.methods.matlab", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "(?x)\n\t\t\t\t\t\t\t\t\t(^\\s*)\t\t\t\t\t\t\t\t# Leading whitespace\n\t\t\t\t\t\t\t\t\t(events)\\b([^%]*)\n\t\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t\t(\t\t\t\t\t\t\t\t\t# Optional attributes\n\t\t\t\t\t\t\t\t\t\t\\( [^)]* \\)\n\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t\\s*($|(?=%))\n\t\t\t\t\t\t\t\t", + "beginCaptures": { + "2": { + "name": "keyword.control.events.matlab" + }, + "3": { + "patterns": [ + { + "match": "[a-zA-Z][a-zA-Z0-9_]*", + "name": "variable.parameter.events.matlab" + }, + { + "begin": "=\\s*", + "end": ",|(?=\\))", + "patterns": [ + { + "match": "true|false", + "name": "constant.language.boolean.matlab" + }, + { + "match": "public|protected|private", + "name": "constant.language.access.matlab" + } + ] + } + ] + } + }, + "end": "\\s*(?:^|[\\s,;])(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.events.matlab" + } + }, + "name": "meta.events.matlab", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "(?x)\n\t\t\t\t\t\t\t\t\t(^\\s*)\t\t\t\t\t\t\t\t# Leading whitespace\n\t\t\t\t\t\t\t\t\t(enumeration)\\b([^%]*)\n\t\t\t\t\t\t\t\t\t\\s*($|(?=%))\n\t\t\t\t\t\t\t\t", + "beginCaptures": { + "2": { + "name": "keyword.control.enumeration.matlab" + } + }, + "end": "\\s*(?:^|[\\s,;])(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.enumeration.matlab" + } + }, + "name": "meta.enumeration.matlab", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "$self" + } + ] + } + ] + }, + "command_dual": { + "captures": { + "1": { + "name": "string.interpolated.matlab" + }, + "2": { + "name": "variable.other.command.matlab" + }, + "28": { + "name": "comment.line.percentage.matlab" + } + }, + "comment": " 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1516 17 18 19 20 21 22 23 24 25 26 27 28", + "match": "^\\s*((?# A> )([b-df-hk-moq-zA-HJ-MO-Z]\\w*|a|an|a([A-Za-mo-z0-9_]\\w*|n[A-Za-rt-z0-9_]\\w*|ns\\w+)|e|ep|e([A-Za-oq-z0-9_]\\w*|p[A-Za-rt-z0-9_]\\w*|ps\\w+)|in|i([A-Za-mo-z0-9_]\\w*|n[A-Za-eg-z0-9_]\\w*|nf\\w+)|I|In|I([A-Za-mo-z0-9_]\\w*|n[A-Za-eg-z0-9_]\\w*|nf\\w+)|j\\w+|N|Na|N([A-Zb-z0-9_]\\w*|a[A-MO-Za-z0-9_]\\w*|aN\\w+)|n|na|nar|narg|nargi|nargo|nargou|n([A-Zb-z0-9_]\\w*|a([A-Za-mo-qs-z0-9_]\\w*|n\\w+|r([A-Za-fh-z0-9_]\\w*|g([A-Za-hj-nq-z0-9_]\\w*|i([A-Za-mo-z0-9_]\\w*|n\\w+)|o([A-Za-tv-z0-9_]\\w*|u([A-Za-su-z]\\w*|t\\w+))))))|p|p[A-Za-hj-z0-9_]\\w*|pi\\w+)(?# <A )\\s+(((?# B> )([^\\s;,%()=.{&|~<>:+\\-*/\\\\@^'\"]|(?=')|(?=\"))(?# <B )|(?# C> )(\\.\\^|\\.\\*|\\./|\\.\\\\|\\.'|\\.\\(|&&|==|\\|\\||&(?=[^&])|\\|(?=[^\\|])|~=|<=|>=|~(?!=)|<(?!=)|>(?!=)|:|\\+|-|\\*|/|\\\\|@|\\^)(?# <C )(?# D> )([^\\s]|\\s*(?=%)|\\s+$|\\s+(,|;|\\)|}|\\]|&|\\||<|>|=|:|\\*|/|\\\\|\\^|@|(\\.[^\\d.]|\\.\\.[^.])))(?# <D )|(?# E> )(\\.[^^*/\\\\'(\\sA-Za-z])(?# <E ))(?# F> )([^%]|'[^']*'|\"[^\"]*\")*(?# <F )|(?# X> )(\\.(?=\\s)|\\.[A-Za-z]|(?={))(?# <X )(?# Y> )([^(=\\'\"%]|==|'[^']*'|\"[^\"]*\"|\\(|\\([^)%]*\\)|\\[|\\[[^\\]%]*\\]|{|{[^}%]*})*(\\.\\.\\.[^%]*)?((?=%)|$)(?# <Y )))(%.*)?$" + }, + "comment_block": { + "begin": "(^[\\s]*)%\\{[^\\n\\S]*+\\n", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.matlab" + } + }, + "end": "^[\\s]*%\\}[^\\n\\S]*+(?:\\n|$)", + "name": "comment.block.percentage.matlab", + "patterns": [ + { + "include": "#comment_block" + }, + { + "match": "^[^\\n]*\\n" + } + ] + }, + "comments": { + "patterns": [ + { + "begin": "(^[ \\t]+)?(?=%%\\s)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.matlab" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "%%", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.matlab" + } + }, + "end": "\\n", + "name": "comment.line.double-percentage.matlab", + "patterns": [ + { + "begin": "\\G[^\\S\\n]*(?![\\n\\s])", + "contentName": "meta.cell.matlab", + "end": "(?=\\n)" + } + ] + } + ] + }, + { + "include": "#comment_block" + }, + { + "begin": "(^[ \\t]+)?(?=%)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.matlab" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "%", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.matlab" + } + }, + "end": "\\n", + "name": "comment.line.percentage.matlab" + } + ] + } + ] + }, + "control_statements": { + "captures": { + "1": { + "name": "keyword.control.matlab" + } + }, + "match": "\\s*(?:^|[\\s,;])(break|continue|return)\\b", + "name": "meta.control.matlab" + }, + "function": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t\t(^\\s*)\t\t\t\t\t\t\t\t\t\t\t\t# Leading whitespace\n\t\t\t\t\t\t\t(function)\n\t\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t\t(?:\t\t\t\t\t\t\t\t\t\t\t\t\t# Optional\n\t\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\t(\\[) ([^\\]]*) (\\])\n\t\t\t\t\t\t\t\t | ([a-zA-Z][a-zA-Z0-9_]*)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\\s* = \\s*\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*(\\.[a-zA-Z][a-zA-Z0-9_]*)*)\t# Function name\n\t\t\t\t\t\t\t\\s*\t\t\t\t\t\t\t\t\t\t\t\t\t# Trailing space\n\t\t\t\t\t\t", + "beginCaptures": { + "2": { + "name": "storage.type.function.matlab" + }, + "3": { + "name": "punctuation.definition.arguments.begin.matlab" + }, + "4": { + "patterns": [ + { + "match": "\\w+", + "name": "variable.parameter.output.matlab" + } + ] + }, + "5": { + "name": "punctuation.definition.arguments.end.matlab" + }, + "6": { + "name": "variable.parameter.output.function.matlab" + }, + "7": { + "name": "entity.name.function.matlab" + } + }, + "end": "\\s*(?:^|[\\s,;])(end)\\b(\\s*\\n)?", + "endCaptures": { + "1": { + "name": "keyword.control.end.function.matlab" + } + }, + "name": "meta.function.matlab", + "patterns": [ + { + "begin": "\\G\\(", + "end": "\\)", + "name": "meta.arguments.function.matlab", + "patterns": [ + { + "include": "#line_continuation" + }, + { + "match": "\\w+", + "name": "variable.parameter.input.matlab" + } + ] + }, + { + "begin": "(?x)\n\t\t\t\t\t\t\t\t\t(^\\s*)\t\t\t\t\t\t\t\t# Leading whitespace\n\t\t\t\t\t\t\t\t\t(arguments)\\b([^%]*)\n\t\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t\t(\t\t\t\t\t\t\t\t\t# Optional attributes\n\t\t\t\t\t\t\t\t\t\t\\( [^)]* \\)\n\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t\\s*($|(?=%))\n\t\t\t\t\t\t\t\t", + "beginCaptures": { + "2": { + "name": "keyword.control.arguments.matlab" + }, + "3": { + "patterns": [ + { + "match": "[a-zA-Z][a-zA-Z0-9_]*", + "name": "variable.parameter.arguments.matlab" + } + ] + } + }, + "end": "\\s*(?:^|[\\s,;])(end)\\b", + "endCaptures": { + "1": { + "name": "keyword.control.end.arguments.matlab" + } + }, + "name": "meta.arguments.matlab", + "patterns": [ + { + "include": "#validators" + }, + { + "include": "$self" + } + ] + }, + { + "include": "$self" + } + ] + } + ] + }, + "global_persistent": { + "captures": { + "1": { + "name": "keyword.control.globalpersistent.matlab" + } + }, + "match": "^\\s*(global|persistent)\\b", + "name": "meta.globalpersistent.matlab" + }, + "parens": { + "begin": "\\(", + "end": "(\\)|(?<!\\.\\.\\.).\\n)", + "comment": "We don't include $self here to avoid matching command syntax inside (), [], {}", + "patterns": [ + { + "include": "#end_in_parens" + }, + { + "include": "#all_before_command_dual" + }, + { + "include": "#all_after_command_dual" + }, + { + "comment": "These block keywords pick up any such missed keywords when the block matching for things like (), if-end, etc. don't work. Useful for when someone has partially written", + "include": "#block_keywords" + } + ] + }, + "square_brackets": { + "begin": "\\[", + "end": "\\]", + "comment": "We don't include $self here to avoid matching command syntax inside (), [], {}", + "patterns": [ + { + "include": "#all_before_command_dual" + }, + { + "include": "#all_after_command_dual" + }, + { + "comment": "These block keywords pick up any such missed keywords when the block matching for things like (), if-end, etc. don't work. Useful for when someone has partially written", + "include": "#block_keywords" + } + ] + }, + "curly_brackets": { + "begin": "\\{", + "end": "\\}", + "comment": "We don't include $self here to avoid matching command syntax inside (), [], {}", + "patterns": [ + { + "include": "#end_in_parens" + }, + { + "include": "#all_before_command_dual" + }, + { + "include": "#all_after_command_dual" + }, + { + "include": "#end_in_parens" + }, + { + "comment": "These block keywords pick up any such missed keywords when the block matching for things like (), if-end, etc. don't work. Useful for when someone has partially written", + "include": "#block_keywords" + } + ] + }, + "indexing_curly_brackets": { + "Comment": "Match identifier{idx, idx, } and stop at newline without ... This helps with partially written code like x{idx ", + "begin": "([a-zA-Z][a-zA-Z0-9_\\.]*\\s*)\\{", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "end": "(\\}|(?<!\\.\\.\\.).\\n)", + "comment": "We don't include $self here to avoid matching command syntax inside (), [], {}", + "patterns": [ + { + "include": "#end_in_parens" + }, + { + "include": "#all_before_command_dual" + }, + { + "include": "#all_after_command_dual" + }, + { + "include": "#end_in_parens" + }, + { + "comment": "These block keywords pick up any such missed keywords when the block matching for things like (), if-end, etc. don't work. Useful for when someone has partially written", + "include": "#block_keywords" + } + ] + }, + "line_continuation": { + "captures": { + "1": { + "name": "keyword.operator.symbols.matlab" + }, + "2": { + "name": "comment.line.continuation.matlab" + } + }, + "comment": "Line continuations", + "match": "(\\.\\.\\.)(.*)$", + "name": "meta.linecontinuation.matlab" + }, + "string": { + "patterns": [ + { + "captures": { + "1": { + "name": "string.interpolated.matlab" + }, + "2": { + "name": "punctuation.definition.string.begin.matlab" + } + }, + "comment": "Shell command", + "match": "^\\s*((!).*$\\n?)" + }, + { + "begin": "((?<=(\\[|\\(|\\{|=|\\s|;|:|,|~|<|>|&|\\||-|\\+|\\*|/|\\\\|\\.|\\^))|^)'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.matlab" + } + }, + "comment": "Character vector literal (single-quoted)", + "end": "'(?=(\\[|\\(|\\{|\\]|\\)|\\}|=|~|<|>|&|\\||-|\\+|\\*|/|\\\\|\\.|\\^|\\s|;|:|,))", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.matlab" + } + }, + "name": "string.quoted.single.matlab", + "patterns": [ + { + "match": "''", + "name": "constant.character.escape.matlab" + }, + { + "match": "'(?=.)", + "name": "invalid.illegal.unescaped-quote.matlab" + }, + { + "comment": "Operator symbols", + "match": "((\\%([\\+\\-0]?\\d{0,3}(\\.\\d{1,3})?)(c|d|e|E|f|g|G|s|((b|t)?(o|u|x|X))))|\\%\\%|\\\\(b|f|n|r|t|\\\\))", + "name": "constant.character.escape.matlab" + } + ] + }, + { + "begin": "((?<=(\\[|\\(|\\{|=|\\s|;|:|,|~|<|>|&|\\||-|\\+|\\*|/|\\\\|\\.|\\^))|^)\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.matlab" + } + }, + "comment": "String literal (double-quoted)", + "end": "\"(?=(\\[|\\(|\\{|\\]|\\)|\\}|=|~|<|>|&|\\||-|\\+|\\*|/|\\\\|\\.|\\^|\\||\\s|;|:|,))", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.matlab" + } + }, + "name": "string.quoted.double.matlab", + "patterns": [ + { + "match": "\"\"", + "name": "constant.character.escape.matlab" + }, + { + "match": "\"(?=.)", + "name": "invalid.illegal.unescaped-quote.matlab" + } + ] + } + ] + }, + "conjugate_transpose": { + "match": "((?<=[^\\s])|(?<=\\])|(?<=\\))|(?<=\\}))'", + "name": "keyword.operator.transpose.matlab" + }, + "transpose": { + "match": "\\.'", + "name": "keyword.operator.transpose.matlab" + }, + "constants": { + "comment": "MATLAB Constants", + "match": "(?<!\\.)\\b(eps|false|Inf|inf|intmax|intmin|namelengthmax|NaN|nan|on|off|realmax|realmin|true|pi)\\b", + "name": "constant.language.matlab" + }, + "variables": { + "comment": "MATLAB variables", + "match": "(?<!\\.)\\b(nargin|nargout|varargin|varargout)\\b", + "name": "variable.other.function.matlab" + }, + "end_in_parens": { + "comment": "end as operator symbol", + "match": "\\bend\\b", + "name": "keyword.operator.symbols.matlab" + }, + "numbers": { + "comment": "Valid numbers: 1, .1, 1.1, .1e1, 1.1e1, 1e1, 1i, 1j, 1e2j", + "match": "(?<=[\\s\\-\\+\\*\\/\\\\=:\\[\\(\\{,]|^)\\d*\\.?\\d+([eE][+-]?\\d)?([0-9&&[^\\.]])*(i|j)?\\b", + "name": "constant.numeric.matlab" + }, + "operators": { + "comment": "Operator symbols", + "match": "(?<=\\s)(==|~=|>|>=|<|<=|&|&&|:|\\||\\|\\||\\+|-|\\*|\\.\\*|/|\\./|\\\\|\\.\\\\|\\^|\\.\\^)(?=\\s)", + "name": "keyword.operator.symbols.matlab" + }, + "validators": { + "comment": "Property and argument validation. Match an identifier allowing . and ?.", + "begin": "\\s*[;]?\\s*([a-zA-Z][a-zA-Z0-9_\\.\\?]*)", + "end": "([;\\n%=].*)", + "endCaptures": { + "1": { + "patterns": [ + { + "comment": "Match comments", + "match": "([%].*)", + "captures": { + "1": { + "patterns": [ + { + "include": "$self" + } + ] + } + } + }, + { + "comment": "Handle things like arg = val; nextArg", + "match": "(=[^;]*)", + "captures": { + "1": { + "patterns": [ + { + "include": "$self" + } + ] + } + } + }, + { + "comment": "End of property/argument patterns which start a new property/argument. Look for beginning of identifier after semicolon. Otherwise treat as regular code.", + "match": "([\\n;]\\s*[a-zA-Z].*)", + "captures": { + "1": { + "patterns": [ + { + "include": "#validators" + } + ] + } + } + }, + { + "include": "$self" + } + ] + } + }, + "patterns": [ + { + "include": "#line_continuation" + }, + { + "comment": "Size declaration", + "match": "\\s*(\\([^\\)]*\\))", + "name": "storage.type.matlab" + }, + { + "comment": "Type declaration", + "match": "([a-zA-Z][a-zA-Z0-9_\\.]*)", + "name": "storage.type.matlab" + }, + { + "include": "#braced_validator_list" + } + ] + }, + "braced_validator_list": { + "comment": "Validator functions. Treated as a recursive group to permit nested brackets, quotes, etc.", + "begin": "\\s*({)\\s*", + "beginCaptures": { + "1": { + "name": "storage.type.matlab" + } + }, + "end": "(})", + "endCaptures": { + "1": { + "name": "storage.type.matlab" + } + }, + "patterns": [ + { + "include": "#braced_validator_list" + }, + { + "include": "#validator_strings" + }, + { + "include": "#line_continuation" + }, + { + "match": "([^{}}'\"\\.]+)", + "captures": { + "1": { + "name": "storage.type.matlab" + } + } + }, + { + "match": "\\.", + "name": "storage.type.matlab" + } + ] + }, + "validator_strings": { + "comment": "Simplified string patterns nested inside validator functions which don't change scopes of matches.", + "patterns": [ + { + "patterns": [ + { + "begin": "((?<=(\\[|\\(|\\{|=|\\s|;|:|,|~|<|>|&|\\||-|\\+|\\*|/|\\\\|\\.|\\^))|^)'", + "comment": "Character vector literal (single-quoted)", + "end": "'(?=(\\[|\\(|\\{|\\]|\\)|\\}|=|~|<|>|&|\\||-|\\+|\\*|/|\\\\|\\.|\\^|\\s|;|:|,))", + "name": "storage.type.matlab", + "patterns": [ + { + "match": "''" + }, + { + "match": "'(?=.)" + }, + { + "match": "([^']+)" + } + ] + }, + { + "begin": "((?<=(\\[|\\(|\\{|=|\\s|;|:|,|~|<|>|&|\\||-|\\+|\\*|/|\\\\|\\.|\\^))|^)\"", + "comment": "String literal (double-quoted)", + "end": "\"(?=(\\[|\\(|\\{|\\]|\\)|\\}|=|~|<|>|&|\\||-|\\+|\\*|/|\\\\|\\.|\\^|\\||\\s|;|:|,))", + "name": "storage.type.matlab", + "patterns": [ + { + "match": "\"\"" + }, + { + "match": "\"(?=.)" + }, + { + "match": "[^\"]+" + } + ] + } + ] + } + ] + } + }, + "scopeName": "source.matlab", + "uuid": "48F8858B-72FF-11D9-BFEE-000D93589AF6" +} diff --git a/src/lib/shiki/languages/mdc.tmLanguage.json b/src/lib/shiki/languages/mdc.tmLanguage.json new file mode 100644 index 0000000..1e47678 --- /dev/null +++ b/src/lib/shiki/languages/mdc.tmLanguage.json @@ -0,0 +1,579 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "mdc", + "injectionSelector": "L:text.html.markdown", + "scopeName": "text.markdown.mdc", + "patterns": [ + { + "include": "#component_block" + }, + { + "include": "#inline" + } + ], + "repository": { + "block": { + "comment": "Same as `text.html.markdown#block`, but without `raw_block`", + "patterns": [ + { + "include": "#component_block" + }, + { + "include": "text.html.markdown#separator" + }, + { + "include": "#heading" + }, + { + "include": "#blockquote" + }, + { + "include": "#lists" + }, + { + "include": "text.html.markdown#fenced_code_block" + }, + { + "include": "text.html.markdown#link-def" + }, + { + "include": "text.html.markdown#html" + }, + { + "include": "#paragraph" + } + ] + }, + "inline": { + "patterns": [ + { + "include": "#component_inline" + }, + { + "include": "#span" + }, + { + "include": "#markdown_attributes" + } + ] + }, + "markdown_attributes": { + "match": "(?x)([^{ ])( # attributes\n ({)\n ([^{]*)\n (})\n )", + "name": "markup.component.attribute", + "captures": { + "4": { + "patterns": [ + { + "include": "#attribute" + } + ] + } + } + }, + "span": { + "match": "(?x)\n (\\[) # Open\n ([^]]*)\n (\\])\n ( # attributes\n ({)\n ([^{]*)\n (})\n )?", + "name": "markup.component.span", + "captures": { + "2": { + "name": "string.other.link.description.title.markdown" + }, + "4": { + "patterns": [ + { + "include": "#attributes" + } + ] + } + } + }, + "attributes": { + "match": "(?x)( # attributes\n ({)\n ([^{]*)\n (})\n )", + "name": "markup.attributes", + "captures": { + "3": { + "patterns": [ + { + "include": "#attribute" + } + ] + } + } + }, + "component_inline": { + "match": "(?x)\n (^|\\G|\\s+)\n (:) # component colon\n (?i: # component name\n (\\w[\\w\\d-]*)\n )\n (\n ({[^}]*}) # attributes\n (\\[[^\\]]*\\])? # slot\n # reverse order\n | (\\[[^\\]]*\\]) # slot\n ({[^}]*})? # attributes\n )?", + "name": "markup.component.inline", + "captures": { + "2": { + "name": "punctuation.definition.tag.start.component" + }, + "3": { + "name": "entity.name.tag.component" + }, + "5": { + "patterns": [ + { + "include": "#attributes" + } + ] + }, + "6": { + "patterns": [ + { + "include": "#span" + } + ] + }, + "7": { + "patterns": [ + { + "include": "#span" + } + ] + }, + "8": { + "patterns": [ + { + "include": "#attributes" + } + ] + } + } + }, + "component_block": { + "begin": "(?x)\n (^|\\G)(\\s*)\n (:{2,}) # component colons\n (?i:\n (\\w[\\w\\d-]+) # component name\n ( # folowing spaces or attributes\n \\s*\n | {([^{]*)}\n )\n $\n )", + "name": "markup.component.block", + "end": "(^|\\G)(\\2)(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.tag.start.component" + }, + "4": { + "name": "entity.name.tag.component" + }, + "5": { + "patterns": [ + { + "include": "#attribute" + } + ] + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.tag.end.component" + } + }, + "patterns": [ + { + "comment": "Highlight ending tag of inner components", + "match": "(^|\\G)\\s*([:]{2,})$", + "captures": { + "2": { + "name": "punctuation.definition.tag.end.component" + } + } + }, + { + "include": "#content" + } + ] + }, + "content": { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([:]{2,})\\s*$)", + "contentName": "meta.embedded.block.component", + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(-{3})(\\s*)$", + "end": "(^|\\G)(\\s*(-{3})(\\s*)$)", + "patterns": [ + { + "include": "source.yaml" + } + ] + }, + { + "match": "^(\\s*)(#[\\w\\-\\_]*)\\s*(<!--(.*)-->)?$", + "captures": { + "2": { + "name": "entity.other.attribute-name.html" + }, + "3": { + "name": "comment.block.html" + } + } + }, + { + "comment": "Block Repository created to disable 4-space raw block inside components", + "include": "#block" + } + ] + }, + "attribute": { + "patterns": [ + { + "match": "(?x)\n (\n ([^=><\\s]*) # attribute name\n ( # attribute value\n =[\"]([^\"]*)([\"])|[']([^']*)(['])\n | =[^\\s'\"}]*\n )?\n \\s*\n )", + "captures": { + "2": { + "name": "entity.other.attribute-name.html" + }, + "3": { + "patterns": [ + { + "include": "#attribute-interior" + } + ] + } + } + } + ] + }, + "attribute-interior": { + "comment": "https://github.com/microsoft/vscode/blob/08d59c432609ae9306eb3889815977e93bb548de/extensions/html/syntaxes/html.tmLanguage.json#L376", + "patterns": [ + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "punctuation.separator.key-value.html" + } + }, + "end": "(?<=[^\\s=])(?!\\s*=)|(?=/?>)", + "patterns": [ + { + "match": "([^\\s\"'=<>`/]|/(?!>))+", + "name": "string.unquoted.html" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.html" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.html" + } + }, + "name": "string.quoted.double.html", + "patterns": [ + { + "include": "#entities" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.html" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.html" + } + }, + "name": "string.quoted.single.html", + "patterns": [ + { + "include": "#entities" + } + ] + }, + { + "match": "=", + "name": "invalid.illegal.unexpected-equals-sign.html" + } + ] + } + ] + }, + "entities": { + "comment": "https://github.com/microsoft/vscode/blob/08d59c432609ae9306eb3889815977e93bb548de/extensions/html/syntaxes/html.tmLanguage.json#L532", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.entity.html" + }, + "912": { + "name": "punctuation.definition.entity.html" + } + }, + "comment": "Yes this is a bit ridiculous, there are quite a lot of these", + "match": "(?x)\n\t\t\t\t\t\t(&)\t(?=[a-zA-Z])\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(a(s(ymp(eq)?|cr|t)|n(d(slope|d|v|and)?|g(s(t|ph)|zarr|e|le|rt(vb(d)?)?|msd(a(h|c|d|e|f|a|g|b))?)?)|c(y|irc|d|ute|E)?|tilde|o(pf|gon)|uml|p(id|os|prox(eq)?|e|E|acir)?|elig|f(r)?|w(conint|int)|l(pha|e(ph|fsym))|acute|ring|grave|m(p|a(cr|lg))|breve)|A(s(sign|cr)|nd|MP|c(y|irc)|tilde|o(pf|gon)|uml|pplyFunction|fr|Elig|lpha|acute|ring|grave|macr|breve))\n\t\t\t\t\t\t | (B(scr|cy|opf|umpeq|e(cause|ta|rnoullis)|fr|a(ckslash|r(v|wed))|reve)|b(s(cr|im(e)?|ol(hsub|b)?|emi)|n(ot|e(quiv)?)|c(y|ong)|ig(s(tar|qcup)|c(irc|up|ap)|triangle(down|up)|o(times|dot|plus)|uplus|vee|wedge)|o(t(tom)?|pf|wtie|x(h(d|u|D|U)?|times|H(d|u|D|U)?|d(R|l|r|L)|u(R|l|r|L)|plus|D(R|l|r|L)|v(R|h|H|l|r|L)?|U(R|l|r|L)|V(R|h|H|l|r|L)?|minus|box))|Not|dquo|u(ll(et)?|mp(e(q)?|E)?)|prime|e(caus(e)?|t(h|ween|a)|psi|rnou|mptyv)|karow|fr|l(ock|k(1(2|4)|34)|a(nk|ck(square|triangle(down|left|right)?|lozenge)))|a(ck(sim(eq)?|cong|prime|epsilon)|r(vee|wed(ge)?))|r(eve|vbar)|brk(tbrk)?))\n\t\t\t\t\t\t | (c(s(cr|u(p(e)?|b(e)?))|h(cy|i|eck(mark)?)|ylcty|c(irc|ups(sm)?|edil|a(ps|ron))|tdot|ir(scir|c(eq|le(d(R|circ|S|dash|ast)|arrow(left|right)))?|e|fnint|E|mid)?|o(n(int|g(dot)?)|p(y(sr)?|f|rod)|lon(e(q)?)?|m(p(fn|le(xes|ment))?|ma(t)?))|dot|u(darr(l|r)|p(s|c(up|ap)|or|dot|brcap)?|e(sc|pr)|vee|wed|larr(p)?|r(vearrow(left|right)|ly(eq(succ|prec)|vee|wedge)|arr(m)?|ren))|e(nt(erdot)?|dil|mptyv)|fr|w(conint|int)|lubs(uit)?|a(cute|p(s|c(up|ap)|dot|and|brcup)?|r(on|et))|r(oss|arr))|C(scr|hi|c(irc|onint|edil|aron)|ircle(Minus|Times|Dot|Plus)|Hcy|o(n(tourIntegral|int|gruent)|unterClockwiseContourIntegral|p(f|roduct)|lon(e)?)|dot|up(Cap)?|OPY|e(nterDot|dilla)|fr|lo(seCurly(DoubleQuote|Quote)|ckwiseContourIntegral)|a(yleys|cute|p(italDifferentialD)?)|ross))\n\t\t\t\t\t\t | (d(s(c(y|r)|trok|ol)|har(l|r)|c(y|aron)|t(dot|ri(f)?)|i(sin|e|v(ide(ontimes)?|onx)?|am(s|ond(suit)?)?|gamma)|Har|z(cy|igrarr)|o(t(square|plus|eq(dot)?|minus)?|ublebarwedge|pf|wn(harpoon(left|right)|downarrows|arrow)|llar)|d(otseq|a(rr|gger))?|u(har|arr)|jcy|e(lta|g|mptyv)|f(isht|r)|wangle|lc(orn|rop)|a(sh(v)?|leth|rr|gger)|r(c(orn|rop)|bkarow)|b(karow|lac)|Arr)|D(s(cr|trok)|c(y|aron)|Scy|i(fferentialD|a(critical(Grave|Tilde|Do(t|ubleAcute)|Acute)|mond))|o(t(Dot|Equal)?|uble(Right(Tee|Arrow)|ContourIntegral|Do(t|wnArrow)|Up(DownArrow|Arrow)|VerticalBar|L(ong(RightArrow|Left(RightArrow|Arrow))|eft(RightArrow|Tee|Arrow)))|pf|wn(Right(TeeVector|Vector(Bar)?)|Breve|Tee(Arrow)?|arrow|Left(RightVector|TeeVector|Vector(Bar)?)|Arrow(Bar|UpArrow)?))|Zcy|el(ta)?|D(otrahd)?|Jcy|fr|a(shv|rr|gger)))\n\t\t\t\t\t\t | (e(s(cr|im|dot)|n(sp|g)|c(y|ir(c)?|olon|aron)|t(h|a)|o(pf|gon)|dot|u(ro|ml)|p(si(v|lon)?|lus|ar(sl)?)|e|D(ot|Dot)|q(s(im|lant(less|gtr))|c(irc|olon)|u(iv(DD)?|est|als)|vparsl)|f(Dot|r)|l(s(dot)?|inters|l)?|a(ster|cute)|r(Dot|arr)|g(s(dot)?|rave)?|x(cl|ist|p(onentiale|ectation))|m(sp(1(3|4))?|pty(set|v)?|acr))|E(s(cr|im)|c(y|irc|aron)|ta|o(pf|gon)|NG|dot|uml|TH|psilon|qu(ilibrium|al(Tilde)?)|fr|lement|acute|grave|x(ists|ponentialE)|m(pty(SmallSquare|VerySmallSquare)|acr)))\n\t\t\t\t\t\t | (f(scr|nof|cy|ilig|o(pf|r(k(v)?|all))|jlig|partint|emale|f(ilig|l(ig|lig)|r)|l(tns|lig|at)|allingdotseq|r(own|a(sl|c(1(2|8|3|4|5|6)|78|2(3|5)|3(8|4|5)|45|5(8|6)))))|F(scr|cy|illed(SmallSquare|VerySmallSquare)|o(uriertrf|pf|rAll)|fr))\n\t\t\t\t\t\t | (G(scr|c(y|irc|edil)|t|opf|dot|T|Jcy|fr|amma(d)?|reater(Greater|SlantEqual|Tilde|Equal(Less)?|FullEqual|Less)|g|breve)|g(s(cr|im(e|l)?)|n(sim|e(q(q)?)?|E|ap(prox)?)|c(y|irc)|t(c(c|ir)|dot|quest|lPar|r(sim|dot|eq(qless|less)|less|a(pprox|rr)))?|imel|opf|dot|jcy|e(s(cc|dot(o(l)?)?|l(es)?)?|q(slant|q)?|l)?|v(nE|ertneqq)|fr|E(l)?|l(j|E|a)?|a(cute|p|mma(d)?)|rave|g(g)?|breve))\n\t\t\t\t\t\t | (h(s(cr|trok|lash)|y(phen|bull)|circ|o(ok(leftarrow|rightarrow)|pf|arr|rbar|mtht)|e(llip|arts(uit)?|rcon)|ks(earow|warow)|fr|a(irsp|lf|r(dcy|r(cir|w)?)|milt)|bar|Arr)|H(s(cr|trok)|circ|ilbertSpace|o(pf|rizontalLine)|ump(DownHump|Equal)|fr|a(cek|t)|ARDcy))\n\t\t\t\t\t\t | (i(s(cr|in(s(v)?|dot|v|E)?)|n(care|t(cal|prod|e(rcal|gers)|larhk)?|odot|fin(tie)?)?|c(y|irc)?|t(ilde)?|i(nfin|i(nt|int)|ota)?|o(cy|ta|pf|gon)|u(kcy|ml)|jlig|prod|e(cy|xcl)|quest|f(f|r)|acute|grave|m(of|ped|a(cr|th|g(part|e|line))))|I(scr|n(t(e(rsection|gral))?|visible(Comma|Times))|c(y|irc)|tilde|o(ta|pf|gon)|dot|u(kcy|ml)|Ocy|Jlig|fr|Ecy|acute|grave|m(plies|a(cr|ginaryI))?))\n\t\t\t\t\t\t | (j(s(cr|ercy)|c(y|irc)|opf|ukcy|fr|math)|J(s(cr|ercy)|c(y|irc)|opf|ukcy|fr))\n\t\t\t\t\t\t | (k(scr|hcy|c(y|edil)|opf|jcy|fr|appa(v)?|green)|K(scr|c(y|edil)|Hcy|opf|Jcy|fr|appa))\n\t\t\t\t\t\t | (l(s(h|cr|trok|im(e|g)?|q(uo(r)?|b)|aquo)|h(ar(d|u(l)?)|blk)|n(sim|e(q(q)?)?|E|ap(prox)?)|c(y|ub|e(il|dil)|aron)|Barr|t(hree|c(c|ir)|imes|dot|quest|larr|r(i(e|f)?|Par))?|Har|o(ng(left(arrow|rightarrow)|rightarrow|mapsto)|times|z(enge|f)?|oparrow(left|right)|p(f|lus|ar)|w(ast|bar)|a(ng|rr)|brk)|d(sh|ca|quo(r)?|r(dhar|ushar))|ur(dshar|uhar)|jcy|par(lt)?|e(s(s(sim|dot|eq(qgtr|gtr)|approx|gtr)|cc|dot(o(r)?)?|g(es)?)?|q(slant|q)?|ft(harpoon(down|up)|threetimes|leftarrows|arrow(tail)?|right(squigarrow|harpoons|arrow(s)?))|g)?|v(nE|ertneqq)|f(isht|loor|r)|E(g)?|l(hard|corner|tri|arr)?|a(ng(d|le)?|cute|t(e(s)?|ail)?|p|emptyv|quo|rr(sim|hk|tl|pl|fs|lp|b(fs)?)?|gran|mbda)|r(har(d)?|corner|tri|arr|m)|g(E)?|m(idot|oust(ache)?)|b(arr|r(k(sl(d|u)|e)|ac(e|k))|brk)|A(tail|arr|rr))|L(s(h|cr|trok)|c(y|edil|aron)|t|o(ng(RightArrow|left(arrow|rightarrow)|rightarrow|Left(RightArrow|Arrow))|pf|wer(RightArrow|LeftArrow))|T|e(ss(Greater|SlantEqual|Tilde|EqualGreater|FullEqual|Less)|ft(Right(Vector|Arrow)|Ceiling|T(ee(Vector|Arrow)?|riangle(Bar|Equal)?)|Do(ubleBracket|wn(TeeVector|Vector(Bar)?))|Up(TeeVector|DownVector|Vector(Bar)?)|Vector(Bar)?|arrow|rightarrow|Floor|A(ngleBracket|rrow(RightArrow|Bar)?)))|Jcy|fr|l(eftarrow)?|a(ng|cute|placetrf|rr|mbda)|midot))\n\t\t\t\t\t\t | (M(scr|cy|inusPlus|opf|u|e(diumSpace|llintrf)|fr|ap)|m(s(cr|tpos)|ho|nplus|c(y|omma)|i(nus(d(u)?|b)?|cro|d(cir|dot|ast)?)|o(dels|pf)|dash|u(ltimap|map)?|p|easuredangle|DDot|fr|l(cp|dr)|a(cr|p(sto(down|up|left)?)?|l(t(ese)?|e)|rker)))\n\t\t\t\t\t\t | (n(s(hort(parallel|mid)|c(cue|e|r)?|im(e(q)?)?|u(cc(eq)?|p(set(eq(q)?)?|e|E)?|b(set(eq(q)?)?|e|E)?)|par|qsu(pe|be)|mid)|Rightarrow|h(par|arr|Arr)|G(t(v)?|g)|c(y|ong(dot)?|up|edil|a(p|ron))|t(ilde|lg|riangle(left(eq)?|right(eq)?)|gl)|i(s(d)?|v)?|o(t(ni(v(c|a|b))?|in(dot|v(c|a|b)|E)?)?|pf)|dash|u(m(sp|ero)?)?|jcy|p(olint|ar(sl|t|allel)?|r(cue|e(c(eq)?)?)?)|e(s(im|ear)|dot|quiv|ar(hk|r(ow)?)|xist(s)?|Arr)?|v(sim|infin|Harr|dash|Dash|l(t(rie)?|e|Arr)|ap|r(trie|Arr)|g(t|e))|fr|w(near|ar(hk|r(ow)?)|Arr)|V(dash|Dash)|l(sim|t(ri(e)?)?|dr|e(s(s)?|q(slant|q)?|ft(arrow|rightarrow))?|E|arr|Arr)|a(ng|cute|tur(al(s)?)?|p(id|os|prox|E)?|bla)|r(tri(e)?|ightarrow|arr(c|w)?|Arr)|g(sim|t(r)?|e(s|q(slant|q)?)?|E)|mid|L(t(v)?|eft(arrow|rightarrow)|l)|b(sp|ump(e)?))|N(scr|c(y|edil|aron)|tilde|o(nBreakingSpace|Break|t(R(ightTriangle(Bar|Equal)?|everseElement)|Greater(Greater|SlantEqual|Tilde|Equal|FullEqual|Less)?|S(u(cceeds(SlantEqual|Tilde|Equal)?|perset(Equal)?|bset(Equal)?)|quareSu(perset(Equal)?|bset(Equal)?))|Hump(DownHump|Equal)|Nested(GreaterGreater|LessLess)|C(ongruent|upCap)|Tilde(Tilde|Equal|FullEqual)?|DoubleVerticalBar|Precedes(SlantEqual|Equal)?|E(qual(Tilde)?|lement|xists)|VerticalBar|Le(ss(Greater|SlantEqual|Tilde|Equal|Less)?|ftTriangle(Bar|Equal)?))?|pf)|u|e(sted(GreaterGreater|LessLess)|wLine|gative(MediumSpace|Thi(nSpace|ckSpace)|VeryThinSpace))|Jcy|fr|acute))\n\t\t\t\t\t\t | (o(s(cr|ol|lash)|h(m|bar)|c(y|ir(c)?)|ti(lde|mes(as)?)|S|int|opf|d(sold|iv|ot|ash|blac)|uml|p(erp|lus|ar)|elig|vbar|f(cir|r)|l(c(ir|ross)|t|ine|arr)|a(st|cute)|r(slope|igof|or|d(er(of)?|f|m)?|v|arr)?|g(t|on|rave)|m(i(nus|cron|d)|ega|acr))|O(s(cr|lash)|c(y|irc)|ti(lde|mes)|opf|dblac|uml|penCurly(DoubleQuote|Quote)|ver(B(ar|rac(e|ket))|Parenthesis)|fr|Elig|acute|r|grave|m(icron|ega|acr)))\n\t\t\t\t\t\t | (p(s(cr|i)|h(i(v)?|one|mmat)|cy|i(tchfork|v)?|o(intint|und|pf)|uncsp|er(cnt|tenk|iod|p|mil)|fr|l(us(sim|cir|two|d(o|u)|e|acir|mn|b)?|an(ck(h)?|kv))|ar(s(im|l)|t|a(llel)?)?|r(sim|n(sim|E|ap)|cue|ime(s)?|o(d|p(to)?|f(surf|line|alar))|urel|e(c(sim|n(sim|eqq|approx)|curlyeq|eq|approx)?)?|E|ap)?|m)|P(s(cr|i)|hi|cy|i|o(incareplane|pf)|fr|lusMinus|artialD|r(ime|o(duct|portion(al)?)|ecedes(SlantEqual|Tilde|Equal)?)?))\n\t\t\t\t\t\t | (q(scr|int|opf|u(ot|est(eq)?|at(int|ernions))|prime|fr)|Q(scr|opf|UOT|fr))\n\t\t\t\t\t\t | (R(s(h|cr)|ho|c(y|edil|aron)|Barr|ight(Ceiling|T(ee(Vector|Arrow)?|riangle(Bar|Equal)?)|Do(ubleBracket|wn(TeeVector|Vector(Bar)?))|Up(TeeVector|DownVector|Vector(Bar)?)|Vector(Bar)?|arrow|Floor|A(ngleBracket|rrow(Bar|LeftArrow)?))|o(undImplies|pf)|uleDelayed|e(verse(UpEquilibrium|E(quilibrium|lement)))?|fr|EG|a(ng|cute|rr(tl)?)|rightarrow)|r(s(h|cr|q(uo(r)?|b)|aquo)|h(o(v)?|ar(d|u(l)?))|nmid|c(y|ub|e(il|dil)|aron)|Barr|t(hree|imes|ri(e|f|ltri)?)|i(singdotseq|ng|ght(squigarrow|harpoon(down|up)|threetimes|left(harpoons|arrows)|arrow(tail)?|rightarrows))|Har|o(times|p(f|lus|ar)|a(ng|rr)|brk)|d(sh|ca|quo(r)?|ldhar)|uluhar|p(polint|ar(gt)?)|e(ct|al(s|ine|part)?|g)|f(isht|loor|r)|l(har|arr|m)|a(ng(d|e|le)?|c(ute|e)|t(io(nals)?|ail)|dic|emptyv|quo|rr(sim|hk|c|tl|pl|fs|w|lp|ap|b(fs)?)?)|rarr|x|moust(ache)?|b(arr|r(k(sl(d|u)|e)|ac(e|k))|brk)|A(tail|arr|rr)))\n\t\t\t\t\t\t | (s(s(cr|tarf|etmn|mile)|h(y|c(hcy|y)|ort(parallel|mid)|arp)|c(sim|y|n(sim|E|ap)|cue|irc|polint|e(dil)?|E|a(p|ron))?|t(ar(f)?|r(ns|aight(phi|epsilon)))|i(gma(v|f)?|m(ne|dot|plus|e(q)?|l(E)?|rarr|g(E)?)?)|zlig|o(pf|ftcy|l(b(ar)?)?)|dot(e|b)?|u(ng|cc(sim|n(sim|eqq|approx)|curlyeq|eq|approx)?|p(s(im|u(p|b)|et(neq(q)?|eq(q)?)?)|hs(ol|ub)|1|n(e|E)|2|d(sub|ot)|3|plus|e(dot)?|E|larr|mult)?|m|b(s(im|u(p|b)|et(neq(q)?|eq(q)?)?)|n(e|E)|dot|plus|e(dot)?|E|rarr|mult)?)|pa(des(uit)?|r)|e(swar|ct|tm(n|inus)|ar(hk|r(ow)?)|xt|mi|Arr)|q(su(p(set(eq)?|e)?|b(set(eq)?|e)?)|c(up(s)?|ap(s)?)|u(f|ar(e|f))?)|fr(own)?|w(nwar|ar(hk|r(ow)?)|Arr)|larr|acute|rarr|m(t(e(s)?)?|i(d|le)|eparsl|a(shp|llsetminus))|bquo)|S(scr|hort(RightArrow|DownArrow|UpArrow|LeftArrow)|c(y|irc|edil|aron)?|tar|igma|H(cy|CHcy)|opf|u(c(hThat|ceeds(SlantEqual|Tilde|Equal)?)|p(set|erset(Equal)?)?|m|b(set(Equal)?)?)|OFTcy|q(uare(Su(perset(Equal)?|bset(Equal)?)|Intersection|Union)?|rt)|fr|acute|mallCircle))\n\t\t\t\t\t\t | (t(s(hcy|c(y|r)|trok)|h(i(nsp|ck(sim|approx))|orn|e(ta(sym|v)?|re(4|fore))|k(sim|ap))|c(y|edil|aron)|i(nt|lde|mes(d|b(ar)?)?)|o(sa|p(cir|f(ork)?|bot)?|ea)|dot|prime|elrec|fr|w(ixt|ohead(leftarrow|rightarrow))|a(u|rget)|r(i(sb|time|dot|plus|e|angle(down|q|left(eq)?|right(eq)?)?|minus)|pezium|ade)|brk)|T(s(cr|trok)|RADE|h(i(nSpace|ckSpace)|e(ta|refore))|c(y|edil|aron)|S(cy|Hcy)|ilde(Tilde|Equal|FullEqual)?|HORN|opf|fr|a(u|b)|ripleDot))\n\t\t\t\t\t\t | (u(scr|h(ar(l|r)|blk)|c(y|irc)|t(ilde|dot|ri(f)?)|Har|o(pf|gon)|d(har|arr|blac)|u(arr|ml)|p(si(h|lon)?|harpoon(left|right)|downarrow|uparrows|lus|arrow)|f(isht|r)|wangle|l(c(orn(er)?|rop)|tri)|a(cute|rr)|r(c(orn(er)?|rop)|tri|ing)|grave|m(l|acr)|br(cy|eve)|Arr)|U(scr|n(ion(Plus)?|der(B(ar|rac(e|ket))|Parenthesis))|c(y|irc)|tilde|o(pf|gon)|dblac|uml|p(si(lon)?|downarrow|Tee(Arrow)?|per(RightArrow|LeftArrow)|DownArrow|Equilibrium|arrow|Arrow(Bar|DownArrow)?)|fr|a(cute|rr(ocir)?)|ring|grave|macr|br(cy|eve)))\n\t\t\t\t\t\t | (v(s(cr|u(pn(e|E)|bn(e|E)))|nsu(p|b)|cy|Bar(v)?|zigzag|opf|dash|prop|e(e(eq|bar)?|llip|r(t|bar))|Dash|fr|ltri|a(ngrt|r(s(igma|u(psetneq(q)?|bsetneq(q)?))|nothing|t(heta|riangle(left|right))|p(hi|i|ropto)|epsilon|kappa|r(ho)?))|rtri|Arr)|V(scr|cy|opf|dash(l)?|e(e|r(yThinSpace|t(ical(Bar|Separator|Tilde|Line))?|bar))|Dash|vdash|fr|bar))\n\t\t\t\t\t\t | (w(scr|circ|opf|p|e(ierp|d(ge(q)?|bar))|fr|r(eath)?)|W(scr|circ|opf|edge|fr))\n\t\t\t\t\t\t | (X(scr|i|opf|fr)|x(s(cr|qcup)|h(arr|Arr)|nis|c(irc|up|ap)|i|o(time|dot|p(f|lus))|dtri|u(tri|plus)|vee|fr|wedge|l(arr|Arr)|r(arr|Arr)|map))\n\t\t\t\t\t\t | (y(scr|c(y|irc)|icy|opf|u(cy|ml)|en|fr|ac(y|ute))|Y(scr|c(y|irc)|opf|uml|Icy|Ucy|fr|acute|Acy))\n\t\t\t\t\t\t | (z(scr|hcy|c(y|aron)|igrarr|opf|dot|e(ta|etrf)|fr|w(nj|j)|acute)|Z(scr|c(y|aron)|Hcy|opf|dot|e(ta|roWidthSpace)|fr|acute))\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(;)\n\t\t\t\t\t", + "name": "constant.character.entity.named.$2.html" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.html" + }, + "3": { + "name": "punctuation.definition.entity.html" + } + }, + "match": "(&)#[0-9]+(;)", + "name": "constant.character.entity.numeric.decimal.html" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.html" + }, + "3": { + "name": "punctuation.definition.entity.html" + } + }, + "match": "(&)#[xX][0-9a-fA-F]+(;)", + "name": "constant.character.entity.numeric.hexadecimal.html" + }, + { + "match": "&(?=[a-zA-Z0-9]+;)", + "name": "invalid.illegal.ambiguous-ampersand.html" + } + ] + }, + "heading": { + "match": "(?:^|\\G)[ ]*(#{1,6}\\s+(.*?)(\\s+#{1,6})?\\s*)$", + "captures": { + "1": { + "patterns": [ + { + "match": "(#{6})\\s+(.*?)(?:\\s+(#+))?\\s*$", + "name": "heading.6.markdown", + "captures": { + "1": { + "name": "punctuation.definition.heading.markdown" + }, + "2": { + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "text.html.markdown#inline" + }, + { + "include": "text.html.derivative" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.markdown" + } + } + }, + { + "match": "(#{5})\\s+(.*?)(?:\\s+(#+))?\\s*$", + "name": "heading.5.markdown", + "captures": { + "1": { + "name": "punctuation.definition.heading.markdown" + }, + "2": { + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "text.html.markdown#inline" + }, + { + "include": "text.html.derivative" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.markdown" + } + } + }, + { + "match": "(#{4})\\s+(.*?)(?:\\s+(#+))?\\s*$", + "name": "heading.4.markdown", + "captures": { + "1": { + "name": "punctuation.definition.heading.markdown" + }, + "2": { + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "text.html.markdown#inline" + }, + { + "include": "text.html.derivative" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.markdown" + } + } + }, + { + "match": "(#{3})\\s+(.*?)(?:\\s+(#+))?\\s*$", + "name": "heading.3.markdown", + "captures": { + "1": { + "name": "punctuation.definition.heading.markdown" + }, + "2": { + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "text.html.markdown#inline" + }, + { + "include": "text.html.derivative" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.markdown" + } + } + }, + { + "match": "(#{2})\\s+(.*?)(?:\\s+(#+))?\\s*$", + "name": "heading.2.markdown", + "captures": { + "1": { + "name": "punctuation.definition.heading.markdown" + }, + "2": { + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "text.html.markdown#inline" + }, + { + "include": "text.html.derivative" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.markdown" + } + } + }, + { + "match": "(#{1})\\s+(.*?)(?:\\s+(#+))?\\s*$", + "name": "heading.1.markdown", + "captures": { + "1": { + "name": "punctuation.definition.heading.markdown" + }, + "2": { + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "text.html.markdown#inline" + }, + { + "include": "text.html.derivative" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.markdown" + } + } + } + ] + } + }, + "name": "markup.heading.markdown", + "patterns": [ + { + "include": "text.html.markdown#inline" + } + ] + }, + "heading-setext": { + "patterns": [ + { + "match": "^(={3,})(?=[ \\t]*$\\n?)", + "name": "markup.heading.setext.1.markdown" + }, + { + "match": "^(-{3,})(?=[ \\t]*$\\n?)", + "name": "markup.heading.setext.2.markdown" + } + ] + }, + "lists": { + "patterns": [ + { + "begin": "(^|\\G)([ ]*)([*+-])([ \\t])", + "beginCaptures": { + "3": { + "name": "punctuation.definition.list.begin.markdown" + } + }, + "comment": "Currently does not support un-indented second lines.", + "name": "markup.list.unnumbered.markdown", + "patterns": [ + { + "include": "#block" + }, + { + "include": "text.html.markdown#list_paragraph" + } + ], + "while": "((^|\\G)([ ]*|\\t))|(^[ \\t]*$)" + }, + { + "begin": "(^|\\G)([ ]*)([0-9]+\\.)([ \\t])", + "beginCaptures": { + "3": { + "name": "punctuation.definition.list.begin.markdown" + } + }, + "name": "markup.list.numbered.markdown", + "patterns": [ + { + "include": "#block" + }, + { + "include": "text.html.markdown#list_paragraph" + } + ], + "while": "((^|\\G)([ ]*|\\t))|(^[ \\t]*$)" + } + ] + }, + "paragraph": { + "begin": "(^|\\G)[ ]*(?=\\S)", + "name": "meta.paragraph.markdown", + "patterns": [ + { + "include": "text.html.markdown#inline" + }, + { + "include": "text.html.derivative" + }, + { + "include": "#heading-setext" + } + ], + "while": "(^|\\G)((?=\\s*[-=]{3,}\\s*$)|[ ]{4,}(?=\\S))" + }, + "blockquote": { + "begin": "(^|\\G)[ ]*(>) ?", + "captures": { + "2": { + "name": "punctuation.definition.quote.begin.markdown" + } + }, + "name": "markup.quote.markdown", + "patterns": [ + { + "include": "#block" + } + ], + "while": "(^|\\G)\\s*(>) ?" + } + } +} diff --git a/src/lib/shiki/languages/mdx.tmLanguage.json b/src/lib/shiki/languages/mdx.tmLanguage.json new file mode 100644 index 0000000..534ed99 --- /dev/null +++ b/src/lib/shiki/languages/mdx.tmLanguage.json @@ -0,0 +1,5627 @@ +{ + "name": "mdx", + "uuid": "fe65e2cd-7c73-4a27-8b5e-5902893626aa", + "fileTypes": ["mdx"], + "patterns": [ + { + "include": "#markdown-frontmatter" + }, + { + "include": "#markdown-sections" + } + ], + "repository": { + "markdown-frontmatter": { + "patterns": [ + { + "include": "#extension-toml" + }, + { + "include": "#extension-yaml" + } + ] + }, + "markdown-sections": { + "patterns": [ + { + "include": "#commonmark-block-quote" + }, + { + "include": "#commonmark-code-fenced" + }, + { + "include": "#extension-gfm-footnote-definition" + }, + { + "include": "#commonmark-definition" + }, + { + "include": "#commonmark-heading-atx" + }, + { + "include": "#commonmark-thematic-break" + }, + { + "include": "#commonmark-heading-setext" + }, + { + "include": "#commonmark-list-item" + }, + { + "include": "#extension-gfm-table" + }, + { + "include": "#extension-math-flow" + }, + { + "include": "#extension-mdx-esm" + }, + { + "include": "#extension-mdx-expression-flow" + }, + { + "include": "#extension-mdx-jsx-flow" + }, + { + "include": "#commonmark-paragraph" + } + ] + }, + "markdown-string": { + "patterns": [ + { + "include": "#commonmark-character-escape" + }, + { + "include": "#commonmark-character-reference" + } + ] + }, + "markdown-text": { + "patterns": [ + { + "include": "#commonmark-attention" + }, + { + "include": "#commonmark-character-escape" + }, + { + "include": "#commonmark-character-reference" + }, + { + "include": "#commonmark-code-text" + }, + { + "include": "#commonmark-hard-break-trailing" + }, + { + "include": "#commonmark-hard-break-escape" + }, + { + "include": "#commonmark-label-end" + }, + { + "include": "#extension-gfm-footnote-call" + }, + { + "include": "#commonmark-label-start" + }, + { + "include": "#extension-gfm-autolink-literal" + }, + { + "include": "#extension-gfm-strikethrough" + }, + { + "include": "#extension-github-gemoji" + }, + { + "include": "#extension-github-mention" + }, + { + "include": "#extension-github-reference" + }, + { + "include": "#extension-math-text" + }, + { + "include": "#extension-mdx-expression-text" + }, + { + "include": "#extension-mdx-jsx-text" + } + ] + }, + "commonmark-attention": { + "patterns": [ + { + "match": "(?<=\\S)\\*{3,}|\\*{3,}(?=\\S)", + "name": "string.other.strong.emphasis.asterisk.mdx" + }, + { + "match": "(?<=[\\p{L}\\p{N}])_{3,}(?![\\p{L}\\p{N}])|(?<=\\p{P})_{3,}|(?<![\\p{L}\\p{N}]|\\p{P})_{3,}(?!\\s)", + "name": "string.other.strong.emphasis.underscore.mdx" + }, + { + "match": "(?<=\\S)\\*{2}|\\*{2}(?=\\S)", + "name": "string.other.strong.asterisk.mdx" + }, + { + "match": "(?<=[\\p{L}\\p{N}])_{2}(?![\\p{L}\\p{N}])|(?<=\\p{P})_{2}|(?<![\\p{L}\\p{N}]|\\p{P})_{2}(?!\\s)", + "name": "string.other.strong.underscore.mdx" + }, + { + "match": "(?<=\\S)\\*|\\*(?=\\S)", + "name": "string.other.emphasis.asterisk.mdx" + }, + { + "match": "(?<=[\\p{L}\\p{N}])_(?![\\p{L}\\p{N}])|(?<=\\p{P})_|(?<![\\p{L}\\p{N}]|\\p{P})_(?!\\s)", + "name": "string.other.emphasis.underscore.mdx" + } + ] + }, + "commonmark-block-quote": { + "begin": "(?:^|\\G)[\\t ]*(>)[ ]?", + "beginCaptures": { + "0": { + "name": "markup.quote.mdx" + }, + "1": { + "name": "punctuation.definition.quote.begin.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "name": "markup.quote.mdx", + "while": "(?:^|\\G)[\\t ]*(>)[ ]?", + "whileCaptures": { + "0": { + "name": "markup.quote.mdx" + }, + "1": { + "name": "punctuation.definition.quote.begin.mdx" + } + } + }, + "commonmark-character-escape": { + "match": "\\\\(?:[!\"#$%&'()*+,\\-.\\/:;<=>?@\\[\\\\\\]^_`{|}~])", + "name": "constant.language.character-escape.mdx" + }, + "commonmark-character-reference": { + "patterns": [ + { + "include": "#whatwg-html-data-character-reference-named-terminated" + }, + { + "match": "(&)(#)([Xx])([0-9A-Fa-f]{1,6})(;)", + "name": "constant.language.character-reference.numeric.hexadecimal.html", + "captures": { + "1": { + "name": "punctuation.definition.character-reference.begin.html" + }, + "2": { + "name": "punctuation.definition.character-reference.numeric.html" + }, + "3": { + "name": "punctuation.definition.character-reference.numeric.hexadecimal.html" + }, + "4": { + "name": "constant.numeric.integer.hexadecimal.html" + }, + "5": { + "name": "punctuation.definition.character-reference.end.html" + } + } + }, + { + "match": "(&)(#)([0-9]{1,7})(;)", + "name": "constant.language.character-reference.numeric.decimal.html", + "captures": { + "1": { + "name": "punctuation.definition.character-reference.begin.html" + }, + "2": { + "name": "punctuation.definition.character-reference.numeric.html" + }, + "3": { + "name": "constant.numeric.integer.decimal.html" + }, + "4": { + "name": "punctuation.definition.character-reference.end.html" + } + } + } + ] + }, + "commonmark-code-fenced": { + "patterns": [ + { + "include": "#commonmark-code-fenced-apib" + }, + { + "include": "#commonmark-code-fenced-asciidoc" + }, + { + "include": "#commonmark-code-fenced-c" + }, + { + "include": "#commonmark-code-fenced-clojure" + }, + { + "include": "#commonmark-code-fenced-coffee" + }, + { + "include": "#commonmark-code-fenced-console" + }, + { + "include": "#commonmark-code-fenced-cpp" + }, + { + "include": "#commonmark-code-fenced-cs" + }, + { + "include": "#commonmark-code-fenced-css" + }, + { + "include": "#commonmark-code-fenced-diff" + }, + { + "include": "#commonmark-code-fenced-dockerfile" + }, + { + "include": "#commonmark-code-fenced-elixir" + }, + { + "include": "#commonmark-code-fenced-elm" + }, + { + "include": "#commonmark-code-fenced-erlang" + }, + { + "include": "#commonmark-code-fenced-gitconfig" + }, + { + "include": "#commonmark-code-fenced-go" + }, + { + "include": "#commonmark-code-fenced-graphql" + }, + { + "include": "#commonmark-code-fenced-haskell" + }, + { + "include": "#commonmark-code-fenced-html" + }, + { + "include": "#commonmark-code-fenced-ini" + }, + { + "include": "#commonmark-code-fenced-java" + }, + { + "include": "#commonmark-code-fenced-js" + }, + { + "include": "#commonmark-code-fenced-json" + }, + { + "include": "#commonmark-code-fenced-julia" + }, + { + "include": "#commonmark-code-fenced-kotlin" + }, + { + "include": "#commonmark-code-fenced-less" + }, + { + "include": "#commonmark-code-fenced-less" + }, + { + "include": "#commonmark-code-fenced-lua" + }, + { + "include": "#commonmark-code-fenced-makefile" + }, + { + "include": "#commonmark-code-fenced-md" + }, + { + "include": "#commonmark-code-fenced-mdx" + }, + { + "include": "#commonmark-code-fenced-objc" + }, + { + "include": "#commonmark-code-fenced-perl" + }, + { + "include": "#commonmark-code-fenced-php" + }, + { + "include": "#commonmark-code-fenced-php" + }, + { + "include": "#commonmark-code-fenced-python" + }, + { + "include": "#commonmark-code-fenced-r" + }, + { + "include": "#commonmark-code-fenced-raku" + }, + { + "include": "#commonmark-code-fenced-ruby" + }, + { + "include": "#commonmark-code-fenced-rust" + }, + { + "include": "#commonmark-code-fenced-scala" + }, + { + "include": "#commonmark-code-fenced-scss" + }, + { + "include": "#commonmark-code-fenced-shell" + }, + { + "include": "#commonmark-code-fenced-shell-session" + }, + { + "include": "#commonmark-code-fenced-sql" + }, + { + "include": "#commonmark-code-fenced-svg" + }, + { + "include": "#commonmark-code-fenced-swift" + }, + { + "include": "#commonmark-code-fenced-toml" + }, + { + "include": "#commonmark-code-fenced-ts" + }, + { + "include": "#commonmark-code-fenced-tsx" + }, + { + "include": "#commonmark-code-fenced-vbnet" + }, + { + "include": "#commonmark-code-fenced-xml" + }, + { + "include": "#commonmark-code-fenced-yaml" + }, + { + "include": "#commonmark-code-fenced-unknown" + } + ] + }, + "commonmark-code-fenced-unknown": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?:[^\\t\\n\\r` ])+)(?:[\\t ]+((?:[^\\n\\r`])+))?)?(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "markup.raw.code.fenced.mdx", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.other.mdx" + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?:[^\\t\\n\\r ])+)(?:[\\t ]+((?:[^\\n\\r])+))?)?(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "markup.raw.code.fenced.mdx", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.other.mdx" + } + ] + }, + "commonmark-code-text": { + "match": "(?<!`)(`+)(?!`)(.+?)(?<!`)(\\1)(?!`)", + "name": "markup.code.other.mdx", + "captures": { + "1": { + "name": "string.other.begin.code.mdx" + }, + "2": { + "name": "markup.raw.code.mdx markup.inline.raw.code.mdx" + }, + "3": { + "name": "string.other.end.code.mdx" + } + } + }, + "commonmark-definition": { + "match": "(?:^|\\G)[\\t ]*(\\[)((?:[^\\[\\\\\\]]|\\\\[\\[\\\\\\]]?)+?)(\\])(:)[ \\t]*(?:(<)((?:[^\\n<\\\\>]|\\\\[<\\\\>]?)*)(>)|(\\g<destination_raw>))(?:[\\t ]+(?:(\")((?:[^\"\\\\]|\\\\[\"\\\\]?)*)(\")|(')((?:[^'\\\\]|\\\\['\\\\]?)*)(')|(\\()((?:[^\\)\\\\]|\\\\[\\)\\\\]?)*)(\\))))?$(?<destination_raw>(?!\\<)(?:(?:[^\\p{Cc}\\ \\\\\\(\\)]|\\\\[\\(\\)\\\\]?)|\\(\\g<destination_raw>*\\))+){0}", + "name": "meta.link.reference.def.mdx", + "captures": { + "1": { + "name": "string.other.begin.mdx" + }, + "2": { + "name": "entity.name.identifier.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "name": "string.other.end.mdx" + }, + "4": { + "name": "punctuation.separator.key-value.mdx" + }, + "5": { + "name": "string.other.begin.destination.mdx" + }, + "6": { + "name": "string.other.link.destination.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "7": { + "name": "string.other.end.destination.mdx" + }, + "8": { + "name": "string.other.link.destination.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "9": { + "name": "string.other.begin.mdx" + }, + "10": { + "name": "string.quoted.double.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "11": { + "name": "string.other.end.mdx" + }, + "12": { + "name": "string.other.begin.mdx" + }, + "13": { + "name": "string.quoted.single.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "14": { + "name": "string.other.end.mdx" + }, + "15": { + "name": "string.other.begin.mdx" + }, + "16": { + "name": "string.quoted.paren.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "17": { + "name": "string.other.end.mdx" + } + } + }, + "commonmark-hard-break-escape": { + "match": "\\\\$", + "name": "constant.language.character-escape.line-ending.mdx" + }, + "commonmark-hard-break-trailing": { + "match": "( ){2,}$", + "name": "carriage-return constant.language.character-escape.line-ending.mdx" + }, + "commonmark-heading-atx": { + "patterns": [ + { + "match": "(?:^|\\G)[\\t ]*(#{1}(?!#))(?:[ \\t]+([^\\r\\n]+?)(?:[ \\t]+(#+?))?)?[ \\t]*$", + "name": "markup.heading.atx.1.mdx", + "captures": { + "1": { + "name": "punctuation.definition.heading.mdx" + }, + "2": { + "name": "entity.name.section.mdx", + "patterns": [ + { + "include": "#markdown-text" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.mdx" + } + } + }, + { + "match": "(?:^|\\G)[\\t ]*(#{2}(?!#))(?:[ \\t]+([^\\r\\n]+?)(?:[ \\t]+(#+?))?)?[ \\t]*$", + "name": "markup.heading.atx.2.mdx", + "captures": { + "1": { + "name": "punctuation.definition.heading.mdx" + }, + "2": { + "name": "entity.name.section.mdx", + "patterns": [ + { + "include": "#markdown-text" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.mdx" + } + } + }, + { + "match": "(?:^|\\G)[\\t ]*(#{3}(?!#))(?:[ \\t]+([^\\r\\n]+?)(?:[ \\t]+(#+?))?)?[ \\t]*$", + "name": "markup.heading.atx.2.mdx", + "captures": { + "1": { + "name": "punctuation.definition.heading.mdx" + }, + "2": { + "name": "entity.name.section.mdx", + "patterns": [ + { + "include": "#markdown-text" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.mdx" + } + } + }, + { + "match": "(?:^|\\G)[\\t ]*(#{4}(?!#))(?:[ \\t]+([^\\r\\n]+?)(?:[ \\t]+(#+?))?)?[ \\t]*$", + "name": "markup.heading.atx.2.mdx", + "captures": { + "1": { + "name": "punctuation.definition.heading.mdx" + }, + "2": { + "name": "entity.name.section.mdx", + "patterns": [ + { + "include": "#markdown-text" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.mdx" + } + } + }, + { + "match": "(?:^|\\G)[\\t ]*(#{5}(?!#))(?:[ \\t]+([^\\r\\n]+?)(?:[ \\t]+(#+?))?)?[ \\t]*$", + "name": "markup.heading.atx.2.mdx", + "captures": { + "1": { + "name": "punctuation.definition.heading.mdx" + }, + "2": { + "name": "entity.name.section.mdx", + "patterns": [ + { + "include": "#markdown-text" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.mdx" + } + } + }, + { + "match": "(?:^|\\G)[\\t ]*(#{6}(?!#))(?:[ \\t]+([^\\r\\n]+?)(?:[ \\t]+(#+?))?)?[ \\t]*$", + "name": "markup.heading.atx.2.mdx", + "captures": { + "1": { + "name": "punctuation.definition.heading.mdx" + }, + "2": { + "name": "entity.name.section.mdx", + "patterns": [ + { + "include": "#markdown-text" + } + ] + }, + "3": { + "name": "punctuation.definition.heading.mdx" + } + } + } + ] + }, + "commonmark-heading-setext": { + "patterns": [ + { + "match": "(?:^|\\G)[\\t ]*(={1,})[ \\t]*$", + "name": "markup.heading.setext.1.mdx" + }, + { + "match": "(?:^|\\G)[\\t ]*(-{1,})[ \\t]*$", + "name": "markup.heading.setext.2.mdx" + } + ] + }, + "commonmark-label-end": { + "patterns": [ + { + "match": "(\\])(\\()[\\t ]*(?:(?:(<)((?:[^\\n<\\\\>]|\\\\[<\\\\>]?)*)(>)|(\\g<destination_raw>))(?:[\\t ]+(?:(\")((?:[^\"\\\\]|\\\\[\"\\\\]?)*)(\")|(')((?:[^'\\\\]|\\\\['\\\\]?)*)(')|(\\()((?:[^\\)\\\\]|\\\\[\\)\\\\]?)*)(\\))))?)?[\\t ]*(\\))(?<destination_raw>(?!\\<)(?:(?:[^\\p{Cc}\\ \\\\\\(\\)]|\\\\[\\(\\)\\\\]?)|\\(\\g<destination_raw>*\\))+){0}", + "captures": { + "1": { + "name": "string.other.end.mdx" + }, + "2": { + "name": "string.other.begin.mdx" + }, + "3": { + "name": "string.other.begin.destination.mdx" + }, + "4": { + "name": "string.other.link.destination.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "5": { + "name": "string.other.end.destination.mdx" + }, + "6": { + "name": "string.other.link.destination.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "7": { + "name": "string.other.begin.mdx" + }, + "8": { + "name": "string.quoted.double.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "9": { + "name": "string.other.end.mdx" + }, + "10": { + "name": "string.other.begin.mdx" + }, + "11": { + "name": "string.quoted.single.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "12": { + "name": "string.other.end.mdx" + }, + "13": { + "name": "string.other.begin.mdx" + }, + "14": { + "name": "string.quoted.paren.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "15": { + "name": "string.other.end.mdx" + }, + "16": { + "name": "string.other.end.mdx" + } + } + }, + { + "match": "(\\])(\\[)((?:[^\\[\\\\\\]]|\\\\[\\[\\\\\\]]?)+?)(\\])", + "captures": { + "1": { + "name": "string.other.end.mdx" + }, + "2": { + "name": "string.other.begin.mdx" + }, + "3": { + "name": "entity.name.identifier.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "4": { + "name": "string.other.end.mdx" + } + } + }, + { + "match": "(\\])", + "captures": { + "1": { + "name": "string.other.end.mdx" + } + } + } + ] + }, + "commonmark-label-start": { + "patterns": [ + { + "match": "\\!\\[(?!\\^)", + "name": "string.other.begin.image.mdx" + }, + { + "match": "\\[", + "name": "string.other.begin.link.mdx" + } + ] + }, + "commonmark-list-item": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*((?:[*+-]))(?:[ ]{4}(?![ ])|\\t)(\\[[\\t Xx]\\](?=[\\t\\n\\r ]+(?:$|[^\\t\\n\\r ])))?", + "beginCaptures": { + "1": { + "name": "variable.unordered.list.mdx" + }, + "2": { + "name": "keyword.other.tasklist.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)(?:[ ]{4}|\\t)[ ]{1}" + }, + { + "begin": "(?:^|\\G)[\\t ]*((?:[*+-]))(?:[ ]{3}(?![ ]))(\\[[\\t Xx]\\](?=[\\t\\n\\r ]+(?:$|[^\\t\\n\\r ])))?", + "beginCaptures": { + "1": { + "name": "variable.unordered.list.mdx" + }, + "2": { + "name": "keyword.other.tasklist.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)(?:[ ]{4}|\\t)" + }, + { + "begin": "(?:^|\\G)[\\t ]*((?:[*+-]))(?:[ ]{2}(?![ ]))(\\[[\\t Xx]\\](?=[\\t\\n\\r ]+(?:$|[^\\t\\n\\r ])))?", + "beginCaptures": { + "1": { + "name": "variable.unordered.list.mdx" + }, + "2": { + "name": "keyword.other.tasklist.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)[ ]{3}" + }, + { + "begin": "(?:^|\\G)[\\t ]*((?:[*+-]))(?:[ ]{1}|(?=\\n))(\\[[\\t Xx]\\](?=[\\t\\n\\r ]+(?:$|[^\\t\\n\\r ])))?", + "beginCaptures": { + "1": { + "name": "variable.unordered.list.mdx" + }, + "2": { + "name": "keyword.other.tasklist.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)[ ]{2}" + }, + { + "begin": "(?:^|\\G)[\\t ]*([0-9]{9})((?:\\.|\\)))(?:[ ]{4}(?![ ])|\\t(?![\\t ]))(\\[[\\t Xx]\\](?=[\\t\\n\\r ]+(?:$|[^\\t\\n\\r ])))?", + "beginCaptures": { + "1": { + "name": "string.other.number.mdx" + }, + "2": { + "name": "variable.ordered.list.mdx" + }, + "3": { + "name": "keyword.other.tasklist.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)(?:[ ]{4}|\\t){3}[ ]{2}" + }, + { + "begin": "(?:^|\\G)[\\t ]*(?:([0-9]{9})((?:\\.|\\)))(?:[ ]{3}(?![ ]))|([0-9]{8})((?:\\.|\\)))(?:[ ]{4}(?![ ])))(\\[[\\t Xx]\\](?=[\\t\\n\\r ]+(?:$|[^\\t\\n\\r ])))?", + "beginCaptures": { + "1": { + "name": "string.other.number.mdx" + }, + "2": { + "name": "variable.ordered.list.mdx" + }, + "3": { + "name": "string.other.number.mdx" + }, + "4": { + "name": "variable.ordered.list.mdx" + }, + "5": { + "name": "keyword.other.tasklist.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)(?:[ ]{4}|\\t){3}[ ]{1}" + }, + { + "begin": "(?:^|\\G)[\\t ]*(?:([0-9]{9})((?:\\.|\\)))(?:[ ]{2}(?![ ]))|([0-9]{8})((?:\\.|\\)))(?:[ ]{3}(?![ ]))|([0-9]{7})((?:\\.|\\)))(?:[ ]{4}(?![ ])))(\\[[\\t Xx]\\](?=[\\t\\n\\r ]+(?:$|[^\\t\\n\\r ])))?", + "beginCaptures": { + "1": { + "name": "string.other.number.mdx" + }, + "2": { + "name": "variable.ordered.list.mdx" + }, + "3": { + "name": "string.other.number.mdx" + }, + "4": { + "name": "variable.ordered.list.mdx" + }, + "5": { + "name": "string.other.number.mdx" + }, + "6": { + "name": "variable.ordered.list.mdx" + }, + "7": { + "name": "keyword.other.tasklist.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)(?:[ ]{4}|\\t){3}" + }, + { + "begin": "(?:^|\\G)[\\t ]*(?:([0-9]{9})((?:\\.|\\)))(?:[ ]{1}|(?=[ \\t]*\\n))|([0-9]{8})((?:\\.|\\)))(?:[ ]{2}(?![ ]))|([0-9]{7})((?:\\.|\\)))(?:[ ]{3}(?![ ]))|([0-9]{6})((?:\\.|\\)))(?:[ ]{4}(?![ ])))(\\[[\\t Xx]\\](?=[\\t\\n\\r ]+(?:$|[^\\t\\n\\r ])))?", + "beginCaptures": { + "1": { + "name": "string.other.number.mdx" + }, + "2": { + "name": "variable.ordered.list.mdx" + }, + "3": { + "name": "string.other.number.mdx" + }, + "4": { + "name": "variable.ordered.list.mdx" + }, + "5": { + "name": "string.other.number.mdx" + }, + "6": { + "name": "variable.ordered.list.mdx" + }, + "7": { + "name": "string.other.number.mdx" + }, + "8": { + "name": "variable.ordered.list.mdx" + }, + "9": { + "name": "keyword.other.tasklist.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)(?:[ ]{4}|\\t){2}[ ]{3}" + }, + { + "begin": "(?:^|\\G)[\\t ]*(?:([0-9]{8})((?:\\.|\\)))(?:[ ]{1}|(?=[ \\t]*\\n))|([0-9]{7})((?:\\.|\\)))(?:[ ]{2}(?![ ]))|([0-9]{6})((?:\\.|\\)))(?:[ ]{3}(?![ ]))|([0-9]{5})((?:\\.|\\)))(?:[ ]{4}(?![ ])))(\\[[\\t Xx]\\](?=[\\t\\n\\r ]+(?:$|[^\\t\\n\\r ])))?", + "beginCaptures": { + "1": { + "name": "string.other.number.mdx" + }, + "2": { + "name": "variable.ordered.list.mdx" + }, + "3": { + "name": "string.other.number.mdx" + }, + "4": { + "name": "variable.ordered.list.mdx" + }, + "5": { + "name": "string.other.number.mdx" + }, + "6": { + "name": "variable.ordered.list.mdx" + }, + "7": { + "name": "string.other.number.mdx" + }, + "8": { + "name": "variable.ordered.list.mdx" + }, + "9": { + "name": "keyword.other.tasklist.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)(?:[ ]{4}|\\t){2}[ ]{2}" + }, + { + "begin": "(?:^|\\G)[\\t ]*(?:([0-9]{7})((?:\\.|\\)))(?:[ ]{1}|(?=[ \\t]*\\n))|([0-9]{6})((?:\\.|\\)))(?:[ ]{2}(?![ ]))|([0-9]{5})((?:\\.|\\)))(?:[ ]{3}(?![ ]))|([0-9]{4})((?:\\.|\\)))(?:[ ]{4}(?![ ])))(\\[[\\t Xx]\\](?=[\\t\\n\\r ]+(?:$|[^\\t\\n\\r ])))?", + "beginCaptures": { + "1": { + "name": "string.other.number.mdx" + }, + "2": { + "name": "variable.ordered.list.mdx" + }, + "3": { + "name": "string.other.number.mdx" + }, + "4": { + "name": "variable.ordered.list.mdx" + }, + "5": { + "name": "string.other.number.mdx" + }, + "6": { + "name": "variable.ordered.list.mdx" + }, + "7": { + "name": "string.other.number.mdx" + }, + "8": { + "name": "variable.ordered.list.mdx" + }, + "9": { + "name": "keyword.other.tasklist.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)(?:[ ]{4}|\\t){2}[ ]{1}" + }, + { + "begin": "(?:^|\\G)[\\t ]*(?:([0-9]{6})((?:\\.|\\)))(?:[ ]{1}|(?=[ \\t]*\\n))|([0-9]{5})((?:\\.|\\)))(?:[ ]{2}(?![ ]))|([0-9]{4})((?:\\.|\\)))(?:[ ]{3}(?![ ]))|([0-9]{3})((?:\\.|\\)))(?:[ ]{4}(?![ ])))(\\[[\\t Xx]\\](?=[\\t\\n\\r ]+(?:$|[^\\t\\n\\r ])))?", + "beginCaptures": { + "1": { + "name": "string.other.number.mdx" + }, + "2": { + "name": "variable.ordered.list.mdx" + }, + "3": { + "name": "string.other.number.mdx" + }, + "4": { + "name": "variable.ordered.list.mdx" + }, + "5": { + "name": "string.other.number.mdx" + }, + "6": { + "name": "variable.ordered.list.mdx" + }, + "7": { + "name": "string.other.number.mdx" + }, + "8": { + "name": "variable.ordered.list.mdx" + }, + "9": { + "name": "keyword.other.tasklist.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)(?:[ ]{4}|\\t){2}" + }, + { + "begin": "(?:^|\\G)[\\t ]*(?:([0-9]{5})((?:\\.|\\)))(?:[ ]{1}|(?=[ \\t]*\\n))|([0-9]{4})((?:\\.|\\)))(?:[ ]{2}(?![ ]))|([0-9]{3})((?:\\.|\\)))(?:[ ]{3}(?![ ]))|([0-9]{2})((?:\\.|\\)))(?:[ ]{4}(?![ ])))(\\[[\\t Xx]\\](?=[\\t\\n\\r ]+(?:$|[^\\t\\n\\r ])))?", + "beginCaptures": { + "1": { + "name": "string.other.number.mdx" + }, + "2": { + "name": "variable.ordered.list.mdx" + }, + "3": { + "name": "string.other.number.mdx" + }, + "4": { + "name": "variable.ordered.list.mdx" + }, + "5": { + "name": "string.other.number.mdx" + }, + "6": { + "name": "variable.ordered.list.mdx" + }, + "7": { + "name": "string.other.number.mdx" + }, + "8": { + "name": "variable.ordered.list.mdx" + }, + "9": { + "name": "keyword.other.tasklist.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)(?:[ ]{4}|\\t)[ ]{3}" + }, + { + "begin": "(?:^|\\G)[\\t ]*(?:([0-9]{4})((?:\\.|\\)))(?:[ ]{1}|(?=[ \\t]*\\n))|([0-9]{3})((?:\\.|\\)))(?:[ ]{2}(?![ ]))|([0-9]{2})((?:\\.|\\)))(?:[ ]{3}(?![ ]))|([0-9]{1})((?:\\.|\\)))(?:[ ]{4}(?![ ])))(\\[[\\t Xx]\\](?=[\\t\\n\\r ]+(?:$|[^\\t\\n\\r ])))?", + "beginCaptures": { + "1": { + "name": "string.other.number.mdx" + }, + "2": { + "name": "variable.ordered.list.mdx" + }, + "3": { + "name": "string.other.number.mdx" + }, + "4": { + "name": "variable.ordered.list.mdx" + }, + "5": { + "name": "string.other.number.mdx" + }, + "6": { + "name": "variable.ordered.list.mdx" + }, + "7": { + "name": "string.other.number.mdx" + }, + "8": { + "name": "variable.ordered.list.mdx" + }, + "9": { + "name": "keyword.other.tasklist.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)(?:[ ]{4}|\\t)[ ]{2}" + }, + { + "begin": "(?:^|\\G)[\\t ]*(?:([0-9]{3})((?:\\.|\\)))(?:[ ]{1}|(?=[ \\t]*\\n))|([0-9]{2})((?:\\.|\\)))(?:[ ]{2}(?![ ]))|([0-9]{1})((?:\\.|\\)))(?:[ ]{3}(?![ ])))(\\[[\\t Xx]\\](?=[\\t\\n\\r ]+(?:$|[^\\t\\n\\r ])))?", + "beginCaptures": { + "1": { + "name": "string.other.number.mdx" + }, + "2": { + "name": "variable.ordered.list.mdx" + }, + "3": { + "name": "string.other.number.mdx" + }, + "4": { + "name": "variable.ordered.list.mdx" + }, + "5": { + "name": "string.other.number.mdx" + }, + "6": { + "name": "variable.ordered.list.mdx" + }, + "7": { + "name": "keyword.other.tasklist.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)(?:[ ]{4}|\\t)[ ]{1}" + }, + { + "begin": "(?:^|\\G)[\\t ]*(?:([0-9]{2})((?:\\.|\\)))(?:[ ]{1}|(?=[ \\t]*\\n))|([0-9])((?:\\.|\\)))(?:[ ]{2}(?![ ])))(\\[[\\t Xx]\\](?=[\\t\\n\\r ]+(?:$|[^\\t\\n\\r ])))?", + "beginCaptures": { + "1": { + "name": "string.other.number.mdx" + }, + "2": { + "name": "variable.ordered.list.mdx" + }, + "3": { + "name": "string.other.number.mdx" + }, + "4": { + "name": "variable.ordered.list.mdx" + }, + "5": { + "name": "keyword.other.tasklist.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)(?:[ ]{4}|\\t)" + }, + { + "begin": "(?:^|\\G)[\\t ]*([0-9])((?:\\.|\\)))(?:[ ]{1}|(?=[ \\t]*\\n))(\\[[\\t Xx]\\](?=[\\t\\n\\r ]+(?:$|[^\\t\\n\\r ])))?", + "beginCaptures": { + "1": { + "name": "string.other.number.mdx" + }, + "2": { + "name": "variable.ordered.list.mdx" + }, + "3": { + "name": "keyword.other.tasklist.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)[ ]{3}" + } + ] + }, + "commonmark-paragraph": { + "begin": "(?![\\t ]*$)", + "name": "meta.paragraph.mdx", + "patterns": [ + { + "include": "#markdown-text" + } + ], + "while": "(?:^|\\G)(?:[ ]{4}|\\t)" + }, + "commonmark-thematic-break": { + "match": "(?:^|\\G)[\\t ]*([-*_])[ \\t]*(?:\\1[ \\t]*){2,}$", + "name": "meta.separator.mdx" + }, + "extension-gfm-autolink-literal": { + "patterns": [ + { + "match": "(?<=^|[\\t\\n\\r \\(\\*\\_\\[\\]~])(?=(?i:www)\\.[^\\n\\r])(?:(?:[\\p{L}\\p{N}]|-|[\\._](?!(?:[!\"'\\)\\*,\\.:;<\\?_~]*(?:[\\s<]|\\][\\t\\n \\(\\[]))))+\\g<path>?)?(?<path>(?:(?:[^\\t\\n\\r !\"&'\\(\\)\\*,\\.:;<\\?\\]_~]|&(?![A-Za-z]*;(?:[!\"'\\)\\*,\\.:;<\\?_~]*(?:[\\s<]|\\][\\t\\n \\(\\[])))|[!\"'\\)\\*,\\.:;\\?_~](?!(?:[!\"'\\)\\*,\\.:;<\\?_~]*(?:[\\s<]|\\][\\t\\n \\(\\[]))))|\\(\\g<path>*\\))+){0}", + "name": "string.other.link.autolink.literal.www.mdx" + }, + { + "match": "(?<=^|[^A-Za-z])(?i:https?://)(?=[\\p{L}\\p{N}])(?:(?:[\\p{L}\\p{N}]|-|[\\._](?!(?:[!\"'\\)\\*,\\.:;<\\?_~]*(?:[\\s<]|\\][\\t\\n \\(\\[]))))+\\g<path>?)?(?<path>(?:(?:[^\\t\\n\\r !\"&'\\(\\)\\*,\\.:;<\\?\\]_~]|&(?![A-Za-z]*;(?:[!\"'\\)\\*,\\.:;<\\?_~]*(?:[\\s<]|\\][\\t\\n \\(\\[])))|[!\"'\\)\\*,\\.:;\\?_~](?!(?:[!\"'\\)\\*,\\.:;<\\?_~]*(?:[\\s<]|\\][\\t\\n \\(\\[]))))|\\(\\g<path>*\\))+){0}", + "name": "string.other.link.autolink.literal.http.mdx" + }, + { + "match": "(?<=^|[^A-Za-z/])(?i:mailto:|xmpp:)?(?:[0-9A-Za-z+\\-\\._])+@(?:(?:[0-9A-Za-z]|[-_](?!(?:[!\"'\\)\\*,\\.:;<\\?_~]*(?:[\\s<]|\\][\\t\\n \\(\\[]))))+(?:\\.(?!(?:[!\"'\\)\\*,\\.:;<\\?_~]*(?:[\\s<]|\\][\\t\\n \\(\\[])))))+(?:[A-Za-z]|[-_](?!(?:[!\"'\\)\\*,\\.:;<\\?_~]*(?:[\\s<]|\\][\\t\\n \\(\\[]))))+", + "name": "string.other.link.autolink.literal.email.mdx" + } + ] + }, + "extension-gfm-footnote-call": { + "match": "(\\[)(\\^)((?:[^\\t\\n\\r \\[\\\\\\]]|\\\\[\\[\\\\\\]]?)+)(\\])", + "captures": { + "1": { + "name": "string.other.begin.link.mdx" + }, + "2": { + "name": "string.other.begin.footnote.mdx" + }, + "3": { + "name": "entity.name.identifier.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "4": { + "name": "string.other.end.footnote.mdx" + } + } + }, + "extension-gfm-footnote-definition": { + "begin": "(?:^|\\G)[\\t ]*(\\[)(\\^)((?:[^\\t\\n\\r \\[\\\\\\]]|\\\\[\\[\\\\\\]]?)+)(\\])(:)[\\t ]*", + "beginCaptures": { + "1": { + "name": "string.other.begin.link.mdx" + }, + "2": { + "name": "string.other.begin.footnote.mdx" + }, + "3": { + "name": "entity.name.identifier.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "4": { + "name": "string.other.end.footnote.mdx" + } + }, + "patterns": [ + { + "include": "#markdown-sections" + } + ], + "while": "^(?=[\\t ]*$)|(?:^|\\G)(?:[ ]{4}|\\t)" + }, + "extension-gfm-strikethrough": { + "match": "(?<=\\S)(?<!~)~{1,2}(?!~)|(?<!~)~{1,2}(?=\\S)(?!~)", + "name": "string.other.strikethrough.mdx" + }, + "extension-gfm-table": { + "begin": "(?:^|\\G)[\\t ]*(?=\\|[^\\n\\r]+\\|[ \\t]*$)", + "patterns": [ + { + "match": "(?<=\\||(?:^|\\G))[\\t ]*((?:[^\\n\\r\\\\\\|]|\\\\[\\\\\\|]?)+?)[\\t ]*(?=\\||$)", + "captures": { + "1": { + "patterns": [ + { + "include": "#markdown-text" + } + ] + } + } + }, + { + "match": "(?:\\|)", + "name": "markup.list.table-delimiter.mdx" + } + ], + "end": "^(?=[\\t ]*$)" + }, + "extension-github-gemoji": { + "match": "(:)((?:(?:(?:hand_with_index_finger_and_thumb_cros|mailbox_clo|fist_rai|confu)s|r(?:aised_hand_with_fingers_splay|e(?:gister|l(?:iev|ax)))|disappointed_reliev|confound|(?:a(?:ston|ngu)i|flu)sh|unamus|hush)e|(?:chart_with_(?:down|up)wards_tre|large_orange_diamo|small_(?:orang|blu)e_diamo|large_blue_diamo|parasol_on_grou|loud_sou|rewi)n|(?:rightwards_pushing_h|hourglass_flowing_s|leftwards_(?:pushing_)?h|(?:raised_back_of|palm_(?:down|up)|call_me)_h|(?:(?:(?:clippert|ascensi)on|norfolk)_is|christmas_is|desert_is|bouvet_is|new_zea|thai|eng|fin|ire)l|rightwards_h|pinching_h|writing_h|s(?:w(?:itzer|azi)|cot)l|magic_w|ok_h|icel)an|s(?:un_behind_(?:large|small|rain)_clou|hallow_pan_of_foo|tar_of_davi|leeping_be|kateboar|a(?:tisfie|uropo)|hiel|oun|qui)|(?:ear_with_hearing_a|pouring_liqu)i|(?:identification_c|(?:arrow_(?:back|for)|fast_for)w|credit_c|woman_be|biohaz|man_be|l(?:eop|iz))ar|m(?:usical_key|ortar_)boar|(?:drop_of_bl|canned_f)oo|c(?:apital_abc|upi)|person_bal|(?:black_bi|(?:cust|plac)a)r|(?:clip|key)boar|mermai|pea_po|worrie|po(?:la|u)n|threa|dv)d|(?:(?:(?:face_with_open_eyes_and_hand_over|face_with_diagonal|open|no)_mou|h(?:and_over_mou|yacin)|mammo)t|running_shirt_with_sas|(?:(?:fishing_pole_and_|blow)fi|(?:tropical_f|petri_d)i|(?:paint|tooth)bru|banglade|jellyfi)s|(?:camera_fl|wavy_d)as|triump|menora|pouc|blus|watc|das|has)h|(?:s(?:o(?:(?:uth_georgia_south_sandwich|lomon)_island|ck)|miling_face_with_three_heart|t_kitts_nevi|weat_drop|agittariu|c(?:orpiu|issor)|ymbol|hort)|twisted_rightwards_arrow|(?:northern_mariana|heard_mcdonald|(?:british_virgi|us_virgi|pitcair|cayma)n|turks_caicos|us_outlying|(?:falk|a)land|marshall|c(?:anary|ocos)|faroe)_island|(?:face_holding_back_tea|(?:c(?:ard_index_divid|rossed_fing)|pinched_fing)e|night_with_sta)r|(?:two_(?:wo)?men_holding|people_holding|heart|open)_hand|(?:sunrise_over_mountai|(?:congratul|united_n)atio|jea)n|(?:caribbean_)?netherland|(?:f(?:lower_playing_car|ace_in_clou)|crossed_swor|prayer_bea)d|(?:money_with_win|nest_with_eg|crossed_fla|hotsprin)g|revolving_heart|(?:high_brightne|(?:expression|wire)le|(?:tumbler|wine)_gla|milk_gla|compa|dre)s|performing_art|earth_america|orthodox_cros|l(?:ow_brightnes|a(?:tin_cros|o)|ung)|no_pedestrian|c(?:ontrol_kno|lu)b|b(?:ookmark_tab|rick|ean)|nesting_doll|cook_island|(?:fleur_de_l|tenn)i|(?:o(?:ncoming_b|phiuch|ctop)|hi(?:ppopotam|bisc)|trolleyb|m(?:(?:rs|x)_cla|auriti|inib)|belar|cact|abac|(?:cyp|tau)r)u|medal_sport|(?:chopstic|firewor)k|rhinocero|(?:p(?:aw_prin|eanu)|footprin)t|two_heart|princes|(?:hondur|baham)a|barbado|aquariu|c(?:ustom|hain)|maraca|comoro|flag|wale|hug|vh)s|(?:(?:diamond_shape_with_a_dot_ins|playground_sl)id|(?:(?:first_quarter|last_quarter|full|new)_moon_with|(?:zipper|money)_mouth|dotted_line|upside_down|c(?:rying_c|owboy_h)at|(?:disguis|nauseat)ed|neutral|monocle|panda|tired|woozy|clown|nerd|zany|fox)_fac|s(?:t(?:uck_out_tongue_winking_ey|eam_locomotiv)|(?:lightly_(?:frown|smil)|neez|h(?:ush|ak))ing_fac|(?:tudio_micropho|(?:hinto_shr|lot_mach)i|ierra_leo|axopho)n|mall_airplan|un_with_fac|a(?:luting_fac|tellit|k)|haved_ic|y(?:nagogu|ring)|n(?:owfl)?ak|urinam|pong)|(?:black_(?:medium_)?small|white_(?:(?:medium_)?small|large)|(?:black|white)_medium|black_large|orange|purple|yellow|b(?:rown|lue)|red)_squar|(?:(?:perso|woma)n_with_|man_with_)?probing_can|(?:p(?:ut_litter_in_its_pl|outing_f)|frowning_f|cold_f|wind_f|hot_f)ac|(?:arrows_c(?:ounterc)?lockwi|computer_mou|derelict_hou|carousel_hor|c(?:ity_sunri|hee)|heartpul|briefca|racehor|pig_no|lacros)s|(?:(?:face_with_head_band|ideograph_advant|adhesive_band|under|pack)a|currency_exchan|l(?:eft_l)?ugga|woman_jud|name_bad|man_jud|jud)g|face_with_peeking_ey|(?:(?:e(?:uropean_post_off|ar_of_r)|post_off)i|information_sour|ambulan)c|artificial_satellit|(?:busts?_in_silhouet|(?:vulcan_sal|parach)u|m(?:usical_no|ayot)|ro(?:ller_ska|set)|timor_les|ice_ska)t|(?:(?:incoming|red)_envelo|s(?:ao_tome_princi|tethosco)|(?:micro|tele)sco|citysca)p|(?:(?:(?:convenience|department)_st|musical_sc)o|f(?:light_depar|ramed_pic)tu|love_you_gestu|heart_on_fi|japanese_og|cote_divoi|perseve|singapo)r|b(?:ullettrain_sid|eliz|on)|(?:(?:female_|male_)?dete|radioa)ctiv|(?:christmas|deciduous|evergreen|tanabata|palm)_tre|(?:vibration_mo|cape_ver)d|(?:fortune_cook|neckt|self)i|(?:fork_and_)?knif|athletic_sho|(?:p(?:lead|arty)|drool|curs|melt|yawn|ly)ing_fac|vomiting_fac|(?:(?:c(?:urling_st|ycl)|meat_on_b|repeat_|headst)o|(?:fire_eng|tanger|ukra)i|rice_sce|(?:micro|i)pho|champag|pho)n|(?:cricket|video)_gam|(?:boxing_glo|oli)v|(?:d(?:ragon|izzy)|monkey)_fac|(?:m(?:artin|ozamb)iq|fond)u|wind_chim|test_tub|flat_sho|m(?:a(?:ns_sho|t)|icrob|oos|ut)|(?:handsh|fish_c|moon_c|cupc)ak|nail_car|zimbabw|ho(?:neybe|l)|ice_cub|airplan|pensiv|c(?:a(?:n(?:dl|o)|k)|o(?:ffe|oki))|tongu|purs|f(?:lut|iv)|d(?:at|ov)|n(?:iu|os)|kit|rag|ax)e|(?:(?:british_indian_ocean_territo|(?:plate_with_cutl|batt)e|medal_milita|low_batte|hunga|wea)r|family_(?:woman_(?:woman_(?:girl|boy)|girl|boy)|man_(?:woman_(?:girl|boy)|man_(?:girl|boy)|girl|boy))_bo|person_feeding_bab|woman_feeding_bab|s(?:u(?:spension_railwa|nn)|t(?:atue_of_libert|_barthelem|rawberr))|(?:m(?:ountain_cable|ilky_)|aerial_tram)wa|articulated_lorr|man_feeding_bab|mountain_railwa|partly_sunn|(?:vatican_c|infin)it|(?:outbox_tr|inbox_tr|birthd|motorw|paragu|urugu|norw|x_r)a|butterfl|ring_buo|t(?:urke|roph)|angr|fogg)y|(?:(?:perso|woma)n_in_motorized_wheelchai|(?:(?:notebook_with_decorative_c|four_leaf_cl)ov|(?:index_pointing_at_the_vie|white_flo)w|(?:face_with_thermome|non\\-potable_wa|woman_firefigh|desktop_compu|m(?:an_firefigh|otor_scoo)|(?:ro(?:ller_coa|o)|oy)s|potable_wa|kick_scoo|thermome|firefigh|helicop|ot)t|(?:woman_factory_wor|(?:woman_office|woman_health|health)_wor|man_(?:factory|office|health)_wor|(?:factory|office)_wor|rice_crac|black_jo|firecrac)k|telephone_receiv|(?:palms_up_toget|f(?:ire_extinguis|eat)|teac)h|(?:(?:open_)?file_fol|level_sli)d|police_offic|f(?:lying_sauc|arm)|woman_teach|roll_of_pap|(?:m(?:iddle_f|an_s)in|woman_sin|hambur|plun|dag)g|do_not_litt|wilted_flow|woman_farm|man_(?:teach|farm)|(?:bell_pe|hot_pe|fli)pp|l(?:o(?:udspeak|ve_lett|bst)|edg|add)|tokyo_tow|c(?:ucumb|lapp|anc)|b(?:e(?:ginn|av)|adg)|print|hamst)e|(?:perso|woma)n_in_manual_wheelchai|m(?:an(?:_in_motorized|(?:_in_man)?ual)|otorized)_wheelchai|(?:person_(?:white|curly|red)_|wheelc)hai|triangular_rule|(?:film_project|e(?:l_salv|cu)ad|elevat|tract|anch)o|s(?:traight_rul|pace_invad|crewdriv|nowboard|unflow|peak|wimm|ing|occ|how|urf|ki)e|r(?:ed_ca|unne|azo)|d(?:o(?:lla|o)|ee)|barbe)r|(?:(?:cloud_with_(?:lightning_and_)?ra|japanese_gobl|round_pushp|liechtenste|mandar|pengu|dolph|bahra|pushp|viol)i|(?:couple(?:_with_heart_wo|kiss_)man|construction_worker|(?:mountain_bik|bow|row)ing|lotus_position|(?:w(?:eight_lift|alk)|climb)ing|white_haired|curly_haired|raising_hand|super(?:villain|hero)|red_haired|basketball|s(?:(?:wimm|urf)ing|assy)|haircut|no_good|(?:vampir|massag)e|b(?:iking|ald)|zombie|fairy|mage|elf|ng)_(?:wo)?ma|(?:(?:couple_with_heart_man|isle_of)_m|(?:couplekiss_woman_|(?:b(?:ouncing_ball|lond_haired)|tipping_hand|pregnant|kneeling|deaf)_|frowning_|s(?:tanding|auna)_|po(?:uting_|lice)|running_|blonde_|o(?:lder|k)_)wom|(?:perso|woma)n_with_turb|(?:b(?:ouncing_ball|lond_haired)|tipping_hand|pregnant|kneeling|deaf)_m|f(?:olding_hand_f|rowning_m)|man_with_turb|(?:turkmen|afghan|pak)ist|s(?:tanding_m|(?:outh_s)?ud|auna_m)|po(?:uting_|lice)m|running_m|azerbaij|k(?:yrgyz|azakh)st|tajikist|uzbekist|o(?:lder_m|k_m|ce)|(?:orang|bh)ut|taiw|jord)a|s(?:mall_red_triangle_dow|(?:valbard_jan_may|int_maart|ev)e|afety_pi|top_sig|t_marti|(?:corpi|po|o)o|wede)|(?:heavy_(?:d(?:ivision|ollar)|equals|minus|plus)|no_entry|female|male)_sig|(?:arrow_(?:heading|double)_d|p(?:erson_with_cr|oint_d)|arrow_up_d|thumbsd)ow|(?:house_with_gard|l(?:ock_with_ink_p|eafy_gre)|dancing_(?:wo)?m|fountain_p|keycap_t|chick|ali|yem|od)e|(?:izakaya|jack_o)_lanter|(?:funeral_u|(?:po(?:stal_h|pc)|capric)o|unico)r|chess_paw|b(?:a(?:llo|c)o|eni|rai)|l(?:anter|io)|c(?:o(?:ff)?i|row)|melo|rame|oma|yar)n|(?:s(?:t(?:uck_out_tongue_closed_ey|_vincent_grenadin)|kull_and_crossbon|unglass|pad)|(?:french_souther|palestinia)n_territori|(?:face_with_spiral|kissing_smiling)_ey|united_arab_emirat|kissing_closed_ey|(?:clinking_|dark_sun|eye)glass|(?:no_mobile_|head)phon|womans_cloth|b(?:allet_sho|lueberri)|philippin|(?:no_bicyc|seychel)l|roll_ey|(?:cher|a)ri|p(?:ancak|isc)|maldiv|leav)es|(?:f(?:amily_(?:woman_(?:woman_)?|man_(?:woman_|man_)?)girl_gir|earfu)|(?:woman_playing_hand|m(?:an_playing_hand|irror_)|c(?:onfetti|rystal)_|volley|track|base|8)bal|(?:(?:m(?:ailbox_with_(?:no_)?m|onor)|cockt|e\\-m)a|(?:person|bride|woman)_with_ve|man_with_ve|light_ra|braz|ema)i|(?:transgender|baby)_symbo|passport_contro|(?:arrow_(?:down|up)_sm|rice_b|footb)al|(?:dromedary_cam|ferris_whe|love_hot|high_he|pretz|falaf|isra)e|page_with_cur|me(?:dical_symbo|ta)|(?:n(?:ewspaper_ro|o_be)|bellhop_be)l|rugby_footbal|s(?:chool_satche|(?:peak|ee)_no_evi|oftbal|crol|anda|nai|hel)|(?:peace|atom)_symbo|hear_no_evi|cora|hote|bage|labe|rof|ow)l|(?:(?:negative_squared_cross|heavy_exclamation|part_alternation)_mar|(?:eight_spoked_)?asteris|(?:ballot_box_with_che|(?:(?:mantelpiece|alarm|timer)_c|un)lo|(?:ha(?:(?:mmer_and|ir)_p|tch(?:ing|ed)_ch)|baby_ch|joyst)i|railway_tra|lipsti|peaco)c|heavy_check_mar|white_check_mar|tr(?:opical_drin|uc)|national_par|pickup_truc|diving_mas|floppy_dis|s(?:tar_struc|hamroc|kun|har)|chipmun|denmar|duc|hoo|lin)k|(?:leftwards_arrow_with_h|arrow_right_h|(?:o(?:range|pen)|closed|blue)_b)ook|(?:woman_playing_water_pol|m(?:an(?:_(?:playing_water_pol|with_gua_pi_ma|in_tuxed)|g)|ontenegr|o(?:roc|na)c|e(?:xic|tr|m))|(?:perso|woma)n_in_tuxed|(?:trinidad_toba|vir)g|water_buffal|b(?:urkina_fas|a(?:mbo|nj)|ent)|puerto_ric|water_pol|flaming|kangaro|(?:mosqu|burr)it|(?:avoc|torn)ad|curaca|lesoth|potat|ko(?:sov|k)|tomat|d(?:ang|od)|yo_y|hoch|t(?:ac|og)|zer)o|(?:c(?:entral_african|zech)|dominican)_republic|(?:eight_pointed_black_s|six_pointed_s|qa)tar|(?:business_suit_levitat|(?:classical_buil|breast_fee)d|(?:woman_cartwhee|m(?:an_(?:cartwhee|jugg)|en_wrest)|women_wrest|woman_jugg|face_exha|cartwhee|wrest|dump)l|c(?:hildren_cross|amp)|woman_facepalm|woman_shrugg|man_(?:facepalm|shrugg)|people_hugg|(?:person_fe|woman_da|man_da)nc|fist_oncom|horse_rac|(?:no_smo|thin)k|laugh|s(?:eedl|mok)|park|w(?:arn|edd))ing|f(?:a(?:mily(?:_(?:woman_(?:woman_(?:girl|boy)|girl|boy)|man_(?:woman_(?:girl|boy)|man_(?:girl|boy)|girl|boy)))?|ctory)|o(?:u(?:ntain|r)|ot|g)|r(?:owning)?|i(?:re|s[ht])|ly|u)|(?:(?:(?:information_desk|handball|bearded)_|(?:frowning|ok)_|juggling_|mer)pers|(?:previous_track|p(?:lay_or_p)?ause|black_square|white_square|next_track|r(?:ecord|adio)|eject)_butt|(?:wa[nx]ing_(?:crescent|gibbous)_m|bowl_with_sp|crescent_m|racc)o|(?:b(?:ouncing_ball|lond_haired)|tipping_hand|pregnant|kneeling|deaf)_pers|s(?:t(?:_pierre_miquel|op_butt|ati)|tanding_pers|peech_ballo|auna_pers)|r(?:eminder_r)?ibb|thought_ballo|watermel|badmint|c(?:amero|ray)|le(?:ban|m)|oni|bis)on|(?:heavy_heart_exclama|building_construc|heart_decora|exclama)tion|(?:(?:triangular_flag_on_po|(?:(?:woman_)?technolog|m(?:ountain_bicycl|an_technolog)|bicycl)i|(?:wo)?man_scienti|(?:wo)?man_arti|s(?:afety_ve|cienti)|empty_ne)s|(?:vertical_)?traffic_ligh|(?:rescue_worker_helm|military_helm|nazar_amul|city_suns|wastebask|dropl|t(?:rump|oil)|bouqu|buck|magn|secr)e|one_piece_swimsui|(?:(?:arrow_(?:low|upp)er|point)_r|bridge_at_n|copyr|mag_r)igh|(?:bullettrain_fro|(?:potted_pl|croiss|e(?:ggpl|leph))a)n|s(?:t(?:ar_and_cresc|ud)en|cream_ca|mi(?:ley?|rk)_ca|(?:peed|ail)boa|hir)|(?:arrow_(?:low|upp)er|point)_lef|woman_astronau|r(?:o(?:tating_ligh|cke)|eceip)|heart_eyes_ca|man_astronau|(?:woman_stud|circus_t|man_stud|trid)en|(?:ringed_pla|file_cabi)ne|nut_and_bol|(?:older_)?adul|k(?:i(?:ssing_ca|wi_frui)|uwai|no)|(?:pouting_c|c(?:ut_of_m|old_sw)e|womans_h|montserr|(?:(?:motor_|row)b|lab_c)o|heartbe|toph)a|(?:woman_pil|honey_p|man_pil|[cp]arr|teap|rob)o|hiking_boo|arrow_lef|fist_righ|flashligh|f(?:ist_lef|ee)|black_ca|astronau|(?:c(?:hest|oco)|dough)nu|innocen|joy_ca|artis|(?:acce|egy)p|co(?:me|a)|pilo)t|(?:heavy_multiplication_|t\\-re)x|(?:s(?:miling_face_with_te|piral_calend)|oncoming_police_c|chocolate_b|ra(?:ilway|cing)_c|police_c|polar_be|teddy_be|madagasc|blue_c|calend|myanm)ar|c(?:l(?:o(?:ud(?:_with_lightning)?|ck(?:1[0-2]?|[2-9]))|ap)?|o(?:uple(?:_with_heart|kiss)?|nstruction|mputer|ok|p|w)|a(?:r(?:d_index)?|mera)|r(?:icket|y)|h(?:art|ild))|(?:m(?:artial_arts_unifo|echanical_a)r|(?:cherry_)?blosso|b(?:aggage_clai|roo)|ice_?crea|facepal|mushroo|restroo|vietna|dru|yu)m|(?:woman_with_headscar|m(?:obile_phone_of|aple_lea)|fallen_lea|wol)f|(?:(?:closed_lock_with|old)_|field_hoc|ice_hoc|han|don)key|g(?:lobe_with_meridians|r(?:e(?:y_(?:exclama|ques)tion|e(?:n(?:_(?:square|circle|salad|apple|heart|book)|land)|ce)|y_heart|nada)|i(?:mac|nn)ing|apes)|u(?:inea_bissau|ernsey|am|n)|(?:(?:olfing|enie)_(?:wo)?|uards(?:wo)?)man|(?:inger_roo|oal_ne|hos)t|(?:uadeloup|ame_di|iraff|oos)e|ift_heart|i(?:braltar|rl)|(?:uatemal|(?:eorg|amb)i|orill|uyan|han)a|uide_dog|(?:oggl|lov)es|arlic|emini|uitar|abon|oat|ear|b)|construction_worker|(?:(?:envelope_with|bow_and)_ar|left_right_ar|raised_eyeb)row|(?:(?:oncoming_automob|crocod)i|right_anger_bubb|l(?:eft_speech_bubb|otion_bott|ady_beet)|congo_brazzavil|eye_speech_bubb|(?:large_blue|orange|purple|yellow|brown)_circ|(?:(?:european|japanese)_cas|baby_bot)t|b(?:alance_sca|eet)|s(?:ewing_need|weat_smi)|(?:black|white|red)_circ|(?:motor|re)cyc|pood|turt|tama|waff|musc|eag)le|first_quarter_moon|s(?:m(?:all_red_triangle|i(?:ley?|rk))|t(?:uck_out_tongue|ar)|hopping|leeping|p(?:arkle|ider)|unrise|nowman|chool|cream|k(?:ull|i)|weat|ix|a)|(?:(?:b(?:osnia_herzegovi|ana)|wallis_futu|(?:french_gui|botsw)a|argenti|st_hele)n|(?:(?:equatorial|papua_new)_guin|north_kor|eritr)e|t(?:ristan_da_cunh|ad)|(?:(?:(?:french_poly|indo)ne|tuni)s|(?:new_caledo|ma(?:urita|cedo)|lithua|(?:tanz|alb|rom)a|arme|esto)n|diego_garc|s(?:audi_arab|t_luc|lov(?:ak|en)|omal|erb)|e(?:arth_as|thiop)|m(?:icrone|alay)s|(?:austra|mongo)l|c(?:ambod|roat)|(?:bulga|alge)r|(?:colom|nami|zam)b|boliv|l(?:iber|atv))i|(?:wheel_of_dhar|cine|pana)m|(?:(?:(?:closed|beach|open)_)?umbrel|ceuta_melil|venezue|ang(?:uil|o)|koa)l|c(?:ongo_kinshas|anad|ub)|(?:western_saha|a(?:mpho|ndor)|zeb)r|american_samo|video_camer|m(?:o(?:vie_camer|ldov)|alt|eg)|(?:earth_af|costa_)ric|s(?:outh_afric|ri_lank|a(?:mo|nt))|bubble_te|(?:antarct|jama)ic|ni(?:caragu|geri|nj)|austri|pi(?:nat|zz)|arub|k(?:eny|aab)|indi|u7a7|l(?:lam|ib[ry])|dn)a|l(?:ast_quarter_moon|o(?:tus|ck)|ips|eo)|(?:hammer_and_wren|c(?:ockroa|hur)|facepun|wren|crut|pun)ch|s(?:nowman_with_snow|ignal_strength|weet_potato|miling_imp|p(?:ider_web|arkle[rs])|w(?:im_brief|an)|a(?:n(?:_marino|dwich)|lt)|topwatch|t(?:a(?:dium|r[2s])|ew)|l(?:e(?:epy|d)|oth)|hrimp|yria|carf|(?:hee|oa)p|ea[lt]|h(?:oe|i[pt])|o[bs])|(?:s(?:tuffed_flatbre|p(?:iral_notep|eaking_he))|(?:exploding_h|baguette_br|flatbr)e)ad|(?:arrow_(?:heading|double)_u|(?:p(?:lace_of_wor|assenger_)sh|film_str|tul)i|page_facing_u|biting_li|(?:billed_c|world_m)a|mouse_tra|(?:curly_lo|busst)o|thumbsu|lo(?:llip)?o|clam|im)p|(?:anatomical|light_blue|sparkling|kissing|mending|orange|purple|yellow|broken|b(?:rown|l(?:ack|ue))|pink)_heart|(?:(?:transgender|black)_fla|mechanical_le|(?:checkered|pirate)_fla|electric_plu|rainbow_fla|poultry_le|service_do|white_fla|luxembour|fried_eg|moneyba|h(?:edgeh|otd)o|shru)g|(?:cloud_with|mountain)_snow|(?:(?:antigua_barb|berm)u|(?:kh|ug)an|rwan)da|(?:3r|2n)d_place_medal|1(?:st_place_medal|234|00)|lotus_position|(?:w(?:eight_lift|alk)|climb)ing|(?:(?:cup_with_str|auto_ricksh)a|carpentry_sa|windo|jigsa)w|(?:(?:couch_and|diya)_la|f(?:ried_shri|uelpu))mp|(?:woman_mechan|man_mechan|alemb)ic|(?:european_un|accord|collis|reun)ion|(?:flight_arriv|hospit|portug|seneg|nep)al|card_file_box|(?:(?:oncoming_)?tax|m(?:o(?:unt_fuj|ya)|alaw)|s(?:paghett|ush|ar)|b(?:r(?:occol|une)|urund)|(?:djibou|kiriba)t|hait|fij)i|(?:shopping_c|white_he|bar_ch)art|d(?:isappointed|ominica|e(?:sert)?)|raising_hand|super(?:villain|hero)|b(?:e(?:verage_box|ers|d)|u(?:bbles|lb|g)|i(?:k(?:ini|e)|rd)|o(?:o(?:ks|t)|a[rt]|y)|read|a[cn]k)|ra(?:ised_hands|bbit2|t)|(?:hindu_tem|ap)ple|thong_sandal|a(?:r(?:row_(?:right|down|up)|t)|bc?|nt)?|r(?:a(?:i(?:sed_hand|nbow)|bbit|dio|m)|u(?:nning)?|epeat|i(?:ng|ce)|o(?:ck|se))|takeout_box|(?:flying_|mini)disc|(?:(?:interrob|yin_y)a|b(?:o(?:omera|wli)|angba)|(?:ping_p|hong_k)o|calli|mahjo)ng|b(?:a(?:llot_box|sket|th?|by)|o(?:o(?:k(?:mark)?|m)|w)|u(?:tter|s)|e(?:ll|er?|ar))?|heart_eyes|basketball|(?:paperclip|dancer|ticket)s|point_up_2|(?:wo)?man_cook|n(?:ew(?:spaper)?|o(?:tebook|_entry)|iger)|t(?:e(?:lephone|a)|o(?:oth|p)|r(?:oll)?|wo)|h(?:o(?:u(?:rglass|se)|rse)|a(?:mmer|nd)|eart)|paperclip|full_moon|(?:b(?:lack_ni|athtu|om)|her)b|(?:long|oil)_drum|pineapple|(?:clock(?:1[0-2]?|[2-9])3|u6e8)0|p(?:o(?:int_up|ut)|r(?:ince|ay)|i(?:ck|g)|en)|e(?:nvelope|ight|u(?:ro)?|gg|ar|ye|s)|m(?:o(?:u(?:ntain|se)|nkey|on)|echanic|a(?:ilbox|g|n)|irror)?|new_moon|d(?:iamonds|olls|art)|question|k(?:iss(?:ing)?|ey)|haircut|no_good|(?:vampir|massag)e|g(?:olf(?:ing)?|u(?:inea|ard)|e(?:nie|m)|ift|rin)|h(?:a(?:ndbag|msa)|ouses|earts|ut)|postbox|toolbox|(?:pencil|t(?:rain|iger)|whale|cat|dog)2|belgium|(?:volca|kimo)no|(?:vanuat|tuval|pala|naur|maca)u|tokelau|o(?:range|ne?|m|k)?|office|dancer|ticket|dragon|pencil|zombie|w(?:o(?:mens|rm|od)|ave|in[gk]|c)|m(?:o(?:sque|use2)|e(?:rman|ns)|a(?:li|sk))|jersey|tshirt|w(?:heel|oman)|dizzy|j(?:apan|oy)|t(?:rain|iger)|whale|fairy|a(?:nge[lr]|bcd|tm)|c(?:h(?:a(?:ir|d)|ile)|a(?:ndy|mel)|urry|rab|o(?:rn|ol|w2)|[dn])|p(?:ager|e(?:a(?:ch|r)|ru)|i(?:g2|ll|e)|oop)|n(?:otes|ine)|t(?:onga|hree|ent|ram|[mv])|f(?:erry|r(?:ies|ee|og)|ax)|u(?:7(?:533|981|121)|5(?:5b6|408|272)|6(?:307|70[89]))|mage|e(?:yes|nd)|i(?:ra[nq]|t)|cat|dog|elf|z(?:zz|ap)|yen|j(?:ar|p)|leg|id|u[kps]|ng|o[2x]|vs|kr|[\\+\\x2D]1|x|v)(:)", + "name": "string.emoji.mdx", + "captures": { + "1": { + "name": "punctuation.definition.gemoji.begin.mdx" + }, + "2": { + "name": "keyword.control.gemoji.mdx" + }, + "3": { + "name": "punctuation.definition.gemoji.end.mdx" + } + } + }, + "extension-github-mention": { + "match": "(?<![0-9A-Za-z_`])(@)((?:[0-9A-Za-z][0-9A-Za-z-]{0,38})(?:\\/(?:[0-9A-Za-z][0-9A-Za-z-]{0,38}))?)(?![0-9A-Za-z_`])", + "name": "string.mention.mdx", + "captures": { + "1": { + "name": "punctuation.definition.mention.begin.mdx" + }, + "2": { + "name": "string.other.link.mention.mdx" + } + } + }, + "extension-github-reference": { + "patterns": [ + { + "match": "(?<![0-9A-Za-z_])(?:((?i:ghsa-|cve-))([A-Za-z0-9]+)|((?i:gh-|#))([0-9]+))(?![0-9A-Za-z_])", + "name": "string.reference.mdx", + "captures": { + "1": { + "name": "punctuation.definition.reference.begin.mdx" + }, + "2": { + "name": "string.other.link.reference.security-advisory.mdx" + }, + "3": { + "name": "punctuation.definition.reference.begin.mdx" + }, + "4": { + "name": "string.other.link.reference.issue-or-pr.mdx" + } + } + }, + { + "match": "(?<![^\\t\\n\\r \\(@\\[\\{])((?:[0-9A-Za-z][0-9A-Za-z-]{0,38})(?:\\/(?:(?:\\.git[0-9A-Za-z_-]|\\.(?!git)|[0-9A-Za-z_-])+))?)(#)([0-9]+)(?![0-9A-Za-z_])", + "name": "string.reference.mdx", + "captures": { + "1": { + "name": "string.other.link.reference.user.mdx" + }, + "2": { + "name": "punctuation.definition.reference.begin.mdx" + }, + "3": { + "name": "string.other.link.reference.issue-or-pr.mdx" + } + } + } + ] + }, + "extension-math-flow": { + "begin": "(?:^|\\G)[\\t ]*(\\${2,})([^\\n\\r\\$]*)$", + "beginCaptures": { + "1": { + "name": "string.other.begin.math.flow.mdx" + }, + "2": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "markup.raw.math.flow.mdx", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.math.flow.mdx" + } + }, + "name": "markup.code.other.mdx" + }, + "extension-math-text": { + "match": "(?<!\\$)(\\${2,})(?!\\$)(.+?)(?<!\\$)(\\1)(?!\\$)", + "captures": { + "1": { + "name": "string.other.begin.math.mdx" + }, + "2": { + "name": "markup.raw.math.mdx markup.inline.raw.math.mdx" + }, + "3": { + "name": "string.other.end.math.mdx" + } + } + }, + "extension-mdx-esm": { + "name": "meta.embedded.tsx", + "begin": "(?:^|\\G)(?=(?i:export|import)[ ])", + "end": "^(?=[\\t ]*$)", + "patterns": [ + { + "include": "source.tsx#statements" + } + ] + }, + "extension-mdx-expression-flow": { + "begin": "(?:^|\\G)[\\t ]*(\\{)", + "beginCaptures": { + "1": { + "name": "string.other.begin.expression.mdx.js" + } + }, + "contentName": "meta.embedded.tsx", + "end": "(\\})(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.begin.expression.mdx.js" + } + }, + "patterns": [ + { + "include": "source.tsx#expression" + } + ] + }, + "extension-mdx-expression-text": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "string.other.begin.expression.mdx.js" + } + }, + "contentName": "meta.embedded.tsx", + "end": "\\}", + "endCaptures": { + "0": { + "name": "string.other.begin.expression.mdx.js" + } + }, + "patterns": [ + { + "include": "source.tsx#expression" + } + ] + }, + "extension-mdx-jsx-flow": { + "begin": "(?<=^|\\G|\\>)[\\t ]*(<)(?=(?![\\t\\n\\r ]))(?:\\s*(/))?(?:\\s*(?:(?:((?:[_$[:alpha:]][-_$[:alnum:]]*))\\s*(:)\\s*((?:[_$[:alpha:]][-_$[:alnum:]]*)))|((?:(?:[_$[:alpha:]][_$[:alnum:]]*)(?:\\s*\\.\\s*(?:[_$[:alpha:]][-_$[:alnum:]]*))+))|((?:[_$[:upper:]][_$[:alnum:]]*))|((?:[_$[:alpha:]][-_$[:alnum:]]*)))(?=[\\s\\/\\>\\{]))?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.end.jsx" + }, + "2": { + "name": "punctuation.definition.tag.closing.jsx" + }, + "3": { + "name": "entity.name.tag.namespace.jsx" + }, + "4": { + "name": "punctuation.separator.namespace.jsx" + }, + "5": { + "name": "entity.name.tag.local.jsx" + }, + "6": { + "name": "support.class.component.jsx" + }, + "7": { + "name": "support.class.component.jsx" + }, + "8": { + "name": "entity.name.tag.jsx" + } + }, + "patterns": [ + { + "include": "source.tsx#jsx-tag-attribute-name" + }, + { + "include": "source.tsx#jsx-tag-attribute-assignment" + }, + { + "include": "source.tsx#jsx-string-double-quoted" + }, + { + "include": "source.tsx#jsx-string-single-quoted" + }, + { + "include": "source.tsx#jsx-evaluated-code" + }, + { + "include": "source.tsx#jsx-tag-attributes-illegal" + } + ], + "end": "(?:(\\/)\\s*)?(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.self-closing.jsx" + }, + "2": { + "name": "punctuation.definition.tag.end.jsx" + } + } + }, + "extension-mdx-jsx-text": { + "begin": "(<)(?=(?![\\t\\n\\r ]))(?:\\s*(/))?(?:\\s*(?:(?:((?:[_$[:alpha:]][-_$[:alnum:]]*))\\s*(:)\\s*((?:[_$[:alpha:]][-_$[:alnum:]]*)))|((?:(?:[_$[:alpha:]][_$[:alnum:]]*)(?:\\s*\\.\\s*(?:[_$[:alpha:]][-_$[:alnum:]]*))+))|((?:[_$[:upper:]][_$[:alnum:]]*))|((?:[_$[:alpha:]][-_$[:alnum:]]*)))(?=[\\s\\/\\>\\{]))?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.end.jsx" + }, + "2": { + "name": "punctuation.definition.tag.closing.jsx" + }, + "3": { + "name": "entity.name.tag.namespace.jsx" + }, + "4": { + "name": "punctuation.separator.namespace.jsx" + }, + "5": { + "name": "entity.name.tag.local.jsx" + }, + "6": { + "name": "support.class.component.jsx" + }, + "7": { + "name": "support.class.component.jsx" + }, + "8": { + "name": "entity.name.tag.jsx" + } + }, + "patterns": [ + { + "include": "source.tsx#jsx-tag-attribute-name" + }, + { + "include": "source.tsx#jsx-tag-attribute-assignment" + }, + { + "include": "source.tsx#jsx-string-double-quoted" + }, + { + "include": "source.tsx#jsx-string-single-quoted" + }, + { + "include": "source.tsx#jsx-evaluated-code" + }, + { + "include": "source.tsx#jsx-tag-attributes-illegal" + } + ], + "end": "(?:(\\/)\\s*)?(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.self-closing.jsx" + }, + "2": { + "name": "punctuation.definition.tag.end.jsx" + } + } + }, + "extension-toml": { + "begin": "\\A\\+{3}$", + "end": "^\\+{3}$", + "beginCaptures": { + "0": { + "name": "string.other.begin.toml" + } + }, + "endCaptures": { + "0": { + "name": "string.other.end.toml" + } + }, + "contentName": "meta.embedded.toml", + "patterns": [ + { + "include": "source.toml" + } + ] + }, + "extension-yaml": { + "begin": "\\A-{3}$", + "end": "^-{3}$", + "beginCaptures": { + "0": { + "name": "string.other.begin.yaml" + } + }, + "endCaptures": { + "0": { + "name": "string.other.end.yaml" + } + }, + "contentName": "meta.embedded.yaml", + "patterns": [ + { + "include": "source.yaml" + } + ] + }, + "whatwg-html-data-character-reference-named-terminated": { + "match": "(&)((?:C(?:(?:o(?:unterClockwiseCo)?|lockwiseCo)ntourIntegra|cedi)|(?:(?:Not(?:S(?:quareSu(?:per|b)set|u(?:cceeds|(?:per|b)set))|Precedes|Greater|Tilde|Less)|Not(?:Righ|Lef)tTriangle|(?:Not(?:(?:Succeed|Precede|Les)s|Greater)|(?:Precede|Succeed)s|Less)Slant|SquareSu(?:per|b)set|(?:Not(?:Greater|Tilde)|Tilde|Less)Full|RightTriangle|LeftTriangle|Greater(?:Slant|Full)|Precedes|Succeeds|Superset|NotHump|Subset|Tilde|Hump)Equ|int(?:er)?c|DotEqu)a|DoubleContourIntegra|(?:n(?:short)?parall|shortparall|p(?:arall|rur))e|(?:rightarrowta|l(?:eftarrowta|ced|ata|Ata)|sced|rata|perm|rced|rAta|ced)i|Proportiona|smepars|e(?:qvpars|pars|xc|um)|Integra|suphso|rarr[pt]|n(?:pars|tg)|l(?:arr[pt]|cei)|Rarrt|(?:hybu|fora)l|ForAl|[GKLNR-Tcknt]cedi|rcei|iexc|gime|fras|[uy]um|oso|dso|ium|Ium)l|D(?:o(?:uble(?:(?:L(?:ong(?:Left)?R|eftR)ight|L(?:ongL)?eft|UpDown|Right|Up)Arrow|Do(?:wnArrow|t))|wn(?:ArrowUpA|TeeA|a)rrow)|iacriticalDot|strok|ashv|cy)|(?:(?:(?:N(?:(?:otN)?estedGreater|ot(?:Greater|Less))|Less(?:Equal)?)Great|GreaterGreat|l[lr]corn|mark|east)e|Not(?:Double)?VerticalBa|(?:Not(?:Righ|Lef)tTriangleB|(?:(?:Righ|Lef)tDown|Right(?:Up)?|Left(?:Up)?)VectorB|RightTriangleB|Left(?:Triangle|Arrow)B|RightArrowB|V(?:er(?:ticalB|b)|b)|UpArrowB|l(?:ur(?:ds|u)h|dr(?:us|d)h|trP|owb|H)|profal|r(?:ulu|dld)h|b(?:igst|rvb)|(?:wed|ve[er])b|s(?:wn|es)w|n(?:wne|ese|sp|hp)|gtlP|d(?:oll|uh|H)|(?:hor|ov)b|u(?:dh|H)|r(?:lh|H)|ohb|hb|St)a|D(?:o(?:wn(?:(?:Left(?:Right|Tee)|RightTee)Vecto|(?:(?:Righ|Lef)tVector|Arrow)Ba)|ubleVerticalBa)|a(?:gge|r)|sc|f)|(?:(?:(?:Righ|Lef)tDown|(?:Righ|Lef)tUp)Tee|(?:Righ|Lef)tUpDown)Vecto|VerticalSeparato|(?:Left(?:Right|Tee)|RightTee)Vecto|less(?:eqq?)?gt|e(?:qslantgt|sc)|(?:RightF|LeftF|[lr]f)loo|u(?:[lr]corne|ar)|timesba|(?:plusa|cirs|apa)ci|U(?:arroci|f)|(?:dzigr|s(?:u(?:pl|br)|imr|[lr])|zigr|angz|nvH|l(?:tl|B)|r[Br])ar|UnderBa|(?:plus|harr|top|mid|of)ci|O(?:verBa|sc|f)|dd?agge|s(?:olba|sc)|g(?:t(?:rar|ci)|sc|f)|c(?:opys|u(?:po|ep)|sc|f)|(?:n(?:(?:v[lr]|w|r)A|l[Aa]|h[Aa]|eA)|x[hlr][Aa]|u(?:ua|da|A)|s[ew]A|rla|o[lr]a|rba|rAa|l[Ablr]a|h(?:oa|A)|era|d(?:ua|A)|cra|vA)r|o(?:lci|sc|ro|pa)|ropa|roar|l(?:o(?:pa|ar)|sc|Ar)|i(?:ma|s)c|ltci|dd?ar|a(?:ma|s)c|R(?:Bar|sc|f)|I(?:mac|f)|(?:u(?:ma|s)|oma|ema|Oma|Ema|[wyz]s|qs|ks|fs|Zs|Ys|Xs|Ws|Vs|Us|Ss|Qs|Ns|Ms|Ks|Is|Gs|Fs|Cs|Bs)c|Umac|x(?:sc|f)|v(?:sc|f)|rsc|n(?:ld|f)|m(?:sc|ld|ac|f)|rAr|h(?:sc|f)|b(?:sc|f)|psc|P(?:sc|f)|L(?:sc|ar|f)|jsc|J(?:sc|f)|E(?:sc|f)|[HT]sc|[yz]f|wf|tf|qf|pf|kf|jf|Zf|Yf|Xf|Wf|Vf|Tf|Sf|Qf|Nf|Mf|Kf|Hf|Gf|Ff|Cf|Bf)r|(?:Diacritical(?:Double)?A|[EINOSYZaisz]a)cute|(?:(?:N(?:egative(?:VeryThin|Thi(?:ck|n))|onBreaking)|NegativeMedium|ZeroWidth|VeryThin|Medium|Thi(?:ck|n))Spac|Filled(?:Very)?SmallSquar|Empty(?:Very)?SmallSquar|(?:N(?:ot(?:Succeeds|Greater|Tilde|Less)T|t)|DiacriticalT|VerticalT|PrecedesT|SucceedsT|NotEqualT|GreaterT|TildeT|EqualT|LessT|at|Ut|It)ild|(?:(?:DiacriticalG|[EIOUaiu]g)ra|(?:u|U)?bre|(?:o|e)?gra)v|(?:doublebar|curly|big|x)wedg|H(?:orizontalLin|ilbertSpac)|Double(?:Righ|Lef)tTe|(?:(?:measured|uw)ang|exponentia|dwang|ssmi|fema)l|(?:Poincarepla|reali|pho|oli)n|(?:black)?lozeng|(?:VerticalL|(?:prof|imag)l)in|SmallCircl|(?:black|dot)squar|rmoustach|l(?:moustach|angl)|(?:b(?:ack)?pr|(?:tri|xo)t|[qt]pr)im|[Tt]herefor|(?:DownB|[Gag]b)rev|(?:infint|nv[lr]tr)i|b(?:arwedg|owti)|an(?:dslop|gl)|(?:cu(?:rly)?v|rthr|lthr|b(?:ig|ar)v|xv)e|n(?:s(?:qsu[bp]|ccu)|prcu)|orslop|NewLin|maltes|Becaus|rangl|incar|(?:otil|Otil|t(?:ra|il))d|[inu]tild|s(?:mil|imn)|(?:sc|pr)cu|Wedg|Prim|Brev)e|(?:CloseCurly(?:Double)?Quo|OpenCurly(?:Double)?Quo|[ry]?acu)te|(?:Reverse(?:Up)?|Up)Equilibrium|C(?:apitalDifferentialD|(?:oproduc|(?:ircleD|enterD|d)o)t|on(?:grue|i)nt|conint|upCap|o(?:lone|pf)|OPY|hi)|(?:(?:(?:left)?rightsquig|(?:longleftr|twoheadr|nleftr|nLeftr|longr|hookr|nR|Rr)ight|(?:twohead|hook)left|longleft|updown|Updown|nright|Right|nleft|nLeft|down|up|Up)a|L(?:(?:ong(?:left)?righ|(?:ong)?lef)ta|eft(?:(?:right)?a|RightA|TeeA))|RightTeeA|LongLeftA|UpTeeA)rrow|(?:(?:RightArrow|Short|Upper|Lower)Left|(?:L(?:eftArrow|o(?:wer|ng))|LongLeft|Short|Upper)Right|ShortUp)Arrow|(?:b(?:lacktriangle(?:righ|lef)|ulle|no)|RightDoubleBracke|RightAngleBracke|Left(?:Doub|Ang)leBracke|(?:vartriangle|downharpoon|c(?:ircl|urv)earrow|upharpoon|looparrow)righ|(?:vartriangle|downharpoon|c(?:ircl|urv)earrow|upharpoon|looparrow|mapsto)lef|(?:UnderBrack|OverBrack|emptys|targ|Sups)e|diamondsui|c(?:ircledas|lubsui|are)|(?:spade|heart)sui|(?:(?:c(?:enter|t)|lmi|ino)d|(?:Triple|mD)D|n(?:otin|e)d|(?:ncong|doteq|su[bp]e|e[gl]s)d|l(?:ess|t)d|isind|c(?:ong|up|ap)?d|b(?:igod|N)|t(?:(?:ri)?d|opb)|s(?:ub|im)d|midd|g(?:tr?)?d|Lmid|DotD|(?:xo|ut|z)d|e(?:s?d|rD|fD|DD)|dtd|Zd|Id|Gd|Ed)o|realpar|i(?:magpar|iin)|S(?:uchTha|qr)|su[bp]mul|(?:(?:lt|i)que|gtque|(?:mid|low)a|e(?:que|xi))s|Produc|s(?:updo|e[cx])|r(?:parg|ec)|lparl|vangr|hamil|(?:homt|[lr]fis|ufis|dfis)h|phmma|t(?:wix|in)|quo|o(?:do|as)|fla|eDo)t|(?:(?:Square)?Intersecti|(?:straight|back|var)epsil|SquareUni|expectati|upsil|epsil|Upsil|eq?col|Epsil|(?:omic|Omic|rca|lca|eca|Sca|[NRTt]ca|Lca|Eca|[Zdz]ca|Dca)r|scar|ncar|herc|ccar|Ccar|iog|Iog)on|Not(?:S(?:quareSu(?:per|b)set|u(?:cceeds|(?:per|b)set))|Precedes|Greater|Tilde|Less)?|(?:(?:(?:Not(?:Reverse)?|Reverse)E|comp|E)leme|NotCongrue|(?:n[gl]|l)eqsla|geqsla|q(?:uat)?i|perc|iiii|coni|cwi|awi|oi)nt|(?:(?:rightleftharpo|leftrightharpo|quaterni)on|(?:(?:N(?:ot(?:NestedLess|Greater|Less)|estedLess)L|(?:eqslant|gtr(?:eqq?)?)l|LessL)e|Greater(?:Equal)?Le|cro)s|(?:rightright|leftleft|upup)arrow|rightleftarrow|(?:(?:(?:righ|lef)tthree|divideon|b(?:igo|ox)|[lr]o)t|InvisibleT)ime|downdownarrow|(?:(?:smallset|tri|dot|box)m|PlusM)inu|(?:RoundImpli|complex|Impli|Otim)e|C(?:ircle(?:Time|Minu|Plu)|ayley|ros)|(?:rationa|mode)l|NotExist|(?:(?:UnionP|MinusP|(?:b(?:ig[ou]|ox)|tri|s(?:u[bp]|im)|dot|xu|mn)p)l|(?:xo|u)pl|o(?:min|pl)|ropl|lopl|epl)u|otimesa|integer|e(?:linter|qual)|setminu|rarrbf|larrb?f|olcros|rarrf|mstpo|lesge|gesle|Exist|[lr]time|strn|napo|fltn|ccap|apo)s|(?:b(?:(?:lack|ig)triangledow|etwee)|(?:righ|lef)tharpoondow|(?:triangle|mapsto)dow|(?:nv|i)infi|ssetm|plusm|lagra|d(?:[lr]cor|isi)|c(?:ompf|aro)|s?frow|(?:hyph|curr)e|kgree|thor|ogo|ye)n|Not(?:Righ|Lef)tTriangle|(?:Up(?:Arrow)?|Short)DownArrow|(?:(?:n(?:triangle(?:righ|lef)t|succ|prec)|(?:trianglerigh|trianglelef|sqsu[bp]se|ques)t|backsim)e|lvertneq|gvertneq|(?:suc|pre)cneq|a(?:pprox|symp)e|(?:succ|prec|vee)e|circe)q|(?:UnderParenthes|OverParenthes|xn)is|(?:(?:Righ|Lef)tDown|Right(?:Up)?|Left(?:Up)?)Vector|D(?:o(?:wn(?:RightVector|LeftVector|Arrow|Tee)|t)|el|D)|l(?:eftrightarrows|br(?:k(?:sl[du]|e)|ac[ek])|tri[ef]|s(?:im[eg]|qb|h)|hard|a(?:tes|ngd|p)|o[pz]f|rm|gE|fr|eg|cy)|(?:NotHumpDownHum|(?:righ|lef)tharpoonu|big(?:(?:triangle|sqc)u|c[au])|HumpDownHum|m(?:apstou|lc)|(?:capbr|xsq)cu|smash|rarr[al]|(?:weie|sha)r|larrl|velli|(?:thin|punc)s|h(?:elli|airs)|(?:u[lr]c|vp)ro|d[lr]cro|c(?:upc[au]|apc[au])|thka|scna|prn?a|oper|n(?:ums|va|cu|bs)|ens|xc[au]|Ma)p|l(?:eftrightarrow|e(?:ftarrow|s(?:dot)?)?|moust|a(?:rrb?|te?|ng)|t(?:ri)?|sim|par|oz|l|g)|n(?:triangle(?:righ|lef)t|succ|prec)|SquareSu(?:per|b)set|(?:I(?:nvisibleComm|ot)|(?:varthe|iio)t|varkapp|(?:vars|S)igm|(?:diga|mco)mm|Cedill|lambd|Lambd|delt|Thet|omeg|Omeg|Kapp|Delt|nabl|zet|to[es]|rdc|ldc|iot|Zet|Bet|Et)a|b(?:lacktriangle|arwed|u(?:mpe?|ll)|sol|o(?:x[HVhv]|t)|brk|ne)|(?:trianglerigh|trianglelef|sqsu[bp]se|ques)t|RightT(?:riangl|e)e|(?:(?:varsu[bp]setn|su(?:psetn?|bsetn?))eq|nsu[bp]seteq|colone|(?:wedg|sim)e|nsime|lneq|gneq)q|DifferentialD|(?:(?:fall|ris)ingdots|(?:suc|pre)ccurly|ddots)eq|A(?:pplyFunction|ssign|(?:tild|grav|brev)e|acute|o(?:gon|pf)|lpha|(?:mac|sc|f)r|c(?:irc|y)|ring|Elig|uml|nd|MP)|(?:varsu[bp]setn|su(?:psetn?|bsetn?))eq|L(?:eft(?:T(?:riangl|e)e|Arrow)|l)|G(?:reaterEqual|amma)|E(?:xponentialE|quilibrium|sim|cy|TH|NG)|(?:(?:RightCeil|LeftCeil|varnoth|ar|Ur)in|(?:b(?:ack)?co|uri)n|vzigza|roan|loan|ffli|amal|sun|rin|n(?:tl|an)|Ran|Lan)g|(?:thick|succn?|precn?|less|g(?:tr|n)|ln|n)approx|(?:s(?:traightph|em)|(?:rtril|xu|u[lr]|xd|v[lr])tr|varph|l[lr]tr|b(?:sem|eps)|Ph)i|(?:circledd|osl|n(?:v[Dd]|V[Dd]|d)|hsl|V(?:vd|D)|Osl|v[Dd]|md)ash|(?:(?:RuleDelay|imp|cuw)e|(?:n(?:s(?:hort)?)?|short|rn)mi|D(?:Dotrah|iamon)|(?:i(?:nt)?pr|peri)o|odsol|llhar|c(?:opro|irmi)|(?:capa|anda|pou)n|Barwe|napi|api)d|(?:cu(?:rlyeq(?:suc|pre)|es)|telre|[ou]dbla|Udbla|Odbla|radi|lesc|gesc|dbla)c|(?:circled|big|eq|[is]|c|x|a|S|[hw]|W|H|G|E|C)circ|rightarrow|R(?:ightArrow|arr|e)|Pr(?:oportion)?|(?:longmapst|varpropt|p(?:lustw|ropt)|varrh|numer|(?:rsa|lsa|sb)qu|m(?:icr|h)|[lr]aqu|bdqu|eur)o|UnderBrace|ImaginaryI|B(?:ernoullis|a(?:ckslash|rv)|umpeq|cy)|(?:(?:Laplace|Mellin|zee)tr|Fo(?:uriertr|p)|(?:profsu|ssta)r|ordero|origo|[ps]op|nop|mop|i(?:op|mo)|h(?:op|al)|f(?:op|no)|dop|bop|Rop|Pop|Nop|Lop|Iop|Hop|Dop|[GJKMOQSTV-Zgjkoqvwyz]op|Bop)f|nsu[bp]seteq|t(?:ri(?:angleq|e)|imesd|he(?:tav|re4)|au)|O(?:verBrace|r)|(?:(?:pitchfo|checkma|t(?:opfo|b)|rob|rbb|l[bo]b)r|intlarh|b(?:brktbr|l(?:oc|an))|perten|NoBrea|rarrh|s[ew]arh|n[ew]arh|l(?:arrh|hbl)|uhbl|Hace)k|(?:NotCupC|(?:mu(?:lti)?|x)m|cupbrc)ap|t(?:riangle|imes|heta|opf?)|Precedes|Succeeds|Superset|NotEqual|(?:n(?:atural|exist|les)|s(?:qc[au]p|mte)|prime)s|c(?:ir(?:cled[RS]|[Ee])|u(?:rarrm|larrp|darr[lr]|ps)|o(?:mmat|pf)|aps|hi)|b(?:sol(?:hsu)?b|ump(?:eq|E)|ox(?:box|[Vv][HLRhlr]|[Hh][DUdu]|[DUdu][LRlr])|e(?:rnou|t[ah])|lk(?:34|1[24])|cy)|(?:l(?:esdot|squ|dqu)o|rsquo|rdquo|ngt)r|a(?:n(?:g(?:msda[a-h]|st|e)|d[dv])|st|p[Ee]|mp|fr|c[Edy])|(?:g(?:esdoto|E)|[lr]haru)l|(?:angrtvb|lrhar|nis)d|(?:(?:th(?:ic)?k|succn?|p(?:r(?:ecn?|n)?|lus)|rarr|l(?:ess|arr)|su[bp]|par|scn|g(?:tr|n)|ne|sc|n[glv]|ln|eq?)si|thetasy|ccupss|alefsy|botto)m|trpezium|(?:hks[ew]|dr?bk|bk)arow|(?:(?:[lr]a|d|c)empty|b(?:nequi|empty)|plank|nequi|odi)v|(?:(?:sc|rp|n)pol|point|fpart)int|(?:c(?:irf|wco)|awco)nint|PartialD|n(?:s(?:u[bp](?:set)?|c)|rarr|ot(?:ni|in)?|warr|e(?:arr)?|a(?:tur|p)|vlt|p(?:re?|ar)|um?|l[et]|ge|i)|n(?:atural|exist|les)|d(?:i(?:am(?:ond)?|v(?:ide)?)|tri|ash|ot|d)|backsim|l(?:esdot|squ|dqu)o|g(?:esdoto|E)|U(?:p(?:Arrow|si)|nion|arr)|angrtvb|p(?:l(?:anckh|us(?:d[ou]|[be]))|ar(?:sl|t)|r(?:od|nE|E)|erp|iv|m)|n(?:ot(?:niv[a-c]|in(?:v[a-c]|E))|rarr[cw]|s(?:u[bp][Ee]|c[er])|part|v(?:le|g[et])|g(?:es|E)|c(?:ap|y)|apE|lE|iv|Ll|Gg)|m(?:inus(?:du|b)|ale|cy|p)|rbr(?:k(?:sl[du]|e)|ac[ek])|(?:suphsu|tris|rcu|lcu)b|supdsub|(?:s[ew]a|n[ew]a)rrow|(?:b(?:ecaus|sim)|n(?:[lr]tri|bump)|csu[bp])e|equivDD|u(?:rcorn|lcorn|psi)|timesb|s(?:u(?:p(?:set)?|b(?:set)?)|q(?:su[bp]|u)|i(?:gma|m)|olb?|dot|mt|fr|ce?)|p(?:l(?:anck|us)|r(?:op|ec?)?|ara?|i)|o(?:times|r(?:d(?:er)?)?)|m(?:i(?:nusd?|d)|a(?:p(?:sto)?|lt)|u)|rmoust|g(?:e(?:s(?:dot|l)?|q)?|sim|n(?:ap|e)|t|l|g)|(?:spade|heart)s|c(?:u(?:rarr|larr|p)|o(?:m(?:ma|p)|lon|py|ng)|lubs|heck|cups|irc?|ent|ap)|colone|a(?:p(?:prox)?|n(?:g(?:msd|rt)?|d)|symp|f|c)|S(?:quare|u[bp]|c)|Subset|b(?:ecaus|sim)|vsu[bp]n[Ee]|s(?:u(?:psu[bp]|b(?:su[bp]|n[Ee]|E)|pn[Ee]|p[1-3E]|m)|q(?:u(?:ar[ef]|f)|su[bp]e)|igma[fv]|etmn|dot[be]|par|mid|hc?y|c[Ey])|f(?:rac(?:78|5[68]|45|3[458]|2[35]|1[2-68])|fr)|e(?:m(?:sp1[34]|ptyv)|psiv|c(?:irc|y)|t[ah]|ng|ll|fr|e)|(?:kappa|isins|vBar|fork|rho|phi|n[GL]t)v|divonx|V(?:dashl|ee)|gammad|G(?:ammad|cy|[Tgt])|[Ldhlt]strok|[HT]strok|(?:c(?:ylct|hc)|(?:s(?:oft|hch)|hard|S(?:OFT|HCH)|jser|J(?:ser|uk)|HARD|tsh|TSH|juk|iuk|I(?:uk|[EO])|zh|yi|nj|lj|k[hj]|gj|dj|ZH|Y[AIU]|NJ|LJ|K[HJ]|GJ|D[JSZ])c|ubrc|Ubrc|(?:yu|i[eo]|dz|v|p|f)c|TSc|SHc|CHc|Vc|Pc|Mc|Fc)y|(?:(?:wre|jm)at|dalet|a(?:ngs|le)p|imat|[lr]ds)h|[CLRUceglnou]acute|ff?llig|(?:f(?:fi|[ij])|sz|oe|ij|ae|OE|IJ)lig|r(?:a(?:tio|rr|ng)|tri|par|eal)|s[ew]arr|s(?:qc[au]p|mte)|prime|rarrb|i(?:n(?:fin|t)?|sin|t|i|c)|e(?:quiv|m(?:pty|sp)|p(?:si|ar)|cir|l|g)|kappa|isins|ncong|doteq|(?:wedg|sim)e|nsime|rsquo|rdquo|[lr]haru|V(?:dash|ert)|Tilde|lrhar|gamma|Equal|UpTee|n(?:[lr]tri|bump)|C(?:olon|up|ap)|v(?:arpi|ert)|u(?:psih|ml)|vnsu[bp]|r(?:tri[ef]|e(?:als|g)|a(?:rr[cw]|ng[de]|ce)|sh|lm|x)|rhard|sim[gl]E|i(?:sin[Ev]|mage|f[fr]|cy)|harrw|(?:n[gl]|l)eqq|g(?:sim[el]|tcc|e(?:qq|l)|nE|l[Eaj]|gg|ap)|ocirc|starf|utrif|d(?:trif|i(?:ams|e)|ashv|sc[ry]|fr|eg)|[du]har[lr]|T(?:HORN|a[bu])|(?:TRAD|[gl]vn)E|odash|[EUaeu]o(?:gon|pf)|alpha|[IJOUYgjuy]c(?:irc|y)|v(?:arr|ee)|succ|sim[gl]|harr|ln(?:ap|e)|lesg|(?:n[gl]|l)eq|ocir|star|utri|vBar|fork|su[bp]e|nsim|lneq|gneq|csu[bp]|zwn?j|yacy|x(?:opf|i)|scnE|o(?:r(?:d[fm]|v)|mid|lt|hm|gt|fr|cy|S)|scap|rsqb|ropf|ltcc|tsc[ry]|QUOT|[EOUYao]uml|rho|phi|n[GL]t|e[gl]s|ngt|I(?:nt|m)|nis|rfr|rcy|lnE|lEg|ufr|S(?:um|cy)|R(?:sh|ho)|psi|Ps?i|[NRTt]cy|L(?:sh|cy|[Tt])|kcy|Kcy|Hat|REG|[Zdz]cy|wr|lE|wp|Xi|Nu|Mu)(;)", + "name": "constant.language.character-reference.named.html", + "captures": { + "1": { + "name": "punctuation.definition.character-reference.begin.html" + }, + "2": { + "name": "keyword.control.character-reference.html" + }, + "3": { + "name": "punctuation.definition.character-reference.end.html" + } + } + }, + "commonmark-code-fenced-apib": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:api\\x2dblueprint|(?:.*\\.)?apib))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.apib", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.apib.mdx", + "patterns": [ + { + "include": "text.html.markdown.source.gfm.apib" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:api\\x2dblueprint|(?:.*\\.)?apib))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.apib", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.apib.mdx", + "patterns": [ + { + "include": "text.html.markdown.source.gfm.apib" + } + ] + } + ] + }, + "commonmark-code-fenced-asciidoc": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:(?:.*\\.)?(?:adoc|asciidoc)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.asciidoc", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.asciidoc.mdx", + "patterns": [ + { + "include": "text.html.asciidoc" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:(?:.*\\.)?(?:adoc|asciidoc)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.asciidoc", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.asciidoc.mdx", + "patterns": [ + { + "include": "text.html.asciidoc" + } + ] + } + ] + }, + "commonmark-code-fenced-c": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:dtrace|dtrace\\x2dscript|oncrpc|rpc|rpcgen|unified\\x2dparallel\\x2dc|x\\x2dbitmap|x\\x2dpixmap|xdr|(?:.*\\.)?(?:c|cats|h|idc|opencl|upc|xbm|xpm|xs)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.c", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.c.mdx", + "patterns": [ + { + "include": "source.c" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:dtrace|dtrace\\x2dscript|oncrpc|rpc|rpcgen|unified\\x2dparallel\\x2dc|x\\x2dbitmap|x\\x2dpixmap|xdr|(?:.*\\.)?(?:c|cats|h|idc|opencl|upc|xbm|xpm|xs)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.c", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.c.mdx", + "patterns": [ + { + "include": "source.c" + } + ] + } + ] + }, + "commonmark-code-fenced-clojure": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:clojure|rouge|(?:.*\\.)?(?:boot|cl2|clj|cljc|cljs|cljs\\.hl|cljscm|cljx|edn|hic|rg|wisp)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.clojure", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.clojure.mdx", + "patterns": [ + { + "include": "source.clojure" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:clojure|rouge|(?:.*\\.)?(?:boot|cl2|clj|cljc|cljs|cljs\\.hl|cljscm|cljx|edn|hic|rg|wisp)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.clojure", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.clojure.mdx", + "patterns": [ + { + "include": "source.clojure" + } + ] + } + ] + }, + "commonmark-code-fenced-coffee": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:coffee\\x2dscript|coffeescript|(?:.*\\.)?(?:_coffee|cjsx|coffee|cson|em|emberscript|iced)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.coffee", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.coffee.mdx", + "patterns": [ + { + "include": "source.coffee" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:coffee\\x2dscript|coffeescript|(?:.*\\.)?(?:_coffee|cjsx|coffee|cson|em|emberscript|iced)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.coffee", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.coffee.mdx", + "patterns": [ + { + "include": "source.coffee" + } + ] + } + ] + }, + "commonmark-code-fenced-console": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:pycon|python\\x2dconsole))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.console", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.console.mdx", + "patterns": [ + { + "include": "text.python.console" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:pycon|python\\x2dconsole))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.console", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.console.mdx", + "patterns": [ + { + "include": "text.python.console" + } + ] + } + ] + }, + "commonmark-code-fenced-cpp": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:ags|ags\\x2dscript|asymptote|c\\+\\+|edje\\x2ddata\\x2dcollection|game\\x2dmaker\\x2dlanguage|swig|(?:.*\\.)?(?:asc|ash|asy|c\\+\\+|cc|cp|cpp|cppm|cxx|edc|gml|h\\+\\+|hh|hpp|hxx|inl|ino|ipp|ixx|metal|re|tcc|tpp|txx)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.cpp", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.cpp.mdx", + "patterns": [ + { + "include": "source.c++" + }, + { + "include": "source.cpp" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:ags|ags\\x2dscript|asymptote|c\\+\\+|edje\\x2ddata\\x2dcollection|game\\x2dmaker\\x2dlanguage|swig|(?:.*\\.)?(?:asc|ash|asy|c\\+\\+|cc|cp|cpp|cppm|cxx|edc|gml|h\\+\\+|hh|hpp|hxx|inl|ino|ipp|ixx|metal|re|tcc|tpp|txx)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.cpp", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.cpp.mdx", + "patterns": [ + { + "include": "source.c++" + }, + { + "include": "source.cpp" + } + ] + } + ] + }, + "commonmark-code-fenced-cs": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:beef|c#|cakescript|csharp|(?:.*\\.)?(?:bf|cake|cs|csx|eq|linq|uno)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.cs", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.cs.mdx", + "patterns": [ + { + "include": "source.cs" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:beef|c#|cakescript|csharp|(?:.*\\.)?(?:bf|cake|cs|csx|eq|linq|uno)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.cs", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.cs.mdx", + "patterns": [ + { + "include": "source.cs" + } + ] + } + ] + }, + "commonmark-code-fenced-css": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:(?:.*\\.)?css))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.css", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.css.mdx", + "patterns": [ + { + "include": "source.css" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:(?:.*\\.)?css))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.css", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.css.mdx", + "patterns": [ + { + "include": "source.css" + } + ] + } + ] + }, + "commonmark-code-fenced-diff": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:udiff|(?:.*\\.)?(?:diff|patch)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.diff", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.diff.mdx", + "patterns": [ + { + "include": "source.diff" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:udiff|(?:.*\\.)?(?:diff|patch)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.diff", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.diff.mdx", + "patterns": [ + { + "include": "source.diff" + } + ] + } + ] + }, + "commonmark-code-fenced-dockerfile": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:containerfile|(?:.*\\.)?dockerfile))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.dockerfile", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.dockerfile.mdx", + "patterns": [ + { + "include": "source.dockerfile" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:containerfile|(?:.*\\.)?dockerfile))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.dockerfile", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.dockerfile.mdx", + "patterns": [ + { + "include": "source.dockerfile" + } + ] + } + ] + }, + "commonmark-code-fenced-elixir": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:elixir|(?:.*\\.)?(?:ex|exs)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.elixir", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.elixir.mdx", + "patterns": [ + { + "include": "source.elixir" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:elixir|(?:.*\\.)?(?:ex|exs)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.elixir", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.elixir.mdx", + "patterns": [ + { + "include": "source.elixir" + } + ] + } + ] + }, + "commonmark-code-fenced-elm": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:(?:.*\\.)?elm))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.elm", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.elm.mdx", + "patterns": [ + { + "include": "source.elm" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:(?:.*\\.)?elm))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.elm", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.elm.mdx", + "patterns": [ + { + "include": "source.elm" + } + ] + } + ] + }, + "commonmark-code-fenced-erlang": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:erlang|(?:.*\\.)?(?:app|app\\.src|erl|es|escript|hrl|xrl|yrl)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.erlang", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.erlang.mdx", + "patterns": [ + { + "include": "source.erlang" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:erlang|(?:.*\\.)?(?:app|app\\.src|erl|es|escript|hrl|xrl|yrl)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.erlang", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.erlang.mdx", + "patterns": [ + { + "include": "source.erlang" + } + ] + } + ] + }, + "commonmark-code-fenced-gitconfig": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:git\\x2dconfig|gitmodules|(?:.*\\.)?gitconfig))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.gitconfig", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.gitconfig.mdx", + "patterns": [ + { + "include": "source.gitconfig" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:git\\x2dconfig|gitmodules|(?:.*\\.)?gitconfig))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.gitconfig", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.gitconfig.mdx", + "patterns": [ + { + "include": "source.gitconfig" + } + ] + } + ] + }, + "commonmark-code-fenced-go": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:golang|(?:.*\\.)?go))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.go", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.go.mdx", + "patterns": [ + { + "include": "source.go" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:golang|(?:.*\\.)?go))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.go", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.go.mdx", + "patterns": [ + { + "include": "source.go" + } + ] + } + ] + }, + "commonmark-code-fenced-graphql": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:(?:.*\\.)?(?:gql|graphql|graphqls)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.graphql", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.graphql.mdx", + "patterns": [ + { + "include": "source.graphql" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:(?:.*\\.)?(?:gql|graphql|graphqls)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.graphql", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.graphql.mdx", + "patterns": [ + { + "include": "source.graphql" + } + ] + } + ] + }, + "commonmark-code-fenced-haskell": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:c2hs|c2hs\\x2dhaskell|frege|haskell|(?:.*\\.)?(?:chs|dhall|hs|hs\\x2dboot|hsc)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.haskell", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.haskell.mdx", + "patterns": [ + { + "include": "source.haskell" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:c2hs|c2hs\\x2dhaskell|frege|haskell|(?:.*\\.)?(?:chs|dhall|hs|hs\\x2dboot|hsc)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.haskell", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.haskell.mdx", + "patterns": [ + { + "include": "source.haskell" + } + ] + } + ] + }, + "commonmark-code-fenced-html": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:html|(?:.*\\.)?(?:hta|htm|html\\.hl|kit|mtml|xht|xhtml)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.html", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.html.mdx", + "patterns": [ + { + "include": "text.html.basic" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:html|(?:.*\\.)?(?:hta|htm|html\\.hl|kit|mtml|xht|xhtml)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.html", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.html.mdx", + "patterns": [ + { + "include": "text.html.basic" + } + ] + } + ] + }, + "commonmark-code-fenced-ini": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:altium|altium\\x2ddesigner|dosini|(?:.*\\.)?(?:cnf|dof|ini|lektorproject|outjob|pcbdoc|prefs|prjpcb|properties|schdoc|url)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.ini", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.ini.mdx", + "patterns": [ + { + "include": "source.ini" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:altium|altium\\x2ddesigner|dosini|(?:.*\\.)?(?:cnf|dof|ini|lektorproject|outjob|pcbdoc|prefs|prjpcb|properties|schdoc|url)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.ini", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.ini.mdx", + "patterns": [ + { + "include": "source.ini" + } + ] + } + ] + }, + "commonmark-code-fenced-java": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:chuck|unrealscript|(?:.*\\.)?(?:ck|jav|java|jsh|uc)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.java", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.java.mdx", + "patterns": [ + { + "include": "source.java" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:chuck|unrealscript|(?:.*\\.)?(?:ck|jav|java|jsh|uc)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.java", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.java.mdx", + "patterns": [ + { + "include": "source.java" + } + ] + } + ] + }, + "commonmark-code-fenced-js": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:cycript|javascript\\+erb|json\\x2dwith\\x2dcomments|node|qt\\x2dscript|(?:.*\\.)?(?:_js|bones|cjs|code\\x2dsnippets|cy|es6|jake|javascript|js|js\\.erb|jsb|jscad|jsfl|jslib|jsm|json5|jsonc|jsonld|jspre|jss|jsx|mjs|njs|pac|sjs|ssjs|sublime\\x2dbuild|sublime\\x2dcommands|sublime\\x2dcompletions|sublime\\x2dkeymap|sublime\\x2dmacro|sublime\\x2dmenu|sublime\\x2dmousemap|sublime\\x2dproject|sublime\\x2dsettings|sublime\\x2dtheme|sublime\\x2dworkspace|sublime_metrics|sublime_session|xsjs|xsjslib)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.js", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.js.mdx", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:cycript|javascript\\+erb|json\\x2dwith\\x2dcomments|node|qt\\x2dscript|(?:.*\\.)?(?:_js|bones|cjs|code\\x2dsnippets|cy|es6|jake|javascript|js|js\\.erb|jsb|jscad|jsfl|jslib|jsm|json5|jsonc|jsonld|jspre|jss|jsx|mjs|njs|pac|sjs|ssjs|sublime\\x2dbuild|sublime\\x2dcommands|sublime\\x2dcompletions|sublime\\x2dkeymap|sublime\\x2dmacro|sublime\\x2dmenu|sublime\\x2dmousemap|sublime\\x2dproject|sublime\\x2dsettings|sublime\\x2dtheme|sublime\\x2dworkspace|sublime_metrics|sublime_session|xsjs|xsjslib)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.js", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.js.mdx", + "patterns": [ + { + "include": "source.js" + } + ] + } + ] + }, + "commonmark-code-fenced-json": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:ecere\\x2dprojects|ipython\\x2dnotebook|jupyter\\x2dnotebook|max|max/msp|maxmsp|oasv2\\x2djson|oasv3\\x2djson|(?:.*\\.)?(?:4dform|4dproject|avsc|epj|geojson|gltf|har|ice|ipynb|json|json|json|json\\x2dtmlanguage|jsonl|maxhelp|maxpat|maxproj|mcmeta|mxt|pat|tfstate|tfstate\\.backup|topojson|webapp|webmanifest|yy|yyp)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.json", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.json.mdx", + "patterns": [ + { + "include": "source.json" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:ecere\\x2dprojects|ipython\\x2dnotebook|jupyter\\x2dnotebook|max|max/msp|maxmsp|oasv2\\x2djson|oasv3\\x2djson|(?:.*\\.)?(?:4dform|4dproject|avsc|epj|geojson|gltf|har|ice|ipynb|json|json|json|json\\x2dtmlanguage|jsonl|maxhelp|maxpat|maxproj|mcmeta|mxt|pat|tfstate|tfstate\\.backup|topojson|webapp|webmanifest|yy|yyp)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.json", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.json.mdx", + "patterns": [ + { + "include": "source.json" + } + ] + } + ] + }, + "commonmark-code-fenced-julia": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:julia|(?:.*\\.)?jl))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.julia", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.julia.mdx", + "patterns": [ + { + "include": "source.julia" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:julia|(?:.*\\.)?jl))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.julia", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.julia.mdx", + "patterns": [ + { + "include": "source.julia" + } + ] + } + ] + }, + "commonmark-code-fenced-kotlin": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:kotlin|(?:.*\\.)?(?:kt|ktm|kts)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.kotlin", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.kotlin.mdx", + "patterns": [ + { + "include": "source.kotlin" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:kotlin|(?:.*\\.)?(?:kt|ktm|kts)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.kotlin", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.kotlin.mdx", + "patterns": [ + { + "include": "source.kotlin" + } + ] + } + ] + }, + "commonmark-code-fenced-less": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:less\\x2dcss|(?:.*\\.)?less))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.less", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.less.mdx", + "patterns": [ + { + "include": "source.css.less" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:less\\x2dcss|(?:.*\\.)?less))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.less", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.less.mdx", + "patterns": [ + { + "include": "source.css.less" + } + ] + } + ] + }, + "commonmark-code-fenced-lua": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:(?:.*\\.)?(?:fcgi|lua|nse|p8|pd_lua|rbxs|rockspec|wlua)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.lua", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.lua.mdx", + "patterns": [ + { + "include": "source.lua" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:(?:.*\\.)?(?:fcgi|lua|nse|p8|pd_lua|rbxs|rockspec|wlua)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.lua", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.lua.mdx", + "patterns": [ + { + "include": "source.lua" + } + ] + } + ] + }, + "commonmark-code-fenced-makefile": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:bsdmake|mf|(?:.*\\.)?(?:mak|make|makefile|mk|mkfile)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.makefile", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.makefile.mdx", + "patterns": [ + { + "include": "source.makefile" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:bsdmake|mf|(?:.*\\.)?(?:mak|make|makefile|mk|mkfile)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.makefile", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.makefile.mdx", + "patterns": [ + { + "include": "source.makefile" + } + ] + } + ] + }, + "commonmark-code-fenced-md": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:md|pandoc|rmarkdown|(?:.*\\.)?(?:livemd|markdown|mdown|mdwn|mkd|mkdn|mkdown|qmd|rmd|ronn|scd|workbook)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.md", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.md.mdx", + "patterns": [ + { + "include": "text.md" + }, + { + "include": "source.gfm" + }, + { + "include": "text.html.markdown" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:md|pandoc|rmarkdown|(?:.*\\.)?(?:livemd|markdown|mdown|mdwn|mkd|mkdn|mkdown|qmd|rmd|ronn|scd|workbook)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.md", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.md.mdx", + "patterns": [ + { + "include": "text.md" + }, + { + "include": "source.gfm" + }, + { + "include": "text.html.markdown" + } + ] + } + ] + }, + "commonmark-code-fenced-mdx": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:(?:.*\\.)?mdx))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.mdx", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.mdx.mdx", + "patterns": [ + { + "include": "source.mdx" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:(?:.*\\.)?mdx))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.mdx", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.mdx.mdx", + "patterns": [ + { + "include": "source.mdx" + } + ] + } + ] + }, + "commonmark-code-fenced-objc": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:obj\\x2dc|objc|objective\\x2dc|objectivec))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.objc", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.objc.mdx", + "patterns": [ + { + "include": "source.objc" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:obj\\x2dc|objc|objective\\x2dc|objectivec))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.objc", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.objc.mdx", + "patterns": [ + { + "include": "source.objc" + } + ] + } + ] + }, + "commonmark-code-fenced-perl": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:cperl|(?:.*\\.)?(?:cgi|perl|ph|pl|plx|pm|psgi|t)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.perl", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.perl.mdx", + "patterns": [ + { + "include": "source.perl" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:cperl|(?:.*\\.)?(?:cgi|perl|ph|pl|plx|pm|psgi|t)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.perl", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.perl.mdx", + "patterns": [ + { + "include": "source.perl" + } + ] + } + ] + }, + "commonmark-code-fenced-php": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:html\\+php|inc|php|(?:.*\\.)?(?:aw|ctp|php3|php4|php5|phps|phpt|phtml)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.php", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.php.mdx", + "patterns": [ + { + "include": "text.html.php" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:html\\+php|inc|php|(?:.*\\.)?(?:aw|ctp|php3|php4|php5|phps|phpt|phtml)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.php", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.php.mdx", + "patterns": [ + { + "include": "text.html.php" + } + ] + } + ] + }, + "commonmark-code-fenced-python": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:bazel|easybuild|python|python3|rusthon|snakemake|starlark|xonsh|(?:.*\\.)?(?:bzl|eb|gyp|gypi|lmi|py|py3|pyde|pyi|pyp|pyt|pyw|rpy|sage|sagews|smk|snakefile|spec|tac|wsgi|xpy|xsh)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.python", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.python.mdx", + "patterns": [ + { + "include": "source.python" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:bazel|easybuild|python|python3|rusthon|snakemake|starlark|xonsh|(?:.*\\.)?(?:bzl|eb|gyp|gypi|lmi|py|py3|pyde|pyi|pyp|pyt|pyw|rpy|sage|sagews|smk|snakefile|spec|tac|wsgi|xpy|xsh)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.python", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.python.mdx", + "patterns": [ + { + "include": "source.python" + } + ] + } + ] + }, + "commonmark-code-fenced-r": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:rscript|splus|(?:.*\\.)?(?:r|rd|rsx)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.r", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.r.mdx", + "patterns": [ + { + "include": "source.r" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:rscript|splus|(?:.*\\.)?(?:r|rd|rsx)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.r", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.r.mdx", + "patterns": [ + { + "include": "source.r" + } + ] + } + ] + }, + "commonmark-code-fenced-raku": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:perl\\x2d6|perl6|pod\\x2d6|(?:.*\\.)?(?:6pl|6pm|nqp|p6|p6l|p6m|pl6|pm6|pod|pod6|raku|rakumod)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.raku", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.raku.mdx", + "patterns": [ + { + "include": "source.raku" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:perl\\x2d6|perl6|pod\\x2d6|(?:.*\\.)?(?:6pl|6pm|nqp|p6|p6l|p6m|pl6|pm6|pod|pod6|raku|rakumod)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.raku", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.raku.mdx", + "patterns": [ + { + "include": "source.raku" + } + ] + } + ] + }, + "commonmark-code-fenced-ruby": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:jruby|macruby|(?:.*\\.)?(?:builder|druby|duby|eye|gemspec|god|jbuilder|mirah|mspec|pluginspec|podspec|prawn|rabl|rake|rb|rbi|rbuild|rbw|rbx|ru|ruby|thor|watchr)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.ruby", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.ruby.mdx", + "patterns": [ + { + "include": "source.ruby" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:jruby|macruby|(?:.*\\.)?(?:builder|druby|duby|eye|gemspec|god|jbuilder|mirah|mspec|pluginspec|podspec|prawn|rabl|rake|rb|rbi|rbuild|rbw|rbx|ru|ruby|thor|watchr)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.ruby", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.ruby.mdx", + "patterns": [ + { + "include": "source.ruby" + } + ] + } + ] + }, + "commonmark-code-fenced-rust": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:rust|(?:.*\\.)?(?:rs|rs\\.in)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.rust", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.rust.mdx", + "patterns": [ + { + "include": "source.rust" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:rust|(?:.*\\.)?(?:rs|rs\\.in)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.rust", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.rust.mdx", + "patterns": [ + { + "include": "source.rust" + } + ] + } + ] + }, + "commonmark-code-fenced-scala": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:(?:.*\\.)?(?:kojo|sbt|sc|scala)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.scala", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.scala.mdx", + "patterns": [ + { + "include": "source.scala" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:(?:.*\\.)?(?:kojo|sbt|sc|scala)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.scala", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.scala.mdx", + "patterns": [ + { + "include": "source.scala" + } + ] + } + ] + }, + "commonmark-code-fenced-scss": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:(?:.*\\.)?scss))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.scss", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.scss.mdx", + "patterns": [ + { + "include": "source.css.scss" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:(?:.*\\.)?scss))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.scss", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.scss.mdx", + "patterns": [ + { + "include": "source.css.scss" + } + ] + } + ] + }, + "commonmark-code-fenced-shell": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:abuild|alpine\\x2dabuild|apkbuild|gentoo\\x2debuild|gentoo\\x2declass|openrc|openrc\\x2drunscript|shell|shell\\x2dscript|(?:.*\\.)?(?:bash|bats|command|csh|ebuild|eclass|ksh|sh|sh\\.in|tcsh|tmux|tool|zsh|zsh\\x2dtheme)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.shell", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.shell.mdx", + "patterns": [ + { + "include": "source.shell" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:abuild|alpine\\x2dabuild|apkbuild|gentoo\\x2debuild|gentoo\\x2declass|openrc|openrc\\x2drunscript|shell|shell\\x2dscript|(?:.*\\.)?(?:bash|bats|command|csh|ebuild|eclass|ksh|sh|sh\\.in|tcsh|tmux|tool|zsh|zsh\\x2dtheme)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.shell", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.shell.mdx", + "patterns": [ + { + "include": "source.shell" + } + ] + } + ] + }, + "commonmark-code-fenced-shell-session": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:bash\\x2dsession|console|shellsession|(?:.*\\.)?sh\\x2dsession))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.shell-session", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.shell-session.mdx", + "patterns": [ + { + "include": "text.shell-session" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:bash\\x2dsession|console|shellsession|(?:.*\\.)?sh\\x2dsession))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.shell-session", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.shell-session.mdx", + "patterns": [ + { + "include": "text.shell-session" + } + ] + } + ] + }, + "commonmark-code-fenced-sql": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:plpgsql|sqlpl|(?:.*\\.)?(?:cql|db2|ddl|mysql|pgsql|prc|sql|sql|sql|tab|udf|viw)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.sql", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.sql.mdx", + "patterns": [ + { + "include": "source.sql" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:plpgsql|sqlpl|(?:.*\\.)?(?:cql|db2|ddl|mysql|pgsql|prc|sql|sql|sql|tab|udf|viw)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.sql", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.sql.mdx", + "patterns": [ + { + "include": "source.sql" + } + ] + } + ] + }, + "commonmark-code-fenced-svg": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:(?:.*\\.)?svg))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.svg", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.svg.mdx", + "patterns": [ + { + "include": "text.xml.svg" + }, + { + "include": "text.xml" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:(?:.*\\.)?svg))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.svg", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.svg.mdx", + "patterns": [ + { + "include": "text.xml.svg" + }, + { + "include": "text.xml" + } + ] + } + ] + }, + "commonmark-code-fenced-swift": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:(?:.*\\.)?swift))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.swift", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.swift.mdx", + "patterns": [ + { + "include": "source.swift" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:(?:.*\\.)?swift))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.swift", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.swift.mdx", + "patterns": [ + { + "include": "source.swift" + } + ] + } + ] + }, + "commonmark-code-fenced-toml": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:(?:.*\\.)?toml))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.toml", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.toml.mdx", + "patterns": [ + { + "include": "source.toml" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:(?:.*\\.)?toml))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.toml", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.toml.mdx", + "patterns": [ + { + "include": "source.toml" + } + ] + } + ] + }, + "commonmark-code-fenced-ts": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:typescript|(?:.*\\.)?(?:cts|mts|ts)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.ts", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.ts.mdx", + "patterns": [ + { + "include": "source.ts" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:typescript|(?:.*\\.)?(?:cts|mts|ts)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.ts", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.ts.mdx", + "patterns": [ + { + "include": "source.ts" + } + ] + } + ] + }, + "commonmark-code-fenced-tsx": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:(?:.*\\.)?tsx))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.tsx", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.tsx.mdx", + "patterns": [ + { + "include": "source.tsx" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:(?:.*\\.)?tsx))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.tsx", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.tsx.mdx", + "patterns": [ + { + "include": "source.tsx" + } + ] + } + ] + }, + "commonmark-code-fenced-vbnet": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:classic\\x2dvisual\\x2dbasic|fb|freebasic|realbasic|vb\\x2d\\.net|vb\\x2d6|vb\\.net|vb6|vbnet|vbscript|visual\\x2dbasic|visual\\x2dbasic\\x2d\\.net|visual\\x2dbasic\\x2d6|visual\\x2dbasic\\x2d6\\.0|visual\\x2dbasic\\x2dclassic|(?:.*\\.)?(?:bi|ctl|dsr|rbbas|rbfrm|rbmnu|rbres|rbtbar|rbuistate|vb|vbhtml|vbs)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.vbnet", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.vbnet.mdx", + "patterns": [ + { + "include": "source.vbnet" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:classic\\x2dvisual\\x2dbasic|fb|freebasic|realbasic|vb\\x2d\\.net|vb\\x2d6|vb\\.net|vb6|vbnet|vbscript|visual\\x2dbasic|visual\\x2dbasic\\x2d\\.net|visual\\x2dbasic\\x2d6|visual\\x2dbasic\\x2d6\\.0|visual\\x2dbasic\\x2dclassic|(?:.*\\.)?(?:bi|ctl|dsr|rbbas|rbfrm|rbmnu|rbres|rbtbar|rbuistate|vb|vbhtml|vbs)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.vbnet", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.vbnet.mdx", + "patterns": [ + { + "include": "source.vbnet" + } + ] + } + ] + }, + "commonmark-code-fenced-xml": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:collada|eagle|labview|web\\x2dontology\\x2dlanguage|xpages|(?:.*\\.)?(?:adml|admx|ant|axaml|axml|brd|builds|ccproj|ccxml|clixml|cproject|cscfg|csdef|csproj|ct|dae|depproj|dita|ditamap|ditaval|dll\\.config|dotsettings|filters|fsproj|fxml|glade|gmx|grxml|hzp|iml|ivy|jelly|jsproj|kml|launch|lvclass|lvlib|lvproj|mdpolicy|mjml|mxml|natvis|ndproj|nproj|nuspec|odd|osm|owl|pkgproj|proj|props|ps1xml|psc1|pt|qhelp|rdf|resx|rss|sch|sch|scxml|sfproj|shproj|srdf|storyboard|sublime\\x2dsnippet|targets|tml|ui|urdf|ux|vbproj|vcxproj|vsixmanifest|vssettings|vstemplate|vxml|wixproj|wsdl|wsf|wxi|wxl|wxs|x3d|xacro|xaml|xib|xlf|xliff|xmi|xml|xml\\.dist|xmp|xpl|xproc|xproj|xsd|xsp\\x2dconfig|xsp\\.metadata|xspec|xul|zcml)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.xml", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.xml.mdx", + "patterns": [ + { + "include": "text.xml" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:collada|eagle|labview|web\\x2dontology\\x2dlanguage|xpages|(?:.*\\.)?(?:adml|admx|ant|axaml|axml|brd|builds|ccproj|ccxml|clixml|cproject|cscfg|csdef|csproj|ct|dae|depproj|dita|ditamap|ditaval|dll\\.config|dotsettings|filters|fsproj|fxml|glade|gmx|grxml|hzp|iml|ivy|jelly|jsproj|kml|launch|lvclass|lvlib|lvproj|mdpolicy|mjml|mxml|natvis|ndproj|nproj|nuspec|odd|osm|owl|pkgproj|proj|props|ps1xml|psc1|pt|qhelp|rdf|resx|rss|sch|sch|scxml|sfproj|shproj|srdf|storyboard|sublime\\x2dsnippet|targets|tml|ui|urdf|ux|vbproj|vcxproj|vsixmanifest|vssettings|vstemplate|vxml|wixproj|wsdl|wsf|wxi|wxl|wxs|x3d|xacro|xaml|xib|xlf|xliff|xmi|xml|xml\\.dist|xmp|xpl|xproc|xproj|xsd|xsp\\x2dconfig|xsp\\.metadata|xspec|xul|zcml)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.xml", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.xml.mdx", + "patterns": [ + { + "include": "text.xml" + } + ] + } + ] + }, + "commonmark-code-fenced-yaml": { + "patterns": [ + { + "begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:jar\\x2dmanifest|kaitai\\x2dstruct|oasv2\\x2dyaml|oasv3\\x2dyaml|unity3d\\x2dasset|yaml|yml|(?:.*\\.)?(?:anim|asset|ksy|lkml|lookml|mat|meta|mir|prefab|raml|reek|rviz|sublime\\x2dsyntax|syntax|unity|yaml\\x2dtmlanguage|yaml\\.sed|yml\\.mysql)))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.yaml", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.yaml.mdx", + "patterns": [ + { + "include": "source.yaml" + } + ] + }, + { + "begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:jar\\x2dmanifest|kaitai\\x2dstruct|oasv2\\x2dyaml|oasv3\\x2dyaml|unity3d\\x2dasset|yaml|yml|(?:.*\\.)?(?:anim|asset|ksy|lkml|lookml|mat|meta|mir|prefab|raml|reek|rviz|sublime\\x2dsyntax|syntax|unity|yaml\\x2dtmlanguage|yaml\\.sed|yml\\.mysql)))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)", + "beginCaptures": { + "1": { + "name": "string.other.begin.code.fenced.mdx" + }, + "2": { + "name": "entity.name.function.mdx", + "patterns": [ + { + "include": "#markdown-string" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#markdown-string" + } + ] + } + }, + "contentName": "meta.embedded.yaml", + "end": "(?:^|\\G)[\\t ]*(\\1)(?:[\\t ]*$)", + "endCaptures": { + "1": { + "name": "string.other.end.code.fenced.mdx" + } + }, + "name": "markup.code.yaml.mdx", + "patterns": [ + { + "include": "source.yaml" + } + ] + } + ] + } + }, + "scopeName": "source.mdx" +} diff --git a/src/lib/shiki/languages/mermaid.tmLanguage.json b/src/lib/shiki/languages/mermaid.tmLanguage.json new file mode 100644 index 0000000..c05db71 --- /dev/null +++ b/src/lib/shiki/languages/mermaid.tmLanguage.json @@ -0,0 +1,1343 @@ +{ + "fileTypes": ["mermaid"], + "patterns": [ + { + "include": "#mermaid" + } + ], + "repository": { + "mermaid": { + "patterns": [ + { + "comment": "Class Diagram", + "begin": "^\\s*(classDiagram)", + "beginCaptures": { + "1": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "match": "\\%%.*", + "name": "comment" + }, + { + "comment": "(class name) (\"multiplicity relationship\")? (relationship) (\"multiplicity relationship\")? (class name) :? (labelText)?", + "match": "([\\w-]+)\\s(\"(?:\\d+|\\*|0..\\d+|1..\\d+|1..\\*)\")?\\s?(--o|--\\*|\\<--|--\\>|<\\.\\.|\\.\\.\\>|\\<\\|\\.\\.|\\.\\.\\|\\>|\\<\\|--|--\\|>|--\\*|--|\\.\\.|\\*--|o--)\\s(\"(?:\\d+|\\*|0..\\d+|1..\\d+|1..\\*)\")?\\s?([\\w-]+)\\s?(:)?\\s(.*)$", + "captures": { + "1": { + "name": "entity.name.type.class.mermaid" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "keyword.control.mermaid" + }, + "4": { + "name": "keyword.control.mermaid" + }, + "5": { + "name": "entity.name.type.class.mermaid" + }, + "6": { + "name": "keyword.control.mermaid" + }, + "7": { + "name": "string" + } + } + }, + { + "comment": "(class name) : (visibility)?(function)( (function param/generic param)? )(classifier)? (return/generic return)?$", + "match": "([\\w-]+)\\s?(:)\\s([\\+~#-])?([\\w-]+)(\\()([\\w-]+)?(~)?([\\w-]+)?(~)?\\s?([\\w-]+)?(\\))([*\\$])?\\s?([\\w-]+)?(~)?([\\w-]+)?(~)?$", + "captures": { + "1": { + "name": "entity.name.type.class.mermaid" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "keyword.control.mermaid" + }, + "4": { + "name": "entity.name.function.mermaid" + }, + "5": { + "name": "punctuation.parenthesis.open.mermaid" + }, + "6": { + "name": "storage.type.mermaid" + }, + "7": { + "name": "punctuation.definition.typeparameters.begin.mermaid" + }, + "8": { + "name": "storage.type.mermaid" + }, + "9": { + "name": "punctuation.definition.typeparameters.end.mermaid" + }, + "10": { + "name": "entity.name.variable.parameter.mermaid" + }, + "11": { + "name": "punctuation.parenthesis.closed.mermaid" + }, + "12": { + "name": "keyword.control.mermaid" + }, + "13": { + "name": "storage.type.mermaid" + }, + "14": { + "name": "punctuation.definition.typeparameters.begin.mermaid" + }, + "15": { + "name": "storage.type.mermaid" + }, + "16": { + "name": "punctuation.definition.typeparameters.end.mermaid" + } + } + }, + { + "comment": "(class name) : (visibility)?(datatype/generic data type) (attribute name)$", + "match": "([\\w-]+)\\s?(:)\\s([\\+~#-])?([\\w-]+)(~)?([\\w-]+)?(~)?\\s([\\w-]+)?$", + "captures": { + "1": { + "name": "entity.name.type.class.mermaid" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "keyword.control.mermaid" + }, + "4": { + "name": "storage.type.mermaid" + }, + "5": { + "name": "punctuation.definition.typeparameters.begin.mermaid" + }, + "6": { + "name": "storage.type.mermaid" + }, + "7": { + "name": "punctuation.definition.typeparameters.end.mermaid" + }, + "8": { + "name": "entity.name.variable.field.mermaid" + } + } + }, + { + "comment": "<<(Annotation)>> (class name)", + "match": "(<<)([\\w-]+)(>>)\\s?([\\w-]+)?", + "captures": { + "1": { + "name": "punctuation.definition.typeparameters.begin.mermaid" + }, + "2": { + "name": "storage.type.mermaid" + }, + "3": { + "name": "punctuation.definition.typeparameters.end.mermaid" + }, + "4": { + "name": "entity.name.type.class.mermaid" + } + } + }, + { + "comment": "class (class name) ~?(generic type)?~? ({)", + "begin": "(class)\\s+([\\w-]+)(~)?([\\w-]+)?(~)?\\s?({)", + "beginCaptures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "entity.name.type.class.mermaid" + }, + "3": { + "name": "punctuation.definition.typeparameters.begin.mermaid" + }, + "4": { + "name": "storage.type.mermaid" + }, + "5": { + "name": "punctuation.definition.typeparameters.end.mermaid" + }, + "6": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "match": "\\%%.*", + "name": "comment" + }, + { + "comment": "(visibility)?(function)( (function param/generic param)? )(classifier)? (return/generic return)?$", + "begin": "\\s([\\+~#-])?([\\w-]+)(\\()", + "beginCaptures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "entity.name.function.mermaid" + }, + "3": { + "name": "punctuation.parenthesis.open.mermaid" + } + }, + "patterns": [ + { + "comment": "(TBD)", + "match": "\\s*,?\\s*([\\w-]+)?(~)?([\\w-]+)?(~)?\\s?([\\w-]+)?", + "captures": { + "1": { + "name": "storage.type.mermaid" + }, + "2": { + "name": "punctuation.definition.typeparameters.begin.mermaid" + }, + "3": { + "name": "storage.type.mermaid" + }, + "4": { + "name": "punctuation.definition.typeparameters.end.mermaid" + }, + "5": { + "name": "entity.name.variable.parameter.mermaid" + } + } + } + ], + "end": "(\\))([*\\$])?\\s?([\\w-]+)?(~)?([\\w-]+)?(~)?$", + "endCaptures": { + "1": { + "name": "punctuation.parenthesis.closed.mermaid" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "storage.type.mermaid" + }, + "4": { + "name": "punctuation.definition.typeparameters.begin.mermaid" + }, + "5": { + "name": "storage.type.mermaid" + }, + "6": { + "name": "punctuation.definition.typeparameters.end.mermaid" + } + } + }, + { + "comment": "(visibility)?(datatype/generic data type) (attribute name)$", + "match": "\\s([\\+~#-])?([\\w-]+)(~)?([\\w-]+)?(~)?\\s([\\w-]+)?$", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "storage.type.mermaid" + }, + "3": { + "name": "punctuation.definition.typeparameters.begin.mermaid" + }, + "4": { + "name": "storage.type.mermaid" + }, + "5": { + "name": "punctuation.definition.typeparameters.end.mermaid" + }, + "6": { + "name": "entity.name.variable.field.mermaid" + } + } + }, + { + "comment": "<<(Annotation)>> (class name)", + "match": "(<<)([\\w-]+)(>>)\\s?([\\w-]+)?", + "captures": { + "1": { + "name": "punctuation.definition.typeparameters.begin.mermaid" + }, + "2": { + "name": "storage.type.mermaid" + }, + "3": { + "name": "punctuation.definition.typeparameters.end.mermaid" + }, + "4": { + "name": "entity.name.type.class.mermaid" + } + } + } + ], + "end": "(})", + "endCaptures": { + "1": { + "name": "keyword.control.mermaid" + } + } + }, + { + "comment": "class (class name) ~?(generic type)?~?", + "match": "(class)\\s+([\\w-]+)(~)?([\\w-]+)?(~)?", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "entity.name.type.class.mermaid" + }, + "3": { + "name": "punctuation.definition.typeparameters.begin.mermaid" + }, + "4": { + "name": "storage.type.mermaid" + }, + "5": { + "name": "punctuation.definition.typeparameters.end.mermaid" + } + } + } + ], + "end": "(^|\\G)(?=\\s*[`:~]{3,}\\s*$)" + }, + { + "comment": "Entity Relationship Diagram", + "begin": "^\\s*(erDiagram)", + "beginCaptures": { + "1": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "match": "\\%%.*", + "name": "comment" + }, + { + "comment": "(entity)", + "match": "^\\s*([\\w-]+)$", + "name": "variable" + }, + { + "comment": "(entity) {", + "begin": "\\s+([\\w-]+)\\s+({)", + "beginCaptures": { + "1": { + "name": "variable" + }, + "2": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "comment": "(type) (name) (PK|FK)? (\"comment\")?", + "match": "\\s*([\\w-]+)\\s+([\\w-]+)\\s+(PK|FK)?\\s*(\"[\"\\($&%\\^/#.,?!;:*+=<>\\'\\\\\\-\\w\\s]*\")?\\s*", + "captures": { + "1": { + "name": "storage.type.mermaid" + }, + "2": { + "name": "variable" + }, + "3": { + "name": "keyword.control.mermaid" + }, + "4": { + "name": "string" + } + } + } + ], + "end": "(})", + "endCaptures": { + "1": { + "name": "keyword.control.mermaid" + } + } + }, + { + "comment": "(entity) (relationship) (entity) : (label)", + "match": "\\s*([\\w-]+)\\s+((?:\\|o|\\|\\||}o|}\\|)(?:..|--)(?:o\\||\\|\\||o{|\\|{))\\s+([\\w-]+)\\s+(:)\\s+((?:\"[\\w\\s]*\")|(?:[\\w-]+))", + "captures": { + "1": { + "name": "variable" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "variable" + }, + "4": { + "name": "keyword.control.mermaid" + }, + "5": { + "name": "string" + } + } + } + ], + "end": "(^|\\G)(?=\\s*[`:~]{3,}\\s*$)" + }, + { + "comment": "Gantt Diagram", + "begin": "^\\s*(gantt)", + "beginCaptures": { + "1": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "match": "\\%%.*", + "name": "comment" + }, + { + "match": "(dateFormat)\\s+([\\w\\-\\.]+)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "entity.name.function.mermaid" + } + } + }, + { + "match": "(axisFormat)\\s+([\\w\\%\\/\\\\\\-\\.]+)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "entity.name.function.mermaid" + } + } + }, + { + "match": "(title)\\s+(\\s*[\"\\(\\)$&%\\^/#.,?!;:*+=<>\\'\\\\\\-\\w\\s]*)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "string" + } + } + }, + { + "match": "(excludes)\\s+((?:[\\d\\-,\\s]+|monday|tuesday|wednesday|thursday|friday|saturday|sunday|weekends)+)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "string" + } + } + }, + { + "match": "^\\s+(todayMarker)\\s+(.*)$", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "string" + } + } + }, + { + "match": "(section)\\s+(\\s*[\"\\(\\)$&%\\^/#.,?!;:*+=<>\\'\\\\\\-\\w\\s]*)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "string" + } + } + }, + { + "begin": "^\\s(.*)(:)", + "beginCaptures": { + "1": { + "name": "string" + }, + "2": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "match": "(crit|done|active|after)", + "name": "entity.name.function.mermaid" + }, + { + "match": "\\%%.*", + "name": "comment" + } + ], + "end": "$" + } + ], + "end": "(^|\\G)(?=\\s*[`:~]{3,}\\s*$)" + }, + { + "comment": "Git Graph", + "begin": "^\\s*(gitGraph)", + "beginCaptures": { + "1": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "match": "\\%%.*", + "name": "comment" + }, + { + "comment": "commit", + "begin": "\\s*(commit)", + "beginCaptures": { + "1": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "comment": "(id)(:) (\"id\")", + "match": "\\s*(id)(:)\\s?(\"[^\"\\n]*\")", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "string" + } + } + }, + { + "comment": "(type)(:) (COMMIT_TYPE)", + "match": "\\s*(type)(:)\\s?(NORMAL|REVERSE|HIGHLIGHT)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "entity.name.function.mermaid" + } + } + }, + { + "comment": "(tag)(:) (\"tag\")", + "match": "\\s*(tag)(:)\\s?(\"[\\($&%\\^/#.,?!;:*+=<>\\'\\\\\\-\\w\\s]*\")", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "string" + } + } + } + ], + "end": "$" + }, + { + "comment": "(checkout) (branch-name)", + "match": "\\s*(checkout)\\s*([^\\s\"]*)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "variable" + } + } + }, + { + "comment": "(branch) (branch-name) (order)?(:) (number)", + "match": "\\s*(branch)\\s*([^\\s\"]*)\\s*(?:(order)(:)\\s?(\\d+))?", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "variable" + }, + "3": { + "name": "keyword.control.mermaid" + }, + "4": { + "name": "keyword.control.mermaid" + }, + "5": { + "name": "constant.numeric.decimal.mermaid" + } + } + }, + { + "comment": "(merge) (branch-name) (tag: \"tag-name\")?", + "match": "\\s*(merge)\\s*([^\\s\"]*)\\s*(?:(tag)(:)\\s?(\"[^\"\\n]*\"))?", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "variable" + }, + "3": { + "name": "keyword.control.mermaid" + }, + "4": { + "name": "keyword.control.mermaid" + }, + "5": { + "name": "string" + } + } + }, + { + "comment": "(cherry-pick) (id)(:)(\"commit-id\")", + "match": "\\s*(cherry-pick)\\s+(id)(:)\\s*(\"[^\"\\n]*\")", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "keyword.control.mermaid" + }, + "4": { + "name": "string" + } + } + } + ], + "end": "(^|\\G)(?=\\s*[`:~]{3,}\\s*$)" + }, + { + "comment": "Graph", + "begin": "^\\s*(graph|flowchart)\\s+([\\p{Letter}\\ 0-9]+)", + "beginCaptures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "entity.name.function.mermaid" + } + }, + "patterns": [ + { + "match": "\\%%.*", + "name": "comment" + }, + { + "match": "\\b(subgraph)\\s+([\\p{Letter}\\ 0-9]+)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "entity.name.function.mermaid" + } + }, + "name": "meta.function.mermaid" + }, + { + "match": "\\b(end|RB|BT|RL|TD|LR)\\b", + "name": "keyword.control.mermaid" + }, + { + "comment": "(Entity)(Edge/Shape)(Text)(Edge/Shape)", + "begin": "(\\b(?:(?!--|==)[-\\w])+\\b\\s*)(\\(\\[|\\[\\[|\\[\\(|\\[|\\(+|\\>|\\{|\\(\\()", + "beginCaptures": { + "1": { + "name": "variable" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "string" + } + }, + "patterns": [ + { + "comment": "(\"multi-line text\")", + "begin": "\\s*(\")", + "beginCaptures": { + "1": { + "name": "string" + } + }, + "patterns": [ + { + "comment": "capture inner text between quotes", + "begin": "([^\"]*)", + "beginCaptures": { + "1": { + "name": "string" + } + }, + "patterns": [ + { + "match": "([^\"]*)", + "captures": { + "1": { + "name": "comment" + } + } + } + ], + "end": "(?=\")" + } + ], + "end": "(\")", + "endCaptures": { + "1": { + "name": "string" + } + } + }, + { + "comment": "(single line text)", + "match": "\\s*([$&%\\^/#.,?!;:*+<>_\\'\\\\\\w\\s]+)", + "captures": { + "1": { + "name": "string" + } + } + } + ], + "end": "(\\]\\)|\\]\\]|\\)\\]|\\]|\\)+|\\}|\\)\\))", + "endCaptures": { + "1": { + "name": "keyword.control.mermaid" + } + } + }, + { + "comment": "(Graph Link)(\"Multiline text\")(Graph Link)", + "begin": "\\s*((?:-{2,5}|={2,5})[xo>]?\\|)", + "beginCaptures": { + "1": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "comment": "(\"multi-line text\")", + "begin": "\\s*(\")", + "beginCaptures": { + "1": { + "name": "string" + } + }, + "patterns": [ + { + "comment": "capture inner text between quotes", + "begin": "([^\"]*)", + "beginCaptures": { + "1": { + "name": "string" + } + }, + "patterns": [ + { + "match": "([^\"]*)", + "captures": { + "1": { + "name": "comment" + } + } + } + ], + "end": "(?=\")" + } + ], + "end": "(\")", + "endCaptures": { + "1": { + "name": "string" + } + } + }, + { + "comment": "(single line text)", + "match": "\\s*([$&%\\^/#.,?!;:*+<>_\\'\\\\\\w\\s]+)", + "captures": { + "1": { + "name": "string" + } + } + } + ], + "end": "(\\|)", + "endCaptures": { + "1": { + "name": "keyword.control.mermaid" + } + } + }, + { + "comment": "(Graph Link Start Arrow)(Text)(Graph Link End Arrow)", + "match": "\\s*([xo<]?(?:-{2,5}|={2,5}|-\\.{1,3}|-\\.))((?:(?!--|==)[\\w\\s*+%=\\\\/:\\.\\-'`,\"&^#$!?])*)((?:-{2,5}|={2,5}|\\.{1,3}-|\\.-)[xo>]?)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "string" + }, + "3": { + "name": "keyword.control.mermaid" + } + } + }, + { + "comment": "(Graph Link)", + "match": "\\s*([ox<]?(?:-.{1,3}-|-{1,3}|={1,3})[ox>]?)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + } + } + }, + { + "comment": "Entity", + "match": "(\\b(?:(?!--|==)[-\\w])+\\b\\s*)", + "name": "variable" + }, + { + "comment": "(Class)(Node(s))(ClassName)", + "match": "\\s*(class)\\s+(\\b[-,\\w]+)\\s+(\\b\\w+\\b)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "variable" + }, + "3": { + "name": "string" + } + } + }, + { + "comment": "(ClassDef)(ClassName)(Styles)", + "match": "\\s*(classDef)\\s+(\\b\\w+\\b)\\s+(\\b[-,:;#\\w]+)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "variable" + }, + "3": { + "name": "string" + } + } + }, + { + "comment": "(Click)(Entity)(Link)?(Tooltip)", + "match": "\\s*(click)\\s+(\\b[-\\w]+\\b\\s*)(\\b\\w+\\b)?\\s(\"*.*\")", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "variable" + }, + "3": { + "name": "variable" + }, + "4": { + "name": "string" + } + } + } + ], + "end": "(^|\\G)(?=\\s*[`:~]{3,}\\s*$)" + }, + { + "comment": "Pie Chart", + "begin": "^\\s*(pie)", + "beginCaptures": { + "1": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "match": "\\%%.*", + "name": "comment" + }, + { + "match": "(title)\\s+(\\s*[\"\\(\\)$&%\\^/#.,?!;:*+=<>\\'\\\\\\-\\w\\s]*)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "string" + } + } + }, + { + "begin": "\\s(.*)(:)", + "beginCaptures": { + "1": { + "name": "string" + }, + "2": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "match": "\\%%.*", + "name": "comment" + } + ], + "end": "$" + } + ], + "end": "(^|\\G)(?=\\s*[`:~]{3,}\\s*$)" + }, + { + "comment": "Sequence Diagram", + "begin": "^\\s*(sequenceDiagram)", + "beginCaptures": { + "1": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "match": "(\\%%|#).*", + "name": "comment" + }, + { + "comment": "(title)(title text)", + "match": "(title)\\s*(:)?\\s+(\\s*[\"\\(\\)$&%\\^/#.,?!:*+=<>\\'\\\\\\-\\w\\s]*)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "string" + } + } + }, + { + "comment": "(participant)(Actor)(as)?(Label)?", + "match": "\\s*(participant|actor)\\s+((?:(?! as )[\"\\(\\)$&%\\^/#.?!*=<>\\'\\\\\\w\\s])+)\\s*(as)?\\s([\"\\(\\)$&%\\^/#.,?!*=<>\\'\\\\\\w\\s]+)?", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "variable" + }, + "3": { + "name": "keyword.control.mermaid" + }, + "4": { + "name": "string" + } + } + }, + { + "comment": "(activate/deactivate)(Actor)", + "match": "\\s*((?:de)?activate)\\s+(\\b[\"\\(\\)$&%\\^/#.?!*=<>\\'\\\\\\w\\s]+\\b\\s*)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "variable" + } + } + }, + { + "comment": "(Note)(direction)(Actor)(,)?(Actor)?(:)(Message)", + "match": "\\s*(Note)\\s+((?:left|right)\\sof|over)\\s+(\\b[\"\\(\\)$&%\\^/#.?!*=<>\\'\\\\\\w\\s]+\\b\\s*)(,)?(\\b[\"\\(\\)$&%\\^/#.?!*=<>\\'\\\\\\w\\s]+\\b\\s*)?(:)(?:\\s+([^;#]*))?", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "entity.name.function.mermaid" + }, + "3": { + "name": "variable" + }, + "4": { + "name": "keyword.control.mermaid" + }, + "5": { + "name": "variable" + }, + "6": { + "name": "keyword.control.mermaid" + }, + "7": { + "name": "string" + } + } + }, + { + "comment": "(loop)(loop text)", + "match": "\\s*(loop)(?:\\s+([^;#]*))?", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "string" + } + } + }, + { + "comment": "(end)", + "match": "\\s*(end)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + } + } + }, + { + "comment": "(alt/else/opt/par/and/autonumber)(text)", + "match": "\\s*(alt|else|opt|par|and|rect|autonumber)(?:\\s+([^#;]*))?", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "string" + } + } + }, + { + "comment": "(Actor)(Arrow)(Actor)(:)(Message)", + "match": "\\s*(\\b[\"\\(\\)$&%\\^/#.?!*=<>\\'\\\\\\w\\s]+\\b)\\s*(-?-(?:\\>|x|\\))\\>?[+-]?)\\s*([\"\\(\\)$&%\\^/#.?!*=<>\\'\\\\\\w\\s]+\\b)\\s*(:)\\s*([^;#]*)", + "captures": { + "1": { + "name": "variable" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "variable" + }, + "4": { + "name": "keyword.control.mermaid" + }, + "5": { + "name": "string" + } + } + } + ], + "end": "(^|\\G)(?=\\s*[`:~]{3,}\\s*$)" + }, + { + "comment": "State Diagram", + "begin": "^\\s*(stateDiagram(?:-v2)?)", + "beginCaptures": { + "1": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "match": "\\%%.*", + "name": "comment" + }, + { + "comment": "}", + "match": "\\s+(})\\s+", + "captures": { + "1": { + "name": "keyword.control.mermaid" + } + } + }, + { + "comment": "--", + "match": "\\s+(--)\\s+", + "captures": { + "1": { + "name": "keyword.control.mermaid" + } + } + }, + { + "comment": "(state)", + "match": "^\\s*([\\w-]+)$", + "name": "variable" + }, + { + "comment": "(state) : (description)", + "match": "([\\w-]+)\\s+(:)\\s+(\\s*[-\\w\\s]+\\b)", + "captures": { + "1": { + "name": "variable" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "string" + } + } + }, + { + "comment": "state", + "begin": "(state)", + "beginCaptures": { + "1": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "comment": "\"(description)\" as (state)", + "match": "\\s+(\"[-\\w\\s]+\\b\")\\s+(as)\\s+([\\w-]+)", + "captures": { + "1": { + "name": "string" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "variable" + } + } + }, + { + "comment": "(state name) {", + "match": "\\s+([\\w-]+)\\s+({)", + "captures": { + "1": { + "name": "variable" + }, + "2": { + "name": "keyword.control.mermaid" + } + } + }, + { + "comment": "(state name) <<fork|join>>", + "match": "\\s+([\\w-]+)\\s+(<<(?:fork|join)>>)", + "captures": { + "1": { + "name": "variable" + }, + "2": { + "name": "keyword.control.mermaid" + } + } + } + ], + "end": "$" + }, + { + "comment": "(state) -->", + "begin": "([\\w-]+)\\s+(-->)", + "beginCaptures": { + "1": { + "name": "variable" + }, + "2": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "comment": "(state) (:)? (transition text)?", + "match": "\\s+([\\w-]+)\\s*(:)?\\s*([^\\n:]+)?", + "captures": { + "1": { + "name": "variable" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "string" + } + } + }, + { + "comment": "[*] (:)? (transition text)?", + "match": "(\\[\\*\\])\\s*(:)?\\s*([^\\n:]+)?", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "string" + } + } + } + ], + "end": "$" + }, + { + "comment": "[*] --> (state) (:)? (transition text)?", + "match": "(\\[\\*\\])\\s+(-->)\\s+([\\w-]+)\\s*(:)?\\s*([^\\n:]+)?", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "variable" + }, + "4": { + "name": "keyword.control.mermaid" + }, + "5": { + "name": "string" + } + } + }, + { + "comment": "note left|right of (state name)", + "match": "(note (?:left|right) of)\\s+([\\w-]+)\\s+(:)\\s*([^\\n:]+)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "variable" + }, + "3": { + "name": "keyword.control.mermaid" + }, + "4": { + "name": "string" + } + } + }, + { + "comment": "note left|right of (state name) (note text) end note", + "begin": "(note (?:left|right) of)\\s+([\\w-]+)(.|\\n)", + "beginCaptures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "variable" + } + }, + "contentName": "string", + "end": "(end note)", + "endCaptures": { + "1": { + "name": "keyword.control.mermaid" + } + } + } + ], + "end": "(^|\\G)(?=\\s*[`:~]{3,}\\s*$)" + }, + { + "comment": "User Journey", + "begin": "^\\s*(journey)", + "beginCaptures": { + "1": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "match": "\\%%.*", + "name": "comment" + }, + { + "match": "(title|section)\\s+(\\s*[\"\\(\\)$&%\\^/#.,?!;:*+=<>\\'\\\\\\-\\w\\s]*)", + "captures": { + "1": { + "name": "keyword.control.mermaid" + }, + "2": { + "name": "string" + } + } + }, + { + "begin": "\\s*([\"\\(\\)$&%\\^/.,?!*+=<>\\'\\\\\\-\\w\\s]*)\\s*(:)\\s*(\\d+)\\s*(:)", + "beginCaptures": { + "1": { + "name": "string" + }, + "2": { + "name": "keyword.control.mermaid" + }, + "3": { + "name": "constant.numeric.decimal.mermaid" + }, + "4": { + "name": "keyword.control.mermaid" + } + }, + "patterns": [ + { + "comment": "(taskName)", + "match": "\\s*,?\\s*([^,#\\n]+)", + "captures": { + "1": { + "name": "variable" + } + } + } + ], + "end": "$" + } + ], + "end": "(^|\\G)(?=\\s*[`:~]{3,}\\s*$)" + } + ] + } + }, + "scopeName": "source.mermaid", + "name": "mermaid" +} diff --git a/src/lib/shiki/languages/mojo.tmLanguage.json b/src/lib/shiki/languages/mojo.tmLanguage.json new file mode 100644 index 0000000..6caa67b --- /dev/null +++ b/src/lib/shiki/languages/mojo.tmLanguage.json @@ -0,0 +1,4131 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/MagicStack/MagicPython/blob/master/grammars/MagicPython.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/MagicStack/MagicPython/commit/7d0f2b22a5ad8fccbd7341bc7b7a715169283044", + "name": "mojo", + "scopeName": "source.mojo", + "patterns": [ + { + "include": "#statement" + }, + { + "include": "#expression" + } + ], + "repository": { + "impossible": { + "comment": "This is a special rule that should be used where no match is desired. It is not a good idea to match something like '1{0}' because in some cases that can result in infinite loops in token generation. So the rule instead matches and impossible expression to allow a match to fail and move to the next token.", + "match": "$.^" + }, + "statement": { + "patterns": [ + { + "include": "#import" + }, + { + "include": "#class-declaration" + }, + { + "include": "#function-declaration" + }, + { + "include": "#generator" + }, + { + "include": "#statement-keyword" + }, + { + "include": "#assignment-operator" + }, + { + "include": "#decorator" + }, + { + "include": "#semicolon" + } + ] + }, + "semicolon": { + "patterns": [ + { + "name": "invalid.deprecated.semicolon.python", + "match": "\\;$" + } + ] + }, + "comments": { + "patterns": [ + { + "name": "comment.line.number-sign.python", + "contentName": "meta.typehint.comment.python", + "begin": "(?x)\n (?:\n \\# \\s* (type:)\n \\s*+ (?# we want `\\s*+` which is possessive quantifier since\n we do not actually want to backtrack when matching\n whitespace here)\n (?! $ | \\#)\n )\n", + "end": "(?:$|(?=\\#))", + "beginCaptures": { + "0": { + "name": "meta.typehint.comment.python" + }, + "1": { + "name": "comment.typehint.directive.notation.python" + } + }, + "patterns": [ + { + "name": "comment.typehint.ignore.notation.python", + "match": "(?x)\n \\G ignore\n (?= \\s* (?: $ | \\#))\n" + }, + { + "name": "comment.typehint.type.notation.python", + "match": "(?x)\n (?<!\\.)\\b(\n bool | bytes | float | int | object | str\n | List | Dict | Iterable | Sequence | Set\n | FrozenSet | Callable | Union | Tuple\n | Any | None\n )\\b\n" + }, + { + "name": "comment.typehint.punctuation.notation.python", + "match": "([\\[\\]\\(\\),\\.\\=\\*]|(->))" + }, + { + "name": "comment.typehint.variable.notation.python", + "match": "([[:alpha:]_]\\w*)" + } + ] + }, + { + "include": "#comments-base" + } + ] + }, + "statement-keyword": { + "patterns": [ + { + "name": "storage.type.function.python", + "match": "\\b((async\\s+)?\\s*def)\\b" + }, + { + "name": "keyword.control.flow.python", + "comment": "if `as` is eventually followed by `:` or line continuation\nit's probably control flow like:\n with foo as bar, \\\n Foo as Bar:\n try:\n do_stuff()\n except Exception as e:\n pass\n", + "match": "\\b(?<!\\.)as\\b(?=.*[:\\\\])" + }, + { + "name": "keyword.control.import.python", + "comment": "other legal use of `as` is in an import", + "match": "\\b(?<!\\.)as\\b" + }, + { + "name": "keyword.control.flow.python", + "match": "(?x)\n \\b(?<!\\.)(\n async | continue | del | assert | break | finally | for\n | from | elif | else | if | except | pass | raise\n | return | try | while | with\n )\\b\n" + }, + { + "name": "storage.modifier.declaration.python", + "match": "(?x)\n \\b(?<!\\.)(\n global | nonlocal\n )\\b\n" + }, + { + "name": "storage.type.class.python", + "match": "\\b(?<!\\.)(class|struct)\\b" + }, + { + "match": "(?x)\n ^\\s*(\n case | match\n )(?=\\s*([-+\\w\\d(\\[{'\":#]|$))\\b\n", + "captures": { + "1": { + "name": "keyword.control.flow.python" + } + } + }, + { + "match": "\\b(var|let|alias) \\s*([[:alpha:]_]\\w*)\\b", + "captures": { + "1": { + "name": "storage.modifier.declaration.python" + }, + "2": { + "name": "variable.other.python" + } + } + } + ] + }, + "expression-bare": { + "comment": "valid Python expressions w/o comments and line continuation", + "patterns": [ + { + "include": "#backticks" + }, + { + "include": "#illegal-anno" + }, + { + "include": "#literal" + }, + { + "include": "#regexp" + }, + { + "include": "#string" + }, + { + "include": "#lambda" + }, + { + "include": "#generator" + }, + { + "include": "#illegal-operator" + }, + { + "include": "#operator" + }, + { + "include": "#curly-braces" + }, + { + "include": "#item-access" + }, + { + "include": "#list" + }, + { + "include": "#odd-function-call" + }, + { + "include": "#round-braces" + }, + { + "include": "#function-call" + }, + { + "include": "#builtin-functions" + }, + { + "include": "#builtin-types" + }, + { + "include": "#builtin-exceptions" + }, + { + "include": "#magic-names" + }, + { + "include": "#special-names" + }, + { + "include": "#illegal-names" + }, + { + "include": "#special-variables" + }, + { + "include": "#ellipsis" + }, + { + "include": "#punctuation" + }, + { + "include": "#line-continuation" + } + ] + }, + "expression-base": { + "comment": "valid Python expressions with comments and line continuation", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#expression-bare" + }, + { + "include": "#line-continuation" + } + ] + }, + "expression": { + "comment": "All valid Python expressions", + "patterns": [ + { + "include": "#expression-base" + }, + { + "include": "#member-access" + }, + { + "comment": "Tokenize identifiers to help linters", + "match": "(?x) \\b ([[:alpha:]_]\\w*) \\b" + } + ] + }, + "member-access": { + "name": "meta.member.access.python", + "begin": "(\\.)\\s*(?!\\.)", + "end": "(?x)\n # stop when you've just read non-whitespace followed by non-word\n # i.e. when finished reading an identifier or function call\n (?<=\\S)(?=\\W) |\n # stop when seeing the start of something that's not a word,\n # i.e. when seeing a non-identifier\n (^|(?<=\\s))(?=[^\\\\\\w\\s]) |\n $\n", + "beginCaptures": { + "1": { + "name": "punctuation.separator.period.python" + } + }, + "patterns": [ + { + "include": "#function-call" + }, + { + "include": "#member-access-base" + }, + { + "include": "#member-access-attribute" + } + ] + }, + "member-access-base": { + "patterns": [ + { + "include": "#magic-names" + }, + { + "include": "#illegal-names" + }, + { + "include": "#illegal-object-name" + }, + { + "include": "#special-names" + }, + { + "include": "#line-continuation" + }, + { + "include": "#item-access" + } + ] + }, + "member-access-attribute": { + "comment": "Highlight attribute access in otherwise non-specialized cases.", + "name": "meta.attribute.python", + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" + }, + "special-names": { + "name": "constant.other.caps.python", + "match": "(?x)\n \\b\n # we want to see \"enough\", meaning 2 or more upper-case\n # letters in the beginning of the constant\n #\n # for more details refer to:\n # https://github.com/MagicStack/MagicPython/issues/42\n (\n _* [[:upper:]] [_\\d]* [[:upper:]]\n )\n [[:upper:]\\d]* (_\\w*)?\n \\b\n" + }, + "curly-braces": { + "begin": "\\{", + "end": "\\}", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dict.begin.python" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.dict.end.python" + } + }, + "patterns": [ + { + "name": "punctuation.separator.dict.python", + "match": ":" + }, + { + "include": "#expression" + } + ] + }, + "list": { + "begin": "\\[", + "end": "\\]", + "beginCaptures": { + "0": { + "name": "punctuation.definition.list.begin.python" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.list.end.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "odd-function-call": { + "comment": "A bit obscured function call where there may have been an\narbitrary number of other operations to get the function.\nE.g. \"arr[idx](args)\"\n", + "begin": "(?x)\n (?<= \\] | \\) ) \\s*\n (?=\\()\n", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + } + }, + "patterns": [ + { + "include": "#function-arguments" + } + ] + }, + "round-braces": { + "begin": "\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.begin.python" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.end.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "line-continuation": { + "patterns": [ + { + "match": "(\\\\)\\s*(\\S.*$\\n?)", + "captures": { + "1": { + "name": "punctuation.separator.continuation.line.python" + }, + "2": { + "name": "invalid.illegal.line.continuation.python" + } + } + }, + { + "begin": "(\\\\)\\s*$\\n?", + "end": "(?x)\n (?=^\\s*$)\n |\n (?! (\\s* [rR]? (\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))\n |\n (\\G $) (?# '\\G' is necessary for ST)\n )\n", + "beginCaptures": { + "1": { + "name": "punctuation.separator.continuation.line.python" + } + }, + "patterns": [ + { + "include": "#regexp" + }, + { + "include": "#string" + } + ] + } + ] + }, + "assignment-operator": { + "name": "keyword.operator.assignment.python", + "match": "(?x)\n <<= | >>= | //= | \\*\\*=\n | \\+= | -= | /= | @=\n | \\*= | %= | ~= | \\^= | &= | \\|=\n | =(?!=)\n" + }, + "operator": { + "match": "(?x)\n \\b(?<!\\.)\n (?:\n (and | or | not | in | is) (?# 1)\n |\n (for | if | else | await | (?:yield(?:\\s+from)?)) (?# 2)\n )\n (?!\\s*:)\\b\n\n | (<< | >> | & | \\| | \\^ | ~) (?# 3)\n\n | (\\*\\* | \\* | \\+ | - | % | // | / | @) (?# 4)\n\n | (!= | == | >= | <= | < | >) (?# 5)\n\n | (:=) (?# 6)\n", + "captures": { + "1": { + "name": "keyword.operator.logical.python" + }, + "2": { + "name": "keyword.control.flow.python" + }, + "3": { + "name": "keyword.operator.bitwise.python" + }, + "4": { + "name": "keyword.operator.arithmetic.python" + }, + "5": { + "name": "keyword.operator.comparison.python" + }, + "6": { + "name": "keyword.operator.assignment.python" + } + } + }, + "punctuation": { + "patterns": [ + { + "name": "punctuation.separator.colon.python", + "match": ":" + }, + { + "name": "punctuation.separator.element.python", + "match": "," + } + ] + }, + "literal": { + "patterns": [ + { + "name": "constant.language.python", + "match": "\\b(True|False|None|NotImplemented|Ellipsis)\\b" + }, + { + "include": "#number" + } + ] + }, + "number": { + "name": "constant.numeric.python", + "patterns": [ + { + "include": "#number-float" + }, + { + "include": "#number-dec" + }, + { + "include": "#number-hex" + }, + { + "include": "#number-oct" + }, + { + "include": "#number-bin" + }, + { + "include": "#number-long" + }, + { + "name": "invalid.illegal.name.python", + "match": "\\b[0-9]+\\w+" + } + ] + }, + "number-float": { + "name": "constant.numeric.float.python", + "match": "(?x)\n (?<! \\w)(?:\n (?:\n \\.[0-9](?: _?[0-9] )*\n |\n [0-9](?: _?[0-9] )* \\. [0-9](?: _?[0-9] )*\n |\n [0-9](?: _?[0-9] )* \\.\n ) (?: [eE][+-]?[0-9](?: _?[0-9] )* )?\n |\n [0-9](?: _?[0-9] )* (?: [eE][+-]?[0-9](?: _?[0-9] )* )\n )([jJ])?\\b\n", + "captures": { + "1": { + "name": "storage.type.imaginary.number.python" + } + } + }, + "number-dec": { + "name": "constant.numeric.dec.python", + "match": "(?x)\n (?<![\\w\\.])(?:\n [1-9](?: _?[0-9] )*\n |\n 0+\n |\n [0-9](?: _?[0-9] )* ([jJ])\n |\n 0 ([0-9]+)(?![eE\\.])\n )\\b\n", + "captures": { + "1": { + "name": "storage.type.imaginary.number.python" + }, + "2": { + "name": "invalid.illegal.dec.python" + } + } + }, + "number-hex": { + "name": "constant.numeric.hex.python", + "match": "(?x)\n (?<![\\w\\.])\n (0[xX]) (_?[0-9a-fA-F])+\n \\b\n", + "captures": { + "1": { + "name": "storage.type.number.python" + } + } + }, + "number-oct": { + "name": "constant.numeric.oct.python", + "match": "(?x)\n (?<![\\w\\.])\n (0[oO]) (_?[0-7])+\n \\b\n", + "captures": { + "1": { + "name": "storage.type.number.python" + } + } + }, + "number-bin": { + "name": "constant.numeric.bin.python", + "match": "(?x)\n (?<![\\w\\.])\n (0[bB]) (_?[01])+\n \\b\n", + "captures": { + "1": { + "name": "storage.type.number.python" + } + } + }, + "number-long": { + "name": "constant.numeric.bin.python", + "comment": "this is to support python2 syntax for long ints", + "match": "(?x)\n (?<![\\w\\.])\n ([1-9][0-9]* | 0) ([lL])\n \\b\n", + "captures": { + "2": { + "name": "storage.type.number.python" + } + } + }, + "regexp": { + "patterns": [ + { + "include": "#regexp-single-three-line" + }, + { + "include": "#regexp-double-three-line" + }, + { + "include": "#regexp-single-one-line" + }, + { + "include": "#regexp-double-one-line" + } + ] + }, + "string": { + "patterns": [ + { + "include": "#string-quoted-multi-line" + }, + { + "include": "#string-quoted-single-line" + }, + { + "include": "#string-bin-quoted-multi-line" + }, + { + "include": "#string-bin-quoted-single-line" + }, + { + "include": "#string-raw-quoted-multi-line" + }, + { + "include": "#string-raw-quoted-single-line" + }, + { + "include": "#string-raw-bin-quoted-multi-line" + }, + { + "include": "#string-raw-bin-quoted-single-line" + }, + { + "include": "#fstring-fnorm-quoted-multi-line" + }, + { + "include": "#fstring-fnorm-quoted-single-line" + }, + { + "include": "#fstring-normf-quoted-multi-line" + }, + { + "include": "#fstring-normf-quoted-single-line" + }, + { + "include": "#fstring-raw-quoted-multi-line" + }, + { + "include": "#fstring-raw-quoted-single-line" + } + ] + }, + "string-unicode-guts": { + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#string-entity" + }, + { + "include": "#string-brace-formatting" + } + ] + }, + "string-consume-escape": { + "match": "\\\\['\"\\n\\\\]" + }, + "string-raw-guts": { + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#string-formatting" + }, + { + "include": "#string-brace-formatting" + } + ] + }, + "string-raw-bin-guts": { + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#string-formatting" + } + ] + }, + "string-entity": { + "patterns": [ + { + "include": "#escape-sequence" + }, + { + "include": "#string-line-continuation" + }, + { + "include": "#string-formatting" + } + ] + }, + "fstring-guts": { + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#escape-sequence" + }, + { + "include": "#string-line-continuation" + }, + { + "include": "#fstring-formatting" + } + ] + }, + "fstring-raw-guts": { + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#fstring-formatting" + } + ] + }, + "fstring-illegal-single-brace": { + "comment": "it is illegal to have a multiline brace inside a single-line string", + "begin": "(\\{)(?=[^\\n}]*$\\n?)", + "end": "(\\})|(?=\\n)", + "beginCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "endCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "patterns": [ + { + "include": "#fstring-terminator-single" + }, + { + "include": "#f-expression" + } + ] + }, + "fstring-illegal-multi-brace": { + "patterns": [ + { + "include": "#impossible" + } + ] + }, + "f-expression": { + "comment": "All valid Python expressions, except comments and line continuation", + "patterns": [ + { + "include": "#expression-bare" + }, + { + "include": "#member-access" + }, + { + "comment": "Tokenize identifiers to help linters", + "match": "(?x) \\b ([[:alpha:]_]\\w*) \\b" + } + ] + }, + "escape-sequence-unicode": { + "patterns": [ + { + "name": "constant.character.escape.python", + "match": "(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n | N\\{[\\w\\s]+?\\}\n )\n" + } + ] + }, + "escape-sequence": { + "name": "constant.character.escape.python", + "match": "(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | [0-7]{1,3}\n | [\\\\\"'abfnrtv]\n )\n" + }, + "string-line-continuation": { + "name": "constant.language.python", + "match": "\\\\$" + }, + "string-formatting": { + "name": "meta.format.percent.python", + "match": "(?x)\n (\n % (\\([\\w\\s]*\\))?\n [-+#0 ]*\n (\\d+|\\*)? (\\.(\\d+|\\*))?\n ([hlL])?\n [diouxXeEfFgGcrsab%]\n )\n", + "captures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + } + }, + "string-brace-formatting": { + "patterns": [ + { + "name": "meta.format.brace.python", + "match": "(?x)\n (\n {{ | }}\n | (?:\n {\n \\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'\"]+\\])*\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?\n })\n )\n", + "captures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + }, + "3": { + "name": "storage.type.format.python" + }, + "4": { + "name": "storage.type.format.python" + } + } + }, + { + "name": "meta.format.brace.python", + "match": "(?x)\n (\n {\n \\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'\"]+\\])*\n (![rsa])?\n (:)\n [^'\"{}\\n]* (?:\n \\{ [^'\"}\\n]*? \\} [^'\"{}\\n]*\n )*\n }\n )\n", + "captures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + }, + "3": { + "name": "storage.type.format.python" + }, + "4": { + "name": "storage.type.format.python" + } + } + } + ] + }, + "fstring-formatting": { + "patterns": [ + { + "include": "#fstring-formatting-braces" + }, + { + "include": "#fstring-formatting-singe-brace" + } + ] + }, + "fstring-formatting-singe-brace": { + "name": "invalid.illegal.brace.python", + "match": "(}(?!}))" + }, + "import": { + "comment": "Import statements used to correctly mark `from`, `import`, and `as`\n", + "patterns": [ + { + "begin": "\\b(?<!\\.)(from)\\b(?=.+import)", + "end": "$|(?=import)", + "beginCaptures": { + "1": { + "name": "keyword.control.import.python" + } + }, + "patterns": [ + { + "name": "punctuation.separator.period.python", + "match": "\\.+" + }, + { + "include": "#expression" + } + ] + }, + { + "begin": "\\b(?<!\\.)(import)\\b", + "end": "$", + "beginCaptures": { + "1": { + "name": "keyword.control.import.python" + } + }, + "patterns": [ + { + "name": "keyword.control.import.python", + "match": "\\b(?<!\\.)as\\b" + }, + { + "include": "#expression" + } + ] + } + ] + }, + "class-declaration": { + "patterns": [ + { + "name": "meta.class.python", + "begin": "(?x)\n \\s*(class|struct)\\s+\n (?=\n [[:alpha:]_]\\w* \\s* (:|\\()\n )\n", + "end": "(:)", + "beginCaptures": { + "1": { + "name": "storage.type.class.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.section.class.begin.python" + } + }, + "patterns": [ + { + "include": "#class-name" + }, + { + "include": "#class-inheritance" + } + ] + } + ] + }, + "class-name": { + "patterns": [ + { + "include": "#illegal-object-name" + }, + { + "include": "#builtin-possible-callables" + }, + { + "name": "entity.name.type.class.python", + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" + } + ] + }, + "class-inheritance": { + "name": "meta.class.inheritance.python", + "begin": "(\\()", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.inheritance.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.inheritance.end.python" + } + }, + "patterns": [ + { + "name": "keyword.operator.unpacking.arguments.python", + "match": "(\\*\\*|\\*)" + }, + { + "name": "punctuation.separator.inheritance.python", + "match": "," + }, + { + "name": "keyword.operator.assignment.python", + "match": "=(?!=)" + }, + { + "name": "support.type.metaclass.python", + "match": "\\bmetaclass\\b" + }, + { + "include": "#illegal-names" + }, + { + "include": "#class-kwarg" + }, + { + "include": "#call-wrapper-inheritance" + }, + { + "include": "#expression-base" + }, + { + "include": "#member-access-class" + }, + { + "include": "#inheritance-identifier" + } + ] + }, + "class-kwarg": { + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\s*(=)(?!=)\n", + "captures": { + "1": { + "name": "entity.other.inherited-class.python variable.parameter.class.python" + }, + "2": { + "name": "keyword.operator.assignment.python" + } + } + }, + "inheritance-identifier": { + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n", + "captures": { + "1": { + "name": "entity.other.inherited-class.python" + } + } + }, + "member-access-class": { + "name": "meta.member.access.python", + "begin": "(\\.)\\s*(?!\\.)", + "end": "(?<=\\S)(?=\\W)|$", + "beginCaptures": { + "1": { + "name": "punctuation.separator.period.python" + } + }, + "patterns": [ + { + "include": "#call-wrapper-inheritance" + }, + { + "include": "#member-access-base" + }, + { + "include": "#inheritance-identifier" + } + ] + }, + "lambda": { + "patterns": [ + { + "match": "((?<=\\.)lambda|lambda(?=\\s*[\\.=]))", + "captures": { + "1": { + "name": "keyword.control.flow.python" + } + } + }, + { + "match": "\\b(lambda)\\s*?(?=[,\\n]|$)", + "captures": { + "1": { + "name": "storage.type.function.lambda.python" + } + } + }, + { + "name": "meta.lambda-function.python", + "begin": "(?x)\n \\b (lambda) \\b\n", + "end": "(:)|(\\n)", + "beginCaptures": { + "1": { + "name": "storage.type.function.lambda.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.section.function.lambda.begin.python" + } + }, + "contentName": "meta.function.lambda.parameters.python", + "patterns": [ + { + "name": "storage.modifier", + "match": "\\b(owned|borrowed|inout)\\b" + }, + { + "name": "keyword.operator.positional.parameter.python", + "match": "/" + }, + { + "name": "keyword.operator.unpacking.parameter.python", + "match": "(\\*\\*|\\*)" + }, + { + "include": "#lambda-nested-incomplete" + }, + { + "include": "#illegal-names" + }, + { + "match": "([[:alpha:]_]\\w*)\\s*(?:(,)|(?=:|$))", + "captures": { + "1": { + "name": "variable.parameter.function.language.python" + }, + "2": { + "name": "punctuation.separator.parameters.python" + } + } + }, + { + "include": "#comments" + }, + { + "include": "#backticks" + }, + { + "include": "#illegal-anno" + }, + { + "include": "#lambda-parameter-with-default" + }, + { + "include": "#line-continuation" + }, + { + "include": "#illegal-operator" + } + ] + } + ] + }, + "lambda-incomplete": { + "name": "storage.type.function.lambda.python", + "match": "\\blambda(?=\\s*[,)])" + }, + "lambda-nested-incomplete": { + "name": "storage.type.function.lambda.python", + "match": "\\blambda(?=\\s*[:,)])" + }, + "lambda-parameter-with-default": { + "begin": "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (=)\n", + "end": "(,)|(?=:|$)", + "beginCaptures": { + "1": { + "name": "variable.parameter.function.language.python" + }, + "2": { + "name": "keyword.operator.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.separator.parameters.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "generator": { + "comment": "Match \"for ... in\" construct used in generators and for loops to\ncorrectly identify the \"in\" as a control flow keyword.\n", + "begin": "\\bfor\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.flow.python" + } + }, + "end": "\\bin\\b", + "endCaptures": { + "0": { + "name": "keyword.control.flow.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "function-declaration": { + "name": "meta.function.python", + "begin": "(?x)\n \\s*\n (?:\\b(async) \\s+)? \\b(def|fn)\\s+\n (?=\n [[:alpha:]_][[:word:]]* \\s* [\\(\\[]\n )\n", + "end": "(:|(?=[#'\"\\n]))", + "beginCaptures": { + "1": { + "name": "storage.type.function.async.python" + }, + "2": { + "name": "storage.type.function.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.section.function.begin.python" + } + }, + "patterns": [ + { + "include": "#raises-modifier" + }, + { + "include": "#function-def-name" + }, + { + "include": "#parameters" + }, + { + "include": "#meta_parameters" + }, + { + "include": "#line-continuation" + }, + { + "include": "#return-annotation" + } + ] + }, + "function-def-name": { + "patterns": [ + { + "include": "#illegal-object-name" + }, + { + "include": "#builtin-possible-callables" + }, + { + "name": "entity.name.function.python", + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" + } + ] + }, + "raises-modifier": { + "name": "storage.modifier", + "match": "(raises)" + }, + "parameters": { + "name": "meta.function.parameters.python", + "begin": "(\\()", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.parameters.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.python" + } + }, + "patterns": [ + { + "name": "storage.modifier", + "match": "\\b(owned|borrowed|inout)\\b" + }, + { + "name": "keyword.operator.positional.parameter.python", + "match": "/" + }, + { + "name": "keyword.operator.unpacking.parameter.python", + "match": "(\\*\\*|\\*)" + }, + { + "include": "#lambda-incomplete" + }, + { + "include": "#illegal-names" + }, + { + "include": "#illegal-object-name" + }, + { + "include": "#parameter-special" + }, + { + "match": "(?x)\n ([[:alpha:]_]\\w*)\n \\s* (?: (,) | (?=[)#\\n=]))\n", + "captures": { + "1": { + "name": "variable.parameter.function.language.python" + }, + "2": { + "name": "punctuation.separator.parameters.python" + } + } + }, + { + "include": "#comments" + }, + { + "include": "#loose-default" + }, + { + "include": "#annotated-parameter" + } + ] + }, + "meta_parameters": { + "name": "meta.function.parameters.python", + "begin": "(\\[)", + "end": "(\\])", + "beginCaptures": { + "1": { + "name": "punctuation.definition.parameters.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.python" + } + }, + "patterns": [ + { + "begin": "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (:)\n", + "end": "(,)|(?=\\])", + "beginCaptures": { + "1": { + "name": "variable.parameter.function.language.python" + }, + "2": { + "name": "punctuation.separator.annotation.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.separator.parameters.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "include": "#comments" + } + ] + }, + "parameter-special": { + "match": "(?x)\n \\b ((self)|(cls)) \\b \\s*(?:(,)|(?=\\)))\n", + "captures": { + "1": { + "name": "variable.parameter.function.language.python" + }, + "2": { + "name": "variable.parameter.function.language.special.self.python" + }, + "3": { + "name": "variable.parameter.function.language.special.cls.python" + }, + "4": { + "name": "punctuation.separator.parameters.python" + } + } + }, + "loose-default": { + "begin": "(=)", + "end": "(,)|(?=\\))", + "beginCaptures": { + "1": { + "name": "keyword.operator.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.separator.parameters.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "annotated-parameter": { + "begin": "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (:)\n", + "end": "(,)|(?=\\))", + "beginCaptures": { + "1": { + "name": "variable.parameter.function.language.python" + }, + "2": { + "name": "punctuation.separator.annotation.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.separator.parameters.python" + } + }, + "patterns": [ + { + "include": "#expression" + }, + { + "name": "keyword.operator.assignment.python", + "match": "=(?!=)" + } + ] + }, + "return-annotation": { + "begin": "(->)", + "end": "(?=:)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.annotation.result.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "item-access": { + "patterns": [ + { + "name": "meta.item-access.python", + "begin": "(?x)\n \\b(?=\n [[:alpha:]_]\\w* \\s* \\[\n )\n", + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + } + }, + "patterns": [ + { + "include": "#item-name" + }, + { + "include": "#item-index" + }, + { + "include": "#expression" + } + ] + } + ] + }, + "item-name": { + "patterns": [ + { + "include": "#special-variables" + }, + { + "include": "#builtin-functions" + }, + { + "include": "#special-names" + }, + { + "name": "meta.indexed-name.python", + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" + } + ] + }, + "item-index": { + "begin": "(\\[)", + "end": "(?=\\])", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.python" + } + }, + "contentName": "meta.item-access.arguments.python", + "patterns": [ + { + "name": "punctuation.separator.slice.python", + "match": ":" + }, + { + "include": "#expression" + } + ] + }, + "decorator": { + "name": "meta.function.decorator.python", + "begin": "(?x)\n ^\\s*\n ((@)) \\s* (?=[[:alpha:]_]\\w*)\n", + "end": "(?x)\n ( \\) )\n # trailing whitespace and comments are legal\n (?: (.*?) (?=\\s*(?:\\#|$)) )\n | (?=\\n|\\#)\n", + "beginCaptures": { + "1": { + "name": "entity.name.function.decorator.python" + }, + "2": { + "name": "punctuation.definition.decorator.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + }, + "2": { + "name": "invalid.illegal.decorator.python" + } + }, + "patterns": [ + { + "include": "#decorator-name" + }, + { + "include": "#function-arguments" + } + ] + }, + "decorator-name": { + "patterns": [ + { + "include": "#builtin-callables" + }, + { + "include": "#illegal-object-name" + }, + { + "name": "entity.name.function.decorator.python", + "match": "(?x)\n ([[:alpha:]_]\\w*) | (\\.)\n", + "captures": { + "2": { + "name": "punctuation.separator.period.python" + } + } + }, + { + "include": "#line-continuation" + }, + { + "name": "invalid.illegal.decorator.python", + "match": "(?x)\n \\s* ([^([:alpha:]\\s_\\.#\\\\] .*?) (?=\\#|$)\n", + "captures": { + "1": { + "name": "invalid.illegal.decorator.python" + } + } + } + ] + }, + "call-wrapper-inheritance": { + "comment": "same as a function call, but in inheritance context", + "name": "meta.function-call.python", + "begin": "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + } + }, + "patterns": [ + { + "include": "#inheritance-name" + }, + { + "include": "#function-arguments" + } + ] + }, + "inheritance-name": { + "patterns": [ + { + "include": "#lambda-incomplete" + }, + { + "include": "#builtin-possible-callables" + }, + { + "include": "#inheritance-identifier" + } + ] + }, + "function-call": { + "name": "meta.function-call.python", + "comment": "Regular function call of the type \"name(args)\"", + "begin": "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + } + }, + "patterns": [ + { + "include": "#special-variables" + }, + { + "include": "#function-name" + }, + { + "include": "#function-arguments" + } + ] + }, + "function-name": { + "patterns": [ + { + "include": "#builtin-possible-callables" + }, + { + "comment": "Some color schemas support meta.function-call.generic scope", + "name": "meta.function-call.generic.python", + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" + } + ] + }, + "function-arguments": { + "begin": "(\\()", + "end": "(?=\\))(?!\\)\\s*\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.python" + } + }, + "contentName": "meta.function-call.arguments.python", + "patterns": [ + { + "name": "punctuation.separator.arguments.python", + "match": "(,)" + }, + { + "match": "(?x)\n (?:(?<=[,(])|^) \\s* (\\*{1,2})\n", + "captures": { + "1": { + "name": "keyword.operator.unpacking.arguments.python" + } + } + }, + { + "include": "#lambda-incomplete" + }, + { + "include": "#illegal-names" + }, + { + "match": "\\b([[:alpha:]_]\\w*)\\s*(=)(?!=)", + "captures": { + "1": { + "name": "variable.parameter.function-call.python" + }, + "2": { + "name": "keyword.operator.assignment.python" + } + } + }, + { + "name": "keyword.operator.assignment.python", + "match": "=(?!=)" + }, + { + "include": "#expression" + }, + { + "match": "\\s*(\\))\\s*(\\()", + "captures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + }, + "2": { + "name": "punctuation.definition.arguments.begin.python" + } + } + } + ] + }, + "builtin-callables": { + "patterns": [ + { + "include": "#illegal-names" + }, + { + "include": "#illegal-object-name" + }, + { + "include": "#builtin-exceptions" + }, + { + "include": "#builtin-functions" + }, + { + "include": "#builtin-types" + } + ] + }, + "builtin-possible-callables": { + "patterns": [ + { + "include": "#builtin-callables" + }, + { + "include": "#magic-names" + } + ] + }, + "builtin-exceptions": { + "name": "support.type.exception.python", + "match": "(?x) (?<!\\.) \\b(\n (\n Arithmetic | Assertion | Attribute | Buffer | BlockingIO\n | BrokenPipe | ChildProcess\n | (Connection (Aborted | Refused | Reset)?)\n | EOF | Environment | FileExists | FileNotFound\n | FloatingPoint | IO | Import | Indentation | Index | Interrupted\n | IsADirectory | NotADirectory | Permission | ProcessLookup\n | Timeout\n | Key | Lookup | Memory | Name | NotImplemented | OS | Overflow\n | Reference | Runtime | Recursion | Syntax | System\n | Tab | Type | UnboundLocal | Unicode(Encode|Decode|Translate)?\n | Value | Windows | ZeroDivision | ModuleNotFound\n ) Error\n|\n ((Pending)?Deprecation | Runtime | Syntax | User | Future | Import\n | Unicode | Bytes | Resource\n )? Warning\n|\n SystemExit | Stop(Async)?Iteration\n | KeyboardInterrupt\n | GeneratorExit | (Base)?Exception\n)\\b\n" + }, + "builtin-functions": { + "patterns": [ + { + "name": "support.function.builtin.python", + "match": "(?x)\n (?<!\\.) \\b(\n __import__ | abs | aiter | all | any | anext | ascii | bin\n | breakpoint | callable | chr | compile | copyright | credits\n | delattr | dir | divmod | enumerate | eval | exec | exit\n | filter | format | getattr | globals | hasattr | hash | help\n | hex | id | input | isinstance | issubclass | iter | len\n | license | locals | map | max | memoryview | min | next\n | oct | open | ord | pow | print | quit | range | reload | repr\n | reversed | round | setattr | sorted | sum | vars | zip\n )\\b\n" + }, + { + "name": "variable.legacy.builtin.python", + "match": "(?x)\n (?<!\\.) \\b(\n file | reduce | intern | raw_input | unicode | cmp | basestring\n | execfile | long | xrange\n )\\b\n" + } + ] + }, + "builtin-types": { + "name": "support.type.python", + "match": "(?x)\n (?<!\\.) \\b(\n __mlir_attr | __mlir_op | __mlir_type | bool | bytearray | bytes | classmethod | complex | dict\n | float | frozenset | int | list | object | property\n | set | slice | staticmethod | str | tuple | type\n\n (?# Although 'super' is not a type, it's related to types,\n and is special enough to be highlighted differently from\n other built-ins)\n | super\n )\\b\n" + }, + "magic-function-names": { + "comment": "these methods have magic interpretation by python and are generally called\nindirectly through syntactic constructs\n", + "match": "(?x)\n \\b(\n __(?:\n abs | add | aenter | aexit | aiter | and | anext\n | await | bool | call | ceil | class_getitem\n | cmp | coerce | complex | contains | copy\n | deepcopy | del | delattr | delete | delitem\n | delslice | dir | div | divmod | enter | eq\n | exit | float | floor | floordiv | format | ge\n | get | getattr | getattribute | getinitargs\n | getitem | getnewargs | getslice | getstate | gt\n | hash | hex | iadd | iand | idiv | ifloordiv |\n | ilshift | imod | imul | index | init\n | instancecheck | int | invert | ior | ipow\n | irshift | isub | iter | itruediv | ixor | le\n | len | long | lshift | lt | missing | mod | mul\n | ne | neg | new | next | nonzero | oct | or | pos\n | pow | radd | rand | rdiv | rdivmod | reduce\n | reduce_ex | repr | reversed | rfloordiv |\n | rlshift | rmod | rmul | ror | round | rpow\n | rrshift | rshift | rsub | rtruediv | rxor | set\n | setattr | setitem | set_name | setslice\n | setstate | sizeof | str | sub | subclasscheck\n | truediv | trunc | unicode | xor | matmul\n | rmatmul | imatmul | init_subclass | set_name\n | fspath | bytes | prepare | length_hint\n )__\n )\\b\n", + "captures": { + "1": { + "name": "support.function.magic.python" + } + } + }, + "magic-variable-names": { + "comment": "magic variables which a class/module may have.", + "match": "(?x)\n \\b(\n __(?:\n all | annotations | bases | builtins | class\n | struct\n | closure | code | debug | defaults | dict | doc | file | func\n | globals | kwdefaults | match_args | members | metaclass | methods\n | module | mro | mro_entries | name | qualname | post_init | self\n | signature | slots | subclasses | version | weakref | wrapped\n | classcell | spec | path | package | future | traceback\n )__\n )\\b\n", + "captures": { + "1": { + "name": "support.variable.magic.python" + } + } + }, + "magic-names": { + "patterns": [ + { + "include": "#magic-function-names" + }, + { + "include": "#magic-variable-names" + } + ] + }, + "illegal-names": { + "match": "(?x)\n \\b(?:\n (\n and | assert | async | await | break | class | struct | continue | def\n | fn\n | del | elif | else | except | finally | for | from | global\n | if | in | is | (?<=\\.)lambda | lambda(?=\\s*[\\.=])\n | nonlocal | not | or | pass | raise | return | try | while | with\n | yield\n ) | (\n as | import\n )\n )\\b\n", + "captures": { + "1": { + "name": "keyword.control.flow.python" + }, + "2": { + "name": "keyword.control.import.python" + } + } + }, + "special-variables": { + "match": "(?x)\n \\b (?<!\\.) (?:\n (self) | (cls)\n )\\b\n", + "captures": { + "1": { + "name": "variable.language.special.self.python" + }, + "2": { + "name": "variable.language.special.cls.python" + } + } + }, + "ellipsis": { + "name": "constant.other.ellipsis.python", + "match": "\\.\\.\\." + }, + "backticks": { + "name": "string.quoted.single.python", + "begin": "\\`", + "end": "(?:\\`|(?<!\\\\)(\\n))" + }, + "illegal-operator": { + "patterns": [ + { + "name": "invalid.illegal.operator.python", + "match": "&&|\\|\\||--|\\+\\+" + }, + { + "name": "invalid.illegal.operator.python", + "match": "[?$]" + }, + { + "name": "invalid.illegal.operator.python", + "comment": "We don't want `!` to flash when we're typing `!=`", + "match": "!\\b" + } + ] + }, + "illegal-object-name": { + "comment": "It's illegal to name class or function \"True\"", + "name": "keyword.illegal.name.python", + "match": "\\b(True|False|None)\\b" + }, + "illegal-anno": { + "name": "invalid.illegal.annotation.python", + "match": "->" + }, + "regexp-base-expression": { + "patterns": [ + { + "include": "#regexp-quantifier" + }, + { + "include": "#regexp-base-common" + } + ] + }, + "fregexp-base-expression": { + "patterns": [ + { + "include": "#fregexp-quantifier" + }, + { + "include": "#fstring-formatting-braces" + }, + { + "match": "\\{.*?\\}" + }, + { + "include": "#regexp-base-common" + } + ] + }, + "fstring-formatting-braces": { + "patterns": [ + { + "comment": "empty braces are illegal", + "match": "({)(\\s*?)(})", + "captures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + }, + "2": { + "name": "invalid.illegal.brace.python" + }, + "3": { + "name": "constant.character.format.placeholder.other.python" + } + } + }, + { + "name": "constant.character.escape.python", + "match": "({{|}})" + } + ] + }, + "regexp-base-common": { + "patterns": [ + { + "name": "support.other.match.any.regexp", + "match": "\\." + }, + { + "name": "support.other.match.begin.regexp", + "match": "\\^" + }, + { + "name": "support.other.match.end.regexp", + "match": "\\$" + }, + { + "name": "keyword.operator.quantifier.regexp", + "match": "[+*?]\\??" + }, + { + "name": "keyword.operator.disjunction.regexp", + "match": "\\|" + }, + { + "include": "#regexp-escape-sequence" + } + ] + }, + "regexp-quantifier": { + "name": "keyword.operator.quantifier.regexp", + "match": "(?x)\n \\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\n" + }, + "fregexp-quantifier": { + "name": "keyword.operator.quantifier.regexp", + "match": "(?x)\n \\{\\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\\}\n" + }, + "regexp-backreference-number": { + "name": "meta.backreference.regexp", + "match": "(\\\\[1-9]\\d?)", + "captures": { + "1": { + "name": "entity.name.tag.backreference.regexp" + } + } + }, + "regexp-backreference": { + "name": "meta.backreference.named.regexp", + "match": "(?x)\n (\\() (\\?P= \\w+(?:\\s+[[:alnum:]]+)?) (\\))\n", + "captures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.backreference.regexp" + }, + "3": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.end.regexp" + } + } + }, + "regexp-flags": { + "name": "storage.modifier.flag.regexp", + "match": "\\(\\?[aiLmsux]+\\)" + }, + "regexp-escape-special": { + "name": "support.other.escape.special.regexp", + "match": "\\\\([AbBdDsSwWZ])" + }, + "regexp-escape-character": { + "name": "constant.character.escape.regexp", + "match": "(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | 0[0-7]{1,2}\n | [0-7]{3}\n )\n" + }, + "regexp-escape-unicode": { + "name": "constant.character.unicode.regexp", + "match": "(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n )\n" + }, + "regexp-escape-catchall": { + "name": "constant.character.escape.regexp", + "match": "\\\\(.|\\n)" + }, + "regexp-escape-sequence": { + "patterns": [ + { + "include": "#regexp-escape-special" + }, + { + "include": "#regexp-escape-character" + }, + { + "include": "#regexp-escape-unicode" + }, + { + "include": "#regexp-backreference-number" + }, + { + "include": "#regexp-escape-catchall" + } + ] + }, + "regexp-charecter-set-escapes": { + "patterns": [ + { + "name": "constant.character.escape.regexp", + "match": "\\\\[abfnrtv\\\\]" + }, + { + "include": "#regexp-escape-special" + }, + { + "name": "constant.character.escape.regexp", + "match": "\\\\([0-7]{1,3})" + }, + { + "include": "#regexp-escape-character" + }, + { + "include": "#regexp-escape-unicode" + }, + { + "include": "#regexp-escape-catchall" + } + ] + }, + "codetags": { + "match": "(?:\\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\\b)", + "captures": { + "1": { + "name": "keyword.codetag.notation.python" + } + } + }, + "comments-base": { + "name": "comment.line.number-sign.python", + "begin": "(\\#)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.python" + } + }, + "end": "($)", + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "comments-string-single-three": { + "name": "comment.line.number-sign.python", + "begin": "(\\#)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.python" + } + }, + "end": "($|(?='''))", + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "comments-string-double-three": { + "name": "comment.line.number-sign.python", + "begin": "(\\#)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.python" + } + }, + "end": "($|(?=\"\"\"))", + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "single-one-regexp-expression": { + "patterns": [ + { + "include": "#regexp-base-expression" + }, + { + "include": "#single-one-regexp-character-set" + }, + { + "include": "#single-one-regexp-comments" + }, + { + "include": "#regexp-flags" + }, + { + "include": "#single-one-regexp-named-group" + }, + { + "include": "#regexp-backreference" + }, + { + "include": "#single-one-regexp-lookahead" + }, + { + "include": "#single-one-regexp-lookahead-negative" + }, + { + "include": "#single-one-regexp-lookbehind" + }, + { + "include": "#single-one-regexp-lookbehind-negative" + }, + { + "include": "#single-one-regexp-conditional" + }, + { + "include": "#single-one-regexp-parentheses-non-capturing" + }, + { + "include": "#single-one-regexp-parentheses" + } + ] + }, + "single-one-regexp-character-set": { + "patterns": [ + { + "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" + }, + { + "name": "meta.character.set.regexp", + "begin": "(\\[)(\\^)?(\\])?", + "end": "(\\]|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "1": { + "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + }, + "3": { + "name": "constant.character.set.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.character.set.end.regexp constant.other.set.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#regexp-charecter-set-escapes" + }, + { + "name": "constant.character.set.regexp", + "match": "[^\\n]" + } + ] + } + ] + }, + "single-one-regexp-named-group": { + "name": "meta.named.regexp", + "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.group.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-comments": { + "name": "comment.regexp", + "begin": "\\(\\?#", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "punctuation.comment.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.comment.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "single-one-regexp-lookahead": { + "begin": "(\\()\\?=", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-lookahead-negative": { + "begin": "(\\()\\?!", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-lookbehind": { + "begin": "(\\()\\?<=", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-lookbehind-negative": { + "begin": "(\\()\\?<!", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-conditional": { + "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.conditional.regexp" + }, + "1": { + "name": "punctuation.parenthesis.conditional.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-parentheses-non-capturing": { + "begin": "\\(\\?:", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-parentheses": { + "begin": "\\(", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-three-regexp-expression": { + "patterns": [ + { + "include": "#regexp-base-expression" + }, + { + "include": "#single-three-regexp-character-set" + }, + { + "include": "#single-three-regexp-comments" + }, + { + "include": "#regexp-flags" + }, + { + "include": "#single-three-regexp-named-group" + }, + { + "include": "#regexp-backreference" + }, + { + "include": "#single-three-regexp-lookahead" + }, + { + "include": "#single-three-regexp-lookahead-negative" + }, + { + "include": "#single-three-regexp-lookbehind" + }, + { + "include": "#single-three-regexp-lookbehind-negative" + }, + { + "include": "#single-three-regexp-conditional" + }, + { + "include": "#single-three-regexp-parentheses-non-capturing" + }, + { + "include": "#single-three-regexp-parentheses" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-character-set": { + "patterns": [ + { + "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" + }, + { + "name": "meta.character.set.regexp", + "begin": "(\\[)(\\^)?(\\])?", + "end": "(\\]|(?=\\'\\'\\'))", + "beginCaptures": { + "1": { + "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + }, + "3": { + "name": "constant.character.set.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.character.set.end.regexp constant.other.set.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#regexp-charecter-set-escapes" + }, + { + "name": "constant.character.set.regexp", + "match": "[^\\n]" + } + ] + } + ] + }, + "single-three-regexp-named-group": { + "name": "meta.named.regexp", + "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.group.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-comments": { + "name": "comment.regexp", + "begin": "\\(\\?#", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "punctuation.comment.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.comment.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "single-three-regexp-lookahead": { + "begin": "(\\()\\?=", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-lookahead-negative": { + "begin": "(\\()\\?!", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-lookbehind": { + "begin": "(\\()\\?<=", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-lookbehind-negative": { + "begin": "(\\()\\?<!", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-conditional": { + "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.conditional.regexp" + }, + "1": { + "name": "punctuation.parenthesis.conditional.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-parentheses-non-capturing": { + "begin": "\\(\\?:", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-parentheses": { + "begin": "\\(", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "double-one-regexp-expression": { + "patterns": [ + { + "include": "#regexp-base-expression" + }, + { + "include": "#double-one-regexp-character-set" + }, + { + "include": "#double-one-regexp-comments" + }, + { + "include": "#regexp-flags" + }, + { + "include": "#double-one-regexp-named-group" + }, + { + "include": "#regexp-backreference" + }, + { + "include": "#double-one-regexp-lookahead" + }, + { + "include": "#double-one-regexp-lookahead-negative" + }, + { + "include": "#double-one-regexp-lookbehind" + }, + { + "include": "#double-one-regexp-lookbehind-negative" + }, + { + "include": "#double-one-regexp-conditional" + }, + { + "include": "#double-one-regexp-parentheses-non-capturing" + }, + { + "include": "#double-one-regexp-parentheses" + } + ] + }, + "double-one-regexp-character-set": { + "patterns": [ + { + "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" + }, + { + "name": "meta.character.set.regexp", + "begin": "(\\[)(\\^)?(\\])?", + "end": "(\\]|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "1": { + "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + }, + "3": { + "name": "constant.character.set.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.character.set.end.regexp constant.other.set.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#regexp-charecter-set-escapes" + }, + { + "name": "constant.character.set.regexp", + "match": "[^\\n]" + } + ] + } + ] + }, + "double-one-regexp-named-group": { + "name": "meta.named.regexp", + "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.group.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-comments": { + "name": "comment.regexp", + "begin": "\\(\\?#", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "punctuation.comment.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.comment.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "double-one-regexp-lookahead": { + "begin": "(\\()\\?=", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-lookahead-negative": { + "begin": "(\\()\\?!", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-lookbehind": { + "begin": "(\\()\\?<=", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-lookbehind-negative": { + "begin": "(\\()\\?<!", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-conditional": { + "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.conditional.regexp" + }, + "1": { + "name": "punctuation.parenthesis.conditional.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-parentheses-non-capturing": { + "begin": "\\(\\?:", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-parentheses": { + "begin": "\\(", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-three-regexp-expression": { + "patterns": [ + { + "include": "#regexp-base-expression" + }, + { + "include": "#double-three-regexp-character-set" + }, + { + "include": "#double-three-regexp-comments" + }, + { + "include": "#regexp-flags" + }, + { + "include": "#double-three-regexp-named-group" + }, + { + "include": "#regexp-backreference" + }, + { + "include": "#double-three-regexp-lookahead" + }, + { + "include": "#double-three-regexp-lookahead-negative" + }, + { + "include": "#double-three-regexp-lookbehind" + }, + { + "include": "#double-three-regexp-lookbehind-negative" + }, + { + "include": "#double-three-regexp-conditional" + }, + { + "include": "#double-three-regexp-parentheses-non-capturing" + }, + { + "include": "#double-three-regexp-parentheses" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-character-set": { + "patterns": [ + { + "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" + }, + { + "name": "meta.character.set.regexp", + "begin": "(\\[)(\\^)?(\\])?", + "end": "(\\]|(?=\"\"\"))", + "beginCaptures": { + "1": { + "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + }, + "3": { + "name": "constant.character.set.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.character.set.end.regexp constant.other.set.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#regexp-charecter-set-escapes" + }, + { + "name": "constant.character.set.regexp", + "match": "[^\\n]" + } + ] + } + ] + }, + "double-three-regexp-named-group": { + "name": "meta.named.regexp", + "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.group.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-comments": { + "name": "comment.regexp", + "begin": "\\(\\?#", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "punctuation.comment.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.comment.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "double-three-regexp-lookahead": { + "begin": "(\\()\\?=", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-lookahead-negative": { + "begin": "(\\()\\?!", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-lookbehind": { + "begin": "(\\()\\?<=", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-lookbehind-negative": { + "begin": "(\\()\\?<!", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-conditional": { + "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.conditional.regexp" + }, + "1": { + "name": "punctuation.parenthesis.conditional.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-parentheses-non-capturing": { + "begin": "\\(\\?:", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-parentheses": { + "begin": "\\(", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "regexp-single-one-line": { + "name": "string.regexp.quoted.single.python", + "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\\')", + "end": "(\\')|(?<!\\\\)(\\n)", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "storage.type.string.python" + }, + "5": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "regexp-single-three-line": { + "name": "string.regexp.quoted.multi.python", + "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\\'\\'\\')", + "end": "(\\'\\'\\')", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "storage.type.string.python" + }, + "5": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + } + ] + }, + "regexp-double-one-line": { + "name": "string.regexp.quoted.single.python", + "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\")", + "end": "(\")|(?<!\\\\)(\\n)", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "storage.type.string.python" + }, + "5": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "regexp-double-three-line": { + "name": "string.regexp.quoted.multi.python", + "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\"\"\")", + "end": "(\"\"\")", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "storage.type.string.python" + }, + "5": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + } + ] + }, + "string-raw-quoted-single-line": { + "name": "string.quoted.raw.single.python", + "begin": "\\b(([uU]R)|(R))((['\"]))", + "end": "(\\4)|((?<!\\\\)\\n)", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-single-bad-brace1-formatting-raw" + }, + { + "include": "#string-single-bad-brace2-formatting-raw" + }, + { + "include": "#string-raw-guts" + } + ] + }, + "string-bin-quoted-single-line": { + "name": "string.quoted.binary.single.python", + "begin": "(\\b[bB])((['\"]))", + "end": "(\\2)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-entity" + } + ] + }, + "string-raw-bin-quoted-single-line": { + "name": "string.quoted.raw.binary.single.python", + "begin": "(\\b(?:R[bB]|[bB]R))((['\"]))", + "end": "(\\2)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-raw-bin-guts" + } + ] + }, + "string-quoted-single-line": { + "name": "string.quoted.single.python", + "begin": "(?:\\b([rR])(?=[uU]))?([uU])?((['\"]))", + "end": "(\\3)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "invalid.illegal.prefix.python" + }, + "2": { + "name": "storage.type.string.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-single-bad-brace1-formatting-unicode" + }, + { + "include": "#string-single-bad-brace2-formatting-unicode" + }, + { + "include": "#string-unicode-guts" + } + ] + }, + "string-single-bad-brace1-formatting-unicode": { + "comment": "template using {% ... %}", + "begin": "(?x)\n (?= \\{%\n ( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n %\\}\n )\n", + "end": "(?=(['\"])|((?<!\\\\)\\n))", + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#escape-sequence" + }, + { + "include": "#string-line-continuation" + } + ] + }, + "string-single-bad-brace1-formatting-raw": { + "comment": "template using {% ... %}", + "begin": "(?x)\n (?= \\{%\n ( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n %\\}\n )\n", + "end": "(?=(['\"])|((?<!\\\\)\\n))", + "patterns": [ + { + "include": "#string-consume-escape" + } + ] + }, + "string-single-bad-brace2-formatting-unicode": { + "comment": "odd format or format-like syntax", + "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n )\n .*?(?!(['\"])|((?<!\\\\)\\n))\n \\}\n )\n", + "end": "(?=(['\"])|((?<!\\\\)\\n))", + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#string-entity" + } + ] + }, + "string-single-bad-brace2-formatting-raw": { + "comment": "odd format or format-like syntax", + "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n )\n .*?(?!(['\"])|((?<!\\\\)\\n))\n \\}\n )\n", + "end": "(?=(['\"])|((?<!\\\\)\\n))", + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#string-formatting" + } + ] + }, + "string-raw-quoted-multi-line": { + "name": "string.quoted.raw.multi.python", + "begin": "\\b(([uU]R)|(R))('''|\"\"\")", + "end": "(\\4)", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-multi-bad-brace1-formatting-raw" + }, + { + "include": "#string-multi-bad-brace2-formatting-raw" + }, + { + "include": "#string-raw-guts" + } + ] + }, + "string-bin-quoted-multi-line": { + "name": "string.quoted.binary.multi.python", + "begin": "(\\b[bB])('''|\"\"\")", + "end": "(\\2)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-entity" + } + ] + }, + "string-raw-bin-quoted-multi-line": { + "name": "string.quoted.raw.binary.multi.python", + "begin": "(\\b(?:R[bB]|[bB]R))('''|\"\"\")", + "end": "(\\2)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-raw-bin-guts" + } + ] + }, + "string-quoted-multi-line": { + "name": "string.quoted.multi.python", + "begin": "(?:\\b([rR])(?=[uU]))?([uU])?('''|\"\"\")", + "end": "(\\3)", + "beginCaptures": { + "1": { + "name": "invalid.illegal.prefix.python" + }, + "2": { + "name": "storage.type.string.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-multi-bad-brace1-formatting-unicode" + }, + { + "include": "#string-multi-bad-brace2-formatting-unicode" + }, + { + "include": "#string-unicode-guts" + } + ] + }, + "string-multi-bad-brace1-formatting-unicode": { + "comment": "template using {% ... %}", + "begin": "(?x)\n (?= \\{%\n ( .*? (?!'''|\"\"\") )\n %\\}\n )\n", + "end": "(?='''|\"\"\")", + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#escape-sequence" + }, + { + "include": "#string-line-continuation" + } + ] + }, + "string-multi-bad-brace1-formatting-raw": { + "comment": "template using {% ... %}", + "begin": "(?x)\n (?= \\{%\n ( .*? (?!'''|\"\"\") )\n %\\}\n )\n", + "end": "(?='''|\"\"\")", + "patterns": [ + { + "include": "#string-consume-escape" + } + ] + }, + "string-multi-bad-brace2-formatting-unicode": { + "comment": "odd format or format-like syntax", + "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n )\n .*?(?!'''|\"\"\")\n \\}\n )\n", + "end": "(?='''|\"\"\")", + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#string-entity" + } + ] + }, + "string-multi-bad-brace2-formatting-raw": { + "comment": "odd format or format-like syntax", + "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n )\n .*?(?!'''|\"\"\")\n \\}\n )\n", + "end": "(?='''|\"\"\")", + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#string-formatting" + } + ] + }, + "fstring-fnorm-quoted-single-line": { + "name": "meta.fstring.python", + "begin": "(\\b[fF])([bBuU])?((['\"]))", + "end": "(\\3)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "string.interpolated.python string.quoted.single.python storage.type.string.python" + }, + "2": { + "name": "invalid.illegal.prefix.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python string.interpolated.python string.quoted.single.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-guts" + }, + { + "include": "#fstring-illegal-single-brace" + }, + { + "include": "#fstring-single-brace" + }, + { + "include": "#fstring-single-core" + } + ] + }, + "fstring-normf-quoted-single-line": { + "name": "meta.fstring.python", + "begin": "(\\b[bBuU])([fF])((['\"]))", + "end": "(\\3)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "invalid.illegal.prefix.python" + }, + "2": { + "name": "string.interpolated.python string.quoted.single.python storage.type.string.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python string.quoted.single.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-guts" + }, + { + "include": "#fstring-illegal-single-brace" + }, + { + "include": "#fstring-single-brace" + }, + { + "include": "#fstring-single-core" + } + ] + }, + "fstring-raw-quoted-single-line": { + "name": "meta.fstring.python", + "begin": "(\\b(?:[rR][fF]|[fF][rR]))((['\"]))", + "end": "(\\2)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "string.interpolated.python string.quoted.raw.single.python storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python string.quoted.raw.single.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.single.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-raw-guts" + }, + { + "include": "#fstring-illegal-single-brace" + }, + { + "include": "#fstring-single-brace" + }, + { + "include": "#fstring-raw-single-core" + } + ] + }, + "fstring-single-core": { + "name": "string.interpolated.python string.quoted.single.python", + "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n))\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n" + }, + "fstring-raw-single-core": { + "name": "string.interpolated.python string.quoted.raw.single.python", + "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n))\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n" + }, + "fstring-single-brace": { + "comment": "value interpolation using { ... }", + "begin": "(\\{)", + "end": "(?x)\n (\\})|(?=\\n)\n", + "beginCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "endCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "patterns": [ + { + "include": "#fstring-terminator-single" + }, + { + "include": "#f-expression" + } + ] + }, + "fstring-terminator-single": { + "patterns": [ + { + "name": "storage.type.format.python", + "match": "(=(![rsa])?)(?=})" + }, + { + "name": "storage.type.format.python", + "match": "(=?![rsa])(?=})" + }, + { + "match": "(?x)\n ( (?: =?) (?: ![rsa])? )\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n", + "captures": { + "1": { + "name": "storage.type.format.python" + }, + "2": { + "name": "storage.type.format.python" + } + } + }, + { + "include": "#fstring-terminator-single-tail" + } + ] + }, + "fstring-terminator-single-tail": { + "begin": "((?:=?)(?:![rsa])?)(:)(?=.*?{)", + "end": "(?=})|(?=\\n)", + "beginCaptures": { + "1": { + "name": "storage.type.format.python" + }, + "2": { + "name": "storage.type.format.python" + } + }, + "patterns": [ + { + "include": "#fstring-illegal-single-brace" + }, + { + "include": "#fstring-single-brace" + }, + { + "name": "storage.type.format.python", + "match": "([bcdeEfFgGnosxX%])(?=})" + }, + { + "name": "storage.type.format.python", + "match": "(\\.\\d+)" + }, + { + "name": "storage.type.format.python", + "match": "(,)" + }, + { + "name": "storage.type.format.python", + "match": "(\\d+)" + }, + { + "name": "storage.type.format.python", + "match": "(\\#)" + }, + { + "name": "storage.type.format.python", + "match": "([-+ ])" + }, + { + "name": "storage.type.format.python", + "match": "([<>=^])" + }, + { + "name": "storage.type.format.python", + "match": "(\\w)" + } + ] + }, + "fstring-fnorm-quoted-multi-line": { + "name": "meta.fstring.python", + "begin": "(\\b[fF])([bBuU])?('''|\"\"\")", + "end": "(\\3)", + "beginCaptures": { + "1": { + "name": "string.interpolated.python string.quoted.multi.python storage.type.string.python" + }, + "2": { + "name": "invalid.illegal.prefix.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python string.interpolated.python string.quoted.multi.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-guts" + }, + { + "include": "#fstring-illegal-multi-brace" + }, + { + "include": "#fstring-multi-brace" + }, + { + "include": "#fstring-multi-core" + } + ] + }, + "fstring-normf-quoted-multi-line": { + "name": "meta.fstring.python", + "begin": "(\\b[bBuU])([fF])('''|\"\"\")", + "end": "(\\3)", + "beginCaptures": { + "1": { + "name": "invalid.illegal.prefix.python" + }, + "2": { + "name": "string.interpolated.python string.quoted.multi.python storage.type.string.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python string.quoted.multi.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-guts" + }, + { + "include": "#fstring-illegal-multi-brace" + }, + { + "include": "#fstring-multi-brace" + }, + { + "include": "#fstring-multi-core" + } + ] + }, + "fstring-raw-quoted-multi-line": { + "name": "meta.fstring.python", + "begin": "(\\b(?:[rR][fF]|[fF][rR]))('''|\"\"\")", + "end": "(\\2)", + "beginCaptures": { + "1": { + "name": "string.interpolated.python string.quoted.raw.multi.python storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python string.quoted.raw.multi.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.multi.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-raw-guts" + }, + { + "include": "#fstring-illegal-multi-brace" + }, + { + "include": "#fstring-multi-brace" + }, + { + "include": "#fstring-raw-multi-core" + } + ] + }, + "fstring-multi-core": { + "name": "string.interpolated.python string.quoted.multi.python", + "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|'''|\"\"\")\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n" + }, + "fstring-raw-multi-core": { + "name": "string.interpolated.python string.quoted.raw.multi.python", + "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|'''|\"\"\")\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n" + }, + "fstring-multi-brace": { + "comment": "value interpolation using { ... }", + "begin": "(\\{)", + "end": "(?x)\n (\\})\n", + "beginCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "endCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "patterns": [ + { + "include": "#fstring-terminator-multi" + }, + { + "include": "#f-expression" + } + ] + }, + "fstring-terminator-multi": { + "patterns": [ + { + "name": "storage.type.format.python", + "match": "(=(![rsa])?)(?=})" + }, + { + "name": "storage.type.format.python", + "match": "(=?![rsa])(?=})" + }, + { + "match": "(?x)\n ( (?: =?) (?: ![rsa])? )\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n", + "captures": { + "1": { + "name": "storage.type.format.python" + }, + "2": { + "name": "storage.type.format.python" + } + } + }, + { + "include": "#fstring-terminator-multi-tail" + } + ] + }, + "fstring-terminator-multi-tail": { + "begin": "((?:=?)(?:![rsa])?)(:)(?=.*?{)", + "end": "(?=})", + "beginCaptures": { + "1": { + "name": "storage.type.format.python" + }, + "2": { + "name": "storage.type.format.python" + } + }, + "patterns": [ + { + "include": "#fstring-illegal-multi-brace" + }, + { + "include": "#fstring-multi-brace" + }, + { + "name": "storage.type.format.python", + "match": "([bcdeEfFgGnosxX%])(?=})" + }, + { + "name": "storage.type.format.python", + "match": "(\\.\\d+)" + }, + { + "name": "storage.type.format.python", + "match": "(,)" + }, + { + "name": "storage.type.format.python", + "match": "(\\d+)" + }, + { + "name": "storage.type.format.python", + "match": "(\\#)" + }, + { + "name": "storage.type.format.python", + "match": "([-+ ])" + }, + { + "name": "storage.type.format.python", + "match": "([<>=^])" + }, + { + "name": "storage.type.format.python", + "match": "(\\w)" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/narrat.tmLanguage.json b/src/lib/shiki/languages/narrat.tmLanguage.json new file mode 100644 index 0000000..1b88942 --- /dev/null +++ b/src/lib/shiki/languages/narrat.tmLanguage.json @@ -0,0 +1,227 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "narrat", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#expression" + } + ], + "repository": { + "expression": { + "patterns": [ + { + "include": "#keywords" + }, + { + "include": "#commands" + }, + { + "include": "#operators" + }, + { + "include": "#primitives" + }, + { + "include": "#strings" + }, + { + "include": "#paren-expression" + } + ] + }, + "keywords": { + "patterns": [ + { + "name": "keyword.control.narrat", + "match": "\\b(if|else|choice)\\b" + }, + { + "name": "variable.value.narrat", + "match": "\\$[\\w|\\.]+\\b" + }, + { + "name": "entity.name.function.narrat", + "match": "(?x) # Ignore comments\n ^\\w+ # Find label name\n (?=(\\s|\\w)*:) # Positive lookahead for ':'\n" + }, + { + "name": "invalid.label.narrat", + "match": "(?x) # Ignore comments\n ^\\w+ # Find label name\n (?!(\\s|\\w)*:) # Negative lookahead for ':'\n" + }, + { + "name": "entity.other.attribute-name", + "match": "(?<=\\w)[^^](\\b\\w+\\b)(?=(\\s|\\w)*:)" + } + ] + }, + "commands": { + "patterns": [ + { + "name": "keyword.commands.variables.narrat", + "match": "\\b(set|var)\\b" + }, + { + "name": "keyword.commands.text.narrat", + "match": "\\b(talk|think)\\b" + }, + { + "name": "keyword.commands.flow.narrat", + "match": "\\b(jump|run|wait|return|save|save_prompt)" + }, + { + "name": "keyword.commands.helpers.narrat", + "match": "\\b(log|clear_dialog)\\b" + }, + { + "name": "keyword.commands.screens.narrat", + "match": "\\b(set_screen|empty_layer|set_button)" + }, + { + "name": "keyword.commands.audio.narrat", + "match": "\\b(play|pause|stop)\\b" + }, + { + "name": "keyword.commands.notifications.narrat", + "match": "\\b(notify|enable_notifications|disable_notifications)\\b" + }, + { + "name": "keyword.commands.stats.narrat", + "match": "\\b(set_stat|get_stat_value|add_stat)" + }, + { + "name": "keyword.commands.math.narrat", + "match": "\\b(neg|abs|random|random_float|random_from_args|min|max|clamp|floor|round|ceil|sqrt|^)\\b" + }, + { + "name": "keyword.commands.string.narrat", + "match": "\\b(concat|join)\\b" + }, + { + "name": "keyword.commands.text_field.narrat", + "match": "\\b(text_field)\\b" + }, + { + "name": "keyword.commands.skills.narrat", + "match": "\\b(add_level|set_level|add_xp|roll|get_level|get_xp)\\b" + }, + { + "name": "keyword.commands.inventory.narrat", + "match": "\\b(add_item|remove_item|enable_interaction|disable_interaction|has_item?|item_amount?)" + }, + { + "name": "keyword.commands.quests.narrat", + "match": "\\b(start_quest|start_objective|complete_objective|complete_quest|quest_started?|objective_started?|quest_completed?|objective_completed?)" + } + ] + }, + "operators": { + "patterns": [ + { + "name": "keyword.operator.logic.narrat", + "match": "(&&|\\|\\||!=|==|>=|<=|<|>|!|\\?)\\s" + }, + { + "name": "keyword.operator.arithmetic.narrat", + "match": "(\\+|-|\\*|\\/)\\s" + } + ] + }, + "interpolation": { + "patterns": [ + { + "name": "variable.interpolation.narrat", + "match": "(\\w|\\.)+" + } + ] + }, + "strings": { + "name": "string.quoted.double.narrat", + "begin": "\"", + "end": "\"", + "patterns": [ + { + "name": "constant.character.escape.narrat", + "match": "\\\\." + }, + { + "name": "expression.template", + "begin": "%{", + "end": "}", + "beginCaptures": { + "0": { + "name": "punctuation.template.open" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.template.close.narrat" + } + }, + "patterns": [ + { + "include": "#expression" + }, + { + "include": "#interpolation" + } + ] + } + ] + }, + "paren-expression": { + "begin": "\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "punctuation.paren.open" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.paren.close" + } + }, + "name": "expression.group", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "primitives": { + "patterns": [ + { + "name": "constant.numeric.narrat", + "match": "\\b\\d+\\b" + }, + { + "name": "constant.language.true.narrat", + "match": "\\btrue\\b" + }, + { + "name": "constant.language.false.narrat", + "match": "\\bfalse\\b" + }, + { + "name": "constant.language.null.narrat", + "match": "\\bnull\\b" + }, + { + "name": "constant.language.undefined.narrat", + "match": "\\bundefined\\b" + } + ] + }, + "comments": { + "patterns": [ + { + "name": "comment.line.narrat", + "match": "\\/\\/.*$" + } + ] + } + }, + "scopeName": "source.narrat" +} diff --git a/src/lib/shiki/languages/nextflow.tmLanguage.json b/src/lib/shiki/languages/nextflow.tmLanguage.json new file mode 100644 index 0000000..dee964a --- /dev/null +++ b/src/lib/shiki/languages/nextflow.tmLanguage.json @@ -0,0 +1,299 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "nextflow", + "scopeName": "source.nextflow", + "keyEquivalent": "^~N", + "patterns": [ + { + "include": "#nfl-rules" + } + ], + "repository": { + "nfl-rules": { + "patterns": [ + { + "include": "#process-def" + }, + { + "include": "#workflow-def" + }, + { + "include": "#code-block" + }, + { + "include": "#include-statement" + }, + { + "include": "#implicit-variables" + }, + { + "comment": "method call and parens", + "begin": "(\\w*\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "source.nextflow-groovy" + } + ] + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#nfl-rules" + } + ] + }, + { + "comment": "braces", + "begin": "{", + "end": "}", + "patterns": [ + { + "include": "#nfl-rules" + } + ] + }, + { + "include": "source.nextflow-groovy" + } + ] + }, + "process-def": { + "name": "process.nextflow", + "begin": "^\\s*(process)\\s+(\\w+|\"[^\"]+\"|'[^']+')\\s*{", + "beginCaptures": { + "1": { + "name": "keyword.nextflow" + }, + "2": { + "name": "function.nextflow" + } + }, + "end": "}", + "patterns": [ + { + "include": "#process-body" + } + ] + }, + "process-body": { + "patterns": [ + { + "name": "entity.name.function.nextflow", + "match": "(?:accelerator|afterScript|beforeScript|cache|cpus|conda|container|containerOptions|clusterOptions|debug|disk|echo|errorStrategy|executor|ext|label|machineType|maxErrors|maxForks|maxRetries|memory|module|penv|pod|publishDir|queue|resourceLabels|scratch|stageInMode|stageOutMode|storeDir|tag|time)\\b" + }, + { + "name": "constant.block.nextflow", + "match": "(?:input|output|when|script|shell|exec):" + }, + { + "name": "entity.name.function.nextflow", + "match": "\\b(tuple|set|path|file|val|stdout)(\\(|\\s)" + }, + { + "include": "#implicit-variables" + }, + { + "comment": "method call and parens", + "begin": "(\\w*\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "source.nextflow-groovy" + } + ] + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#process-body" + } + ] + }, + { + "comment": "braces", + "begin": "{", + "end": "}", + "patterns": [ + { + "include": "#process-body" + } + ] + }, + { + "include": "source.nextflow-groovy#comments" + }, + { + "include": "source.nextflow-groovy#support-functions" + }, + { + "include": "source.nextflow-groovy#keyword" + }, + { + "include": "source.nextflow-groovy#values" + }, + { + "include": "source.nextflow-groovy#anonymous-classes-and-new" + }, + { + "include": "source.nextflow-groovy#types" + }, + { + "include": "source.nextflow-groovy#parens" + }, + { + "include": "source.nextflow-groovy#closures" + }, + { + "include": "source.nextflow-groovy#braces" + } + ] + }, + "workflow-def": { + "name": "workflow.nextflow", + "begin": "^\\s*(workflow)(?:\\s+(\\w+|\"[^\"]+\"|'[^']+'))?\\s*{", + "beginCaptures": { + "1": { + "name": "keyword.nextflow" + }, + "2": { + "name": "constant.nextflow" + } + }, + "end": "}", + "patterns": [ + { + "include": "#workflow-body" + } + ] + }, + "workflow-body": { + "patterns": [ + { + "include": "#implicit-variables" + }, + { + "name": "constant.block.nextflow", + "match": "(?:take|main|emit):" + }, + { + "name": "entity.name.function.nextflow", + "match": "(?<=[\\s\\.])(branch|buffer|close|collate|collect|collectFile|combine|concat|count|countBy|cross|distinct|dump|filter|first|flatMap|flatten|groupTuple|ifEmpty|join|last|map|max|merge|min|mix|multiMap|randomSample|reduce|set|splitCsv|splitFasta|splitFastq|splitText|sum|take|tap|toInteger|toList|toSortedList|transpose|unique|until|view)(?=[{\\(\\s])" + }, + { + "comment": "Channel factory single line", + "match": "\\b((?:C|c)hannel\\.)((fromList|fromPath|fromFilePairs|fromSRA|from|of|empty|value|watchPath)\\W)?", + "captures": { + "1": { + "name": "keyword.nextflow" + }, + "2": { + "name": "entity.name.function.nextflow" + } + } + }, + { + "comment": "Channel factory multi-line", + "begin": "\\b((?:C|c)hannel)\\s*$", + "beginCaptures": { + "1": { + "name": "keyword.nextflow" + } + }, + "end": "(^\\s*)(?:(\\.)(fromList|fromPath|fromFilePairs|fromSRA|from|of|empty|value|watchPath)\\W)?", + "endCaptures": { + "1": { + "name": "keyword.nextflow" + }, + "2": { + "name": "keyword.nextflow" + }, + "3": { + "name": "entity.name.function.nextflow" + } + } + }, + { + "comment": "method call and parens", + "begin": "(\\w*\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "source.nextflow-groovy" + } + ] + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#workflow-body" + } + ] + }, + { + "comment": "braces", + "begin": "{", + "end": "}", + "patterns": [ + { + "include": "#workflow-body" + } + ] + }, + { + "include": "source.nextflow-groovy#comments" + }, + { + "include": "source.nextflow-groovy#support-functions" + }, + { + "include": "source.nextflow-groovy#keyword" + }, + { + "include": "source.nextflow-groovy#values" + }, + { + "include": "source.nextflow-groovy#anonymous-classes-and-new" + }, + { + "include": "source.nextflow-groovy#types" + }, + { + "include": "source.nextflow-groovy#parens" + }, + { + "include": "source.nextflow-groovy#closures" + }, + { + "include": "source.nextflow-groovy#braces" + } + ] + }, + "include-statement": { + "patterns": [ + { + "match": "^\\b(include)\\b", + "name": "keyword.nextflow" + }, + { + "match": "\\b(from)\\b", + "name": "keyword.nextflow" + } + ] + }, + "implicit-variables": { + "patterns": [ + { + "match": "(?<=[^\\.\\w]|^)(params|nextflow|workflow|launchDir|moduleDir|projectDir|workDir)\\b", + "name": "variable.language.nextflow" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/nginx.tmLanguage.json b/src/lib/shiki/languages/nginx.tmLanguage.json new file mode 100644 index 0000000..8ad689e --- /dev/null +++ b/src/lib/shiki/languages/nginx.tmLanguage.json @@ -0,0 +1,2122 @@ +{ + "fileTypes": [ + "conf.erb", + "conf", + "ngx", + "nginx.conf", + "mime.types", + "fastcgi_params", + "scgi_params", + "uwsgi_params" + ], + "foldingStartMarker": "\\{\\s*$", + "foldingStopMarker": "^\\s*\\}", + "keyEquivalent": "^~N", + "name": "nginx", + "patterns": [ + { + "name": "comment.line.number-sign", + "match": "\\#.*" + }, + { + "name": "meta.context.lua.nginx", + "begin": "\\b((?:content|rewrite|access|init_worker|init|set|log|balancer|ssl_(?:client_hello|session_fetch|certificate))_by_lua(?:_block)?)\\s*\\{", + "end": "\\}", + "beginCaptures": { + "1": { + "name": "storage.type.directive.context.nginx" + } + }, + "contentName": "meta.embedded.block.lua", + "patterns": [ + { + "include": "source.lua" + } + ] + }, + { + "name": "meta.context.lua.nginx", + "begin": "\\b((?:content|rewrite|access|init_worker|init|set|log|balancer|ssl_(?:client_hello|session_fetch|certificate))_by_lua)\\s*'", + "end": "'", + "beginCaptures": { + "1": { + "name": "storage.type.directive.context.nginx" + } + }, + "contentName": "meta.embedded.block.lua", + "patterns": [ + { + "include": "source.lua" + } + ] + }, + { + "name": "meta.context.events.nginx", + "begin": "\\b(events) +\\{", + "end": "\\}", + "beginCaptures": { + "1": { + "name": "storage.type.directive.context.nginx" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "name": "meta.context.http.nginx", + "begin": "\\b(http) +\\{", + "end": "\\}", + "beginCaptures": { + "1": { + "name": "storage.type.directive.context.nginx" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "name": "meta.context.mail.nginx", + "begin": "\\b(mail) +\\{", + "end": "\\}", + "beginCaptures": { + "1": { + "name": "storage.type.directive.context.nginx" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "name": "meta.context.stream.nginx", + "begin": "\\b(stream) +\\{", + "end": "\\}", + "beginCaptures": { + "1": { + "name": "storage.type.directive.context.nginx" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "name": "meta.context.server.nginx", + "begin": "\\b(server) +\\{", + "end": "\\}", + "beginCaptures": { + "1": { + "name": "storage.type.directive.context.nginx" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "name": "meta.context.location.nginx", + "begin": "\\b(location) +([\\^]?~[\\*]?|=) +(.*?)\\{", + "end": "\\}", + "beginCaptures": { + "1": { + "name": "storage.type.directive.context.nginx" + }, + "2": { + "name": "keyword.operator.nginx" + }, + "3": { + "name": "string.regexp.nginx" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "name": "meta.context.location.nginx", + "begin": "\\b(location) +(.*?)\\{", + "end": "\\}", + "beginCaptures": { + "1": { + "name": "storage.type.directive.context.nginx" + }, + "2": { + "name": "entity.name.context.location.nginx" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "name": "meta.context.limit_except.nginx", + "begin": "\\b(limit_except) +\\{", + "end": "\\}", + "beginCaptures": { + "1": { + "name": "storage.type.directive.context.nginx" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "name": "meta.context.if.nginx", + "begin": "\\b(if) +\\(", + "end": "\\)", + "beginCaptures": { + "1": { + "name": "keyword.control.nginx" + } + }, + "patterns": [ + { + "include": "#if_condition" + } + ] + }, + { + "name": "meta.context.upstream.nginx", + "begin": "\\b(upstream) +(.*?)\\{", + "end": "\\}", + "beginCaptures": { + "1": { + "name": "storage.type.directive.context.nginx" + }, + "2": { + "name": "entity.name.context.location.nginx" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "name": "meta.context.types.nginx", + "begin": "\\b(types) +\\{", + "end": "\\}", + "beginCaptures": { + "1": { + "name": "storage.type.directive.context.nginx" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "name": "meta.context.map.nginx", + "begin": "\\b(map) +(\\$)([A-Za-z0-9\\_]+) +(\\$)([A-Za-z0-9\\_]+) *\\{", + "end": "\\}", + "beginCaptures": { + "1": { + "name": "storage.type.directive.context.nginx" + }, + "2": { + "name": "punctuation.definition.variable.nginx" + }, + "3": { + "name": "variable.parameter.nginx" + }, + "4": { + "name": "punctuation.definition.variable.nginx" + }, + "5": { + "name": "variable.other.nginx" + } + }, + "patterns": [ + { + "include": "#values" + }, + { + "name": "punctuation.terminator.nginx", + "match": ";" + }, + { + "name": "comment.line.number-sign", + "match": "\\#.*" + } + ] + }, + { + "name": "meta.block.nginx", + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\b(return)\\b", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.control.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "\\b(rewrite)\\s+", + "end": "(last|break|redirect|permanent)?(;)", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "1": { + "name": "keyword.other.nginx" + }, + "2": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "\\b(server)\\s+", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#server_parameters" + } + ] + }, + { + "begin": "\\b(internal|empty_gif|f4f|flv|hls|mp4|break|status|stub_status|ip_hash|ntlm|least_conn|upstream_conf|least_conn|zone_sync)\\b", + "end": "(;|$)", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.terminator.nginx" + } + } + }, + { + "begin": "([\"'\\s]|^)(accept_)(mutex|mutex_delay)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(debug_)(connection|points)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(error_)(log|page)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(ssl_)(engine|buffer_size|certificate|certificate_key|ciphers|client_certificate|conf_command|crl|dhparam|early_data|ecdh_curve|ocsp|ocsp_cache|ocsp_responder|password_file|prefer_server_ciphers|protocols|reject_handshake|session_cache|session_ticket_key|session_tickets|session_timeout|stapling|stapling_file|stapling_responder|stapling_verify|trusted_certificate|verify_client|verify_depth|alpn|handshake_timeout|preread)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(worker_)(aio_requests|connections|cpu_affinity|priority|processes|rlimit_core|rlimit_nofile|shutdown_timeout)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(auth_)(delay|basic|basic_user_file|jwt|jwt_claim_set|jwt_header_set|jwt_key_file|jwt_key_request|jwt_leeway|jwt_type|jwt_require|request|request_set|http|http_header|http_pass_client_cert|http_timeout)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(client_)(body_buffer_size|body_in_file_only|body_in_single_buffer|body_temp_path|body_timeout|header_buffer_size|header_timeout|max_body_size)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(keepalive_)(disable|requests|time|timeout)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(limit_)(rate|rate_after|conn|conn_dry_run|conn_log_level|conn_status|conn_zone|zone|req|req_dry_run|req_log_level|req_status|req_zone)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(lingering_)(close|time|timeout)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(log_)(not_found|subrequest|format)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(max_)(ranges|errors)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(msie_)(padding|refresh)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(open_)(file_cache|file_cache_errors|file_cache_min_uses|file_cache_valid|log_file_cache)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(send_)(lowat|timeout)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(server_)(name|name_in_redirect|names_hash_bucket_size|names_hash_max_size|tokens)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(tcp_)(nodelay|nopush)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(types_)(hash_bucket_size|hash_max_size)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(variables_)(hash_bucket_size|hash_max_size)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(add_)(before_body|after_body|header|trailer)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(status_)(zone|format)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(autoindex_)(exact_size|format|localtime)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(ancient_)(browser|browser_value)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(modern_)(browser|browser_value)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(charset_)(map|types)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(dav_)(access|methods)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(fastcgi_)(bind|buffer_size|buffering|buffers|busy_buffers_size|cache|cache_background_update|cache_bypass|cache_key|cache_lock|cache_lock_age|cache_lock_timeout|cache_max_range_offset|cache_methods|cache_min_uses|cache_path|cache_purge|cache_revalidate|cache_use_stale|cache_valid|catch_stderr|connect_timeout|force_ranges|hide_header|ignore_client_abort|ignore_headers|index|intercept_errors|keep_conn|limit_rate|max_temp_file_size|next_upstream|next_upstream_timeout|next_upstream_tries|no_cache|param|pass|pass_header|pass_request_body|pass_request_headers|read_timeout|request_buffering|send_lowat|send_timeout|socket_keepalive|split_path_info|store|store_access|temp_file_write_size|temp_path)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(geoip_)(country|city|org|proxy|proxy_recursive)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(grpc_)(bind|buffer_size|connect_timeout|hide_header|ignore_headers|intercept_errors|next_upstream|next_upstream_timeout|next_upstream_tries|pass|pass_header|read_timeout|send_timeout|set_header|socket_keepalive|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_conf_command|ssl_crl|ssl_name|ssl_password_file|ssl_protocols|ssl_server_name|ssl_session_reuse|ssl_trusted_certificate|ssl_verify|ssl_verify_depth)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(gzip_)(buffers|comp_level|disable|http_version|min_length|proxied|types|vary|static)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(hls_)(buffers|forward_args|fragment|mp4_buffer_size|mp4_max_buffer_size)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(image_)(filter|filter_buffer|filter_interlace|filter_jpeg_quality|filter_sharpen|filter_transparency|filter_webp_quality)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(map_)(hash_bucket_size|hash_max_size)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(memcached_)(bind|buffer_size|connect_timeout|force_ranges|gzip_flag|next_upstream|next_upstream_timeout|next_upstream_tries|pass|read_timeout|send_timeout|socket_keepalive)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(mp4_)(buffer_size|max_buffer_size|limit_rate|limit_rate_after)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(perl_)(modules|require|set)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(proxy_)(bind|buffer_size|buffering|buffers|busy_buffers_size|cache|cache_background_update|cache_bypass|cache_convert_head|cache_key|cache_lock|cache_lock_age|cache_lock_timeout|cache_max_range_offset|cache_methods|cache_min_uses|cache_path|cache_purge|cache_revalidate|cache_use_stale|cache_valid|connect_timeout|cookie_domain|cookie_flags|cookie_path|force_ranges|headers_hash_bucket_size|headers_hash_max_size|hide_header|http_version|ignore_client_abort|ignore_headers|intercept_errors|limit_rate|max_temp_file_size|method|next_upstream|next_upstream_timeout|next_upstream_tries|no_cache|pass|pass_header|pass_request_body|pass_request_headers|read_timeout|redirect|request_buffering|send_lowat|send_timeout|set_body|set_header|socket_keepalive|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_conf_command|ssl_crl|ssl_name|ssl_password_file|ssl_protocols|ssl_server_name|ssl_session_reuse|ssl_trusted_certificate|ssl_verify|ssl_verify_depth|store|store_access|temp_file_write_size|temp_path|buffer|pass_error_message|protocol|smtp_auth|timeout|protocol_timeout|download_rate|half_close|requests|responses|session_drop|ssl|upload_rate)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(real_)(ip_header|ip_recursive)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(referer_)(hash_bucket_size|hash_max_size)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(scgi_)(bind|buffer_size|buffering|buffers|busy_buffers_size|cache|cache_background_update|cache_bypass|cache_key|cache_lock|cache_lock_age|cache_lock_timeout|cache_max_range_offset|cache_methods|cache_min_uses|cache_path|cache_purge|cache_revalidate|cache_use_stale|cache_valid|connect_timeout|force_ranges|hide_header|ignore_client_abort|ignore_headers|intercept_errors|limit_rate|max_temp_file_size|next_upstream|next_upstream_timeout|next_upstream_tries|no_cache|param|pass|pass_header|pass_request_body|pass_request_headers|read_timeout|request_buffering|send_timeout|socket_keepalive|store|store_access|temp_file_write_size|temp_path)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(secure_)(link|link_md5|link_secret)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(session_)(log|log_format|log_zone)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(spdy_)(chunk_size|headers_comp)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(ssi_)(last_modified|min_file_chunk|silent_errors|types|value_length)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(sub_)(filter|filter_last_modified|filter_once|filter_types)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(health_)(check|check_timeout)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(userid_)(domain|expires|flags|mark|name|p3p|path|service)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(uwsgi_)(bind|buffer_size|buffering|buffers|busy_buffers_size|cache|cache_background_update|cache_bypass|cache_key|cache_lock|cache_lock_age|cache_lock_timeout|cache_max_range_offset|cache_methods|cache_min_uses|cache_path|cache_purge|cache_revalidate|cache_use_stale|cache_valid|connect_timeout|force_ranges|hide_header|ignore_client_abort|ignore_headers|intercept_errors|limit_rate|max_temp_file_size|modifier1|modifier2|next_upstream|next_upstream_timeout|next_upstream_tries|no_cache|param|pass|pass_header|pass_request_body|pass_request_headers|read_timeout|request_buffering|send_timeout|socket_keepalive|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_conf_command|ssl_crl|ssl_name|ssl_password_file|ssl_protocols|ssl_server_name|ssl_session_reuse|ssl_trusted_certificate|ssl_verify|ssl_verify_depth|store|store_access|temp_file_write_size|temp_path)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(http2_)(body_preread_size|chunk_size|idle_timeout|max_concurrent_pushes|max_concurrent_streams|max_field_size|max_header_size|max_requests|push|push_preload|recv_buffer_size|recv_timeout)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(xslt_)(last_modified|param|string_param|stylesheet|types)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(imap_)(auth|capabilities|client_buffer)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(pop3_)(auth|capabilities)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(smtp_)(auth|capabilities|client_buffer|greeting_delay)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(preread_)(buffer_size|timeout)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(zone_)(sync_buffers|sync_connect_retry_interval|sync_connect_timeout|sync_interval|sync_recv_buffer_size|sync_server|sync_ssl|sync_ssl_certificate|sync_ssl_certificate_key|sync_ssl_ciphers|sync_ssl_conf_command|sync_ssl_crl|sync_ssl_name|sync_ssl_password_file|sync_ssl_protocols|sync_ssl_server_name|sync_ssl_trusted_certificate|sync_ssl_verify|sync_ssl_verify_depth|sync_timeout)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(js_)(body_filter|content|fetch_ciphers|fetch_protocols|fetch_trusted_certificate|fetch_verify_depth|header_filter|import|include|path|set|var|access|filter|preread)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + }, + "4": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "([\"'\\s]|^)(daemon|env|include|pid|use|user|aio|alias|directio|etag|listen|resolver|root|satisfy|sendfile|allow|deny|api|autoindex|charset|geo|gunzip|gzip|expires|index|keyval|mirror|perl|set|slice|ssi|ssl|zone|state|hash|keepalive|queue|random|sticky|match|userid|protocol|timeout|xclient|starttls|load_module|lock_file|master_process|multi_accept|pcre_jit|thread_pool|timer_resolution|working_directory|absolute_redirect|aio_write|chunked_transfer_encoding|connection_pool_size|default_type|directio_alignment|disable_symlinks|if_modified_since|ignore_invalid_headers|large_client_header_buffers|merge_slashes|output_buffers|port_in_redirect|postpone_output|read_ahead|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver_timeout|sendfile_max_chunk|subrequest_output_buffer_size|try_files|underscores_in_headers|addition_types|override_charset|source_charset|create_full_put_path|min_delete_depth|f4f_buffer_size|gunzip_buffers|keyval_zone|access_log|mirror_request_body|random_index|set_real_ip_from|valid_referers|rewrite_log|uninitialized_variable_warn|split_clients|least_time|sticky_cookie_insert|xml_entities|google_perftools_profiles)([\"'\\s]|$)", + "end": ";", + "beginCaptures": { + "1": { + "name": "keyword.directive.nginx" + }, + "2": { + "name": "keyword.directive.nginx" + }, + "3": { + "name": "keyword.directive.nginx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "\\b([a-zA-Z0-9\\_]+)\\s+", + "end": "(;|$)", + "beginCaptures": { + "1": { + "name": "keyword.directive.unknown.nginx" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + }, + { + "begin": "\\b([a-z]+\\/[A-Za-z0-9\\-\\.\\+]+)\\b", + "end": "(;)", + "beginCaptures": { + "1": { + "name": "constant.other.mediatype.nginx" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.terminator.nginx" + } + }, + "patterns": [ + { + "include": "#values" + } + ] + } + ], + "repository": { + "if_condition": { + "patterns": [ + { + "include": "#variables" + }, + { + "name": "keyword.operator.nginx", + "match": "\\!?\\~\\*?\\s" + }, + { + "name": "keyword.operator.nginx", + "match": "\\!?\\-[fdex]\\s" + }, + { + "name": "keyword.operator.nginx", + "match": "\\!?=[^=]" + }, + { + "include": "#regexp_and_string" + } + ] + }, + "server_parameters": { + "patterns": [ + { + "match": "(?:^|\\s)(weight|max_conn|max_fails|fail_timeout|slow_start)(=)([0-9][0-9\\.]*[bBkKmMgGtTsShHdD]?)(?:\\s|;|$)", + "captures": { + "1": { + "name": "variable.parameter.nginx" + }, + "2": { + "name": "keyword.operator.nginx" + }, + "3": { + "name": "constant.numeric.nginx" + } + } + }, + { + "include": "#values" + } + ] + }, + "variables": { + "patterns": [ + { + "match": "(\\$)([A-Za-z0-9\\_]+)\\b", + "captures": { + "1": { + "name": "punctuation.definition.variable.nginx" + }, + "2": { + "name": "variable.other.nginx" + } + } + }, + { + "match": "(\\$\\{)([A-Za-z0-9\\_]+)(\\})", + "captures": { + "1": { + "name": "punctuation.definition.variable.nginx" + }, + "2": { + "name": "variable.other.nginx" + }, + "3": { + "name": "punctuation.definition.variable.nginx" + } + } + } + ] + }, + "regexp_and_string": { + "patterns": [ + { + "name": "string.regexp.nginx", + "match": "\\^.*?\\$" + }, + { + "name": "string.quoted.double.nginx", + "begin": "\"", + "end": "\"", + "patterns": [ + { + "name": "constant.character.escape.nginx", + "match": "\\\\[\"'nt\\\\]" + }, + { + "include": "#variables" + } + ] + }, + { + "name": "string.quoted.single.nginx", + "begin": "'", + "end": "'", + "patterns": [ + { + "name": "constant.character.escape.nginx", + "match": "\\\\[\"'nt\\\\]" + }, + { + "include": "#variables" + } + ] + } + ] + }, + "values": { + "patterns": [ + { + "include": "#variables" + }, + { + "name": "comment.line.number-sign", + "match": "\\#.*" + }, + { + "match": "[\\t ](=?[0-9][0-9\\.]*[bBkKmMgGtTsShHdD]?)(?=[\\t ;])", + "captures": { + "1": { + "name": "constant.numeric.nginx" + } + } + }, + { + "name": "constant.language.nginx", + "match": "[\\t ](on|off|true|false)(?=[\\t ;])" + }, + { + "name": "constant.language.nginx", + "match": "[\\t ](kqueue|rtsig|epoll|\\/dev\\/poll|select|poll|eventport|max|all|default_server|default|main|crit|error|debug|warn|notice|last)(?=[\\t ;])" + }, + { + "name": "keyword.operator.nginx", + "match": "\\\\.*\\ |\\~\\*|\\~|\\!\\~\\*|\\!\\~" + }, + { + "include": "#regexp_and_string" + } + ] + } + }, + "scopeName": "source.nginx", + "uuid": "0C04066A-12D2-43CA-8238-00A12CE4C12D" +} diff --git a/src/lib/shiki/languages/nim.tmLanguage.json b/src/lib/shiki/languages/nim.tmLanguage.json new file mode 100644 index 0000000..02d291d --- /dev/null +++ b/src/lib/shiki/languages/nim.tmLanguage.json @@ -0,0 +1,1521 @@ +{ + "fileTypes": ["nim"], + "keyEquivalent": "^~N", + "name": "nim", + "patterns": [ + { + "begin": "[ \\t]*##\\[", + "contentName": "comment.block.doc-comment.content.nim", + "end": "\\]##", + "name": "comment.block.doc-comment.nim", + "patterns": [ + { + "include": "#multilinedoccomment", + "name": "comment.block.doc-comment.nested.nim" + } + ] + }, + { + "begin": "[ \\t]*#\\[", + "contentName": "comment.block.content.nim", + "end": "\\]#", + "name": "comment.block.nim", + "patterns": [ + { + "include": "#multilinecomment", + "name": "comment.block.nested.nim" + } + ] + }, + { + "begin": "(^[ \\t]+)?(?=##)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.nim" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "##", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.nim" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.doc-comment.nim" + } + ] + }, + { + "begin": "(^[ \\t]+)?(?=#[^\\[])", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.nim" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.nim" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.nim" + } + ] + }, + { + "comment": "A nim procedure or method", + "name": "meta.proc.nim", + "patterns": [ + { + "begin": "\\b(proc|method|template|macro|iterator|converter|func)\\s+\\`?([^\\:\\{\\s\\`\\*\\(]*)\\`?(\\s*\\*)?\\s*(?=\\(|\\=|:|\\[|\\n|\\{)", + "captures": { + "1": { + "name": "keyword.other" + }, + "2": { + "name": "entity.name.function.nim" + }, + "3": { + "name": "keyword.control.export" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "source.nim" + } + ] + } + ] + }, + { + "begin": "discard \"\"\"", + "comment": "A discarded triple string literal comment", + "end": "\"\"\"(?!\")", + "name": "comment.line.discarded.nim" + }, + { + "include": "#float_literal" + }, + { + "include": "#integer_literal" + }, + { + "comment": "Operator as function name", + "match": "(?<=\\`)[^\\` ]+(?=\\`)", + "name": "entity.name.function.nim" + }, + { + "captures": { + "1": { + "name": "keyword.control.export" + } + }, + "comment": "Export qualifier.", + "match": "\\b\\s*(\\*)(?:\\s*(?=[,:])|\\s+(?=[=]))" + }, + { + "comment": "Export qualifier following a type def.", + "match": "\\b([A-Z]\\w+)(\\*)", + "captures": { + "1": { + "name": "support.type.nim" + }, + "2": { + "name": "keyword.control.export" + } + } + }, + { + "include": "#string_literal" + }, + { + "comment": "Language Constants.", + "match": "\\b(true|false|Inf|NegInf|NaN|nil)\\b", + "name": "constant.language.nim" + }, + { + "comment": "Keywords that affect program control flow or scope.", + "match": "\\b(block|break|case|continue|do|elif|else|end|except|finally|for|if|raise|return|try|when|while|yield)\\b", + "name": "keyword.control.nim" + }, + { + "comment": "Keyword boolean operators for expressions.", + "match": "(\\b(and|in|is|isnot|not|notin|or|xor)\\b)", + "name": "keyword.boolean.nim" + }, + { + "comment": "Generic operators for expressions.", + "match": "(=|\\+|-|\\*|/|<|>|@|\\$|~|&|%|!|\\?|\\^|\\.|:|\\\\)+", + "name": "keyword.operator.nim" + }, + { + "comment": "Other keywords.", + "match": "(\\b(addr|as|asm|atomic|bind|cast|const|converter|concept|defer|discard|distinct|div|enum|export|from|import|include|let|mod|mixin|object|of|ptr|ref|shl|shr|static|type|using|var|tuple|iterator|macro|func|method|proc|template)\\b)", + "name": "keyword.other.nim" + }, + { + "comment": "Invalid and unused keywords.", + "match": "(\\b(generic|interface|lambda|out|shared)\\b)", + "name": "invalid.illegal.invalid-keyword.nim" + }, + { + "comment": "Common functions", + "match": "\\b(new|await|assert|echo|defined|declared|newException|countup|countdown|high|low)\\b", + "name": "keyword.other.common.function.nim" + }, + { + "comment": "Built-in, concrete types.", + "match": "\\b(((uint|int)(8|16|32|64)?)|float(32|64)?|bool|string|auto|cstring|char|byte|tobject|typedesc|stmt|expr|any|untyped|typed)\\b", + "name": "storage.type.concrete.nim" + }, + { + "comment": "Built-in, generic types.", + "match": "\\b(range|array|seq|set|pointer)\\b", + "name": "storage.type.generic.nim" + }, + { + "comment": "Special types.", + "match": "\\b(openarray|varargs|void)\\b", + "name": "storage.type.generic.nim" + }, + { + "comment": "Other constants.", + "match": "\\b[A-Z][A-Z0-9_]+\\b", + "name": "support.constant.nim" + }, + { + "comment": "Other types.", + "match": "\\b[A-Z]\\w+\\b", + "name": "support.type.nim" + }, + { + "comment": "Function call.", + "match": "\\b\\w+\\b(?=(\\[([a-zA-Z0-9_,]|\\s)+\\])?\\()", + "name": "support.function.any-method.nim" + }, + { + "comment": "Function call (no parenthesis).", + "match": "(?!(openarray|varargs|void|range|array|seq|set|pointer|new|await|assert|echo|defined|declared|newException|countup|countdown|high|low|((uint|int)(8|16|32|64)?)|float(32|64)?|bool|string|auto|cstring|char|byte|tobject|typedesc|stmt|expr|any|untyped|typed|addr|as|asm|atomic|bind|cast|const|converter|concept|defer|discard|distinct|div|enum|export|from|import|include|let|mod|mixin|object|of|ptr|ref|shl|shr|static|type|using|var|tuple|iterator|macro|func|method|proc|template|and|in|is|isnot|not|notin|or|xor|proc|method|template|macro|iterator|converter|func|true|false|Inf|NegInf|NaN|nil|block|break|case|continue|do|elif|else|end|except|finally|for|if|raise|return|try|when|while|yield)\\b)\\w+\\s+(?!(and|in|is|isnot|not|notin|or|xor|[^a-zA-Z0-9_\"'`(-+]+)\\b)(?=[a-zA-Z0-9_\"'`(-+])", + "name": "support.function.any-method.nim" + }, + { + "begin": "(^\\s*)?(?=\\{\\.emit: ?\"\"\")", + "beginCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.leading.nim" + } + }, + "end": "(?!\\G)(\\s*$\\n?)?", + "endCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.trailing.nim" + } + }, + "patterns": [ + { + "begin": "\\{\\.(emit:) ?(\"\"\")", + "captures": { + "1": { + "name": "keyword.other.nim" + }, + "2": { + "name": "punctuation.section.embedded.begin.nim" + } + }, + "contentName": "source.c", + "end": "(\")\"\"(?!\")(\\.{0,1}\\})?", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.nim" + }, + "1": { + "name": "source.c" + } + }, + "name": "meta.embedded.block.c", + "patterns": [ + { + "begin": "\\`", + "end": "\\`", + "name": "keyword.operator.nim" + }, + { + "include": "source.c" + } + ] + } + ] + }, + { + "begin": "\\{\\.", + "beginCaptures": { + "0": { + "name": "punctuation.pragma.start.nim" + } + }, + "end": "\\.?\\}", + "endCaptures": { + "0": { + "name": "punctuation.pragma.end.nim" + } + }, + "patterns": [ + { + "begin": "\\b([[:alpha:]]\\w*)(?:\\s|\\s*:)", + "beginCaptures": { + "1": { + "name": "meta.preprocessor.pragma.nim" + } + }, + "end": "(?=\\.?\\}|,)", + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "begin": "\\b([[:alpha:]]\\w*)\\(", + "beginCaptures": { + "1": { + "name": "meta.preprocessor.pragma.nim" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "match": "\\b([[:alpha:]]\\w*)(?=\\.?\\}|,)", + "captures": { + "1": { + "name": "meta.preprocessor.pragma.nim" + } + } + }, + { + "begin": "\\b([[:alpha:]]\\w*)(\"\"\")", + "beginCaptures": { + "1": { + "name": "meta.preprocessor.pragma.nim" + }, + "2": { + "name": "punctuation.definition.string.begin.nim" + } + }, + "end": "\"\"\"(?!\")", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.nim" + } + }, + "name": "string.quoted.triple.raw.nim" + }, + { + "begin": "\\b([[:alpha:]]\\w*)(\")", + "beginCaptures": { + "1": { + "name": "meta.preprocessor.pragma.nim" + }, + "2": { + "name": "punctuation.definition.string.begin.nim" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.nim" + } + }, + "name": "string.quoted.double.raw.nim" + }, + { + "begin": "\\b(hint\\[\\w+\\]):", + "beginCaptures": { + "1": { + "name": "meta.preprocessor.pragma.nim" + } + }, + "end": "(?=\\.?\\}|,)", + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "match": ",", + "name": "punctuation.separator.comma.nim" + } + ] + }, + { + "begin": "(^\\s*)?(?=asm \"\"\")", + "beginCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.leading.nim" + } + }, + "end": "(?!\\G)(\\s*$\\n?)?", + "endCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.trailing.nim" + } + }, + "patterns": [ + { + "begin": "(asm) (\"\"\")", + "captures": { + "1": { + "name": "keyword.other.nim" + }, + "2": { + "name": "punctuation.section.embedded.begin.nim" + } + }, + "contentName": "source.asm", + "end": "(\")\"\"(?!\")", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.nim" + }, + "1": { + "name": "source.asm" + } + }, + "name": "meta.embedded.block.asm", + "patterns": [ + { + "begin": "\\`", + "end": "\\`", + "name": "keyword.operator.nim" + }, + { + "include": "source.asm" + } + ] + } + ] + }, + { + "captures": { + "1": { + "name": "storage.type.function.nim" + }, + "2": { + "name": "keyword.operator.nim" + } + }, + "comment": "tmpl specifier", + "match": "(tmpl(i)?)(?=( (html|xml|js|css|glsl|md))?\"\"\")" + }, + { + "begin": "(^\\s*)?(?=html\"\"\")", + "beginCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.leading.nim" + } + }, + "end": "(?!\\G)(\\s*$\\n?)?", + "endCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.trailing.nim" + } + }, + "patterns": [ + { + "begin": "(html)(\"\"\")", + "captures": { + "1": { + "name": "keyword.other.nim" + }, + "2": { + "name": "punctuation.section.embedded.begin.nim" + } + }, + "contentName": "text.html", + "end": "(\")\"\"(?!\")", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.nim" + }, + "1": { + "name": "text.html" + } + }, + "name": "meta.embedded.block.html", + "patterns": [ + { + "begin": "(?<!\\$)(\\$)\\(", + "captures": { + "1": { + "name": "keyword.operator.nim" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "begin": "(?<!\\$)(\\$)\\{", + "captures": { + "1": { + "name": "keyword.operator.nim" + }, + "2": { + "name": "keyword.operator.nim" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )", + "captures": { + "1": { + "name": "keyword.operator.nim" + }, + "2": { + "name": "keyword.operator.nim" + } + }, + "end": "(\\{|\\n)", + "endCaptures": { + "1": { + "name": "plain" + } + }, + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "match": "(?<!\\$)(\\$\\w+)", + "name": "keyword.operator.nim" + }, + { + "include": "text.html.basic" + } + ] + } + ] + }, + { + "begin": "(^\\s*)?(?=xml\"\"\")", + "beginCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.leading.nim" + } + }, + "end": "(?!\\G)(\\s*$\\n?)?", + "endCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.trailing.nim" + } + }, + "patterns": [ + { + "begin": "(xml)(\"\"\")", + "captures": { + "1": { + "name": "keyword.other.nim" + }, + "2": { + "name": "punctuation.section.embedded.begin.nim" + } + }, + "contentName": "text.xml", + "end": "(\")\"\"(?!\")", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.nim" + }, + "1": { + "name": "text.xml" + } + }, + "name": "meta.embedded.block.xml", + "patterns": [ + { + "begin": "(?<!\\$)(\\$)\\(", + "captures": { + "1": { + "name": "keyword.operator.nim" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "begin": "(?<!\\$)(\\$)\\{", + "captures": { + "1": { + "name": "keyword.operator.nim" + }, + "2": { + "name": "keyword.operator.nim" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )", + "captures": { + "1": { + "name": "keyword.operator.nim" + }, + "2": { + "name": "keyword.operator.nim" + } + }, + "end": "(\\{|\\n)", + "endCaptures": { + "1": { + "name": "plain" + } + }, + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "match": "(?<!\\$)(\\$\\w+)", + "name": "keyword.operator.nim" + }, + { + "include": "text.xml" + } + ] + } + ] + }, + { + "begin": "(^\\s*)?(?=js\"\"\")", + "beginCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.leading.nim" + } + }, + "end": "(?!\\G)(\\s*$\\n?)?", + "endCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.trailing.nim" + } + }, + "patterns": [ + { + "begin": "(js)(\"\"\")", + "captures": { + "1": { + "name": "keyword.other.nim" + }, + "2": { + "name": "punctuation.section.embedded.begin.nim" + } + }, + "contentName": "source.js", + "end": "(\")\"\"(?!\")", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.nim" + }, + "1": { + "name": "source.js" + } + }, + "name": "meta.embedded.block.js", + "patterns": [ + { + "begin": "(?<!\\$)(\\$)\\(", + "captures": { + "1": { + "name": "keyword.operator.nim" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "begin": "(?<!\\$)(\\$)\\{", + "captures": { + "1": { + "name": "keyword.operator.nim" + }, + "2": { + "name": "keyword.operator.nim" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )", + "captures": { + "1": { + "name": "keyword.operator.nim" + }, + "2": { + "name": "keyword.operator.nim" + } + }, + "end": "(\\{|\\n)", + "endCaptures": { + "1": { + "name": "plain" + } + }, + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "match": "(?<!\\$)(\\$\\w+)", + "name": "keyword.operator.nim" + }, + { + "include": "source.js" + } + ] + } + ] + }, + { + "begin": "(^\\s*)?(?=css\"\"\")", + "beginCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.leading.nim" + } + }, + "end": "(?!\\G)(\\s*$\\n?)?", + "endCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.trailing.nim" + } + }, + "patterns": [ + { + "begin": "(css)(\"\"\")", + "captures": { + "1": { + "name": "keyword.other.nim" + }, + "2": { + "name": "punctuation.section.embedded.begin.nim" + } + }, + "contentName": "source.css", + "end": "(\")\"\"(?!\")", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.nim" + }, + "1": { + "name": "source.css" + } + }, + "name": "meta.embedded.block.css", + "patterns": [ + { + "begin": "(?<!\\$)(\\$)\\(", + "captures": { + "1": { + "name": "keyword.operator.nim" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "begin": "(?<!\\$)(\\$)\\{", + "captures": { + "1": { + "name": "keyword.operator.nim" + }, + "2": { + "name": "keyword.operator.nim" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )", + "captures": { + "1": { + "name": "keyword.operator.nim" + }, + "2": { + "name": "keyword.operator.nim" + } + }, + "end": "(\\{|\\n)", + "endCaptures": { + "1": { + "name": "plain" + } + }, + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "match": "(?<!\\$)(\\$\\w+)", + "name": "keyword.operator.nim" + }, + { + "include": "source.css" + } + ] + } + ] + }, + { + "begin": "(^\\s*)?(?=glsl\"\"\")", + "beginCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.leading.nim" + } + }, + "end": "(?!\\G)(\\s*$\\n?)?", + "endCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.trailing.nim" + } + }, + "patterns": [ + { + "begin": "(glsl)(\"\"\")", + "captures": { + "1": { + "name": "keyword.other.nim" + }, + "2": { + "name": "punctuation.section.embedded.begin.nim" + } + }, + "contentName": "source.glsl", + "end": "(\")\"\"(?!\")", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.nim" + }, + "1": { + "name": "source.glsl" + } + }, + "name": "meta.embedded.block.glsl", + "patterns": [ + { + "begin": "(?<!\\$)(\\$)\\(", + "captures": { + "1": { + "name": "keyword.operator.nim" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "begin": "(?<!\\$)(\\$)\\{", + "captures": { + "1": { + "name": "keyword.operator.nim" + }, + "2": { + "name": "keyword.operator.nim" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )", + "captures": { + "1": { + "name": "keyword.operator.nim" + }, + "2": { + "name": "keyword.operator.nim" + } + }, + "end": "(\\{|\\n)", + "endCaptures": { + "1": { + "name": "plain" + } + }, + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "match": "(?<!\\$)(\\$\\w+)", + "name": "keyword.operator.nim" + }, + { + "include": "source.glsl" + } + ] + } + ] + }, + { + "begin": "(^\\s*)?(?=md\"\"\")", + "beginCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.leading.nim" + } + }, + "end": "(?!\\G)(\\s*$\\n?)?", + "endCaptures": { + "0": { + "name": "punctuation.whitespace.embedded.trailing.nim" + } + }, + "patterns": [ + { + "begin": "(md)(\"\"\")", + "captures": { + "1": { + "name": "keyword.other.nim" + }, + "2": { + "name": "punctuation.section.embedded.begin.nim" + } + }, + "contentName": "text.html.markdown", + "end": "(\")\"\"(?!\")", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.nim" + }, + "1": { + "name": "text.html.markdown" + } + }, + "name": "meta.embedded.block.html.markdown", + "patterns": [ + { + "begin": "(?<!\\$)(\\$)\\(", + "captures": { + "1": { + "name": "keyword.operator.nim" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "begin": "(?<!\\$)(\\$)\\{", + "captures": { + "1": { + "name": "keyword.operator.nim" + }, + "2": { + "name": "keyword.operator.nim" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )", + "captures": { + "1": { + "name": "keyword.operator.nim" + }, + "2": { + "name": "keyword.operator.nim" + } + }, + "end": "(\\{|\\n)", + "endCaptures": { + "1": { + "name": "plain" + } + }, + "patterns": [ + { + "include": "source.nim" + } + ] + }, + { + "match": "(?<!\\$)(\\$\\w+)", + "name": "keyword.operator.nim" + }, + { + "include": "text.html.markdown" + } + ] + } + ] + } + ], + "repository": { + "multilinecomment": { + "begin": "#\\[", + "end": "\\]#", + "patterns": [ + { + "include": "#multilinecomment" + } + ] + }, + "multilinedoccomment": { + "begin": "##\\[", + "end": "\\]##", + "patterns": [ + { + "include": "#multilinedoccomment" + } + ] + }, + "char_escapes": { + "patterns": [ + { + "match": "\\\\[cC]|\\\\[rR]", + "name": "constant.character.escape.carriagereturn.nim" + }, + { + "match": "\\\\[lL]|\\\\[nN]", + "name": "constant.character.escape.linefeed.nim" + }, + { + "match": "\\\\[fF]", + "name": "constant.character.escape.formfeed.nim" + }, + { + "match": "\\\\[tT]", + "name": "constant.character.escape.tabulator.nim" + }, + { + "match": "\\\\[vV]", + "name": "constant.character.escape.verticaltabulator.nim" + }, + { + "match": "\\\\\\\"", + "name": "constant.character.escape.double-quote.nim" + }, + { + "match": "\\\\'", + "name": "constant.character.escape.single-quote.nim" + }, + { + "match": "\\\\[0-9]+", + "name": "constant.character.escape.chardecimalvalue.nim" + }, + { + "match": "\\\\[aA]", + "name": "constant.character.escape.alert.nim" + }, + { + "match": "\\\\[bB]", + "name": "constant.character.escape.backspace.nim" + }, + { + "match": "\\\\[eE]", + "name": "constant.character.escape.escape.nim" + }, + { + "match": "\\\\[xX]\\h\\h", + "name": "constant.character.escape.hex.nim" + }, + { + "match": "\\\\\\\\", + "name": "constant.character.escape.backslash.nim" + } + ] + }, + "string_escapes": { + "patterns": [ + { + "match": "\\\\[pP]", + "name": "constant.character.escape.newline.nim" + }, + { + "match": "\\\\[uU]\\h\\h\\h\\h", + "name": "constant.character.escape.hex.nim" + }, + { + "match": "\\\\[uU]\\{\\h+\\}", + "name": "constant.character.escape.hex.nim" + }, + { + "include": "#char_escapes" + } + ] + }, + "raw_string_escapes": { + "match": "[^\"](\"\")", + "captures": { + "1": { + "name": "constant.character.escape.double-quote.nim" + } + } + }, + "fmt_interpolation": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.template-expression.begin.nim" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.template-expression.end.nim" + } + }, + "patterns": [ + { + "begin": ":", + "end": "(?=\\})", + "name": "meta.template.format-specifier.nim" + }, + { + "include": "source.nim" + } + ], + "name": "meta.template.expression.nim" + }, + "string_literal": { + "patterns": [ + { + "include": "#fmt_string_triple" + }, + { + "include": "#fmt_string_triple_operator" + }, + { + "include": "#extended_string_quoted_triple_raw" + }, + { + "include": "#string_quoted_triple_raw" + }, + { + "include": "#fmt_string_operator" + }, + { + "include": "#fmt_string" + }, + { + "include": "#fmt_string_call" + }, + { + "include": "#string_quoted_double_raw" + }, + { + "include": "#extended_string_quoted_double_raw" + }, + { + "include": "#string_quoted_single" + }, + { + "include": "#string_quoted_triple" + }, + { + "include": "#string_quoted_double" + } + ] + }, + "fmt_string": { + "begin": "\\b(fmt)(\")", + "beginCaptures": { + "1": { + "name": "support.function.any-method.nim" + }, + "2": { + "name": "punctuation.definition.string.begin.nim" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.nim" + } + }, + "name": "string.quoted.double.raw.nim", + "patterns": [ + { + "match": "(?<!\")\"(?!\")", + "name": "invalid.illegal.nim" + }, + { + "include": "#raw_string_escapes" + }, + { + "include": "#fmt_interpolation" + } + ] + }, + "fmt_string_triple": { + "begin": "\\b(fmt)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.any-method.nim" + }, + "2": { + "name": "punctuation.definition.string.begin.nim" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.nim" + } + }, + "name": "string.quoted.triple.raw.nim", + "patterns": [ + { + "include": "#fmt_interpolation" + } + ] + }, + "fmt_string_operator": { + "begin": "(&)(\")", + "beginCaptures": { + "1": { + "name": "keyword.operator.nim" + }, + "2": { + "name": "punctuation.definition.string.begin.nim" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.nim" + } + }, + "name": "string.quoted.double.nim", + "patterns": [ + { + "match": "\"", + "name": "invalid.illegal.nim" + }, + { + "include": "#string_escapes" + }, + { + "include": "#fmt_interpolation" + } + ] + }, + "fmt_string_triple_operator": { + "begin": "(&)(\"\"\")", + "beginCaptures": { + "1": { + "name": "keyword.operator.nim" + }, + "2": { + "name": "punctuation.definition.string.begin.nim" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.nim" + } + }, + "name": "string.quoted.triple.raw.nim", + "patterns": [ + { + "include": "#fmt_interpolation" + } + ] + }, + "fmt_string_call": { + "begin": "(fmt)\\((?=\")", + "beginCaptures": { + "1": { + "name": "support.function.any-method.nim" + } + }, + "end": "\\)", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.nim" + } + }, + "end": "\"(?=\\))", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.nim" + } + }, + "name": "string.quoted.double.nim", + "patterns": [ + { + "match": "\"", + "name": "invalid.illegal.nim" + }, + { + "include": "#string_escapes" + }, + { + "include": "#fmt_interpolation" + } + ] + } + ] + }, + "string_quoted_double": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.nim" + } + }, + "comment": "Double Quoted String", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.nim" + } + }, + "name": "string.quoted.double.nim", + "patterns": [ + { + "include": "#string_escapes" + } + ] + }, + "string_quoted_double_raw": { + "begin": "\\br\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.nim" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.nim" + } + }, + "name": "string.quoted.double.raw.nim", + "patterns": [ + { + "include": "#raw_string_escapes" + } + ] + }, + "extended_string_quoted_double_raw": { + "begin": "\\b(\\w+)(\")", + "beginCaptures": { + "1": { + "name": "support.function.any-method.nim" + }, + "2": { + "name": "punctuation.definition.string.begin.nim" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.nim" + } + }, + "name": "string.quoted.double.raw.nim", + "patterns": [ + { + "include": "#raw_string_escapes" + } + ] + }, + "string_quoted_single": { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.nim" + } + }, + "comment": "Single quoted character literal", + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.nim" + } + }, + "name": "string.quoted.single.nim", + "patterns": [ + { + "include": "#char_escapes" + }, + { + "match": "([^']{2,}?)", + "name": "invalid.illegal.character.nim" + } + ] + }, + "string_quoted_triple": { + "begin": "\"\"\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.nim" + } + }, + "comment": "Triple Quoted String", + "end": "\"\"\"(?!\")", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.nim" + } + }, + "name": "string.quoted.triple.nim" + }, + "string_quoted_triple_raw": { + "begin": "r\"\"\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.nim" + } + }, + "comment": "Raw Triple Quoted String", + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.nim" + } + }, + "name": "string.quoted.triple.raw.nim" + }, + "extended_string_quoted_triple_raw": { + "begin": "\\b(\\w+)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.any-method.nim" + }, + "2": { + "name": "punctuation.definition.string.begin.nim" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.nim" + } + }, + "name": "string.quoted.triple.raw.nim" + }, + "float_literal": { + "patterns": [ + { + "match": "\\b\\d[_\\d]*((\\.\\d[_\\d]*([eE][\\+\\-]?\\d[_\\d]*)?)|([eE][\\+\\-]?\\d[_\\d]*))('([fF](32|64|128)|[fFdD]))?", + "name": "constant.numeric.float.decimal.nim" + }, + { + "match": "\\b0[xX]\\h[_\\h]*'([fF](32|64|128)|[fFdD])", + "name": "constant.numeric.float.hexadecimal.nim" + }, + { + "match": "\\b0o[0-7][_0-7]*'([fF](32|64|128)|[fFdD])", + "name": "constant.numeric.float.octal.nim" + }, + { + "match": "\\b0(b|B)[01][_01]*'([fF](32|64|128)|[fFdD])", + "name": "constant.numeric.float.binary.nim" + }, + { + "match": "\\b(\\d[_\\d]*)'([fF](32|64|128)|[fFdD])", + "name": "constant.numeric.float.decimal.nim" + } + ] + }, + "integer_literal": { + "patterns": [ + { + "match": "\\b(0[xX]\\h[_\\h]*)('(([iIuU](8|16|32|64))|[uU]))?", + "name": "constant.numeric.integer.hexadecimal.nim" + }, + { + "match": "\\b(0o[0-7][_0-7]*)('(([iIuU](8|16|32|64))|[uU]))?", + "name": "constant.numeric.integer.octal.nim" + }, + { + "match": "\\b(0(b|B)[01][_01]*)('(([iIuU](8|16|32|64))|[uU]))?", + "name": "constant.numeric.integer.binary.nim" + }, + { + "match": "\\b(\\d[_\\d]*)('(([iIuU](8|16|32|64))|[uU]))?", + "name": "constant.numeric.integer.decimal.nim" + } + ] + } + }, + "scopeName": "source.nim", + "uuid": "6DD62CE8-B129-4554-BD8E-CE5DB490E5A4" +} diff --git a/src/lib/shiki/languages/nix.tmLanguage.json b/src/lib/shiki/languages/nix.tmLanguage.json new file mode 100644 index 0000000..103e996 --- /dev/null +++ b/src/lib/shiki/languages/nix.tmLanguage.json @@ -0,0 +1,1198 @@ +{ + "fileTypes": ["nix"], + "name": "nix", + "patterns": [ + { + "include": "#expression" + } + ], + "repository": { + "attribute-bind": { + "patterns": [ + { + "include": "#attribute-name" + }, + { + "include": "#attribute-bind-from-equals" + } + ] + }, + "attribute-bind-from-equals": { + "begin": "\\=", + "beginCaptures": { + "0": { + "name": "keyword.operator.bind.nix" + } + }, + "end": "\\;", + "endCaptures": { + "0": { + "name": "punctuation.terminator.bind.nix" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "attribute-inherit": { + "begin": "\\binherit\\b", + "beginCaptures": { + "0": { + "name": "keyword.other.inherit.nix" + } + }, + "end": "\\;", + "endCaptures": { + "0": { + "name": "punctuation.terminator.inherit.nix" + } + }, + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.function.arguments.nix" + } + }, + "end": "(?=\\;)", + "patterns": [ + { + "begin": "\\)", + "beginCaptures": { + "0": { + "name": "punctuation.section.function.arguments.nix" + } + }, + "end": "(?=\\;)", + "patterns": [ + { + "include": "#bad-reserved" + }, + { + "include": "#attribute-name-single" + }, + { + "include": "#others" + } + ] + }, + { + "include": "#expression" + } + ] + }, + { + "begin": "(?=[a-zA-Z\\_])", + "end": "(?=\\;)", + "patterns": [ + { + "include": "#bad-reserved" + }, + { + "include": "#attribute-name-single" + }, + { + "include": "#others" + } + ] + }, + { + "include": "#others" + } + ] + }, + "attribute-name": { + "patterns": [ + { + "match": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", + "name": "entity.other.attribute-name.multipart.nix" + }, + { + "match": "\\." + }, + { + "include": "#string-quoted" + }, + { + "include": "#interpolation" + } + ] + }, + "attribute-name-single": { + "match": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", + "name": "entity.other.attribute-name.single.nix" + }, + "attrset-contents": { + "patterns": [ + { + "include": "#attribute-inherit" + }, + { + "include": "#bad-reserved" + }, + { + "include": "#attribute-bind" + }, + { + "include": "#others" + } + ] + }, + "attrset-definition": { + "begin": "(?=\\{)", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "begin": "(\\{)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.attrset.nix" + } + }, + "end": "(\\})", + "endCaptures": { + "0": { + "name": "punctuation.definition.attrset.nix" + } + }, + "patterns": [ + { + "include": "#attrset-contents" + } + ] + }, + { + "begin": "(?<=\\})", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#expression-cont" + } + ] + } + ] + }, + "attrset-definition-brace-opened": { + "patterns": [ + { + "begin": "(?<=\\})", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#expression-cont" + } + ] + }, + { + "begin": "(?=.?)", + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.attrset.nix" + } + }, + "patterns": [ + { + "include": "#attrset-contents" + } + ] + } + ] + }, + "attrset-for-sure": { + "patterns": [ + { + "begin": "(?=\\brec\\b)", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "begin": "\\brec\\b", + "beginCaptures": { + "0": { + "name": "keyword.other.nix" + } + }, + "end": "(?=\\{)", + "patterns": [ + { + "include": "#others" + } + ] + }, + { + "include": "#attrset-definition" + }, + { + "include": "#others" + } + ] + }, + { + "begin": "(?=\\{\\s*(\\}|[^,?]*(=|;)))", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#attrset-definition" + }, + { + "include": "#others" + } + ] + } + ] + }, + "attrset-or-function": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.attrset-or-function.nix" + } + }, + "end": "(?=([\\])};]|\\b(else|then)\\b))", + "patterns": [ + { + "begin": "(?=(\\s*\\}|\\\"|\\binherit\\b|\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*(\\s*\\.|\\s*=[^=])))", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#attrset-definition-brace-opened" + } + ] + }, + { + "begin": "(?=(\\.\\.\\.|\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*\\s*[,?]))", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#function-definition-brace-opened" + } + ] + }, + { + "include": "#bad-reserved" + }, + { + "begin": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", + "beginCaptures": { + "0": { + "name": "variable.parameter.function.maybe.nix" + } + }, + "end": "(?=([\\])};]|\\b(else|then)\\b))", + "patterns": [ + { + "begin": "(?=\\.)", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#attrset-definition-brace-opened" + } + ] + }, + { + "begin": "\\s*(\\,)", + "beginCaptures": { + "1": { + "name": "keyword.operator.nix" + } + }, + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#function-definition-brace-opened" + } + ] + }, + { + "begin": "(?=\\=)", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#attribute-bind-from-equals" + }, + { + "include": "#attrset-definition-brace-opened" + } + ] + }, + { + "begin": "(?=\\?)", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#function-parameter-default" + }, + { + "begin": "\\,", + "beginCaptures": { + "0": { + "name": "keyword.operator.nix" + } + }, + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#function-definition-brace-opened" + } + ] + } + ] + }, + { + "include": "#others" + } + ] + }, + { + "include": "#others" + } + ] + }, + "bad-reserved": { + "match": "\\b(if|then|else|assert|with|let|in|rec|inherit)\\b", + "name": "invalid.illegal.reserved.nix" + }, + "comment": { + "patterns": [ + { + "begin": "/\\*([^*]|\\*[^\\/])*", + "end": "\\*\\/", + "name": "comment.block.nix", + "patterns": [ + { + "include": "#comment-remark" + } + ] + }, + { + "begin": "\\#", + "end": "$", + "name": "comment.line.number-sign.nix", + "patterns": [ + { + "include": "#comment-remark" + } + ] + } + ] + }, + "comment-remark": { + "captures": { + "1": { + "name": "markup.bold.comment.nix" + } + }, + "match": "(TODO|FIXME|BUG|\\!\\!\\!):?" + }, + "constants": { + "patterns": [ + { + "begin": "\\b(builtins|true|false|null)\\b", + "beginCaptures": { + "0": { + "name": "constant.language.nix" + } + }, + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#expression-cont" + } + ] + }, + { + "begin": "\\b(scopedImport|import|isNull|abort|throw|baseNameOf|dirOf|removeAttrs|map|toString|derivationStrict|derivation)\\b", + "beginCaptures": { + "0": { + "name": "support.function.nix" + } + }, + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#expression-cont" + } + ] + }, + { + "begin": "\\b[0-9]+\\b", + "beginCaptures": { + "0": { + "name": "constant.numeric.nix" + } + }, + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#expression-cont" + } + ] + } + ] + }, + "expression": { + "patterns": [ + { + "include": "#parens-and-cont" + }, + { + "include": "#list-and-cont" + }, + { + "include": "#string" + }, + { + "include": "#interpolation" + }, + { + "include": "#with-assert" + }, + { + "include": "#function-for-sure" + }, + { + "include": "#attrset-for-sure" + }, + { + "include": "#attrset-or-function" + }, + { + "include": "#let" + }, + { + "include": "#if" + }, + { + "include": "#operator-unary" + }, + { + "include": "#constants" + }, + { + "include": "#bad-reserved" + }, + { + "include": "#parameter-name-and-cont" + }, + { + "include": "#others" + } + ] + }, + "expression-cont": { + "begin": "(?=.?)", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#list" + }, + { + "include": "#string" + }, + { + "include": "#interpolation" + }, + { + "include": "#function-for-sure" + }, + { + "include": "#attrset-for-sure" + }, + { + "include": "#attrset-or-function" + }, + { + "match": "(\\bor\\b|\\.|==|!=|!|\\<\\=|\\<|\\>\\=|\\>|&&|\\|\\||-\\>|//|\\?|\\+\\+|-|\\*|/(?=([^*]|$))|\\+)", + "name": "keyword.operator.nix" + }, + { + "include": "#constants" + }, + { + "include": "#bad-reserved" + }, + { + "include": "#parameter-name" + }, + { + "include": "#others" + } + ] + }, + "function-body": { + "begin": "(@\\s*([a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*)\\s*)?(\\:)", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "function-body-from-colon": { + "begin": "(\\:)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.function.nix" + } + }, + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "function-contents": { + "patterns": [ + { + "include": "#bad-reserved" + }, + { + "include": "#function-parameter" + }, + { + "include": "#others" + } + ] + }, + "function-definition": { + "begin": "(?=.?)", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#function-body-from-colon" + }, + { + "begin": "(?=.?)", + "end": "(?=\\:)", + "patterns": [ + { + "begin": "(\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*)", + "beginCaptures": { + "0": { + "name": "variable.parameter.function.4.nix" + } + }, + "end": "(?=\\:)", + "patterns": [ + { + "begin": "\\@", + "end": "(?=\\:)", + "patterns": [ + { + "include": "#function-header-until-colon-no-arg" + }, + { + "include": "#others" + } + ] + }, + { + "include": "#others" + } + ] + }, + { + "begin": "(?=\\{)", + "end": "(?=\\:)", + "patterns": [ + { + "include": "#function-header-until-colon-with-arg" + } + ] + } + ] + }, + { + "include": "#others" + } + ] + }, + "function-definition-brace-opened": { + "begin": "(?=.?)", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#function-body-from-colon" + }, + { + "begin": "(?=.?)", + "end": "(?=\\:)", + "patterns": [ + { + "include": "#function-header-close-brace-with-arg" + }, + { + "begin": "(?=.?)", + "end": "(?=\\})", + "patterns": [ + { + "include": "#function-contents" + } + ] + } + ] + }, + { + "include": "#others" + } + ] + }, + "function-for-sure": { + "patterns": [ + { + "begin": "(?=(\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*\\s*[:@]|\\{[^}]*\\}\\s*:|\\{[^#}\"'/=]*[,\\?]))", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#function-definition" + } + ] + } + ] + }, + "function-header-close-brace-no-arg": { + "begin": "\\}", + "beginCaptures": { + "0": { + "name": "punctuation.definition.entity.function.nix" + } + }, + "end": "(?=\\:)", + "patterns": [ + { + "include": "#others" + } + ] + }, + "function-header-close-brace-with-arg": { + "begin": "\\}", + "beginCaptures": { + "0": { + "name": "punctuation.definition.entity.function.nix" + } + }, + "end": "(?=\\:)", + "patterns": [ + { + "include": "#function-header-terminal-arg" + }, + { + "include": "#others" + } + ] + }, + "function-header-open-brace": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.entity.function.2.nix" + } + }, + "end": "(?=\\})", + "patterns": [ + { + "include": "#function-contents" + } + ] + }, + "function-header-terminal-arg": { + "begin": "(?=@)", + "end": "(?=\\:)", + "patterns": [ + { + "begin": "\\@", + "end": "(?=\\:)", + "patterns": [ + { + "begin": "(\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*)", + "end": "(?=\\:)", + "name": "variable.parameter.function.3.nix" + }, + { + "include": "#others" + } + ] + }, + { + "include": "#others" + } + ] + }, + "function-header-until-colon-no-arg": { + "begin": "(?=\\{)", + "end": "(?=\\:)", + "patterns": [ + { + "include": "#function-header-open-brace" + }, + { + "include": "#function-header-close-brace-no-arg" + } + ] + }, + "function-header-until-colon-with-arg": { + "begin": "(?=\\{)", + "end": "(?=\\:)", + "patterns": [ + { + "include": "#function-header-open-brace" + }, + { + "include": "#function-header-close-brace-with-arg" + } + ] + }, + "function-parameter": { + "patterns": [ + { + "begin": "(\\.\\.\\.)", + "end": "(,|(?=\\}))", + "name": "keyword.operator.nix", + "patterns": [ + { + "include": "#others" + } + ] + }, + { + "begin": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", + "beginCaptures": { + "0": { + "name": "variable.parameter.function.1.nix" + } + }, + "end": "(,|(?=\\}))", + "endCaptures": { + "0": { + "name": "keyword.operator.nix" + } + }, + "patterns": [ + { + "include": "#whitespace" + }, + { + "include": "#comment" + }, + { + "include": "#function-parameter-default" + }, + { + "include": "#expression" + } + ] + }, + { + "include": "#others" + } + ] + }, + "function-parameter-default": { + "begin": "\\?", + "beginCaptures": { + "0": { + "name": "keyword.operator.nix" + } + }, + "end": "(?=[,}])", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "if": { + "begin": "(?=\\bif\\b)", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "begin": "\\bif\\b", + "beginCaptures": { + "0": { + "name": "keyword.other.nix" + } + }, + "end": "\\bth(?=en\\b)", + "endCaptures": { + "0": { + "name": "keyword.other.nix" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "begin": "(?<=th)en\\b", + "beginCaptures": { + "0": { + "name": "keyword.other.nix" + } + }, + "end": "\\bel(?=se\\b)", + "endCaptures": { + "0": { + "name": "keyword.other.nix" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "begin": "(?<=el)se\\b", + "beginCaptures": { + "0": { + "name": "keyword.other.nix" + } + }, + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "endCaptures": { + "0": { + "name": "keyword.other.nix" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + } + ] + }, + "illegal": { + "match": ".", + "name": "invalid.illegal" + }, + "interpolation": { + "begin": "\\$\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.nix" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.nix" + } + }, + "name": "markup.italic", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "let": { + "begin": "(?=\\blet\\b)", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "begin": "\\blet\\b", + "beginCaptures": { + "0": { + "name": "keyword.other.nix" + } + }, + "end": "(?=([\\])};,]|\\b(in|else|then)\\b))", + "patterns": [ + { + "begin": "(?=\\{)", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#attrset-contents" + } + ] + }, + { + "begin": "(^|(?<=\\}))", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#expression-cont" + } + ] + }, + { + "include": "#others" + } + ] + }, + { + "include": "#attrset-contents" + }, + { + "include": "#others" + } + ] + }, + { + "begin": "\\bin\\b", + "beginCaptures": { + "0": { + "name": "keyword.other.nix" + } + }, + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#expression" + } + ] + } + ] + }, + "list": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.list.nix" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.list.nix" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "list-and-cont": { + "begin": "(?=\\[)", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#list" + }, + { + "include": "#expression-cont" + } + ] + }, + "operator-unary": { + "match": "(!|-)", + "name": "keyword.operator.unary.nix" + }, + "others": { + "patterns": [ + { + "include": "#whitespace" + }, + { + "include": "#comment" + }, + { + "include": "#illegal" + } + ] + }, + "parameter-name": { + "captures": { + "0": { + "name": "variable.parameter.name.nix" + } + }, + "match": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*" + }, + "parameter-name-and-cont": { + "begin": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", + "beginCaptures": { + "0": { + "name": "variable.parameter.name.nix" + } + }, + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#expression-cont" + } + ] + }, + "parens": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.expression.nix" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.expression.nix" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "parens-and-cont": { + "begin": "(?=\\()", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#expression-cont" + } + ] + }, + "string": { + "patterns": [ + { + "begin": "(?=\\'\\')", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "begin": "\\'\\'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.other.start.nix" + } + }, + "end": "\\'\\'(?!\\$|\\'|\\\\.)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.other.end.nix" + } + }, + "name": "string.quoted.other.nix", + "patterns": [ + { + "match": "\\'\\'(\\$|\\'|\\\\.)", + "name": "constant.character.escape.nix" + }, + { + "include": "#interpolation" + } + ] + }, + { + "include": "#expression-cont" + } + ] + }, + { + "begin": "(?=\\\")", + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#string-quoted" + }, + { + "include": "#expression-cont" + } + ] + }, + { + "begin": "([a-zA-Z0-9\\.\\_\\-\\+]*(\\/[a-zA-Z0-9\\.\\_\\-\\+]+)+)", + "beginCaptures": { + "0": { + "name": "string.unquoted.path.nix" + } + }, + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#expression-cont" + } + ] + }, + { + "begin": "(\\<[a-zA-Z0-9\\.\\_\\-\\+]+(\\/[a-zA-Z0-9\\.\\_\\-\\+]+)*\\>)", + "beginCaptures": { + "0": { + "name": "string.unquoted.spath.nix" + } + }, + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#expression-cont" + } + ] + }, + { + "begin": "([a-zA-Z][a-zA-Z0-9\\+\\-\\.]*\\:[a-zA-Z0-9\\%\\/\\?\\:\\@\\&\\=\\+\\$\\,\\-\\_\\.\\!\\~\\*\\']+)", + "beginCaptures": { + "0": { + "name": "string.unquoted.url.nix" + } + }, + "end": "(?=([\\])};,]|\\b(else|then)\\b))", + "patterns": [ + { + "include": "#expression-cont" + } + ] + } + ] + }, + "string-quoted": { + "begin": "\\\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.double.start.nix" + } + }, + "end": "\\\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.double.end.nix" + } + }, + "name": "string.quoted.double.nix", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.nix" + }, + { + "include": "#interpolation" + } + ] + }, + "whitespace": { + "match": "\\s+" + }, + "with-assert": { + "begin": "\\b(with|assert)\\b", + "beginCaptures": { + "0": { + "name": "keyword.other.nix" + } + }, + "end": "\\;", + "patterns": [ + { + "include": "#expression" + } + ] + } + }, + "scopeName": "source.nix", + "uuid": "0514fd5f-acb6-436d-b42c-7643e6d36c8f" +} diff --git a/src/lib/shiki/languages/objective-c.tmLanguage.json b/src/lib/shiki/languages/objective-c.tmLanguage.json new file mode 100644 index 0000000..aa53580 --- /dev/null +++ b/src/lib/shiki/languages/objective-c.tmLanguage.json @@ -0,0 +1,3755 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/jeff-hykin/better-objc-syntax/blob/master/autogenerated/objc.tmLanguage.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/jeff-hykin/better-objc-syntax/commit/119b75fb1f4d3e8726fa62588e3b935e0b719294", + "name": "objective-c", + "scopeName": "source.objc", + "patterns": [ + { + "include": "#anonymous_pattern_1" + }, + { + "include": "#anonymous_pattern_2" + }, + { + "include": "#anonymous_pattern_3" + }, + { + "include": "#anonymous_pattern_4" + }, + { + "include": "#anonymous_pattern_5" + }, + { + "include": "#apple_foundation_functional_macros" + }, + { + "include": "#anonymous_pattern_7" + }, + { + "include": "#anonymous_pattern_8" + }, + { + "include": "#anonymous_pattern_9" + }, + { + "include": "#anonymous_pattern_10" + }, + { + "include": "#anonymous_pattern_11" + }, + { + "include": "#anonymous_pattern_12" + }, + { + "include": "#anonymous_pattern_13" + }, + { + "include": "#anonymous_pattern_14" + }, + { + "include": "#anonymous_pattern_15" + }, + { + "include": "#anonymous_pattern_16" + }, + { + "include": "#anonymous_pattern_17" + }, + { + "include": "#anonymous_pattern_18" + }, + { + "include": "#anonymous_pattern_19" + }, + { + "include": "#anonymous_pattern_20" + }, + { + "include": "#anonymous_pattern_21" + }, + { + "include": "#anonymous_pattern_22" + }, + { + "include": "#anonymous_pattern_23" + }, + { + "include": "#anonymous_pattern_24" + }, + { + "include": "#anonymous_pattern_25" + }, + { + "include": "#anonymous_pattern_26" + }, + { + "include": "#anonymous_pattern_27" + }, + { + "include": "#anonymous_pattern_28" + }, + { + "include": "#anonymous_pattern_29" + }, + { + "include": "#anonymous_pattern_30" + }, + { + "include": "#bracketed_content" + }, + { + "include": "#c_lang" + } + ], + "repository": { + "anonymous_pattern_1": { + "begin": "((@)(interface|protocol))(?!.+;)\\s+([A-Za-z_][A-Za-z0-9_]*)\\s*((:)(?:\\s*)([A-Za-z][A-Za-z0-9]*))?(\\s|\\n)?", + "captures": { + "1": { + "name": "storage.type.objc" + }, + "2": { + "name": "punctuation.definition.storage.type.objc" + }, + "4": { + "name": "entity.name.type.objc" + }, + "6": { + "name": "punctuation.definition.entity.other.inherited-class.objc" + }, + "7": { + "name": "entity.other.inherited-class.objc" + }, + "8": { + "name": "meta.divider.objc" + }, + "9": { + "name": "meta.inherited-class.objc" + } + }, + "contentName": "meta.scope.interface.objc", + "end": "((@)end)\\b", + "name": "meta.interface-or-protocol.objc", + "patterns": [ + { + "include": "#interface_innards" + } + ] + }, + "anonymous_pattern_10": { + "captures": { + "1": { + "name": "punctuation.definition.keyword.objc" + } + }, + "match": "(@)(defs|encode)\\b", + "name": "keyword.other.objc" + }, + "anonymous_pattern_11": { + "match": "\\bid\\b", + "name": "storage.type.id.objc" + }, + "anonymous_pattern_12": { + "match": "\\b(IBOutlet|IBAction|BOOL|SEL|id|unichar|IMP|Class|instancetype)\\b", + "name": "storage.type.objc" + }, + "anonymous_pattern_13": { + "captures": { + "1": { + "name": "punctuation.definition.storage.type.objc" + } + }, + "match": "(@)(class|protocol)\\b", + "name": "storage.type.objc" + }, + "anonymous_pattern_14": { + "begin": "((@)selector)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "storage.type.objc" + }, + "2": { + "name": "punctuation.definition.storage.type.objc" + }, + "3": { + "name": "punctuation.definition.storage.type.objc" + } + }, + "contentName": "meta.selector.method-name.objc", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.storage.type.objc" + } + }, + "name": "meta.selector.objc", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.separator.arguments.objc" + } + }, + "match": "\\b(?:[a-zA-Z_:][\\w]*)+", + "name": "support.function.any-method.name-of-parameter.objc" + } + ] + }, + "anonymous_pattern_15": { + "captures": { + "1": { + "name": "punctuation.definition.storage.modifier.objc" + } + }, + "match": "(@)(synchronized|public|package|private|protected)\\b", + "name": "storage.modifier.objc" + }, + "anonymous_pattern_16": { + "match": "\\b(YES|NO|Nil|nil)\\b", + "name": "constant.language.objc" + }, + "anonymous_pattern_17": { + "match": "\\bNSApp\\b", + "name": "support.variable.foundation.objc" + }, + "anonymous_pattern_18": { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.cocoa.leopard.objc" + }, + "2": { + "name": "support.function.cocoa.leopard.objc" + } + }, + "match": "(\\s*)\\b(NS(Rect(ToCGRect|FromCGRect)|MakeCollectable|S(tringFromProtocol|ize(ToCGSize|FromCGSize))|Draw(NinePartImage|ThreePartImage)|P(oint(ToCGPoint|FromCGPoint)|rotocolFromString)|EventMaskFromType|Value))\\b" + }, + "anonymous_pattern_19": { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading.cocoa.objc" + }, + "2": { + "name": "support.function.cocoa.objc" + } + }, + "match": "(\\s*)\\b(NS(R(ound(DownToMultipleOfPageSize|UpToMultipleOfPageSize)|un(CriticalAlertPanel(RelativeToWindow)?|InformationalAlertPanel(RelativeToWindow)?|AlertPanel(RelativeToWindow)?)|e(set(MapTable|HashTable)|c(ycleZone|t(Clip(List)?|F(ill(UsingOperation|List(UsingOperation|With(Grays|Colors(UsingOperation)?))?)?|romString))|ordAllocationEvent)|turnAddress|leaseAlertPanel|a(dPixel|l(MemoryAvailable|locateCollectable))|gisterServicesProvider)|angeFromString)|Get(SizeAndAlignment|CriticalAlertPanel|InformationalAlertPanel|UncaughtExceptionHandler|FileType(s)?|WindowServerMemory|AlertPanel)|M(i(n(X|Y)|d(X|Y))|ouseInRect|a(p(Remove|Get|Member|Insert(IfAbsent|KnownAbsent)?)|ke(R(ect|ange)|Size|Point)|x(Range|X|Y)))|B(itsPer(SampleFromDepth|PixelFromDepth)|e(stDepth|ep|gin(CriticalAlertSheet|InformationalAlertSheet|AlertSheet)))|S(ho(uldRetainWithZone|w(sServicesMenuItem|AnimationEffect))|tringFrom(R(ect|ange)|MapTable|S(ize|elector)|HashTable|Class|Point)|izeFromString|e(t(ShowsServicesMenuItem|ZoneName|UncaughtExceptionHandler|FocusRingStyle)|lectorFromString|archPathForDirectoriesInDomains)|wap(Big(ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(ToHost|LongToHost))|Short|Host(ShortTo(Big|Little)|IntTo(Big|Little)|DoubleTo(Big|Little)|FloatTo(Big|Little)|Long(To(Big|Little)|LongTo(Big|Little)))|Int|Double|Float|L(ittle(ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(ToHost|LongToHost))|ong(Long)?)))|H(ighlightRect|o(stByteOrder|meDirectory(ForUser)?)|eight|ash(Remove|Get|Insert(IfAbsent|KnownAbsent)?)|FSType(CodeFromFileType|OfFile))|N(umberOfColorComponents|ext(MapEnumeratorPair|HashEnumeratorItem))|C(o(n(tainsRect|vert(GlyphsToPackedGlyphs|Swapped(DoubleToHost|FloatToHost)|Host(DoubleToSwapped|FloatToSwapped)))|unt(MapTable|HashTable|Frames|Windows(ForContext)?)|py(M(emoryPages|apTableWithZone)|Bits|HashTableWithZone|Object)|lorSpaceFromDepth|mpare(MapTables|HashTables))|lassFromString|reate(MapTable(WithZone)?|HashTable(WithZone)?|Zone|File(namePboardType|ContentsPboardType)))|TemporaryDirectory|I(s(ControllerMarker|EmptyRect|FreedObject)|n(setRect|crementExtraRefCount|te(r(sect(sRect|ionR(ect|ange))|faceStyleForKey)|gralRect)))|Zone(Realloc|Malloc|Name|Calloc|Fr(omPointer|ee))|O(penStepRootDirectory|ffsetRect)|D(i(sableScreenUpdates|videRect)|ottedFrameRect|e(c(imal(Round|Multiply|S(tring|ubtract)|Normalize|Co(py|mpa(ct|re))|IsNotANumber|Divide|Power|Add)|rementExtraRefCountWasZero)|faultMallocZone|allocate(MemoryPages|Object))|raw(Gr(oove|ayBezel)|B(itmap|utton)|ColorTiledRects|TiledRects|DarkBezel|W(hiteBezel|indowBackground)|LightBezel))|U(serName|n(ionR(ect|ange)|registerServicesProvider)|pdateDynamicServices)|Java(Bundle(Setup|Cleanup)|Setup(VirtualMachine)?|Needs(ToLoadClasses|VirtualMachine)|ClassesF(orBundle|romPath)|ObjectNamedInPath|ProvidesClasses)|P(oint(InRect|FromString)|erformService|lanarFromDepth|ageSize)|E(n(d(MapTableEnumeration|HashTableEnumeration)|umerate(MapTable|HashTable)|ableScreenUpdates)|qual(R(ects|anges)|Sizes|Points)|raseRect|xtraRefCount)|F(ileTypeForHFSTypeCode|ullUserName|r(ee(MapTable|HashTable)|ame(Rect(WithWidth(UsingOperation)?)?|Address)))|Wi(ndowList(ForContext)?|dth)|Lo(cationInRange|g(v|PageSize)?)|A(ccessibility(R(oleDescription(ForUIElement)?|aiseBadArgumentException)|Unignored(Children(ForOnlyChild)?|Descendant|Ancestor)|PostNotification|ActionDescription)|pplication(Main|Load)|vailableWindowDepths|ll(MapTable(Values|Keys)|HashTableObjects|ocate(MemoryPages|Collectable|Object)))))\\b" + }, + "anonymous_pattern_2": { + "begin": "((@)(implementation))\\s+([A-Za-z_][A-Za-z0-9_]*)\\s*(?::\\s*([A-Za-z][A-Za-z0-9]*))?", + "captures": { + "1": { + "name": "storage.type.objc" + }, + "2": { + "name": "punctuation.definition.storage.type.objc" + }, + "4": { + "name": "entity.name.type.objc" + }, + "5": { + "name": "entity.other.inherited-class.objc" + } + }, + "contentName": "meta.scope.implementation.objc", + "end": "((@)end)\\b", + "name": "meta.implementation.objc", + "patterns": [ + { + "include": "#implementation_innards" + } + ] + }, + "anonymous_pattern_20": { + "match": "\\bNS(RuleEditor|G(arbageCollector|radient)|MapTable|HashTable|Co(ndition|llectionView(Item)?)|T(oolbarItemGroup|extInputClient|r(eeNode|ackingArea))|InvocationOperation|Operation(Queue)?|D(ictionaryController|ockTile)|P(ointer(Functions|Array)|athC(o(ntrol(Delegate)?|mponentCell)|ell(Delegate)?)|r(intPanelAccessorizing|edicateEditor(RowTemplate)?))|ViewController|FastEnumeration|Animat(ionContext|ablePropertyContainer))\\b", + "name": "support.class.cocoa.leopard.objc" + }, + "anonymous_pattern_21": { + "match": "\\bNS(R(u(nLoop|ler(Marker|View))|e(sponder|cursiveLock|lativeSpecifier)|an(domSpecifier|geSpecifier))|G(etCommand|lyph(Generator|Storage|Info)|raphicsContext)|XML(Node|D(ocument|TD(Node)?)|Parser|Element)|M(iddleSpecifier|ov(ie(View)?|eCommand)|utable(S(tring|et)|C(haracterSet|opying)|IndexSet|D(ictionary|ata)|URLRequest|ParagraphStyle|A(ttributedString|rray))|e(ssagePort(NameServer)?|nu(Item(Cell)?|View)?|t(hodSignature|adata(Item|Query(ResultGroup|AttributeValueTuple)?)))|a(ch(BootstrapServer|Port)|trix))|B(itmapImageRep|ox|u(ndle|tton(Cell)?)|ezierPath|rowser(Cell)?)|S(hadow|c(anner|r(ipt(SuiteRegistry|C(o(ercionHandler|mmand(Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(er|View)|een))|t(epper(Cell)?|atus(Bar|Item)|r(ing|eam))|imple(HorizontalTypesetter|CString)|o(cketPort(NameServer)?|und|rtDescriptor)|p(e(cifierTest|ech(Recognizer|Synthesizer)|ll(Server|Checker))|litView)|e(cureTextField(Cell)?|t(Command)?|archField(Cell)?|rializer|gmentedC(ontrol|ell))|lider(Cell)?|avePanel)|H(ost|TTP(Cookie(Storage)?|URLResponse)|elpManager)|N(ib(Con(nector|trolConnector)|OutletConnector)?|otification(Center|Queue)?|u(ll|mber(Formatter)?)|etService(Browser)?|ameSpecifier)|C(ha(ngeSpelling|racterSet)|o(n(stantString|nection|trol(ler)?|ditionLock)|d(ing|er)|unt(Command|edSet)|pying|lor(Space|P(ick(ing(Custom|Default)|er)|anel)|Well|List)?|m(p(oundPredicate|arisonPredicate)|boBox(Cell)?))|u(stomImageRep|rsor)|IImageRep|ell|l(ipView|o(seCommand|neCommand)|assDescription)|a(ched(ImageRep|URLResponse)|lendar(Date)?)|reateCommand)|T(hread|ypesetter|ime(Zone|r)|o(olbar(Item(Validations)?)?|kenField(Cell)?)|ext(Block|Storage|Container|Tab(le(Block)?)?|Input|View|Field(Cell)?|List|Attachment(Cell)?)?|a(sk|b(le(Header(Cell|View)|Column|View)|View(Item)?))|reeController)|I(n(dex(S(pecifier|et)|Path)|put(Manager|S(tream|erv(iceProvider|er(MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(Rep|Cell|View)?)|O(ut(putStream|lineView)|pen(GL(Context|Pixel(Buffer|Format)|View)|Panel)|bj(CTypeSerializationCallBack|ect(Controller)?))|D(i(st(antObject(Request)?|ributed(NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(Controller)?|e(serializer|cimalNumber(Behaviors|Handler)?|leteCommand)|at(e(Components|Picker(Cell)?|Formatter)?|a)|ra(wer|ggingInfo))|U(ser(InterfaceValidations|Defaults(Controller)?)|RL(Re(sponse|quest)|Handle(Client)?|C(onnection|ache|redential(Storage)?)|Download(Delegate)?|Prot(ocol(Client)?|ectionSpace)|AuthenticationChallenge(Sender)?)?|n(iqueIDSpecifier|doManager|archiver))|P(ipe|o(sitionalSpecifier|pUpButton(Cell)?|rt(Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(steboard|nel|ragraphStyle|geLayout)|r(int(Info|er|Operation|Panel)|o(cessInfo|tocolChecker|perty(Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(numerator|vent|PSImageRep|rror|x(ception|istsCommand|pression))|V(iew(Animation)?|al(idated(ToobarItem|UserInterfaceItem)|ue(Transformer)?))|Keyed(Unarchiver|Archiver)|Qui(ckDrawView|tCommand)|F(ile(Manager|Handle|Wrapper)|o(nt(Manager|Descriptor|Panel)?|rm(Cell|atter)))|W(hoseSpecifier|indow(Controller)?|orkspace)|L(o(c(k(ing)?|ale)|gicalTest)|evelIndicator(Cell)?|ayoutManager)|A(ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(ication|e(Script|Event(Manager|Descriptor)))|ffineTransform|lert|r(chiver|ray(Controller)?)))\\b", + "name": "support.class.cocoa.objc" + }, + "anonymous_pattern_22": { + "match": "\\bNS(R(oundingMode|ule(Editor(RowType|NestingMode)|rOrientation)|e(questUserAttentionType|lativePosition))|G(lyphInscription|radientDrawingOptions)|XML(NodeKind|D(ocumentContentKind|TDNodeKind)|ParserError)|M(ultibyteGlyphPacking|apTableOptions)|B(itmapFormat|oxType|ezierPathElement|ackgroundStyle|rowserDropOperation)|S(tr(ing(CompareOptions|DrawingOptions|EncodingConversionOptions)|eam(Status|Event))|p(eechBoundary|litViewDividerStyle)|e(archPathD(irectory|omainMask)|gmentS(tyle|witchTracking))|liderType|aveOptions)|H(TTPCookieAcceptPolicy|ashTableOptions)|N(otification(SuspensionBehavior|Coalescing)|umberFormatter(RoundingMode|Behavior|Style|PadPosition)|etService(sError|Options))|C(haracterCollection|o(lor(RenderingIntent|SpaceModel|PanelMode)|mp(oundPredicateType|arisonPredicateModifier))|ellStateValue|al(culationError|endarUnit))|T(ypesetterControlCharacterAction|imeZoneNameStyle|e(stComparisonOperation|xt(Block(Dimension|V(erticalAlignment|alueType)|Layer)|TableLayoutAlgorithm|FieldBezelStyle))|ableView(SelectionHighlightStyle|ColumnAutoresizingStyle)|rackingAreaOptions)|I(n(sertionPosition|te(rfaceStyle|ger))|mage(RepLoadStatus|Scaling|CacheMode|FrameStyle|LoadStatus|Alignment))|Ope(nGLPixelFormatAttribute|rationQueuePriority)|Date(Picker(Mode|Style)|Formatter(Behavior|Style))|U(RL(RequestCachePolicy|HandleStatus|C(acheStoragePolicy|redentialPersistence))|Integer)|P(o(stingStyle|int(ingDeviceType|erFunctionsOptions)|pUpArrowPosition)|athStyle|r(int(ing(Orientation|PaginationMode)|erTableStatus|PanelOptions)|opertyList(MutabilityOptions|Format)|edicateOperatorType))|ExpressionType|KeyValue(SetMutationKind|Change)|QTMovieLoopMode|F(indPanel(SubstringMatchType|Action)|o(nt(RenderingMode|FamilyClass)|cusRingPlacement))|W(hoseSubelementIdentifier|ind(ingRule|ow(B(utton|ackingLocation)|SharingType|CollectionBehavior)))|L(ine(MovementDirection|SweepDirection|CapStyle|JoinStyle)|evelIndicatorStyle)|Animation(BlockingMode|Curve))\\b", + "name": "support.type.cocoa.leopard.objc" + }, + "anonymous_pattern_23": { + "match": "\\bC(I(Sampler|Co(ntext|lor)|Image(Accumulator)?|PlugIn(Registration)?|Vector|Kernel|Filter(Generator|Shape)?)|A(Renderer|MediaTiming(Function)?|BasicAnimation|ScrollLayer|Constraint(LayoutManager)?|T(iledLayer|extLayer|rans(ition|action))|OpenGLLayer|PropertyAnimation|KeyframeAnimation|Layer|A(nimation(Group)?|ction)))\\b", + "name": "support.class.quartz.objc" + }, + "anonymous_pattern_24": { + "match": "\\bC(G(Float|Point|Size|Rect)|IFormat|AConstraintAttribute)\\b", + "name": "support.type.quartz.objc" + }, + "anonymous_pattern_25": { + "match": "\\bNS(R(ect(Edge)?|ange)|G(lyph(Relation|LayoutMode)?|radientType)|M(odalSession|a(trixMode|p(Table|Enumerator)))|B(itmapImageFileType|orderType|uttonType|ezelStyle|ackingStoreType|rowserColumnResizingType)|S(cr(oll(er(Part|Arrow)|ArrowPosition)|eenAuxiliaryOpaque)|tringEncoding|ize|ocketNativeHandle|election(Granularity|Direction|Affinity)|wapped(Double|Float)|aveOperationType)|Ha(sh(Table|Enumerator)|ndler(2)?)|C(o(ntrol(Size|Tint)|mp(ositingOperation|arisonResult))|ell(State|Type|ImagePosition|Attribute))|T(hreadPrivate|ypesetterGlyphInfo|i(ckMarkPosition|tlePosition|meInterval)|o(ol(TipTag|bar(SizeMode|DisplayMode))|kenStyle)|IFFCompression|ext(TabType|Alignment)|ab(State|leViewDropOperation|ViewType)|rackingRectTag)|ImageInterpolation|Zone|OpenGL(ContextAuxiliary|PixelFormatAuxiliary)|D(ocumentChangeType|atePickerElementFlags|ra(werState|gOperation))|UsableScrollerParts|P(oint|r(intingPageOrder|ogressIndicator(Style|Th(ickness|readInfo))))|EventType|KeyValueObservingOptions|Fo(nt(SymbolicTraits|TraitMask|Action)|cusRingType)|W(indow(OrderingMode|Depth)|orkspace(IconCreationOptions|LaunchOptions)|ritingDirection)|L(ineBreakMode|ayout(Status|Direction))|A(nimation(Progress|Effect)|ppl(ication(TerminateReply|DelegateReply|PrintReply)|eEventManagerSuspensionID)|ffineTransformStruct|lertStyle))\\b", + "name": "support.type.cocoa.objc" + }, + "anonymous_pattern_26": { + "match": "\\bNS(NotFound|Ordered(Ascending|Descending|Same))\\b", + "name": "support.constant.cocoa.objc" + }, + "anonymous_pattern_27": { + "match": "\\bNS(MenuDidBeginTracking|ViewDidUpdateTrackingAreas)?Notification\\b", + "name": "support.constant.notification.cocoa.leopard.objc" + }, + "anonymous_pattern_28": { + "match": "\\bNS(Menu(Did(RemoveItem|SendAction|ChangeItem|EndTracking|AddItem)|WillSendAction)|S(ystemColorsDidChange|plitView(DidResizeSubviews|WillResizeSubviews))|C(o(nt(extHelpModeDid(Deactivate|Activate)|rolT(intDidChange|extDid(BeginEditing|Change|EndEditing)))|lor(PanelColorDidChange|ListDidChange)|mboBox(Selection(IsChanging|DidChange)|Will(Dismiss|PopUp)))|lassDescriptionNeededForClass)|T(oolbar(DidRemoveItem|WillAddItem)|ext(Storage(DidProcessEditing|WillProcessEditing)|Did(BeginEditing|Change|EndEditing)|View(DidChange(Selection|TypingAttributes)|WillChangeNotifyingTextView))|ableView(Selection(IsChanging|DidChange)|ColumnDid(Resize|Move)))|ImageRepRegistryDidChange|OutlineView(Selection(IsChanging|DidChange)|ColumnDid(Resize|Move)|Item(Did(Collapse|Expand)|Will(Collapse|Expand)))|Drawer(Did(Close|Open)|Will(Close|Open))|PopUpButton(CellWillPopUp|WillPopUp)|View(GlobalFrameDidChange|BoundsDidChange|F(ocusDidChange|rameDidChange))|FontSetChanged|W(indow(Did(Resi(ze|gn(Main|Key))|M(iniaturize|ove)|Become(Main|Key)|ChangeScreen(|Profile)|Deminiaturize|Update|E(ndSheet|xpose))|Will(M(iniaturize|ove)|BeginSheet|Close))|orkspace(SessionDid(ResignActive|BecomeActive)|Did(Mount|TerminateApplication|Unmount|PerformFileOperation|Wake|LaunchApplication)|Will(Sleep|Unmount|PowerOff|LaunchApplication)))|A(ntialiasThresholdChanged|ppl(ication(Did(ResignActive|BecomeActive|Hide|ChangeScreenParameters|U(nhide|pdate)|FinishLaunching)|Will(ResignActive|BecomeActive|Hide|Terminate|U(nhide|pdate)|FinishLaunching))|eEventManagerWillProcessFirstEvent)))Notification\\b", + "name": "support.constant.notification.cocoa.objc" + }, + "anonymous_pattern_29": { + "match": "\\bNS(RuleEditor(RowType(Simple|Compound)|NestingMode(Si(ngle|mple)|Compound|List))|GradientDraws(BeforeStartingLocation|AfterEndingLocation)|M(inusSetExpressionType|a(chPortDeallocate(ReceiveRight|SendRight|None)|pTable(StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality)))|B(oxCustom|undleExecutableArchitecture(X86|I386|PPC(64)?)|etweenPredicateOperatorType|ackgroundStyle(Raised|Dark|L(ight|owered)))|S(tring(DrawingTruncatesLastVisibleLine|EncodingConversion(ExternalRepresentation|AllowLossy))|ubqueryExpressionType|p(e(ech(SentenceBoundary|ImmediateBoundary|WordBoundary)|llingState(GrammarFlag|SpellingFlag))|litViewDividerStyleThi(n|ck))|e(rvice(RequestTimedOutError|M(iscellaneousError|alformedServiceDictionaryError)|InvalidPasteboardDataError|ErrorM(inimum|aximum)|Application(NotFoundError|LaunchFailedError))|gmentStyle(Round(Rect|ed)|SmallSquare|Capsule|Textured(Rounded|Square)|Automatic)))|H(UDWindowMask|ashTable(StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality))|N(oModeColorPanel|etServiceNoAutoRename)|C(hangeRedone|o(ntainsPredicateOperatorType|l(orRenderingIntent(RelativeColorimetric|Saturation|Default|Perceptual|AbsoluteColorimetric)|lectorDisabledOption))|ellHit(None|ContentArea|TrackableArea|EditableTextArea))|T(imeZoneNameStyle(S(hort(Standard|DaylightSaving)|tandard)|DaylightSaving)|extFieldDatePickerStyle|ableViewSelectionHighlightStyle(Regular|SourceList)|racking(Mouse(Moved|EnteredAndExited)|CursorUpdate|InVisibleRect|EnabledDuringMouseDrag|A(ssumeInside|ctive(In(KeyWindow|ActiveApp)|WhenFirstResponder|Always))))|I(n(tersectSetExpressionType|dexedColorSpaceModel)|mageScale(None|Proportionally(Down|UpOrDown)|AxesIndependently))|Ope(nGLPFAAllowOfflineRenderers|rationQueue(DefaultMaxConcurrentOperationCount|Priority(High|Normal|Very(High|Low)|Low)))|D(iacriticInsensitiveSearch|ownloadsDirectory)|U(nionSetExpressionType|TF(16(BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)|32(BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)))|P(ointerFunctions(Ma(chVirtualMemory|llocMemory)|Str(ongMemory|uctPersonality)|C(StringPersonality|opyIn)|IntegerPersonality|ZeroingWeakMemory|O(paque(Memory|Personality)|bjectP(ointerPersonality|ersonality)))|at(hStyle(Standard|NavigationBar|PopUp)|ternColorSpaceModel)|rintPanelShows(Scaling|Copies|Orientation|P(a(perSize|ge(Range|SetupAccessory))|review)))|Executable(RuntimeMismatchError|NotLoadableError|ErrorM(inimum|aximum)|L(inkError|oadError)|ArchitectureMismatchError)|KeyValueObservingOption(Initial|Prior)|F(i(ndPanelSubstringMatchType(StartsWith|Contains|EndsWith|FullWord)|leRead(TooLargeError|UnknownStringEncodingError))|orcedOrderingSearch)|Wi(ndow(BackingLocation(MainMemory|Default|VideoMemory)|Sharing(Read(Only|Write)|None)|CollectionBehavior(MoveToActiveSpace|CanJoinAllSpaces|Default))|dthInsensitiveSearch)|AggregateExpressionType)\\b", + "name": "support.constant.cocoa.leopard.objc" + }, + "anonymous_pattern_3": { + "begin": "@\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objc" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objc" + } + }, + "name": "string.quoted.double.objc", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "match": "(?x)%\n\t\t\t\t\t\t(\\d+\\$)? # field (argument #)\n\t\t\t\t\t\t[#0\\- +']* # flags\n\t\t\t\t\t\t((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n\t\t\t\t\t\t(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n\t\t\t\t\t\t[@] # conversion type\n\t\t\t\t\t", + "name": "constant.other.placeholder.objc" + }, + { + "include": "#string_placeholder" + } + ] + }, + "anonymous_pattern_30": { + "match": "\\bNS(R(GB(ModeColorPanel|ColorSpaceModel)|ight(Mouse(D(own(Mask)?|ragged(Mask)?)|Up(Mask)?)|T(ext(Movement|Alignment)|ab(sBezelBorder|StopType))|ArrowFunctionKey)|ound(RectBezelStyle|Bankers|ed(BezelStyle|TokenStyle|DisclosureBezelStyle)|Down|Up|Plain|Line(CapStyle|JoinStyle))|un(StoppedResponse|ContinuesResponse|AbortedResponse)|e(s(izableWindowMask|et(CursorRectsRunLoopOrdering|FunctionKey))|ce(ssedBezelStyle|iver(sCantHandleCommandScriptError|EvaluationScriptError))|turnTextMovement|doFunctionKey|quiredArgumentsMissingScriptError|l(evancyLevelIndicatorStyle|ative(Before|After))|gular(SquareBezelStyle|ControlSize)|moveTraitFontAction)|a(n(domSubelement|geDateMode)|tingLevelIndicatorStyle|dio(ModeMatrix|Button)))|G(IFFileType|lyph(Below|Inscribe(B(elow|ase)|Over(strike|Below)|Above)|Layout(WithPrevious|A(tAPoint|gainstAPoint))|A(ttribute(BidiLevel|Soft|Inscribe|Elastic)|bove))|r(ooveBorder|eaterThan(Comparison|OrEqualTo(Comparison|PredicateOperatorType)|PredicateOperatorType)|a(y(ModeColorPanel|ColorSpaceModel)|dient(None|Con(cave(Strong|Weak)|vex(Strong|Weak)))|phiteControlTint)))|XML(N(o(tationDeclarationKind|de(CompactEmptyElement|IsCDATA|OptionsNone|Use(SingleQuotes|DoubleQuotes)|Pre(serve(NamespaceOrder|C(haracterReferences|DATA)|DTD|Prefixes|E(ntities|mptyElements)|Quotes|Whitespace|A(ttributeOrder|ll))|ttyPrint)|ExpandEmptyElement))|amespaceKind)|CommentKind|TextKind|InvalidKind|D(ocument(X(MLKind|HTMLKind|Include)|HTMLKind|T(idy(XML|HTML)|extKind)|IncludeContentTypeDeclaration|Validate|Kind)|TDKind)|P(arser(GTRequiredError|XMLDeclNot(StartedError|FinishedError)|Mi(splaced(XMLDeclarationError|CDATAEndStringError)|xedContentDeclNot(StartedError|FinishedError))|S(t(andaloneValueError|ringNot(StartedError|ClosedError))|paceRequiredError|eparatorRequiredError)|N(MTOKENRequiredError|o(t(ationNot(StartedError|FinishedError)|WellBalancedError)|DTDError)|amespaceDeclarationError|AMERequiredError)|C(haracterRef(In(DTDError|PrologError|EpilogError)|AtEOFError)|o(nditionalSectionNot(StartedError|FinishedError)|mment(NotFinishedError|ContainsDoubleHyphenError))|DATANotFinishedError)|TagNameMismatchError|In(ternalError|valid(HexCharacterRefError|C(haracter(RefError|InEntityError|Error)|onditionalSectionError)|DecimalCharacterRefError|URIError|Encoding(NameError|Error)))|OutOfMemoryError|D(ocumentStartError|elegateAbortedParseError|OCTYPEDeclNotFinishedError)|U(RI(RequiredError|FragmentError)|n(declaredEntityError|parsedEntityError|knownEncodingError|finishedTagError))|P(CDATARequiredError|ublicIdentifierRequiredError|arsedEntityRef(MissingSemiError|NoNameError|In(Internal(SubsetError|Error)|PrologError|EpilogError)|AtEOFError)|r(ocessingInstructionNot(StartedError|FinishedError)|ematureDocumentEndError))|E(n(codingNotSupportedError|tity(Ref(In(DTDError|PrologError|EpilogError)|erence(MissingSemiError|WithoutNameError)|LoopError|AtEOFError)|BoundaryError|Not(StartedError|FinishedError)|Is(ParameterError|ExternalError)|ValueRequiredError))|qualExpectedError|lementContentDeclNot(StartedError|FinishedError)|xt(ernalS(tandaloneEntityError|ubsetNotFinishedError)|raContentError)|mptyDocumentError)|L(iteralNot(StartedError|FinishedError)|T(RequiredError|SlashRequiredError)|essThanSymbolInAttributeError)|Attribute(RedefinedError|HasNoValueError|Not(StartedError|FinishedError)|ListNot(StartedError|FinishedError)))|rocessingInstructionKind)|E(ntity(GeneralKind|DeclarationKind|UnparsedKind|P(ar(sedKind|ameterKind)|redefined))|lement(Declaration(MixedKind|UndefinedKind|E(lementKind|mptyKind)|Kind|AnyKind)|Kind))|Attribute(N(MToken(sKind|Kind)|otationKind)|CDATAKind|ID(Ref(sKind|Kind)|Kind)|DeclarationKind|En(tit(yKind|iesKind)|umerationKind)|Kind))|M(i(n(XEdge|iaturizableWindowMask|YEdge|uteCalendarUnit)|terLineJoinStyle|ddleSubelement|xedState)|o(nthCalendarUnit|deSwitchFunctionKey|use(Moved(Mask)?|E(ntered(Mask)?|ventSubtype|xited(Mask)?))|veToBezierPathElement|mentary(ChangeButton|Push(Button|InButton)|Light(Button)?))|enuFunctionKey|a(c(intoshInterfaceStyle|OSRomanStringEncoding)|tchesPredicateOperatorType|ppedRead|x(XEdge|YEdge))|ACHOperatingSystem)|B(MPFileType|o(ttomTabsBezelBorder|ldFontMask|rderlessWindowMask|x(Se(condary|parator)|OldStyle|Primary))|uttLineCapStyle|e(zelBorder|velLineJoinStyle|low(Bottom|Top)|gin(sWith(Comparison|PredicateOperatorType)|FunctionKey))|lueControlTint|ack(spaceCharacter|tabTextMovement|ingStore(Retained|Buffered|Nonretained)|TabCharacter|wardsSearch|groundTab)|r(owser(NoColumnResizing|UserColumnResizing|AutoColumnResizing)|eakFunctionKey))|S(h(ift(JISStringEncoding|KeyMask)|ow(ControlGlyphs|InvisibleGlyphs)|adowlessSquareBezelStyle)|y(s(ReqFunctionKey|tem(D(omainMask|efined(Mask)?)|FunctionKey))|mbolStringEncoding)|c(a(nnedOption|le(None|ToFit|Proportionally))|r(oll(er(NoPart|Increment(Page|Line|Arrow)|Decrement(Page|Line|Arrow)|Knob(Slot)?|Arrows(M(inEnd|axEnd)|None|DefaultSetting))|Wheel(Mask)?|LockFunctionKey)|eenChangedEventType))|t(opFunctionKey|r(ingDrawing(OneShot|DisableScreenFontSubstitution|Uses(DeviceMetrics|FontLeading|LineFragmentOrigin))|eam(Status(Reading|NotOpen|Closed|Open(ing)?|Error|Writing|AtEnd)|Event(Has(BytesAvailable|SpaceAvailable)|None|OpenCompleted|E(ndEncountered|rrorOccurred)))))|i(ngle(DateMode|UnderlineStyle)|ze(DownFontAction|UpFontAction))|olarisOperatingSystem|unOSOperatingSystem|pecialPageOrder|e(condCalendarUnit|lect(By(Character|Paragraph|Word)|i(ng(Next|Previous)|onAffinity(Downstream|Upstream))|edTab|FunctionKey)|gmentSwitchTracking(Momentary|Select(One|Any)))|quareLineCapStyle|witchButton|ave(ToOperation|Op(tions(Yes|No|Ask)|eration)|AsOperation)|mall(SquareBezelStyle|C(ontrolSize|apsFontMask)|IconButtonBezelStyle))|H(ighlightModeMatrix|SBModeColorPanel|o(ur(Minute(SecondDatePickerElementFlag|DatePickerElementFlag)|CalendarUnit)|rizontalRuler|meFunctionKey)|TTPCookieAcceptPolicy(Never|OnlyFromMainDocumentDomain|Always)|e(lp(ButtonBezelStyle|KeyMask|FunctionKey)|avierFontAction)|PUXOperatingSystem)|Year(MonthDa(yDatePickerElementFlag|tePickerElementFlag)|CalendarUnit)|N(o(n(StandardCharacterSetFontMask|ZeroWindingRule|activatingPanelMask|LossyASCIIStringEncoding)|Border|t(ification(SuspensionBehavior(Hold|Coalesce|D(eliverImmediately|rop))|NoCoalescing|CoalescingOn(Sender|Name)|DeliverImmediately|PostToAllSessions)|PredicateType|EqualToPredicateOperatorType)|S(cr(iptError|ollerParts)|ubelement|pecifierError)|CellMask|T(itle|opLevelContainersSpecifierError|abs(BezelBorder|NoBorder|LineBorder))|I(nterfaceStyle|mage)|UnderlineStyle|FontChangeAction)|u(ll(Glyph|CellType)|m(eric(Search|PadKeyMask)|berFormatter(Round(Half(Down|Up|Even)|Ceiling|Down|Up|Floor)|Behavior(10|Default)|S(cientificStyle|pellOutStyle)|NoStyle|CurrencyStyle|DecimalStyle|P(ercentStyle|ad(Before(Suffix|Prefix)|After(Suffix|Prefix))))))|e(t(Services(BadArgumentError|NotFoundError|C(ollisionError|ancelledError)|TimeoutError|InvalidError|UnknownError|ActivityInProgress)|workDomainMask)|wlineCharacter|xt(StepInterfaceStyle|FunctionKey))|EXTSTEPStringEncoding|a(t(iveShortGlyphPacking|uralTextAlignment)|rrowFontMask))|C(hange(ReadOtherContents|GrayCell(Mask)?|BackgroundCell(Mask)?|Cleared|Done|Undone|Autosaved)|MYK(ModeColorPanel|ColorSpaceModel)|ircular(BezelStyle|Slider)|o(n(stantValueExpressionType|t(inuousCapacityLevelIndicatorStyle|entsCellMask|ain(sComparison|erSpecifierError)|rol(Glyph|KeyMask))|densedFontMask)|lor(Panel(RGBModeMask|GrayModeMask|HSBModeMask|C(MYKModeMask|olorListModeMask|ustomPaletteModeMask|rayonModeMask)|WheelModeMask|AllModesMask)|ListModeColorPanel)|reServiceDirectory|m(p(osite(XOR|Source(In|O(ut|ver)|Atop)|Highlight|C(opy|lear)|Destination(In|O(ut|ver)|Atop)|Plus(Darker|Lighter))|ressedFontMask)|mandKeyMask))|u(stom(SelectorPredicateOperatorType|PaletteModeColorPanel)|r(sor(Update(Mask)?|PointingDevice)|veToBezierPathElement))|e(nterT(extAlignment|abStopType)|ll(State|H(ighlighted|as(Image(Horizontal|OnLeftOrBottom)|OverlappingImage))|ChangesContents|Is(Bordered|InsetButton)|Disabled|Editable|LightsBy(Gray|Background|Contents)|AllowsMixedState))|l(ipPagination|o(s(ePathBezierPathElement|ableWindowMask)|ckAndCalendarDatePickerStyle)|ear(ControlTint|DisplayFunctionKey|LineFunctionKey))|a(seInsensitive(Search|PredicateOption)|n(notCreateScriptCommandError|cel(Button|TextMovement))|chesDirectory|lculation(NoError|Overflow|DivideByZero|Underflow|LossOfPrecision)|rriageReturnCharacter)|r(itical(Request|AlertStyle)|ayonModeColorPanel))|T(hick(SquareBezelStyle|erSquareBezelStyle)|ypesetter(Behavior|HorizontalTabAction|ContainerBreakAction|ZeroAdvancementAction|OriginalBehavior|ParagraphBreakAction|WhitespaceAction|L(ineBreakAction|atestBehavior))|i(ckMark(Right|Below|Left|Above)|tledWindowMask|meZoneDatePickerElementFlag)|o(olbarItemVisibilityPriority(Standard|High|User|Low)|pTabsBezelBorder|ggleButton)|IFF(Compression(N(one|EXT)|CCITTFAX(3|4)|OldJPEG|JPEG|PackBits|LZW)|FileType)|e(rminate(Now|Cancel|Later)|xt(Read(InapplicableDocumentTypeError|WriteErrorM(inimum|aximum))|Block(M(i(nimum(Height|Width)|ddleAlignment)|a(rgin|ximum(Height|Width)))|B(o(ttomAlignment|rder)|aselineAlignment)|Height|TopAlignment|P(ercentageValueType|adding)|Width|AbsoluteValueType)|StorageEdited(Characters|Attributes)|CellType|ured(RoundedBezelStyle|BackgroundWindowMask|SquareBezelStyle)|Table(FixedLayoutAlgorithm|AutomaticLayoutAlgorithm)|Field(RoundedBezel|SquareBezel|AndStepperDatePickerStyle)|WriteInapplicableDocumentTypeError|ListPrependEnclosingMarker))|woByteGlyphPacking|ab(Character|TextMovement|le(tP(oint(Mask|EventSubtype)?|roximity(Mask|EventSubtype)?)|Column(NoResizing|UserResizingMask|AutoresizingMask)|View(ReverseSequentialColumnAutoresizingStyle|GridNone|S(olid(HorizontalGridLineMask|VerticalGridLineMask)|equentialColumnAutoresizingStyle)|NoColumnAutoresizing|UniformColumnAutoresizingStyle|FirstColumnOnlyAutoresizingStyle|LastColumnOnlyAutoresizingStyle)))|rackModeMatrix)|I(n(sert(CharFunctionKey|FunctionKey|LineFunctionKey)|t(Type|ernalS(criptError|pecifierError))|dexSubelement|validIndexSpecifierError|formational(Request|AlertStyle)|PredicateOperatorType)|talicFontMask|SO(2022JPStringEncoding|Latin(1StringEncoding|2StringEncoding))|dentityMappingCharacterCollection|llegalTextMovement|mage(R(ight|ep(MatchesDevice|LoadStatus(ReadingHeader|Completed|InvalidData|Un(expectedEOF|knownType)|WillNeedAllData)))|Below|C(ellType|ache(BySize|Never|Default|Always))|Interpolation(High|None|Default|Low)|O(nly|verlaps)|Frame(Gr(oove|ayBezel)|Button|None|Photo)|L(oadStatus(ReadError|C(ompleted|ancelled)|InvalidData|UnexpectedEOF)|eft)|A(lign(Right|Bottom(Right|Left)?|Center|Top(Right|Left)?|Left)|bove)))|O(n(State|eByteGlyphPacking|OffButton|lyScrollerArrows)|ther(Mouse(D(own(Mask)?|ragged(Mask)?)|Up(Mask)?)|TextMovement)|SF1OperatingSystem|pe(n(GL(GO(Re(setLibrary|tainRenderers)|ClearFormatCache|FormatCacheSize)|PFA(R(obust|endererID)|M(inimumPolicy|ulti(sample|Screen)|PSafe|aximumPolicy)|BackingStore|S(creenMask|te(ncilSize|reo)|ingleRenderer|upersample|ample(s|Buffers|Alpha))|NoRecovery|C(o(lor(Size|Float)|mpliant)|losestPolicy)|OffScreen|D(oubleBuffer|epthSize)|PixelBuffer|VirtualScreenCount|FullScreen|Window|A(cc(umSize|elerated)|ux(Buffers|DepthStencil)|l(phaSize|lRenderers))))|StepUnicodeReservedBase)|rationNotSupportedForKeyS(criptError|pecifierError))|ffState|KButton|rPredicateType|bjC(B(itfield|oolType)|S(hortType|tr(ingType|uctType)|electorType)|NoType|CharType|ObjectType|DoubleType|UnionType|PointerType|VoidType|FloatType|Long(Type|longType)|ArrayType))|D(i(s(c(losureBezelStyle|reteCapacityLevelIndicatorStyle)|playWindowRunLoopOrdering)|acriticInsensitivePredicateOption|rect(Selection|PredicateModifier))|o(c(ModalWindowMask|ument(Directory|ationDirectory))|ubleType|wn(TextMovement|ArrowFunctionKey))|e(s(cendingPageOrder|ktopDirectory)|cimalTabStopType|v(ice(NColorSpaceModel|IndependentModifierFlagsMask)|eloper(Directory|ApplicationDirectory))|fault(ControlTint|TokenStyle)|lete(Char(acter|FunctionKey)|FunctionKey|LineFunctionKey)|moApplicationDirectory)|a(yCalendarUnit|teFormatter(MediumStyle|Behavior(10|Default)|ShortStyle|NoStyle|FullStyle|LongStyle))|ra(wer(Clos(ingState|edState)|Open(ingState|State))|gOperation(Generic|Move|None|Copy|Delete|Private|Every|Link|All)))|U(ser(CancelledError|D(irectory|omainMask)|FunctionKey)|RL(Handle(NotLoaded|Load(Succeeded|InProgress|Failed))|CredentialPersistence(None|Permanent|ForSession))|n(scaledWindowMask|cachedRead|i(codeStringEncoding|talicFontMask|fiedTitleAndToolbarWindowMask)|d(o(CloseGroupingRunLoopOrdering|FunctionKey)|e(finedDateComponent|rline(Style(Single|None|Thick|Double)|Pattern(Solid|D(ot|ash(Dot(Dot)?)?)))))|known(ColorSpaceModel|P(ointingDevice|ageOrder)|KeyS(criptError|pecifierError))|boldFontMask)|tilityWindowMask|TF8StringEncoding|p(dateWindowsRunLoopOrdering|TextMovement|ArrowFunctionKey))|J(ustifiedTextAlignment|PEG(2000FileType|FileType)|apaneseEUC(GlyphPacking|StringEncoding))|P(o(s(t(Now|erFontMask|WhenIdle|ASAP)|iti(on(Replace|Be(fore|ginning)|End|After)|ve(IntType|DoubleType|FloatType)))|pUp(NoArrow|ArrowAt(Bottom|Center))|werOffEventType|rtraitOrientation)|NGFileType|ush(InCell(Mask)?|OnPushOffButton)|e(n(TipMask|UpperSideMask|PointingDevice|LowerSideMask)|riodic(Mask)?)|P(S(caleField|tatus(Title|Field)|aveButton)|N(ote(Title|Field)|ame(Title|Field))|CopiesField|TitleField|ImageButton|OptionsButton|P(a(perFeedButton|ge(Range(To|From)|ChoiceMatrix))|reviewButton)|LayoutButton)|lainTextTokenStyle|a(useFunctionKey|ragraphSeparatorCharacter|ge(DownFunctionKey|UpFunctionKey))|r(int(ing(ReplyLater|Success|Cancelled|Failure)|ScreenFunctionKey|erTable(NotFound|OK|Error)|FunctionKey)|o(p(ertyList(XMLFormat|MutableContainers(AndLeaves)?|BinaryFormat|Immutable|OpenStepFormat)|rietaryStringEncoding)|gressIndicator(BarStyle|SpinningStyle|Preferred(SmallThickness|Thickness|LargeThickness|AquaThickness)))|e(ssedTab|vFunctionKey))|L(HeightForm|CancelButton|TitleField|ImageButton|O(KButton|rientationMatrix)|UnitsButton|PaperNameButton|WidthForm))|E(n(terCharacter|d(sWith(Comparison|PredicateOperatorType)|FunctionKey))|v(e(nOddWindingRule|rySubelement)|aluatedObjectExpressionType)|qualTo(Comparison|PredicateOperatorType)|ra(serPointingDevice|CalendarUnit|DatePickerElementFlag)|x(clude(10|QuickDrawElementsIconCreationOption)|pandedFontMask|ecuteFunctionKey))|V(i(ew(M(in(XMargin|YMargin)|ax(XMargin|YMargin))|HeightSizable|NotSizable|WidthSizable)|aPanelFontAction)|erticalRuler|a(lidationErrorM(inimum|aximum)|riableExpressionType))|Key(SpecifierEvaluationScriptError|Down(Mask)?|Up(Mask)?|PathExpressionType|Value(MinusSetMutation|SetSetMutation|Change(Re(placement|moval)|Setting|Insertion)|IntersectSetMutation|ObservingOption(New|Old)|UnionSetMutation|ValidationError))|QTMovie(NormalPlayback|Looping(BackAndForthPlayback|Playback))|F(1(1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|7FunctionKey|i(nd(PanelAction(Replace(A(ndFind|ll(InSelection)?))?|S(howFindPanel|e(tFindString|lectAll(InSelection)?))|Next|Previous)|FunctionKey)|tPagination|le(Read(No(SuchFileError|PermissionError)|CorruptFileError|In(validFileNameError|applicableStringEncodingError)|Un(supportedSchemeError|knownError))|HandlingPanel(CancelButton|OKButton)|NoSuchFileError|ErrorM(inimum|aximum)|Write(NoPermissionError|In(validFileNameError|applicableStringEncodingError)|OutOfSpaceError|Un(supportedSchemeError|knownError))|LockingError)|xedPitchFontMask)|2(1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|o(nt(Mo(noSpaceTrait|dernSerifsClass)|BoldTrait|S(ymbolicClass|criptsClass|labSerifsClass|ansSerifClass)|C(o(ndensedTrait|llectionApplicationOnlyMask)|larendonSerifsClass)|TransitionalSerifsClass|I(ntegerAdvancementsRenderingMode|talicTrait)|O(ldStyleSerifsClass|rnamentalsClass)|DefaultRenderingMode|U(nknownClass|IOptimizedTrait)|Panel(S(hadowEffectModeMask|t(andardModesMask|rikethroughEffectModeMask)|izeModeMask)|CollectionModeMask|TextColorEffectModeMask|DocumentColorEffectModeMask|UnderlineEffectModeMask|FaceModeMask|All(ModesMask|EffectsModeMask))|ExpandedTrait|VerticalTrait|F(amilyClassMask|reeformSerifsClass)|Antialiased(RenderingMode|IntegerAdvancementsRenderingMode))|cusRing(Below|Type(None|Default|Exterior)|Only|Above)|urByteGlyphPacking|rm(attingError(M(inimum|aximum))?|FeedCharacter))|8FunctionKey|unction(ExpressionType|KeyMask)|3(1FunctionKey|2FunctionKey|3FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey)|9FunctionKey|4FunctionKey|P(RevertButton|S(ize(Title|Field)|etButton)|CurrentField|Preview(Button|Field))|l(oat(ingPointSamplesBitmapFormat|Type)|agsChanged(Mask)?)|axButton|5FunctionKey|6FunctionKey)|W(heelModeColorPanel|indow(s(NTOperatingSystem|CP125(1StringEncoding|2StringEncoding|3StringEncoding|4StringEncoding|0StringEncoding)|95(InterfaceStyle|OperatingSystem))|M(iniaturizeButton|ovedEventType)|Below|CloseButton|ToolbarButton|ZoomButton|Out|DocumentIconButton|ExposedEventType|Above)|orkspaceLaunch(NewInstance|InhibitingBackgroundOnly|Default|PreferringClassic|WithoutA(ctivation|ddingToRecents)|A(sync|nd(Hide(Others)?|Print)|llowingClassicStartup))|eek(day(CalendarUnit|OrdinalCalendarUnit)|CalendarUnit)|a(ntsBidiLevels|rningAlertStyle)|r(itingDirection(RightToLeft|Natural|LeftToRight)|apCalendarComponents))|L(i(stModeMatrix|ne(Moves(Right|Down|Up|Left)|B(order|reakBy(C(harWrapping|lipping)|Truncating(Middle|Head|Tail)|WordWrapping))|S(eparatorCharacter|weep(Right|Down|Up|Left))|ToBezierPathElement|DoesntMove|arSlider)|teralSearch|kePredicateOperatorType|ghterFontAction|braryDirectory)|ocalDomainMask|e(ssThan(Comparison|OrEqualTo(Comparison|PredicateOperatorType)|PredicateOperatorType)|ft(Mouse(D(own(Mask)?|ragged(Mask)?)|Up(Mask)?)|T(ext(Movement|Alignment)|ab(sBezelBorder|StopType))|ArrowFunctionKey))|a(yout(RightToLeft|NotDone|CantFit|OutOfGlyphs|Done|LeftToRight)|ndscapeOrientation)|ABColorSpaceModel)|A(sc(iiWithDoubleByteEUCGlyphPacking|endingPageOrder)|n(y(Type|PredicateModifier|EventMask)|choredSearch|imation(Blocking|Nonblocking(Threaded)?|E(ffect(DisappearingItemDefault|Poof)|ase(In(Out)?|Out))|Linear)|dPredicateType)|t(Bottom|tachmentCharacter|omicWrite|Top)|SCIIStringEncoding|d(obe(GB1CharacterCollection|CNS1CharacterCollection|Japan(1CharacterCollection|2CharacterCollection)|Korea1CharacterCollection)|dTraitFontAction|minApplicationDirectory)|uto(saveOperation|Pagination)|pp(lication(SupportDirectory|D(irectory|e(fined(Mask)?|legateReply(Success|Cancel|Failure)|activatedEventType))|ActivatedEventType)|KitDefined(Mask)?)|l(ternateKeyMask|pha(ShiftKeyMask|NonpremultipliedBitmapFormat|FirstBitmapFormat)|ert(SecondButtonReturn|ThirdButtonReturn|OtherReturn|DefaultReturn|ErrorReturn|FirstButtonReturn|AlternateReturn)|l(ScrollerParts|DomainsMask|PredicateModifier|LibrariesDirectory|ApplicationsDirectory))|rgument(sWrongScriptError|EvaluationScriptError)|bove(Bottom|Top)|WTEventType))\\b", + "name": "support.constant.cocoa.objc" + }, + "anonymous_pattern_4": { + "begin": "\\b(id)\\s*(?=<)", + "beginCaptures": { + "1": { + "name": "storage.type.objc" + } + }, + "end": "(?<=>)", + "name": "meta.id-with-protocol.objc", + "patterns": [ + { + "include": "#protocol_list" + } + ] + }, + "anonymous_pattern_5": { + "match": "\\b(NS_DURING|NS_HANDLER|NS_ENDHANDLER)\\b", + "name": "keyword.control.macro.objc" + }, + "anonymous_pattern_7": { + "captures": { + "1": { + "name": "punctuation.definition.keyword.objc" + } + }, + "match": "(@)(try|catch|finally|throw)\\b", + "name": "keyword.control.exception.objc" + }, + "anonymous_pattern_8": { + "captures": { + "1": { + "name": "punctuation.definition.keyword.objc" + } + }, + "match": "(@)(synchronized)\\b", + "name": "keyword.control.synchronize.objc" + }, + "anonymous_pattern_9": { + "captures": { + "1": { + "name": "punctuation.definition.keyword.objc" + } + }, + "match": "(@)(required|optional)\\b", + "name": "keyword.control.protocol-specification.objc" + }, + "apple_foundation_functional_macros": { + "begin": "(\\b(?:API_AVAILABLE|API_DEPRECATED|API_UNAVAILABLE|NS_AVAILABLE|NS_AVAILABLE_MAC|NS_AVAILABLE_IOS|NS_DEPRECATED|NS_DEPRECATED_MAC|NS_DEPRECATED_IOS|NS_SWIFT_NAME))(?:(?:\\s)+)?(\\()", + "end": "\\)", + "beginCaptures": { + "1": { + "name": "entity.name.function.preprocessor.apple-foundation.objc" + }, + "2": { + "name": "punctuation.section.macro.arguments.begin.bracket.round.apple-foundation.objc" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.macro.arguments.end.bracket.round.apple-foundation.objc" + } + }, + "name": "meta.preprocessor.macro.callable.apple-foundation.objc", + "patterns": [ + { + "include": "#c_lang" + } + ] + }, + "bracketed_content": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.scope.begin.objc" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.section.scope.end.objc" + } + }, + "name": "meta.bracketed.objc", + "patterns": [ + { + "begin": "(?=predicateWithFormat:)(?<=NSPredicate )(predicateWithFormat:)", + "beginCaptures": { + "1": { + "name": "support.function.any-method.objc" + }, + "2": { + "name": "punctuation.separator.arguments.objc" + } + }, + "end": "(?=\\])", + "name": "meta.function-call.predicate.objc", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.separator.arguments.objc" + } + }, + "match": "\\bargument(Array|s)(:)", + "name": "support.function.any-method.name-of-parameter.objc" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.arguments.objc" + } + }, + "match": "\\b\\w+(:)", + "name": "invalid.illegal.unknown-method.objc" + }, + { + "begin": "@\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objc" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objc" + } + }, + "name": "string.quoted.double.objc", + "patterns": [ + { + "match": "\\b(AND|OR|NOT|IN)\\b", + "name": "keyword.operator.logical.predicate.cocoa.objc" + }, + { + "match": "\\b(ALL|ANY|SOME|NONE)\\b", + "name": "constant.language.predicate.cocoa.objc" + }, + { + "match": "\\b(NULL|NIL|SELF|TRUE|YES|FALSE|NO|FIRST|LAST|SIZE)\\b", + "name": "constant.language.predicate.cocoa.objc" + }, + { + "match": "\\b(MATCHES|CONTAINS|BEGINSWITH|ENDSWITH|BETWEEN)\\b", + "name": "keyword.operator.comparison.predicate.cocoa.objc" + }, + { + "match": "\\bC(ASEINSENSITIVE|I)\\b", + "name": "keyword.other.modifier.predicate.cocoa.objc" + }, + { + "match": "\\b(ANYKEY|SUBQUERY|CAST|TRUEPREDICATE|FALSEPREDICATE)\\b", + "name": "keyword.other.predicate.cocoa.objc" + }, + { + "match": "\\\\(\\\\|[abefnrtv'\"?]|[0-3]\\d{,2}|[4-7]\\d?|x[a-zA-Z0-9]+)", + "name": "constant.character.escape.objc" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unknown-escape.objc" + } + ] + }, + { + "include": "#special_variables" + }, + { + "include": "#c_functions" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "(?=\\w)(?<=[\\w\\])\"] )(\\w+(?:(:)|(?=\\])))", + "beginCaptures": { + "1": { + "name": "support.function.any-method.objc" + }, + "2": { + "name": "punctuation.separator.arguments.objc" + } + }, + "end": "(?=\\])", + "name": "meta.function-call.objc", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.separator.arguments.objc" + } + }, + "match": "\\b\\w+(:)", + "name": "support.function.any-method.name-of-parameter.objc" + }, + { + "include": "#special_variables" + }, + { + "include": "#c_functions" + }, + { + "include": "$base" + } + ] + }, + { + "include": "#special_variables" + }, + { + "include": "#c_functions" + }, + { + "include": "$self" + } + ] + }, + "c_functions": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading.objc" + }, + "2": { + "name": "support.function.C99.objc" + } + }, + "match": "(\\s*)\\b(hypot(f|l)?|s(scanf|ystem|nprintf|ca(nf|lb(n(f|l)?|ln(f|l)?))|i(n(h(f|l)?|f|l)?|gn(al|bit))|tr(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(jmp|vbuf|locale|buf)|qrt(f|l)?|w(scanf|printf)|rand)|n(e(arbyint(f|l)?|xt(toward(f|l)?|after(f|l)?))|an(f|l)?)|c(s(in(h(f|l)?|f|l)?|qrt(f|l)?)|cos(h(f)?|f|l)?|imag(f|l)?|t(ime|an(h(f|l)?|f|l)?)|o(s(h(f|l)?|f|l)?|nj(f|l)?|pysign(f|l)?)|p(ow(f|l)?|roj(f|l)?)|e(il(f|l)?|xp(f|l)?)|l(o(ck|g(f|l)?)|earerr)|a(sin(h(f|l)?|f|l)?|cos(h(f|l)?|f|l)?|tan(h(f|l)?|f|l)?|lloc|rg(f|l)?|bs(f|l)?)|real(f|l)?|brt(f|l)?)|t(ime|o(upper|lower)|an(h(f|l)?|f|l)?|runc(f|l)?|gamma(f|l)?|mp(nam|file))|i(s(space|n(ormal|an)|cntrl|inf|digit|u(nordered|pper)|p(unct|rint)|finite|w(space|c(ntrl|type)|digit|upper|p(unct|rint)|lower|al(num|pha)|graph|xdigit|blank)|l(ower|ess(equal|greater)?)|al(num|pha)|gr(eater(equal)?|aph)|xdigit|blank)|logb(f|l)?|max(div|abs))|di(v|fftime)|_Exit|unget(c|wc)|p(ow(f|l)?|ut(s|c(har)?|wc(har)?)|error|rintf)|e(rf(c(f|l)?|f|l)?|x(it|p(2(f|l)?|f|l|m1(f|l)?)?))|v(s(scanf|nprintf|canf|printf|w(scanf|printf))|printf|f(scanf|printf|w(scanf|printf))|w(scanf|printf)|a_(start|copy|end|arg))|qsort|f(s(canf|e(tpos|ek))|close|tell|open|dim(f|l)?|p(classify|ut(s|c|w(s|c))|rintf)|e(holdexcept|set(e(nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(aiseexcept|ror)|get(e(nv|xceptflag)|round))|flush|w(scanf|ide|printf|rite)|loor(f|l)?|abs(f|l)?|get(s|c|pos|w(s|c))|re(open|e|ad|xp(f|l)?)|m(in(f|l)?|od(f|l)?|a(f|l|x(f|l)?)?))|l(d(iv|exp(f|l)?)|o(ngjmp|cal(time|econv)|g(1(p(f|l)?|0(f|l)?)|2(f|l)?|f|l|b(f|l)?)?)|abs|l(div|abs|r(int(f|l)?|ound(f|l)?))|r(int(f|l)?|ound(f|l)?)|gamma(f|l)?)|w(scanf|c(s(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?|mbs)|pbrk|ftime|len|r(chr|tombs)|xfrm)|to(b|mb)|rtomb)|printf|mem(set|c(hr|py|mp)|move))|a(s(sert|ctime|in(h(f|l)?|f|l)?)|cos(h(f|l)?|f|l)?|t(o(i|f|l(l)?)|exit|an(h(f|l)?|2(f|l)?|f|l)?)|b(s|ort))|g(et(s|c(har)?|env|wc(har)?)|mtime)|r(int(f|l)?|ound(f|l)?|e(name|alloc|wind|m(ove|quo(f|l)?|ainder(f|l)?))|a(nd|ise))|b(search|towc)|m(odf(f|l)?|em(set|c(hr|py|mp)|move)|ktime|alloc|b(s(init|towcs|rtowcs)|towc|len|r(towc|len))))\\b" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.function-call.leading.objc" + }, + "2": { + "name": "support.function.any-method.objc" + }, + "3": { + "name": "punctuation.definition.parameters.objc" + } + }, + "match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?<!\\w)) (\\s+))?\n \t\t\t(\\b \n \t\t\t\t(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | :: )++ # actual name\n \t\t\t)\n \t\t\t \\s*(\\()", + "name": "meta.function-call.objc" + } + ] + }, + "c_lang": { + "patterns": [ + { + "include": "#preprocessor-rule-enabled" + }, + { + "include": "#preprocessor-rule-disabled" + }, + { + "include": "#preprocessor-rule-conditional" + }, + { + "include": "#comments" + }, + { + "include": "#switch_statement" + }, + { + "match": "\\b(break|continue|do|else|for|goto|if|_Pragma|return|while)\\b", + "name": "keyword.control.objc" + }, + { + "include": "#storage_types" + }, + { + "match": "typedef", + "name": "keyword.other.typedef.objc" + }, + { + "match": "\\bin\\b", + "name": "keyword.other.in.objc" + }, + { + "match": "\\b(const|extern|register|restrict|static|volatile|inline|__block)\\b", + "name": "storage.modifier.objc" + }, + { + "match": "\\bk[A-Z]\\w*\\b", + "name": "constant.other.variable.mac-classic.objc" + }, + { + "match": "\\bg[A-Z]\\w*\\b", + "name": "variable.other.readwrite.global.mac-classic.objc" + }, + { + "match": "\\bs[A-Z]\\w*\\b", + "name": "variable.other.readwrite.static.mac-classic.objc" + }, + { + "match": "\\b(NULL|true|false|TRUE|FALSE)\\b", + "name": "constant.language.objc" + }, + { + "include": "#operators" + }, + { + "include": "#numbers" + }, + { + "include": "#strings" + }, + { + "include": "#special_variables" + }, + { + "begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+\t# define\n((?<id>[a-zA-Z_$][\\w$]*))\t # macro name\n(?:\n (\\()\n\t(\n\t \\s* \\g<id> \\s*\t\t # first argument\n\t ((,) \\s* \\g<id> \\s*)* # additional arguments\n\t (?:\\.\\.\\.)?\t\t\t# varargs ellipsis?\n\t)\n (\\))\n)?", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.define.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + }, + "3": { + "name": "entity.name.function.preprocessor.objc" + }, + "5": { + "name": "punctuation.definition.parameters.begin.objc" + }, + "6": { + "name": "variable.parameter.preprocessor.objc" + }, + "8": { + "name": "punctuation.separator.parameters.objc" + }, + "9": { + "name": "punctuation.definition.parameters.end.objc" + } + }, + "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.macro.objc", + "patterns": [ + { + "include": "#preprocessor-rule-define-line-contents" + } + ] + }, + { + "begin": "^\\s*((#)\\s*(error|warning))\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.diagnostic.$3.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.diagnostic.objc", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objc" + } + }, + "end": "\"|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objc" + } + }, + "name": "string.quoted.double.objc", + "patterns": [ + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objc" + } + }, + "end": "'|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objc" + } + }, + "name": "string.quoted.single.objc", + "patterns": [ + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "[^'\"]", + "end": "(?<!\\\\)(?=\\s*\\n)", + "name": "string.unquoted.single.objc", + "patterns": [ + { + "include": "#line_continuation_character" + }, + { + "include": "#comments" + } + ] + } + ] + }, + { + "begin": "^\\s*((#)\\s*(include(?:_next)?|import))\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.$3.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.include.objc", + "patterns": [ + { + "include": "#line_continuation_character" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objc" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objc" + } + }, + "name": "string.quoted.double.include.objc" + }, + { + "begin": "<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objc" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objc" + } + }, + "name": "string.quoted.other.lt-gt.include.objc" + } + ] + }, + { + "include": "#pragma-mark" + }, + { + "begin": "^\\s*((#)\\s*line)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.line.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objc", + "patterns": [ + { + "include": "#strings" + }, + { + "include": "#numbers" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "^\\s*(?:((#)\\s*undef))\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.undef.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objc", + "patterns": [ + { + "match": "[a-zA-Z_$][\\w$]*", + "name": "entity.name.function.preprocessor.objc" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "^\\s*(?:((#)\\s*pragma))\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.pragma.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.pragma.objc", + "patterns": [ + { + "include": "#strings" + }, + { + "match": "[a-zA-Z_$][\\w\\-$]*", + "name": "entity.other.attribute-name.pragma.preprocessor.objc" + }, + { + "include": "#numbers" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "match": "\\b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\b", + "name": "support.type.sys-types.objc" + }, + { + "match": "\\b(pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t)\\b", + "name": "support.type.pthread.objc" + }, + { + "match": "(?x) \\b\n(int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t\n|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t\n|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t\n|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t\n|uintmax_t|uintmax_t)\n\\b", + "name": "support.type.stdint.objc" + }, + { + "match": "\\b(noErr|kNilOptions|kInvalidID|kVariableLengthArray)\\b", + "name": "support.constant.mac-classic.objc" + }, + { + "match": "(?x) \\b\n(AbsoluteTime|Boolean|Byte|ByteCount|ByteOffset|BytePtr|CompTimeValue|ConstLogicalAddress|ConstStrFileNameParam\n|ConstStringPtr|Duration|Fixed|FixedPtr|Float32|Float32Point|Float64|Float80|Float96|FourCharCode|Fract|FractPtr\n|Handle|ItemCount|LogicalAddress|OptionBits|OSErr|OSStatus|OSType|OSTypePtr|PhysicalAddress|ProcessSerialNumber\n|ProcessSerialNumberPtr|ProcHandle|Ptr|ResType|ResTypePtr|ShortFixed|ShortFixedPtr|SignedByte|SInt16|SInt32|SInt64\n|SInt8|Size|StrFileName|StringHandle|StringPtr|TimeBase|TimeRecord|TimeScale|TimeValue|TimeValue64|UInt16|UInt32\n|UInt64|UInt8|UniChar|UniCharCount|UniCharCountPtr|UniCharPtr|UnicodeScalarValue|UniversalProcHandle|UniversalProcPtr\n|UnsignedFixed|UnsignedFixedPtr|UnsignedWide|UTF16Char|UTF32Char|UTF8Char)\n\\b", + "name": "support.type.mac-classic.objc" + }, + { + "match": "\\b([A-Za-z0-9_]+_t)\\b", + "name": "support.type.posix-reserved.objc" + }, + { + "include": "#block" + }, + { + "include": "#parens" + }, + { + "name": "meta.function.objc", + "begin": "(?<!\\w)(?!\\s*(?:not|compl|sizeof|not_eq|bitand|xor|bitor|and|or|and_eq|xor_eq|or_eq|alignof|alignas|_Alignof|_Alignas|while|for|do|if|else|goto|switch|return|break|case|continue|default|void|char|short|int|signed|unsigned|long|float|double|bool|_Bool|_Complex|_Imaginary|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|NULL|true|false|memory_order|atomic_bool|atomic_char|atomic_schar|atomic_uchar|atomic_short|atomic_ushort|atomic_int|atomic_uint|atomic_long|atomic_ulong|atomic_llong|atomic_ullong|atomic_char16_t|atomic_char32_t|atomic_wchar_t|atomic_int_least8_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_least16_t|atomic_int_least32_t|atomic_uint_least32_t|atomic_int_least64_t|atomic_uint_least64_t|atomic_int_fast8_t|atomic_uint_fast8_t|atomic_int_fast16_t|atomic_uint_fast16_t|atomic_int_fast32_t|atomic_uint_fast32_t|atomic_int_fast64_t|atomic_uint_fast64_t|atomic_intptr_t|atomic_uintptr_t|atomic_size_t|atomic_ptrdiff_t|atomic_intmax_t|atomic_uintmax_t|struct|union|enum|typedef|auto|register|static|extern|thread_local|inline|_Noreturn|const|volatile|restrict|_Atomic)\\s*\\()(?=[a-zA-Z_]\\w*\\s*\\()", + "end": "(?<=\\))", + "patterns": [ + { + "include": "#function-innards" + } + ] + }, + { + "include": "#line_continuation_character" + }, + { + "name": "meta.bracket.square.access.objc", + "begin": "([a-zA-Z_][a-zA-Z_0-9]*|(?<=[\\]\\)]))?(\\[)(?!\\])", + "beginCaptures": { + "1": { + "name": "variable.object.objc" + }, + "2": { + "name": "punctuation.definition.begin.bracket.square.objc" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.end.bracket.square.objc" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + { + "name": "storage.modifier.array.bracket.square.objc", + "match": "\\[\\s*\\]" + }, + { + "match": ";", + "name": "punctuation.terminator.statement.objc" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.objc" + } + ], + "repository": { + "probably_a_parameter": { + "match": "(?<=(?:[a-zA-Z_0-9] |[&*>\\]\\)]))\\s*([a-zA-Z_]\\w*)\\s*(?=(?:\\[\\]\\s*)?(?:,|\\)))", + "captures": { + "1": { + "name": "variable.parameter.probably.objc" + } + } + }, + "access-method": { + "name": "meta.function-call.member.objc", + "begin": "([a-zA-Z_][a-zA-Z_0-9]*|(?<=[\\]\\)]))\\s*(?:(\\.)|(->))((?:(?:[a-zA-Z_][a-zA-Z_0-9]*)\\s*(?:(?:\\.)|(?:->)))*)\\s*([a-zA-Z_][a-zA-Z_0-9]*)(\\()", + "beginCaptures": { + "1": { + "name": "variable.object.objc" + }, + "2": { + "name": "punctuation.separator.dot-access.objc" + }, + "3": { + "name": "punctuation.separator.pointer-access.objc" + }, + "4": { + "patterns": [ + { + "match": "\\.", + "name": "punctuation.separator.dot-access.objc" + }, + { + "match": "->", + "name": "punctuation.separator.pointer-access.objc" + }, + { + "match": "[a-zA-Z_][a-zA-Z_0-9]*", + "name": "variable.object.objc" + }, + { + "name": "everything.else.objc", + "match": ".+" + } + ] + }, + "5": { + "name": "entity.name.function.member.objc" + }, + "6": { + "name": "punctuation.section.arguments.begin.bracket.round.function.member.objc" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.arguments.end.bracket.round.function.member.objc" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + "block": { + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objc" + } + }, + "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.objc" + } + }, + "name": "meta.block.objc", + "patterns": [ + { + "include": "#block_innards" + } + ] + } + ] + }, + "block_innards": { + "patterns": [ + { + "include": "#preprocessor-rule-enabled-block" + }, + { + "include": "#preprocessor-rule-disabled-block" + }, + { + "include": "#preprocessor-rule-conditional-block" + }, + { + "include": "#method_access" + }, + { + "include": "#member_access" + }, + { + "include": "#c_function_call" + }, + { + "name": "meta.initialization.objc", + "begin": "(?x)\n(?:\n (?:\n\t(?=\\s)(?<!else|new|return)\n\t(?<=\\w) \\s+(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas) # or word + space before name\n )\n)\n(\n (?:[A-Za-z_][A-Za-z0-9_]*+ | :: )++ # actual name\n |\n (?:(?<=operator) (?:[-*&<>=+!]+ | \\(\\) | \\[\\]))\n)\n\\s*(\\() # opening bracket", + "beginCaptures": { + "1": { + "name": "variable.other.objc" + }, + "2": { + "name": "punctuation.section.parens.begin.bracket.round.initialization.objc" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.initialization.objc" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objc" + } + }, + "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.objc" + } + }, + "patterns": [ + { + "include": "#block_innards" + } + ] + }, + { + "include": "#parens-block" + }, + { + "include": "$base" + } + ] + }, + "c_function_call": { + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(?=\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", + "end": "(?<=\\))(?!\\w)", + "name": "meta.function-call.objc", + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + "comments": { + "patterns": [ + { + "captures": { + "1": { + "name": "meta.toc-list.banner.block.objc" + } + }, + "match": "^/\\* =(\\s*.*?)\\s*= \\*/$\\n?", + "name": "comment.block.objc" + }, + { + "begin": "/\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.objc" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.objc" + } + }, + "name": "comment.block.objc" + }, + { + "captures": { + "1": { + "name": "meta.toc-list.banner.line.objc" + } + }, + "match": "^// =(\\s*.*?)\\s*=\\s*$\\n?", + "name": "comment.line.banner.objc" + }, + { + "begin": "(^[ \\t]+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.objc" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.objc" + } + }, + "end": "(?=\\n)", + "name": "comment.line.double-slash.objc", + "patterns": [ + { + "include": "#line_continuation_character" + } + ] + } + ] + } + ] + }, + "disabled": { + "begin": "^\\s*#\\s*if(n?def)?\\b.*$", + "end": "^\\s*#\\s*endif\\b", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + "line_continuation_character": { + "patterns": [ + { + "match": "(\\\\)\\n", + "captures": { + "1": { + "name": "constant.character.escape.line-continuation.objc" + } + } + } + ] + }, + "parens": { + "name": "meta.parens.objc", + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objc" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.objc" + } + }, + "patterns": [ + { + "include": "$base" + } + ] + }, + "parens-block": { + "name": "meta.parens.block.objc", + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objc" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.objc" + } + }, + "patterns": [ + { + "include": "#block_innards" + }, + { + "match": "(?-mix:(?<!:):(?!:))", + "name": "punctuation.range-based.objc" + } + ] + }, + "pragma-mark": { + "captures": { + "1": { + "name": "meta.preprocessor.pragma.objc" + }, + "2": { + "name": "keyword.control.directive.pragma.pragma-mark.objc" + }, + "3": { + "name": "punctuation.definition.directive.objc" + }, + "4": { + "name": "entity.name.tag.pragma-mark.objc" + } + }, + "match": "^\\s*(((#)\\s*pragma\\s+mark)\\s+(.*))", + "name": "meta.section.objc" + }, + "operators": { + "patterns": [ + { + "match": "(?<![\\w$])(sizeof)(?![\\w$])", + "name": "keyword.operator.sizeof.objc" + }, + { + "match": "--", + "name": "keyword.operator.decrement.objc" + }, + { + "match": "\\+\\+", + "name": "keyword.operator.increment.objc" + }, + { + "match": "%=|\\+=|-=|\\*=|(?<!\\()/=", + "name": "keyword.operator.assignment.compound.objc" + }, + { + "match": "&=|\\^=|<<=|>>=|\\|=", + "name": "keyword.operator.assignment.compound.bitwise.objc" + }, + { + "match": "<<|>>", + "name": "keyword.operator.bitwise.shift.objc" + }, + { + "match": "!=|<=|>=|==|<|>", + "name": "keyword.operator.comparison.objc" + }, + { + "match": "&&|!|\\|\\|", + "name": "keyword.operator.logical.objc" + }, + { + "match": "&|\\||\\^|~", + "name": "keyword.operator.objc" + }, + { + "match": "=", + "name": "keyword.operator.assignment.objc" + }, + { + "match": "%|\\*|/|-|\\+", + "name": "keyword.operator.objc" + }, + { + "begin": "(\\?)", + "beginCaptures": { + "1": { + "name": "keyword.operator.ternary.objc" + } + }, + "end": "(:)", + "endCaptures": { + "1": { + "name": "keyword.operator.ternary.objc" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + }, + { + "include": "$base" + } + ] + } + ] + }, + "strings": { + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objc" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objc" + } + }, + "name": "string.quoted.double.objc", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_placeholder" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objc" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objc" + } + }, + "name": "string.quoted.single.objc", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#line_continuation_character" + } + ] + } + ] + }, + "string_escaped_char": { + "patterns": [ + { + "match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )", + "name": "constant.character.escape.objc" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unknown-escape.objc" + } + ] + }, + "string_placeholder": { + "patterns": [ + { + "match": "(?x) %\n(\\d+\\$)?\t\t\t\t\t\t # field (argument #)\n[#0\\- +']*\t\t\t\t\t\t # flags\n[,;:_]?\t\t\t\t\t\t\t # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)?\t\t # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?\t# precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%]\t\t # conversion type", + "name": "constant.other.placeholder.objc" + }, + { + "match": "(%)(?!\"\\s*(PRI|SCN))", + "captures": { + "1": { + "name": "invalid.illegal.placeholder.objc" + } + } + } + ] + }, + "storage_types": { + "patterns": [ + { + "match": "(?-mix:(?<!\\w)(?:void|char|short|int|signed|unsigned|long|float|double|bool|_Bool)(?!\\w))", + "name": "storage.type.built-in.primitive.objc" + }, + { + "match": "(?-mix:(?<!\\w)(?:_Complex|_Imaginary|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|memory_order|atomic_bool|atomic_char|atomic_schar|atomic_uchar|atomic_short|atomic_ushort|atomic_int|atomic_uint|atomic_long|atomic_ulong|atomic_llong|atomic_ullong|atomic_char16_t|atomic_char32_t|atomic_wchar_t|atomic_int_least8_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_least16_t|atomic_int_least32_t|atomic_uint_least32_t|atomic_int_least64_t|atomic_uint_least64_t|atomic_int_fast8_t|atomic_uint_fast8_t|atomic_int_fast16_t|atomic_uint_fast16_t|atomic_int_fast32_t|atomic_uint_fast32_t|atomic_int_fast64_t|atomic_uint_fast64_t|atomic_intptr_t|atomic_uintptr_t|atomic_size_t|atomic_ptrdiff_t|atomic_intmax_t|atomic_uintmax_t)(?!\\w))", + "name": "storage.type.built-in.objc" + }, + { + "match": "(?-mix:\\b(asm|__asm__|enum|struct|union)\\b)", + "name": "storage.type.$1.objc" + } + ] + }, + "vararg_ellipses": { + "match": "(?<!\\.)\\.\\.\\.(?!\\.)", + "name": "punctuation.vararg-ellipses.objc" + }, + "preprocessor-rule-conditional": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if(?:n?def)?\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objc", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#preprocessor-rule-enabled-elif" + }, + { + "include": "#preprocessor-rule-enabled-else" + }, + { + "include": "#preprocessor-rule-disabled-elif" + }, + { + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objc", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "$base" + } + ] + }, + { + "match": "^\\s*#\\s*(else|elif|endif)\\b", + "captures": { + "0": { + "name": "invalid.illegal.stray-$1.objc" + } + } + } + ] + }, + "preprocessor-rule-conditional-block": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if(?:n?def)?\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objc", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#preprocessor-rule-enabled-elif-block" + }, + { + "include": "#preprocessor-rule-enabled-else-block" + }, + { + "include": "#preprocessor-rule-disabled-elif" + }, + { + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objc", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#block_innards" + } + ] + }, + { + "match": "^\\s*#\\s*(else|elif|endif)\\b", + "captures": { + "0": { + "name": "invalid.illegal.stray-$1.objc" + } + } + } + ] + }, + "preprocessor-rule-conditional-line": { + "patterns": [ + { + "match": "(?:\\bdefined\\b\\s*$)|(?:\\bdefined\\b(?=\\s*\\(*\\s*(?:(?!defined\\b)[a-zA-Z_$][\\w$]*\\b)\\s*\\)*\\s*(?:\\n|//|/\\*|\\?|\\:|&&|\\|\\||\\\\\\s*\\n)))", + "name": "keyword.control.directive.conditional.objc" + }, + { + "match": "\\bdefined\\b", + "name": "invalid.illegal.macro-name.objc" + }, + { + "include": "#comments" + }, + { + "include": "#strings" + }, + { + "include": "#numbers" + }, + { + "begin": "\\?", + "beginCaptures": { + "0": { + "name": "keyword.operator.ternary.objc" + } + }, + "end": ":", + "endCaptures": { + "0": { + "name": "keyword.operator.ternary.objc" + } + }, + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#operators" + }, + { + "match": "\\b(NULL|true|false|TRUE|FALSE)\\b", + "name": "constant.language.objc" + }, + { + "match": "[a-zA-Z_$][\\w$]*", + "name": "entity.name.function.preprocessor.objc" + }, + { + "include": "#line_continuation_character" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objc" + } + }, + "end": "\\)|(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.objc" + } + }, + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + } + ] + }, + "preprocessor-rule-disabled": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)", + "name": "meta.preprocessor.objc", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments" + }, + { + "include": "#preprocessor-rule-enabled-elif" + }, + { + "include": "#preprocessor-rule-enabled-else" + }, + { + "include": "#preprocessor-rule-disabled-elif" + }, + { + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))", + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objc", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "$base" + } + ] + }, + { + "contentName": "comment.block.preprocessor.if-branch.objc", + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + } + ] + } + ] + }, + "preprocessor-rule-disabled-block": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)", + "name": "meta.preprocessor.objc", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments" + }, + { + "include": "#preprocessor-rule-enabled-elif-block" + }, + { + "include": "#preprocessor-rule-enabled-else-block" + }, + { + "include": "#preprocessor-rule-disabled-elif" + }, + { + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))", + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objc", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#block_innards" + } + ] + }, + { + "contentName": "comment.block.preprocessor.if-branch.in-block.objc", + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + } + ] + } + ] + }, + "preprocessor-rule-disabled-elif": { + "begin": "^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))", + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objc", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments" + }, + { + "contentName": "comment.block.preprocessor.elif-branch.objc", + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + } + ] + }, + "preprocessor-rule-enabled": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + }, + "3": { + "name": "constant.numeric.preprocessor.objc" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)", + "name": "meta.preprocessor.objc", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments" + }, + { + "contentName": "comment.block.preprocessor.else-branch.objc", + "begin": "^\\s*((#)\\s*else\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "contentName": "comment.block.preprocessor.if-branch.objc", + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "$base" + } + ] + } + ] + } + ] + }, + "preprocessor-rule-enabled-block": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)", + "name": "meta.preprocessor.objc", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments" + }, + { + "contentName": "comment.block.preprocessor.else-branch.in-block.objc", + "begin": "^\\s*((#)\\s*else\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "contentName": "comment.block.preprocessor.if-branch.in-block.objc", + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#block_innards" + } + ] + } + ] + } + ] + }, + "preprocessor-rule-enabled-elif": { + "begin": "^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objc", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments" + }, + { + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:endif)\\b))", + "patterns": [ + { + "contentName": "comment.block.preprocessor.elif-branch.objc", + "begin": "^\\s*((#)\\s*(else)\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "contentName": "comment.block.preprocessor.elif-branch.objc", + "begin": "^\\s*((#)\\s*(elif)\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "include": "$base" + } + ] + } + ] + }, + "preprocessor-rule-enabled-elif-block": { + "begin": "^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objc", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments" + }, + { + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:endif)\\b))", + "patterns": [ + { + "contentName": "comment.block.preprocessor.elif-branch.in-block.objc", + "begin": "^\\s*((#)\\s*(else)\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "contentName": "comment.block.preprocessor.elif-branch.objc", + "begin": "^\\s*((#)\\s*(elif)\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "include": "#block_innards" + } + ] + } + ] + }, + "preprocessor-rule-enabled-else": { + "begin": "^\\s*((#)\\s*else\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "include": "$base" + } + ] + }, + "preprocessor-rule-enabled-else-block": { + "begin": "^\\s*((#)\\s*else\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objc" + }, + "1": { + "name": "keyword.control.directive.conditional.objc" + }, + "2": { + "name": "punctuation.definition.directive.objc" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "include": "#block_innards" + } + ] + }, + "preprocessor-rule-define-line-contents": { + "patterns": [ + { + "include": "#vararg_ellipses" + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objc" + } + }, + "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.objc" + } + }, + "name": "meta.block.objc", + "patterns": [ + { + "include": "#preprocessor-rule-define-line-blocks" + } + ] + }, + { + "match": "\\(", + "name": "punctuation.section.parens.begin.bracket.round.objc" + }, + { + "match": "\\)", + "name": "punctuation.section.parens.end.bracket.round.objc" + }, + { + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas|asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\s*\\()\n(?=\n (?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name\n |\n (?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", + "end": "(?<=\\))(?!\\w)|(?<!\\\\)(?=\\s*\\n)", + "name": "meta.function.objc", + "patterns": [ + { + "include": "#preprocessor-rule-define-line-functions" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objc" + } + }, + "end": "\"|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objc" + } + }, + "name": "string.quoted.double.objc", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_placeholder" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objc" + } + }, + "end": "'|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objc" + } + }, + "name": "string.quoted.single.objc", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "include": "#method_access" + }, + { + "include": "#member_access" + }, + { + "include": "$base" + } + ] + }, + "preprocessor-rule-define-line-blocks": { + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objc" + } + }, + "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.objc" + } + }, + "patterns": [ + { + "include": "#preprocessor-rule-define-line-blocks" + }, + { + "include": "#preprocessor-rule-define-line-contents" + } + ] + }, + { + "include": "#preprocessor-rule-define-line-contents" + } + ] + }, + "preprocessor-rule-define-line-functions": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#storage_types" + }, + { + "include": "#vararg_ellipses" + }, + { + "include": "#method_access" + }, + { + "include": "#member_access" + }, + { + "include": "#operators" + }, + { + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.objc" + }, + "2": { + "name": "punctuation.section.arguments.begin.bracket.round.objc" + } + }, + "end": "(\\))|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "1": { + "name": "punctuation.section.arguments.end.bracket.round.objc" + } + }, + "patterns": [ + { + "include": "#preprocessor-rule-define-line-functions" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objc" + } + }, + "end": "(\\))|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "1": { + "name": "punctuation.section.parens.end.bracket.round.objc" + } + }, + "patterns": [ + { + "include": "#preprocessor-rule-define-line-functions" + } + ] + }, + { + "include": "#preprocessor-rule-define-line-contents" + } + ] + }, + "function-innards": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#storage_types" + }, + { + "include": "#operators" + }, + { + "include": "#vararg_ellipses" + }, + { + "name": "meta.function.definition.parameters.objc", + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.objc" + }, + "2": { + "name": "punctuation.section.parameters.begin.bracket.round.objc" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parameters.end.bracket.round.objc" + } + }, + "patterns": [ + { + "include": "#probably_a_parameter" + }, + { + "include": "#function-innards" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objc" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.objc" + } + }, + "patterns": [ + { + "include": "#function-innards" + } + ] + }, + { + "include": "$base" + } + ] + }, + "function-call-innards": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#storage_types" + }, + { + "include": "#method_access" + }, + { + "include": "#member_access" + }, + { + "include": "#operators" + }, + { + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.objc" + }, + "2": { + "name": "punctuation.section.arguments.begin.bracket.round.objc" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.arguments.end.bracket.round.objc" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objc" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.objc" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + { + "include": "#block_innards" + } + ] + }, + "default_statement": { + "name": "meta.conditional.case.objc", + "begin": "((?<!\\w)default(?!\\w))", + "beginCaptures": { + "1": { + "name": "keyword.control.default.objc" + } + }, + "end": "(:)", + "endCaptures": { + "1": { + "name": "punctuation.separator.case.default.objc" + } + }, + "patterns": [ + { + "include": "#conditional_context" + } + ] + }, + "case_statement": { + "name": "meta.conditional.case.objc", + "begin": "((?<!\\w)case(?!\\w))", + "beginCaptures": { + "1": { + "name": "keyword.control.case.objc" + } + }, + "end": "(:)", + "endCaptures": { + "1": { + "name": "punctuation.separator.case.objc" + } + }, + "patterns": [ + { + "include": "#conditional_context" + } + ] + }, + "switch_statement": { + "name": "meta.block.switch.objc", + "begin": "(((?<!\\w)switch(?!\\w)))", + "beginCaptures": { + "1": { + "name": "meta.head.switch.objc" + }, + "2": { + "name": "keyword.control.switch.objc" + } + }, + "end": "(?:(?<=\\})|(?=[;>\\[\\]=]))", + "patterns": [ + { + "name": "meta.head.switch.objc", + "begin": "\\G ?", + "end": "((?:\\{|(?=;)))", + "endCaptures": { + "1": { + "name": "punctuation.section.block.begin.bracket.curly.switch.objc" + } + }, + "patterns": [ + { + "include": "#switch_conditional_parentheses" + }, + { + "include": "$base" + } + ] + }, + { + "name": "meta.body.switch.objc", + "begin": "(?<=\\{)", + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.section.block.end.bracket.curly.switch.objc" + } + }, + "patterns": [ + { + "include": "#default_statement" + }, + { + "include": "#case_statement" + }, + { + "include": "$base" + }, + { + "include": "#block_innards" + } + ] + }, + { + "name": "meta.tail.switch.objc", + "begin": "(?<=})[\\s\\n]*", + "end": "[\\s\\n]*(?=;)", + "patterns": [ + { + "include": "$base" + } + ] + } + ] + }, + "switch_conditional_parentheses": { + "name": "meta.conditional.switch.objc", + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.section.parens.begin.bracket.round.conditional.switch.objc" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.parens.end.bracket.round.conditional.switch.objc" + } + }, + "patterns": [ + { + "include": "#conditional_context" + } + ] + }, + "static_assert": { + "begin": "(static_assert|_Static_assert)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.static_assert.objc" + }, + "2": { + "name": "punctuation.section.arguments.begin.bracket.round.objc" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.arguments.end.bracket.round.objc" + } + }, + "patterns": [ + { + "name": "meta.static_assert.message.objc", + "begin": "(,)\\s*(?=(?:L|u8|u|U\\s*\\\")?)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.delimiter.objc" + } + }, + "end": "(?=\\))", + "patterns": [ + { + "include": "#string_context" + }, + { + "include": "#string_context_c" + } + ] + }, + { + "include": "#function_call_context" + } + ] + }, + "conditional_context": { + "patterns": [ + { + "include": "$base" + }, + { + "include": "#block_innards" + } + ] + }, + "member_access": { + "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!(?:void|char|short|int|signed|unsigned|long|float|double|bool|_Bool|_Complex|_Imaginary|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|memory_order|atomic_bool|atomic_char|atomic_schar|atomic_uchar|atomic_short|atomic_ushort|atomic_int|atomic_uint|atomic_long|atomic_ulong|atomic_llong|atomic_ullong|atomic_char16_t|atomic_char32_t|atomic_wchar_t|atomic_int_least8_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_least16_t|atomic_int_least32_t|atomic_uint_least32_t|atomic_int_least64_t|atomic_uint_least64_t|atomic_int_fast8_t|atomic_uint_fast8_t|atomic_int_fast16_t|atomic_uint_fast16_t|atomic_int_fast32_t|atomic_uint_fast32_t|atomic_int_fast64_t|atomic_uint_fast64_t|atomic_intptr_t|atomic_uintptr_t|atomic_size_t|atomic_ptrdiff_t|atomic_intmax_t|atomic_uintmax_t))[a-zA-Z_]\\w*\\b(?!\\())", + "captures": { + "1": { + "patterns": [ + { + "include": "#special_variables" + }, + { + "name": "variable.other.object.access.objc", + "match": "(.+)" + } + ] + }, + "2": { + "name": "punctuation.separator.dot-access.objc" + }, + "3": { + "name": "punctuation.separator.pointer-access.objc" + }, + "4": { + "patterns": [ + { + "include": "#member_access" + }, + { + "include": "#method_access" + }, + { + "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))", + "captures": { + "1": { + "patterns": [ + { + "include": "#special_variables" + }, + { + "name": "variable.other.object.access.objc", + "match": "(.+)" + } + ] + }, + "2": { + "name": "punctuation.separator.dot-access.objc" + }, + "3": { + "name": "punctuation.separator.pointer-access.objc" + } + } + } + ] + }, + "5": { + "name": "variable.other.member.objc" + } + } + }, + "method_access": { + "contentName": "meta.function-call.member.objc", + "begin": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*([a-zA-Z_]\\w*)(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#special_variables" + }, + { + "name": "variable.other.object.access.objc", + "match": "(.+)" + } + ] + }, + "2": { + "name": "punctuation.separator.dot-access.objc" + }, + "3": { + "name": "punctuation.separator.pointer-access.objc" + }, + "4": { + "patterns": [ + { + "include": "#member_access" + }, + { + "include": "#method_access" + }, + { + "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))", + "captures": { + "1": { + "patterns": [ + { + "include": "#special_variables" + }, + { + "name": "variable.other.object.access.objc", + "match": "(.+)" + } + ] + }, + "2": { + "name": "punctuation.separator.dot-access.objc" + }, + "3": { + "name": "punctuation.separator.pointer-access.objc" + } + } + } + ] + }, + "5": { + "name": "entity.name.function.member.objc" + }, + "6": { + "name": "punctuation.section.arguments.begin.bracket.round.function.member.objc" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.arguments.end.bracket.round.function.member.objc" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + "numbers": { + "begin": "(?<!\\w)(?=\\d|\\.\\d)", + "end": "(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", + "patterns": [ + { + "match": "(\\G0[xX])(?:([0-9a-fA-F](?:(?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?((?:(?<=[0-9a-fA-F])\\.|\\.(?=[0-9a-fA-F])))(?:([0-9a-fA-F](?:(?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?(?:((?<!')([pP])(\\+)?(\\-)?((?-mix:(?:[0-9](?:(?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)))))?(?:([lLfF](?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", + "captures": { + "1": { + "name": "keyword.other.unit.hexadecimal.objc" + }, + "2": { + "name": "constant.numeric.hexadecimal.objc", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objc" + } + ] + }, + "3": { + "name": "punctuation.separator.constant.numeric.objc" + }, + "4": { + "name": "constant.numeric.hexadecimal.objc" + }, + "5": { + "name": "constant.numeric.hexadecimal.objc", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objc" + } + ] + }, + "6": { + "name": "punctuation.separator.constant.numeric.objc" + }, + "8": { + "name": "keyword.other.unit.exponent.hexadecimal.objc" + }, + "9": { + "name": "keyword.operator.plus.exponent.hexadecimal.objc" + }, + "10": { + "name": "keyword.operator.minus.exponent.hexadecimal.objc" + }, + "11": { + "name": "constant.numeric.exponent.hexadecimal.objc", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objc" + } + ] + }, + "12": { + "name": "keyword.other.unit.suffix.floating-point.objc" + } + } + }, + { + "match": "(\\G(?=[0-9.])(?!0[xXbB]))(?:([0-9](?:(?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?((?:(?<=[0-9])\\.|\\.(?=[0-9])))(?:([0-9](?:(?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?(?:((?<!')([eE])(\\+)?(\\-)?((?-mix:(?:[0-9](?:(?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)))))?(?:([lLfF](?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", + "captures": { + "2": { + "name": "constant.numeric.decimal.objc", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objc" + } + ] + }, + "3": { + "name": "punctuation.separator.constant.numeric.objc" + }, + "4": { + "name": "constant.numeric.decimal.point.objc" + }, + "5": { + "name": "constant.numeric.decimal.objc", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objc" + } + ] + }, + "6": { + "name": "punctuation.separator.constant.numeric.objc" + }, + "8": { + "name": "keyword.other.unit.exponent.decimal.objc" + }, + "9": { + "name": "keyword.operator.plus.exponent.decimal.objc" + }, + "10": { + "name": "keyword.operator.minus.exponent.decimal.objc" + }, + "11": { + "name": "constant.numeric.exponent.decimal.objc", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objc" + } + ] + }, + "12": { + "name": "keyword.other.unit.suffix.floating-point.objc" + } + } + }, + { + "match": "(\\G0[bB])([01](?:(?:[01]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)(?:((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", + "captures": { + "1": { + "name": "keyword.other.unit.binary.objc" + }, + "2": { + "name": "constant.numeric.binary.objc", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objc" + } + ] + }, + "3": { + "name": "punctuation.separator.constant.numeric.objc" + }, + "4": { + "name": "keyword.other.unit.suffix.integer.objc" + } + } + }, + { + "match": "(\\G0)((?:(?:[0-7]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))+)(?:((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", + "captures": { + "1": { + "name": "keyword.other.unit.octal.objc" + }, + "2": { + "name": "constant.numeric.octal.objc", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objc" + } + ] + }, + "3": { + "name": "punctuation.separator.constant.numeric.objc" + }, + "4": { + "name": "keyword.other.unit.suffix.integer.objc" + } + } + }, + { + "match": "(\\G0[xX])([0-9a-fA-F](?:(?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)(?:((?<!')([pP])(\\+)?(\\-)?((?-mix:(?:[0-9](?:(?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)))))?(?:((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", + "captures": { + "1": { + "name": "keyword.other.unit.hexadecimal.objc" + }, + "2": { + "name": "constant.numeric.hexadecimal.objc", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objc" + } + ] + }, + "3": { + "name": "punctuation.separator.constant.numeric.objc" + }, + "5": { + "name": "keyword.other.unit.exponent.hexadecimal.objc" + }, + "6": { + "name": "keyword.operator.plus.exponent.hexadecimal.objc" + }, + "7": { + "name": "keyword.operator.minus.exponent.hexadecimal.objc" + }, + "8": { + "name": "constant.numeric.exponent.hexadecimal.objc", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objc" + } + ] + }, + "9": { + "name": "keyword.other.unit.suffix.integer.objc" + } + } + }, + { + "match": "(\\G(?=[0-9.])(?!0[xXbB]))([0-9](?:(?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)(?:((?<!')([eE])(\\+)?(\\-)?((?-mix:(?:[0-9](?:(?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)))))?(?:((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", + "captures": { + "2": { + "name": "constant.numeric.decimal.objc", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objc" + } + ] + }, + "3": { + "name": "punctuation.separator.constant.numeric.objc" + }, + "5": { + "name": "keyword.other.unit.exponent.decimal.objc" + }, + "6": { + "name": "keyword.operator.plus.exponent.decimal.objc" + }, + "7": { + "name": "keyword.operator.minus.exponent.decimal.objc" + }, + "8": { + "name": "constant.numeric.exponent.decimal.objc", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objc" + } + ] + }, + "9": { + "name": "keyword.other.unit.suffix.integer.objc" + } + } + }, + { + "match": "(?:(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))+", + "name": "invalid.illegal.constant.numeric.objc" + } + ] + } + } + }, + "comment": { + "patterns": [ + { + "begin": "/\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.objc" + } + }, + "end": "\\*/", + "name": "comment.block.objc" + }, + { + "begin": "(^[ \\t]+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.objc" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.objc" + } + }, + "end": "\\n", + "name": "comment.line.double-slash.objc", + "patterns": [ + { + "match": "(?>\\\\\\s*\\n)", + "name": "punctuation.separator.continuation.objc" + } + ] + } + ] + } + ] + }, + "disabled": { + "begin": "^\\s*#\\s*if(n?def)?\\b.*$", + "comment": "eat nested preprocessor if(def)s", + "end": "^\\s*#\\s*endif\\b.*$", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + "implementation_innards": { + "patterns": [ + { + "include": "#preprocessor-rule-enabled-implementation" + }, + { + "include": "#preprocessor-rule-disabled-implementation" + }, + { + "include": "#preprocessor-rule-other-implementation" + }, + { + "include": "#property_directive" + }, + { + "include": "#method_super" + }, + { + "include": "$base" + } + ] + }, + "interface_innards": { + "patterns": [ + { + "include": "#preprocessor-rule-enabled-interface" + }, + { + "include": "#preprocessor-rule-disabled-interface" + }, + { + "include": "#preprocessor-rule-other-interface" + }, + { + "include": "#properties" + }, + { + "include": "#protocol_list" + }, + { + "include": "#method" + }, + { + "include": "$base" + } + ] + }, + "method": { + "begin": "^(-|\\+)\\s*", + "end": "(?=\\{|#)|;", + "name": "meta.function.objc", + "patterns": [ + { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.type.begin.objc" + } + }, + "end": "(\\))\\s*(\\w+\\b)", + "endCaptures": { + "1": { + "name": "punctuation.definition.type.end.objc" + }, + "2": { + "name": "entity.name.function.objc" + } + }, + "name": "meta.return-type.objc", + "patterns": [ + { + "include": "#protocol_list" + }, + { + "include": "#protocol_type_qualifier" + }, + { + "include": "$base" + } + ] + }, + { + "match": "\\b\\w+(?=:)", + "name": "entity.name.function.name-of-parameter.objc" + }, + { + "begin": "((:))\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.name-of-parameter.objc" + }, + "2": { + "name": "punctuation.separator.arguments.objc" + }, + "3": { + "name": "punctuation.definition.type.begin.objc" + } + }, + "end": "(\\))\\s*(\\w+\\b)?", + "endCaptures": { + "1": { + "name": "punctuation.definition.type.end.objc" + }, + "2": { + "name": "variable.parameter.function.objc" + } + }, + "name": "meta.argument-type.objc", + "patterns": [ + { + "include": "#protocol_list" + }, + { + "include": "#protocol_type_qualifier" + }, + { + "include": "$base" + } + ] + }, + { + "include": "#comment" + } + ] + }, + "method_super": { + "begin": "^(?=-|\\+)", + "end": "(?<=\\})|(?=#)", + "name": "meta.function-with-body.objc", + "patterns": [ + { + "include": "#method" + }, + { + "include": "$base" + } + ] + }, + "pragma-mark": { + "captures": { + "1": { + "name": "meta.preprocessor.objc" + }, + "2": { + "name": "keyword.control.import.pragma.objc" + }, + "3": { + "name": "meta.toc-list.pragma-mark.objc" + } + }, + "match": "^\\s*(#\\s*(pragma\\s+mark)\\s+(.*))", + "name": "meta.section.objc" + }, + "preprocessor-rule-disabled-implementation": { + "begin": "^\\s*(#(if)\\s+(0)\\b).*", + "captures": { + "1": { + "name": "meta.preprocessor.objc" + }, + "2": { + "name": "keyword.control.import.if.objc" + }, + "3": { + "name": "constant.numeric.preprocessor.objc" + } + }, + "end": "^\\s*(#\\s*(endif)\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "begin": "^\\s*(#\\s*(else)\\b)", + "captures": { + "1": { + "name": "meta.preprocessor.objc" + }, + "2": { + "name": "keyword.control.import.else.objc" + } + }, + "end": "(?=^\\s*#\\s*endif\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "include": "#interface_innards" + } + ] + }, + { + "begin": "", + "end": "(?=^\\s*#\\s*(else|endif)\\b.*?(?:(?=(?://|/\\*))|$))", + "name": "comment.block.preprocessor.if-branch.objc", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + } + ] + }, + "preprocessor-rule-disabled-interface": { + "begin": "^\\s*(#(if)\\s+(0)\\b).*", + "captures": { + "1": { + "name": "meta.preprocessor.objc" + }, + "2": { + "name": "keyword.control.import.if.objc" + }, + "3": { + "name": "constant.numeric.preprocessor.objc" + } + }, + "end": "^\\s*(#\\s*(endif)\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "begin": "^\\s*(#\\s*(else)\\b)", + "captures": { + "1": { + "name": "meta.preprocessor.objc" + }, + "2": { + "name": "keyword.control.import.else.objc" + } + }, + "end": "(?=^\\s*#\\s*endif\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "include": "#interface_innards" + } + ] + }, + { + "begin": "", + "end": "(?=^\\s*#\\s*(else|endif)\\b.*?(?:(?=(?://|/\\*))|$))", + "name": "comment.block.preprocessor.if-branch.objc", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + } + ] + }, + "preprocessor-rule-enabled-implementation": { + "begin": "^\\s*(#(if)\\s+(0*1)\\b)", + "captures": { + "1": { + "name": "meta.preprocessor.objc" + }, + "2": { + "name": "keyword.control.import.if.objc" + }, + "3": { + "name": "constant.numeric.preprocessor.objc" + } + }, + "end": "^\\s*(#\\s*(endif)\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "begin": "^\\s*(#\\s*(else)\\b).*", + "captures": { + "1": { + "name": "meta.preprocessor.objc" + }, + "2": { + "name": "keyword.control.import.else.objc" + } + }, + "contentName": "comment.block.preprocessor.else-branch.objc", + "end": "(?=^\\s*#\\s*endif\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "begin": "", + "end": "(?=^\\s*#\\s*(else|endif)\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "include": "#implementation_innards" + } + ] + } + ] + }, + "preprocessor-rule-enabled-interface": { + "begin": "^\\s*(#(if)\\s+(0*1)\\b)", + "captures": { + "1": { + "name": "meta.preprocessor.objc" + }, + "2": { + "name": "keyword.control.import.if.objc" + }, + "3": { + "name": "constant.numeric.preprocessor.objc" + } + }, + "end": "^\\s*(#\\s*(endif)\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "begin": "^\\s*(#\\s*(else)\\b).*", + "captures": { + "1": { + "name": "meta.preprocessor.objc" + }, + "2": { + "name": "keyword.control.import.else.objc" + } + }, + "contentName": "comment.block.preprocessor.else-branch.objc", + "end": "(?=^\\s*#\\s*endif\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "begin": "", + "end": "(?=^\\s*#\\s*(else|endif)\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "include": "#interface_innards" + } + ] + } + ] + }, + "preprocessor-rule-other-implementation": { + "begin": "^\\s*(#\\s*(if(n?def)?)\\b.*?(?:(?=(?://|/\\*))|$))", + "captures": { + "1": { + "name": "meta.preprocessor.objc" + }, + "2": { + "name": "keyword.control.import.objc" + } + }, + "end": "^\\s*(#\\s*(endif)\\b).*?(?:(?=(?://|/\\*))|$)", + "patterns": [ + { + "include": "#implementation_innards" + } + ] + }, + "preprocessor-rule-other-interface": { + "begin": "^\\s*(#\\s*(if(n?def)?)\\b.*?(?:(?=(?://|/\\*))|$))", + "captures": { + "1": { + "name": "meta.preprocessor.objc" + }, + "2": { + "name": "keyword.control.import.objc" + } + }, + "end": "^\\s*(#\\s*(endif)\\b).*?(?:(?=(?://|/\\*))|$)", + "patterns": [ + { + "include": "#interface_innards" + } + ] + }, + "properties": { + "patterns": [ + { + "begin": "((@)property)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.property.objc" + }, + "2": { + "name": "punctuation.definition.keyword.objc" + }, + "3": { + "name": "punctuation.section.scope.begin.objc" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.scope.end.objc" + } + }, + "name": "meta.property-with-attributes.objc", + "patterns": [ + { + "match": "\\b(getter|setter|readonly|readwrite|assign|retain|copy|nonatomic|atomic|strong|weak|nonnull|nullable|null_resettable|null_unspecified|class|direct)\\b", + "name": "keyword.other.property.attribute.objc" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.other.property.objc" + }, + "2": { + "name": "punctuation.definition.keyword.objc" + } + }, + "match": "((@)property)\\b", + "name": "meta.property.objc" + } + ] + }, + "property_directive": { + "captures": { + "1": { + "name": "punctuation.definition.keyword.objc" + } + }, + "match": "(@)(dynamic|synthesize)\\b", + "name": "keyword.other.property.directive.objc" + }, + "protocol_list": { + "begin": "(<)", + "beginCaptures": { + "1": { + "name": "punctuation.section.scope.begin.objc" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "punctuation.section.scope.end.objc" + } + }, + "name": "meta.protocol-list.objc", + "patterns": [ + { + "match": "\\bNS(GlyphStorage|M(utableCopying|enuItem)|C(hangeSpelling|o(ding|pying|lorPicking(Custom|Default)))|T(oolbarItemValidations|ext(Input|AttachmentCell))|I(nputServ(iceProvider|erMouseTracker)|gnoreMisspelledWords)|Obj(CTypeSerializationCallBack|ect)|D(ecimalNumberBehaviors|raggingInfo)|U(serInterfaceValidations|RL(HandleClient|DownloadDelegate|ProtocolClient|AuthenticationChallengeSender))|Validated(ToobarItem|UserInterfaceItem)|Locking)\\b", + "name": "support.other.protocol.objc" + } + ] + }, + "protocol_type_qualifier": { + "match": "\\b(in|out|inout|oneway|bycopy|byref|nonnull|nullable|_Nonnull|_Nullable|_Null_unspecified)\\b", + "name": "storage.modifier.protocol.objc" + }, + "special_variables": { + "patterns": [ + { + "match": "\\b_cmd\\b", + "name": "variable.other.selector.objc" + }, + { + "match": "\\b(self|super)\\b", + "name": "variable.language.objc" + } + ] + }, + "string_escaped_char": { + "patterns": [ + { + "match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )", + "name": "constant.character.escape.objc" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unknown-escape.objc" + } + ] + }, + "string_placeholder": { + "patterns": [ + { + "match": "(?x) %\n(\\d+\\$)?\t\t\t\t\t\t # field (argument #)\n[#0\\- +']*\t\t\t\t\t\t # flags\n[,;:_]?\t\t\t\t\t\t\t # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)?\t\t # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?\t# precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%]\t\t # conversion type", + "name": "constant.other.placeholder.objc" + }, + { + "match": "(%)(?!\"\\s*(PRI|SCN))", + "captures": { + "1": { + "name": "invalid.illegal.placeholder.objc" + } + } + } + ] + } + } +} diff --git a/src/lib/shiki/languages/objective-cpp.tmLanguage.json b/src/lib/shiki/languages/objective-cpp.tmLanguage.json new file mode 100644 index 0000000..4471b8d --- /dev/null +++ b/src/lib/shiki/languages/objective-cpp.tmLanguage.json @@ -0,0 +1,7247 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/jeff-hykin/better-objcpp-syntax/blob/master/autogenerated/objcpp.tmLanguage.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/jeff-hykin/better-objcpp-syntax/commit/5a7eb15eee382dd5aa388bc04fdb60a0d2128e14", + "name": "objective-cpp", + "scopeName": "source.objcpp", + "patterns": [ + { + "include": "#cpp_lang" + }, + { + "include": "#anonymous_pattern_1" + }, + { + "include": "#anonymous_pattern_2" + }, + { + "include": "#anonymous_pattern_3" + }, + { + "include": "#anonymous_pattern_4" + }, + { + "include": "#anonymous_pattern_5" + }, + { + "include": "#apple_foundation_functional_macros" + }, + { + "include": "#anonymous_pattern_7" + }, + { + "include": "#anonymous_pattern_8" + }, + { + "include": "#anonymous_pattern_9" + }, + { + "include": "#anonymous_pattern_10" + }, + { + "include": "#anonymous_pattern_11" + }, + { + "include": "#anonymous_pattern_12" + }, + { + "include": "#anonymous_pattern_13" + }, + { + "include": "#anonymous_pattern_14" + }, + { + "include": "#anonymous_pattern_15" + }, + { + "include": "#anonymous_pattern_16" + }, + { + "include": "#anonymous_pattern_17" + }, + { + "include": "#anonymous_pattern_18" + }, + { + "include": "#anonymous_pattern_19" + }, + { + "include": "#anonymous_pattern_20" + }, + { + "include": "#anonymous_pattern_21" + }, + { + "include": "#anonymous_pattern_22" + }, + { + "include": "#anonymous_pattern_23" + }, + { + "include": "#anonymous_pattern_24" + }, + { + "include": "#anonymous_pattern_25" + }, + { + "include": "#anonymous_pattern_26" + }, + { + "include": "#anonymous_pattern_27" + }, + { + "include": "#anonymous_pattern_28" + }, + { + "include": "#anonymous_pattern_29" + }, + { + "include": "#anonymous_pattern_30" + }, + { + "include": "#bracketed_content" + }, + { + "include": "#c_lang" + } + ], + "repository": { + "anonymous_pattern_1": { + "begin": "((@)(interface|protocol))(?!.+;)\\s+([A-Za-z_][A-Za-z0-9_]*)\\s*((:)(?:\\s*)([A-Za-z][A-Za-z0-9]*))?(\\s|\\n)?", + "captures": { + "1": { + "name": "storage.type.objcpp" + }, + "2": { + "name": "punctuation.definition.storage.type.objcpp" + }, + "4": { + "name": "entity.name.type.objcpp" + }, + "6": { + "name": "punctuation.definition.entity.other.inherited-class.objcpp" + }, + "7": { + "name": "entity.other.inherited-class.objcpp" + }, + "8": { + "name": "meta.divider.objcpp" + }, + "9": { + "name": "meta.inherited-class.objcpp" + } + }, + "contentName": "meta.scope.interface.objcpp", + "end": "((@)end)\\b", + "name": "meta.interface-or-protocol.objcpp", + "patterns": [ + { + "include": "#interface_innards" + } + ] + }, + "anonymous_pattern_10": { + "captures": { + "1": { + "name": "punctuation.definition.keyword.objcpp" + } + }, + "match": "(@)(defs|encode)\\b", + "name": "keyword.other.objcpp" + }, + "anonymous_pattern_11": { + "match": "\\bid\\b", + "name": "storage.type.id.objcpp" + }, + "anonymous_pattern_12": { + "match": "\\b(IBOutlet|IBAction|BOOL|SEL|id|unichar|IMP|Class|instancetype)\\b", + "name": "storage.type.objcpp" + }, + "anonymous_pattern_13": { + "captures": { + "1": { + "name": "punctuation.definition.storage.type.objcpp" + } + }, + "match": "(@)(class|protocol)\\b", + "name": "storage.type.objcpp" + }, + "anonymous_pattern_14": { + "begin": "((@)selector)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "storage.type.objcpp" + }, + "2": { + "name": "punctuation.definition.storage.type.objcpp" + }, + "3": { + "name": "punctuation.definition.storage.type.objcpp" + } + }, + "contentName": "meta.selector.method-name.objcpp", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.storage.type.objcpp" + } + }, + "name": "meta.selector.objcpp", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.separator.arguments.objcpp" + } + }, + "match": "\\b(?:[a-zA-Z_:][\\w]*)+", + "name": "support.function.any-method.name-of-parameter.objcpp" + } + ] + }, + "anonymous_pattern_15": { + "captures": { + "1": { + "name": "punctuation.definition.storage.modifier.objcpp" + } + }, + "match": "(@)(synchronized|public|package|private|protected)\\b", + "name": "storage.modifier.objcpp" + }, + "anonymous_pattern_16": { + "match": "\\b(YES|NO|Nil|nil)\\b", + "name": "constant.language.objcpp" + }, + "anonymous_pattern_17": { + "match": "\\bNSApp\\b", + "name": "support.variable.foundation.objcpp" + }, + "anonymous_pattern_18": { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.cocoa.leopard.objcpp" + }, + "2": { + "name": "support.function.cocoa.leopard.objcpp" + } + }, + "match": "(\\s*)\\b(NS(Rect(ToCGRect|FromCGRect)|MakeCollectable|S(tringFromProtocol|ize(ToCGSize|FromCGSize))|Draw(NinePartImage|ThreePartImage)|P(oint(ToCGPoint|FromCGPoint)|rotocolFromString)|EventMaskFromType|Value))\\b" + }, + "anonymous_pattern_19": { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading.cocoa.objcpp" + }, + "2": { + "name": "support.function.cocoa.objcpp" + } + }, + "match": "(\\s*)\\b(NS(R(ound(DownToMultipleOfPageSize|UpToMultipleOfPageSize)|un(CriticalAlertPanel(RelativeToWindow)?|InformationalAlertPanel(RelativeToWindow)?|AlertPanel(RelativeToWindow)?)|e(set(MapTable|HashTable)|c(ycleZone|t(Clip(List)?|F(ill(UsingOperation|List(UsingOperation|With(Grays|Colors(UsingOperation)?))?)?|romString))|ordAllocationEvent)|turnAddress|leaseAlertPanel|a(dPixel|l(MemoryAvailable|locateCollectable))|gisterServicesProvider)|angeFromString)|Get(SizeAndAlignment|CriticalAlertPanel|InformationalAlertPanel|UncaughtExceptionHandler|FileType(s)?|WindowServerMemory|AlertPanel)|M(i(n(X|Y)|d(X|Y))|ouseInRect|a(p(Remove|Get|Member|Insert(IfAbsent|KnownAbsent)?)|ke(R(ect|ange)|Size|Point)|x(Range|X|Y)))|B(itsPer(SampleFromDepth|PixelFromDepth)|e(stDepth|ep|gin(CriticalAlertSheet|InformationalAlertSheet|AlertSheet)))|S(ho(uldRetainWithZone|w(sServicesMenuItem|AnimationEffect))|tringFrom(R(ect|ange)|MapTable|S(ize|elector)|HashTable|Class|Point)|izeFromString|e(t(ShowsServicesMenuItem|ZoneName|UncaughtExceptionHandler|FocusRingStyle)|lectorFromString|archPathForDirectoriesInDomains)|wap(Big(ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(ToHost|LongToHost))|Short|Host(ShortTo(Big|Little)|IntTo(Big|Little)|DoubleTo(Big|Little)|FloatTo(Big|Little)|Long(To(Big|Little)|LongTo(Big|Little)))|Int|Double|Float|L(ittle(ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(ToHost|LongToHost))|ong(Long)?)))|H(ighlightRect|o(stByteOrder|meDirectory(ForUser)?)|eight|ash(Remove|Get|Insert(IfAbsent|KnownAbsent)?)|FSType(CodeFromFileType|OfFile))|N(umberOfColorComponents|ext(MapEnumeratorPair|HashEnumeratorItem))|C(o(n(tainsRect|vert(GlyphsToPackedGlyphs|Swapped(DoubleToHost|FloatToHost)|Host(DoubleToSwapped|FloatToSwapped)))|unt(MapTable|HashTable|Frames|Windows(ForContext)?)|py(M(emoryPages|apTableWithZone)|Bits|HashTableWithZone|Object)|lorSpaceFromDepth|mpare(MapTables|HashTables))|lassFromString|reate(MapTable(WithZone)?|HashTable(WithZone)?|Zone|File(namePboardType|ContentsPboardType)))|TemporaryDirectory|I(s(ControllerMarker|EmptyRect|FreedObject)|n(setRect|crementExtraRefCount|te(r(sect(sRect|ionR(ect|ange))|faceStyleForKey)|gralRect)))|Zone(Realloc|Malloc|Name|Calloc|Fr(omPointer|ee))|O(penStepRootDirectory|ffsetRect)|D(i(sableScreenUpdates|videRect)|ottedFrameRect|e(c(imal(Round|Multiply|S(tring|ubtract)|Normalize|Co(py|mpa(ct|re))|IsNotANumber|Divide|Power|Add)|rementExtraRefCountWasZero)|faultMallocZone|allocate(MemoryPages|Object))|raw(Gr(oove|ayBezel)|B(itmap|utton)|ColorTiledRects|TiledRects|DarkBezel|W(hiteBezel|indowBackground)|LightBezel))|U(serName|n(ionR(ect|ange)|registerServicesProvider)|pdateDynamicServices)|Java(Bundle(Setup|Cleanup)|Setup(VirtualMachine)?|Needs(ToLoadClasses|VirtualMachine)|ClassesF(orBundle|romPath)|ObjectNamedInPath|ProvidesClasses)|P(oint(InRect|FromString)|erformService|lanarFromDepth|ageSize)|E(n(d(MapTableEnumeration|HashTableEnumeration)|umerate(MapTable|HashTable)|ableScreenUpdates)|qual(R(ects|anges)|Sizes|Points)|raseRect|xtraRefCount)|F(ileTypeForHFSTypeCode|ullUserName|r(ee(MapTable|HashTable)|ame(Rect(WithWidth(UsingOperation)?)?|Address)))|Wi(ndowList(ForContext)?|dth)|Lo(cationInRange|g(v|PageSize)?)|A(ccessibility(R(oleDescription(ForUIElement)?|aiseBadArgumentException)|Unignored(Children(ForOnlyChild)?|Descendant|Ancestor)|PostNotification|ActionDescription)|pplication(Main|Load)|vailableWindowDepths|ll(MapTable(Values|Keys)|HashTableObjects|ocate(MemoryPages|Collectable|Object)))))\\b" + }, + "anonymous_pattern_2": { + "begin": "((@)(implementation))\\s+([A-Za-z_][A-Za-z0-9_]*)\\s*(?::\\s*([A-Za-z][A-Za-z0-9]*))?", + "captures": { + "1": { + "name": "storage.type.objcpp" + }, + "2": { + "name": "punctuation.definition.storage.type.objcpp" + }, + "4": { + "name": "entity.name.type.objcpp" + }, + "5": { + "name": "entity.other.inherited-class.objcpp" + } + }, + "contentName": "meta.scope.implementation.objcpp", + "end": "((@)end)\\b", + "name": "meta.implementation.objcpp", + "patterns": [ + { + "include": "#implementation_innards" + } + ] + }, + "anonymous_pattern_20": { + "match": "\\bNS(RuleEditor|G(arbageCollector|radient)|MapTable|HashTable|Co(ndition|llectionView(Item)?)|T(oolbarItemGroup|extInputClient|r(eeNode|ackingArea))|InvocationOperation|Operation(Queue)?|D(ictionaryController|ockTile)|P(ointer(Functions|Array)|athC(o(ntrol(Delegate)?|mponentCell)|ell(Delegate)?)|r(intPanelAccessorizing|edicateEditor(RowTemplate)?))|ViewController|FastEnumeration|Animat(ionContext|ablePropertyContainer))\\b", + "name": "support.class.cocoa.leopard.objcpp" + }, + "anonymous_pattern_21": { + "match": "\\bNS(R(u(nLoop|ler(Marker|View))|e(sponder|cursiveLock|lativeSpecifier)|an(domSpecifier|geSpecifier))|G(etCommand|lyph(Generator|Storage|Info)|raphicsContext)|XML(Node|D(ocument|TD(Node)?)|Parser|Element)|M(iddleSpecifier|ov(ie(View)?|eCommand)|utable(S(tring|et)|C(haracterSet|opying)|IndexSet|D(ictionary|ata)|URLRequest|ParagraphStyle|A(ttributedString|rray))|e(ssagePort(NameServer)?|nu(Item(Cell)?|View)?|t(hodSignature|adata(Item|Query(ResultGroup|AttributeValueTuple)?)))|a(ch(BootstrapServer|Port)|trix))|B(itmapImageRep|ox|u(ndle|tton(Cell)?)|ezierPath|rowser(Cell)?)|S(hadow|c(anner|r(ipt(SuiteRegistry|C(o(ercionHandler|mmand(Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(er|View)|een))|t(epper(Cell)?|atus(Bar|Item)|r(ing|eam))|imple(HorizontalTypesetter|CString)|o(cketPort(NameServer)?|und|rtDescriptor)|p(e(cifierTest|ech(Recognizer|Synthesizer)|ll(Server|Checker))|litView)|e(cureTextField(Cell)?|t(Command)?|archField(Cell)?|rializer|gmentedC(ontrol|ell))|lider(Cell)?|avePanel)|H(ost|TTP(Cookie(Storage)?|URLResponse)|elpManager)|N(ib(Con(nector|trolConnector)|OutletConnector)?|otification(Center|Queue)?|u(ll|mber(Formatter)?)|etService(Browser)?|ameSpecifier)|C(ha(ngeSpelling|racterSet)|o(n(stantString|nection|trol(ler)?|ditionLock)|d(ing|er)|unt(Command|edSet)|pying|lor(Space|P(ick(ing(Custom|Default)|er)|anel)|Well|List)?|m(p(oundPredicate|arisonPredicate)|boBox(Cell)?))|u(stomImageRep|rsor)|IImageRep|ell|l(ipView|o(seCommand|neCommand)|assDescription)|a(ched(ImageRep|URLResponse)|lendar(Date)?)|reateCommand)|T(hread|ypesetter|ime(Zone|r)|o(olbar(Item(Validations)?)?|kenField(Cell)?)|ext(Block|Storage|Container|Tab(le(Block)?)?|Input|View|Field(Cell)?|List|Attachment(Cell)?)?|a(sk|b(le(Header(Cell|View)|Column|View)|View(Item)?))|reeController)|I(n(dex(S(pecifier|et)|Path)|put(Manager|S(tream|erv(iceProvider|er(MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(Rep|Cell|View)?)|O(ut(putStream|lineView)|pen(GL(Context|Pixel(Buffer|Format)|View)|Panel)|bj(CTypeSerializationCallBack|ect(Controller)?))|D(i(st(antObject(Request)?|ributed(NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(Controller)?|e(serializer|cimalNumber(Behaviors|Handler)?|leteCommand)|at(e(Components|Picker(Cell)?|Formatter)?|a)|ra(wer|ggingInfo))|U(ser(InterfaceValidations|Defaults(Controller)?)|RL(Re(sponse|quest)|Handle(Client)?|C(onnection|ache|redential(Storage)?)|Download(Delegate)?|Prot(ocol(Client)?|ectionSpace)|AuthenticationChallenge(Sender)?)?|n(iqueIDSpecifier|doManager|archiver))|P(ipe|o(sitionalSpecifier|pUpButton(Cell)?|rt(Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(steboard|nel|ragraphStyle|geLayout)|r(int(Info|er|Operation|Panel)|o(cessInfo|tocolChecker|perty(Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(numerator|vent|PSImageRep|rror|x(ception|istsCommand|pression))|V(iew(Animation)?|al(idated(ToobarItem|UserInterfaceItem)|ue(Transformer)?))|Keyed(Unarchiver|Archiver)|Qui(ckDrawView|tCommand)|F(ile(Manager|Handle|Wrapper)|o(nt(Manager|Descriptor|Panel)?|rm(Cell|atter)))|W(hoseSpecifier|indow(Controller)?|orkspace)|L(o(c(k(ing)?|ale)|gicalTest)|evelIndicator(Cell)?|ayoutManager)|A(ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(ication|e(Script|Event(Manager|Descriptor)))|ffineTransform|lert|r(chiver|ray(Controller)?)))\\b", + "name": "support.class.cocoa.objcpp" + }, + "anonymous_pattern_22": { + "match": "\\bNS(R(oundingMode|ule(Editor(RowType|NestingMode)|rOrientation)|e(questUserAttentionType|lativePosition))|G(lyphInscription|radientDrawingOptions)|XML(NodeKind|D(ocumentContentKind|TDNodeKind)|ParserError)|M(ultibyteGlyphPacking|apTableOptions)|B(itmapFormat|oxType|ezierPathElement|ackgroundStyle|rowserDropOperation)|S(tr(ing(CompareOptions|DrawingOptions|EncodingConversionOptions)|eam(Status|Event))|p(eechBoundary|litViewDividerStyle)|e(archPathD(irectory|omainMask)|gmentS(tyle|witchTracking))|liderType|aveOptions)|H(TTPCookieAcceptPolicy|ashTableOptions)|N(otification(SuspensionBehavior|Coalescing)|umberFormatter(RoundingMode|Behavior|Style|PadPosition)|etService(sError|Options))|C(haracterCollection|o(lor(RenderingIntent|SpaceModel|PanelMode)|mp(oundPredicateType|arisonPredicateModifier))|ellStateValue|al(culationError|endarUnit))|T(ypesetterControlCharacterAction|imeZoneNameStyle|e(stComparisonOperation|xt(Block(Dimension|V(erticalAlignment|alueType)|Layer)|TableLayoutAlgorithm|FieldBezelStyle))|ableView(SelectionHighlightStyle|ColumnAutoresizingStyle)|rackingAreaOptions)|I(n(sertionPosition|te(rfaceStyle|ger))|mage(RepLoadStatus|Scaling|CacheMode|FrameStyle|LoadStatus|Alignment))|Ope(nGLPixelFormatAttribute|rationQueuePriority)|Date(Picker(Mode|Style)|Formatter(Behavior|Style))|U(RL(RequestCachePolicy|HandleStatus|C(acheStoragePolicy|redentialPersistence))|Integer)|P(o(stingStyle|int(ingDeviceType|erFunctionsOptions)|pUpArrowPosition)|athStyle|r(int(ing(Orientation|PaginationMode)|erTableStatus|PanelOptions)|opertyList(MutabilityOptions|Format)|edicateOperatorType))|ExpressionType|KeyValue(SetMutationKind|Change)|QTMovieLoopMode|F(indPanel(SubstringMatchType|Action)|o(nt(RenderingMode|FamilyClass)|cusRingPlacement))|W(hoseSubelementIdentifier|ind(ingRule|ow(B(utton|ackingLocation)|SharingType|CollectionBehavior)))|L(ine(MovementDirection|SweepDirection|CapStyle|JoinStyle)|evelIndicatorStyle)|Animation(BlockingMode|Curve))\\b", + "name": "support.type.cocoa.leopard.objcpp" + }, + "anonymous_pattern_23": { + "match": "\\bC(I(Sampler|Co(ntext|lor)|Image(Accumulator)?|PlugIn(Registration)?|Vector|Kernel|Filter(Generator|Shape)?)|A(Renderer|MediaTiming(Function)?|BasicAnimation|ScrollLayer|Constraint(LayoutManager)?|T(iledLayer|extLayer|rans(ition|action))|OpenGLLayer|PropertyAnimation|KeyframeAnimation|Layer|A(nimation(Group)?|ction)))\\b", + "name": "support.class.quartz.objcpp" + }, + "anonymous_pattern_24": { + "match": "\\bC(G(Float|Point|Size|Rect)|IFormat|AConstraintAttribute)\\b", + "name": "support.type.quartz.objcpp" + }, + "anonymous_pattern_25": { + "match": "\\bNS(R(ect(Edge)?|ange)|G(lyph(Relation|LayoutMode)?|radientType)|M(odalSession|a(trixMode|p(Table|Enumerator)))|B(itmapImageFileType|orderType|uttonType|ezelStyle|ackingStoreType|rowserColumnResizingType)|S(cr(oll(er(Part|Arrow)|ArrowPosition)|eenAuxiliaryOpaque)|tringEncoding|ize|ocketNativeHandle|election(Granularity|Direction|Affinity)|wapped(Double|Float)|aveOperationType)|Ha(sh(Table|Enumerator)|ndler(2)?)|C(o(ntrol(Size|Tint)|mp(ositingOperation|arisonResult))|ell(State|Type|ImagePosition|Attribute))|T(hreadPrivate|ypesetterGlyphInfo|i(ckMarkPosition|tlePosition|meInterval)|o(ol(TipTag|bar(SizeMode|DisplayMode))|kenStyle)|IFFCompression|ext(TabType|Alignment)|ab(State|leViewDropOperation|ViewType)|rackingRectTag)|ImageInterpolation|Zone|OpenGL(ContextAuxiliary|PixelFormatAuxiliary)|D(ocumentChangeType|atePickerElementFlags|ra(werState|gOperation))|UsableScrollerParts|P(oint|r(intingPageOrder|ogressIndicator(Style|Th(ickness|readInfo))))|EventType|KeyValueObservingOptions|Fo(nt(SymbolicTraits|TraitMask|Action)|cusRingType)|W(indow(OrderingMode|Depth)|orkspace(IconCreationOptions|LaunchOptions)|ritingDirection)|L(ineBreakMode|ayout(Status|Direction))|A(nimation(Progress|Effect)|ppl(ication(TerminateReply|DelegateReply|PrintReply)|eEventManagerSuspensionID)|ffineTransformStruct|lertStyle))\\b", + "name": "support.type.cocoa.objcpp" + }, + "anonymous_pattern_26": { + "match": "\\bNS(NotFound|Ordered(Ascending|Descending|Same))\\b", + "name": "support.constant.cocoa.objcpp" + }, + "anonymous_pattern_27": { + "match": "\\bNS(MenuDidBeginTracking|ViewDidUpdateTrackingAreas)?Notification\\b", + "name": "support.constant.notification.cocoa.leopard.objcpp" + }, + "anonymous_pattern_28": { + "match": "\\bNS(Menu(Did(RemoveItem|SendAction|ChangeItem|EndTracking|AddItem)|WillSendAction)|S(ystemColorsDidChange|plitView(DidResizeSubviews|WillResizeSubviews))|C(o(nt(extHelpModeDid(Deactivate|Activate)|rolT(intDidChange|extDid(BeginEditing|Change|EndEditing)))|lor(PanelColorDidChange|ListDidChange)|mboBox(Selection(IsChanging|DidChange)|Will(Dismiss|PopUp)))|lassDescriptionNeededForClass)|T(oolbar(DidRemoveItem|WillAddItem)|ext(Storage(DidProcessEditing|WillProcessEditing)|Did(BeginEditing|Change|EndEditing)|View(DidChange(Selection|TypingAttributes)|WillChangeNotifyingTextView))|ableView(Selection(IsChanging|DidChange)|ColumnDid(Resize|Move)))|ImageRepRegistryDidChange|OutlineView(Selection(IsChanging|DidChange)|ColumnDid(Resize|Move)|Item(Did(Collapse|Expand)|Will(Collapse|Expand)))|Drawer(Did(Close|Open)|Will(Close|Open))|PopUpButton(CellWillPopUp|WillPopUp)|View(GlobalFrameDidChange|BoundsDidChange|F(ocusDidChange|rameDidChange))|FontSetChanged|W(indow(Did(Resi(ze|gn(Main|Key))|M(iniaturize|ove)|Become(Main|Key)|ChangeScreen(|Profile)|Deminiaturize|Update|E(ndSheet|xpose))|Will(M(iniaturize|ove)|BeginSheet|Close))|orkspace(SessionDid(ResignActive|BecomeActive)|Did(Mount|TerminateApplication|Unmount|PerformFileOperation|Wake|LaunchApplication)|Will(Sleep|Unmount|PowerOff|LaunchApplication)))|A(ntialiasThresholdChanged|ppl(ication(Did(ResignActive|BecomeActive|Hide|ChangeScreenParameters|U(nhide|pdate)|FinishLaunching)|Will(ResignActive|BecomeActive|Hide|Terminate|U(nhide|pdate)|FinishLaunching))|eEventManagerWillProcessFirstEvent)))Notification\\b", + "name": "support.constant.notification.cocoa.objcpp" + }, + "anonymous_pattern_29": { + "match": "\\bNS(RuleEditor(RowType(Simple|Compound)|NestingMode(Si(ngle|mple)|Compound|List))|GradientDraws(BeforeStartingLocation|AfterEndingLocation)|M(inusSetExpressionType|a(chPortDeallocate(ReceiveRight|SendRight|None)|pTable(StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality)))|B(oxCustom|undleExecutableArchitecture(X86|I386|PPC(64)?)|etweenPredicateOperatorType|ackgroundStyle(Raised|Dark|L(ight|owered)))|S(tring(DrawingTruncatesLastVisibleLine|EncodingConversion(ExternalRepresentation|AllowLossy))|ubqueryExpressionType|p(e(ech(SentenceBoundary|ImmediateBoundary|WordBoundary)|llingState(GrammarFlag|SpellingFlag))|litViewDividerStyleThi(n|ck))|e(rvice(RequestTimedOutError|M(iscellaneousError|alformedServiceDictionaryError)|InvalidPasteboardDataError|ErrorM(inimum|aximum)|Application(NotFoundError|LaunchFailedError))|gmentStyle(Round(Rect|ed)|SmallSquare|Capsule|Textured(Rounded|Square)|Automatic)))|H(UDWindowMask|ashTable(StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality))|N(oModeColorPanel|etServiceNoAutoRename)|C(hangeRedone|o(ntainsPredicateOperatorType|l(orRenderingIntent(RelativeColorimetric|Saturation|Default|Perceptual|AbsoluteColorimetric)|lectorDisabledOption))|ellHit(None|ContentArea|TrackableArea|EditableTextArea))|T(imeZoneNameStyle(S(hort(Standard|DaylightSaving)|tandard)|DaylightSaving)|extFieldDatePickerStyle|ableViewSelectionHighlightStyle(Regular|SourceList)|racking(Mouse(Moved|EnteredAndExited)|CursorUpdate|InVisibleRect|EnabledDuringMouseDrag|A(ssumeInside|ctive(In(KeyWindow|ActiveApp)|WhenFirstResponder|Always))))|I(n(tersectSetExpressionType|dexedColorSpaceModel)|mageScale(None|Proportionally(Down|UpOrDown)|AxesIndependently))|Ope(nGLPFAAllowOfflineRenderers|rationQueue(DefaultMaxConcurrentOperationCount|Priority(High|Normal|Very(High|Low)|Low)))|D(iacriticInsensitiveSearch|ownloadsDirectory)|U(nionSetExpressionType|TF(16(BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)|32(BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)))|P(ointerFunctions(Ma(chVirtualMemory|llocMemory)|Str(ongMemory|uctPersonality)|C(StringPersonality|opyIn)|IntegerPersonality|ZeroingWeakMemory|O(paque(Memory|Personality)|bjectP(ointerPersonality|ersonality)))|at(hStyle(Standard|NavigationBar|PopUp)|ternColorSpaceModel)|rintPanelShows(Scaling|Copies|Orientation|P(a(perSize|ge(Range|SetupAccessory))|review)))|Executable(RuntimeMismatchError|NotLoadableError|ErrorM(inimum|aximum)|L(inkError|oadError)|ArchitectureMismatchError)|KeyValueObservingOption(Initial|Prior)|F(i(ndPanelSubstringMatchType(StartsWith|Contains|EndsWith|FullWord)|leRead(TooLargeError|UnknownStringEncodingError))|orcedOrderingSearch)|Wi(ndow(BackingLocation(MainMemory|Default|VideoMemory)|Sharing(Read(Only|Write)|None)|CollectionBehavior(MoveToActiveSpace|CanJoinAllSpaces|Default))|dthInsensitiveSearch)|AggregateExpressionType)\\b", + "name": "support.constant.cocoa.leopard.objcpp" + }, + "anonymous_pattern_3": { + "begin": "@\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.double.objcpp", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "match": "(?x)%\n\t\t\t\t\t\t(\\d+\\$)? # field (argument #)\n\t\t\t\t\t\t[#0\\- +']* # flags\n\t\t\t\t\t\t((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n\t\t\t\t\t\t(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n\t\t\t\t\t\t[@] # conversion type\n\t\t\t\t\t", + "name": "constant.other.placeholder.objcpp" + }, + { + "include": "#string_placeholder" + } + ] + }, + "anonymous_pattern_30": { + "match": "\\bNS(R(GB(ModeColorPanel|ColorSpaceModel)|ight(Mouse(D(own(Mask)?|ragged(Mask)?)|Up(Mask)?)|T(ext(Movement|Alignment)|ab(sBezelBorder|StopType))|ArrowFunctionKey)|ound(RectBezelStyle|Bankers|ed(BezelStyle|TokenStyle|DisclosureBezelStyle)|Down|Up|Plain|Line(CapStyle|JoinStyle))|un(StoppedResponse|ContinuesResponse|AbortedResponse)|e(s(izableWindowMask|et(CursorRectsRunLoopOrdering|FunctionKey))|ce(ssedBezelStyle|iver(sCantHandleCommandScriptError|EvaluationScriptError))|turnTextMovement|doFunctionKey|quiredArgumentsMissingScriptError|l(evancyLevelIndicatorStyle|ative(Before|After))|gular(SquareBezelStyle|ControlSize)|moveTraitFontAction)|a(n(domSubelement|geDateMode)|tingLevelIndicatorStyle|dio(ModeMatrix|Button)))|G(IFFileType|lyph(Below|Inscribe(B(elow|ase)|Over(strike|Below)|Above)|Layout(WithPrevious|A(tAPoint|gainstAPoint))|A(ttribute(BidiLevel|Soft|Inscribe|Elastic)|bove))|r(ooveBorder|eaterThan(Comparison|OrEqualTo(Comparison|PredicateOperatorType)|PredicateOperatorType)|a(y(ModeColorPanel|ColorSpaceModel)|dient(None|Con(cave(Strong|Weak)|vex(Strong|Weak)))|phiteControlTint)))|XML(N(o(tationDeclarationKind|de(CompactEmptyElement|IsCDATA|OptionsNone|Use(SingleQuotes|DoubleQuotes)|Pre(serve(NamespaceOrder|C(haracterReferences|DATA)|DTD|Prefixes|E(ntities|mptyElements)|Quotes|Whitespace|A(ttributeOrder|ll))|ttyPrint)|ExpandEmptyElement))|amespaceKind)|CommentKind|TextKind|InvalidKind|D(ocument(X(MLKind|HTMLKind|Include)|HTMLKind|T(idy(XML|HTML)|extKind)|IncludeContentTypeDeclaration|Validate|Kind)|TDKind)|P(arser(GTRequiredError|XMLDeclNot(StartedError|FinishedError)|Mi(splaced(XMLDeclarationError|CDATAEndStringError)|xedContentDeclNot(StartedError|FinishedError))|S(t(andaloneValueError|ringNot(StartedError|ClosedError))|paceRequiredError|eparatorRequiredError)|N(MTOKENRequiredError|o(t(ationNot(StartedError|FinishedError)|WellBalancedError)|DTDError)|amespaceDeclarationError|AMERequiredError)|C(haracterRef(In(DTDError|PrologError|EpilogError)|AtEOFError)|o(nditionalSectionNot(StartedError|FinishedError)|mment(NotFinishedError|ContainsDoubleHyphenError))|DATANotFinishedError)|TagNameMismatchError|In(ternalError|valid(HexCharacterRefError|C(haracter(RefError|InEntityError|Error)|onditionalSectionError)|DecimalCharacterRefError|URIError|Encoding(NameError|Error)))|OutOfMemoryError|D(ocumentStartError|elegateAbortedParseError|OCTYPEDeclNotFinishedError)|U(RI(RequiredError|FragmentError)|n(declaredEntityError|parsedEntityError|knownEncodingError|finishedTagError))|P(CDATARequiredError|ublicIdentifierRequiredError|arsedEntityRef(MissingSemiError|NoNameError|In(Internal(SubsetError|Error)|PrologError|EpilogError)|AtEOFError)|r(ocessingInstructionNot(StartedError|FinishedError)|ematureDocumentEndError))|E(n(codingNotSupportedError|tity(Ref(In(DTDError|PrologError|EpilogError)|erence(MissingSemiError|WithoutNameError)|LoopError|AtEOFError)|BoundaryError|Not(StartedError|FinishedError)|Is(ParameterError|ExternalError)|ValueRequiredError))|qualExpectedError|lementContentDeclNot(StartedError|FinishedError)|xt(ernalS(tandaloneEntityError|ubsetNotFinishedError)|raContentError)|mptyDocumentError)|L(iteralNot(StartedError|FinishedError)|T(RequiredError|SlashRequiredError)|essThanSymbolInAttributeError)|Attribute(RedefinedError|HasNoValueError|Not(StartedError|FinishedError)|ListNot(StartedError|FinishedError)))|rocessingInstructionKind)|E(ntity(GeneralKind|DeclarationKind|UnparsedKind|P(ar(sedKind|ameterKind)|redefined))|lement(Declaration(MixedKind|UndefinedKind|E(lementKind|mptyKind)|Kind|AnyKind)|Kind))|Attribute(N(MToken(sKind|Kind)|otationKind)|CDATAKind|ID(Ref(sKind|Kind)|Kind)|DeclarationKind|En(tit(yKind|iesKind)|umerationKind)|Kind))|M(i(n(XEdge|iaturizableWindowMask|YEdge|uteCalendarUnit)|terLineJoinStyle|ddleSubelement|xedState)|o(nthCalendarUnit|deSwitchFunctionKey|use(Moved(Mask)?|E(ntered(Mask)?|ventSubtype|xited(Mask)?))|veToBezierPathElement|mentary(ChangeButton|Push(Button|InButton)|Light(Button)?))|enuFunctionKey|a(c(intoshInterfaceStyle|OSRomanStringEncoding)|tchesPredicateOperatorType|ppedRead|x(XEdge|YEdge))|ACHOperatingSystem)|B(MPFileType|o(ttomTabsBezelBorder|ldFontMask|rderlessWindowMask|x(Se(condary|parator)|OldStyle|Primary))|uttLineCapStyle|e(zelBorder|velLineJoinStyle|low(Bottom|Top)|gin(sWith(Comparison|PredicateOperatorType)|FunctionKey))|lueControlTint|ack(spaceCharacter|tabTextMovement|ingStore(Retained|Buffered|Nonretained)|TabCharacter|wardsSearch|groundTab)|r(owser(NoColumnResizing|UserColumnResizing|AutoColumnResizing)|eakFunctionKey))|S(h(ift(JISStringEncoding|KeyMask)|ow(ControlGlyphs|InvisibleGlyphs)|adowlessSquareBezelStyle)|y(s(ReqFunctionKey|tem(D(omainMask|efined(Mask)?)|FunctionKey))|mbolStringEncoding)|c(a(nnedOption|le(None|ToFit|Proportionally))|r(oll(er(NoPart|Increment(Page|Line|Arrow)|Decrement(Page|Line|Arrow)|Knob(Slot)?|Arrows(M(inEnd|axEnd)|None|DefaultSetting))|Wheel(Mask)?|LockFunctionKey)|eenChangedEventType))|t(opFunctionKey|r(ingDrawing(OneShot|DisableScreenFontSubstitution|Uses(DeviceMetrics|FontLeading|LineFragmentOrigin))|eam(Status(Reading|NotOpen|Closed|Open(ing)?|Error|Writing|AtEnd)|Event(Has(BytesAvailable|SpaceAvailable)|None|OpenCompleted|E(ndEncountered|rrorOccurred)))))|i(ngle(DateMode|UnderlineStyle)|ze(DownFontAction|UpFontAction))|olarisOperatingSystem|unOSOperatingSystem|pecialPageOrder|e(condCalendarUnit|lect(By(Character|Paragraph|Word)|i(ng(Next|Previous)|onAffinity(Downstream|Upstream))|edTab|FunctionKey)|gmentSwitchTracking(Momentary|Select(One|Any)))|quareLineCapStyle|witchButton|ave(ToOperation|Op(tions(Yes|No|Ask)|eration)|AsOperation)|mall(SquareBezelStyle|C(ontrolSize|apsFontMask)|IconButtonBezelStyle))|H(ighlightModeMatrix|SBModeColorPanel|o(ur(Minute(SecondDatePickerElementFlag|DatePickerElementFlag)|CalendarUnit)|rizontalRuler|meFunctionKey)|TTPCookieAcceptPolicy(Never|OnlyFromMainDocumentDomain|Always)|e(lp(ButtonBezelStyle|KeyMask|FunctionKey)|avierFontAction)|PUXOperatingSystem)|Year(MonthDa(yDatePickerElementFlag|tePickerElementFlag)|CalendarUnit)|N(o(n(StandardCharacterSetFontMask|ZeroWindingRule|activatingPanelMask|LossyASCIIStringEncoding)|Border|t(ification(SuspensionBehavior(Hold|Coalesce|D(eliverImmediately|rop))|NoCoalescing|CoalescingOn(Sender|Name)|DeliverImmediately|PostToAllSessions)|PredicateType|EqualToPredicateOperatorType)|S(cr(iptError|ollerParts)|ubelement|pecifierError)|CellMask|T(itle|opLevelContainersSpecifierError|abs(BezelBorder|NoBorder|LineBorder))|I(nterfaceStyle|mage)|UnderlineStyle|FontChangeAction)|u(ll(Glyph|CellType)|m(eric(Search|PadKeyMask)|berFormatter(Round(Half(Down|Up|Even)|Ceiling|Down|Up|Floor)|Behavior(10|Default)|S(cientificStyle|pellOutStyle)|NoStyle|CurrencyStyle|DecimalStyle|P(ercentStyle|ad(Before(Suffix|Prefix)|After(Suffix|Prefix))))))|e(t(Services(BadArgumentError|NotFoundError|C(ollisionError|ancelledError)|TimeoutError|InvalidError|UnknownError|ActivityInProgress)|workDomainMask)|wlineCharacter|xt(StepInterfaceStyle|FunctionKey))|EXTSTEPStringEncoding|a(t(iveShortGlyphPacking|uralTextAlignment)|rrowFontMask))|C(hange(ReadOtherContents|GrayCell(Mask)?|BackgroundCell(Mask)?|Cleared|Done|Undone|Autosaved)|MYK(ModeColorPanel|ColorSpaceModel)|ircular(BezelStyle|Slider)|o(n(stantValueExpressionType|t(inuousCapacityLevelIndicatorStyle|entsCellMask|ain(sComparison|erSpecifierError)|rol(Glyph|KeyMask))|densedFontMask)|lor(Panel(RGBModeMask|GrayModeMask|HSBModeMask|C(MYKModeMask|olorListModeMask|ustomPaletteModeMask|rayonModeMask)|WheelModeMask|AllModesMask)|ListModeColorPanel)|reServiceDirectory|m(p(osite(XOR|Source(In|O(ut|ver)|Atop)|Highlight|C(opy|lear)|Destination(In|O(ut|ver)|Atop)|Plus(Darker|Lighter))|ressedFontMask)|mandKeyMask))|u(stom(SelectorPredicateOperatorType|PaletteModeColorPanel)|r(sor(Update(Mask)?|PointingDevice)|veToBezierPathElement))|e(nterT(extAlignment|abStopType)|ll(State|H(ighlighted|as(Image(Horizontal|OnLeftOrBottom)|OverlappingImage))|ChangesContents|Is(Bordered|InsetButton)|Disabled|Editable|LightsBy(Gray|Background|Contents)|AllowsMixedState))|l(ipPagination|o(s(ePathBezierPathElement|ableWindowMask)|ckAndCalendarDatePickerStyle)|ear(ControlTint|DisplayFunctionKey|LineFunctionKey))|a(seInsensitive(Search|PredicateOption)|n(notCreateScriptCommandError|cel(Button|TextMovement))|chesDirectory|lculation(NoError|Overflow|DivideByZero|Underflow|LossOfPrecision)|rriageReturnCharacter)|r(itical(Request|AlertStyle)|ayonModeColorPanel))|T(hick(SquareBezelStyle|erSquareBezelStyle)|ypesetter(Behavior|HorizontalTabAction|ContainerBreakAction|ZeroAdvancementAction|OriginalBehavior|ParagraphBreakAction|WhitespaceAction|L(ineBreakAction|atestBehavior))|i(ckMark(Right|Below|Left|Above)|tledWindowMask|meZoneDatePickerElementFlag)|o(olbarItemVisibilityPriority(Standard|High|User|Low)|pTabsBezelBorder|ggleButton)|IFF(Compression(N(one|EXT)|CCITTFAX(3|4)|OldJPEG|JPEG|PackBits|LZW)|FileType)|e(rminate(Now|Cancel|Later)|xt(Read(InapplicableDocumentTypeError|WriteErrorM(inimum|aximum))|Block(M(i(nimum(Height|Width)|ddleAlignment)|a(rgin|ximum(Height|Width)))|B(o(ttomAlignment|rder)|aselineAlignment)|Height|TopAlignment|P(ercentageValueType|adding)|Width|AbsoluteValueType)|StorageEdited(Characters|Attributes)|CellType|ured(RoundedBezelStyle|BackgroundWindowMask|SquareBezelStyle)|Table(FixedLayoutAlgorithm|AutomaticLayoutAlgorithm)|Field(RoundedBezel|SquareBezel|AndStepperDatePickerStyle)|WriteInapplicableDocumentTypeError|ListPrependEnclosingMarker))|woByteGlyphPacking|ab(Character|TextMovement|le(tP(oint(Mask|EventSubtype)?|roximity(Mask|EventSubtype)?)|Column(NoResizing|UserResizingMask|AutoresizingMask)|View(ReverseSequentialColumnAutoresizingStyle|GridNone|S(olid(HorizontalGridLineMask|VerticalGridLineMask)|equentialColumnAutoresizingStyle)|NoColumnAutoresizing|UniformColumnAutoresizingStyle|FirstColumnOnlyAutoresizingStyle|LastColumnOnlyAutoresizingStyle)))|rackModeMatrix)|I(n(sert(CharFunctionKey|FunctionKey|LineFunctionKey)|t(Type|ernalS(criptError|pecifierError))|dexSubelement|validIndexSpecifierError|formational(Request|AlertStyle)|PredicateOperatorType)|talicFontMask|SO(2022JPStringEncoding|Latin(1StringEncoding|2StringEncoding))|dentityMappingCharacterCollection|llegalTextMovement|mage(R(ight|ep(MatchesDevice|LoadStatus(ReadingHeader|Completed|InvalidData|Un(expectedEOF|knownType)|WillNeedAllData)))|Below|C(ellType|ache(BySize|Never|Default|Always))|Interpolation(High|None|Default|Low)|O(nly|verlaps)|Frame(Gr(oove|ayBezel)|Button|None|Photo)|L(oadStatus(ReadError|C(ompleted|ancelled)|InvalidData|UnexpectedEOF)|eft)|A(lign(Right|Bottom(Right|Left)?|Center|Top(Right|Left)?|Left)|bove)))|O(n(State|eByteGlyphPacking|OffButton|lyScrollerArrows)|ther(Mouse(D(own(Mask)?|ragged(Mask)?)|Up(Mask)?)|TextMovement)|SF1OperatingSystem|pe(n(GL(GO(Re(setLibrary|tainRenderers)|ClearFormatCache|FormatCacheSize)|PFA(R(obust|endererID)|M(inimumPolicy|ulti(sample|Screen)|PSafe|aximumPolicy)|BackingStore|S(creenMask|te(ncilSize|reo)|ingleRenderer|upersample|ample(s|Buffers|Alpha))|NoRecovery|C(o(lor(Size|Float)|mpliant)|losestPolicy)|OffScreen|D(oubleBuffer|epthSize)|PixelBuffer|VirtualScreenCount|FullScreen|Window|A(cc(umSize|elerated)|ux(Buffers|DepthStencil)|l(phaSize|lRenderers))))|StepUnicodeReservedBase)|rationNotSupportedForKeyS(criptError|pecifierError))|ffState|KButton|rPredicateType|bjC(B(itfield|oolType)|S(hortType|tr(ingType|uctType)|electorType)|NoType|CharType|ObjectType|DoubleType|UnionType|PointerType|VoidType|FloatType|Long(Type|longType)|ArrayType))|D(i(s(c(losureBezelStyle|reteCapacityLevelIndicatorStyle)|playWindowRunLoopOrdering)|acriticInsensitivePredicateOption|rect(Selection|PredicateModifier))|o(c(ModalWindowMask|ument(Directory|ationDirectory))|ubleType|wn(TextMovement|ArrowFunctionKey))|e(s(cendingPageOrder|ktopDirectory)|cimalTabStopType|v(ice(NColorSpaceModel|IndependentModifierFlagsMask)|eloper(Directory|ApplicationDirectory))|fault(ControlTint|TokenStyle)|lete(Char(acter|FunctionKey)|FunctionKey|LineFunctionKey)|moApplicationDirectory)|a(yCalendarUnit|teFormatter(MediumStyle|Behavior(10|Default)|ShortStyle|NoStyle|FullStyle|LongStyle))|ra(wer(Clos(ingState|edState)|Open(ingState|State))|gOperation(Generic|Move|None|Copy|Delete|Private|Every|Link|All)))|U(ser(CancelledError|D(irectory|omainMask)|FunctionKey)|RL(Handle(NotLoaded|Load(Succeeded|InProgress|Failed))|CredentialPersistence(None|Permanent|ForSession))|n(scaledWindowMask|cachedRead|i(codeStringEncoding|talicFontMask|fiedTitleAndToolbarWindowMask)|d(o(CloseGroupingRunLoopOrdering|FunctionKey)|e(finedDateComponent|rline(Style(Single|None|Thick|Double)|Pattern(Solid|D(ot|ash(Dot(Dot)?)?)))))|known(ColorSpaceModel|P(ointingDevice|ageOrder)|KeyS(criptError|pecifierError))|boldFontMask)|tilityWindowMask|TF8StringEncoding|p(dateWindowsRunLoopOrdering|TextMovement|ArrowFunctionKey))|J(ustifiedTextAlignment|PEG(2000FileType|FileType)|apaneseEUC(GlyphPacking|StringEncoding))|P(o(s(t(Now|erFontMask|WhenIdle|ASAP)|iti(on(Replace|Be(fore|ginning)|End|After)|ve(IntType|DoubleType|FloatType)))|pUp(NoArrow|ArrowAt(Bottom|Center))|werOffEventType|rtraitOrientation)|NGFileType|ush(InCell(Mask)?|OnPushOffButton)|e(n(TipMask|UpperSideMask|PointingDevice|LowerSideMask)|riodic(Mask)?)|P(S(caleField|tatus(Title|Field)|aveButton)|N(ote(Title|Field)|ame(Title|Field))|CopiesField|TitleField|ImageButton|OptionsButton|P(a(perFeedButton|ge(Range(To|From)|ChoiceMatrix))|reviewButton)|LayoutButton)|lainTextTokenStyle|a(useFunctionKey|ragraphSeparatorCharacter|ge(DownFunctionKey|UpFunctionKey))|r(int(ing(ReplyLater|Success|Cancelled|Failure)|ScreenFunctionKey|erTable(NotFound|OK|Error)|FunctionKey)|o(p(ertyList(XMLFormat|MutableContainers(AndLeaves)?|BinaryFormat|Immutable|OpenStepFormat)|rietaryStringEncoding)|gressIndicator(BarStyle|SpinningStyle|Preferred(SmallThickness|Thickness|LargeThickness|AquaThickness)))|e(ssedTab|vFunctionKey))|L(HeightForm|CancelButton|TitleField|ImageButton|O(KButton|rientationMatrix)|UnitsButton|PaperNameButton|WidthForm))|E(n(terCharacter|d(sWith(Comparison|PredicateOperatorType)|FunctionKey))|v(e(nOddWindingRule|rySubelement)|aluatedObjectExpressionType)|qualTo(Comparison|PredicateOperatorType)|ra(serPointingDevice|CalendarUnit|DatePickerElementFlag)|x(clude(10|QuickDrawElementsIconCreationOption)|pandedFontMask|ecuteFunctionKey))|V(i(ew(M(in(XMargin|YMargin)|ax(XMargin|YMargin))|HeightSizable|NotSizable|WidthSizable)|aPanelFontAction)|erticalRuler|a(lidationErrorM(inimum|aximum)|riableExpressionType))|Key(SpecifierEvaluationScriptError|Down(Mask)?|Up(Mask)?|PathExpressionType|Value(MinusSetMutation|SetSetMutation|Change(Re(placement|moval)|Setting|Insertion)|IntersectSetMutation|ObservingOption(New|Old)|UnionSetMutation|ValidationError))|QTMovie(NormalPlayback|Looping(BackAndForthPlayback|Playback))|F(1(1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|7FunctionKey|i(nd(PanelAction(Replace(A(ndFind|ll(InSelection)?))?|S(howFindPanel|e(tFindString|lectAll(InSelection)?))|Next|Previous)|FunctionKey)|tPagination|le(Read(No(SuchFileError|PermissionError)|CorruptFileError|In(validFileNameError|applicableStringEncodingError)|Un(supportedSchemeError|knownError))|HandlingPanel(CancelButton|OKButton)|NoSuchFileError|ErrorM(inimum|aximum)|Write(NoPermissionError|In(validFileNameError|applicableStringEncodingError)|OutOfSpaceError|Un(supportedSchemeError|knownError))|LockingError)|xedPitchFontMask)|2(1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|o(nt(Mo(noSpaceTrait|dernSerifsClass)|BoldTrait|S(ymbolicClass|criptsClass|labSerifsClass|ansSerifClass)|C(o(ndensedTrait|llectionApplicationOnlyMask)|larendonSerifsClass)|TransitionalSerifsClass|I(ntegerAdvancementsRenderingMode|talicTrait)|O(ldStyleSerifsClass|rnamentalsClass)|DefaultRenderingMode|U(nknownClass|IOptimizedTrait)|Panel(S(hadowEffectModeMask|t(andardModesMask|rikethroughEffectModeMask)|izeModeMask)|CollectionModeMask|TextColorEffectModeMask|DocumentColorEffectModeMask|UnderlineEffectModeMask|FaceModeMask|All(ModesMask|EffectsModeMask))|ExpandedTrait|VerticalTrait|F(amilyClassMask|reeformSerifsClass)|Antialiased(RenderingMode|IntegerAdvancementsRenderingMode))|cusRing(Below|Type(None|Default|Exterior)|Only|Above)|urByteGlyphPacking|rm(attingError(M(inimum|aximum))?|FeedCharacter))|8FunctionKey|unction(ExpressionType|KeyMask)|3(1FunctionKey|2FunctionKey|3FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey)|9FunctionKey|4FunctionKey|P(RevertButton|S(ize(Title|Field)|etButton)|CurrentField|Preview(Button|Field))|l(oat(ingPointSamplesBitmapFormat|Type)|agsChanged(Mask)?)|axButton|5FunctionKey|6FunctionKey)|W(heelModeColorPanel|indow(s(NTOperatingSystem|CP125(1StringEncoding|2StringEncoding|3StringEncoding|4StringEncoding|0StringEncoding)|95(InterfaceStyle|OperatingSystem))|M(iniaturizeButton|ovedEventType)|Below|CloseButton|ToolbarButton|ZoomButton|Out|DocumentIconButton|ExposedEventType|Above)|orkspaceLaunch(NewInstance|InhibitingBackgroundOnly|Default|PreferringClassic|WithoutA(ctivation|ddingToRecents)|A(sync|nd(Hide(Others)?|Print)|llowingClassicStartup))|eek(day(CalendarUnit|OrdinalCalendarUnit)|CalendarUnit)|a(ntsBidiLevels|rningAlertStyle)|r(itingDirection(RightToLeft|Natural|LeftToRight)|apCalendarComponents))|L(i(stModeMatrix|ne(Moves(Right|Down|Up|Left)|B(order|reakBy(C(harWrapping|lipping)|Truncating(Middle|Head|Tail)|WordWrapping))|S(eparatorCharacter|weep(Right|Down|Up|Left))|ToBezierPathElement|DoesntMove|arSlider)|teralSearch|kePredicateOperatorType|ghterFontAction|braryDirectory)|ocalDomainMask|e(ssThan(Comparison|OrEqualTo(Comparison|PredicateOperatorType)|PredicateOperatorType)|ft(Mouse(D(own(Mask)?|ragged(Mask)?)|Up(Mask)?)|T(ext(Movement|Alignment)|ab(sBezelBorder|StopType))|ArrowFunctionKey))|a(yout(RightToLeft|NotDone|CantFit|OutOfGlyphs|Done|LeftToRight)|ndscapeOrientation)|ABColorSpaceModel)|A(sc(iiWithDoubleByteEUCGlyphPacking|endingPageOrder)|n(y(Type|PredicateModifier|EventMask)|choredSearch|imation(Blocking|Nonblocking(Threaded)?|E(ffect(DisappearingItemDefault|Poof)|ase(In(Out)?|Out))|Linear)|dPredicateType)|t(Bottom|tachmentCharacter|omicWrite|Top)|SCIIStringEncoding|d(obe(GB1CharacterCollection|CNS1CharacterCollection|Japan(1CharacterCollection|2CharacterCollection)|Korea1CharacterCollection)|dTraitFontAction|minApplicationDirectory)|uto(saveOperation|Pagination)|pp(lication(SupportDirectory|D(irectory|e(fined(Mask)?|legateReply(Success|Cancel|Failure)|activatedEventType))|ActivatedEventType)|KitDefined(Mask)?)|l(ternateKeyMask|pha(ShiftKeyMask|NonpremultipliedBitmapFormat|FirstBitmapFormat)|ert(SecondButtonReturn|ThirdButtonReturn|OtherReturn|DefaultReturn|ErrorReturn|FirstButtonReturn|AlternateReturn)|l(ScrollerParts|DomainsMask|PredicateModifier|LibrariesDirectory|ApplicationsDirectory))|rgument(sWrongScriptError|EvaluationScriptError)|bove(Bottom|Top)|WTEventType))\\b", + "name": "support.constant.cocoa.objcpp" + }, + "anonymous_pattern_4": { + "begin": "\\b(id)\\s*(?=<)", + "beginCaptures": { + "1": { + "name": "storage.type.objcpp" + } + }, + "end": "(?<=>)", + "name": "meta.id-with-protocol.objcpp", + "patterns": [ + { + "include": "#protocol_list" + } + ] + }, + "anonymous_pattern_5": { + "match": "\\b(NS_DURING|NS_HANDLER|NS_ENDHANDLER)\\b", + "name": "keyword.control.macro.objcpp" + }, + "anonymous_pattern_7": { + "captures": { + "1": { + "name": "punctuation.definition.keyword.objcpp" + } + }, + "match": "(@)(try|catch|finally|throw)\\b", + "name": "keyword.control.exception.objcpp" + }, + "anonymous_pattern_8": { + "captures": { + "1": { + "name": "punctuation.definition.keyword.objcpp" + } + }, + "match": "(@)(synchronized)\\b", + "name": "keyword.control.synchronize.objcpp" + }, + "anonymous_pattern_9": { + "captures": { + "1": { + "name": "punctuation.definition.keyword.objcpp" + } + }, + "match": "(@)(required|optional)\\b", + "name": "keyword.control.protocol-specification.objcpp" + }, + "apple_foundation_functional_macros": { + "begin": "(\\b(?:API_AVAILABLE|API_DEPRECATED|API_UNAVAILABLE|NS_AVAILABLE|NS_AVAILABLE_MAC|NS_AVAILABLE_IOS|NS_DEPRECATED|NS_DEPRECATED_MAC|NS_DEPRECATED_IOS|NS_SWIFT_NAME))(?:(?:\\s)+)?(\\()", + "end": "\\)", + "beginCaptures": { + "1": { + "name": "entity.name.function.preprocessor.apple-foundation.objcpp" + }, + "2": { + "name": "punctuation.section.macro.arguments.begin.bracket.round.apple-foundation.objcpp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.macro.arguments.end.bracket.round.apple-foundation.objcpp" + } + }, + "name": "meta.preprocessor.macro.callable.apple-foundation.objcpp", + "patterns": [ + { + "include": "#c_lang" + } + ] + }, + "bracketed_content": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.scope.begin.objcpp" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.section.scope.end.objcpp" + } + }, + "name": "meta.bracketed.objcpp", + "patterns": [ + { + "begin": "(?=predicateWithFormat:)(?<=NSPredicate )(predicateWithFormat:)", + "beginCaptures": { + "1": { + "name": "support.function.any-method.objcpp" + }, + "2": { + "name": "punctuation.separator.arguments.objcpp" + } + }, + "end": "(?=\\])", + "name": "meta.function-call.predicate.objcpp", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.separator.arguments.objcpp" + } + }, + "match": "\\bargument(Array|s)(:)", + "name": "support.function.any-method.name-of-parameter.objcpp" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.arguments.objcpp" + } + }, + "match": "\\b\\w+(:)", + "name": "invalid.illegal.unknown-method.objcpp" + }, + { + "begin": "@\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.double.objcpp", + "patterns": [ + { + "match": "\\b(AND|OR|NOT|IN)\\b", + "name": "keyword.operator.logical.predicate.cocoa.objcpp" + }, + { + "match": "\\b(ALL|ANY|SOME|NONE)\\b", + "name": "constant.language.predicate.cocoa.objcpp" + }, + { + "match": "\\b(NULL|NIL|SELF|TRUE|YES|FALSE|NO|FIRST|LAST|SIZE)\\b", + "name": "constant.language.predicate.cocoa.objcpp" + }, + { + "match": "\\b(MATCHES|CONTAINS|BEGINSWITH|ENDSWITH|BETWEEN)\\b", + "name": "keyword.operator.comparison.predicate.cocoa.objcpp" + }, + { + "match": "\\bC(ASEINSENSITIVE|I)\\b", + "name": "keyword.other.modifier.predicate.cocoa.objcpp" + }, + { + "match": "\\b(ANYKEY|SUBQUERY|CAST|TRUEPREDICATE|FALSEPREDICATE)\\b", + "name": "keyword.other.predicate.cocoa.objcpp" + }, + { + "match": "\\\\(\\\\|[abefnrtv'\"?]|[0-3]\\d{,2}|[4-7]\\d?|x[a-zA-Z0-9]+)", + "name": "constant.character.escape.objcpp" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unknown-escape.objcpp" + } + ] + }, + { + "include": "#special_variables" + }, + { + "include": "#c_functions" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "(?=\\w)(?<=[\\w\\])\"] )(\\w+(?:(:)|(?=\\])))", + "beginCaptures": { + "1": { + "name": "support.function.any-method.objcpp" + }, + "2": { + "name": "punctuation.separator.arguments.objcpp" + } + }, + "end": "(?=\\])", + "name": "meta.function-call.objcpp", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.separator.arguments.objcpp" + } + }, + "match": "\\b\\w+(:)", + "name": "support.function.any-method.name-of-parameter.objcpp" + }, + { + "include": "#special_variables" + }, + { + "include": "#c_functions" + }, + { + "include": "$base" + } + ] + }, + { + "include": "#special_variables" + }, + { + "include": "#c_functions" + }, + { + "include": "$self" + } + ] + }, + "c_functions": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading.objcpp" + }, + "2": { + "name": "support.function.C99.objcpp" + } + }, + "match": "(\\s*)\\b(hypot(f|l)?|s(scanf|ystem|nprintf|ca(nf|lb(n(f|l)?|ln(f|l)?))|i(n(h(f|l)?|f|l)?|gn(al|bit))|tr(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(jmp|vbuf|locale|buf)|qrt(f|l)?|w(scanf|printf)|rand)|n(e(arbyint(f|l)?|xt(toward(f|l)?|after(f|l)?))|an(f|l)?)|c(s(in(h(f|l)?|f|l)?|qrt(f|l)?)|cos(h(f)?|f|l)?|imag(f|l)?|t(ime|an(h(f|l)?|f|l)?)|o(s(h(f|l)?|f|l)?|nj(f|l)?|pysign(f|l)?)|p(ow(f|l)?|roj(f|l)?)|e(il(f|l)?|xp(f|l)?)|l(o(ck|g(f|l)?)|earerr)|a(sin(h(f|l)?|f|l)?|cos(h(f|l)?|f|l)?|tan(h(f|l)?|f|l)?|lloc|rg(f|l)?|bs(f|l)?)|real(f|l)?|brt(f|l)?)|t(ime|o(upper|lower)|an(h(f|l)?|f|l)?|runc(f|l)?|gamma(f|l)?|mp(nam|file))|i(s(space|n(ormal|an)|cntrl|inf|digit|u(nordered|pper)|p(unct|rint)|finite|w(space|c(ntrl|type)|digit|upper|p(unct|rint)|lower|al(num|pha)|graph|xdigit|blank)|l(ower|ess(equal|greater)?)|al(num|pha)|gr(eater(equal)?|aph)|xdigit|blank)|logb(f|l)?|max(div|abs))|di(v|fftime)|_Exit|unget(c|wc)|p(ow(f|l)?|ut(s|c(har)?|wc(har)?)|error|rintf)|e(rf(c(f|l)?|f|l)?|x(it|p(2(f|l)?|f|l|m1(f|l)?)?))|v(s(scanf|nprintf|canf|printf|w(scanf|printf))|printf|f(scanf|printf|w(scanf|printf))|w(scanf|printf)|a_(start|copy|end|arg))|qsort|f(s(canf|e(tpos|ek))|close|tell|open|dim(f|l)?|p(classify|ut(s|c|w(s|c))|rintf)|e(holdexcept|set(e(nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(aiseexcept|ror)|get(e(nv|xceptflag)|round))|flush|w(scanf|ide|printf|rite)|loor(f|l)?|abs(f|l)?|get(s|c|pos|w(s|c))|re(open|e|ad|xp(f|l)?)|m(in(f|l)?|od(f|l)?|a(f|l|x(f|l)?)?))|l(d(iv|exp(f|l)?)|o(ngjmp|cal(time|econv)|g(1(p(f|l)?|0(f|l)?)|2(f|l)?|f|l|b(f|l)?)?)|abs|l(div|abs|r(int(f|l)?|ound(f|l)?))|r(int(f|l)?|ound(f|l)?)|gamma(f|l)?)|w(scanf|c(s(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?|mbs)|pbrk|ftime|len|r(chr|tombs)|xfrm)|to(b|mb)|rtomb)|printf|mem(set|c(hr|py|mp)|move))|a(s(sert|ctime|in(h(f|l)?|f|l)?)|cos(h(f|l)?|f|l)?|t(o(i|f|l(l)?)|exit|an(h(f|l)?|2(f|l)?|f|l)?)|b(s|ort))|g(et(s|c(har)?|env|wc(har)?)|mtime)|r(int(f|l)?|ound(f|l)?|e(name|alloc|wind|m(ove|quo(f|l)?|ainder(f|l)?))|a(nd|ise))|b(search|towc)|m(odf(f|l)?|em(set|c(hr|py|mp)|move)|ktime|alloc|b(s(init|towcs|rtowcs)|towc|len|r(towc|len))))\\b" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.function-call.leading.objcpp" + }, + "2": { + "name": "support.function.any-method.objcpp" + }, + "3": { + "name": "punctuation.definition.parameters.objcpp" + } + }, + "match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?<!\\w)) (\\s+))?\n \t\t\t(\\b \n \t\t\t\t(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | :: )++ # actual name\n \t\t\t)\n \t\t\t \\s*(\\()", + "name": "meta.function-call.objcpp" + } + ] + }, + "c_lang": { + "patterns": [ + { + "include": "#preprocessor-rule-enabled" + }, + { + "include": "#preprocessor-rule-disabled" + }, + { + "include": "#preprocessor-rule-conditional" + }, + { + "include": "#comments" + }, + { + "include": "#switch_statement" + }, + { + "match": "\\b(break|continue|do|else|for|goto|if|_Pragma|return|while)\\b", + "name": "keyword.control.objcpp" + }, + { + "include": "#storage_types" + }, + { + "match": "typedef", + "name": "keyword.other.typedef.objcpp" + }, + { + "match": "\\bin\\b", + "name": "keyword.other.in.objcpp" + }, + { + "match": "\\b(const|extern|register|restrict|static|volatile|inline|__block)\\b", + "name": "storage.modifier.objcpp" + }, + { + "match": "\\bk[A-Z]\\w*\\b", + "name": "constant.other.variable.mac-classic.objcpp" + }, + { + "match": "\\bg[A-Z]\\w*\\b", + "name": "variable.other.readwrite.global.mac-classic.objcpp" + }, + { + "match": "\\bs[A-Z]\\w*\\b", + "name": "variable.other.readwrite.static.mac-classic.objcpp" + }, + { + "match": "\\b(NULL|true|false|TRUE|FALSE)\\b", + "name": "constant.language.objcpp" + }, + { + "include": "#operators" + }, + { + "include": "#numbers" + }, + { + "include": "#strings" + }, + { + "include": "#special_variables" + }, + { + "begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+\t# define\n((?<id>[a-zA-Z_$][\\w$]*))\t # macro name\n(?:\n (\\()\n\t(\n\t \\s* \\g<id> \\s*\t\t # first argument\n\t ((,) \\s* \\g<id> \\s*)* # additional arguments\n\t (?:\\.\\.\\.)?\t\t\t# varargs ellipsis?\n\t)\n (\\))\n)?", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.define.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + }, + "3": { + "name": "entity.name.function.preprocessor.objcpp" + }, + "5": { + "name": "punctuation.definition.parameters.begin.objcpp" + }, + "6": { + "name": "variable.parameter.preprocessor.objcpp" + }, + "8": { + "name": "punctuation.separator.parameters.objcpp" + }, + "9": { + "name": "punctuation.definition.parameters.end.objcpp" + } + }, + "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.macro.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-define-line-contents" + } + ] + }, + { + "begin": "^\\s*((#)\\s*(error|warning))\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.diagnostic.$3.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.diagnostic.objcpp", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": "\"|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.double.objcpp", + "patterns": [ + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": "'|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.single.objcpp", + "patterns": [ + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "[^'\"]", + "end": "(?<!\\\\)(?=\\s*\\n)", + "name": "string.unquoted.single.objcpp", + "patterns": [ + { + "include": "#line_continuation_character" + }, + { + "include": "#comments" + } + ] + } + ] + }, + { + "begin": "^\\s*((#)\\s*(include(?:_next)?|import))\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.$3.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.include.objcpp", + "patterns": [ + { + "include": "#line_continuation_character" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.double.include.objcpp" + }, + { + "begin": "<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.other.lt-gt.include.objcpp" + } + ] + }, + { + "include": "#pragma-mark" + }, + { + "begin": "^\\s*((#)\\s*line)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.line.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#strings" + }, + { + "include": "#numbers" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "^\\s*(?:((#)\\s*undef))\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.undef.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "match": "[a-zA-Z_$][\\w$]*", + "name": "entity.name.function.preprocessor.objcpp" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "^\\s*(?:((#)\\s*pragma))\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.pragma.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.pragma.objcpp", + "patterns": [ + { + "include": "#strings" + }, + { + "match": "[a-zA-Z_$][\\w\\-$]*", + "name": "entity.other.attribute-name.pragma.preprocessor.objcpp" + }, + { + "include": "#numbers" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "match": "\\b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\b", + "name": "support.type.sys-types.objcpp" + }, + { + "match": "\\b(pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t)\\b", + "name": "support.type.pthread.objcpp" + }, + { + "match": "(?x) \\b\n(int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t\n|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t\n|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t\n|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t\n|uintmax_t|uintmax_t)\n\\b", + "name": "support.type.stdint.objcpp" + }, + { + "match": "\\b(noErr|kNilOptions|kInvalidID|kVariableLengthArray)\\b", + "name": "support.constant.mac-classic.objcpp" + }, + { + "match": "(?x) \\b\n(AbsoluteTime|Boolean|Byte|ByteCount|ByteOffset|BytePtr|CompTimeValue|ConstLogicalAddress|ConstStrFileNameParam\n|ConstStringPtr|Duration|Fixed|FixedPtr|Float32|Float32Point|Float64|Float80|Float96|FourCharCode|Fract|FractPtr\n|Handle|ItemCount|LogicalAddress|OptionBits|OSErr|OSStatus|OSType|OSTypePtr|PhysicalAddress|ProcessSerialNumber\n|ProcessSerialNumberPtr|ProcHandle|Ptr|ResType|ResTypePtr|ShortFixed|ShortFixedPtr|SignedByte|SInt16|SInt32|SInt64\n|SInt8|Size|StrFileName|StringHandle|StringPtr|TimeBase|TimeRecord|TimeScale|TimeValue|TimeValue64|UInt16|UInt32\n|UInt64|UInt8|UniChar|UniCharCount|UniCharCountPtr|UniCharPtr|UnicodeScalarValue|UniversalProcHandle|UniversalProcPtr\n|UnsignedFixed|UnsignedFixedPtr|UnsignedWide|UTF16Char|UTF32Char|UTF8Char)\n\\b", + "name": "support.type.mac-classic.objcpp" + }, + { + "match": "\\b([A-Za-z0-9_]+_t)\\b", + "name": "support.type.posix-reserved.objcpp" + }, + { + "include": "#block" + }, + { + "include": "#parens" + }, + { + "name": "meta.function.objcpp", + "begin": "(?<!\\w)(?!\\s*(?:not|compl|sizeof|not_eq|bitand|xor|bitor|and|or|and_eq|xor_eq|or_eq|alignof|alignas|_Alignof|_Alignas|while|for|do|if|else|goto|switch|return|break|case|continue|default|void|char|short|int|signed|unsigned|long|float|double|bool|_Bool|_Complex|_Imaginary|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|NULL|true|false|memory_order|atomic_bool|atomic_char|atomic_schar|atomic_uchar|atomic_short|atomic_ushort|atomic_int|atomic_uint|atomic_long|atomic_ulong|atomic_llong|atomic_ullong|atomic_char16_t|atomic_char32_t|atomic_wchar_t|atomic_int_least8_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_least16_t|atomic_int_least32_t|atomic_uint_least32_t|atomic_int_least64_t|atomic_uint_least64_t|atomic_int_fast8_t|atomic_uint_fast8_t|atomic_int_fast16_t|atomic_uint_fast16_t|atomic_int_fast32_t|atomic_uint_fast32_t|atomic_int_fast64_t|atomic_uint_fast64_t|atomic_intptr_t|atomic_uintptr_t|atomic_size_t|atomic_ptrdiff_t|atomic_intmax_t|atomic_uintmax_t|struct|union|enum|typedef|auto|register|static|extern|thread_local|inline|_Noreturn|const|volatile|restrict|_Atomic)\\s*\\()(?=[a-zA-Z_]\\w*\\s*\\()", + "end": "(?<=\\))", + "patterns": [ + { + "include": "#function-innards" + } + ] + }, + { + "include": "#line_continuation_character" + }, + { + "name": "meta.bracket.square.access.objcpp", + "begin": "([a-zA-Z_][a-zA-Z_0-9]*|(?<=[\\]\\)]))?(\\[)(?!\\])", + "beginCaptures": { + "1": { + "name": "variable.object.objcpp" + }, + "2": { + "name": "punctuation.definition.begin.bracket.square.objcpp" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.end.bracket.square.objcpp" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + { + "name": "storage.modifier.array.bracket.square.objcpp", + "match": "\\[\\s*\\]" + }, + { + "match": ";", + "name": "punctuation.terminator.statement.objcpp" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.objcpp" + } + ], + "repository": { + "probably_a_parameter": { + "match": "(?<=(?:[a-zA-Z_0-9] |[&*>\\]\\)]))\\s*([a-zA-Z_]\\w*)\\s*(?=(?:\\[\\]\\s*)?(?:,|\\)))", + "captures": { + "1": { + "name": "variable.parameter.probably.objcpp" + } + } + }, + "access-method": { + "name": "meta.function-call.member.objcpp", + "begin": "([a-zA-Z_][a-zA-Z_0-9]*|(?<=[\\]\\)]))\\s*(?:(\\.)|(->))((?:(?:[a-zA-Z_][a-zA-Z_0-9]*)\\s*(?:(?:\\.)|(?:->)))*)\\s*([a-zA-Z_][a-zA-Z_0-9]*)(\\()", + "beginCaptures": { + "1": { + "name": "variable.object.objcpp" + }, + "2": { + "name": "punctuation.separator.dot-access.objcpp" + }, + "3": { + "name": "punctuation.separator.pointer-access.objcpp" + }, + "4": { + "patterns": [ + { + "match": "\\.", + "name": "punctuation.separator.dot-access.objcpp" + }, + { + "match": "->", + "name": "punctuation.separator.pointer-access.objcpp" + }, + { + "match": "[a-zA-Z_][a-zA-Z_0-9]*", + "name": "variable.object.objcpp" + }, + { + "name": "everything.else.objcpp", + "match": ".+" + } + ] + }, + "5": { + "name": "entity.name.function.member.objcpp" + }, + "6": { + "name": "punctuation.section.arguments.begin.bracket.round.function.member.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.arguments.end.bracket.round.function.member.objcpp" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + "block": { + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objcpp" + } + }, + "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.objcpp" + } + }, + "name": "meta.block.objcpp", + "patterns": [ + { + "include": "#block_innards" + } + ] + } + ] + }, + "block_innards": { + "patterns": [ + { + "include": "#preprocessor-rule-enabled-block" + }, + { + "include": "#preprocessor-rule-disabled-block" + }, + { + "include": "#preprocessor-rule-conditional-block" + }, + { + "include": "#method_access" + }, + { + "include": "#member_access" + }, + { + "include": "#c_function_call" + }, + { + "name": "meta.initialization.objcpp", + "begin": "(?x)\n(?:\n (?:\n\t(?=\\s)(?<!else|new|return)\n\t(?<=\\w) \\s+(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas) # or word + space before name\n )\n)\n(\n (?:[A-Za-z_][A-Za-z0-9_]*+ | :: )++ # actual name\n |\n (?:(?<=operator) (?:[-*&<>=+!]+ | \\(\\) | \\[\\]))\n)\n\\s*(\\() # opening bracket", + "beginCaptures": { + "1": { + "name": "variable.other.objcpp" + }, + "2": { + "name": "punctuation.section.parens.begin.bracket.round.initialization.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.initialization.objcpp" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objcpp" + } + }, + "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.objcpp" + } + }, + "patterns": [ + { + "include": "#block_innards" + } + ] + }, + { + "include": "#parens-block" + }, + { + "include": "$base" + } + ] + }, + "c_function_call": { + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(?=\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", + "end": "(?<=\\))(?!\\w)", + "name": "meta.function-call.objcpp", + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + "comments": { + "patterns": [ + { + "captures": { + "1": { + "name": "meta.toc-list.banner.block.objcpp" + } + }, + "match": "^/\\* =(\\s*.*?)\\s*= \\*/$\\n?", + "name": "comment.block.objcpp" + }, + { + "begin": "/\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.objcpp" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.objcpp" + } + }, + "name": "comment.block.objcpp" + }, + { + "captures": { + "1": { + "name": "meta.toc-list.banner.line.objcpp" + } + }, + "match": "^// =(\\s*.*?)\\s*=\\s*$\\n?", + "name": "comment.line.banner.objcpp" + }, + { + "begin": "(^[ \\t]+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.objcpp" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.objcpp" + } + }, + "end": "(?=\\n)", + "name": "comment.line.double-slash.objcpp", + "patterns": [ + { + "include": "#line_continuation_character" + } + ] + } + ] + } + ] + }, + "disabled": { + "begin": "^\\s*#\\s*if(n?def)?\\b.*$", + "end": "^\\s*#\\s*endif\\b", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + "line_continuation_character": { + "patterns": [ + { + "match": "(\\\\)\\n", + "captures": { + "1": { + "name": "constant.character.escape.line-continuation.objcpp" + } + } + } + ] + }, + "parens": { + "name": "meta.parens.objcpp", + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "$base" + } + ] + }, + "parens-block": { + "name": "meta.parens.block.objcpp", + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#block_innards" + }, + { + "match": "(?-mix:(?<!:):(?!:))", + "name": "punctuation.range-based.objcpp" + } + ] + }, + "pragma-mark": { + "captures": { + "1": { + "name": "meta.preprocessor.pragma.objcpp" + }, + "2": { + "name": "keyword.control.directive.pragma.pragma-mark.objcpp" + }, + "3": { + "name": "punctuation.definition.directive.objcpp" + }, + "4": { + "name": "entity.name.tag.pragma-mark.objcpp" + } + }, + "match": "^\\s*(((#)\\s*pragma\\s+mark)\\s+(.*))", + "name": "meta.section.objcpp" + }, + "operators": { + "patterns": [ + { + "match": "(?<![\\w$])(sizeof)(?![\\w$])", + "name": "keyword.operator.sizeof.objcpp" + }, + { + "match": "--", + "name": "keyword.operator.decrement.objcpp" + }, + { + "match": "\\+\\+", + "name": "keyword.operator.increment.objcpp" + }, + { + "match": "%=|\\+=|-=|\\*=|(?<!\\()/=", + "name": "keyword.operator.assignment.compound.objcpp" + }, + { + "match": "&=|\\^=|<<=|>>=|\\|=", + "name": "keyword.operator.assignment.compound.bitwise.objcpp" + }, + { + "match": "<<|>>", + "name": "keyword.operator.bitwise.shift.objcpp" + }, + { + "match": "!=|<=|>=|==|<|>", + "name": "keyword.operator.comparison.objcpp" + }, + { + "match": "&&|!|\\|\\|", + "name": "keyword.operator.logical.objcpp" + }, + { + "match": "&|\\||\\^|~", + "name": "keyword.operator.objcpp" + }, + { + "match": "=", + "name": "keyword.operator.assignment.objcpp" + }, + { + "match": "%|\\*|/|-|\\+", + "name": "keyword.operator.objcpp" + }, + { + "begin": "(\\?)", + "beginCaptures": { + "1": { + "name": "keyword.operator.ternary.objcpp" + } + }, + "end": "(:)", + "endCaptures": { + "1": { + "name": "keyword.operator.ternary.objcpp" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + }, + { + "include": "$base" + } + ] + } + ] + }, + "strings": { + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.double.objcpp", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_placeholder" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.single.objcpp", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#line_continuation_character" + } + ] + } + ] + }, + "string_escaped_char": { + "patterns": [ + { + "match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )", + "name": "constant.character.escape.objcpp" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unknown-escape.objcpp" + } + ] + }, + "string_placeholder": { + "patterns": [ + { + "match": "(?x) %\n(\\d+\\$)?\t\t\t\t\t\t # field (argument #)\n[#0\\- +']*\t\t\t\t\t\t # flags\n[,;:_]?\t\t\t\t\t\t\t # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)?\t\t # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?\t# precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%]\t\t # conversion type", + "name": "constant.other.placeholder.objcpp" + }, + { + "match": "(%)(?!\"\\s*(PRI|SCN))", + "captures": { + "1": { + "name": "invalid.illegal.placeholder.objcpp" + } + } + } + ] + }, + "storage_types": { + "patterns": [ + { + "match": "(?-mix:(?<!\\w)(?:void|char|short|int|signed|unsigned|long|float|double|bool|_Bool)(?!\\w))", + "name": "storage.type.built-in.primitive.objcpp" + }, + { + "match": "(?-mix:(?<!\\w)(?:_Complex|_Imaginary|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|memory_order|atomic_bool|atomic_char|atomic_schar|atomic_uchar|atomic_short|atomic_ushort|atomic_int|atomic_uint|atomic_long|atomic_ulong|atomic_llong|atomic_ullong|atomic_char16_t|atomic_char32_t|atomic_wchar_t|atomic_int_least8_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_least16_t|atomic_int_least32_t|atomic_uint_least32_t|atomic_int_least64_t|atomic_uint_least64_t|atomic_int_fast8_t|atomic_uint_fast8_t|atomic_int_fast16_t|atomic_uint_fast16_t|atomic_int_fast32_t|atomic_uint_fast32_t|atomic_int_fast64_t|atomic_uint_fast64_t|atomic_intptr_t|atomic_uintptr_t|atomic_size_t|atomic_ptrdiff_t|atomic_intmax_t|atomic_uintmax_t)(?!\\w))", + "name": "storage.type.built-in.objcpp" + }, + { + "match": "(?-mix:\\b(asm|__asm__|enum|struct|union)\\b)", + "name": "storage.type.$1.objcpp" + } + ] + }, + "vararg_ellipses": { + "match": "(?<!\\.)\\.\\.\\.(?!\\.)", + "name": "punctuation.vararg-ellipses.objcpp" + }, + "preprocessor-rule-conditional": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if(?:n?def)?\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#preprocessor-rule-enabled-elif" + }, + { + "include": "#preprocessor-rule-enabled-else" + }, + { + "include": "#preprocessor-rule-disabled-elif" + }, + { + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "$base" + } + ] + }, + { + "match": "^\\s*#\\s*(else|elif|endif)\\b", + "captures": { + "0": { + "name": "invalid.illegal.stray-$1.objcpp" + } + } + } + ] + }, + "preprocessor-rule-conditional-block": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if(?:n?def)?\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#preprocessor-rule-enabled-elif-block" + }, + { + "include": "#preprocessor-rule-enabled-else-block" + }, + { + "include": "#preprocessor-rule-disabled-elif" + }, + { + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#block_innards" + } + ] + }, + { + "match": "^\\s*#\\s*(else|elif|endif)\\b", + "captures": { + "0": { + "name": "invalid.illegal.stray-$1.objcpp" + } + } + } + ] + }, + "preprocessor-rule-conditional-line": { + "patterns": [ + { + "match": "(?:\\bdefined\\b\\s*$)|(?:\\bdefined\\b(?=\\s*\\(*\\s*(?:(?!defined\\b)[a-zA-Z_$][\\w$]*\\b)\\s*\\)*\\s*(?:\\n|//|/\\*|\\?|\\:|&&|\\|\\||\\\\\\s*\\n)))", + "name": "keyword.control.directive.conditional.objcpp" + }, + { + "match": "\\bdefined\\b", + "name": "invalid.illegal.macro-name.objcpp" + }, + { + "include": "#comments" + }, + { + "include": "#strings" + }, + { + "include": "#numbers" + }, + { + "begin": "\\?", + "beginCaptures": { + "0": { + "name": "keyword.operator.ternary.objcpp" + } + }, + "end": ":", + "endCaptures": { + "0": { + "name": "keyword.operator.ternary.objcpp" + } + }, + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#operators" + }, + { + "match": "\\b(NULL|true|false|TRUE|FALSE)\\b", + "name": "constant.language.objcpp" + }, + { + "match": "[a-zA-Z_$][\\w$]*", + "name": "entity.name.function.preprocessor.objcpp" + }, + { + "include": "#line_continuation_character" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objcpp" + } + }, + "end": "\\)|(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + } + ] + }, + "preprocessor-rule-disabled": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments" + }, + { + "include": "#preprocessor-rule-enabled-elif" + }, + { + "include": "#preprocessor-rule-enabled-else" + }, + { + "include": "#preprocessor-rule-disabled-elif" + }, + { + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))", + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "$base" + } + ] + }, + { + "contentName": "comment.block.preprocessor.if-branch.objcpp", + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + } + ] + } + ] + }, + "preprocessor-rule-disabled-block": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments" + }, + { + "include": "#preprocessor-rule-enabled-elif-block" + }, + { + "include": "#preprocessor-rule-enabled-else-block" + }, + { + "include": "#preprocessor-rule-disabled-elif" + }, + { + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))", + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#block_innards" + } + ] + }, + { + "contentName": "comment.block.preprocessor.if-branch.in-block.objcpp", + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + } + ] + } + ] + }, + "preprocessor-rule-disabled-elif": { + "begin": "^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))", + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments" + }, + { + "contentName": "comment.block.preprocessor.elif-branch.objcpp", + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + } + ] + }, + "preprocessor-rule-enabled": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + }, + "3": { + "name": "constant.numeric.preprocessor.objcpp" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments" + }, + { + "contentName": "comment.block.preprocessor.else-branch.objcpp", + "begin": "^\\s*((#)\\s*else\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "contentName": "comment.block.preprocessor.if-branch.objcpp", + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "$base" + } + ] + } + ] + } + ] + }, + "preprocessor-rule-enabled-block": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments" + }, + { + "contentName": "comment.block.preprocessor.else-branch.in-block.objcpp", + "begin": "^\\s*((#)\\s*else\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "contentName": "comment.block.preprocessor.if-branch.in-block.objcpp", + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#block_innards" + } + ] + } + ] + } + ] + }, + "preprocessor-rule-enabled-elif": { + "begin": "^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments" + }, + { + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:endif)\\b))", + "patterns": [ + { + "contentName": "comment.block.preprocessor.elif-branch.objcpp", + "begin": "^\\s*((#)\\s*(else)\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "contentName": "comment.block.preprocessor.elif-branch.objcpp", + "begin": "^\\s*((#)\\s*(elif)\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "include": "$base" + } + ] + } + ] + }, + "preprocessor-rule-enabled-elif-block": { + "begin": "^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments" + }, + { + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:endif)\\b))", + "patterns": [ + { + "contentName": "comment.block.preprocessor.elif-branch.in-block.objcpp", + "begin": "^\\s*((#)\\s*(else)\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "contentName": "comment.block.preprocessor.elif-branch.objcpp", + "begin": "^\\s*((#)\\s*(elif)\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "include": "#block_innards" + } + ] + } + ] + }, + "preprocessor-rule-enabled-else": { + "begin": "^\\s*((#)\\s*else\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "include": "$base" + } + ] + }, + "preprocessor-rule-enabled-else-block": { + "begin": "^\\s*((#)\\s*else\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "include": "#block_innards" + } + ] + }, + "preprocessor-rule-define-line-contents": { + "patterns": [ + { + "include": "#vararg_ellipses" + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objcpp" + } + }, + "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.objcpp" + } + }, + "name": "meta.block.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-define-line-blocks" + } + ] + }, + { + "match": "\\(", + "name": "punctuation.section.parens.begin.bracket.round.objcpp" + }, + { + "match": "\\)", + "name": "punctuation.section.parens.end.bracket.round.objcpp" + }, + { + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas|asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\s*\\()\n(?=\n (?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name\n |\n (?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", + "end": "(?<=\\))(?!\\w)|(?<!\\\\)(?=\\s*\\n)", + "name": "meta.function.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-define-line-functions" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": "\"|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.double.objcpp", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_placeholder" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": "'|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.single.objcpp", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "include": "#method_access" + }, + { + "include": "#member_access" + }, + { + "include": "$base" + } + ] + }, + "preprocessor-rule-define-line-blocks": { + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objcpp" + } + }, + "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.objcpp" + } + }, + "patterns": [ + { + "include": "#preprocessor-rule-define-line-blocks" + }, + { + "include": "#preprocessor-rule-define-line-contents" + } + ] + }, + { + "include": "#preprocessor-rule-define-line-contents" + } + ] + }, + "preprocessor-rule-define-line-functions": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#storage_types" + }, + { + "include": "#vararg_ellipses" + }, + { + "include": "#method_access" + }, + { + "include": "#member_access" + }, + { + "include": "#operators" + }, + { + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.objcpp" + }, + "2": { + "name": "punctuation.section.arguments.begin.bracket.round.objcpp" + } + }, + "end": "(\\))|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "1": { + "name": "punctuation.section.arguments.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#preprocessor-rule-define-line-functions" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objcpp" + } + }, + "end": "(\\))|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "1": { + "name": "punctuation.section.parens.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#preprocessor-rule-define-line-functions" + } + ] + }, + { + "include": "#preprocessor-rule-define-line-contents" + } + ] + }, + "function-innards": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#storage_types" + }, + { + "include": "#operators" + }, + { + "include": "#vararg_ellipses" + }, + { + "name": "meta.function.definition.parameters.objcpp", + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.objcpp" + }, + "2": { + "name": "punctuation.section.parameters.begin.bracket.round.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parameters.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#probably_a_parameter" + }, + { + "include": "#function-innards" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#function-innards" + } + ] + }, + { + "include": "$base" + } + ] + }, + "function-call-innards": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#storage_types" + }, + { + "include": "#method_access" + }, + { + "include": "#member_access" + }, + { + "include": "#operators" + }, + { + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.objcpp" + }, + "2": { + "name": "punctuation.section.arguments.begin.bracket.round.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.arguments.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + { + "include": "#block_innards" + } + ] + }, + "default_statement": { + "name": "meta.conditional.case.objcpp", + "begin": "((?<!\\w)default(?!\\w))", + "beginCaptures": { + "1": { + "name": "keyword.control.default.objcpp" + } + }, + "end": "(:)", + "endCaptures": { + "1": { + "name": "punctuation.separator.case.default.objcpp" + } + }, + "patterns": [ + { + "include": "#conditional_context" + } + ] + }, + "case_statement": { + "name": "meta.conditional.case.objcpp", + "begin": "((?<!\\w)case(?!\\w))", + "beginCaptures": { + "1": { + "name": "keyword.control.case.objcpp" + } + }, + "end": "(:)", + "endCaptures": { + "1": { + "name": "punctuation.separator.case.objcpp" + } + }, + "patterns": [ + { + "include": "#conditional_context" + } + ] + }, + "switch_statement": { + "name": "meta.block.switch.objcpp", + "begin": "(((?<!\\w)switch(?!\\w)))", + "beginCaptures": { + "1": { + "name": "meta.head.switch.objcpp" + }, + "2": { + "name": "keyword.control.switch.objcpp" + } + }, + "end": "(?:(?<=\\})|(?=[;>\\[\\]=]))", + "patterns": [ + { + "name": "meta.head.switch.objcpp", + "begin": "\\G ?", + "end": "((?:\\{|(?=;)))", + "endCaptures": { + "1": { + "name": "punctuation.section.block.begin.bracket.curly.switch.objcpp" + } + }, + "patterns": [ + { + "include": "#switch_conditional_parentheses" + }, + { + "include": "$base" + } + ] + }, + { + "name": "meta.body.switch.objcpp", + "begin": "(?<=\\{)", + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.section.block.end.bracket.curly.switch.objcpp" + } + }, + "patterns": [ + { + "include": "#default_statement" + }, + { + "include": "#case_statement" + }, + { + "include": "$base" + }, + { + "include": "#block_innards" + } + ] + }, + { + "name": "meta.tail.switch.objcpp", + "begin": "(?<=})[\\s\\n]*", + "end": "[\\s\\n]*(?=;)", + "patterns": [ + { + "include": "$base" + } + ] + } + ] + }, + "switch_conditional_parentheses": { + "name": "meta.conditional.switch.objcpp", + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.section.parens.begin.bracket.round.conditional.switch.objcpp" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.parens.end.bracket.round.conditional.switch.objcpp" + } + }, + "patterns": [ + { + "include": "#conditional_context" + } + ] + }, + "static_assert": { + "begin": "(static_assert|_Static_assert)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.static_assert.objcpp" + }, + "2": { + "name": "punctuation.section.arguments.begin.bracket.round.objcpp" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.arguments.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "name": "meta.static_assert.message.objcpp", + "begin": "(,)\\s*(?=(?:L|u8|u|U\\s*\\\")?)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.delimiter.objcpp" + } + }, + "end": "(?=\\))", + "patterns": [ + { + "include": "#string_context" + }, + { + "include": "#string_context_c" + } + ] + }, + { + "include": "#function_call_context" + } + ] + }, + "conditional_context": { + "patterns": [ + { + "include": "$base" + }, + { + "include": "#block_innards" + } + ] + }, + "member_access": { + "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!(?:void|char|short|int|signed|unsigned|long|float|double|bool|_Bool|_Complex|_Imaginary|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|memory_order|atomic_bool|atomic_char|atomic_schar|atomic_uchar|atomic_short|atomic_ushort|atomic_int|atomic_uint|atomic_long|atomic_ulong|atomic_llong|atomic_ullong|atomic_char16_t|atomic_char32_t|atomic_wchar_t|atomic_int_least8_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_least16_t|atomic_int_least32_t|atomic_uint_least32_t|atomic_int_least64_t|atomic_uint_least64_t|atomic_int_fast8_t|atomic_uint_fast8_t|atomic_int_fast16_t|atomic_uint_fast16_t|atomic_int_fast32_t|atomic_uint_fast32_t|atomic_int_fast64_t|atomic_uint_fast64_t|atomic_intptr_t|atomic_uintptr_t|atomic_size_t|atomic_ptrdiff_t|atomic_intmax_t|atomic_uintmax_t))[a-zA-Z_]\\w*\\b(?!\\())", + "captures": { + "1": { + "patterns": [ + { + "include": "#special_variables" + }, + { + "name": "variable.other.object.access.objcpp", + "match": "(.+)" + } + ] + }, + "2": { + "name": "punctuation.separator.dot-access.objcpp" + }, + "3": { + "name": "punctuation.separator.pointer-access.objcpp" + }, + "4": { + "patterns": [ + { + "include": "#member_access" + }, + { + "include": "#method_access" + }, + { + "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))", + "captures": { + "1": { + "patterns": [ + { + "include": "#special_variables" + }, + { + "name": "variable.other.object.access.objcpp", + "match": "(.+)" + } + ] + }, + "2": { + "name": "punctuation.separator.dot-access.objcpp" + }, + "3": { + "name": "punctuation.separator.pointer-access.objcpp" + } + } + } + ] + }, + "5": { + "name": "variable.other.member.objcpp" + } + } + }, + "method_access": { + "contentName": "meta.function-call.member.objcpp", + "begin": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*([a-zA-Z_]\\w*)(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#special_variables" + }, + { + "name": "variable.other.object.access.objcpp", + "match": "(.+)" + } + ] + }, + "2": { + "name": "punctuation.separator.dot-access.objcpp" + }, + "3": { + "name": "punctuation.separator.pointer-access.objcpp" + }, + "4": { + "patterns": [ + { + "include": "#member_access" + }, + { + "include": "#method_access" + }, + { + "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))", + "captures": { + "1": { + "patterns": [ + { + "include": "#special_variables" + }, + { + "name": "variable.other.object.access.objcpp", + "match": "(.+)" + } + ] + }, + "2": { + "name": "punctuation.separator.dot-access.objcpp" + }, + "3": { + "name": "punctuation.separator.pointer-access.objcpp" + } + } + } + ] + }, + "5": { + "name": "entity.name.function.member.objcpp" + }, + "6": { + "name": "punctuation.section.arguments.begin.bracket.round.function.member.objcpp" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.arguments.end.bracket.round.function.member.objcpp" + } + }, + "patterns": [ + { + "include": "#function-call-innards" + } + ] + }, + "numbers": { + "begin": "(?<!\\w)(?=\\d|\\.\\d)", + "end": "(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", + "patterns": [ + { + "match": "(\\G0[xX])(?:([0-9a-fA-F](?:(?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?((?:(?<=[0-9a-fA-F])\\.|\\.(?=[0-9a-fA-F])))(?:([0-9a-fA-F](?:(?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?(?:((?<!')([pP])(\\+)?(\\-)?((?-mix:(?:[0-9](?:(?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)))))?(?:([lLfF](?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", + "captures": { + "1": { + "name": "keyword.other.unit.hexadecimal.objcpp" + }, + "2": { + "name": "constant.numeric.hexadecimal.objcpp", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objcpp" + } + ] + }, + "3": { + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "4": { + "name": "constant.numeric.hexadecimal.objcpp" + }, + "5": { + "name": "constant.numeric.hexadecimal.objcpp", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objcpp" + } + ] + }, + "6": { + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "8": { + "name": "keyword.other.unit.exponent.hexadecimal.objcpp" + }, + "9": { + "name": "keyword.operator.plus.exponent.hexadecimal.objcpp" + }, + "10": { + "name": "keyword.operator.minus.exponent.hexadecimal.objcpp" + }, + "11": { + "name": "constant.numeric.exponent.hexadecimal.objcpp", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objcpp" + } + ] + }, + "12": { + "name": "keyword.other.unit.suffix.floating-point.objcpp" + } + } + }, + { + "match": "(\\G(?=[0-9.])(?!0[xXbB]))(?:([0-9](?:(?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?((?:(?<=[0-9])\\.|\\.(?=[0-9])))(?:([0-9](?:(?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?(?:((?<!')([eE])(\\+)?(\\-)?((?-mix:(?:[0-9](?:(?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)))))?(?:([lLfF](?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", + "captures": { + "2": { + "name": "constant.numeric.decimal.objcpp", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objcpp" + } + ] + }, + "3": { + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "4": { + "name": "constant.numeric.decimal.point.objcpp" + }, + "5": { + "name": "constant.numeric.decimal.objcpp", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objcpp" + } + ] + }, + "6": { + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "8": { + "name": "keyword.other.unit.exponent.decimal.objcpp" + }, + "9": { + "name": "keyword.operator.plus.exponent.decimal.objcpp" + }, + "10": { + "name": "keyword.operator.minus.exponent.decimal.objcpp" + }, + "11": { + "name": "constant.numeric.exponent.decimal.objcpp", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objcpp" + } + ] + }, + "12": { + "name": "keyword.other.unit.suffix.floating-point.objcpp" + } + } + }, + { + "match": "(\\G0[bB])([01](?:(?:[01]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)(?:((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", + "captures": { + "1": { + "name": "keyword.other.unit.binary.objcpp" + }, + "2": { + "name": "constant.numeric.binary.objcpp", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objcpp" + } + ] + }, + "3": { + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "4": { + "name": "keyword.other.unit.suffix.integer.objcpp" + } + } + }, + { + "match": "(\\G0)((?:(?:[0-7]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))+)(?:((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", + "captures": { + "1": { + "name": "keyword.other.unit.octal.objcpp" + }, + "2": { + "name": "constant.numeric.octal.objcpp", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objcpp" + } + ] + }, + "3": { + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "4": { + "name": "keyword.other.unit.suffix.integer.objcpp" + } + } + }, + { + "match": "(\\G0[xX])([0-9a-fA-F](?:(?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)(?:((?<!')([pP])(\\+)?(\\-)?((?-mix:(?:[0-9](?:(?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)))))?(?:((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", + "captures": { + "1": { + "name": "keyword.other.unit.hexadecimal.objcpp" + }, + "2": { + "name": "constant.numeric.hexadecimal.objcpp", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objcpp" + } + ] + }, + "3": { + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "5": { + "name": "keyword.other.unit.exponent.hexadecimal.objcpp" + }, + "6": { + "name": "keyword.operator.plus.exponent.hexadecimal.objcpp" + }, + "7": { + "name": "keyword.operator.minus.exponent.hexadecimal.objcpp" + }, + "8": { + "name": "constant.numeric.exponent.hexadecimal.objcpp", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objcpp" + } + ] + }, + "9": { + "name": "keyword.other.unit.suffix.integer.objcpp" + } + } + }, + { + "match": "(\\G(?=[0-9.])(?!0[xXbB]))([0-9](?:(?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)(?:((?<!')([eE])(\\+)?(\\-)?((?-mix:(?:[0-9](?:(?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)))))?(?:((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", + "captures": { + "2": { + "name": "constant.numeric.decimal.objcpp", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objcpp" + } + ] + }, + "3": { + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "5": { + "name": "keyword.other.unit.exponent.decimal.objcpp" + }, + "6": { + "name": "keyword.operator.plus.exponent.decimal.objcpp" + }, + "7": { + "name": "keyword.operator.minus.exponent.decimal.objcpp" + }, + "8": { + "name": "constant.numeric.exponent.decimal.objcpp", + "patterns": [ + { + "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", + "name": "punctuation.separator.constant.numeric.objcpp" + } + ] + }, + "9": { + "name": "keyword.other.unit.suffix.integer.objcpp" + } + } + }, + { + "match": "(?:(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))+", + "name": "invalid.illegal.constant.numeric.objcpp" + } + ] + } + } + }, + "comment": { + "patterns": [ + { + "begin": "/\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.objcpp" + } + }, + "end": "\\*/", + "name": "comment.block.objcpp" + }, + { + "begin": "(^[ \\t]+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.objcpp" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.objcpp" + } + }, + "end": "\\n", + "name": "comment.line.double-slash.objcpp", + "patterns": [ + { + "match": "(?>\\\\\\s*\\n)", + "name": "punctuation.separator.continuation.objcpp" + } + ] + } + ] + } + ] + }, + "cpp_lang": { + "patterns": [ + { + "include": "#special_block" + }, + { + "include": "#strings" + }, + { + "match": "\\b(friend|explicit|virtual|override|final|noexcept)\\b", + "name": "storage.modifier.objcpp" + }, + { + "match": "\\b(private:|protected:|public:)", + "name": "storage.type.modifier.access.objcpp" + }, + { + "match": "\\b(catch|try|throw|using)\\b", + "name": "keyword.control.objcpp" + }, + { + "match": "\\bdelete\\b(\\s*\\[\\])?|\\bnew\\b(?!])", + "name": "keyword.control.objcpp" + }, + { + "match": "\\b(f|m)[A-Z]\\w*\\b", + "name": "variable.other.readwrite.member.objcpp" + }, + { + "match": "\\bthis\\b", + "name": "variable.language.this.objcpp" + }, + { + "match": "\\bnullptr\\b", + "name": "constant.language.objcpp" + }, + { + "include": "#template_definition" + }, + { + "match": "\\btemplate\\b\\s*", + "name": "storage.type.template.objcpp" + }, + { + "match": "\\b(const_cast|dynamic_cast|reinterpret_cast|static_cast)\\b\\s*", + "name": "keyword.operator.cast.objcpp" + }, + { + "name": "punctuation.separator.namespace.access.objcpp", + "match": "((?:[a-zA-Z_][a-zA-Z_0-9]*::)*)([a-zA-Z_][a-zA-Z_0-9]*)(::)", + "captures": { + "1": { + "name": "entity.scope.objcpp" + }, + "2": { + "name": "entity.scope.name.objcpp" + }, + "3": { + "name": "punctuation.separator.namespace.access.objcpp" + } + } + }, + { + "match": "\\b(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\b", + "name": "keyword.operator.objcpp" + }, + { + "match": "\\b(decltype|wchar_t|char16_t|char32_t)\\b", + "name": "storage.type.objcpp" + }, + { + "match": "\\b(constexpr|export|mutable|typename|thread_local)\\b", + "name": "storage.modifier.objcpp" + }, + { + "begin": "(?x)\n(?:\n ^ | # beginning of line\n (?:(?<!else|new|=)) # or word + space before name\n)\n((?:[A-Za-z_][A-Za-z0-9_]*::)*+~[A-Za-z_][A-Za-z0-9_]*) # actual name\n\\s*(\\() # opening bracket", + "beginCaptures": { + "1": { + "name": "entity.name.function.objcpp" + }, + "2": { + "name": "punctuation.definition.parameters.begin.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.objcpp" + } + }, + "name": "meta.function.destructor.objcpp", + "patterns": [ + { + "include": "$base" + } + ] + }, + { + "begin": "(?x)\n(?:\n ^ | # beginning of line\n (?:(?<!else|new|=)) # or word + space before name\n)\n((?:[A-Za-z_][A-Za-z0-9_]*::)*+~[A-Za-z_][A-Za-z0-9_]*) # actual name\n\\s*(\\() # opening bracket", + "beginCaptures": { + "1": { + "name": "entity.name.function.objcpp" + }, + "2": { + "name": "punctuation.definition.parameters.begin.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.objcpp" + } + }, + "name": "meta.function.destructor.prototype.objcpp", + "patterns": [ + { + "include": "$base" + } + ] + }, + { + "include": "#c_lang" + } + ], + "repository": { + "template_definition": { + "begin": "\\b(template)\\s*(<)\\s*", + "beginCaptures": { + "1": { + "name": "storage.type.template.objcpp" + }, + "2": { + "name": "meta.template.angle-brackets.start.objcpp" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "meta.template.angle-brackets.end.objcpp" + } + }, + "name": "template.definition.objcpp", + "patterns": [ + { + "include": "#template_definition_argument" + } + ] + }, + "template_definition_argument": { + "match": "\\s*(?:([a-zA-Z_][a-zA-Z_0-9]*\\s*)|((?:[a-zA-Z_][a-zA-Z_0-9]*\\s+)*)([a-zA-Z_][a-zA-Z_0-9]*)|([a-zA-Z_][a-zA-Z_0-9]*)\\s*(\\.\\.\\.)\\s*([a-zA-Z_][a-zA-Z_0-9]*)|((?:[a-zA-Z_][a-zA-Z_0-9]*\\s+)*)([a-zA-Z_][a-zA-Z_0-9]*)\\s*(=)\\s*(\\w+))(,|(?=>))", + "captures": { + "1": { + "name": "storage.type.template.objcpp" + }, + "2": { + "name": "storage.type.template.objcpp" + }, + "3": { + "name": "entity.name.type.template.objcpp" + }, + "4": { + "name": "storage.type.template.objcpp" + }, + "5": { + "name": "meta.template.operator.ellipsis.objcpp" + }, + "6": { + "name": "entity.name.type.template.objcpp" + }, + "7": { + "name": "storage.type.template.objcpp" + }, + "8": { + "name": "entity.name.type.template.objcpp" + }, + "9": { + "name": "keyword.operator.assignment.objcpp" + }, + "10": { + "name": "constant.language.objcpp" + }, + "11": { + "name": "meta.template.operator.comma.objcpp" + } + } + }, + "angle_brackets": { + "begin": "<", + "end": ">", + "name": "meta.angle-brackets.objcpp", + "patterns": [ + { + "include": "#angle_brackets" + }, + { + "include": "$base" + } + ] + }, + "block": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objcpp" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.objcpp" + } + }, + "name": "meta.block.objcpp", + "patterns": [ + { + "captures": { + "1": { + "name": "support.function.any-method.objcpp" + }, + "2": { + "name": "punctuation.definition.parameters.objcpp" + } + }, + "match": "(?x)\n(\n (?!while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\n (?:\\b[A-Za-z_][A-Za-z0-9_]*+\\b|::)*+ # actual name\n)\n\\s*(\\() # opening bracket", + "name": "meta.function-call.objcpp" + }, + { + "include": "$base" + } + ] + }, + "constructor": { + "patterns": [ + { + "begin": "(?x)\n(?:^\\s*) # beginning of line\n((?!while|for|do|if|else|switch|catch|enumerate|r?iterate)[A-Za-z_][A-Za-z0-9_:]*) # actual name\n\\s*(\\() # opening bracket", + "beginCaptures": { + "1": { + "name": "entity.name.function.constructor.objcpp" + }, + "2": { + "name": "punctuation.definition.parameters.begin.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.objcpp" + } + }, + "name": "meta.function.constructor.objcpp", + "patterns": [ + { + "include": "#probably_a_parameter" + }, + { + "include": "#function-innards" + } + ] + }, + { + "begin": "(?x)\n(:)\n(\n (?=\n \\s*[A-Za-z_][A-Za-z0-9_:]* # actual name\n \\s* (\\() # opening bracket\n )\n)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.parameters.objcpp" + } + }, + "end": "(?=\\{)", + "name": "meta.function.constructor.initializer-list.objcpp", + "patterns": [ + { + "include": "$base" + } + ] + } + ] + }, + "special_block": { + "patterns": [ + { + "begin": "\\b(using)\\b\\s*(namespace)\\b\\s*((?:[_A-Za-z][_A-Za-z0-9]*\\b(::)?)*)", + "beginCaptures": { + "1": { + "name": "keyword.control.objcpp" + }, + "2": { + "name": "storage.type.namespace.objcpp" + }, + "3": { + "name": "entity.name.type.objcpp" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.terminator.statement.objcpp" + } + }, + "name": "meta.using-namespace-declaration.objcpp" + }, + { + "begin": "\\b(namespace)\\b\\s*([_A-Za-z][_A-Za-z0-9]*\\b)?+", + "beginCaptures": { + "1": { + "name": "storage.type.namespace.objcpp" + }, + "2": { + "name": "entity.name.type.objcpp" + } + }, + "captures": { + "1": { + "name": "keyword.control.namespace.$2.objcpp" + } + }, + "end": "(?<=\\})|(?=(;|,|\\(|\\)|>|\\[|\\]|=))", + "name": "meta.namespace-block.objcpp", + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.scope.objcpp" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.scope.objcpp" + } + }, + "patterns": [ + { + "include": "#special_block" + }, + { + "include": "#constructor" + }, + { + "include": "$base" + } + ] + }, + { + "include": "$base" + } + ] + }, + { + "begin": "\\b(?:(class)|(struct))\\b\\s*([_A-Za-z][_A-Za-z0-9]*\\b)?+(\\s*:\\s*(public|protected|private)\\s*([_A-Za-z][_A-Za-z0-9]*\\b)((\\s*,\\s*(public|protected|private)\\s*[_A-Za-z][_A-Za-z0-9]*\\b)*))?", + "beginCaptures": { + "1": { + "name": "storage.type.class.objcpp" + }, + "2": { + "name": "storage.type.struct.objcpp" + }, + "3": { + "name": "entity.name.type.objcpp" + }, + "5": { + "name": "storage.type.modifier.access.objcpp" + }, + "6": { + "name": "entity.name.type.inherited.objcpp" + }, + "7": { + "patterns": [ + { + "match": "(public|protected|private)", + "name": "storage.type.modifier.access.objcpp" + }, + { + "match": "[_A-Za-z][_A-Za-z0-9]*", + "name": "entity.name.type.inherited.objcpp" + } + ] + } + }, + "end": "(?<=\\})|(?=(;|\\(|\\)|>|\\[|\\]|=))", + "name": "meta.class-struct-block.objcpp", + "patterns": [ + { + "include": "#angle_brackets" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objcpp" + } + }, + "end": "(\\})(\\s*\\n)?", + "endCaptures": { + "1": { + "name": "punctuation.section.block.end.bracket.curly.objcpp" + }, + "2": { + "name": "invalid.illegal.you-forgot-semicolon.objcpp" + } + }, + "patterns": [ + { + "include": "#special_block" + }, + { + "include": "#constructor" + }, + { + "include": "$base" + } + ] + }, + { + "include": "$base" + } + ] + }, + { + "begin": "\\b(extern)(?=\\s*\")", + "beginCaptures": { + "1": { + "name": "storage.modifier.objcpp" + } + }, + "end": "(?<=\\})|(?=\\w)|(?=\\s*#\\s*endif\\b)", + "name": "meta.extern-block.objcpp", + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objcpp" + } + }, + "end": "\\}|(?=\\s*#\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.objcpp" + } + }, + "patterns": [ + { + "include": "#special_block" + }, + { + "include": "$base" + } + ] + }, + { + "include": "$base" + } + ] + } + ] + }, + "strings": { + "patterns": [ + { + "begin": "(u|u8|U|L)?\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + }, + "1": { + "name": "meta.encoding.objcpp" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.double.objcpp", + "patterns": [ + { + "match": "\\\\u\\h{4}|\\\\U\\h{8}", + "name": "constant.character.escape.objcpp" + }, + { + "match": "\\\\['\"?\\\\abfnrtv]", + "name": "constant.character.escape.objcpp" + }, + { + "match": "\\\\[0-7]{1,3}", + "name": "constant.character.escape.objcpp" + }, + { + "match": "\\\\x\\h+", + "name": "constant.character.escape.objcpp" + }, + { + "include": "#string_placeholder" + } + ] + }, + { + "begin": "(u|u8|U|L)?R\"(?:([^ ()\\\\\\t]{0,16})|([^ ()\\\\\\t]*))\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + }, + "1": { + "name": "meta.encoding.objcpp" + }, + "3": { + "name": "invalid.illegal.delimiter-too-long.objcpp" + } + }, + "end": "\\)\\2(\\3)\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + }, + "1": { + "name": "invalid.illegal.delimiter-too-long.objcpp" + } + }, + "name": "string.quoted.double.raw.objcpp" + } + ] + } + } + }, + "cpp_lang_newish": { + "patterns": [ + { + "include": "#special_block" + }, + { + "match": "(?-mix:##[a-zA-Z_]\\w*(?!\\w))", + "name": "variable.other.macro.argument.objcpp" + }, + { + "include": "#strings" + }, + { + "match": "(?<!\\w)((?:inline|constexpr|mutable|friend|explicit|virtual))(?!\\w)", + "name": "storage.modifier.specificer.functional.pre-parameters.$1.objcpp" + }, + { + "match": "(?<!\\w)((?:final|override|volatile|const|noexcept))(?!\\w)(?=\\s*(?:(?:(?:(?:\\{|;))|[\\n\\r])))", + "name": "storage.modifier.specifier.functional.post-parameters.$1.objcpp" + }, + { + "match": "(?<!\\w)((?:const|static|volatile|register|restrict|extern))(?!\\w)", + "name": "storage.modifier.specifier.$1.objcpp" + }, + { + "match": "(?<!\\w)((?:private|protected|public)) *:", + "name": "storage.type.modifier.access.control.$1.objcpp" + }, + { + "match": "(?<!\\w)(?:throw|try|catch)(?!\\w)", + "name": "keyword.control.exception.$1.objcpp" + }, + { + "match": "(?<!\\w)(using|typedef)(?!\\w)", + "name": "keyword.other.$1.objcpp" + }, + { + "include": "#memory_operators" + }, + { + "match": "\\bthis\\b", + "name": "variable.language.this.objcpp" + }, + { + "include": "#constants" + }, + { + "include": "#template_definition" + }, + { + "match": "\\btemplate\\b\\s*", + "name": "storage.type.template.objcpp" + }, + { + "match": "\\b(const_cast|dynamic_cast|reinterpret_cast|static_cast)\\b\\s*", + "name": "keyword.operator.cast.$1.objcpp" + }, + { + "include": "#scope_resolution" + }, + { + "match": "\\b(decltype|wchar_t|char16_t|char32_t)\\b", + "name": "storage.type.objcpp" + }, + { + "match": "\\b(constexpr|export|mutable|typename|thread_local)\\b", + "name": "storage.modifier.objcpp" + }, + { + "begin": "(?x)\n(?:\n ^ | # beginning of line\n (?:(?<!else|new|=)) # or word + space before name\n)\n((?:[A-Za-z_][A-Za-z0-9_]*::)*+~[A-Za-z_][A-Za-z0-9_]*) # actual name\n\\s*(\\() # opening bracket", + "beginCaptures": { + "1": { + "name": "entity.name.function.destructor.objcpp" + }, + "2": { + "name": "punctuation.definition.parameters.begin.destructor.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.destructor.objcpp" + } + }, + "name": "meta.function.destructor.objcpp", + "patterns": [ + { + "include": "$base" + } + ] + }, + { + "begin": "(?x)\n(?:\n ^ | # beginning of line\n (?:(?<!else|new|=)) # or word + space before name\n)\n((?:[A-Za-z_][A-Za-z0-9_]*::)*+~[A-Za-z_][A-Za-z0-9_]*) # actual name\n\\s*(\\() # opening bracket", + "beginCaptures": { + "1": { + "name": "entity.name.function.objcpp" + }, + "2": { + "name": "punctuation.definition.parameters.begin.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.objcpp" + } + }, + "name": "meta.function.destructor.prototype.objcpp", + "patterns": [ + { + "include": "$base" + } + ] + }, + { + "include": "#preprocessor-rule-enabled" + }, + { + "include": "#preprocessor-rule-disabled" + }, + { + "include": "#preprocessor-rule-conditional" + }, + { + "include": "#comments-c" + }, + { + "match": "\\b(break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while)\\b", + "name": "keyword.control.$1.objcpp" + }, + { + "include": "#storage_types_c" + }, + { + "match": "\\b(const|extern|register|restrict|static|volatile|inline)\\b", + "name": "storage.modifier.objcpp" + }, + { + "include": "#operators" + }, + { + "include": "#operator_overload" + }, + { + "include": "#number_literal" + }, + { + "include": "#strings-c" + }, + { + "begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+\t# define\n((?<id>[a-zA-Z_$][\\w$]*))\t # macro name\n(?:\n (\\()\n\t(\n\t \\s* \\g<id> \\s*\t\t # first argument\n\t ((,) \\s* \\g<id> \\s*)* # additional arguments\n\t (?:\\.\\.\\.)?\t\t\t# varargs ellipsis?\n\t)\n (\\))\n)?", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.define.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + }, + "3": { + "name": "entity.name.function.preprocessor.objcpp" + }, + "5": { + "name": "punctuation.definition.parameters.begin.objcpp" + }, + "6": { + "name": "variable.parameter.preprocessor.objcpp" + }, + "8": { + "name": "punctuation.separator.parameters.objcpp" + }, + "9": { + "name": "punctuation.definition.parameters.end.objcpp" + } + }, + "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.macro.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-define-line-contents" + } + ] + }, + { + "begin": "^\\s*((#)\\s*(error|warning))\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.diagnostic.$3.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.diagnostic.objcpp", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": "\"|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.double.objcpp", + "patterns": [ + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": "'|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.single.objcpp", + "patterns": [ + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "[^'\"]", + "end": "(?<!\\\\)(?=\\s*\\n)", + "name": "string.unquoted.single.objcpp", + "patterns": [ + { + "include": "#line_continuation_character" + }, + { + "include": "#comments-c" + } + ] + } + ] + }, + { + "begin": "^\\s*((#)\\s*(include(?:_next)?|import))\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.$3.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.include.objcpp", + "patterns": [ + { + "include": "#line_continuation_character" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.double.include.objcpp" + }, + { + "begin": "<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.other.lt-gt.include.objcpp" + } + ] + }, + { + "include": "#pragma-mark" + }, + { + "begin": "^\\s*((#)\\s*line)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.line.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#strings-c" + }, + { + "include": "#number_literal" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "^\\s*(?:((#)\\s*undef))\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.undef.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "match": "[a-zA-Z_$][\\w$]*", + "name": "entity.name.function.preprocessor.objcpp" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "^\\s*(?:((#)\\s*pragma))\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.pragma.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.pragma.objcpp", + "patterns": [ + { + "include": "#strings-c" + }, + { + "match": "[a-zA-Z_$][\\w\\-$]*", + "name": "entity.other.attribute-name.pragma.preprocessor.objcpp" + }, + { + "include": "#number_literal" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "match": "\\b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\b", + "name": "support.type.sys-types.objcpp" + }, + { + "match": "\\b(pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t)\\b", + "name": "support.type.pthread.objcpp" + }, + { + "match": "(?x) \\b\n(int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t\n|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t\n|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t\n|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t\n|uintmax_t|uintmax_t)\n\\b", + "name": "support.type.stdint.objcpp" + }, + { + "match": "(?<!\\w)[a-zA-Z_](?:\\w)*_t(?!\\w)", + "name": "support.type.posix-reserved.objcpp" + }, + { + "include": "#block-c" + }, + { + "include": "#parens-c" + }, + { + "begin": "(?<!\\w)(?!\\s*(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|auto|void|char|short|int|signed|unsigned|long|float|double|bool|wchar_t|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|NULL|true|false|nullptr|class|struct|union|enum|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized)\\s*\\()(?=[a-zA-Z_]\\w*\\s*\\()", + "end": "(?<=\\))", + "name": "meta.function.definition.objcpp", + "patterns": [ + { + "include": "#function-innards-c" + } + ] + }, + { + "include": "#line_continuation_character" + }, + { + "name": "meta.bracket.square.access.objcpp", + "begin": "([a-zA-Z_][a-zA-Z_0-9]*|(?<=[\\]\\)]))?(\\[)(?!\\])", + "beginCaptures": { + "1": { + "name": "variable.other.object.objcpp" + }, + "2": { + "name": "punctuation.definition.begin.bracket.square.objcpp" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.end.bracket.square.objcpp" + } + }, + "patterns": [ + { + "include": "#function-call-innards-c" + } + ] + }, + { + "name": "storage.modifier.array.bracket.square.objcpp", + "match": "(?-mix:(?<!delete))\\\\[\\\\s*\\\\]" + }, + { + "match": ";", + "name": "punctuation.terminator.statement.objcpp" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.objcpp" + } + ], + "repository": { + "literal_numeric_seperator": { + "match": "(?<!')'(?!')", + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "number_literal": { + "match": "((?<!\\w)(?:(?:(?:(0[xX])(?:([0-9a-fA-F](?:(?:(?:[0-9a-fA-F]|((?<!')'(?!')))))*))?((?:(?:(?<=[0-9a-fA-F])\\.|\\.(?=[0-9a-fA-F]))))(?:([0-9a-fA-F](?:(?:(?:[0-9a-fA-F]|((?<!')'(?!')))))*))?(?:([pP])(\\+)?(\\-)?((?:[0-9](?:(?:(?:[0-9]|(?:(?<!')'(?!')))))*)))?|(?:([0-9](?:(?:(?:[0-9]|((?<!')'(?!')))))*))?((?:(?:(?<=[0-9])\\.|\\.(?=[0-9]))))(?:([0-9](?:(?:(?:[0-9]|((?<!')'(?!')))))*))?(?:([eE])(\\+)?(\\-)?((?:[0-9](?:(?:(?:[0-9]|(?:(?<!')'(?!')))))*)))?)(?:([lLfF](?!\\w)))?|(?:(?:(?:(?:(?:(0[bB])((?:(?:(?:[01]|((?<!')'(?!')))))+)|(0)((?:(?:(?:[0-7]|((?<!')'(?!')))))+)))|(0[xX])([0-9a-fA-F](?:(?:(?:[0-9a-fA-F]|((?<!')'(?!')))))*)(?:([pP])(\\+)?(\\-)?((?:[0-9](?:(?:(?:[0-9]|(?:(?<!')'(?!')))))*)))?))|([0-9](?:(?:(?:[0-9]|((?<!')'(?!')))))*)(?:([eE])(\\+)?(\\-)?((?:[0-9](?:(?:(?:[0-9]|(?:(?<!')'(?!')))))*)))?)(?:((?:(?:(?:(?:(?:(?:(?:(?:(?:(?:(?:(?:LL[uU]|ll[uU]))|[uU]LL))|[uU]ll))|ll))|LL))|[uUlL]))(?!\\w)))?))(\\w*))", + "captures": { + "2": { + "name": "keyword.other.unit.hexadecimal.objcpp" + }, + "3": { + "name": "constant.numeric.hexadecimal.objcpp", + "patterns": [ + { + "include": "#literal_numeric_seperator" + } + ] + }, + "4": { + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "5": { + "name": "constant.numeric.hexadecimal.objcpp" + }, + "6": { + "name": "constant.numeric.hexadecimal.objcpp", + "patterns": [ + { + "include": "#literal_numeric_seperator" + } + ] + }, + "7": { + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "8": { + "name": "keyword.other.unit.exponent.hexadecimal.objcpp" + }, + "9": { + "name": "keyword.operator.plus.exponent.hexadecimal.objcpp" + }, + "10": { + "name": "keyword.operator.minus.exponent.hexadecimal.objcpp" + }, + "11": { + "name": "constant.numeric.exponent.hexadecimal.objcpp", + "patterns": [ + { + "include": "#literal_numeric_seperator" + } + ] + }, + "12": { + "name": "constant.numeric.decimal.objcpp", + "patterns": [ + { + "include": "#literal_numeric_seperator" + } + ] + }, + "13": { + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "14": { + "name": "constant.numeric.decimal.point.objcpp" + }, + "15": { + "name": "constant.numeric.decimal.objcpp", + "patterns": [ + { + "include": "#literal_numeric_seperator" + } + ] + }, + "16": { + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "17": { + "name": "keyword.other.unit.exponent.decimal.objcpp" + }, + "18": { + "name": "keyword.operator.plus.exponent.decimal.objcpp" + }, + "19": { + "name": "keyword.operator.minus.exponent.decimal.objcpp" + }, + "20": { + "name": "constant.numeric.exponent.decimal.objcpp", + "patterns": [ + { + "include": "#literal_numeric_seperator" + } + ] + }, + "21": { + "name": "keyword.other.unit.suffix.floating-point.objcpp" + }, + "22": { + "name": "keyword.other.unit.binary.objcpp" + }, + "23": { + "name": "constant.numeric.binary.objcpp", + "patterns": [ + { + "include": "#literal_numeric_seperator" + } + ] + }, + "24": { + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "25": { + "name": "keyword.other.unit.octal.objcpp" + }, + "26": { + "name": "constant.numeric.octal.objcpp", + "patterns": [ + { + "include": "#literal_numeric_seperator" + } + ] + }, + "27": { + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "28": { + "name": "keyword.other.unit.hexadecimal.objcpp" + }, + "29": { + "name": "constant.numeric.hexadecimal.objcpp", + "patterns": [ + { + "include": "#literal_numeric_seperator" + } + ] + }, + "30": { + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "31": { + "name": "keyword.other.unit.exponent.hexadecimal.objcpp" + }, + "32": { + "name": "keyword.operator.plus.exponent.hexadecimal.objcpp" + }, + "33": { + "name": "keyword.operator.minus.exponent.hexadecimal.objcpp" + }, + "34": { + "name": "constant.numeric.exponent.hexadecimal.objcpp", + "patterns": [ + { + "include": "#literal_numeric_seperator" + } + ] + }, + "35": { + "name": "constant.numeric.decimal.objcpp", + "patterns": [ + { + "include": "#literal_numeric_seperator" + } + ] + }, + "36": { + "name": "punctuation.separator.constant.numeric.objcpp" + }, + "37": { + "name": "keyword.other.unit.exponent.decimal.objcpp" + }, + "38": { + "name": "keyword.operator.plus.exponent.decimal.objcpp" + }, + "39": { + "name": "keyword.operator.minus.exponent.decimal.objcpp" + }, + "40": { + "name": "constant.numeric.exponent.decimal.objcpp", + "patterns": [ + { + "include": "#literal_numeric_seperator" + } + ] + }, + "41": { + "name": "keyword.other.unit.suffix.integer.objcpp" + }, + "42": { + "name": "keyword.other.unit.user-defined.objcpp" + } + } + }, + "constants": { + "match": "(?<!\\w)(?:NULL|true|false|nullptr)(?!\\w)", + "name": "constant.language.objcpp" + }, + "storage_types_c": { + "patterns": [ + { + "match": "(?<!\\w)(?:auto|void|char|short|int|signed|unsigned|long|float|double|bool|wchar_t)(?!\\w)", + "name": "storage.type.primitive.objcpp" + }, + { + "match": "(?<!\\w)(?:u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t)(?!\\w)", + "name": "storage.type.objcpp" + }, + { + "match": "(?<!\\w)(asm|__asm__|enum|union|struct)(?!\\w)", + "name": "storage.type.$1.objcpp" + } + ] + }, + "memory_operators": { + "match": "(?<!\\w)(?:(?:(delete)\\s*(\\[\\])|(delete))|(new))(?!\\w)", + "captures": { + "1": { + "name": "keyword.operator.memory.delete.array.objcpp" + }, + "2": { + "name": "keyword.operator.memory.delete.array.bracket.objcpp" + }, + "3": { + "name": "keyword.operator.memory.delete.objcpp" + }, + "4": { + "name": "keyword.operator.memory.new.objcpp" + } + }, + "name": "keyword.operator.memory.objcpp" + }, + "template_call_innards": { + "match": "<(?:[\\s<>,\\w])*>\\s*", + "captures": { + "0": { + "name": "meta.template.call.objcpp", + "patterns": [ + { + "include": "#storage_types_c" + }, + { + "include": "#constants" + }, + { + "include": "#scope_resolution" + }, + { + "match": "(?<!\\w)[a-zA-Z_]\\w*(?!\\w)", + "name": "storage.type.user-defined.objcpp" + }, + { + "include": "#operators" + }, + { + "include": "#number_literal" + }, + { + "include": "#strings" + }, + { + "match": ",", + "name": "punctuation.separator.comma.template.argument.objcpp" + } + ] + } + } + }, + "template_definition": { + "name": "meta.template.definition.objcpp", + "begin": "(?-mix:(?<!\\w)(template)\\s*(<))", + "beginCaptures": { + "1": { + "name": "storage.type.template.objcpp" + }, + "2": { + "name": "punctuation.section.angle-brackets.start.template.definition.objcpp" + } + }, + "end": "(?-mix:(>))", + "endCaptures": { + "1": { + "name": "punctuation.section.angle-brackets.end.template.definition.objcpp" + } + }, + "patterns": [ + { + "include": "#scope_resolution" + }, + { + "include": "#template_definition_argument" + }, + { + "include": "#template_call_innards" + } + ] + }, + "template_definition_argument": { + "match": "((?:(?:(?:(?:(?:(?:\\s*([a-zA-Z_]\\w*)|((?:[a-zA-Z_]\\w*\\s+)+)([a-zA-Z_]\\w*)))|([a-zA-Z_]\\w*)\\s*(\\.\\.\\.)\\s*([a-zA-Z_]\\w*)))|((?:[a-zA-Z_]\\w*\\s+)*)([a-zA-Z_]\\w*)\\s*([=])\\s*(\\w+)))\\s*(?:(?:(,)|(?=>))))", + "captures": { + "2": { + "name": "storage.type.template.argument.$1.objcpp" + }, + "3": { + "name": "storage.type.template.argument.$2.objcpp" + }, + "4": { + "name": "entity.name.type.template.objcpp" + }, + "5": { + "name": "storage.type.template.objcpp" + }, + "6": { + "name": "keyword.operator.ellipsis.template.definition.objcpp" + }, + "7": { + "name": "entity.name.type.template.objcpp" + }, + "8": { + "name": "storage.type.template.objcpp" + }, + "9": { + "name": "entity.name.type.template.objcpp" + }, + "10": { + "name": "keyword.operator.assignment.objcpp" + }, + "11": { + "name": "constant.other.objcpp" + }, + "12": { + "name": "punctuation.separator.comma.template.argument.objcpp" + } + } + }, + "scope_resolution": { + "match": "((?:[a-zA-Z_]\\w*\\s*(?:(?:<(?:[\\s<>,\\w])*>\\s*))?::)*\\s*)([a-zA-Z_]\\w*)\\s*((?:<(?:[\\s<>,\\w])*>\\s*))?(::)", + "captures": { + "1": { + "patterns": [ + { + "include": "#scope_resolution" + } + ] + }, + "2": { + "name": "entity.name.namespace.scope-resolution.objcpp" + }, + "3": { + "patterns": [ + { + "include": "#template_call_innards" + } + ] + }, + "4": { + "name": "punctuation.separator.namespace.access.objcpp" + } + }, + "name": "meta.scope-resolution.objcpp" + }, + "angle_brackets": { + "begin": "<", + "end": ">", + "name": "meta.angle-brackets.objcpp", + "patterns": [ + { + "include": "#angle_brackets" + }, + { + "include": "$base" + } + ] + }, + "block": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objcpp" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.objcpp" + } + }, + "name": "meta.block.objcpp", + "patterns": [ + { + "captures": { + "1": { + "name": "support.function.any-method.objcpp" + }, + "2": { + "name": "punctuation.definition.parameters.objcpp" + } + }, + "match": "(?x)\n(\n (?!while|for|do|if|else|switch|catch|return)\n (?:\\b[A-Za-z_][A-Za-z0-9_]*+\\b|::)*+ # actual name\n)\n\\s*(\\() # opening bracket", + "name": "meta.function-call.objcpp" + }, + { + "include": "$base" + } + ] + }, + "constructor": { + "patterns": [ + { + "begin": "(?x)\n(?:^\\s*) # beginning of line\n((?!while|for|do|if|else|switch|catch)[A-Za-z_][A-Za-z0-9_:]*) # actual name\n\\s*(\\() # opening bracket", + "beginCaptures": { + "1": { + "name": "entity.name.function.constructor.objcpp" + }, + "2": { + "name": "punctuation.definition.parameters.begin.constructor.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.constructor.objcpp" + } + }, + "name": "meta.function.constructor.objcpp", + "patterns": [ + { + "include": "#probably_a_parameter" + }, + { + "include": "#function-innards-c" + } + ] + }, + { + "begin": "(?x)\n(:)\n(\n (?=\n \\s*[A-Za-z_][A-Za-z0-9_:]* # actual name\n \\s* (\\() # opening bracket\n )\n)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.initializer-list.parameters.objcpp" + } + }, + "end": "(?=\\{)", + "name": "meta.function.constructor.initializer-list.objcpp", + "patterns": [ + { + "include": "$base" + } + ] + } + ] + }, + "special_block": { + "patterns": [ + { + "comment": "https://en.cppreference.com/w/cpp/language/namespace", + "begin": "\\b(using)\\s+(namespace)\\s+(?:((?:[a-zA-Z_]\\w*\\s*(?:(?:<(?:[\\s<>,\\w])*>\\s*))?::)*)\\s*)?((?<!\\w)[a-zA-Z_]\\w*(?!\\w))(?=;|\\n)", + "beginCaptures": { + "1": { + "name": "keyword.other.using.directive.objcpp" + }, + "2": { + "name": "keyword.other.namespace.directive.objcpp storage.type.namespace.directive.objcpp" + }, + "3": { + "patterns": [ + { + "include": "#scope_resolution" + } + ] + }, + "4": { + "name": "entity.name.namespace.objcpp" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.terminator.statement.objcpp" + } + }, + "name": "meta.using-namespace-declaration.objcpp" + }, + { + "begin": "(?<!\\w)(namespace)\\s+(?:(?:((?:[a-zA-Z_]\\w*\\s*(?:(?:<(?:[\\s<>,\\w])*>\\s*))?::)*[a-zA-Z_]\\w*)|(?={)))", + "beginCaptures": { + "1": { + "name": "keyword.other.namespace.definition.objcpp storage.type.namespace.definition.objcpp" + }, + "2": { + "patterns": [ + { + "match": "(?-mix:(?<!\\w)[a-zA-Z_]\\w*(?!\\w))", + "name": "entity.name.type.objcpp" + }, + { + "match": "::", + "name": "punctuation.separator.namespace.access.objcpp" + } + ] + } + }, + "end": "(?<=\\})|(?=(;|,|\\(|\\)|>|\\[|\\]|=))", + "name": "meta.namespace-block.objcpp", + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.scope.objcpp" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.scope.objcpp" + } + }, + "patterns": [ + { + "include": "#special_block" + }, + { + "include": "#constructor" + }, + { + "include": "$base" + } + ] + }, + { + "include": "$base" + } + ] + }, + { + "begin": "\\b(?:(class)|(struct))\\b\\s*([_A-Za-z][_A-Za-z0-9]*\\b)?+(\\s*:\\s*(public|protected|private)\\s*([_A-Za-z][_A-Za-z0-9]*\\b)((\\s*,\\s*(public|protected|private)\\s*[_A-Za-z][_A-Za-z0-9]*\\b)*))?", + "beginCaptures": { + "1": { + "name": "storage.type.class.objcpp" + }, + "2": { + "name": "storage.type.struct.objcpp" + }, + "3": { + "name": "entity.name.type.objcpp" + }, + "5": { + "name": "storage.type.modifier.access.objcpp" + }, + "6": { + "name": "entity.name.type.inherited.objcpp" + }, + "7": { + "patterns": [ + { + "match": "(public|protected|private)", + "name": "storage.type.modifier.access.objcpp" + }, + { + "match": "[_A-Za-z][_A-Za-z0-9]*", + "name": "entity.name.type.inherited.objcpp" + } + ] + } + }, + "end": "(?<=\\})|(;)|(?=(\\(|\\)|>|\\[|\\]|=))", + "endCaptures": { + "1": { + "name": "punctuation.terminator.statement.objcpp" + } + }, + "name": "meta.class-struct-block.objcpp", + "patterns": [ + { + "include": "#angle_brackets" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objcpp" + } + }, + "end": "(\\})(\\s*\\n)?", + "endCaptures": { + "1": { + "name": "punctuation.section.block.end.bracket.curly.objcpp" + }, + "2": { + "name": "invalid.illegal.you-forgot-semicolon.objcpp" + } + }, + "patterns": [ + { + "include": "#special_block" + }, + { + "include": "#constructor" + }, + { + "include": "$base" + } + ] + }, + { + "include": "$base" + } + ] + }, + { + "begin": "\\b(extern)(?=\\s*\")", + "beginCaptures": { + "1": { + "name": "storage.modifier.objcpp" + } + }, + "end": "(?<=\\})|(?=\\w)|(?=\\s*#\\s*endif\\b)", + "name": "meta.extern-block.objcpp", + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objcpp" + } + }, + "end": "\\}|(?=\\s*#\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.objcpp" + } + }, + "patterns": [ + { + "include": "#special_block" + }, + { + "include": "$base" + } + ] + }, + { + "include": "$base" + } + ] + } + ] + }, + "strings": { + "patterns": [ + { + "begin": "(u|u8|U|L)?\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + }, + "1": { + "name": "meta.encoding.objcpp" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.double.objcpp", + "patterns": [ + { + "match": "\\\\u\\h{4}|\\\\U\\h{8}", + "name": "constant.character.escape.objcpp" + }, + { + "match": "\\\\['\"?\\\\abfnrtv]", + "name": "constant.character.escape.objcpp" + }, + { + "match": "\\\\[0-7]{1,3}", + "name": "constant.character.escape.objcpp" + }, + { + "match": "\\\\x\\h+", + "name": "constant.character.escape.objcpp" + }, + { + "include": "#string_placeholder-c" + } + ] + }, + { + "begin": "(u|u8|U|L)?R\"(?:([^ ()\\\\\\t]{0,16})|([^ ()\\\\\\t]*))\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + }, + "1": { + "name": "meta.encoding.objcpp" + }, + "3": { + "name": "invalid.illegal.delimiter-too-long.objcpp" + } + }, + "end": "\\)\\2(\\3)\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + }, + "1": { + "name": "invalid.illegal.delimiter-too-long.objcpp" + } + }, + "name": "string.quoted.double.raw.objcpp" + } + ] + }, + "probably_a_parameter": { + "match": "(?:(?:([a-zA-Z_]\\w*)\\s*(?==)|(?<=\\w\\s|\\*\\/|[&*>\\]\\)])\\s*([a-zA-Z_]\\w*)\\s*(?=(?:\\[\\]\\s*)?(?:(?:,|\\))))))", + "captures": { + "1": { + "name": "variable.parameter.probably.defaulted.objcpp" + }, + "2": { + "name": "variable.parameter.probably.objcpp" + } + } + }, + "operator_overload": { + "begin": "((?:[a-zA-Z_]\\w*\\s*(?:(?:<(?:[\\s<>,\\w])*>\\s*))?::)*)\\s*(operator)((?:(?:\\s*(?:\\+\\+|\\-\\-|\\(\\)|\\[\\]|\\->|\\+\\+|\\-\\-|\\+|\\-|!|~|\\*|&|\\->\\*|\\*|\\/|%|\\+|\\-|<<|>>|<=>|<|<=|>|>=|==|!=|&|\\^|\\||&&|\\|\\||=|\\+=|\\-=|\\*=|\\/=|%=|<<=|>>=|&=|\\^=|\\|=|,)|\\s+(?:(?:(?:new|new\\[\\]|delete|delete\\[\\])|(?:[a-zA-Z_]\\w*\\s*(?:(?:<(?:[\\s<>,\\w])*>\\s*))?::)*[a-zA-Z_]\\w*\\s*(?:&)?)))))\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.scope.objcpp" + }, + "2": { + "name": "keyword.other.operator.overload.objcpp" + }, + "3": { + "name": "entity.name.operator.overloadee.objcpp" + }, + "4": { + "name": "punctuation.section.parameters.begin.bracket.round.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parameters.end.bracket.round.objcpp" + } + }, + "name": "meta.function.definition.parameters.operator-overload.objcpp", + "patterns": [ + { + "include": "#probably_a_parameter" + }, + { + "include": "#function-innards-c" + } + ] + }, + "access-method": { + "name": "meta.function-call.member.objcpp", + "begin": "([a-zA-Z_][a-zA-Z_0-9]*|(?<=[\\]\\)]))\\s*(?:(\\.)|(->))((?:(?:[a-zA-Z_][a-zA-Z_0-9]*)\\s*(?:(?:\\.)|(?:->)))*)\\s*([a-zA-Z_][a-zA-Z_0-9]*)(\\()", + "beginCaptures": { + "1": { + "name": "variable.other.object.objcpp" + }, + "2": { + "name": "punctuation.separator.dot-access.objcpp" + }, + "3": { + "name": "punctuation.separator.pointer-access.objcpp" + }, + "4": { + "patterns": [ + { + "match": "\\.", + "name": "punctuation.separator.dot-access.objcpp" + }, + { + "match": "->", + "name": "punctuation.separator.pointer-access.objcpp" + }, + { + "match": "[a-zA-Z_][a-zA-Z_0-9]*", + "name": "variable.other.object.objcpp" + }, + { + "name": "everything.else.objcpp", + "match": ".+" + } + ] + }, + "5": { + "name": "entity.name.function.member.objcpp" + }, + "6": { + "name": "punctuation.section.arguments.begin.bracket.round.function.member.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.arguments.end.bracket.round.function.member.objcpp" + } + }, + "patterns": [ + { + "include": "#function-call-innards-c" + } + ] + }, + "access-member": { + "name": "variable.other.object.access.objcpp", + "match": "(?:(?:([a-zA-Z_]\\w*)|(?<=\\]|\\))))\\s*(?:(?:((?:(?:\\.|\\.\\*)))|((?:(?:->|->\\*)))))\\s*((?:[a-zA-Z_]\\w*\\s*(?:(?:\\.|->))\\s*)*)\\b(?!(?:auto|void|char|short|int|signed|unsigned|long|float|double|bool|wchar_t|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t))([a-zA-Z_]\\w*)\\b(?!\\()", + "captures": { + "1": { + "name": "variable.other.object.objcpp" + }, + "2": { + "name": "punctuation.separator.dot-access.objcpp" + }, + "3": { + "name": "punctuation.separator.pointer-access.objcpp" + }, + "4": { + "patterns": [ + { + "match": "\\.", + "name": "punctuation.separator.dot-access.objcpp" + }, + { + "match": "->", + "name": "punctuation.separator.pointer-access.objcpp" + }, + { + "match": "[a-zA-Z_]\\w*", + "name": "variable.other.object.objcpp" + }, + { + "match": ".+", + "name": "everything.else.objcpp" + } + ] + }, + "5": { + "name": "variable.other.member.objcpp" + } + } + }, + "block-c": { + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objcpp" + } + }, + "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.objcpp" + } + }, + "name": "meta.block.objcpp", + "patterns": [ + { + "include": "#block_innards-c" + } + ] + } + ] + }, + "block_innards-c": { + "patterns": [ + { + "include": "#preprocessor-rule-enabled-block" + }, + { + "include": "#preprocessor-rule-disabled-block" + }, + { + "include": "#preprocessor-rule-conditional-block" + }, + { + "include": "#access-method" + }, + { + "include": "#access-member" + }, + { + "include": "#c_function_call" + }, + { + "name": "meta.initialization.objcpp", + "begin": "(?x)\n(?:\n (?:\n\t(?=\\s)(?<!else|new|return)\n\t(?<=\\w) \\s+(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas) # or word + space before name\n )\n)\n(\n (?:[A-Za-z_][A-Za-z0-9_]*+ | :: )++ # actual name\n |\n (?:(?<=operator) (?:[-*&<>=+!]+ | \\(\\) | \\[\\]))\n)\n\\s*(\\() # opening bracket", + "beginCaptures": { + "1": { + "name": "variable.other.objcpp" + }, + "2": { + "name": "punctuation.section.parens.begin.bracket.round.initialization.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.initialization.objcpp" + } + }, + "patterns": [ + { + "include": "#function-call-innards-c" + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objcpp" + } + }, + "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.objcpp" + } + }, + "patterns": [ + { + "include": "#block_innards-c" + } + ] + }, + { + "include": "#parens-block-c" + }, + { + "include": "$base" + } + ] + }, + "c_function_call": { + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|return|typeid|alignof|alignas|sizeof|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(?=\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*(?:(?:<(?:[\\s<>,\\w])*>\\s*))?\\( # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", + "end": "(?<=\\))(?!\\w)", + "name": "meta.function-call.objcpp", + "patterns": [ + { + "include": "#function-call-innards-c" + } + ] + }, + "comments-c": { + "patterns": [ + { + "captures": { + "1": { + "name": "meta.toc-list.banner.block.objcpp" + } + }, + "match": "^/\\* =(\\s*.*?)\\s*= \\*/$\\n?", + "name": "comment.block.objcpp" + }, + { + "begin": "/\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.objcpp" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.objcpp" + } + }, + "name": "comment.block.objcpp" + }, + { + "captures": { + "1": { + "name": "meta.toc-list.banner.line.objcpp" + } + }, + "match": "^// =(\\s*.*?)\\s*=\\s*$\\n?", + "name": "comment.line.banner.objcpp" + }, + { + "begin": "(^[ \\t]+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.objcpp" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.objcpp" + } + }, + "end": "(?=\\n)", + "name": "comment.line.double-slash.objcpp", + "patterns": [ + { + "include": "#line_continuation_character" + } + ] + } + ] + } + ] + }, + "disabled": { + "begin": "^\\s*#\\s*if(n?def)?\\b.*$", + "end": "^\\s*#\\s*endif\\b", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + "line_continuation_character": { + "patterns": [ + { + "match": "(\\\\)\\n", + "captures": { + "1": { + "name": "constant.character.escape.line-continuation.objcpp" + } + } + } + ] + }, + "parens-c": { + "name": "punctuation.section.parens-c\b.objcpp", + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "$base" + } + ] + }, + "parens-block-c": { + "name": "meta.block.parens.objcpp", + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#block_innards-c" + }, + { + "match": "(?<!:):(?!:)", + "name": "punctuation.range-based.objcpp" + } + ] + }, + "pragma-mark": { + "captures": { + "1": { + "name": "meta.preprocessor.pragma.objcpp" + }, + "2": { + "name": "keyword.control.directive.pragma.pragma-mark.objcpp" + }, + "3": { + "name": "punctuation.definition.directive.objcpp" + }, + "4": { + "name": "entity.name.tag.pragma-mark.objcpp" + } + }, + "match": "^\\s*(((#)\\s*pragma\\s+mark)\\s+(.*))", + "name": "meta.section.objcpp" + }, + "operators": { + "patterns": [ + { + "match": "(?-mix:(?<!\\w)((?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept))(?!\\w))", + "name": "keyword.operator.$1.objcpp" + }, + { + "match": "--", + "name": "keyword.operator.decrement.objcpp" + }, + { + "match": "\\+\\+", + "name": "keyword.operator.increment.objcpp" + }, + { + "match": "%=|\\+=|-=|\\*=|(?<!\\()/=", + "name": "keyword.operator.assignment.compound.objcpp" + }, + { + "match": "&=|\\^=|<<=|>>=|\\|=", + "name": "keyword.operator.assignment.compound.bitwise.objcpp" + }, + { + "match": "<<|>>", + "name": "keyword.operator.bitwise.shift.objcpp" + }, + { + "match": "!=|<=|>=|==|<|>", + "name": "keyword.operator.comparison.objcpp" + }, + { + "match": "&&|!|\\|\\|", + "name": "keyword.operator.logical.objcpp" + }, + { + "match": "&|\\||\\^|~", + "name": "keyword.operator.objcpp" + }, + { + "match": "=", + "name": "keyword.operator.assignment.objcpp" + }, + { + "match": "%|\\*|/|-|\\+", + "name": "keyword.operator.objcpp" + }, + { + "begin": "\\?", + "beginCaptures": { + "0": { + "name": "keyword.operator.ternary.objcpp" + } + }, + "end": ":", + "applyEndPatternLast": true, + "endCaptures": { + "0": { + "name": "keyword.operator.ternary.objcpp" + } + }, + "patterns": [ + { + "include": "#access-method" + }, + { + "include": "#access-member" + }, + { + "include": "#c_function_call" + }, + { + "include": "$base" + } + ] + } + ] + }, + "strings-c": { + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.double.objcpp", + "patterns": [ + { + "include": "#string_escaped_char-c" + }, + { + "include": "#string_placeholder-c" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "(?-mix:(?<![\\da-fA-F])')", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.single.objcpp", + "patterns": [ + { + "include": "#string_escaped_char-c" + }, + { + "include": "#line_continuation_character" + } + ] + } + ] + }, + "string_escaped_char-c": { + "patterns": [ + { + "match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )", + "name": "constant.character.escape.objcpp" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unknown-escape.objcpp" + } + ] + }, + "string_placeholder-c": { + "patterns": [ + { + "match": "(?x) %\n(\\d+\\$)?\t\t\t\t\t\t # field (argument #)\n[#0\\- +']*\t\t\t\t\t\t # flags\n[,;:_]?\t\t\t\t\t\t\t # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)?\t\t # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?\t# precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%]\t\t # conversion type", + "name": "constant.other.placeholder.objcpp" + } + ] + }, + "vararg_ellipses-c": { + "match": "(?<!\\.)\\.\\.\\.(?!\\.)", + "name": "punctuation.vararg-ellipses.objcpp" + }, + "preprocessor-rule-conditional": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if(?:n?def)?\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#preprocessor-rule-enabled-elif" + }, + { + "include": "#preprocessor-rule-enabled-else" + }, + { + "include": "#preprocessor-rule-disabled-elif" + }, + { + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "$base" + } + ] + }, + { + "match": "^\\s*#\\s*(else|elif|endif)\\b", + "captures": { + "0": { + "name": "invalid.illegal.stray-$1.objcpp" + } + } + } + ] + }, + "preprocessor-rule-conditional-block": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if(?:n?def)?\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#preprocessor-rule-enabled-elif-block" + }, + { + "include": "#preprocessor-rule-enabled-else-block" + }, + { + "include": "#preprocessor-rule-disabled-elif" + }, + { + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#block_innards-c" + } + ] + }, + { + "match": "^\\s*#\\s*(else|elif|endif)\\b", + "captures": { + "0": { + "name": "invalid.illegal.stray-$1.objcpp" + } + } + } + ] + }, + "preprocessor-rule-conditional-line": { + "patterns": [ + { + "match": "(?:\\bdefined\\b\\s*$)|(?:\\bdefined\\b(?=\\s*\\(*\\s*(?:(?!defined\\b)[a-zA-Z_$][\\w$]*\\b)\\s*\\)*\\s*(?:\\n|//|/\\*|\\?|\\:|&&|\\|\\||\\\\\\s*\\n)))", + "name": "keyword.control.directive.conditional.objcpp" + }, + { + "match": "\\bdefined\\b", + "name": "invalid.illegal.macro-name.objcpp" + }, + { + "include": "#comments-c" + }, + { + "include": "#strings-c" + }, + { + "include": "#number_literal" + }, + { + "begin": "\\?", + "beginCaptures": { + "0": { + "name": "keyword.operator.ternary.objcpp" + } + }, + "end": ":", + "endCaptures": { + "0": { + "name": "keyword.operator.ternary.objcpp" + } + }, + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#operators" + }, + { + "include": "#constants" + }, + { + "match": "[a-zA-Z_$][\\w$]*", + "name": "entity.name.function.preprocessor.objcpp" + }, + { + "include": "#line_continuation_character" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objcpp" + } + }, + "end": "\\)|(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + } + ] + }, + "preprocessor-rule-disabled": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments-c" + }, + { + "include": "#preprocessor-rule-enabled-elif" + }, + { + "include": "#preprocessor-rule-enabled-else" + }, + { + "include": "#preprocessor-rule-disabled-elif" + }, + { + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))", + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "$base" + } + ] + }, + { + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "contentName": "comment.block.preprocessor.if-branch.objcpp", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + } + ] + } + ] + }, + "preprocessor-rule-disabled-block": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments-c" + }, + { + "include": "#preprocessor-rule-enabled-elif-block" + }, + { + "include": "#preprocessor-rule-enabled-else-block" + }, + { + "include": "#preprocessor-rule-disabled-elif" + }, + { + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))", + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#block_innards-c" + } + ] + }, + { + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "contentName": "comment.block.preprocessor.if-branch.in-block.objcpp", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + } + ] + } + ] + }, + "preprocessor-rule-disabled-elif": { + "begin": "^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))", + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments-c" + }, + { + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "contentName": "comment.block.preprocessor.elif-branch.objcpp", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + } + ] + }, + "preprocessor-rule-enabled": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + }, + "3": { + "name": "constant.numeric.preprocessor.objcpp" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments-c" + }, + { + "begin": "^\\s*((#)\\s*else\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "contentName": "comment.block.preprocessor.else-branch.objcpp", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "contentName": "comment.block.preprocessor.if-branch.objcpp", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "$base" + } + ] + } + ] + } + ] + }, + "preprocessor-rule-enabled-block": { + "patterns": [ + { + "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "^\\s*((#)\\s*endif\\b)", + "endCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments-c" + }, + { + "begin": "^\\s*((#)\\s*else\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "contentName": "comment.block.preprocessor.else-branch.in-block.objcpp", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "begin": "^\\s*((#)\\s*elif\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "contentName": "comment.block.preprocessor.if-branch.in-block.objcpp", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "patterns": [ + { + "include": "#block_innards-c" + } + ] + } + ] + } + ] + }, + "preprocessor-rule-enabled-elif": { + "begin": "^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments-c" + }, + { + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:endif)\\b))", + "patterns": [ + { + "begin": "^\\s*((#)\\s*(else)\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "contentName": "comment.block.preprocessor.elif-branch.objcpp", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "begin": "^\\s*((#)\\s*(elif)\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "contentName": "comment.block.preprocessor.elif-branch.objcpp", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "include": "$base" + } + ] + } + ] + }, + "preprocessor-rule-enabled-elif-block": { + "begin": "^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", + "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", + "name": "meta.preprocessor.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-conditional-line" + } + ] + }, + { + "include": "#comments-c" + }, + { + "begin": "\\n", + "end": "(?=^\\s*((#)\\s*(?:endif)\\b))", + "patterns": [ + { + "begin": "^\\s*((#)\\s*(else)\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "contentName": "comment.block.preprocessor.elif-branch.in-block.objcpp", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "begin": "^\\s*((#)\\s*(elif)\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", + "contentName": "comment.block.preprocessor.elif-branch.objcpp", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "include": "#block_innards-c" + } + ] + } + ] + }, + "preprocessor-rule-enabled-else": { + "begin": "^\\s*((#)\\s*else\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "include": "$base" + } + ] + }, + "preprocessor-rule-enabled-else-block": { + "begin": "^\\s*((#)\\s*else\\b)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.objcpp" + }, + "1": { + "name": "keyword.control.directive.conditional.objcpp" + }, + "2": { + "name": "punctuation.definition.directive.objcpp" + } + }, + "end": "(?=^\\s*((#)\\s*endif\\b))", + "patterns": [ + { + "include": "#block_innards-c" + } + ] + }, + "preprocessor-rule-define-line-contents": { + "patterns": [ + { + "include": "#vararg_ellipses-c" + }, + { + "match": "(?-mix:##?[a-zA-Z_]\\w*(?!\\w))", + "name": "variable.other.macro.argument.objcpp" + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objcpp" + } + }, + "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.objcpp" + } + }, + "name": "meta.block.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-define-line-blocks" + } + ] + }, + { + "match": "\\(", + "name": "punctuation.section.parens.begin.bracket.round.objcpp" + }, + { + "match": "\\)", + "name": "punctuation.section.parens.end.bracket.round.objcpp" + }, + { + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|return|typeid|alignof|alignas|sizeof|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas|asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\s*\\()\n(?=\n (?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name\n |\n (?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", + "end": "(?<=\\))(?!\\w)|(?<!\\\\)(?=\\s*\\n)", + "name": "meta.function.objcpp", + "patterns": [ + { + "include": "#preprocessor-rule-define-line-functions" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": "\"|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.double.objcpp", + "patterns": [ + { + "include": "#string_escaped_char-c" + }, + { + "include": "#string_placeholder-c" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.objcpp" + } + }, + "end": "'|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.objcpp" + } + }, + "name": "string.quoted.single.objcpp", + "patterns": [ + { + "include": "#string_escaped_char-c" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "include": "#access-method" + }, + { + "include": "#access-member" + }, + { + "include": "$base" + } + ] + }, + "preprocessor-rule-define-line-blocks": { + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.bracket.curly.objcpp" + } + }, + "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.bracket.curly.objcpp" + } + }, + "patterns": [ + { + "include": "#preprocessor-rule-define-line-blocks" + }, + { + "include": "#preprocessor-rule-define-line-contents" + } + ] + }, + { + "include": "#preprocessor-rule-define-line-contents" + } + ] + }, + "preprocessor-rule-define-line-functions": { + "patterns": [ + { + "include": "#comments-c" + }, + { + "include": "#storage_types_c" + }, + { + "include": "#vararg_ellipses-c" + }, + { + "include": "#access-method" + }, + { + "include": "#access-member" + }, + { + "include": "#operators" + }, + { + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|return|typeid|alignof|alignas|sizeof|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.objcpp" + }, + "2": { + "name": "punctuation.section.arguments.begin.bracket.round.objcpp" + } + }, + "end": "(\\))|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "1": { + "name": "punctuation.section.arguments.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#preprocessor-rule-define-line-functions" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objcpp" + } + }, + "end": "(\\))|(?<!\\\\)(?=\\s*\\n)", + "endCaptures": { + "1": { + "name": "punctuation.section.parens.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#preprocessor-rule-define-line-functions" + } + ] + }, + { + "include": "#preprocessor-rule-define-line-contents" + } + ] + }, + "function-innards-c": { + "patterns": [ + { + "include": "#comments-c" + }, + { + "include": "#storage_types_c" + }, + { + "include": "#operators" + }, + { + "include": "#vararg_ellipses-c" + }, + { + "name": "meta.function.definition.parameters.objcpp", + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|return|typeid|alignof|alignas|sizeof|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.objcpp" + }, + "2": { + "name": "punctuation.section.parameters.begin.bracket.round.objcpp" + } + }, + "end": "\\)|:", + "endCaptures": { + "0": { + "name": "punctuation.section.parameters.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#probably_a_parameter" + }, + { + "include": "#function-innards-c" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#function-innards-c" + } + ] + }, + { + "include": "$base" + } + ] + }, + "function-call-innards-c": { + "patterns": [ + { + "include": "#comments-c" + }, + { + "include": "#storage_types_c" + }, + { + "include": "#access-method" + }, + { + "include": "#access-member" + }, + { + "include": "#operators" + }, + { + "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|return|typeid|alignof|alignas|sizeof|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:new)\\s*((?:(?:<(?:[\\s<>,\\w])*>\\s*))?) # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.operator.memory.new.objcpp" + }, + "2": { + "patterns": [ + { + "include": "#template_call_innards" + } + ] + }, + "3": { + "name": "punctuation.section.arguments.begin.bracket.round.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.arguments.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#function-call-innards-c" + } + ] + }, + { + "begin": "(?<!\\w)(?!\\s*(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|auto|void|char|short|int|signed|unsigned|long|float|double|bool|wchar_t|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|NULL|true|false|nullptr|class|struct|union|enum|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized)\\s*\\()((?:[a-zA-Z_]\\w*\\s*(?:(?:<(?:[\\s<>,\\w])*>\\s*))?::)*)\\s*([a-zA-Z_]\\w*)\\s*(?:((?:<(?:[\\s<>,\\w])*>\\s*)))?(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#scope_resolution" + } + ] + }, + "2": { + "name": "entity.name.function.call.objcpp" + }, + "3": { + "patterns": [ + { + "include": "#template_call_innards" + } + ] + }, + "4": { + "name": "punctuation.section.arguments.begin.bracket.round.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.arguments.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#function-call-innards-c" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.bracket.round.objcpp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.bracket.round.objcpp" + } + }, + "patterns": [ + { + "include": "#function-call-innards-c" + } + ] + }, + { + "include": "#block_innards-c" + } + ] + } + } + }, + "disabled": { + "begin": "^\\s*#\\s*if(n?def)?\\b.*$", + "comment": "eat nested preprocessor if(def)s", + "end": "^\\s*#\\s*endif\\b.*$", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + "implementation_innards": { + "patterns": [ + { + "include": "#preprocessor-rule-enabled-implementation" + }, + { + "include": "#preprocessor-rule-disabled-implementation" + }, + { + "include": "#preprocessor-rule-other-implementation" + }, + { + "include": "#property_directive" + }, + { + "include": "#method_super" + }, + { + "include": "$base" + } + ] + }, + "interface_innards": { + "patterns": [ + { + "include": "#preprocessor-rule-enabled-interface" + }, + { + "include": "#preprocessor-rule-disabled-interface" + }, + { + "include": "#preprocessor-rule-other-interface" + }, + { + "include": "#properties" + }, + { + "include": "#protocol_list" + }, + { + "include": "#method" + }, + { + "include": "$base" + } + ] + }, + "method": { + "begin": "^(-|\\+)\\s*", + "end": "(?=\\{|#)|;", + "name": "meta.function.objcpp", + "patterns": [ + { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.type.begin.objcpp" + } + }, + "end": "(\\))\\s*(\\w+\\b)", + "endCaptures": { + "1": { + "name": "punctuation.definition.type.end.objcpp" + }, + "2": { + "name": "entity.name.function.objcpp" + } + }, + "name": "meta.return-type.objcpp", + "patterns": [ + { + "include": "#protocol_list" + }, + { + "include": "#protocol_type_qualifier" + }, + { + "include": "$base" + } + ] + }, + { + "match": "\\b\\w+(?=:)", + "name": "entity.name.function.name-of-parameter.objcpp" + }, + { + "begin": "((:))\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.name-of-parameter.objcpp" + }, + "2": { + "name": "punctuation.separator.arguments.objcpp" + }, + "3": { + "name": "punctuation.definition.type.begin.objcpp" + } + }, + "end": "(\\))\\s*(\\w+\\b)?", + "endCaptures": { + "1": { + "name": "punctuation.definition.type.end.objcpp" + }, + "2": { + "name": "variable.parameter.function.objcpp" + } + }, + "name": "meta.argument-type.objcpp", + "patterns": [ + { + "include": "#protocol_list" + }, + { + "include": "#protocol_type_qualifier" + }, + { + "include": "$base" + } + ] + }, + { + "include": "#comment" + } + ] + }, + "method_super": { + "begin": "^(?=-|\\+)", + "end": "(?<=\\})|(?=#)", + "name": "meta.function-with-body.objcpp", + "patterns": [ + { + "include": "#method" + }, + { + "include": "$base" + } + ] + }, + "pragma-mark": { + "captures": { + "1": { + "name": "meta.preprocessor.objcpp" + }, + "2": { + "name": "keyword.control.import.pragma.objcpp" + }, + "3": { + "name": "meta.toc-list.pragma-mark.objcpp" + } + }, + "match": "^\\s*(#\\s*(pragma\\s+mark)\\s+(.*))", + "name": "meta.section.objcpp" + }, + "preprocessor-rule-disabled-implementation": { + "begin": "^\\s*(#(if)\\s+(0)\\b).*", + "captures": { + "1": { + "name": "meta.preprocessor.objcpp" + }, + "2": { + "name": "keyword.control.import.if.objcpp" + }, + "3": { + "name": "constant.numeric.preprocessor.objcpp" + } + }, + "end": "^\\s*(#\\s*(endif)\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "begin": "^\\s*(#\\s*(else)\\b)", + "captures": { + "1": { + "name": "meta.preprocessor.objcpp" + }, + "2": { + "name": "keyword.control.import.else.objcpp" + } + }, + "end": "(?=^\\s*#\\s*endif\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "include": "#interface_innards" + } + ] + }, + { + "begin": "", + "end": "(?=^\\s*#\\s*(else|endif)\\b.*?(?:(?=(?://|/\\*))|$))", + "name": "comment.block.preprocessor.if-branch.objcpp", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + } + ] + }, + "preprocessor-rule-disabled-interface": { + "begin": "^\\s*(#(if)\\s+(0)\\b).*", + "captures": { + "1": { + "name": "meta.preprocessor.objcpp" + }, + "2": { + "name": "keyword.control.import.if.objcpp" + }, + "3": { + "name": "constant.numeric.preprocessor.objcpp" + } + }, + "end": "^\\s*(#\\s*(endif)\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "begin": "^\\s*(#\\s*(else)\\b)", + "captures": { + "1": { + "name": "meta.preprocessor.objcpp" + }, + "2": { + "name": "keyword.control.import.else.objcpp" + } + }, + "end": "(?=^\\s*#\\s*endif\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "include": "#interface_innards" + } + ] + }, + { + "begin": "", + "end": "(?=^\\s*#\\s*(else|endif)\\b.*?(?:(?=(?://|/\\*))|$))", + "name": "comment.block.preprocessor.if-branch.objcpp", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + } + ] + }, + "preprocessor-rule-enabled-implementation": { + "begin": "^\\s*(#(if)\\s+(0*1)\\b)", + "captures": { + "1": { + "name": "meta.preprocessor.objcpp" + }, + "2": { + "name": "keyword.control.import.if.objcpp" + }, + "3": { + "name": "constant.numeric.preprocessor.objcpp" + } + }, + "end": "^\\s*(#\\s*(endif)\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "begin": "^\\s*(#\\s*(else)\\b).*", + "captures": { + "1": { + "name": "meta.preprocessor.objcpp" + }, + "2": { + "name": "keyword.control.import.else.objcpp" + } + }, + "contentName": "comment.block.preprocessor.else-branch.objcpp", + "end": "(?=^\\s*#\\s*endif\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "begin": "", + "end": "(?=^\\s*#\\s*(else|endif)\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "include": "#implementation_innards" + } + ] + } + ] + }, + "preprocessor-rule-enabled-interface": { + "begin": "^\\s*(#(if)\\s+(0*1)\\b)", + "captures": { + "1": { + "name": "meta.preprocessor.objcpp" + }, + "2": { + "name": "keyword.control.import.if.objcpp" + }, + "3": { + "name": "constant.numeric.preprocessor.objcpp" + } + }, + "end": "^\\s*(#\\s*(endif)\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "begin": "^\\s*(#\\s*(else)\\b).*", + "captures": { + "1": { + "name": "meta.preprocessor.objcpp" + }, + "2": { + "name": "keyword.control.import.else.objcpp" + } + }, + "contentName": "comment.block.preprocessor.else-branch.objcpp", + "end": "(?=^\\s*#\\s*endif\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "include": "#disabled" + }, + { + "include": "#pragma-mark" + } + ] + }, + { + "begin": "", + "end": "(?=^\\s*#\\s*(else|endif)\\b.*?(?:(?=(?://|/\\*))|$))", + "patterns": [ + { + "include": "#interface_innards" + } + ] + } + ] + }, + "preprocessor-rule-other-implementation": { + "begin": "^\\s*(#\\s*(if(n?def)?)\\b.*?(?:(?=(?://|/\\*))|$))", + "captures": { + "1": { + "name": "meta.preprocessor.objcpp" + }, + "2": { + "name": "keyword.control.import.objcpp" + } + }, + "end": "^\\s*(#\\s*(endif)\\b).*?(?:(?=(?://|/\\*))|$)", + "patterns": [ + { + "include": "#implementation_innards" + } + ] + }, + "preprocessor-rule-other-interface": { + "begin": "^\\s*(#\\s*(if(n?def)?)\\b.*?(?:(?=(?://|/\\*))|$))", + "captures": { + "1": { + "name": "meta.preprocessor.objcpp" + }, + "2": { + "name": "keyword.control.import.objcpp" + } + }, + "end": "^\\s*(#\\s*(endif)\\b).*?(?:(?=(?://|/\\*))|$)", + "patterns": [ + { + "include": "#interface_innards" + } + ] + }, + "properties": { + "patterns": [ + { + "begin": "((@)property)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.property.objcpp" + }, + "2": { + "name": "punctuation.definition.keyword.objcpp" + }, + "3": { + "name": "punctuation.section.scope.begin.objcpp" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.scope.end.objcpp" + } + }, + "name": "meta.property-with-attributes.objcpp", + "patterns": [ + { + "match": "\\b(getter|setter|readonly|readwrite|assign|retain|copy|nonatomic|atomic|strong|weak|nonnull|nullable|null_resettable|null_unspecified|class|direct)\\b", + "name": "keyword.other.property.attribute.objcpp" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.other.property.objcpp" + }, + "2": { + "name": "punctuation.definition.keyword.objcpp" + } + }, + "match": "((@)property)\\b", + "name": "meta.property.objcpp" + } + ] + }, + "property_directive": { + "captures": { + "1": { + "name": "punctuation.definition.keyword.objcpp" + } + }, + "match": "(@)(dynamic|synthesize)\\b", + "name": "keyword.other.property.directive.objcpp" + }, + "protocol_list": { + "begin": "(<)", + "beginCaptures": { + "1": { + "name": "punctuation.section.scope.begin.objcpp" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "punctuation.section.scope.end.objcpp" + } + }, + "name": "meta.protocol-list.objcpp", + "patterns": [ + { + "match": "\\bNS(GlyphStorage|M(utableCopying|enuItem)|C(hangeSpelling|o(ding|pying|lorPicking(Custom|Default)))|T(oolbarItemValidations|ext(Input|AttachmentCell))|I(nputServ(iceProvider|erMouseTracker)|gnoreMisspelledWords)|Obj(CTypeSerializationCallBack|ect)|D(ecimalNumberBehaviors|raggingInfo)|U(serInterfaceValidations|RL(HandleClient|DownloadDelegate|ProtocolClient|AuthenticationChallengeSender))|Validated(ToobarItem|UserInterfaceItem)|Locking)\\b", + "name": "support.other.protocol.objcpp" + } + ] + }, + "protocol_type_qualifier": { + "match": "\\b(in|out|inout|oneway|bycopy|byref|nonnull|nullable|_Nonnull|_Nullable|_Null_unspecified)\\b", + "name": "storage.modifier.protocol.objcpp" + }, + "special_variables": { + "patterns": [ + { + "match": "\\b_cmd\\b", + "name": "variable.other.selector.objcpp" + }, + { + "match": "\\b(self|super)\\b", + "name": "variable.language.objcpp" + } + ] + }, + "string_escaped_char": { + "patterns": [ + { + "match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )", + "name": "constant.character.escape.objcpp" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unknown-escape.objcpp" + } + ] + }, + "string_placeholder": { + "patterns": [ + { + "match": "(?x) %\n(\\d+\\$)?\t\t\t\t\t\t # field (argument #)\n[#0\\- +']*\t\t\t\t\t\t # flags\n[,;:_]?\t\t\t\t\t\t\t # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)?\t\t # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?\t# precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%]\t\t # conversion type", + "name": "constant.other.placeholder.objcpp" + }, + { + "match": "(%)(?!\"\\s*(PRI|SCN))", + "captures": { + "1": { + "name": "invalid.illegal.placeholder.objcpp" + } + } + } + ] + } + } +} diff --git a/src/lib/shiki/languages/ocaml.tmLanguage.json b/src/lib/shiki/languages/ocaml.tmLanguage.json new file mode 100644 index 0000000..f32d70e --- /dev/null +++ b/src/lib/shiki/languages/ocaml.tmLanguage.json @@ -0,0 +1,2961 @@ +{ + "name": "ocaml", + "scopeName": "source.ocaml", + "fileTypes": [".ml", ".mli"], + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#pragma" + }, + { + "include": "#decl" + } + ], + "repository": { + "attribute": { + "begin": "(\\[)[[:space:]]*((?<![#\\-:!?.@*/&%^+<=>|~$])@{1,3}(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "\\]", + "beginCaptures": { + "1": { + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" + }, + "2": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "endCaptures": { + "0": { + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" + } + }, + "patterns": [ + { + "include": "#attributePayload" + } + ] + }, + "attributeIdentifier": { + "match": "((?<![#\\-:!?.@*/&%^+<=>|~$])%(?![#\\-:!?.@*/&%^+<=>|~$]))((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))", + "captures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + }, + "2": { + "name": "punctuation.definition.tag" + } + } + }, + "attributePayload": { + "patterns": [ + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]%|^%))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "((?<![#\\-:!?.@*/&%^+<=>|~$])[:\\?](?![#\\-:!?.@*/&%^+<=>|~$]))|(?<=[[:space:]])|(?=\\])", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "include": "#pathModuleExtended" + }, + { + "include": "#pathRecord" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(?=\\])", + "patterns": [ + { + "include": "#signature" + }, + { + "include": "#type" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]\\?|^\\?))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(?=\\])", + "patterns": [ + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]\\?|^\\?))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(?=\\])|\\bwhen\\b", + "endCaptures": { + "1": {} + }, + "patterns": [ + { + "include": "#pattern" + } + ] + }, + { + "begin": "(?:(?<=(?:[^[:word:]]when|^when))(?![[:word:]]))", + "end": "(?=\\])", + "patterns": [ + { + "include": "#term" + } + ] + } + ] + }, + { + "include": "#term" + } + ] + }, + "bindClassTerm": { + "patterns": [ + { + "begin": "(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]class|^class|[^[:word:]]type|^type))(?![[:word:]]))", + "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])(:)|(=)(?![#\\-:!?.@*/&%^+<=>|~$])|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + }, + "2": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "begin": "(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]class|^class|[^[:word:]]type|^type))(?![[:word:]]))", + "end": "(?=(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)[[:space:]]*,|[^[:space:][:lower:]%])|(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)|(?=\\btype\\b)", + "endCaptures": { + "0": { + "name": "entity.name.function strong emphasis" + } + }, + "patterns": [ + { + "include": "#attributeIdentifier" + } + ] + }, + { + "begin": "\\[", + "end": "\\]", + "captures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "include": "#bindTermArgs" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])=(?![#\\-:!?.@*/&%^+<=>|~$])|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|val)\\b)", + "endCaptures": { + "0": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "include": "#literalClassType" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "\\band\\b|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "endCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" + } + }, + "patterns": [ + { + "include": "#term" + } + ] + } + ] + }, + "bindClassType": { + "patterns": [ + { + "begin": "(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]class|^class|[^[:word:]]type|^type))(?![[:word:]]))", + "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])(:)|(=)(?![#\\-:!?.@*/&%^+<=>|~$])|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + }, + "2": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "begin": "(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]class|^class|[^[:word:]]type|^type))(?![[:word:]]))", + "end": "(?=(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)[[:space:]]*,|[^[:space:][:lower:]%])|(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)|(?=\\btype\\b)", + "endCaptures": { + "0": { + "name": "entity.name.function strong emphasis" + } + }, + "patterns": [ + { + "include": "#attributeIdentifier" + } + ] + }, + { + "begin": "\\[", + "end": "\\]", + "captures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "include": "#bindTermArgs" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])=(?![#\\-:!?.@*/&%^+<=>|~$])|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|val)\\b)", + "endCaptures": { + "0": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "include": "#literalClassType" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "\\band\\b|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "endCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" + } + }, + "patterns": [ + { + "include": "#literalClassType" + } + ] + } + ] + }, + "bindConstructor": { + "patterns": [ + { + "begin": "(?:(?<=(?:[^[:word:]]exception|^exception))(?![[:word:]]))|(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]\\+=|^\\+=|[^#\\-:!?.@*/&%^+<=>|~$]=|^=|[^#\\-:!?.@*/&%^+<=>|~$]\\||^\\|))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(:)|(\\bof\\b)|((?<![#\\-:!?.@*/&%^+<=>|~$])\\|(?![#\\-:!?.@*/&%^+<=>|~$]))|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + }, + "2": { + "name": "punctuation.definition.tag" + }, + "3": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "include": "#attributeIdentifier" + }, + { + "match": "\\.\\.", + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + }, + { + "match": "\\b(?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)\\b(?![[:space:]]*(?:\\.|\\([^\\*]))", + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" + }, + { + "include": "#type" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))|(?:(?<=(?:[^[:word:]]of|^of))(?![[:word:]]))", + "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])\\|(?![#\\-:!?.@*/&%^+<=>|~$])|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "endCaptures": { + "0": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "include": "#type" + } + ] + } + ] + }, + "bindSignature": { + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?:(?<=(?:[^[:word:]]type|^type))(?![[:word:]]))", + "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])=(?![#\\-:!?.@*/&%^+<=>|~$])", + "endCaptures": { + "0": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#pathModuleExtended" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "\\band\\b|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "endCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" + } + }, + "patterns": [ + { + "include": "#signature" + } + ] + } + ] + }, + "bindStructure": { + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?:(?<=(?:[^[:word:]]and|^and))(?![[:word:]]))|(?=[[:upper:]])", + "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])(:(?!=))|(:?=)(?![#\\-:!?.@*/&%^+<=>|~$])|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|open|type|val)\\b)", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + }, + "2": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "match": "\\bmodule\\b", + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" + }, + { + "match": "(?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)", + "name": "entity.name.function strong emphasis" + }, + { + "begin": "\\((?!\\))", + "end": "\\)", + "captures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?<![#\\-:!?.@*/&%^+<=>|~$]):(?![#\\-:!?.@*/&%^+<=>|~$])", + "end": "(?=\\))", + "beginCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + } + }, + "patterns": [ + { + "include": "#signature" + } + ] + }, + { + "include": "#variableModule" + } + ] + }, + { + "include": "#literalUnit" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "\\b(and)\\b|((?<![#\\-:!?.@*/&%^+<=>|~$])=(?![#\\-:!?.@*/&%^+<=>|~$]))|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" + }, + "2": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "include": "#signature" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:=|^:=|[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "\\b(?:(and)|(with))\\b|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" + }, + "2": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" + } + }, + "patterns": [ + { + "include": "#structure" + } + ] + } + ] + }, + "bindTerm": { + "patterns": [ + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]!|^!))(?![#\\-:!?.@*/&%^+<=>|~$]))|(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]external|^external|[^[:word:]]let|^let|[^[:word:]]method|^method|[^[:word:]]val|^val))(?![[:word:]]))", + "end": "(\\bmodule\\b)|(\\bopen\\b)|(?<![#\\-:!?.@*/&%^+<=>|~$])(:)|((?<![#\\-:!?.@*/&%^+<=>|~$])=(?![#\\-:!?.@*/&%^+<=>|~$]))(?![#\\-:!?.@*/&%^+<=>|~$])|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "endCaptures": { + "1": { + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" + }, + "2": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + }, + "3": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + }, + "4": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]!|^!))(?![#\\-:!?.@*/&%^+<=>|~$]))|(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]external|^external|[^[:word:]]let|^let|[^[:word:]]method|^method|[^[:word:]]val|^val))(?![[:word:]]))", + "end": "(?=\\b(?:module|open)\\b)|(?=(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)[[:space:]]*,|[^[:space:][:lower:]%])|(\\brec\\b)|((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + }, + "2": { + "name": "entity.name.function strong emphasis" + } + }, + "patterns": [ + { + "include": "#attributeIdentifier" + }, + { + "include": "#comment" + } + ] + }, + { + "begin": "(?:(?<=(?:[^[:word:]]rec|^rec))(?![[:word:]]))", + "end": "((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))|(?=[^[:space:][:alpha:]])", + "endCaptures": { + "0": { + "name": "entity.name.function strong emphasis" + } + }, + "patterns": [ + { + "include": "#bindTermArgs" + } + ] + }, + { + "include": "#bindTermArgs" + } + ] + }, + { + "begin": "(?:(?<=(?:[^[:word:]]module|^module))(?![[:word:]]))", + "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "patterns": [ + { + "include": "#declModule" + } + ] + }, + { + "begin": "(?:(?<=(?:[^[:word:]]open|^open))(?![[:word:]]))", + "end": "(?=\\bin\\b)|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "patterns": [ + { + "include": "#pathModuleSimple" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])=(?![#\\-:!?.@*/&%^+<=>|~$])|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "endCaptures": { + "0": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "\\btype\\b|(?=[^[:space:]])", + "endCaptures": { + "0": { + "name": "keyword.control" + } + } + }, + { + "begin": "(?:(?<=(?:[^[:word:]]type|^type))(?![[:word:]]))", + "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])\\.(?![#\\-:!?.@*/&%^+<=>|~$])", + "endCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "include": "#pattern" + } + ] + }, + { + "include": "#type" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "\\band\\b|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "endCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" + } + }, + "patterns": [ + { + "include": "#term" + } + ] + } + ] + }, + "bindTermArgs": { + "patterns": [ + { + "begin": "~|\\?", + "end": ":|(?=[^[:space:]])", + "applyEndPatternLast": true, + "beginCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "endCaptures": { + "0": { + "name": "keyword" + } + }, + "patterns": [ + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]~|^~|[^#\\-:!?.@*/&%^+<=>|~$]\\?|^\\?))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)|(?<=\\))", + "endCaptures": { + "0": { + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "\\((?!\\*)", + "end": "\\)", + "captures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "begin": "(?<=\\()", + "end": ":|=", + "endCaptures": { + "0": { + "name": "keyword" + } + }, + "patterns": [ + { + "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" + } + ] + }, + { + "begin": "(?<=:)", + "end": "=|(?=\\))", + "endCaptures": { + "0": { + "name": "keyword" + } + }, + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#term" + } + ] + } + ] + } + ] + } + ] + }, + { + "include": "#pattern" + } + ] + }, + "bindType": { + "patterns": [ + { + "begin": "(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]type|^type))(?![[:word:]]))", + "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])\\+=|=(?![#\\-:!?.@*/&%^+<=>|~$])|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "endCaptures": { + "0": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "include": "#attributeIdentifier" + }, + { + "include": "#pathType" + }, + { + "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", + "name": "entity.name.function strong" + }, + { + "include": "#type" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]\\+=|^\\+=|[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "\\band\\b|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "endCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" + } + }, + "patterns": [ + { + "include": "#bindConstructor" + } + ] + } + ] + }, + "comment": { + "patterns": [ + { + "include": "#attribute" + }, + { + "include": "#extension" + }, + { + "include": "#commentBlock" + }, + { + "include": "#commentDoc" + } + ] + }, + "commentBlock": { + "begin": "\\(\\*(?!\\*[^\\)])", + "end": "\\*\\)", + "name": "comment constant.regexp meta.separator.markdown", + "contentName": "emphasis", + "patterns": [ + { + "include": "#commentBlock" + }, + { + "include": "#commentDoc" + } + ] + }, + "commentDoc": { + "begin": "\\(\\*\\*", + "end": "\\*\\)", + "name": "comment constant.regexp meta.separator.markdown", + "patterns": [ + { + "match": "\\*" + }, + { + "include": "#comment" + } + ] + }, + "decl": { + "patterns": [ + { + "include": "#declClass" + }, + { + "include": "#declException" + }, + { + "include": "#declInclude" + }, + { + "include": "#declModule" + }, + { + "include": "#declOpen" + }, + { + "include": "#declTerm" + }, + { + "include": "#declType" + } + ] + }, + "declClass": { + "begin": "\\bclass\\b", + "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "0": { + "name": "entity.name.class constant.numeric markup.underline" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#pragma" + }, + { + "begin": "(?:(?<=(?:[^[:word:]]class|^class))(?![[:word:]]))", + "end": "\\btype\\b|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|val)\\b)", + "beginCaptures": { + "0": { + "name": "entity.name.class constant.numeric markup.underline" + } + }, + "endCaptures": { + "0": { + "name": "keyword" + } + }, + "patterns": [ + { + "include": "#bindClassTerm" + } + ] + }, + { + "begin": "(?:(?<=(?:[^[:word:]]type|^type))(?![[:word:]]))", + "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "patterns": [ + { + "include": "#bindClassType" + } + ] + } + ] + }, + "declException": { + "begin": "\\bexception\\b", + "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "0": { + "name": "keyword markup.underline" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#attributeIdentifier" + }, + { + "include": "#comment" + }, + { + "include": "#pragma" + }, + { + "include": "#bindConstructor" + } + ] + }, + "declInclude": { + "begin": "\\binclude\\b", + "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#attributeIdentifier" + }, + { + "include": "#comment" + }, + { + "include": "#pragma" + }, + { + "include": "#signature" + } + ] + }, + "declModule": { + "begin": "(?:(?<=(?:[^[:word:]]module|^module))(?![[:word:]]))|\\bmodule\\b", + "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "0": { + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename markup.underline" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#pragma" + }, + { + "begin": "(?:(?<=(?:[^[:word:]]module|^module))(?![[:word:]]))", + "end": "(\\btype\\b)|(?=[[:upper:]])", + "endCaptures": { + "0": { + "name": "keyword" + } + }, + "patterns": [ + { + "include": "#attributeIdentifier" + }, + { + "include": "#comment" + }, + { + "match": "\\brec\\b", + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + ] + }, + { + "begin": "(?:(?<=(?:[^[:word:]]type|^type))(?![[:word:]]))", + "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "patterns": [ + { + "include": "#bindSignature" + } + ] + }, + { + "begin": "(?=[[:upper:]])", + "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "patterns": [ + { + "include": "#bindStructure" + } + ] + } + ] + }, + "declOpen": { + "begin": "\\bopen\\b", + "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#attributeIdentifier" + }, + { + "include": "#comment" + }, + { + "include": "#pragma" + }, + { + "include": "#pathModuleExtended" + } + ] + }, + "declTerm": { + "begin": "\\b(?:(external|val)|(method)|(let))\\b(!?)", + "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "1": { + "name": "support.type markup.underline" + }, + "2": { + "name": "storage.type markup.underline" + }, + "3": { + "name": "keyword.control markup.underline" + }, + "4": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#pragma" + }, + { + "include": "#bindTerm" + } + ] + }, + "declType": { + "begin": "(?:(?<=(?:[^[:word:]]type|^type))(?![[:word:]]))|\\btype\\b", + "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "0": { + "name": "keyword markup.underline" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#pragma" + }, + { + "include": "#bindType" + } + ] + }, + "extension": { + "begin": "(\\[)((?<![#\\-:!?.@*/&%^+<=>|~$])%{1,3}(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "\\]", + "beginCaptures": { + "1": { + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" + }, + "2": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "endCaptures": { + "0": { + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" + } + }, + "patterns": [ + { + "include": "#attributePayload" + } + ] + }, + "literal": { + "patterns": [ + { + "include": "#termConstructor" + }, + { + "include": "#literalArray" + }, + { + "include": "#literalBoolean" + }, + { + "include": "#literalCharacter" + }, + { + "include": "#literalList" + }, + { + "include": "#literalNumber" + }, + { + "include": "#literalObjectTerm" + }, + { + "include": "#literalString" + }, + { + "include": "#literalRecord" + }, + { + "include": "#literalUnit" + } + ] + }, + "literalArray": { + "begin": "\\[\\|", + "end": "\\|\\]", + "captures": { + "0": { + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" + } + }, + "patterns": [ + { + "include": "#term" + } + ] + }, + "literalBoolean": { + "match": "\\bfalse|true\\b", + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" + }, + "literalCharacter": { + "begin": "(?<![[:word:]])'", + "end": "'", + "name": "markup.punctuation.quote.beginning", + "patterns": [ + { + "include": "#literalCharacterEscape" + } + ] + }, + "literalCharacterEscape": { + "match": "\\\\(?:[\\\\\"'ntbr]|[[:digit:]][[:digit:]][[:digit:]]|x[[:xdigit:]][[:xdigit:]]|o[0-3][0-7][0-7])" + }, + "literalClassType": { + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "\\bobject\\b", + "end": "\\bend\\b", + "captures": { + "0": { + "name": "punctuation.definition.tag emphasis" + } + }, + "patterns": [ + { + "begin": "\\binherit\\b", + "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "begin": "\\bas\\b", + "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "include": "#variablePattern" + } + ] + }, + { + "include": "#type" + } + ] + }, + { + "include": "#pattern" + }, + { + "include": "#declTerm" + } + ] + }, + { + "begin": "\\[", + "end": "\\]" + } + ] + }, + "literalList": { + "patterns": [ + { + "begin": "\\[", + "end": "\\]", + "captures": { + "0": { + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" + } + }, + "patterns": [ + { + "include": "#term" + } + ] + } + ] + }, + "literalNumber": { + "match": "(?<![[:alpha:]])[[:digit:]][[:digit:]]*(\\.[[:digit:]][[:digit:]]*)?", + "name": "constant.numeric" + }, + "literalObjectTerm": { + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "\\bobject\\b", + "end": "\\bend\\b", + "captures": { + "0": { + "name": "punctuation.definition.tag emphasis" + } + }, + "patterns": [ + { + "begin": "\\binherit\\b", + "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "begin": "\\bas\\b", + "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "include": "#variablePattern" + } + ] + }, + { + "include": "#term" + } + ] + }, + { + "include": "#pattern" + }, + { + "include": "#declTerm" + } + ] + }, + { + "begin": "\\[", + "end": "\\]" + } + ] + }, + "literalRecord": { + "begin": "\\{", + "end": "\\}", + "captures": { + "0": { + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong strong" + } + }, + "patterns": [ + { + "begin": "(?<=\\{|;)", + "end": "(:)|(=)|(;)|(with)|(?=\\})", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + }, + "2": { + "name": "support.type strong" + }, + "3": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + }, + "4": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#pathModulePrefixSimple" + }, + { + "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename emphasis" + } + ] + }, + { + "begin": "(?:(?<=(?:[^[:word:]]with|^with))(?![[:word:]]))", + "end": "(:)|(=)|(;)|(?=\\})", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + }, + "2": { + "name": "support.type strong" + }, + "3": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename emphasis" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(;)|(=)|(?=\\})", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + }, + "2": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": ";|(?=\\})", + "endCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "include": "#term" + } + ] + } + ] + }, + "literalString": { + "patterns": [ + { + "begin": "\"", + "end": "\"", + "name": "string beginning.punctuation.definition.quote.markdown", + "patterns": [ + { + "include": "#literalStringEscape" + } + ] + }, + { + "begin": "(\\{)([_[:lower:]]*?)(\\|)", + "end": "(\\|)(\\2)(\\})", + "name": "string beginning.punctuation.definition.quote.markdown", + "patterns": [ + { + "include": "#literalStringEscape" + } + ] + } + ] + }, + "literalStringEscape": { + "match": "\\\\(?:[\\\\\"ntbr]|[[:digit:]][[:digit:]][[:digit:]]|x[[:xdigit:]][[:xdigit:]]|o[0-3][0-7][0-7])" + }, + "literalUnit": { + "match": "\\(\\)", + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" + }, + "pathModuleExtended": { + "patterns": [ + { + "include": "#pathModulePrefixExtended" + }, + { + "match": "(?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)", + "name": "entity.name.class constant.numeric" + } + ] + }, + "pathModulePrefixExtended": { + "begin": "(?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*\\.|$|\\()", + "end": "(?![[:space:]\\.]|$|\\()", + "beginCaptures": { + "0": { + "name": "entity.name.class constant.numeric" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "\\(", + "end": "\\)", + "captures": { + "0": { + "name": "keyword.control" + } + }, + "patterns": [ + { + "match": "((?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*\\)))", + "name": "string.other.link variable.language variable.parameter emphasis" + }, + { + "include": "#structure" + } + ] + }, + { + "begin": "(?<![#\\-:!?.@*/&%^+<=>|~$])\\.(?![#\\-:!?.@*/&%^+<=>|~$])", + "end": "((?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*\\.|$))|((?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*(?:$|\\()))|((?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*\\)))|(?![[:space:]\\.[:upper:]]|$|\\()", + "beginCaptures": { + "0": { + "name": "keyword strong" + } + }, + "endCaptures": { + "1": { + "name": "entity.name.class constant.numeric" + }, + "2": { + "name": "entity.name.function strong" + }, + "3": { + "name": "string.other.link variable.language variable.parameter emphasis" + } + } + } + ] + }, + "pathModulePrefixExtendedParens": { + "begin": "\\(", + "end": "\\)", + "captures": { + "0": { + "name": "keyword.control" + } + }, + "patterns": [ + { + "match": "((?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*\\)))", + "name": "string.other.link variable.language variable.parameter emphasis" + }, + { + "include": "#structure" + } + ] + }, + "pathModulePrefixSimple": { + "begin": "(?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*\\.)", + "end": "(?![[:space:]\\.])", + "beginCaptures": { + "0": { + "name": "entity.name.class constant.numeric" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?<![#\\-:!?.@*/&%^+<=>|~$])\\.(?![#\\-:!?.@*/&%^+<=>|~$])", + "end": "((?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*\\.))|((?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*))|(?![[:space:]\\.[:upper:]])", + "beginCaptures": { + "0": { + "name": "keyword strong" + } + }, + "endCaptures": { + "1": { + "name": "entity.name.class constant.numeric" + }, + "2": { + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" + } + } + } + ] + }, + "pathModuleSimple": { + "patterns": [ + { + "include": "#pathModulePrefixSimple" + }, + { + "match": "(?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)", + "name": "entity.name.class constant.numeric" + } + ] + }, + "pathRecord": { + "patterns": [ + { + "begin": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", + "end": "(?=[^[:space:]\\.])(?!\\(\\*)", + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]\\.|^\\.))(?![#\\-:!?.@*/&%^+<=>|~$]))|(?<![#\\-:!?.@*/&%^+<=>|~$])\\.(?![#\\-:!?.@*/&%^+<=>|~$])", + "end": "((?<![#\\-:!?.@*/&%^+<=>|~$])\\.(?![#\\-:!?.@*/&%^+<=>|~$]))|((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|mutable|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))|(?<=\\))|(?<=\\])", + "beginCaptures": { + "0": { + "name": "keyword strong" + } + }, + "endCaptures": { + "1": { + "name": "keyword strong" + }, + "2": { + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#pathModulePrefixSimple" + }, + { + "begin": "\\((?!\\*)", + "end": "\\)", + "captures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "include": "#term" + } + ] + }, + { + "begin": "\\[", + "end": "\\]", + "captures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "include": "#pattern" + } + ] + } + ] + } + ] + } + ] + }, + "pattern": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#patternArray" + }, + { + "include": "#patternLazy" + }, + { + "include": "#patternList" + }, + { + "include": "#patternMisc" + }, + { + "include": "#patternModule" + }, + { + "include": "#patternRecord" + }, + { + "include": "#literal" + }, + { + "include": "#patternParens" + }, + { + "include": "#patternType" + }, + { + "include": "#variablePattern" + }, + { + "include": "#termOperator" + } + ] + }, + "patternArray": { + "begin": "\\[\\|", + "end": "\\|\\]", + "captures": { + "0": { + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" + } + }, + "patterns": [ + { + "include": "#pattern" + } + ] + }, + "patternLazy": { + "match": "lazy", + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + }, + "patternList": { + "begin": "\\[", + "end": "\\]", + "captures": { + "0": { + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" + } + }, + "patterns": [ + { + "include": "#pattern" + } + ] + }, + "patternMisc": { + "match": "((?<![#\\-:!?.@*/&%^+<=>|~$]),(?![#\\-:!?.@*/&%^+<=>|~$]))|([#\\-:!?.@*/&%^+<=>|~$]+)|\\b(as)\\b", + "captures": { + "1": { + "name": "string.regexp strong" + }, + "2": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + }, + "3": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + } + }, + "patternModule": { + "begin": "\\bmodule\\b", + "end": "(?=\\))", + "beginCaptures": { + "0": { + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" + } + }, + "patterns": [ + { + "include": "#declModule" + } + ] + }, + "patternParens": { + "begin": "\\((?!\\))", + "end": "\\)", + "captures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?<![#\\-:!?.@*/&%^+<=>|~$]):(?![#\\-:!?.@*/&%^+<=>|~$])", + "end": "(?=\\))", + "beginCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + } + }, + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "include": "#pattern" + } + ] + }, + "patternRecord": { + "begin": "\\{", + "end": "\\}", + "captures": { + "0": { + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong strong" + } + }, + "patterns": [ + { + "begin": "(?<=\\{|;)", + "end": "(:)|(=)|(;)|(with)|(?=\\})", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + }, + "2": { + "name": "support.type strong" + }, + "3": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + }, + "4": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#pathModulePrefixSimple" + }, + { + "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename emphasis" + } + ] + }, + { + "begin": "(?:(?<=(?:[^[:word:]]with|^with))(?![[:word:]]))", + "end": "(:)|(=)|(;)|(?=\\})", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + }, + "2": { + "name": "support.type strong" + }, + "3": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename emphasis" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(;)|(=)|(?=\\})", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + }, + "2": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": ";|(?=\\})", + "endCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "include": "#pattern" + } + ] + } + ] + }, + "patternType": { + "begin": "\\btype\\b", + "end": "(?=\\))", + "beginCaptures": { + "0": { + "name": "keyword" + } + }, + "patterns": [ + { + "include": "#declType" + } + ] + }, + "pragma": { + "begin": "(?<![#\\-:!?.@*/&%^+<=>|~$])#(?![#\\-:!?.@*/&%^+<=>|~$])", + "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#literalNumber" + }, + { + "include": "#literalString" + } + ] + }, + "signature": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#signatureLiteral" + }, + { + "include": "#signatureFunctor" + }, + { + "include": "#pathModuleExtended" + }, + { + "include": "#signatureParens" + }, + { + "include": "#signatureRecovered" + }, + { + "include": "#signatureConstraints" + } + ] + }, + "signatureConstraints": { + "begin": "\\bwith\\b", + "end": "(?=\\))|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" + } + }, + "patterns": [ + { + "begin": "(?:(?<=(?:[^[:word:]]with|^with))(?![[:word:]]))", + "end": "\\b(?:(module)|(type))\\b", + "endCaptures": { + "1": { + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" + }, + "2": { + "name": "keyword" + } + } + }, + { + "include": "#declModule" + }, + { + "include": "#declType" + } + ] + }, + "signatureFunctor": { + "patterns": [ + { + "begin": "\\bfunctor\\b", + "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "0": { + "name": "keyword" + } + }, + "patterns": [ + { + "begin": "(?:(?<=(?:[^[:word:]]functor|^functor))(?![[:word:]]))", + "end": "(\\(\\))|(\\((?!\\)))", + "endCaptures": { + "1": { + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" + }, + "2": { + "name": "punctuation.definition.tag" + } + } + }, + { + "begin": "(?<=\\()", + "end": "(:)|(\\))", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + }, + "2": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#variableModule" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#signature" + } + ] + }, + { + "begin": "(?<=\\))", + "end": "(\\()|((?<![#\\-:!?.@*/&%^+<=>|~$])->(?![#\\-:!?.@*/&%^+<=>|~$]))", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag" + }, + "2": { + "name": "support.type strong" + } + } + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]->|^->))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "patterns": [ + { + "include": "#signature" + } + ] + } + ] + }, + { + "match": "(?<![#\\-:!?.@*/&%^+<=>|~$])->(?![#\\-:!?.@*/&%^+<=>|~$])", + "name": "support.type strong" + } + ] + }, + "signatureLiteral": { + "begin": "\\bsig\\b", + "end": "\\bend\\b", + "captures": { + "0": { + "name": "punctuation.definition.tag emphasis" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#pragma" + }, + { + "include": "#decl" + } + ] + }, + "signatureParens": { + "begin": "\\((?!\\))", + "end": "\\)", + "captures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?<![#\\-:!?.@*/&%^+<=>|~$]):(?![#\\-:!?.@*/&%^+<=>|~$])", + "end": "(?=\\))", + "beginCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + } + }, + "patterns": [ + { + "include": "#signature" + } + ] + }, + { + "include": "#signature" + } + ] + }, + "signatureRecovered": { + "patterns": [ + { + "begin": "\\(|(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:|[^#\\-:!?.@*/&%^+<=>|~$]->|^->))(?![#\\-:!?.@*/&%^+<=>|~$]))|(?:(?<=(?:[^[:word:]]include|^include|[^[:word:]]open|^open))(?![[:word:]]))", + "end": "\\bmodule\\b|(?!$|[[:space:]]|\\bmodule\\b)", + "endCaptures": { + "0": { + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" + } + } + }, + { + "begin": "(?:(?<=(?:[^[:word:]]module|^module))(?![[:word:]]))", + "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "patterns": [ + { + "begin": "(?:(?<=(?:[^[:word:]]module|^module))(?![[:word:]]))", + "end": "\\btype\\b", + "endCaptures": { + "0": { + "name": "keyword" + } + } + }, + { + "begin": "(?:(?<=(?:[^[:word:]]type|^type))(?![[:word:]]))", + "end": "\\bof\\b", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag" + } + } + }, + { + "begin": "(?:(?<=(?:[^[:word:]]of|^of))(?![[:word:]]))", + "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "patterns": [ + { + "include": "#signature" + } + ] + } + ] + } + ] + }, + "structure": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#structureLiteral" + }, + { + "include": "#structureFunctor" + }, + { + "include": "#pathModuleExtended" + }, + { + "include": "#structureParens" + } + ] + }, + "structureFunctor": { + "patterns": [ + { + "begin": "\\bfunctor\\b", + "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "0": { + "name": "keyword" + } + }, + "patterns": [ + { + "begin": "(?:(?<=(?:[^[:word:]]functor|^functor))(?![[:word:]]))", + "end": "(\\(\\))|(\\((?!\\)))", + "endCaptures": { + "1": { + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" + }, + "2": { + "name": "punctuation.definition.tag" + } + } + }, + { + "begin": "(?<=\\()", + "end": "(:)|(\\))", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + }, + "2": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#variableModule" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#signature" + } + ] + }, + { + "begin": "(?<=\\))", + "end": "(\\()|((?<![#\\-:!?.@*/&%^+<=>|~$])->(?![#\\-:!?.@*/&%^+<=>|~$]))", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag" + }, + "2": { + "name": "support.type strong" + } + } + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]->|^->))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "patterns": [ + { + "include": "#structure" + } + ] + } + ] + }, + { + "match": "(?<![#\\-:!?.@*/&%^+<=>|~$])->(?![#\\-:!?.@*/&%^+<=>|~$])", + "name": "support.type strong" + } + ] + }, + "structureLiteral": { + "begin": "\\bstruct\\b", + "end": "\\bend\\b", + "captures": { + "0": { + "name": "punctuation.definition.tag emphasis" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#pragma" + }, + { + "include": "#decl" + } + ] + }, + "structureParens": { + "begin": "\\(", + "end": "\\)", + "captures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#structureUnpack" + }, + { + "include": "#structure" + } + ] + }, + "structureUnpack": { + "begin": "\\bval\\b", + "end": "(?=\\))", + "beginCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + } + }, + "term": { + "patterns": [ + { + "include": "#termLet" + }, + { + "include": "#termAtomic" + } + ] + }, + "termAtomic": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#termConditional" + }, + { + "include": "#termConstructor" + }, + { + "include": "#termDelim" + }, + { + "include": "#termFor" + }, + { + "include": "#termFunction" + }, + { + "include": "#literal" + }, + { + "include": "#termMatch" + }, + { + "include": "#termMatchRule" + }, + { + "include": "#termPun" + }, + { + "include": "#termOperator" + }, + { + "include": "#termTry" + }, + { + "include": "#termWhile" + }, + { + "include": "#pathRecord" + } + ] + }, + "termConditional": { + "match": "\\b(?:if|then|else)\\b", + "name": "keyword.control" + }, + "termConstructor": { + "patterns": [ + { + "include": "#pathModulePrefixSimple" + }, + { + "match": "(?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)", + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" + } + ] + }, + "termDelim": { + "patterns": [ + { + "begin": "\\((?!\\))", + "end": "\\)", + "captures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#term" + } + ] + }, + { + "begin": "\\bbegin\\b", + "end": "\\bend\\b", + "captures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "include": "#attributeIdentifier" + }, + { + "include": "#term" + } + ] + } + ] + }, + "termFor": { + "patterns": [ + { + "begin": "\\bfor\\b", + "end": "\\bdone\\b", + "beginCaptures": { + "0": { + "name": "keyword.control" + } + }, + "endCaptures": { + "0": { + "name": "keyword.control" + } + }, + "patterns": [ + { + "begin": "(?:(?<=(?:[^[:word:]]for|^for))(?![[:word:]]))", + "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])=(?![#\\-:!?.@*/&%^+<=>|~$])", + "endCaptures": { + "0": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "include": "#pattern" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "\\b(?:downto|to)\\b", + "endCaptures": { + "0": { + "name": "keyword.control" + } + }, + "patterns": [ + { + "include": "#term" + } + ] + }, + { + "begin": "(?:(?<=(?:[^[:word:]]to|^to))(?![[:word:]]))", + "end": "\\bdo\\b", + "endCaptures": { + "0": { + "name": "keyword.control" + } + }, + "patterns": [ + { + "include": "#term" + } + ] + }, + { + "begin": "(?:(?<=(?:[^[:word:]]do|^do))(?![[:word:]]))", + "end": "(?=\\bdone\\b)", + "patterns": [ + { + "include": "#term" + } + ] + } + ] + } + ] + }, + "termFunction": { + "match": "\\b(?:(fun)|(function))\\b", + "captures": { + "1": { + "name": "storage.type" + }, + "2": { + "name": "storage.type" + } + } + }, + "termLet": { + "patterns": [ + { + "begin": "(?:(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=|[^#\\-:!?.@*/&%^+<=>|~$]->|^->))(?![#\\-:!?.@*/&%^+<=>|~$]))|(?<=;|\\())(?=[[:space:]]|\\blet\\b)|(?:(?<=(?:[^[:word:]]begin|^begin|[^[:word:]]do|^do|[^[:word:]]else|^else|[^[:word:]]in|^in|[^[:word:]]struct|^struct|[^[:word:]]then|^then|[^[:word:]]try|^try))(?![[:word:]]))|(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]@@|^@@))(?![#\\-:!?.@*/&%^+<=>|~$]))[[:space:]]+", + "end": "\\b(?:(and)|(let))\\b|(?=[^[:space:]])(?!\\(\\*)", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" + }, + "2": { + "name": "storage.type markup.underline" + } + }, + "patterns": [ + { + "include": "#comment" + } + ] + }, + { + "begin": "(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]let|^let))(?![[:word:]]))|(let)", + "end": "\\b(?:(and)|(in))\\b|(?=\\}|\\)|\\]|\\b(?:end|class|exception|external|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "1": { + "name": "storage.type markup.underline" + } + }, + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" + }, + "2": { + "name": "storage.type markup.underline" + } + }, + "patterns": [ + { + "include": "#bindTerm" + } + ] + } + ] + }, + "termMatch": { + "begin": "\\bmatch\\b", + "end": "\\bwith\\b", + "captures": { + "0": { + "name": "keyword.control" + } + }, + "patterns": [ + { + "include": "#term" + } + ] + }, + "termMatchRule": { + "patterns": [ + { + "begin": "(?:(?<=(?:[^[:word:]]fun|^fun|[^[:word:]]function|^function|[^[:word:]]with|^with))(?![[:word:]]))", + "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])(\\|)|(->)(?![#\\-:!?.@*/&%^+<=>|~$])", + "endCaptures": { + "1": { + "name": "support.type strong" + }, + "2": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#attributeIdentifier" + }, + { + "include": "#pattern" + } + ] + }, + { + "begin": "(?:(?<=(?:[^\\[#\\-:!?.@*/&%^+<=>|~$]\\||^\\|))(?![#\\-:!?.@*/&%^+<=>|~$]))|(?<![#\\-:!?.@*/&%^+<=>|~$])\\|(?![#\\-:!?.@*/&%^+<=>|~$])", + "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])(\\|)|(->)(?![#\\-:!?.@*/&%^+<=>|~$])", + "beginCaptures": { + "0": { + "name": "support.type strong" + } + }, + "endCaptures": { + "1": { + "name": "support.type strong" + }, + "2": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "include": "#pattern" + }, + { + "begin": "\\bwhen\\b", + "end": "(?=(?<![#\\-:!?.@*/&%^+<=>|~$])->(?![#\\-:!?.@*/&%^+<=>|~$]))", + "beginCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "include": "#term" + } + ] + } + ] + } + ] + }, + "termOperator": { + "patterns": [ + { + "begin": "(?<![#\\-:!?.@*/&%^+<=>|~$])#(?![#\\-:!?.@*/&%^+<=>|~$])", + "end": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", + "beginCaptures": { + "0": { + "name": "keyword" + } + }, + "endCaptures": { + "0": { + "name": "entity.name.function" + } + } + }, + { + "match": "<-", + "captures": { + "0": { + "name": "keyword.control strong" + } + } + }, + { + "match": "(,|[#\\-:!?.@*/&%^+<=>|~$]+)|(;)", + "captures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + }, + "2": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + } + }, + { + "match": "\\b(?:and|assert|asr|land|lazy|lsr|lxor|mod|new|or)\\b", + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + ] + }, + "termPun": { + "begin": "(?<![#\\-:!?.@*/&%^+<=>|~$])\\?|~(?![#\\-:!?.@*/&%^+<=>|~$])", + "end": ":|(?=[^[:space:]:])", + "applyEndPatternLast": true, + "beginCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "endCaptures": { + "0": { + "name": "keyword" + } + }, + "patterns": [ + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]\\?|^\\?|[^#\\-:!?.@*/&%^+<=>|~$]~|^~))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", + "endCaptures": { + "0": { + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" + } + } + } + ] + }, + "termTry": { + "begin": "\\btry\\b", + "end": "\\bwith\\b", + "captures": { + "0": { + "name": "keyword.control" + } + }, + "patterns": [ + { + "include": "#term" + } + ] + }, + "termWhile": { + "patterns": [ + { + "begin": "\\bwhile\\b", + "end": "\\bdone\\b", + "beginCaptures": { + "0": { + "name": "keyword.control" + } + }, + "endCaptures": { + "0": { + "name": "keyword.control" + } + }, + "patterns": [ + { + "begin": "(?:(?<=(?:[^[:word:]]while|^while))(?![[:word:]]))", + "end": "\\bdo\\b", + "endCaptures": { + "0": { + "name": "keyword.control" + } + }, + "patterns": [ + { + "include": "#term" + } + ] + }, + { + "begin": "(?:(?<=(?:[^[:word:]]do|^do))(?![[:word:]]))", + "end": "(?=\\bdone\\b)", + "patterns": [ + { + "include": "#term" + } + ] + } + ] + } + ] + }, + "type": { + "patterns": [ + { + "include": "#comment" + }, + { + "match": "\\bnonrec\\b", + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + }, + { + "include": "#pathModulePrefixExtended" + }, + { + "include": "#typeLabel" + }, + { + "include": "#typeObject" + }, + { + "include": "#typeOperator" + }, + { + "include": "#typeParens" + }, + { + "include": "#typePolymorphicVariant" + }, + { + "include": "#typeRecord" + }, + { + "include": "#typeConstructor" + } + ] + }, + "typeConstructor": { + "patterns": [ + { + "begin": "(_)|((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))|(')((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))|(?<=[^\\*]\\)|\\])", + "end": "(?=\\((?!\\*)|\\*|:|,|=|\\.|>|-|\\{|\\[|\\+|\\}|\\)|\\]|;|\\|)|((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))[:space:]*(?!\\(\\*|[[:word:]])|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", + "beginCaptures": { + "1": { + "name": "comment constant.regexp meta.separator.markdown" + }, + "3": { + "name": "string.other.link variable.language variable.parameter emphasis strong emphasis" + }, + "4": { + "name": "keyword.control emphasis" + } + }, + "endCaptures": { + "1": { + "name": "entity.name.function strong" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#pathModulePrefixExtended" + } + ] + } + ] + }, + "typeLabel": { + "patterns": [ + { + "begin": "(\\??)((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))[[:space:]]*((?<![#\\-:!?.@*/&%^+<=>|~$]):(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(?=(?<![#\\-:!?.@*/&%^+<=>|~$])->(?![#\\-:!?.@*/&%^+<=>|~$]))", + "captures": { + "1": { + "name": "keyword strong emphasis" + }, + "2": { + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename emphasis" + }, + "3": { + "name": "keyword" + } + }, + "patterns": [ + { + "include": "#type" + } + ] + } + ] + }, + "typeModule": { + "begin": "\\bmodule\\b", + "end": "(?=\\))", + "beginCaptures": { + "0": { + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" + } + }, + "patterns": [ + { + "include": "#pathModuleExtended" + }, + { + "include": "#signatureConstraints" + } + ] + }, + "typeObject": { + "begin": "<", + "end": ">", + "captures": { + "0": { + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong strong" + } + }, + "patterns": [ + { + "begin": "(?<=<|;)", + "end": "(:)|(?=>)", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + }, + "3": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + }, + "4": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#pathModulePrefixSimple" + }, + { + "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename emphasis" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(;)|(?=>)", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + }, + "2": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "include": "#type" + } + ] + } + ] + }, + "typeOperator": { + "patterns": [ + { + "match": ",|;|[#\\-:!?.@*/&%^+<=>|~$]+", + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + } + ] + }, + "typeParens": { + "begin": "\\(", + "end": "\\)", + "captures": { + "0": { + "name": "punctuation.definition.tag" + } + }, + "patterns": [ + { + "match": ",", + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + }, + { + "include": "#typeModule" + }, + { + "include": "#type" + } + ] + }, + "typePolymorphicVariant": { + "begin": "\\[", + "end": "\\]", + "patterns": [] + }, + "typeRecord": { + "begin": "\\{", + "end": "\\}", + "captures": { + "0": { + "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong strong" + } + }, + "patterns": [ + { + "begin": "(?<=\\{|;)", + "end": "(:)|(=)|(;)|(with)|(?=\\})", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + }, + "2": { + "name": "support.type strong" + }, + "3": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + }, + "4": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#pathModulePrefixSimple" + }, + { + "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename emphasis" + } + ] + }, + { + "begin": "(?:(?<=(?:[^[:word:]]with|^with))(?![[:word:]]))", + "end": "(:)|(=)|(;)|(?=\\})", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" + }, + "2": { + "name": "support.type strong" + }, + "3": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", + "name": "markup.inserted constant.language support.constant.property-value entity.name.filename emphasis" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": "(;)|(=)|(?=\\})", + "endCaptures": { + "1": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + }, + "2": { + "name": "support.type strong" + } + }, + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", + "end": ";|(?=\\})", + "endCaptures": { + "0": { + "name": "variable.other.class.js message.error variable.interpolation string.regexp" + } + }, + "patterns": [ + { + "include": "#type" + } + ] + } + ] + }, + "variableModule": { + "match": "(?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)", + "captures": { + "0": { + "name": "string.other.link variable.language variable.parameter emphasis" + } + } + }, + "variablePattern": { + "match": "(\\b_\\b)|((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))", + "captures": { + "1": { + "name": "comment constant.regexp meta.separator.markdown" + }, + "2": { + "name": "string.other.link variable.language variable.parameter emphasis" + } + } + } + } +} diff --git a/src/lib/shiki/languages/pascal.tmLanguage.json b/src/lib/shiki/languages/pascal.tmLanguage.json new file mode 100644 index 0000000..4b05ee3 --- /dev/null +++ b/src/lib/shiki/languages/pascal.tmLanguage.json @@ -0,0 +1,145 @@ +{ + "fileTypes": ["pas", "p", "pp", "dfm", "fmx", "dpr", "dpk", "lfm", "lpr"], + "keyEquivalent": "^~P", + "name": "pascal", + "patterns": [ + { + "match": "\\b(?i:(absolute|abstract|add|all|and_then|array|as|asc|asm|assembler|async|attribute|autoreleasepool|await|begin|bindable|block|by|case|cdecl|class|concat|const|constref|copy|cppdecl|contains|default|delegate|deprecated|desc|distinct|div|each|else|empty|end|ensure|enum|equals|event|except|export|exports|extension|external|far|file|finalization|finalizer|finally|flags|forward|from|future|generic|goto|group|has|helper|if|implements|implies|import|in|index|inherited|initialization|inline|interrupt|into|invariants|is|iterator|label|library|join|lazy|lifetimestrategy|locked|locking|loop|mapped|matching|method|mod|module|name|namespace|near|nested|new|nostackframe|not|notify|nullable|object|of|old|oldfpccall|on|only|operator|optional|or_else|order|otherwise|out|override|package|packed|parallel|params|partial|pascal|pinned|platform|pow|private|program|protected|public|published|interface|implementation|qualified|queryable|raises|read|readonly|record|reference|register|remove|resident|require|requires|resourcestring|restricted|result|reverse|safecall|sealed|segment|select|selector|sequence|set|shl|shr|skip|specialize|soft|static|stored|stdcall|step|strict|strong|take|then|threadvar|to|try|tuple|type|unconstrained|unit|unmanaged|unretained|unsafe|uses|using|var|view|virtual|volatile|weak|dynamic|overload|reintroduce|where|with|write|xor|yield))\\b", + "name": "keyword.pascal" + }, + { + "captures": { + "1": { + "name": "storage.type.prototype.pascal" + }, + "2": { + "name": "entity.name.function.prototype.pascal" + } + }, + "match": "\\b(?i:(function|procedure|constructor|destructor))\\b\\s+(\\w+(\\.\\w+)?)(\\(.*?\\))?;\\s*(?=(?i:attribute|forward|external))", + "name": "meta.function.prototype.pascal" + }, + { + "captures": { + "1": { + "name": "storage.type.function.pascal" + }, + "2": { + "name": "entity.name.function.pascal" + } + }, + "match": "\\b(?i:(function|procedure|constructor|destructor|property|read|write))\\b\\s+(\\w+(\\.\\w+)?)", + "name": "meta.function.pascal" + }, + { + "match": "\\b(?i:(self|result))\\b", + "name": "token.variable" + }, + { + "match": "\\b(?i:(and|or))\\b", + "name": "keyword.operator.pascal" + }, + { + "match": "\\b(?i:(break|continue|exit|abort|while|do|downto|for|raise|repeat|until))\\b", + "name": "keyword.control.pascal" + }, + { + "begin": "\\{\\$", + "captures": { + "0": { + "name": "string.regexp" + } + }, + "end": "\\}", + "name": "string.regexp" + }, + { + "match": "\\b(?i:(ansichar|ansistring|boolean|byte|cardinal|char|comp|currency|double|dword|extended|file|integer|int64|longint|longword|nativeint|nativeuint|olevariant|pansichar|pchar|pwidechar|pointer|real|shortint|shortstring|single|smallint|string|uint64|variant|widechar|widestring|word|wordbool))\\b", + "name": "storage.support.type.pascal" + }, + { + "match": "\\b(\\d+)|(\\d*\\.\\d+([eE][\\-+]?\\d+)?)\\b", + "name": "constant.numeric.pascal" + }, + { + "match": "\\$[0-9a-fA-F]{1,16}\\b", + "name": "constant.numeric.hex.pascal" + }, + { + "match": "\\b(?i:(true|false|nil))\\b", + "name": "constant.language.pascal" + }, + { + "match": "\\b(?i:(Assert))\\b", + "name": "keyword.control" + }, + { + "begin": "(^[ \\t]+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.pascal" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.pascal" + } + }, + "end": "\\n", + "name": "comment.line.double-slash.pascal.two" + } + ] + }, + { + "begin": "\\(\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.pascal" + } + }, + "end": "\\*\\)", + "name": "comment.block.pascal.one" + }, + { + "begin": "\\{(?!\\$)", + "captures": { + "0": { + "name": "punctuation.definition.comment.pascal" + } + }, + "end": "\\}", + "name": "comment.block.pascal.two" + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.pascal" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.pascal" + } + }, + "name": "string.quoted.single.pascal", + "patterns": [ + { + "match": "''", + "name": "constant.character.escape.apostrophe.pascal" + } + ] + }, + { + "match": "\\#\\d+", + "name": "string.other.pascal" + } + ], + "scopeName": "source.pascal", + "uuid": "F42FA544-6B1C-11D9-9517-000D93589AF6" +} diff --git a/src/lib/shiki/languages/perl.tmLanguage.json b/src/lib/shiki/languages/perl.tmLanguage.json new file mode 100644 index 0000000..8639b4e --- /dev/null +++ b/src/lib/shiki/languages/perl.tmLanguage.json @@ -0,0 +1,2977 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/perl.tmbundle/blob/master/Syntaxes/Perl.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/textmate/perl.tmbundle/commit/a85927a902d6e5d7805f56a653f324d34dfad53a", + "name": "perl", + "scopeName": "source.perl", + "comment": "\n\tTODO:\tInclude RegExp syntax\n", + "patterns": [ + { + "include": "#line_comment" + }, + { + "begin": "^(?==[a-zA-Z]+)", + "end": "^(=cut\\b.*$)", + "endCaptures": { + "1": { + "patterns": [ + { + "include": "#pod" + } + ] + } + }, + "name": "comment.block.documentation.perl", + "patterns": [ + { + "include": "#pod" + } + ] + }, + { + "include": "#variable" + }, + { + "applyEndPatternLast": 1, + "begin": "\\b(?=qr\\s*[^\\s\\w])", + "comment": "string.regexp.compile.perl", + "end": "((([egimosxradlupcn]*)))(?=(\\s+\\S|\\s*[;\\,\\#\\{\\}\\)]|\\s*$))", + "endCaptures": { + "1": { + "name": "string.regexp.compile.perl" + }, + "2": { + "name": "punctuation.definition.string.perl" + }, + "3": { + "name": "keyword.control.regexp-option.perl" + } + }, + "patterns": [ + { + "begin": "(qr)\\s*\\{", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\}", + "name": "string.regexp.compile.nested_braces.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_braces_interpolated" + } + ] + }, + { + "begin": "(qr)\\s*\\[", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\]", + "name": "string.regexp.compile.nested_brackets.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_brackets_interpolated" + } + ] + }, + { + "begin": "(qr)\\s*<", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": ">", + "name": "string.regexp.compile.nested_ltgt.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_ltgt_interpolated" + } + ] + }, + { + "begin": "(qr)\\s*\\(", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\)", + "name": "string.regexp.compile.nested_parens.perl", + "patterns": [ + { + "comment": "This is to prevent thinks like qr/foo$/ to treat $/ as a variable", + "match": "\\$(?=[^\\s\\w\\\\'\\{\\[\\(\\<])" + }, + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_parens_interpolated" + } + ] + }, + { + "begin": "(qr)\\s*'", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "'", + "name": "string.regexp.compile.single-quote.perl", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(qr)\\s*([^\\s\\w'\\{\\[\\(\\<])", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\2", + "name": "string.regexp.compile.simple-delimiter.perl", + "patterns": [ + { + "comment": "This is to prevent thinks like qr/foo$/ to treat $/ as a variable", + "match": "\\$(?=[^\\s\\w'\\{\\[\\(\\<])", + "name": "keyword.control.anchor.perl" + }, + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_parens_interpolated" + } + ] + } + ] + }, + { + "applyEndPatternLast": 1, + "begin": "(?<!\\{|\\+|\\-)\\b(?=m\\s*[^\\sa-zA-Z0-9])", + "comment": "string.regexp.find-m.perl", + "end": "((([egimosxradlupcn]*)))(?=(\\s+\\S|\\s*[;\\,\\#\\{\\}\\)]|\\s*$))", + "endCaptures": { + "1": { + "name": "string.regexp.find-m.perl" + }, + "2": { + "name": "punctuation.definition.string.perl" + }, + "3": { + "name": "keyword.control.regexp-option.perl" + } + }, + "patterns": [ + { + "begin": "(m)\\s*\\{", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\}", + "name": "string.regexp.find-m.nested_braces.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_braces_interpolated" + } + ] + }, + { + "begin": "(m)\\s*\\[", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\]", + "name": "string.regexp.find-m.nested_brackets.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_brackets_interpolated" + } + ] + }, + { + "begin": "(m)\\s*<", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": ">", + "name": "string.regexp.find-m.nested_ltgt.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_ltgt_interpolated" + } + ] + }, + { + "begin": "(m)\\s*\\(", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\)", + "name": "string.regexp.find-m.nested_parens.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_parens_interpolated" + } + ] + }, + { + "begin": "(m)\\s*'", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "'", + "name": "string.regexp.find-m.single-quote.perl", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "\\G(?<!\\{|\\+|\\-)(m)(?!_)\\s*([^\\sa-zA-Z0-9'\\{\\[\\(\\<])", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\2", + "name": "string.regexp.find-m.simple-delimiter.perl", + "patterns": [ + { + "comment": "This is to prevent thinks like qr/foo$/ to treat $/ as a variable", + "match": "\\$(?=[^\\sa-zA-Z0-9'\\{\\[\\(\\<])", + "name": "keyword.control.anchor.perl" + }, + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "begin": "\\[", + "beginCaptures": { + "1": { + "name": "punctuation.definition.character-class.begin.perl" + } + }, + "end": "\\]", + "endCaptures": { + "1": { + "name": "punctuation.definition.character-class.end.perl" + } + }, + "name": "constant.other.character-class.set.perl", + "patterns": [ + { + "comment": "This is to prevent thinks like qr/foo$/ to treat $/ as a variable", + "match": "\\$(?=[^\\s\\w'\\{\\[\\(\\<])", + "name": "keyword.control.anchor.perl" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "include": "#nested_parens_interpolated" + } + ] + } + ] + }, + { + "applyEndPatternLast": 1, + "begin": "\\b(?=(?<!\\&)(s)(\\s+\\S|\\s*[;\\,\\{\\}\\(\\)\\[<]|$))", + "comment": "string.regexp.replace.perl", + "end": "((([egimosxradlupcn]*)))(?=(\\s+\\S|\\s*[;\\,\\{\\}\\)\\]>]|\\s*$))", + "endCaptures": { + "1": { + "name": "string.regexp.replace.perl" + }, + "2": { + "name": "punctuation.definition.string.perl" + }, + "3": { + "name": "keyword.control.regexp-option.perl" + } + }, + "patterns": [ + { + "begin": "(s)\\s*\\{", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\}", + "name": "string.regexp.nested_braces.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_braces" + } + ] + }, + { + "begin": "(s)\\s*\\[", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\]", + "name": "string.regexp.nested_brackets.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_brackets" + } + ] + }, + { + "begin": "(s)\\s*<", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": ">", + "name": "string.regexp.nested_ltgt.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_ltgt" + } + ] + }, + { + "begin": "(s)\\s*\\(", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "\\)", + "name": "string.regexp.nested_parens.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_parens" + } + ] + }, + { + "begin": "\\{", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "\\}", + "name": "string.regexp.format.nested_braces.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_braces_interpolated" + } + ] + }, + { + "begin": "\\[", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "\\]", + "name": "string.regexp.format.nested_brackets.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_brackets_interpolated" + } + ] + }, + { + "begin": "<", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": ">", + "name": "string.regexp.format.nested_ltgt.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_ltgt_interpolated" + } + ] + }, + { + "begin": "\\(", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "\\)", + "name": "string.regexp.format.nested_parens.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_parens_interpolated" + } + ] + }, + { + "begin": "'", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "'", + "name": "string.regexp.format.single_quote.perl", + "patterns": [ + { + "match": "\\\\['\\\\]", + "name": "constant.character.escape.perl" + } + ] + }, + { + "begin": "([^\\s\\w\\[({<;])", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "\\1", + "name": "string.regexp.format.simple_delimiter.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "match": "\\s+" + } + ] + }, + { + "begin": "\\b(?=s([^\\sa-zA-Z0-9\\[({<]).*\\1([egimosxradlupcn]*)([\\}\\)\\;\\,]|\\s+))", + "comment": "string.regexp.replaceXXX", + "end": "((([egimosxradlupcn]*)))(?=([\\}\\)\\;\\,]|\\s+|\\s*$))", + "endCaptures": { + "1": { + "name": "string.regexp.replace.perl" + }, + "2": { + "name": "punctuation.definition.string.perl" + }, + "3": { + "name": "keyword.control.regexp-option.perl" + } + }, + "patterns": [ + { + "begin": "(s\\s*)([^\\sa-zA-Z0-9\\[({<])", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "(?=\\2)", + "name": "string.regexp.replaceXXX.simple_delimiter.perl", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "'", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "'", + "name": "string.regexp.replaceXXX.format.single_quote.perl", + "patterns": [ + { + "match": "\\\\['\\\\]", + "name": "constant.character.escape.perl.perl" + } + ] + }, + { + "begin": "([^\\sa-zA-Z0-9\\[({<])", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "\\1", + "name": "string.regexp.replaceXXX.format.simple_delimiter.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + } + ] + }, + { + "begin": "\\b(?=(?<!\\\\)s\\s*([^\\s\\w\\[({<>]))", + "comment": "string.regexp.replace.extended", + "end": "((([egimosradlupc]*x[egimosradlupc]*)))\\b", + "endCaptures": { + "1": { + "name": "string.regexp.replace.perl" + }, + "2": { + "name": "punctuation.definition.string.perl" + }, + "3": { + "name": "keyword.control.regexp-option.perl" + } + }, + "patterns": [ + { + "begin": "(s)\\s*(.)", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + }, + "1": { + "name": "support.function.perl" + } + }, + "end": "(?=\\2)", + "name": "string.regexp.replace.extended.simple_delimiter.perl", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "'", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "'(?=[egimosradlupc]*x[egimosradlupc]*)\\b", + "name": "string.regexp.replace.extended.simple_delimiter.perl", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(.)", + "captures": { + "0": { + "name": "punctuation.definition.string.perl" + } + }, + "end": "\\1(?=[egimosradlupc]*x[egimosradlupc]*)\\b", + "name": "string.regexp.replace.extended.simple_delimiter.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + } + ] + }, + { + "begin": "(?<=\\(|\\{|~|&|\\||if|unless|^)\\s*((\\/))", + "beginCaptures": { + "1": { + "name": "string.regexp.find.perl" + }, + "2": { + "name": "punctuation.definition.string.perl" + } + }, + "contentName": "string.regexp.find.perl", + "end": "((\\1([egimosxradlupcn]*)))(?=(\\s+\\S|\\s*[;\\,\\#\\{\\}\\)]|\\s*$))", + "endCaptures": { + "1": { + "name": "string.regexp.find.perl" + }, + "2": { + "name": "punctuation.definition.string.perl" + }, + "3": { + "name": "keyword.control.regexp-option.perl" + } + }, + "patterns": [ + { + "comment": "This is to prevent thinks like /foo$/ to treat $/ as a variable", + "match": "\\$(?=\\/)", + "name": "keyword.control.anchor.perl" + }, + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "captures": { + "1": { + "name": "constant.other.key.perl" + } + }, + "match": "\\b(\\w+)\\s*(?==>)" + }, + { + "match": "(?<={)\\s*\\w+\\s*(?=})", + "name": "constant.other.bareword.perl" + }, + { + "captures": { + "1": { + "name": "keyword.control.perl" + }, + "2": { + "name": "entity.name.type.class.perl" + } + }, + "match": "^\\s*(package)\\s+([^\\s;]+)", + "name": "meta.class.perl" + }, + { + "captures": { + "1": { + "name": "storage.type.sub.perl" + }, + "2": { + "name": "entity.name.function.perl" + }, + "3": { + "name": "storage.type.method.perl" + } + }, + "match": "\\b(sub)(?:\\s+([-a-zA-Z0-9_]+))?\\s*(?:\\([\\$\\@\\*;]*\\))?[^\\w\\{]", + "name": "meta.function.perl" + }, + { + "captures": { + "1": { + "name": "entity.name.function.perl" + }, + "2": { + "name": "punctuation.definition.parameters.perl" + }, + "3": { + "name": "variable.parameter.function.perl" + } + }, + "match": "^\\s*(BEGIN|UNITCHECK|CHECK|INIT|END|DESTROY)\\b", + "name": "meta.function.perl" + }, + { + "begin": "^(?=(\\t| {4}))", + "end": "(?=[^\\t\\s])", + "name": "meta.leading-tabs", + "patterns": [ + { + "captures": { + "1": { + "name": "meta.odd-tab" + }, + "2": { + "name": "meta.even-tab" + } + }, + "match": "(\\t| {4})(\\t| {4})?" + } + ] + }, + { + "captures": { + "1": { + "name": "support.function.perl" + }, + "2": { + "name": "punctuation.definition.string.perl" + }, + "5": { + "name": "punctuation.definition.string.perl" + }, + "8": { + "name": "punctuation.definition.string.perl" + } + }, + "match": "\\b(tr|y)\\s*([^A-Za-z0-9\\s])(.*?)(?<!\\\\)(\\\\{2})*(\\2)(.*?)(?<!\\\\)(\\\\{2})*(\\2)", + "name": "string.regexp.replace.perl" + }, + { + "match": "\\b(__FILE__|__LINE__|__PACKAGE__|__SUB__)\\b", + "name": "constant.language.perl" + }, + { + "begin": "\\b(__DATA__|__END__)\\n?", + "beginCaptures": { + "1": { + "name": "constant.language.perl" + } + }, + "contentName": "comment.block.documentation.perl", + "end": "\\z", + "patterns": [ + { + "include": "#pod" + } + ] + }, + { + "match": "(?<!->)\\b(continue|default|die|do|else|elsif|exit|for|foreach|given|goto|if|last|next|redo|return|select|unless|until|wait|when|while|switch|case|require|use|eval)\\b", + "name": "keyword.control.perl" + }, + { + "match": "\\b(my|our|local)\\b", + "name": "storage.modifier.perl" + }, + { + "match": "(?<!\\w)\\-[rwxoRWXOezsfdlpSbctugkTBMAC]\\b", + "name": "keyword.operator.filetest.perl" + }, + { + "match": "\\b(and|or|xor|as|not)\\b", + "name": "keyword.operator.logical.perl" + }, + { + "match": "(<=>|=>|->)", + "name": "keyword.operator.comparison.perl" + }, + { + "include": "#heredoc" + }, + { + "begin": "\\bqq\\s*([^\\(\\{\\[\\<\\w\\s])", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\1", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.qq.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqx\\s*([^'\\(\\{\\[\\<\\w\\s])", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\1", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.interpolated.qx.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqx\\s*'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.interpolated.qx.single-quote.perl", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.double.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "(?<!->)\\bqw?\\s*([^\\(\\{\\[\\<\\w\\s])", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\1", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.q.perl" + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.single.perl", + "patterns": [ + { + "match": "\\\\['\\\\]", + "name": "constant.character.escape.perl" + } + ] + }, + { + "begin": "`", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.interpolated.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "(?<!->)\\bqq\\s*\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.qq-paren.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_parens_interpolated" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqq\\s*\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.qq-brace.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_braces_interpolated" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqq\\s*\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.qq-bracket.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_brackets_interpolated" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqq\\s*\\<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\>", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.qq-ltgt.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_ltgt_interpolated" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "(?<!->)\\bqx\\s*\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.interpolated.qx-paren.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_parens_interpolated" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqx\\s*\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.interpolated.qx-brace.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_braces_interpolated" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqx\\s*\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.interpolated.qx-bracket.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_brackets_interpolated" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "\\bqx\\s*\\<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\>", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.interpolated.qx-ltgt.perl", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_ltgt_interpolated" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "(?<!->)\\bqw?\\s*\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.q-paren.perl", + "patterns": [ + { + "include": "#nested_parens" + } + ] + }, + { + "begin": "\\bqw?\\s*\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.q-brace.perl", + "patterns": [ + { + "include": "#nested_braces" + } + ] + }, + { + "begin": "\\bqw?\\s*\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.q-bracket.perl", + "patterns": [ + { + "include": "#nested_brackets" + } + ] + }, + { + "begin": "\\bqw?\\s*\\<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\\>", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.other.q-ltgt.perl", + "patterns": [ + { + "include": "#nested_ltgt" + } + ] + }, + { + "begin": "^__\\w+__", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "$", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.unquoted.program-block.perl" + }, + { + "begin": "\\b(format)\\s+(\\w+)\\s*=", + "beginCaptures": { + "1": { + "name": "support.function.perl" + }, + "2": { + "name": "entity.name.function.format.perl" + } + }, + "end": "^\\.\\s*$", + "name": "meta.format.perl", + "patterns": [ + { + "include": "#line_comment" + }, + { + "include": "#variable" + } + ] + }, + { + "captures": { + "1": { + "name": "support.function.perl" + }, + "2": { + "name": "entity.name.function.perl" + } + }, + "match": "\\b(x)\\s*(\\d+)\\b" + }, + { + "match": "\\b(ARGV|DATA|ENV|SIG|STDERR|STDIN|STDOUT|atan2|bind|binmode|bless|caller|chdir|chmod|chomp|chop|chown|chr|chroot|close|closedir|cmp|connect|cos|crypt|dbmclose|dbmopen|defined|delete|dump|each|endgrent|endhostent|endnetent|endprotoent|endpwent|endservent|eof|eq|eval|exec|exists|exp|fcntl|fileno|flock|fork|formline|ge|getc|getgrent|getgrgid|getgrnam|gethostbyaddr|gethostbyname|gethostent|getlogin|getnetbyaddr|getnetbyname|getnetent|getpeername|getpgrp|getppid|getpriority|getprotobyname|getprotobynumber|getprotoent|getpwent|getpwnam|getpwuid|getservbyname|getservbyport|getservent|getsockname|getsockopt|glob|gmtime|grep|gt|hex|import|index|int|ioctl|join|keys|kill|lc|lcfirst|le|length|link|listen|local|localtime|log|lstat|lt|m|map|mkdir|msgctl|msgget|msgrcv|msgsnd|ne|no|oct|open|opendir|ord|pack|pipe|pop|pos|print|printf|push|quotemeta|rand|read|readdir|readlink|recv|ref|rename|reset|reverse|rewinddir|rindex|rmdir|s|say|scalar|seek|seekdir|semctl|semget|semop|send|setgrent|sethostent|setnetent|setpgrp|setpriority|setprotoent|setpwent|setservent|setsockopt|shift|shmctl|shmget|shmread|shmwrite|shutdown|sin|sleep|socket|socketpair|sort|splice|split|sprintf|sqrt|srand|stat|study|substr|symlink|syscall|sysopen|sysread|system|syswrite|tell|telldir|tie|tied|time|times|tr|truncate|uc|ucfirst|umask|undef|unlink|unpack|unshift|untie|utime|values|vec|waitpid|wantarray|warn|write|y)\\b", + "name": "support.function.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.section.scope.begin.perl" + }, + "2": { + "name": "punctuation.section.scope.end.perl" + } + }, + "comment": "Match empty brackets for ↩ snippet", + "match": "(\\{)(\\})" + }, + { + "captures": { + "1": { + "name": "punctuation.section.scope.begin.perl" + }, + "2": { + "name": "punctuation.section.scope.end.perl" + } + }, + "comment": "Match empty parenthesis for ↩ snippet", + "match": "(\\()(\\))" + } + ], + "repository": { + "escaped_char": { + "patterns": [ + { + "match": "\\\\\\d+", + "name": "constant.character.escape.perl" + }, + { + "match": "\\\\c[^\\s\\\\]", + "name": "constant.character.escape.perl" + }, + { + "match": "\\\\g(?:\\{(?:\\w*|-\\d+)\\}|\\d+)", + "name": "constant.character.escape.perl" + }, + { + "match": "\\\\k(?:\\{\\w*\\}|<\\w*>|'\\w*')", + "name": "constant.character.escape.perl" + }, + { + "match": "\\\\N\\{[^\\}]*\\}", + "name": "constant.character.escape.perl" + }, + { + "match": "\\\\o\\{\\d*\\}", + "name": "constant.character.escape.perl" + }, + { + "match": "\\\\(?:p|P)(?:\\{\\w*\\}|P)", + "name": "constant.character.escape.perl" + }, + { + "match": "\\\\x(?:[0-9a-zA-Z]{2}|\\{\\w*\\})?", + "name": "constant.character.escape.perl" + }, + { + "match": "\\\\.", + "name": "constant.character.escape.perl" + } + ] + }, + "heredoc": { + "patterns": [ + { + "begin": "((((<<(~)?) *')(HTML)(')))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.raw.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.raw.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.raw.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.html", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "text.html.basic", + "patterns": [ + { + "include": "text.html.basic" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *')(XML)(')))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.raw.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.raw.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.raw.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.xml", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "text.xml", + "patterns": [ + { + "include": "text.xml" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *')(CSS)(')))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.raw.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.raw.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.raw.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.css", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "source.css", + "patterns": [ + { + "include": "source.css" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *')(JAVASCRIPT)(')))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.raw.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.raw.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.raw.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.js", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "source.js", + "patterns": [ + { + "include": "source.js" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *')(SQL)(')))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.raw.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.raw.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.raw.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.sql", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "source.sql", + "patterns": [ + { + "include": "source.sql" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *')(POSTSCRIPT)(')))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.raw.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.raw.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.raw.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.postscript", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "source.postscript", + "patterns": [ + { + "include": "source.postscript" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *')([^']*)(')))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.raw.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.raw.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.raw.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + } + }, + { + "begin": "((((<<(~)?) *\\\\)((?![=\\d\\$\\( ])[^;,'\"`\\s\\)]*)()))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.raw.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.raw.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.raw.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + } + }, + { + "begin": "((((<<(~)?) *\")(HTML)(\")))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.interpolated.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.html", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "text.html.basic", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "text.html.basic" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *\")(XML)(\")))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.interpolated.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.xml", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "text.xml", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "text.xml" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *\")(CSS)(\")))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.interpolated.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.css", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "source.css", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "source.css" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *\")(JAVASCRIPT)(\")))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.interpolated.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.js", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "source.js", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "source.js" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *\")(SQL)(\")))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.interpolated.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.sql", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "source.sql", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "source.sql" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *\")(POSTSCRIPT)(\")))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.interpolated.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.postscript", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "source.postscript", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "source.postscript" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *\")([^\"]*)(\")))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.interpolated.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "((((<<(~)?) *)(HTML)()))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.interpolated.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.html", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "text.html.basic", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "text.html.basic" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *)(XML)()))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.interpolated.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.xml", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "text.xml", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "text.xml" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *)(CSS)()))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.interpolated.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.css", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "source.css", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "source.css" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *)(JAVASCRIPT)()))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.interpolated.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.js", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "source.js", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "source.js" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *)(SQL)()))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.interpolated.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.sql", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "source.sql", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "source.sql" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *)(POSTSCRIPT)()))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.interpolated.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "meta.embedded.block.postscript", + "patterns": [ + { + "begin": "^", + "end": "\\n", + "name": "source.postscript", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "source.postscript" + } + ] + } + ] + }, + { + "begin": "((((<<(~)?) *)((?![=\\d\\$\\( ])[^;,'\"`\\s\\)]*)()))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.interpolated.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "((((<<(~)?) *`)([^`]*)(`)))(.*)\\n?", + "beginCaptures": { + "1": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "2": { + "name": "punctuation.definition.string.begin.perl" + }, + "3": { + "name": "punctuation.definition.delimiter.begin.perl" + }, + "7": { + "name": "punctuation.definition.delimiter.end.perl" + }, + "8": { + "patterns": [ + { + "include": "$self" + } + ] + } + }, + "contentName": "string.unquoted.heredoc.shell.perl", + "end": "^((?!\\5)\\s+)?((\\6))$", + "endCaptures": { + "2": { + "name": "string.unquoted.heredoc.interpolated.perl" + }, + "3": { + "name": "punctuation.definition.string.end.perl" + } + }, + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + } + ] + } + ] + }, + "line_comment": { + "patterns": [ + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.perl" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.perl" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.perl" + } + ] + } + ] + }, + "nested_braces": { + "begin": "\\{", + "captures": { + "1": { + "name": "punctuation.section.scope.perl" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_braces" + } + ] + }, + "nested_braces_interpolated": { + "begin": "\\{", + "captures": { + "1": { + "name": "punctuation.section.scope.perl" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_braces_interpolated" + } + ] + }, + "nested_brackets": { + "begin": "\\[", + "captures": { + "1": { + "name": "punctuation.section.scope.perl" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_brackets" + } + ] + }, + "nested_brackets_interpolated": { + "begin": "\\[", + "captures": { + "1": { + "name": "punctuation.section.scope.perl" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_brackets_interpolated" + } + ] + }, + "nested_ltgt": { + "begin": "<", + "captures": { + "1": { + "name": "punctuation.section.scope.perl" + } + }, + "end": ">", + "patterns": [ + { + "include": "#nested_ltgt" + } + ] + }, + "nested_ltgt_interpolated": { + "begin": "<", + "captures": { + "1": { + "name": "punctuation.section.scope.perl" + } + }, + "end": ">", + "patterns": [ + { + "include": "#variable" + }, + { + "include": "#nested_ltgt_interpolated" + } + ] + }, + "nested_parens": { + "begin": "\\(", + "captures": { + "1": { + "name": "punctuation.section.scope.perl" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_parens" + } + ] + }, + "nested_parens_interpolated": { + "begin": "\\(", + "captures": { + "1": { + "name": "punctuation.section.scope.perl" + } + }, + "end": "\\)", + "patterns": [ + { + "comment": "This is to prevent thinks like qr/foo$/ to treat $/ as a variable", + "match": "\\$(?=[^\\s\\w'\\{\\[\\(\\<])", + "name": "keyword.control.anchor.perl" + }, + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_parens_interpolated" + } + ] + }, + "pod": { + "patterns": [ + { + "match": "^=(pod|back|cut)\\b", + "name": "storage.type.class.pod.perl" + }, + { + "begin": "^(=begin)\\s+(html)\\s*$", + "beginCaptures": { + "1": { + "name": "storage.type.class.pod.perl" + }, + "2": { + "name": "variable.other.pod.perl" + } + }, + "contentName": "text.embedded.html.basic", + "end": "^(=end)\\s+(html)|^(?==cut)", + "endCaptures": { + "1": { + "name": "storage.type.class.pod.perl" + }, + "2": { + "name": "variable.other.pod.perl" + } + }, + "name": "meta.embedded.pod.perl", + "patterns": [ + { + "include": "text.html.basic" + } + ] + }, + { + "captures": { + "1": { + "name": "storage.type.class.pod.perl" + }, + "2": { + "name": "variable.other.pod.perl", + "patterns": [ + { + "include": "#pod-formatting" + } + ] + } + }, + "match": "^(=(?:head[1-4]|item|over|encoding|begin|end|for))\\b\\s*(.*)" + }, + { + "include": "#pod-formatting" + } + ] + }, + "pod-formatting": { + "patterns": [ + { + "captures": { + "1": { + "name": "markup.italic.pod.perl" + }, + "2": { + "name": "markup.italic.pod.perl" + } + }, + "match": "I(?:<([^<>]+)>|<+(\\s+(?:(?<!\\s)>|[^>])+\\s+)>+)", + "name": "entity.name.type.instance.pod.perl" + }, + { + "captures": { + "1": { + "name": "markup.bold.pod.perl" + }, + "2": { + "name": "markup.bold.pod.perl" + } + }, + "match": "B(?:<([^<>]+)>|<+(\\s+(?:(?<!\\s)>|[^>])+\\s+)>+)", + "name": "entity.name.type.instance.pod.perl" + }, + { + "captures": { + "1": { + "name": "markup.raw.pod.perl" + }, + "2": { + "name": "markup.raw.pod.perl" + } + }, + "match": "C(?:<([^<>]+)>|<+(\\\\s+(?:(?<!\\\\s)>|[^>])+\\\\s+)>+)", + "name": "entity.name.type.instance.pod.perl" + }, + { + "captures": { + "1": { + "name": "markup.underline.link.hyperlink.pod.perl" + } + }, + "match": "L<([^>]+)>", + "name": "entity.name.type.instance.pod.perl" + }, + { + "match": "[EFSXZ]<[^>]*>", + "name": "entity.name.type.instance.pod.perl" + } + ] + }, + "variable": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$)&(?![A-Za-z0-9_])", + "name": "variable.other.regexp.match.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$)`(?![A-Za-z0-9_])", + "name": "variable.other.regexp.pre-match.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$)'(?![A-Za-z0-9_])", + "name": "variable.other.regexp.post-match.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$)\\+(?![A-Za-z0-9_])", + "name": "variable.other.regexp.last-paren-match.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$)\"(?![A-Za-z0-9_])", + "name": "variable.other.readwrite.list-separator.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$)0(?![A-Za-z0-9_])", + "name": "variable.other.predefined.program-name.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$)[_ab\\*\\.\\/\\|,\\\\;#%=\\-~^:?!\\$<>\\(\\)\\[\\]@](?![A-Za-z0-9_])", + "name": "variable.other.predefined.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$)[0-9]+(?![A-Za-z0-9_])", + "name": "variable.other.subpattern.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "([\\$\\@\\%](#)?)([a-zA-Zx7f-xff\\$]|::)([a-zA-Z0-9_x7f-xff\\$]|::)*\\b", + "name": "variable.other.readwrite.global.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + }, + "2": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "(\\$\\{)(?:[a-zA-Zx7f-xff\\$]|::)(?:[a-zA-Z0-9_x7f-xff\\$]|::)*(\\})", + "name": "variable.other.readwrite.global.perl" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.perl" + } + }, + "match": "([\\$\\@\\%](#)?)[0-9_]\\b", + "name": "variable.other.readwrite.global.special.perl" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/php-html.tmLanguage.json b/src/lib/shiki/languages/php-html.tmLanguage.json new file mode 100644 index 0000000..0cea77f --- /dev/null +++ b/src/lib/shiki/languages/php-html.tmLanguage.json @@ -0,0 +1,98 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/KapitanOczywisty/language-php/blob/master/grammars/html.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/KapitanOczywisty/language-php/commit/ff64523c94c014d68f5dec189b05557649c5872a", + "name": "php-html", + "scopeName": "text.html.php", + "injections": { + "L:meta.embedded.php.blade": { + "patterns": [ + { + "include": "text.html.basic" + }, + { + "include": "text.html.php.blade#blade" + } + ] + }, + "text.html.php - (meta.embedded | meta.tag), L:((text.html.php meta.tag) - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.js - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.css - (meta.embedded.block.php | meta.embedded.line.php))": { + "patterns": [ + { + "include": "#php-tag" + } + ] + } + }, + "patterns": [ + { + "begin": "\\A#!", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.php" + } + }, + "end": "$", + "name": "comment.line.shebang.php" + }, + { + "include": "text.html.derivative" + } + ], + "repository": { + "php-tag": { + "patterns": [ + { + "begin": "<\\?(?i:php|=)?(?![^?]*\\?>)", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + } + }, + "end": "(\\?)>", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "source.php" + } + }, + "name": "meta.embedded.block.php", + "contentName": "source.php", + "patterns": [ + { + "include": "source.php" + } + ] + }, + { + "begin": "<\\?(?i:php|=)?", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + } + }, + "end": "(\\?)>", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "source.php" + } + }, + "name": "meta.embedded.line.php", + "contentName": "source.php", + "patterns": [ + { + "include": "source.php" + } + ] + } + ] + } + } +} diff --git a/src/lib/shiki/languages/php.tmLanguage.json b/src/lib/shiki/languages/php.tmLanguage.json new file mode 100644 index 0000000..7dc24a3 --- /dev/null +++ b/src/lib/shiki/languages/php.tmLanguage.json @@ -0,0 +1,4030 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/KapitanOczywisty/language-php/blob/master/grammars/php.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/KapitanOczywisty/language-php/commit/5e8f000cb5a20f44f7a7a89d07ad0774031c53f3", + "scopeName": "source.php", + "patterns": [ + { + "include": "#attribute" + }, + { + "include": "#comments" + }, + { + "match": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\s+([a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)(?=\\s*;)", + "name": "meta.namespace.php", + "captures": { + "1": { + "name": "keyword.other.namespace.php" + }, + "2": { + "name": "entity.name.type.namespace.php", + "patterns": [ + { + "match": "\\\\", + "name": "punctuation.separator.inheritance.php" + } + ] + } + } + }, + { + "begin": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.other.namespace.php" + } + }, + "end": "(?<=})|(?=\\?>)", + "name": "meta.namespace.php", + "patterns": [ + { + "include": "#comments" + }, + { + "match": "(?i)[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+", + "name": "entity.name.type.namespace.php", + "captures": { + "0": { + "patterns": [ + { + "match": "\\\\", + "name": "punctuation.separator.inheritance.php" + } + ] + } + } + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.namespace.begin.bracket.curly.php" + } + }, + "end": "}|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.namespace.end.bracket.curly.php" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "match": "[^\\s]+", + "name": "invalid.illegal.identifier.php" + } + ] + }, + { + "match": "\\s+(?=use\\b)" + }, + { + "begin": "(?i)\\buse\\b", + "beginCaptures": { + "0": { + "name": "keyword.other.use.php" + } + }, + "end": "(?<=})|(?=;)|(?=\\?>)", + "name": "meta.use.php", + "patterns": [ + { + "match": "\\b(const|function)\\b", + "name": "storage.type.${1:/downcase}.php" + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.use.begin.bracket.curly.php" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.use.end.bracket.curly.php" + } + }, + "patterns": [ + { + "include": "#scope-resolution" + }, + { + "match": "(?xi)\n\\b(as)\n\\s+(final|abstract|public|private|protected|static)\n\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)", + "captures": { + "1": { + "name": "keyword.other.use-as.php" + }, + "2": { + "name": "storage.modifier.php" + }, + "3": { + "name": "entity.other.alias.php" + } + } + }, + { + "match": "(?xi)\n\\b(as)\n\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)", + "captures": { + "1": { + "name": "keyword.other.use-as.php" + }, + "2": { + "patterns": [ + { + "match": "^(?:final|abstract|public|private|protected|static)$", + "name": "storage.modifier.php" + }, + { + "match": ".+", + "name": "entity.other.alias.php" + } + ] + } + } + }, + { + "match": "(?i)\\b(insteadof)\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)", + "captures": { + "1": { + "name": "keyword.other.use-insteadof.php" + }, + "2": { + "name": "support.class.php" + } + } + }, + { + "match": ";", + "name": "punctuation.terminator.expression.php" + }, + { + "include": "#use-inner" + } + ] + }, + { + "include": "#use-inner" + } + ] + }, + { + "begin": "(?ix)\n\\b(trait)\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)", + "beginCaptures": { + "1": { + "name": "storage.type.trait.php" + }, + "2": { + "name": "entity.name.type.trait.php" + } + }, + "end": "}|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.trait.end.bracket.curly.php" + } + }, + "name": "meta.trait.php", + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.trait.begin.bracket.curly.php" + } + }, + "end": "(?=}|\\?>)", + "contentName": "meta.trait.body.php", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + { + "begin": "(?ix)\n\\b(interface)\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)", + "beginCaptures": { + "1": { + "name": "storage.type.interface.php" + }, + "2": { + "name": "entity.name.type.interface.php" + } + }, + "end": "}|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.interface.end.bracket.curly.php" + } + }, + "name": "meta.interface.php", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#interface-extends" + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.interface.begin.bracket.curly.php" + } + }, + "end": "(?=}|\\?>)", + "contentName": "meta.interface.body.php", + "patterns": [ + { + "include": "#class-constant" + }, + { + "include": "$self" + } + ] + } + ] + }, + { + "begin": "(?ix)\n\\b(enum)\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\n(?: \\s* (:) \\s* (int | string) \\b )?", + "beginCaptures": { + "1": { + "name": "storage.type.enum.php" + }, + "2": { + "name": "entity.name.type.enum.php" + }, + "3": { + "name": "keyword.operator.return-value.php" + }, + "4": { + "name": "keyword.other.type.php" + } + }, + "end": "}|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.enum.end.bracket.curly.php" + } + }, + "name": "meta.enum.php", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#class-implements" + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.enum.begin.bracket.curly.php" + } + }, + "end": "(?=}|\\?>)", + "contentName": "meta.enum.body.php", + "patterns": [ + { + "match": "(?i)\\b(case)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)", + "captures": { + "1": { + "name": "storage.modifier.php" + }, + "2": { + "name": "constant.enum.php" + } + } + }, + { + "include": "#class-constant" + }, + { + "include": "$self" + } + ] + } + ] + }, + { + "begin": "(?ix)\n(?:\n \\b((?:(?:final|abstract|readonly)\\s+)*)(class)\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\n |\\b(new)\\b\\s*(\\#\\[.*\\])?\\s*(?:(readonly)\\s+)?\\b(class)\\b # anonymous class\n)", + "beginCaptures": { + "1": { + "patterns": [ + { + "match": "final|abstract", + "name": "storage.modifier.${0:/downcase}.php" + }, + { + "match": "readonly", + "name": "storage.modifier.php" + } + ] + }, + "2": { + "name": "storage.type.class.php" + }, + "3": { + "name": "entity.name.type.class.php" + }, + "4": { + "name": "keyword.other.new.php" + }, + "5": { + "patterns": [ + { + "include": "#attribute" + } + ] + }, + "6": { + "name": "storage.modifier.php" + }, + "7": { + "name": "storage.type.class.php" + } + }, + "end": "}|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.class.end.bracket.curly.php" + } + }, + "name": "meta.class.php", + "patterns": [ + { + "begin": "(?<=class)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.bracket.round.php" + } + }, + "name": "meta.function-call.php", + "patterns": [ + { + "include": "#named-arguments" + }, + { + "include": "$self" + } + ] + }, + { + "include": "#comments" + }, + { + "include": "#class-extends" + }, + { + "include": "#class-implements" + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.class.begin.bracket.curly.php" + } + }, + "end": "(?=}|\\?>)", + "contentName": "meta.class.body.php", + "patterns": [ + { + "include": "#class-constant" + }, + { + "include": "$self" + } + ] + } + ] + }, + { + "include": "#match_statement" + }, + { + "include": "#switch_statement" + }, + { + "match": "\\s*\\b(yield\\s+from)\\b", + "captures": { + "1": { + "name": "keyword.control.yield-from.php" + } + } + }, + { + "match": "(?x)\n\\b(\n break|case|continue|declare|default|die|do|\n else(if)?|end(declare|for(each)?|if|switch|while)|exit|\n for(each)?|if|return|switch|use|while|yield\n)\\b", + "captures": { + "1": { + "name": "keyword.control.${1:/downcase}.php" + } + } + }, + { + "begin": "(?i)\\b((?:require|include)(?:_once)?)(\\s+|(?=\\())", + "beginCaptures": { + "1": { + "name": "keyword.control.import.include.php" + } + }, + "end": "(?=\\s|;|$|\\?>)", + "name": "meta.include.php", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\b(catch)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.control.exception.catch.php" + }, + "2": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.php" + } + }, + "name": "meta.catch.php", + "patterns": [ + { + "match": "(?xi)\n([a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)*) # union or single exception class\n\\s*\n((\\$+)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)? # Variable", + "captures": { + "1": { + "patterns": [ + { + "match": "\\|", + "name": "punctuation.separator.delimiter.php" + }, + { + "begin": "(?i)(?=[\\\\a-z_\\x{7f}-\\x{10ffff}])", + "end": "(?xi)\n( [a-z_\\x{7f}-\\x{10ffff}] [a-z0-9_\\x{7f}-\\x{10ffff}]* )\n(?![a-z0-9_\\x{7f}-\\x{10ffff}\\\\])", + "endCaptures": { + "1": { + "name": "support.class.exception.php" + } + }, + "patterns": [ + { + "include": "#namespace" + } + ] + } + ] + }, + "2": { + "name": "variable.other.php" + }, + "3": { + "name": "punctuation.definition.variable.php" + } + } + } + ] + }, + { + "match": "\\b(catch|try|throw|exception|finally)\\b", + "name": "keyword.control.exception.php" + }, + { + "begin": "(?i)\\b(function)\\s*(?=&?\\s*\\()", + "beginCaptures": { + "1": { + "name": "storage.type.function.php" + } + }, + "end": "(?=\\s*{)", + "name": "meta.function.closure.php", + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "(&)?\\s*(\\()", + "beginCaptures": { + "1": { + "name": "storage.modifier.reference.php" + }, + "2": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" + } + }, + "contentName": "meta.function.parameters.php", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.php" + } + }, + "patterns": [ + { + "include": "#function-parameters" + } + ] + }, + { + "begin": "(?i)(use)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.function.use.php" + }, + "2": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.php" + } + }, + "name": "meta.function.closure.use.php", + "patterns": [ + { + "match": ",", + "name": "punctuation.separator.delimiter.php" + }, + { + "captures": { + "1": { + "name": "variable.other.php" + }, + "2": { + "name": "storage.modifier.reference.php" + }, + "3": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(?i)((?:(&)\\s*)?(\\$+)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\\s*(?=,|\\))" + } + ] + }, + { + "match": "(?xi)\n(:)\\s*\n(\n # nullable type\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ |\n # union, intersection or DNF type\n (?: [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | \\(\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+(?:\\s*&\\s*[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ \\s*\\) )\n (?: \\s*[|&]\\s*\n (?: [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | \\(\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+(?:\\s*&\\s*[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ \\s*\\) )\n )+\n)\n(?=\\s*(?:{|/[/*]|\\#|$))", + "captures": { + "1": { + "name": "keyword.operator.return-value.php" + }, + "2": { + "patterns": [ + { + "include": "#php-types" + } + ] + } + } + } + ] + }, + { + "begin": "(?i)\\b(fn)\\s*(?=&?\\s*\\()", + "beginCaptures": { + "1": { + "name": "storage.type.function.php" + } + }, + "end": "=>", + "endCaptures": { + "0": { + "name": "punctuation.definition.arrow.php" + } + }, + "name": "meta.function.closure.php", + "patterns": [ + { + "begin": "(?:(&)\\s*)?(\\()", + "beginCaptures": { + "1": { + "name": "storage.modifier.reference.php" + }, + "2": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" + } + }, + "contentName": "meta.function.parameters.php", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.php" + } + }, + "patterns": [ + { + "include": "#function-parameters" + } + ] + }, + { + "match": "(?xi)\n(:)\\s*\n(\n # nullable type\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ |\n # union, intersection or DNF type\n (?: [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | \\(\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+(?:\\s*&\\s*[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ \\s*\\) )\n (?: \\s*[|&]\\s*\n (?: [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | \\(\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+(?:\\s*&\\s*[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ \\s*\\) )\n )+\n)\n(?=\\s*(?:=>|/[/*]|\\#|$))", + "captures": { + "1": { + "name": "keyword.operator.return-value.php" + }, + "2": { + "patterns": [ + { + "include": "#php-types" + } + ] + } + } + } + ] + }, + { + "begin": "(?x)\n((?:(?:final|abstract|public|private|protected)\\s+)*)\n(function)\\s+(__construct)\n\\s*(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "match": "final|abstract|public|private|protected", + "name": "storage.modifier.php" + } + ] + }, + "2": { + "name": "storage.type.function.php" + }, + "3": { + "name": "support.function.constructor.php" + }, + "4": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" + } + }, + "contentName": "meta.function.parameters.php", + "end": "(?xi)\n(\\)) \\s* ( : \\s*\n (?:\\?\\s*)? (?!\\s) [a-z0-9_\\x{7f}-\\x{10ffff}\\\\\\s\\|&()]+ (?<!\\s)\n)?\n(?=\\s*(?:{|/[/*]|\\#|$|;))", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.bracket.round.php" + }, + "2": { + "name": "invalid.illegal.return-type.php" + } + }, + "name": "meta.function.php", + "patterns": [ + { + "include": "#comments" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.php" + }, + { + "begin": "(?xi)\n((?:(?:public|private|protected|readonly)(?:\\s+|(?=\\?)))++)\n(?: (\n # nullable type\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ |\n # union, intersection or DNF type\n (?: [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | \\(\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+(?:\\s*&\\s*[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ \\s*\\) )\n (?: \\s*[|&]\\s*\n (?: [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | \\(\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+(?:\\s*&\\s*[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ \\s*\\) )\n )+\n) \\s+ )?\n((?:(&)\\s*)?(\\$)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable name with possible reference", + "beginCaptures": { + "1": { + "patterns": [ + { + "match": "public|private|protected|readonly", + "name": "storage.modifier.php" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#php-types" + } + ] + }, + "3": { + "name": "variable.other.php" + }, + "4": { + "name": "storage.modifier.reference.php" + }, + "5": { + "name": "punctuation.definition.variable.php" + } + }, + "end": "(?=\\s*(?:,|\\)|/[/*]|\\#))", + "name": "meta.function.parameter.promoted-property.php", + "patterns": [ + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "keyword.operator.assignment.php" + } + }, + "end": "(?=\\s*(?:,|\\)|/[/*]|\\#))", + "patterns": [ + { + "include": "#parameter-default-types" + } + ] + } + ] + }, + { + "include": "#function-parameters" + } + ] + }, + { + "begin": "(?x)\n((?:(?:final|abstract|public|private|protected|static)\\s+)*)\n(function)\\s+\n(?i:\n (__(?:call|construct|debugInfo|destruct|get|set|isset|unset|toString|\n clone|set_state|sleep|wakeup|autoload|invoke|callStatic|serialize|unserialize))\n |(?:(&)?\\s*([a-zA-Z_\\x{7f}-\\x{10ffff}][a-zA-Z0-9_\\x{7f}-\\x{10ffff}]*))\n)\n\\s*(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "match": "final|abstract|public|private|protected|static", + "name": "storage.modifier.php" + } + ] + }, + "2": { + "name": "storage.type.function.php" + }, + "3": { + "name": "support.function.magic.php" + }, + "4": { + "name": "storage.modifier.reference.php" + }, + "5": { + "name": "entity.name.function.php" + }, + "6": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" + } + }, + "contentName": "meta.function.parameters.php", + "end": "(?xi)\n(\\)) (?: \\s* (:) \\s* (\n # nullable type\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ |\n # union, intersection or DNF type\n (?: [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | \\(\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+(?:\\s*&\\s*[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ \\s*\\) )\n (?: \\s*[|&]\\s*\n (?: [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | \\(\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+(?:\\s*&\\s*[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ \\s*\\) )\n )+\n) )?\n(?=\\s*(?:{|/[/*]|\\#|$|;))", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.bracket.round.php" + }, + "2": { + "name": "keyword.operator.return-value.php" + }, + "3": { + "patterns": [ + { + "match": "\\b(static)\\b", + "name": "storage.type.php" + }, + { + "match": "\\b(never)\\b", + "name": "keyword.other.type.never.php" + }, + { + "include": "#php-types" + } + ] + } + }, + "name": "meta.function.php", + "patterns": [ + { + "include": "#function-parameters" + } + ] + }, + { + "match": "(?xi)\n((?:(?:public|private|protected|static|readonly)(?:\\s+|(?=\\?)))++) # At least one modifier\n(\n # nullable type\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ |\n # union, intersection or DNF type\n (?: [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | \\(\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+(?:\\s*&\\s*[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ \\s*\\) )\n (?: \\s*[|&]\\s*\n (?: [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | \\(\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+(?:\\s*&\\s*[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ \\s*\\) )\n )+\n)?\n\\s+ ((\\$)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable name", + "captures": { + "1": { + "patterns": [ + { + "match": "public|private|protected|static|readonly", + "name": "storage.modifier.php" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#php-types" + } + ] + }, + "3": { + "name": "variable.other.php" + }, + "4": { + "name": "punctuation.definition.variable.php" + } + } + }, + { + "include": "#invoke-call" + }, + { + "include": "#scope-resolution" + }, + { + "include": "#variables" + }, + { + "include": "#strings" + }, + { + "captures": { + "1": { + "name": "support.function.construct.php" + }, + "2": { + "name": "punctuation.definition.array.begin.bracket.round.php" + }, + "3": { + "name": "punctuation.definition.array.end.bracket.round.php" + } + }, + "match": "(array)(\\()(\\))", + "name": "meta.array.empty.php" + }, + { + "begin": "(array)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "support.function.construct.php" + }, + "2": { + "name": "punctuation.definition.array.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.bracket.round.php" + } + }, + "name": "meta.array.php", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "match": "(?i)(\\()\\s*(array|real|double|float|int(?:eger)?|bool(?:ean)?|string|object|binary|unset)\\s*(\\))", + "captures": { + "1": { + "name": "punctuation.definition.storage-type.begin.bracket.round.php" + }, + "2": { + "name": "storage.type.php" + }, + "3": { + "name": "punctuation.definition.storage-type.end.bracket.round.php" + } + } + }, + { + "match": "(?i)\\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|var|function|interface|trait|parent|self|object|mixed)\\b", + "name": "storage.type.php" + }, + { + "match": "(?i)\\b(global|abstract|const|final|private|protected|public|static)\\b", + "name": "storage.modifier.php" + }, + { + "include": "#object" + }, + { + "match": ";", + "name": "punctuation.terminator.expression.php" + }, + { + "match": ":", + "name": "punctuation.terminator.statement.php" + }, + { + "include": "#heredoc" + }, + { + "include": "#numbers" + }, + { + "match": "(?i)\\bclone\\b", + "name": "keyword.other.clone.php" + }, + { + "match": "\\.\\.\\.", + "name": "keyword.operator.spread.php" + }, + { + "match": "\\.=?", + "name": "keyword.operator.string.php" + }, + { + "match": "=>", + "name": "keyword.operator.key.php" + }, + { + "captures": { + "1": { + "name": "keyword.operator.assignment.php" + }, + "2": { + "name": "storage.modifier.reference.php" + }, + "3": { + "name": "storage.modifier.reference.php" + } + }, + "match": "(?i)(\\=)(&)|(&)(?=[$a-z_])" + }, + { + "match": "@", + "name": "keyword.operator.error-control.php" + }, + { + "match": "===|==|!==|!=|<>", + "name": "keyword.operator.comparison.php" + }, + { + "match": "=|\\+=|\\-=|\\*\\*?=|/=|%=|&=|\\|=|\\^=|<<=|>>=|\\?\\?=", + "name": "keyword.operator.assignment.php" + }, + { + "match": "<=>|<=|>=|<|>", + "name": "keyword.operator.comparison.php" + }, + { + "match": "\\-\\-|\\+\\+", + "name": "keyword.operator.increment-decrement.php" + }, + { + "match": "\\-|\\+|\\*\\*?|/|%", + "name": "keyword.operator.arithmetic.php" + }, + { + "match": "(?i)(!|&&|\\|\\|)|\\b(and|or|xor|as)\\b", + "name": "keyword.operator.logical.php" + }, + { + "include": "#function-call" + }, + { + "match": "<<|>>|~|\\^|&|\\|", + "name": "keyword.operator.bitwise.php" + }, + { + "begin": "(?i)\\b(instanceof)\\s+(?=[\\\\$a-z_])", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.php" + } + }, + "end": "(?i)(?=[^\\\\$a-z0-9_\\x{7f}-\\x{10ffff}])", + "patterns": [ + { + "include": "#class-name" + }, + { + "include": "#variable-name" + } + ] + }, + { + "include": "#instantiation" + }, + { + "captures": { + "1": { + "name": "keyword.control.goto.php" + }, + "2": { + "name": "support.other.php" + } + }, + "match": "(?i)(goto)\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)" + }, + { + "captures": { + "1": { + "name": "entity.name.goto-label.php" + } + }, + "match": "(?i)^\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*(?<!default))\\s*:(?!:)" + }, + { + "include": "#string-backtick" + }, + { + "include": "#ternary_shorthand" + }, + { + "include": "#null_coalescing" + }, + { + "include": "#ternary_expression" + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.begin.bracket.curly.php" + } + }, + "end": "}|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.end.bracket.curly.php" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.php" + } + }, + "end": "\\]|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.php" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.end.bracket.round.php" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "#constants" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.php" + } + ], + "repository": { + "attribute-name": { + "patterns": [ + { + "begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*\\\\)", + "end": "(?xi)\n( [a-z_\\x{7f}-\\x{10ffff}] [a-z0-9_\\x{7f}-\\x{10ffff}]* )?\n(?![a-z0-9_\\x{7f}-\\x{10ffff}\\\\])", + "endCaptures": { + "1": { + "name": "support.attribute.php" + } + }, + "patterns": [ + { + "include": "#namespace" + } + ] + }, + { + "match": "(?xi)\n(\\\\)?\\b(Attribute|SensitiveParameter|AllowDynamicProperties|ReturnTypeWillChange)\\b", + "name": "support.attribute.builtin.php", + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + } + }, + { + "begin": "(?i)(?=[\\\\a-z_\\x{7f}-\\x{10ffff}])", + "end": "(?xi)\n( [a-z_\\x{7f}-\\x{10ffff}] [a-z0-9_\\x{7f}-\\x{10ffff}]* )?\n(?![a-z0-9_\\x{7f}-\\x{10ffff}\\\\])", + "endCaptures": { + "1": { + "name": "support.attribute.php" + } + }, + "patterns": [ + { + "include": "#namespace" + } + ] + } + ] + }, + "attribute": { + "begin": "\\#\\[", + "end": "\\]", + "name": "meta.attribute.php", + "patterns": [ + { + "match": ",", + "name": "punctuation.separator.delimiter.php" + }, + { + "begin": "([a-zA-Z0-9_\\x{7f}-\\x{10ffff}\\\\]+)\\s*(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#attribute-name" + } + ] + }, + "2": { + "name": "punctuation.definition.arguments.begin.bracket.round.php" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.bracket.round.php" + } + }, + "patterns": [ + { + "include": "#named-arguments" + }, + { + "include": "$self" + } + ] + }, + { + "include": "#attribute-name" + } + ] + }, + "class-builtin": { + "patterns": [ + { + "match": "(?xi)\n(\\\\)?\\b\n(Attribute|(APC|Append)Iterator|Array(Access|Iterator|Object)\n|Bad(Function|Method)CallException\n|(Caching|CallbackFilter)Iterator|Collator|Collectable|Cond|Countable|CURLFile\n|Date(Interval|Period|Time(Interface|Immutable|Zone)?)?|Directory(Iterator)?|DomainException\n|DOM(Attr|CdataSection|CharacterData|Comment|Document(Fragment)?|Element|EntityReference\n |Implementation|NamedNodeMap|Node(list)?|ProcessingInstruction|Text|XPath)\n|(Error)?Exception|EmptyIterator\n|finfo\n|Ev(Check|Child|Embed|Fork|Idle|Io|Loop|Periodic|Prepare|Signal|Stat|Timer|Watcher)?\n|Event(Base|Buffer(Event)?|SslContext|Http(Request|Connection)?|Config|DnsBase|Util|Listener)?\n|FANNConnection|(Filter|Filesystem)Iterator\n|Gender\\\\Gender|GlobIterator|Gmagick(Draw|Pixel)?\n|Haru(Annotation|Destination|Doc|Encoder|Font|Image|Outline|Page)\n|Http((Inflate|Deflate)?Stream|Message|Request(Pool)?|Response|QueryString)\n|HRTime\\\\(PerformanceCounter|StopWatch)\n|Intl(Calendar|((CodePoint|RuleBased)?Break|Parts)?Iterator|DateFormatter|TimeZone)\n|Imagick(Draw|Pixel(Iterator)?)?\n|InfiniteIterator|InvalidArgumentException|Iterator(Aggregate|Iterator)?\n|JsonSerializable\n|KTaglib_(MPEG_(File|AudioProperties)|Tag|ID3v2_(Tag|(AttachedPicture)?Frame))\n|Lapack|(Length|Locale|Logic)Exception|LimitIterator|Lua(Closure)?\n|Mongo(BinData|Client|Code|Collection|CommandCursor|Cursor(Exception)?|Date|DB(Ref)?|DeleteBatch\n |Grid(FS(Cursor|File)?)|Id|InsertBatch|Int(32|64)|Log|Pool|Regex|ResultException|Timestamp\n |UpdateBatch|Write(Batch|ConcernException))?\n|Memcache(d)?|MessageFormatter|MultipleIterator|Mutex\n|mysqli(_(driver|stmt|warning|result))?\n|MysqlndUh(Connection|PreparedStatement)\n|NoRewindIterator|Normalizer|NumberFormatter\n|OCI-(Collection|Lob)|OuterIterator|(OutOf(Bounds|Range)|Overflow)Exception\n|ParentIterator|PDO(Statement)?|Phar(Data|FileInfo)?|php_user_filter|Pool\n|QuickHash(Int(Set|StringHash)|StringIntHash)\n|Recursive(Array|Caching|Directory|Fallback|Filter|Iterator|Regex|Tree)?Iterator\n|Reflection(Class|Function(Abstract)?|Method|Object|Parameter|Property|(Zend)?Extension)?\n|RangeException|Reflector|RegexIterator|ResourceBundle|RuntimeException|RRD(Creator|Graph|Updater)\n|SAM(Connection|Message)|SCA(_(SoapProxy|LocalProxy))?\n|SDO_(DAS_(ChangeSummary|Data(Factory|Object)|Relational|Setting|XML(_Document)?)\n |Data(Factory|Object)|Exception|List|Model_(Property|ReflectionDataObject|Type)|Sequence)\n|SeekableIterator|Serializable|SessionHandler(Interface)?|SimpleXML(Iterator|Element)|SNMP\n|Soap(Client|Fault|Header|Param|Server|Var)\n|SphinxClient|Spoofchecker\n|Spl(DoublyLinkedList|Enum|File(Info|Object)|FixedArray|(Max|Min)?Heap|Observer|ObjectStorage\n |(Priority)?Queue|Stack|Subject|Type|TempFileObject)\n|SQLite(3(Result|Stmt)?|Database|Result|Unbuffered)\n|stdClass|streamWrapper|SVM(Model)?|Swish(Result(s)?|Search)?|Sync(Event|Mutex|ReaderWriter|Semaphore)\n|Thread(ed)?|tidy(Node)?|TokyoTyrant(Table|Iterator|Query)?|Transliterator|Traversable\n|UConverter|(Underflow|UnexpectedValue)Exception\n|V8Js(Exception)?|Varnish(Admin|Log|Stat)\n|Worker|Weak(Map|Ref)\n|XML(Diff\\\\(Base|DOM|File|Memory)|Reader|Writer)|XsltProcessor\n|Yaf_(Route_(Interface|Map|Regex|Rewrite|Simple|Supervar)\n |Action_Abstract|Application|Config_(Simple|Ini|Abstract)|Controller_Abstract\n |Dispatcher|Exception|Loader|Plugin_Abstract|Registry|Request_(Abstract|Simple|Http)\n |Response_Abstract|Router|Session|View_(Simple|Interface))\n|Yar_(Client(_Exception)?|Concurrent_Client|Server(_Exception)?)\n|ZipArchive|ZMQ(Context|Device|Poll|Socket)?)\n\\b", + "name": "support.class.builtin.php", + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + } + } + ] + }, + "class-name": { + "patterns": [ + { + "begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*\\\\)", + "end": "(?xi)\n( [a-z_\\x{7f}-\\x{10ffff}] [a-z0-9_\\x{7f}-\\x{10ffff}]* )?\n(?![a-z0-9_\\x{7f}-\\x{10ffff}\\\\])", + "endCaptures": { + "1": { + "name": "support.class.php" + } + }, + "patterns": [ + { + "include": "#namespace" + } + ] + }, + { + "include": "#class-builtin" + }, + { + "begin": "(?i)(?=[\\\\a-z_\\x{7f}-\\x{10ffff}])", + "end": "(?xi)\n( [a-z_\\x{7f}-\\x{10ffff}] [a-z0-9_\\x{7f}-\\x{10ffff}]* )?\n(?![a-z0-9_\\x{7f}-\\x{10ffff}\\\\])", + "endCaptures": { + "1": { + "name": "support.class.php" + } + }, + "patterns": [ + { + "include": "#namespace" + } + ] + } + ] + }, + "inheritance-single": { + "patterns": [ + { + "begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*\\\\)", + "end": "(?i)([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)?(?=[^a-z0-9_\\x{7f}-\\x{10ffff}\\\\])", + "endCaptures": { + "1": { + "name": "entity.other.inherited-class.php" + } + }, + "patterns": [ + { + "include": "#namespace" + } + ] + }, + { + "include": "#class-builtin" + }, + { + "include": "#namespace" + }, + { + "match": "(?i)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*", + "name": "entity.other.inherited-class.php" + } + ] + }, + "class-extends": { + "patterns": [ + { + "begin": "(?i)(extends)\\s+", + "beginCaptures": { + "1": { + "name": "storage.modifier.extends.php" + } + }, + "end": "(?i)(?=[^A-Za-z0-9_\\x{7f}-\\x{10ffff}\\\\])", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#inheritance-single" + } + ] + } + ] + }, + "interface-extends": { + "patterns": [ + { + "begin": "(?i)(extends)\\s+", + "beginCaptures": { + "1": { + "name": "storage.modifier.extends.php" + } + }, + "end": "(?i)(?={)", + "patterns": [ + { + "include": "#comments" + }, + { + "match": ",", + "name": "punctuation.separator.classes.php" + }, + { + "include": "#inheritance-single" + } + ] + } + ] + }, + "class-implements": { + "patterns": [ + { + "begin": "(?i)(implements)\\s+", + "beginCaptures": { + "1": { + "name": "storage.modifier.implements.php" + } + }, + "end": "(?i)(?={)", + "patterns": [ + { + "include": "#comments" + }, + { + "match": ",", + "name": "punctuation.separator.classes.php" + }, + { + "include": "#inheritance-single" + } + ] + } + ] + }, + "class-constant": { + "patterns": [ + { + "match": "(?i)\\b(const)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)", + "captures": { + "1": { + "name": "storage.modifier.php" + }, + "2": { + "name": "constant.other.php" + } + } + } + ] + }, + "comments": { + "patterns": [ + { + "begin": "/\\*\\*(?=\\s)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.php" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.php" + } + }, + "name": "comment.block.documentation.phpdoc.php", + "patterns": [ + { + "include": "#php_doc" + } + ] + }, + { + "begin": "/\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.php" + } + }, + "end": "\\*/", + "name": "comment.block.php" + }, + { + "begin": "(^\\s+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.php" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.php" + } + }, + "end": "\\n|(?=\\?>)", + "name": "comment.line.double-slash.php" + } + ] + }, + { + "begin": "(^\\s+)?(?=#)(?!#\\[)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.php" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.php" + } + }, + "end": "\\n|(?=\\?>)", + "name": "comment.line.number-sign.php" + } + ] + } + ] + }, + "constants": { + "patterns": [ + { + "match": "(?i)\\b(TRUE|FALSE|NULL|__(FILE|DIR|FUNCTION|CLASS|METHOD|LINE|NAMESPACE)__|ON|OFF|YES|NO|NL|BR|TAB)\\b", + "name": "constant.language.php" + }, + { + "match": "(?x)\n(\\\\)?\\b\n(DEFAULT_INCLUDE_PATH\n|EAR_(INSTALL|EXTENSION)_DIR\n|E_(ALL|COMPILE_(ERROR|WARNING)|CORE_(ERROR|WARNING)|DEPRECATED|ERROR|NOTICE\n |PARSE|RECOVERABLE_ERROR|STRICT|USER_(DEPRECATED|ERROR|NOTICE|WARNING)|WARNING)\n|PHP_(ROUND_HALF_(DOWN|EVEN|ODD|UP)|(MAJOR|MINOR|RELEASE)_VERSION|MAXPATHLEN\n |BINDIR|SHLIB_SUFFIX|SYSCONFDIR|SAPI|CONFIG_FILE_(PATH|SCAN_DIR)\n |INT_(MAX|SIZE)|ZTS|OS|OUTPUT_HANDLER_(START|CONT|END)|DEBUG|DATADIR\n |URL_(SCHEME|HOST|USER|PORT|PASS|PATH|QUERY|FRAGMENT)|PREFIX\n |EXTRA_VERSION|EXTENSION_DIR|EOL|VERSION(_ID)?\n |WINDOWS_(NT_(SERVER|DOMAIN_CONTROLLER|WORKSTATION)\n |VERSION_(MAJOR|MINOR)|BUILD|SUITEMASK|SP_(MAJOR|MINOR)\n |PRODUCTTYPE|PLATFORM)\n |LIBDIR|LOCALSTATEDIR)\n|STD(ERR|IN|OUT)|ZEND_(DEBUG_BUILD|THREAD_SAFE))\n\\b", + "name": "support.constant.core.php", + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + } + }, + { + "match": "(?x)\n(\\\\)?\\b\n(__COMPILER_HALT_OFFSET__|AB(MON_(1|2|3|4|5|6|7|8|9|10|11|12)|DAY[1-7])\n|AM_STR|ASSERT_(ACTIVE|BAIL|CALLBACK_QUIET_EVAL|WARNING)|ALT_DIGITS\n|CASE_(UPPER|LOWER)|CHAR_MAX|CONNECTION_(ABORTED|NORMAL|TIMEOUT)|CODESET|COUNT_(NORMAL|RECURSIVE)\n|CREDITS_(ALL|DOCS|FULLPAGE|GENERAL|GROUP|MODULES|QA|SAPI)\n|CRYPT_(BLOWFISH|EXT_DES|MD5|SHA(256|512)|SALT_LENGTH|STD_DES)|CURRENCY_SYMBOL\n|D_(T_)?FMT|DATE_(ATOM|COOKIE|ISO8601|RFC(822|850|1036|1123|2822|3339)|RSS|W3C)\n|DAY_[1-7]|DECIMAL_POINT|DIRECTORY_SEPARATOR\n|ENT_(COMPAT|IGNORE|(NO)?QUOTES)|EXTR_(IF_EXISTS|OVERWRITE|PREFIX_(ALL|IF_EXISTS|INVALID|SAME)|REFS|SKIP)\n|ERA(_(D_(T_)?FMT)|T_FMT|YEAR)?|FRAC_DIGITS|GROUPING|HASH_HMAC|HTML_(ENTITIES|SPECIALCHARS)\n|INF|INFO_(ALL|CREDITS|CONFIGURATION|ENVIRONMENT|GENERAL|LICENSEMODULES|VARIABLES)\n|INI_(ALL|CANNER_(NORMAL|RAW)|PERDIR|SYSTEM|USER)|INT_(CURR_SYMBOL|FRAC_DIGITS)\n|LC_(ALL|COLLATE|CTYPE|MESSAGES|MONETARY|NUMERIC|TIME)|LOCK_(EX|NB|SH|UN)\n|LOG_(ALERT|AUTH(PRIV)?|CRIT|CRON|CONS|DAEMON|DEBUG|EMERG|ERR|INFO|LOCAL[1-7]|LPR|KERN|MAIL\n |NEWS|NODELAY|NOTICE|NOWAIT|ODELAY|PID|PERROR|WARNING|SYSLOG|UCP|USER)\n|M_(1_PI|SQRT(1_2|2|3|PI)|2_(SQRT)?PI|PI(_(2|4))?|E(ULER)?|LN(10|2|PI)|LOG(10|2)E)\n|MON_(1|2|3|4|5|6|7|8|9|10|11|12|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)\n|N_(CS_PRECEDES|SEP_BY_SPACE|SIGN_POSN)|NAN|NEGATIVE_SIGN|NO(EXPR|STR)\n|P_(CS_PRECEDES|SEP_BY_SPACE|SIGN_POSN)|PM_STR|POSITIVE_SIGN\n|PATH(_SEPARATOR|INFO_(EXTENSION|(BASE|DIR|FILE)NAME))|RADIXCHAR\n|SEEK_(CUR|END|SET)|SORT_(ASC|DESC|LOCALE_STRING|REGULAR|STRING)|STR_PAD_(BOTH|LEFT|RIGHT)\n|T_FMT(_AMPM)?|THOUSEP|THOUSANDS_SEP\n|UPLOAD_ERR_(CANT_WRITE|EXTENSION|(FORM|INI)_SIZE|NO_(FILE|TMP_DIR)|OK|PARTIAL)\n|YES(EXPR|STR))\n\\b", + "name": "support.constant.std.php", + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + } + }, + { + "match": "(?x)\n(\\\\)?\\b\n(GLOB_(MARK|BRACE|NO(SORT|CHECK|ESCAPE)|ONLYDIR|ERR|AVAILABLE_FLAGS)\n|XML_(SAX_IMPL|(DTD|DOCUMENT(_(FRAG|TYPE))?|HTML_DOCUMENT|NOTATION|NAMESPACE_DECL|PI|COMMENT|DATA_SECTION|TEXT)_NODE\n |OPTION_(SKIP_(TAGSTART|WHITE)|CASE_FOLDING|TARGET_ENCODING)\n |ERROR_((BAD_CHAR|(ATTRIBUTE_EXTERNAL|BINARY|PARAM|RECURSIVE)_ENTITY)_REF|MISPLACED_XML_PI|SYNTAX|NONE\n |NO_(MEMORY|ELEMENTS)|TAG_MISMATCH|INCORRECT_ENCODING|INVALID_TOKEN|DUPLICATE_ATTRIBUTE\n |UNCLOSED_(CDATA_SECTION|TOKEN)|UNDEFINED_ENTITY|UNKNOWN_ENCODING|JUNK_AFTER_DOC_ELEMENT\n |PARTIAL_CHAR|EXTERNAL_ENTITY_HANDLING|ASYNC_ENTITY)\n |ENTITY_(((REF|DECL)_)?NODE)|ELEMENT(_DECL)?_NODE|LOCAL_NAMESPACE|ATTRIBUTE_(NMTOKEN(S)?|NOTATION|NODE)\n |CDATA|ID(REF(S)?)?|DECL_NODE|ENTITY|ENUMERATION)\n|MHASH_(RIPEMD(128|160|256|320)|GOST|MD(2|4|5)|SHA(1|224|256|384|512)|SNEFRU256|HAVAL(128|160|192|224|256)\n |CRC23(B)?|TIGER(128|160)?|WHIRLPOOL|ADLER32)\n|MYSQL_(BOTH|NUM|CLIENT_(SSL|COMPRESS|IGNORE_SPACE|INTERACTIVE|ASSOC))\n|MYSQLI_(REPORT_(STRICT|INDEX|OFF|ERROR|ALL)|REFRESH_(GRANT|MASTER|BACKUP_LOG|STATUS|SLAVE|HOSTS|THREADS|TABLES|LOG)\n |READ_DEFAULT_(FILE|GROUP)|(GROUP|MULTIPLE_KEY|BINARY|BLOB)_FLAG|BOTH\n |STMT_ATTR_(CURSOR_TYPE|UPDATE_MAX_LENGTH|PREFETCH_ROWS)|STORE_RESULT\n |SERVER_QUERY_(NO_((GOOD_)?INDEX_USED)|WAS_SLOW)|SET_(CHARSET_NAME|FLAG)\n |NO_(DEFAULT_VALUE_FLAG|DATA)|NOT_NULL_FLAG|NUM(_FLAG)?\n |CURSOR_TYPE_(READ_ONLY|SCROLLABLE|NO_CURSOR|FOR_UPDATE)\n |CLIENT_(SSL|NO_SCHEMA|COMPRESS|IGNORE_SPACE|INTERACTIVE|FOUND_ROWS)\n |TYPE_(GEOMETRY|((MEDIUM|LONG|TINY)_)?BLOB|BIT|SHORT|STRING|SET|YEAR|NULL|NEWDECIMAL|NEWDATE|CHAR\n |TIME(STAMP)?|TINY|INT24|INTERVAL|DOUBLE|DECIMAL|DATE(TIME)?|ENUM|VAR_STRING|FLOAT|LONG(LONG)?)\n |TIME_STAMP_FLAG|INIT_COMMAND|ZEROFILL_FLAG|ON_UPDATE_NOW_FLAG\n |OPT_(NET_((CMD|READ)_BUFFER_SIZE)|CONNECT_TIMEOUT|INT_AND_FLOAT_NATIVE|LOCAL_INFILE)\n |DEBUG_TRACE_ENABLED|DATA_TRUNCATED|USE_RESULT|(ENUM|(PART|PRI|UNIQUE)_KEY|UNSIGNED)_FLAG\n |ASSOC|ASYNC|AUTO_INCREMENT_FLAG)\n|MCRYPT_(RC(2|6)|RIJNDAEL_(128|192|256)|RAND|GOST|XTEA|MODE_(STREAM|NOFB|CBC|CFB|OFB|ECB)|MARS\n |BLOWFISH(_COMPAT)?|SERPENT|SKIPJACK|SAFER(64|128|PLUS)|CRYPT|CAST_(128|256)|TRIPLEDES|THREEWAY\n |TWOFISH|IDEA|(3)?DES|DECRYPT|DEV_(U)?RANDOM|PANAMA|ENCRYPT|ENIGNA|WAKE|LOKI97|ARCFOUR(_IV)?)\n|STREAM_(REPORT_ERRORS|MUST_SEEK|MKDIR_RECURSIVE|BUFFER_(NONE|FULL|LINE)|SHUT_(RD)?WR\n |SOCK_(RDM|RAW|STREAM|SEQPACKET|DGRAM)|SERVER_(BIND|LISTEN)\n |NOTIFY_(REDIRECTED|RESOLVE|MIME_TYPE_IS|SEVERITY_(INFO|ERR|WARN)|COMPLETED|CONNECT|PROGRESS\n |FILE_SIZE_IS|FAILURE|AUTH_(REQUIRED|RESULT))\n |CRYPTO_METHOD_((SSLv2(3)?|SSLv3|TLS)_(CLIENT|SERVER))|CLIENT_((ASYNC_)?CONNECT|PERSISTENT)\n |CAST_(AS_STREAM|FOR_SELECT)|(IGNORE|IS)_URL|IPPROTO_(RAW|TCP|ICMP|IP|UDP)|OOB\n |OPTION_(READ_(BUFFER|TIMEOUT)|BLOCKING|WRITE_BUFFER)|URL_STAT_(LINK|QUIET)|USE_PATH\n |PEEK|PF_(INET(6)?|UNIX)|ENFORCE_SAFE_MODE|FILTER_(ALL|READ|WRITE))\n|SUNFUNCS_RET_(DOUBLE|STRING|TIMESTAMP)\n|SQLITE_(READONLY|ROW|MISMATCH|MISUSE|BOTH|BUSY|SCHEMA|NOMEM|NOTFOUND|NOTADB|NOLFS|NUM|CORRUPT\n |CONSTRAINT|CANTOPEN|TOOBIG|INTERRUPT|INTERNAL|IOERR|OK|DONE|PROTOCOL|PERM|ERROR|EMPTY\n |FORMAT|FULL|LOCKED|ABORT|ASSOC|AUTH)\n|SQLITE3_(BOTH|BLOB|NUM|NULL|TEXT|INTEGER|OPEN_(READ(ONLY|WRITE)|CREATE)|FLOAT_ASSOC)\n|CURL(M_(BAD_((EASY)?HANDLE)|CALL_MULTI_PERFORM|INTERNAL_ERROR|OUT_OF_MEMORY|OK)\n |MSG_DONE|SSH_AUTH_(HOST|NONE|DEFAULT|PUBLICKEY|PASSWORD|KEYBOARD)\n |CLOSEPOLICY_(SLOWEST|CALLBACK|OLDEST|LEAST_(RECENTLY_USED|TRAFFIC)\n |INFO_(REDIRECT_(COUNT|TIME)|REQUEST_SIZE|SSL_VERIFYRESULT|STARTTRANSFER_TIME\n |(SIZE|SPEED)_(DOWNLOAD|UPLOAD)|HTTP_CODE|HEADER_(OUT|SIZE)|NAMELOOKUP_TIME\n |CONNECT_TIME|CONTENT_(TYPE|LENGTH_(DOWNLOAD|UPLOAD))|CERTINFO|TOTAL_TIME\n |PRIVATE|PRETRANSFER_TIME|EFFECTIVE_URL|FILETIME)\n |OPT_(RESUME_FROM|RETURNTRANSFER|REDIR_PROTOCOLS|REFERER|READ(DATA|FUNCTION)|RANGE|RANDOM_FILE\n |MAX(CONNECTS|REDIRS)|BINARYTRANSFER|BUFFERSIZE\n |SSH_(HOST_PUBLIC_KEY_MD5|(PRIVATE|PUBLIC)_KEYFILE)|AUTH_TYPES)\n |SSL(CERT(TYPE|PASSWD)?|ENGINE(_DEFAULT)?|VERSION|KEY(TYPE|PASSWD)?)\n |SSL_(CIPHER_LIST|VERIFY(HOST|PEER))\n |STDERR|HTTP(GET|HEADER|200ALIASES|_VERSION|PROXYTUNNEL|AUTH)\n |HEADER(FUNCTION)?|NO(BODY|SIGNAL|PROGRESS)|NETRC|CRLF|CONNECTTIMEOUT(_MS)?\n |COOKIE(SESSION|JAR|FILE)?|CUSTOMREQUEST|CERTINFO|CLOSEPOLICY|CA(INFO|PATH)|TRANSFERTEXT\n |TCP_NODELAY|TIME(CONDITION|OUT(_MS)?|VALUE)|INTERFACE|INFILE(SIZE)?|IPRESOLVE\n |DNS_(CACHE_TIMEOUT|USE_GLOBAL_CACHE)|URL|USER(AGENT|PWD)|UNRESTRICTED_AUTH|UPLOAD\n |PRIVATE|PROGRESSFUNCTION|PROXY(TYPE|USERPWD|PORT|AUTH)?|PROTOCOLS|PORT\n |POST(REDIR|QUOTE|FIELDS)?|PUT|EGDSOCKET|ENCODING|VERBOSE|KRB4LEVEL|KEYPASSWD|QUOTE|FRESH_CONNECT\n |FTP(APPEND|LISTONLY|PORT|SSLAUTH)\n |FTP_(SSL|SKIP_PASV_IP|CREATE_MISSING_DIRS|USE_EP(RT|SV)|FILEMETHOD)\n |FILE(TIME)?|FORBID_REUSE|FOLLOWLOCATION|FAILONERROR|WRITE(FUNCTION|HEADER)|LOW_SPEED_(LIMIT|TIME)\n |AUTOREFERER)\n |PROXY_(HTTP|SOCKS(4|5))|PROTO_(SCP|SFTP|HTTP(S)?|TELNET|TFTP|DICT|FTP(S)?|FILE|LDAP(S)?|ALL)\n |E_((RECV|READ)_ERROR|GOT_NOTHING|MALFORMAT_USER\n |BAD_(CONTENT_ENCODING|CALLING_ORDER|PASSWORD_ENTERED|FUNCTION_ARGUMENT)\n |SSH|SSL_(CIPHER|CONNECT_ERROR|CERTPROBLEM|CACERT|PEER_CERTIFICATE|ENGINE_(NOTFOUND|SETFAILED))\n |SHARE_IN_USE|SEND_ERROR|HTTP_(RANGE_ERROR|NOT_FOUND|PORT_FAILED|POST_ERROR)\n |COULDNT_(RESOLVE_(HOST|PROXY)|CONNECT)|TOO_MANY_REDIRECTS|TELNET_OPTION_SYNTAX|OBSOLETE\n |OUT_OF_MEMORY|OPERATION|TIMEOUTED|OK|URL_MALFORMAT(_USER)?|UNSUPPORTED_PROTOCOL\n |UNKNOWN_TELNET_OPTION|PARTIAL_FILE\n |FTP_(BAD_DOWNLOAD_RESUME|SSL_FAILED|COULDNT_(RETR_FILE|GET_SIZE|STOR_FILE|SET_(BINARY|ASCII)|USE_REST)\n |CANT_(GET_HOST|RECONNECT)|USER_PASSWORD_INCORRECT|PORT_FAILED|QUOTE_ERROR|WRITE_ERROR\n |WEIRD_((PASS|PASV|SERVER|USER)_REPLY|227_FORMAT)|ACCESS_DENIED)\n |FILESIZE_EXCEEDED|FILE_COULDNT_READ_FILE|FUNCTION_NOT_FOUND|FAILED_INIT|WRITE_ERROR|LIBRARY_NOT_FOUND\n |LDAP_(SEARCH_FAILED|CANNOT_BIND|INVALID_URL)|ABORTED_BY_CALLBACK)\n |VERSION_NOW\n |FTP(METHOD_(MULTI|SINGLE|NO)CWD|SSL_(ALL|NONE|CONTROL|TRY)|AUTH_(DEFAULT|SSL|TLS))\n |AUTH_(ANY(SAFE)?|BASIC|DIGEST|GSSNEGOTIATE|NTLM))\n|CURL_(HTTP_VERSION_(1_(0|1)|NONE)|NETRC_(REQUIRED|IGNORED|OPTIONAL)|TIMECOND_(IF(UN)?MODSINCE|LASTMOD)\n |IPRESOLVE_(V(4|6)|WHATEVER)|VERSION_(SSL|IPV6|KERBEROS4|LIBZ))\n|IMAGETYPE_(GIF|XBM|BMP|SWF|COUNT|TIFF_(MM|II)|ICO|IFF|UNKNOWN|JB2|JPX|JP2|JPC|JPEG(2000)?|PSD|PNG|WBMP)\n|INPUT_(REQUEST|GET|SERVER|SESSION|COOKIE|POST|ENV)|ICONV_(MIME_DECODE_(STRICT|CONTINUE_ON_ERROR)|IMPL|VERSION)\n|DNS_(MX|SRV|SOA|HINFO|NS|NAPTR|CNAME|TXT|PTR|ANY|ALL|AAAA|A(6)?)\n|DOM(STRING_SIZE_ERR)\n|DOM_((SYNTAX|HIERARCHY_REQUEST|NO_(MODIFICATION_ALLOWED|DATA_ALLOWED)|NOT_(FOUND|SUPPORTED)|NAMESPACE\n |INDEX_SIZE|USE_ATTRIBUTE|VALID_(MODIFICATION|STATE|CHARACTER|ACCESS)|PHP|VALIDATION|WRONG_DOCUMENT)_ERR)\n|JSON_(HEX_(TAG|QUOT|AMP|APOS)|NUMERIC_CHECK|ERROR_(SYNTAX|STATE_MISMATCH|NONE|CTRL_CHAR|DEPTH|UTF8)|FORCE_OBJECT)\n|PREG_((D_UTF8(_OFFSET)?|NO|INTERNAL|(BACKTRACK|RECURSION)_LIMIT)_ERROR|GREP_INVERT\n |SPLIT_(NO_EMPTY|(DELIM|OFFSET)_CAPTURE)|SET_ORDER|OFFSET_CAPTURE|PATTERN_ORDER)\n|PSFS_(PASS_ON|ERR_FATAL|FEED_ME|FLAG_(NORMAL|FLUSH_(CLOSE|INC)))\n|PCRE_VERSION|POSIX_((F|R|W|X)_OK|S_IF(REG|BLK|SOCK|CHR|IFO))\n|FNM_(NOESCAPE|CASEFOLD|PERIOD|PATHNAME)\n|FILTER_(REQUIRE_(SCALAR|ARRAY)|NULL_ON_FAILURE|CALLBACK|DEFAULT|UNSAFE_RAW\n |SANITIZE_(MAGIC_QUOTES|STRING|STRIPPED|SPECIAL_CHARS|NUMBER_(INT|FLOAT)|URL\n |EMAIL|ENCODED|FULL_SPCIAL_CHARS)\n |VALIDATE_(REGEXP|BOOLEAN|INT|IP|URL|EMAIL|FLOAT)\n |FORCE_ARRAY\n |FLAG_(SCHEME_REQUIRED|STRIP_(BACKTICK|HIGH|LOW)|HOST_REQUIRED|NONE|NO_(RES|PRIV)_RANGE|ENCODE_QUOTES\n |IPV(4|6)|PATH_REQUIRED|EMPTY_STRING_NULL|ENCODE_(HIGH|LOW|AMP)|QUERY_REQUIRED\n |ALLOW_(SCIENTIFIC|HEX|THOUSAND|OCTAL|FRACTION)))\n|FILE_(BINARY|SKIP_EMPTY_LINES|NO_DEFAULT_CONTEXT|TEXT|IGNORE_NEW_LINES|USE_INCLUDE_PATH|APPEND)\n|FILEINFO_(RAW|MIME(_(ENCODING|TYPE))?|SYMLINK|NONE|CONTINUE|DEVICES|PRESERVE_ATIME)\n|FORCE_(DEFLATE|GZIP)\n|LIBXML_(XINCLUDE|NSCLEAN|NO(XMLDECL|BLANKS|NET|CDATA|ERROR|EMPTYTAG|ENT|WARNING)\n |COMPACT|DTD(VALID|LOAD|ATTR)|((DOTTED|LOADED)_)?VERSION|PARSEHUGE|ERR_(NONE|ERROR|FATAL|WARNING)))\n\\b", + "name": "support.constant.ext.php", + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + } + }, + { + "match": "(?x)\n(\\\\)?\\b\n(T_(RETURN|REQUIRE(_ONCE)?|GOTO|GLOBAL|(MINUS|MOD|MUL|XOR)_EQUAL|METHOD_C|ML_COMMENT|BREAK\n |BOOL_CAST|BOOLEAN_(AND|OR)|BAD_CHARACTER|SR(_EQUAL)?|STRING(_CAST|VARNAME)?|START_HEREDOC|STATIC\n |SWITCH|SL(_EQUAL)?|HALT_COMPILER|NS_(C|SEPARATOR)|NUM_STRING|NEW|NAMESPACE|CHARACTER|COMMENT\n |CONSTANT(_ENCAPSED_STRING)?|CONCAT_EQUAL|CONTINUE|CURLY_OPEN|CLOSE_TAG|CLONE|CLASS(_C)?\n |CASE|CATCH|TRY|THROW|IMPLEMENTS|ISSET|IS_((GREATER|SMALLER)_OR_EQUAL|(NOT_)?(IDENTICAL|EQUAL))\n |INSTANCEOF|INCLUDE(_ONCE)?|INC|INT_CAST|INTERFACE|INLINE_HTML|IF|OR_EQUAL|OBJECT_(CAST|OPERATOR)\n |OPEN_TAG(_WITH_ECHO)?|OLD_FUNCTION|DNUMBER|DIR|DIV_EQUAL|DOC_COMMENT|DOUBLE_(ARROW|CAST|COLON)\n |DOLLAR_OPEN_CURLY_BRACES|DO|DEC|DECLARE|DEFAULT|USE|UNSET(_CAST)?|PRINT|PRIVATE|PROTECTED|PUBLIC\n |PLUS_EQUAL|PAAMAYIM_NEKUDOTAYIM|EXTENDS|EXIT|EMPTY|ENCAPSED_AND_WHITESPACE\n |END(SWITCH|IF|DECLARE|FOR(EACH)?|WHILE)|END_HEREDOC|ECHO|EVAL|ELSE(IF)?|VAR(IABLE)?|FINAL|FILE\n |FOR(EACH)?|FUNC_C|FUNCTION|WHITESPACE|WHILE|LNUMBER|LIST|LINE|LOGICAL_(AND|OR|XOR)\n |ARRAY_(CAST)?|ABSTRACT|AS|AND_EQUAL))\n\\b", + "name": "support.constant.parser-token.php", + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + } + }, + { + "match": "(?i)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*", + "name": "constant.other.php" + } + ] + }, + "function-parameters": { + "patterns": [ + { + "include": "#attribute" + }, + { + "include": "#comments" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.php" + }, + { + "match": "(?xi)\n(?: (\n # nullable type\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ |\n # union, intersection or DNF type\n (?: [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | \\(\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+(?:\\s*&\\s*[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ \\s*\\) )\n (?: \\s*[|&]\\s*\n (?: [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | \\(\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+(?:\\s*&\\s*[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ \\s*\\) )\n )+\n) \\s+ )?\n((?:(&)\\s*)?(\\.\\.\\.)(\\$)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable name with possible reference\n(?=\\s*(?:,|\\)|/[/*]|\\#|$)) # A closing parentheses (end of argument list) or a comma or a comment", + "captures": { + "1": { + "patterns": [ + { + "include": "#php-types" + } + ] + }, + "2": { + "name": "variable.other.php" + }, + "3": { + "name": "storage.modifier.reference.php" + }, + "4": { + "name": "keyword.operator.variadic.php" + }, + "5": { + "name": "punctuation.definition.variable.php" + } + }, + "name": "meta.function.parameter.variadic.php" + }, + { + "begin": "(?xi)\n(\n # nullable type\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ |\n # union, intersection or DNF type\n (?: [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | \\(\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+(?:\\s*&\\s*[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ \\s*\\) )\n (?: \\s*[|&]\\s*\n (?: [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | \\(\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+(?:\\s*&\\s*[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ \\s*\\) )\n )+\n)\n\\s+ ((?:(&)\\s*)?(\\$)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable name with possible reference", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#php-types" + } + ] + }, + "2": { + "name": "variable.other.php" + }, + "3": { + "name": "storage.modifier.reference.php" + }, + "4": { + "name": "punctuation.definition.variable.php" + } + }, + "end": "(?=\\s*(?:,|\\)|/[/*]|\\#))", + "name": "meta.function.parameter.typehinted.php", + "patterns": [ + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "keyword.operator.assignment.php" + } + }, + "end": "(?=\\s*(?:,|\\)|/[/*]|\\#))", + "patterns": [ + { + "include": "#parameter-default-types" + } + ] + } + ] + }, + { + "match": "(?xi)\n((?:(&)\\s*)?(\\$)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable name with possible reference\n(?=\\s*(?:,|\\)|/[/*]|\\#|$)) # A closing parentheses (end of argument list) or a comma or a comment", + "captures": { + "1": { + "name": "variable.other.php" + }, + "2": { + "name": "storage.modifier.reference.php" + }, + "3": { + "name": "punctuation.definition.variable.php" + } + }, + "name": "meta.function.parameter.no-default.php" + }, + { + "begin": "(?xi)\n((?:(&)\\s*)?(\\$)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable name with possible reference\n\\s*(=)\\s*", + "beginCaptures": { + "1": { + "name": "variable.other.php" + }, + "2": { + "name": "storage.modifier.reference.php" + }, + "3": { + "name": "punctuation.definition.variable.php" + }, + "4": { + "name": "keyword.operator.assignment.php" + } + }, + "end": "(?=\\s*(?:,|\\)|/[/*]|\\#))", + "name": "meta.function.parameter.default.php", + "patterns": [ + { + "include": "#parameter-default-types" + } + ] + } + ] + }, + "named-arguments": { + "match": "(?i)(?<=^|\\(|,)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\\s*(:)(?!:)", + "captures": { + "1": { + "name": "entity.name.variable.parameter.php" + }, + "2": { + "name": "punctuation.separator.colon.php" + } + } + }, + "function-call": { + "patterns": [ + { + "begin": "(?x)\n(\n \\\\?(?<![a-zA-Z0-9_\\x{7f}-\\x{10ffff}]) # Optional root namespace\n [a-zA-Z_\\x{7f}-\\x{10ffff}][a-zA-Z0-9_\\x{7f}-\\x{10ffff}]* # First namespace\n (?:\\\\[a-zA-Z_\\x{7f}-\\x{10ffff}][a-zA-Z0-9_\\x{7f}-\\x{10ffff}]*)+ # Additional namespaces\n)\\s*(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#namespace" + }, + { + "match": "(?i)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*", + "name": "entity.name.function.php" + } + ] + }, + "2": { + "name": "punctuation.definition.arguments.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.bracket.round.php" + } + }, + "name": "meta.function-call.php", + "patterns": [ + { + "include": "#named-arguments" + }, + { + "include": "$self" + } + ] + }, + { + "begin": "(\\\\)?(?<![a-zA-Z0-9_\\x{7f}-\\x{10ffff}])([a-zA-Z_\\x{7f}-\\x{10ffff}][a-zA-Z0-9_\\x{7f}-\\x{10ffff}]*)\\s*(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#namespace" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#support" + }, + { + "match": "(?i)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*", + "name": "entity.name.function.php" + } + ] + }, + "3": { + "name": "punctuation.definition.arguments.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.bracket.round.php" + } + }, + "name": "meta.function-call.php", + "patterns": [ + { + "include": "#named-arguments" + }, + { + "include": "$self" + } + ] + }, + { + "match": "(?i)\\b(print|echo)\\b", + "name": "support.function.construct.output.php" + } + ] + }, + "heredoc": { + "patterns": [ + { + "begin": "(?i)(?=<<<\\s*(\"?)([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)(\\1)\\s*$)", + "end": "(?!\\G)", + "name": "string.unquoted.heredoc.php", + "patterns": [ + { + "include": "#heredoc_interior" + } + ] + }, + { + "begin": "(?=<<<\\s*'([a-zA-Z_]+[a-zA-Z0-9_]*)'\\s*$)", + "end": "(?!\\G)", + "name": "string.unquoted.nowdoc.php", + "patterns": [ + { + "include": "#nowdoc_interior" + } + ] + } + ] + }, + "heredoc_interior": { + "patterns": [ + { + "begin": "(<<<)\\s*(\"?)(HTML)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.html", + "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.html", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "text.html.basic" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(XML)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.xml", + "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.xml", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "text.xml" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)([DS]QL)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.sql", + "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.sql", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "source.sql" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(JAVASCRIPT|JS)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.js", + "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.js", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "source.js" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(JSON)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.json", + "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.json", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "source.json" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(CSS)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.css", + "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.css", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "source.css" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(REGEXP?)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "string.regexp.heredoc.php", + "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "(\\\\){1,2}[.$^\\[\\]{}]", + "name": "constant.character.escape.regex.php" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.arbitrary-repitition.php" + }, + "3": { + "name": "punctuation.definition.arbitrary-repitition.php" + } + }, + "match": "({)\\d+(,\\d+)?(})", + "name": "string.regexp.arbitrary-repitition.php" + }, + { + "begin": "\\[(?:\\^?\\])?", + "captures": { + "0": { + "name": "punctuation.definition.character-class.php" + } + }, + "end": "\\]", + "name": "string.regexp.character-class.php", + "patterns": [ + { + "match": "\\\\[\\\\'\\[\\]]", + "name": "constant.character.escape.php" + } + ] + }, + { + "match": "[$^+*]", + "name": "keyword.operator.regexp.php" + }, + { + "begin": "(?i)(?<=^|\\s)(#)\\s(?=[[a-z0-9_\\x{7f}-\\x{10ffff},. \\t?!-][^\\x{00}-\\x{7f}]]*$)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.php" + } + }, + "end": "$", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.php" + } + }, + "name": "comment.line.number-sign.php" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(BLADE)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.html.php.blade", + "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.php.blade", + "patterns": [ + { + "include": "#interpolation" + } + ] + }, + { + "begin": "(?i)(<<<)\\s*(\"?)([a-z_\\x{7f}-\\x{10ffff}]+[a-z0-9_\\x{7f}-\\x{10ffff}]*)(\\2)(\\s*)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "patterns": [ + { + "include": "#interpolation" + } + ] + } + ] + }, + "nowdoc_interior": { + "patterns": [ + { + "begin": "(<<<)\\s*'(HTML)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.html", + "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.html", + "patterns": [ + { + "include": "text.html.basic" + } + ] + }, + { + "begin": "(<<<)\\s*'(XML)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.xml", + "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.xml", + "patterns": [ + { + "include": "text.xml" + } + ] + }, + { + "begin": "(<<<)\\s*'([DS]QL)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.sql", + "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.sql", + "patterns": [ + { + "include": "source.sql" + } + ] + }, + { + "begin": "(<<<)\\s*'(JAVASCRIPT|JS)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.js", + "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.js", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "begin": "(<<<)\\s*'(JSON)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.json", + "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.json", + "patterns": [ + { + "include": "source.json" + } + ] + }, + { + "begin": "(<<<)\\s*'(CSS)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.css", + "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.css", + "patterns": [ + { + "include": "source.css" + } + ] + }, + { + "begin": "(<<<)\\s*'(REGEXP?)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "string.regexp.nowdoc.php", + "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "patterns": [ + { + "match": "(\\\\){1,2}[.$^\\[\\]{}]", + "name": "constant.character.escape.regex.php" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.arbitrary-repitition.php" + }, + "3": { + "name": "punctuation.definition.arbitrary-repitition.php" + } + }, + "match": "({)\\d+(,\\d+)?(})", + "name": "string.regexp.arbitrary-repitition.php" + }, + { + "begin": "\\[(?:\\^?\\])?", + "captures": { + "0": { + "name": "punctuation.definition.character-class.php" + } + }, + "end": "\\]", + "name": "string.regexp.character-class.php", + "patterns": [ + { + "match": "\\\\[\\\\'\\[\\]]", + "name": "constant.character.escape.php" + } + ] + }, + { + "match": "[$^+*]", + "name": "keyword.operator.regexp.php" + }, + { + "begin": "(?i)(?<=^|\\s)(#)\\s(?=[[a-z0-9_\\x{7f}-\\x{10ffff},. \\t?!-][^\\x{00}-\\x{7f}]]*$)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.php" + } + }, + "end": "$", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.php" + } + }, + "name": "comment.line.number-sign.php" + } + ] + }, + { + "begin": "(<<<)\\s*'(BLADE)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.html.php.blade", + "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.php.blade" + }, + { + "begin": "(?i)(<<<)\\s*'([a-z_\\x{7f}-\\x{10ffff}]+[a-z0-9_\\x{7f}-\\x{10ffff}]*)'(\\s*)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", + "endCaptures": { + "1": { + "name": "keyword.operator.nowdoc.php" + } + } + } + ] + }, + "instantiation": { + "begin": "(?i)(new)\\s+(?!class\\b)", + "beginCaptures": { + "1": { + "name": "keyword.other.new.php" + } + }, + "end": "(?i)(?=[^a-z0-9_\\x{7f}-\\x{10ffff}\\\\])", + "patterns": [ + { + "match": "(?i)(parent|static|self)(?![a-z0-9_\\x{7f}-\\x{10ffff}])", + "name": "storage.type.php" + }, + { + "include": "#class-name" + }, + { + "include": "#variable-name" + } + ] + }, + "interpolation": { + "patterns": [ + { + "match": "\\\\[0-7]{1,3}", + "name": "constant.character.escape.octal.php" + }, + { + "match": "\\\\x[0-9A-Fa-f]{1,2}", + "name": "constant.character.escape.hex.php" + }, + { + "match": "\\\\u{[0-9A-Fa-f]+}", + "name": "constant.character.escape.unicode.php" + }, + { + "match": "\\\\[nrtvef$\\\\]", + "name": "constant.character.escape.php" + }, + { + "begin": "{(?=\\$.*?})", + "beginCaptures": { + "0": { + "name": "punctuation.definition.variable.php" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.variable.php" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "#variable-name" + } + ] + }, + "interpolation_double_quoted": { + "patterns": [ + { + "match": "\\\\\"", + "name": "constant.character.escape.php" + }, + { + "include": "#interpolation" + } + ] + }, + "invoke-call": { + "captures": { + "1": { + "name": "variable.other.php" + }, + "2": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(?i)((\\$+)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)(?=\\s*\\()", + "name": "meta.function-call.invoke.php" + }, + "namespace": { + "begin": "(?i)(?:(namespace)|[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)?(\\\\)", + "beginCaptures": { + "1": { + "name": "variable.language.namespace.php" + }, + "2": { + "name": "punctuation.separator.inheritance.php" + } + }, + "end": "(?i)(?![a-z0-9_\\x{7f}-\\x{10ffff}]*\\\\)", + "name": "support.other.namespace.php", + "patterns": [ + { + "match": "\\\\", + "name": "punctuation.separator.inheritance.php" + } + ] + }, + "numbers": { + "patterns": [ + { + "match": "0[xX][0-9a-fA-F]+(?:_[0-9a-fA-F]+)*", + "name": "constant.numeric.hex.php" + }, + { + "match": "0[bB][01]+(?:_[01]+)*", + "name": "constant.numeric.binary.php" + }, + { + "match": "0[oO][0-7]+(?:_[0-7]+)*", + "name": "constant.numeric.octal.php" + }, + { + "match": "0(?:_?[0-7]+)+", + "name": "constant.numeric.octal.php" + }, + { + "match": "(?x)\n(?:\n (?:[0-9]+(?:_[0-9]+)*)?(\\.)[0-9]+(?:_[0-9]+)*(?:[eE][+-]?[0-9]+(?:_[0-9]+)*)?| # .3\n [0-9]+(?:_[0-9]+)*(\\.)(?:[0-9]+(?:_[0-9]+)*)?(?:[eE][+-]?[0-9]+(?:_[0-9]+)*)?| # 3.\n [0-9]+(?:_[0-9]+)*[eE][+-]?[0-9]+(?:_[0-9]+)* # 2e-3\n)", + "name": "constant.numeric.decimal.php", + "captures": { + "1": { + "name": "punctuation.separator.decimal.period.php" + }, + "2": { + "name": "punctuation.separator.decimal.period.php" + } + } + }, + { + "match": "0|[1-9](?:_?[0-9]+)*", + "name": "constant.numeric.decimal.php" + } + ] + }, + "object": { + "patterns": [ + { + "begin": "(\\??->)\\s*(\\$?{)", + "beginCaptures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "punctuation.definition.variable.php" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.variable.php" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "(?i)(\\??->)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "entity.name.function.php" + }, + "3": { + "name": "punctuation.definition.arguments.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.bracket.round.php" + } + }, + "name": "meta.method-call.php", + "patterns": [ + { + "include": "#named-arguments" + }, + { + "include": "$self" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "variable.other.property.php" + }, + "3": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(?i)(\\??->)\\s*((\\$+)?[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)?" + } + ] + }, + "php-types": { + "patterns": [ + { + "match": "\\?", + "name": "keyword.operator.nullable-type.php" + }, + { + "match": "[|&]", + "name": "punctuation.separator.delimiter.php" + }, + { + "match": "(?i)\\b(null|int|float|bool|string|array|object|callable|iterable|true|false|mixed|void)\\b", + "name": "keyword.other.type.php" + }, + { + "match": "(?i)\\b(parent|self)\\b", + "name": "storage.type.php" + }, + { + "match": "\\(", + "name": "punctuation.definition.type.begin.bracket.round.php" + }, + { + "match": "\\)", + "name": "punctuation.definition.type.end.bracket.round.php" + }, + { + "include": "#class-name" + } + ] + }, + "parameter-default-types": { + "patterns": [ + { + "include": "#strings" + }, + { + "include": "#numbers" + }, + { + "include": "#string-backtick" + }, + { + "include": "#variables" + }, + { + "match": "=>", + "name": "keyword.operator.key.php" + }, + { + "match": "=", + "name": "keyword.operator.assignment.php" + }, + { + "match": "&(?=\\s*\\$)", + "name": "storage.modifier.reference.php" + }, + { + "begin": "(array)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "support.function.construct.php" + }, + "2": { + "name": "punctuation.definition.array.begin.bracket.round.php" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.bracket.round.php" + } + }, + "name": "meta.array.php", + "patterns": [ + { + "include": "#parameter-default-types" + } + ] + }, + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.php" + } + }, + "end": "\\]|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.php" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "#instantiation" + }, + { + "begin": "(?xi)\n(?=[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+\n (::)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)?\n)", + "end": "(?i)(::)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)?", + "endCaptures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "constant.other.class.php" + } + }, + "patterns": [ + { + "include": "#class-name" + } + ] + }, + { + "include": "#constants" + } + ] + }, + "php_doc": { + "patterns": [ + { + "match": "^(?!\\s*\\*).*?(?:(?=\\*\\/)|$\\n?)", + "name": "invalid.illegal.missing-asterisk.phpdoc.php" + }, + { + "captures": { + "1": { + "name": "keyword.other.phpdoc.php" + }, + "3": { + "name": "storage.modifier.php" + }, + "4": { + "name": "invalid.illegal.wrong-access-type.phpdoc.php" + } + }, + "match": "^\\s*\\*\\s*(@access)\\s+((public|private|protected)|(.+))\\s*$" + }, + { + "captures": { + "1": { + "name": "keyword.other.phpdoc.php" + }, + "2": { + "name": "markup.underline.link.php" + } + }, + "match": "(@xlink)\\s+(.+)\\s*$" + }, + { + "begin": "(@(?:global|param|property(-(read|write))?|return|throws|var))\\s+(?=[?A-Za-z_\\x{7f}-\\x{10ffff}\\\\]|\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.phpdoc.php" + } + }, + "end": "(?=\\s|\\*/)", + "contentName": "meta.other.type.phpdoc.php", + "patterns": [ + { + "include": "#php_doc_types_array_multiple" + }, + { + "include": "#php_doc_types_array_single" + }, + { + "include": "#php_doc_types" + } + ] + }, + { + "match": "(?x)\n@\n(\n api|abstract|author|category|copyright|example|global|inherit[Dd]oc|internal|\n license|link|method|property(-(read|write))?|package|param|return|see|since|source|\n static|subpackage|throws|todo|var|version|uses|deprecated|final|ignore\n)\\b", + "name": "keyword.other.phpdoc.php" + }, + { + "captures": { + "1": { + "name": "keyword.other.phpdoc.php" + } + }, + "match": "{(@(link|inherit[Dd]oc)).+?}", + "name": "meta.tag.inline.phpdoc.php" + } + ] + }, + "php_doc_types": { + "match": "(?i)\\??[a-z_\\x{7f}-\\x{10ffff}\\\\][a-z0-9_\\x{7f}-\\x{10ffff}\\\\]*([|&]\\??[a-z_\\x{7f}-\\x{10ffff}\\\\][a-z0-9_\\x{7f}-\\x{10ffff}\\\\]*)*", + "captures": { + "0": { + "patterns": [ + { + "match": "\\?", + "name": "keyword.operator.nullable-type.php" + }, + { + "match": "(?x)\\b\n(string|integer|int|boolean|bool|float|double|object|mixed\n|array|resource|void|null|callback|false|true|self|static)\\b", + "name": "keyword.other.type.php" + }, + { + "include": "#class-name" + }, + { + "match": "[|&]", + "name": "punctuation.separator.delimiter.php" + }, + { + "match": "\\(", + "name": "punctuation.definition.type.begin.bracket.round.php" + }, + { + "match": "\\)", + "name": "punctuation.definition.type.end.bracket.round.php" + } + ] + } + } + }, + "php_doc_types_array_multiple": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.type.begin.bracket.round.phpdoc.php" + } + }, + "end": "(\\))(\\[\\])|(?=\\*/)", + "endCaptures": { + "1": { + "name": "punctuation.definition.type.end.bracket.round.phpdoc.php" + }, + "2": { + "name": "keyword.other.array.phpdoc.php" + } + }, + "patterns": [ + { + "include": "#php_doc_types_array_multiple" + }, + { + "include": "#php_doc_types_array_single" + }, + { + "include": "#php_doc_types" + }, + { + "match": "[|&]", + "name": "punctuation.separator.delimiter.php" + } + ] + }, + "php_doc_types_array_single": { + "match": "(?i)([a-z_\\x{7f}-\\x{10ffff}\\\\][a-z0-9_\\x{7f}-\\x{10ffff}\\\\]*)(\\[\\])", + "captures": { + "1": { + "patterns": [ + { + "include": "#php_doc_types" + } + ] + }, + "2": { + "name": "keyword.other.array.phpdoc.php" + } + } + }, + "regex-double-quoted": { + "begin": "\"/(?=(\\\\.|[^\"/])++/[imsxeADSUXu]*\")", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "end": "(/)([imsxeADSUXu]*)(\")", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.regexp.double-quoted.php", + "patterns": [ + { + "match": "(\\\\){1,2}[.$^\\[\\]{}]", + "name": "constant.character.escape.regex.php" + }, + { + "include": "#interpolation_double_quoted" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.arbitrary-repetition.php" + }, + "3": { + "name": "punctuation.definition.arbitrary-repetition.php" + } + }, + "match": "({)\\d+(,\\d+)?(})", + "name": "string.regexp.arbitrary-repetition.php" + }, + { + "begin": "\\[(?:\\^?\\])?", + "captures": { + "0": { + "name": "punctuation.definition.character-class.php" + } + }, + "end": "\\]", + "name": "string.regexp.character-class.php", + "patterns": [ + { + "include": "#interpolation_double_quoted" + } + ] + }, + { + "match": "[$^+*]", + "name": "keyword.operator.regexp.php" + } + ] + }, + "regex-single-quoted": { + "begin": "'/(?=(\\\\(?:\\\\(?:\\\\[\\\\']?|[^'])|.)|[^'/])++/[imsxeADSUXu]*')", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "end": "(/)([imsxeADSUXu]*)(')", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.regexp.single-quoted.php", + "patterns": [ + { + "include": "#single_quote_regex_escape" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.arbitrary-repetition.php" + }, + "3": { + "name": "punctuation.definition.arbitrary-repetition.php" + } + }, + "match": "({)\\d+(,\\d+)?(})", + "name": "string.regexp.arbitrary-repetition.php" + }, + { + "begin": "\\[(?:\\^?\\])?", + "captures": { + "0": { + "name": "punctuation.definition.character-class.php" + } + }, + "end": "\\]", + "name": "string.regexp.character-class.php" + }, + { + "match": "[$^+*]", + "name": "keyword.operator.regexp.php" + } + ] + }, + "scope-resolution": { + "patterns": [ + { + "match": "([A-Za-z_\\x{7f}-\\x{10ffff}\\\\][A-Za-z0-9_\\x{7f}-\\x{10ffff}\\\\]*)(?=\\s*::)", + "captures": { + "1": { + "patterns": [ + { + "match": "\\b(self|static|parent)\\b", + "name": "storage.type.php" + }, + { + "include": "#class-name" + }, + { + "include": "#variable-name" + } + ] + } + } + }, + { + "begin": "(?i)(::)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "entity.name.function.php" + }, + "3": { + "name": "punctuation.definition.arguments.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.bracket.round.php" + } + }, + "name": "meta.method-call.static.php", + "patterns": [ + { + "include": "#named-arguments" + }, + { + "include": "$self" + } + ] + }, + { + "match": "(?i)(::)\\s*(class)\\b", + "captures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "keyword.other.class.php" + } + } + }, + { + "match": "(?xi)\n(::)\\s*\n(?:\n ((\\$+)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable\n |\n ([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Constant\n)?", + "captures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "variable.other.class.php" + }, + "3": { + "name": "punctuation.definition.variable.php" + }, + "4": { + "name": "constant.other.class.php" + } + } + } + ] + }, + "single_quote_regex_escape": { + "match": "\\\\(?:\\\\(?:\\\\[\\\\']?|[^'])|.)", + "name": "constant.character.escape.php" + }, + "sql-string-double-quoted": { + "begin": "\"\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|AND|WITH)\\b)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "contentName": "source.sql.embedded.php", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.quoted.double.sql.php", + "patterns": [ + { + "match": "(#)(\\\\\"|[^\"])*(?=\"|$)", + "name": "comment.line.number-sign.sql", + "captures": { + "1": { + "name": "punctuation.definition.comment.sql" + } + } + }, + { + "match": "(--)(\\\\\"|[^\"])*(?=\"|$)", + "name": "comment.line.double-dash.sql", + "captures": { + "1": { + "name": "punctuation.definition.comment.sql" + } + } + }, + { + "match": "\\\\[\\\\\"`']", + "name": "constant.character.escape.php" + }, + { + "match": "'(?=((\\\\')|[^'\"])*(\"|$))", + "name": "string.quoted.single.unclosed.sql" + }, + { + "match": "`(?=((\\\\`)|[^`\"])*(\"|$))", + "name": "string.quoted.other.backtick.unclosed.sql" + }, + { + "begin": "'", + "end": "'", + "name": "string.quoted.single.sql", + "patterns": [ + { + "include": "#interpolation_double_quoted" + } + ] + }, + { + "begin": "`", + "end": "`", + "name": "string.quoted.other.backtick.sql", + "patterns": [ + { + "include": "#interpolation_double_quoted" + } + ] + }, + { + "include": "#interpolation_double_quoted" + }, + { + "include": "source.sql" + } + ] + }, + "sql-string-single-quoted": { + "begin": "'\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|AND|WITH)\\b)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "contentName": "source.sql.embedded.php", + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.quoted.single.sql.php", + "patterns": [ + { + "match": "(#)(\\\\'|[^'])*(?='|$)", + "name": "comment.line.number-sign.sql", + "captures": { + "1": { + "name": "punctuation.definition.comment.sql" + } + } + }, + { + "match": "(--)(\\\\'|[^'])*(?='|$)", + "name": "comment.line.double-dash.sql", + "captures": { + "1": { + "name": "punctuation.definition.comment.sql" + } + } + }, + { + "match": "\\\\[\\\\'`\"]", + "name": "constant.character.escape.php" + }, + { + "match": "`(?=((\\\\`)|[^`'])*('|$))", + "name": "string.quoted.other.backtick.unclosed.sql" + }, + { + "match": "\"(?=((\\\\\")|[^\"'])*('|$))", + "name": "string.quoted.double.unclosed.sql" + }, + { + "include": "source.sql" + } + ] + }, + "string-backtick": { + "begin": "`", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.interpolated.php", + "patterns": [ + { + "match": "\\\\`", + "name": "constant.character.escape.php" + }, + { + "include": "#interpolation" + } + ] + }, + "string-double-quoted": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.quoted.double.php", + "patterns": [ + { + "include": "#interpolation_double_quoted" + } + ] + }, + "string-single-quoted": { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.php" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.php" + } + }, + "name": "string.quoted.single.php", + "patterns": [ + { + "match": "\\\\[\\\\']", + "name": "constant.character.escape.php" + } + ] + }, + "strings": { + "patterns": [ + { + "include": "#regex-double-quoted" + }, + { + "include": "#sql-string-double-quoted" + }, + { + "include": "#string-double-quoted" + }, + { + "include": "#regex-single-quoted" + }, + { + "include": "#sql-string-single-quoted" + }, + { + "include": "#string-single-quoted" + } + ] + }, + "support": { + "patterns": [ + { + "match": "(?xi)\n\\b\napc_(\n store|sma_info|compile_file|clear_cache|cas|cache_info|inc|dec|define_constants|delete(_file)?|\n exists|fetch|load_constants|add|bin_(dump|load)(file)?\n)\\b", + "name": "support.function.apc.php" + }, + { + "match": "(?xi)\\b\n(\n shuffle|sizeof|sort|next|nat(case)?sort|count|compact|current|in_array|usort|uksort|uasort|\n pos|prev|end|each|extract|ksort|key(_exists)?|krsort|list|asort|arsort|rsort|reset|range|\n array(_(shift|sum|splice|search|slice|chunk|change_key_case|count_values|column|combine|\n (diff|intersect)(_(u)?(key|assoc))?|u(diff|intersect)(_(u)?assoc)?|unshift|unique|\n pop|push|pad|product|values|keys|key_exists|filter|fill(_keys)?|flip|walk(_recursive)?|\n reduce|replace(_recursive)?|reverse|rand|multisort|merge(_recursive)?|map)?)\n)\\b", + "name": "support.function.array.php" + }, + { + "match": "(?xi)\\b\n(\n show_source|sys_getloadavg|sleep|highlight_(file|string)|constant|connection_(aborted|status)|\n time_(nanosleep|sleep_until)|ignore_user_abort|die|define(d)?|usleep|uniqid|unpack|__halt_compiler|\n php_(check_syntax|strip_whitespace)|pack|eval|exit|get_browser\n)\\b", + "name": "support.function.basic_functions.php" + }, + { + "match": "(?i)\\bbc(scale|sub|sqrt|comp|div|pow(mod)?|add|mod|mul)\\b", + "name": "support.function.bcmath.php" + }, + { + "match": "(?i)\\bblenc_encrypt\\b", + "name": "support.function.blenc.php" + }, + { + "match": "(?i)\\bbz(compress|close|open|decompress|errstr|errno|error|flush|write|read)\\b", + "name": "support.function.bz2.php" + }, + { + "match": "(?xi)\\b\n(\n (French|Gregorian|Jewish|Julian)ToJD|cal_(to_jd|info|days_in_month|from_jd)|unixtojd|\n jdto(unix|jewish)|easter_(date|days)|JD(MonthName|To(Gregorian|Julian|French)|DayOfWeek)\n)\\b", + "name": "support.function.calendar.php" + }, + { + "match": "(?xi)\\b\n(\n class_alias|all_user_method(_array)?|is_(a|subclass_of)|__autoload|(class|interface|method|property|trait)_exists|\n get_(class(_(vars|methods))?|(called|parent)_class|object_vars|declared_(classes|interfaces|traits))\n)\\b", + "name": "support.function.classobj.php" + }, + { + "match": "(?xi)\\b\n(\n com_(create_guid|print_typeinfo|event_sink|load_typelib|get_active_object|message_pump)|\n variant_(sub|set(_type)?|not|neg|cast|cat|cmp|int|idiv|imp|or|div|date_(from|to)_timestamp|\n pow|eqv|fix|and|add|abs|round|get_type|xor|mod|mul)\n)\\b", + "name": "support.function.com.php" + }, + { + "match": "(?i)\\b(isset|unset|eval|empty|list)\\b", + "name": "support.function.construct.php" + }, + { + "match": "(?i)\\b(print|echo)\\b", + "name": "support.function.construct.output.php" + }, + { + "match": "(?i)\\bctype_(space|cntrl|digit|upper|punct|print|lower|alnum|alpha|graph|xdigit)\\b", + "name": "support.function.ctype.php" + }, + { + "match": "(?xi)\\b\ncurl_(\n share_(close|init|setopt)|strerror|setopt(_array)?|copy_handle|close|init|unescape|pause|escape|\n errno|error|exec|version|file_create|reset|getinfo|\n multi_(strerror|setopt|select|close|init|info_read|(add|remove)_handle|getcontent|exec)\n)\\b", + "name": "support.function.curl.php" + }, + { + "match": "(?xi)\\b\n(\n strtotime|str[fp]time|checkdate|time|timezone_name_(from_abbr|get)|idate|\n timezone_((location|offset|transitions|version)_get|(abbreviations|identifiers)_list|open)|\n date(_(sun(rise|set)|sun_info|sub|create(_(immutable_)?from_format)?|timestamp_(get|set)|timezone_(get|set)|time_set|\n isodate_set|interval_(create_from_date_string|format)|offset_get|diff|default_timezone_(get|set)|date_set|\n parse(_from_format)?|format|add|get_last_errors|modify))?|\n localtime|get(date|timeofday)|gm(strftime|date|mktime)|microtime|mktime\n)\\b", + "name": "support.function.datetime.php" + }, + { + "match": "(?i)\\bdba_(sync|handlers|nextkey|close|insert|optimize|open|delete|popen|exists|key_split|firstkey|fetch|list|replace)\\b", + "name": "support.function.dba.php" + }, + { + "match": "(?i)\\bdbx_(sort|connect|compare|close|escape_string|error|query|fetch_row)\\b", + "name": "support.function.dbx.php" + }, + { + "match": "(?i)\\b(scandir|chdir|chroot|closedir|opendir|dir|rewinddir|readdir|getcwd)\\b", + "name": "support.function.dir.php" + }, + { + "match": "(?xi)\\b\neio_(\n sync(fs)?|sync_file_range|symlink|stat(vfs)?|sendfile|set_min_parallel|set_max_(idle|poll_(reqs|time)|parallel)|\n seek|n(threads|op|pending|reqs|ready)|chown|chmod|custom|close|cancel|truncate|init|open|dup2|unlink|utime|poll|\n event_loop|f(sync|stat(vfs)?|chown|chmod|truncate|datasync|utime|allocate)|write|lstat|link|rename|realpath|\n read(ahead|dir|link)?|rmdir|get_(event_stream|last_error)|grp(_(add|cancel|limit))?|mknod|mkdir|busy\n)\\b", + "name": "support.function.eio.php" + }, + { + "match": "(?xi)\\b\nenchant_(\n dict_(store_replacement|suggest|check|is_in_session|describe|quick_check|add_to_(personal|session)|get_error)|\n broker_(set_ordering|init|dict_exists|describe|free(_dict)?|list_dicts|request_(pwl_)?dict|get_error)\n)\\b", + "name": "support.function.enchant.php" + }, + { + "match": "(?i)\\b(split(i)?|sql_regcase|ereg(i)?(_replace)?)\\b", + "name": "support.function.ereg.php" + }, + { + "match": "(?i)\\b((restore|set)_(error_handler|exception_handler)|trigger_error|debug_(print_)?backtrace|user_error|error_(log|reporting|get_last))\\b", + "name": "support.function.errorfunc.php" + }, + { + "match": "(?i)\\b(shell_exec|system|passthru|proc_(nice|close|terminate|open|get_status)|escapeshell(arg|cmd)|exec)\\b", + "name": "support.function.exec.php" + }, + { + "match": "(?i)\\b(exif_(thumbnail|tagname|imagetype|read_data)|read_exif_data)\\b", + "name": "support.function.exif.php" + }, + { + "match": "(?xi)\\b\nfann_(\n (duplicate|length|merge|shuffle|subset)_train_data|scale_(train(_data)?|(input|output)(_train_data)?)|\n set_(scaling_params|sarprop_(step_error_(shift|threshold_factor)|temperature|weight_decay_shift)|\n cascade_(num_candidate_groups|candidate_(change_fraction|limit|stagnation_epochs)|\n output_(change_fraction|stagnation_epochs)|weight_multiplier|activation_(functions|steepnesses)|\n (max|min)_(cand|out)_epochs)|\n callback|training_algorithm|train_(error|stop)_function|(input|output)_scaling_params|error_log|\n quickprop_(decay|mu)|weight(_array)?|learning_(momentum|rate)|bit_fail_limit|\n activation_(function|steepness)(_(hidden|layer|output))?|\n rprop_((decrease|increase)_factor|delta_(max|min|zero)))|\n save(_train)?|num_(input|output)_train_data|copy|clear_scaling_params|cascadetrain_on_(file|data)|\n create_((sparse|shortcut|standard)(_array)?|train(_from_callback)?|from_file)|\n test(_data)?|train(_(on_(file|data)|epoch))?|init_weights|descale_(input|output|train)|destroy(_train)?|\n print_error|run|reset_(MSE|err(no|str))|read_train_from_file|randomize_weights|\n get_(sarprop_(step_error_(shift|threshold_factor)|temperature|weight_decay_shift)|num_(input|output|layers)|\n network_type|MSE|connection_(array|rate)|bias_array|bit_fail(_limit)?|\n cascade_(num_(candidates|candidate_groups)|(candidate|output)_(change_fraction|limit|stagnation_epochs)|\n weight_multiplier|activation_(functions|steepnesses)(_count)?|(max|min)_(cand|out)_epochs)|\n total_(connections|neurons)|training_algorithm|train_(error|stop)_function|err(no|str)|\n quickprop_(decay|mu)|learning_(momentum|rate)|layer_array|activation_(function|steepness)|\n rprop_((decrease|increase)_factor|delta_(max|min|zero)))\n)\\b", + "name": "support.function.fann.php" + }, + { + "match": "(?xi)\\b\n(\n symlink|stat|set_file_buffer|chown|chgrp|chmod|copy|clearstatcache|touch|tempnam|tmpfile|\n is_(dir|(uploaded_)?file|executable|link|readable|writ(e)?able)|disk_(free|total)_space|diskfreespace|\n dirname|delete|unlink|umask|pclose|popen|pathinfo|parse_ini_(file|string)|fscanf|fstat|fseek|fnmatch|\n fclose|ftell|ftruncate|file(size|[acm]time|type|inode|owner|perms|group)?|file_(exists|(get|put)_contents)|\n f(open|puts|putcsv|passthru|eof|flush|write|lock|read|gets(s)?|getc(sv)?)|lstat|lchown|lchgrp|link(info)?|\n rename|rewind|read(file|link)|realpath(_cache_(get|size))?|rmdir|glob|move_uploaded_file|mkdir|basename\n)\\b", + "name": "support.function.file.php" + }, + { + "match": "(?i)\\b(finfo_(set_flags|close|open|file|buffer)|mime_content_type)\\b", + "name": "support.function.fileinfo.php" + }, + { + "match": "(?i)\\bfilter_(has_var|input(_array)?|id|var(_array)?|list)\\b", + "name": "support.function.filter.php" + }, + { + "match": "(?i)\\bfastcgi_finish_request\\b", + "name": "support.function.fpm.php" + }, + { + "match": "(?i)\\b(call_user_(func|method)(_array)?|create_function|unregister_tick_function|forward_static_call(_array)?|function_exists|func_(num_args|get_arg(s)?)|register_(shutdown|tick)_function|get_defined_functions)\\b", + "name": "support.function.funchand.php" + }, + { + "match": "(?i)\\b((n)?gettext|textdomain|d((n)?gettext|c(n)?gettext)|bind(textdomain|_textdomain_codeset))\\b", + "name": "support.function.gettext.php" + }, + { + "match": "(?xi)\\b\ngmp_(\n scan[01]|strval|sign|sub|setbit|sqrt(rem)?|hamdist|neg|nextprime|com|clrbit|cmp|testbit|\n intval|init|invert|import|or|div(exact)?|div_(q|qr|r)|jacobi|popcount|pow(m)?|perfect_square|\n prob_prime|export|fact|legendre|and|add|abs|root(rem)?|random(_(bits|range))?|gcd(ext)?|xor|mod|mul\n)\\b", + "name": "support.function.gmp.php" + }, + { + "match": "(?i)\\bhash(_(hmac(_file)?|copy|init|update(_(file|stream))?|pbkdf2|equals|file|final|algos))?\\b", + "name": "support.function.hash.php" + }, + { + "match": "(?xi)\\b\n(\n http_(support|send_(status|stream|content_(disposition|type)|data|file|last_modified)|head|\n negotiate_(charset|content_type|language)|chunked_decode|cache_(etag|last_modified)|throttle|\n inflate|deflate|date|post_(data|fields)|put_(data|file|stream)|persistent_handles_(count|clean|ident)|\n parse_(cookie|headers|message|params)|redirect|request(_(method_(exists|name|(un)?register)|body_encode))?|\n get(_request_(headers|body(_stream)?))?|match_(etag|modified|request_header)|build_(cookie|str|url))|\n ob_(etag|deflate|inflate)handler\n)\\b", + "name": "support.function.http.php" + }, + { + "match": "(?i)\\b(iconv(_(str(pos|len|rpos)|substr|(get|set)_encoding|mime_(decode(_headers)?|encode)))?|ob_iconv_handler)\\b", + "name": "support.function.iconv.php" + }, + { + "match": "(?i)\\biis_((start|stop)_(service|server)|set_(script_map|server_rights|dir_security|app_settings)|(add|remove)_server|get_(script_map|service_state|server_(rights|by_(comment|path))|dir_security))\\b", + "name": "support.function.iisfunc.php" + }, + { + "match": "(?xi)\\b\n(\n iptc(embed|parse)|(jpeg|png)2wbmp|gd_info|getimagesize(fromstring)?|\n image(s[xy]|scale|(char|string)(up)?|set(style|thickness|tile|interpolation|pixel|brush)|savealpha|\n convolution|copy(resampled|resized|merge(gray)?)?|colors(forindex|total)|\n color(set|closest(alpha|hwb)?|transparent|deallocate|(allocate|exact|resolve)(alpha)?|at|match)|\n crop(auto)?|create(truecolor|from(string|jpeg|png|wbmp|webp|gif|gd(2(part)?)?|xpm|xbm))?|\n types|ttf(bbox|text)|truecolortopalette|istruecolor|interlace|2wbmp|destroy|dashedline|jpeg|\n _type_to_(extension|mime_type)|ps(slantfont|text|(encode|extend|free|load)font|bbox)|png|polygon|\n palette(copy|totruecolor)|ellipse|ft(text|bbox)|filter|fill|filltoborder|\n filled(arc|ellipse|polygon|rectangle)|font(height|width)|flip|webp|wbmp|line|loadfont|layereffect|\n antialias|affine(matrix(concat|get))?|alphablending|arc|rotate|rectangle|gif|gd(2)?|gammacorrect|\n grab(screen|window)|xbm)\n)\\b", + "name": "support.function.image.php" + }, + { + "match": "(?xi)\\b\n(\n sys_get_temp_dir|set_(time_limit|include_path|magic_quotes_runtime)|cli_(get|set)_process_title|\n ini_(alter|get(_all)?|restore|set)|zend_(thread_id|version|logo_guid)|dl|php(credits|info|version)|\n php_(sapi_name|ini_(scanned_files|loaded_file)|uname|logo_guid)|putenv|extension_loaded|version_compare|\n assert(_options)?|restore_include_path|gc_(collect_cycles|disable|enable(d)?)|getopt|\n get_(cfg_var|current_user|defined_constants|extension_funcs|include_path|included_files|loaded_extensions|\n magic_quotes_(gpc|runtime)|required_files|resources)|\n get(env|lastmod|rusage|my(inode|[gup]id))|\n memory_get_(peak_)?usage|main|magic_quotes_runtime\n)\\b", + "name": "support.function.info.php" + }, + { + "match": "(?xi)\\b\nibase_(\n set_event_handler|service_(attach|detach)|server_info|num_(fields|params)|name_result|connect|\n commit(_ret)?|close|trans|delete_user|drop_db|db_info|pconnect|param_info|prepare|err(code|msg)|\n execute|query|field_info|fetch_(assoc|object|row)|free_(event_handler|query|result)|wait_event|\n add_user|affected_rows|rollback(_ret)?|restore|gen_id|modify_user|maintain_db|backup|\n blob_(cancel|close|create|import|info|open|echo|add|get)\n)\\b", + "name": "support.function.interbase.php" + }, + { + "match": "(?xi)\\b\n(\n normalizer_(normalize|is_normalized)|idn_to_(unicode|utf8|ascii)|\n numfmt_(set_(symbol|(text_)?attribute|pattern)|create|(parse|format)(_currency)?|\n get_(symbol|(text_)?attribute|pattern|error_(code|message)|locale))|\n collator_(sort(_with_sort_keys)?|set_(attribute|strength)|compare|create|asort|\n get_(strength|sort_key|error_(code|message)|locale|attribute))|\n transliterator_(create(_(inverse|from_rules))?|transliterate|list_ids|get_error_(code|message))|\n intl(cal|tz)_get_error_(code|message)|intl_(is_failure|error_name|get_error_(code|message))|\n datefmt_(set_(calendar|lenient|pattern|timezone(_id)?)|create|is_lenient|parse|format(_object)?|localtime|\n get_(calendar(_object)?|time(type|zone(_id)?)|datetype|pattern|error_(code|message)|locale))|\n locale_(set_default|compose|canonicalize|parse|filter_matches|lookup|accept_from_http|\n get_(script|display_(script|name|variant|language|region)|default|primary_language|keywords|all_variants|region))|\n resourcebundle_(create|count|locales|get(_(error_(code|message)))?)|\n grapheme_(str(i?str|r?i?pos|len)|substr|extract)|\n msgfmt_(set_pattern|create|(format|parse)(_message)?|get_(pattern|error_(code|message)|locale))\n)\\b", + "name": "support.function.intl.php" + }, + { + "match": "(?i)\\bjson_(decode|encode|last_error(_msg)?)\\b", + "name": "support.function.json.php" + }, + { + "match": "(?xi)\\b\nldap_(\n start|tls|sort|search|sasl_bind|set_(option|rebind_proc)|(first|next)_(attribute|entry|reference)|\n connect|control_paged_result(_response)?|count_entries|compare|close|t61_to_8859|8859_to_t61|\n dn2ufn|delete|unbind|parse_(reference|result)|escape|errno|err2str|error|explode_dn|bind|\n free_result|list|add|rename|read|get_(option|dn|entries|values(_len)?|attributes)|modify(_batch)?|\n mod_(add|del|replace)\n)\\b", + "name": "support.function.ldap.php" + }, + { + "match": "(?i)\\blibxml_(set_(streams_context|external_entity_loader)|clear_errors|disable_entity_loader|use_internal_errors|get_(errors|last_error))\\b", + "name": "support.function.libxml.php" + }, + { + "match": "(?i)\\b(ezmlm_hash|mail)\\b", + "name": "support.function.mail.php" + }, + { + "match": "(?xi)\\b\n(\n (a)?(cos|sin|tan)(h)?|sqrt|srand|hypot|hexdec|ceil|is_(nan|(in)?finite)|octdec|dec(hex|oct|bin)|deg2rad|\n pi|pow|exp(m1)?|floor|fmod|lcg_value|log(1(p|0))?|atan2|abs|round|rand|rad2deg|getrandmax|\n mt_(srand|rand|getrandmax)|max|min|bindec|base_convert\n)\\b", + "name": "support.function.math.php" + }, + { + "match": "(?xi)\\b\nmb_(\n str(cut|str|to(lower|upper)|istr|ipos|imwidth|pos|width|len|rchr|richr|ripos|rpos)|\n substitute_character|substr(_count)?|split|send_mail|http_(input|output)|check_encoding|\n convert_(case|encoding|kana|variables)|internal_encoding|output_handler|decode_(numericentity|mimeheader)|\n detect_(encoding|order)|parse_str|preferred_mime_name|encoding_aliases|encode_(numericentity|mimeheader)|\n ereg(i(_replace)?)?|ereg_(search(_(get(pos|regs)|init|regs|(set)?pos))?|replace(_callback)?|match)|\n list_encodings|language|regex_(set_options|encoding)|get_info\n)\\b", + "name": "support.function.mbstring.php" + }, + { + "match": "(?xi)\\b\n(\n mcrypt_(\n cfb|create_iv|cbc|ofb|decrypt|encrypt|ecb|list_(algorithms|modes)|generic(_((de)?init|end))?|\n enc_(self_test|is_block_(algorithm|algorithm_mode|mode)|\n get_(supported_key_sizes|(block|iv|key)_size|(algorithms|modes)_name))|\n get_(cipher_name|(block|iv|key)_size)|\n module_(close|self_test|is_block_(algorithm|algorithm_mode|mode)|open|\n get_(supported_key_sizes|algo_(block|key)_size)))|\n mdecrypt_generic\n)\\b", + "name": "support.function.mcrypt.php" + }, + { + "match": "(?i)\\bmemcache_debug\\b", + "name": "support.function.memcache.php" + }, + { + "match": "(?i)\\bmhash(_(count|keygen_s2k|get_(hash_name|block_size)))?\\b", + "name": "support.function.mhash.php" + }, + { + "match": "(?i)\\b(log_(cmd_(insert|delete|update)|killcursor|write_batch|reply|getmore)|bson_(decode|encode))\\b", + "name": "support.function.mongo.php" + }, + { + "match": "(?xi)\\b\nmysql_(\n stat|set_charset|select_db|num_(fields|rows)|connect|client_encoding|close|create_db|escape_string|\n thread_id|tablename|insert_id|info|data_seek|drop_db|db_(name|query)|unbuffered_query|pconnect|ping|\n errno|error|query|field_(seek|name|type|table|flags|len)|fetch_(object|field|lengths|assoc|array|row)|\n free_result|list_(tables|dbs|processes|fields)|affected_rows|result|real_escape_string|\n get_(client|host|proto|server)_info\n)\\b", + "name": "support.function.mysql.php" + }, + { + "match": "(?xi)\\b\nmysqli_(\n ssl_set|store_result|stat|send_(query|long_data)|set_(charset|opt|local_infile_(default|handler))|\n stmt_(store_result|send_long_data|next_result|close|init|data_seek|prepare|execute|fetch|free_result|\n attr_(get|set)|result_metadata|reset|get_(result|warnings)|more_results|bind_(param|result))|\n select_db|slave_query|savepoint|next_result|change_user|character_set_name|connect|commit|\n client_encoding|close|thread_safe|init|options|(enable|disable)_(reads_from_master|rpl_parse)|\n dump_debug_info|debug|data_seek|use_result|ping|poll|param_count|prepare|escape_string|execute|\n embedded_server_(start|end)|kill|query|field_seek|free_result|autocommit|rollback|report|refresh|\n fetch(_(object|fields|field(_direct)?|assoc|all|array|row))?|rpl_(parse_enabled|probe|query_type)|\n release_savepoint|reap_async_query|real_(connect|escape_string|query)|more_results|multi_query|\n get_(charset|connection_stats|client_(stats|info|version)|cache_stats|warnings|links_stats|metadata)|\n master_query|bind_(param|result)|begin_transaction\n)\\b", + "name": "support.function.mysqli.php" + }, + { + "match": "(?i)\\bmysqlnd_memcache_(set|get_config)\\b", + "name": "support.function.mysqlnd-memcache.php" + }, + { + "match": "(?i)\\bmysqlnd_ms_(set_(user_pick_server|qos)|dump_servers|query_is_select|fabric_select_(shard|global)|get_(stats|last_(used_connection|gtid))|xa_(commit|rollback|gc|begin)|match_wild)\\b", + "name": "support.function.mysqlnd-ms.php" + }, + { + "match": "(?i)\\bmysqlnd_qc_(set_(storage_handler|cache_condition|is_select|user_handlers)|clear_cache|get_(normalized_query_trace_log|core_stats|cache_info|query_trace_log|available_handlers))\\b", + "name": "support.function.mysqlnd-qc.php" + }, + { + "match": "(?i)\\bmysqlnd_uh_(set_(statement|connection)_proxy|convert_to_mysqlnd)\\b", + "name": "support.function.mysqlnd-uh.php" + }, + { + "match": "(?xi)\\b\n(\n syslog|socket_(set_(blocking|timeout)|get_status)|set(raw)?cookie|http_response_code|openlog|\n headers_(list|sent)|header(_(register_callback|remove))?|checkdnsrr|closelog|inet_(ntop|pton)|ip2long|\n openlog|dns_(check_record|get_(record|mx))|define_syslog_variables|(p)?fsockopen|long2ip|\n get(servby(name|port)|host(name|by(name(l)?|addr))|protoby(name|number)|mxrr)\n)\\b", + "name": "support.function.network.php" + }, + { + "match": "(?i)\\bnsapi_(virtual|response_headers|request_headers)\\b", + "name": "support.function.nsapi.php" + }, + { + "match": "(?xi)\\b\n(\n oci(statementtype|setprefetch|serverversion|savelob(file)?|numcols|new(collection|cursor|descriptor)|nlogon|\n column(scale|size|name|type(raw)?|isnull|precision)|coll(size|trim|assign(elem)?|append|getelem|max)|commit|\n closelob|cancel|internaldebug|definebyname|plogon|parse|error|execute|fetch(statement|into)?|\n free(statement|collection|cursor|desc)|write(temporarylob|lobtofile)|loadlob|log(on|off)|rowcount|rollback|\n result|bindbyname)|\n oci_(statement_type|set_(client_(info|identifier)|prefetch|edition|action|module_name)|server_version|\n num_(fields|rows)|new_(connect|collection|cursor|descriptor)|connect|commit|client_version|close|cancel|\n internal_debug|define_by_name|pconnect|password_change|parse|error|execute|bind_(array_)?by_name|\n field_(scale|size|name|type(_raw)?|is_null|precision)|fetch(_(object|assoc|all|array|row))?|\n free_(statement|descriptor)|lob_(copy|is_equal)|rollback|result|get_implicit_resultset)\n)\\b", + "name": "support.function.oci8.php" + }, + { + "match": "(?i)\\bopcache_(compile_file|invalidate|reset|get_(status|configuration))\\b", + "name": "support.function.opcache.php" + }, + { + "match": "(?xi)\\b\nopenssl_(\n sign|spki_(new|export(_challenge)?|verify)|seal|csr_(sign|new|export(_to_file)?|get_(subject|public_key))|\n cipher_iv_length|open|dh_compute_key|digest|decrypt|public_(decrypt|encrypt)|encrypt|error_string|\n pkcs12_(export(_to_file)?|read)|pkcs7_(sign|decrypt|encrypt|verify)|verify|free_key|random_pseudo_bytes|\n pkey_(new|export(_to_file)?|free|get_(details|public|private))|private_(decrypt|encrypt)|pbkdf2|\n get_((cipher|md)_methods|cert_locations|(public|private)key)|\n x509_(check_private_key|checkpurpose|parse|export(_to_file)?|fingerprint|free|read)\n)\\b", + "name": "support.function.openssl.php" + }, + { + "match": "(?xi)\\b\n(\n output_(add_rewrite_var|reset_rewrite_vars)|flush|\n ob_(start|clean|implicit_flush|end_(clean|flush)|flush|list_handlers|gzhandler|\n get_(status|contents|clean|flush|length|level))\n)\\b", + "name": "support.function.output.php" + }, + { + "match": "(?i)\\bpassword_(hash|needs_rehash|verify|get_info)\\b", + "name": "support.function.password.php" + }, + { + "match": "(?xi)\\b\npcntl_(\n strerror|signal(_dispatch)?|sig(timedwait|procmask|waitinfo)|setpriority|errno|exec|fork|\n w(stopsig|termsig|if(stopped|signaled|exited))|wait(pid)?|alarm|getpriority|get_last_error\n)\\b", + "name": "support.function.pcntl.php" + }, + { + "match": "(?xi)\\b\npg_(\n socket|send_(prepare|execute|query(_params)?)|set_(client_encoding|error_verbosity)|select|host|\n num_(fields|rows)|consume_input|connection_(status|reset|busy)|connect(_poll)?|convert|copy_(from|to)|\n client_encoding|close|cancel_query|tty|transaction_status|trace|insert|options|delete|dbname|untrace|\n unescape_bytea|update|pconnect|ping|port|put_line|parameter_status|prepare|version|query(_params)?|\n escape_(string|identifier|literal|bytea)|end_copy|execute|flush|free_result|last_(notice|error|oid)|\n field_(size|num|name|type(_oid)?|table|is_null|prtlen)|affected_rows|result_(status|seek|error(_field)?)|\n fetch_(object|assoc|all(_columns)?|array|row|result)|get_(notify|pid|result)|meta_data|\n lo_(seek|close|create|tell|truncate|import|open|unlink|export|write|read(_all)?)|\n)\\b", + "name": "support.function.pgsql.php" + }, + { + "match": "(?i)\\b(virtual|getallheaders|apache_((get|set)env|note|child_terminate|lookup_uri|response_headers|reset_timeout|request_headers|get_(version|modules)))\\b", + "name": "support.function.php_apache.php" + }, + { + "match": "(?i)\\bdom_import_simplexml\\b", + "name": "support.function.php_dom.php" + }, + { + "match": "(?xi)\\b\nftp_(\n ssl_connect|systype|site|size|set_option|nlist|nb_(continue|f?(put|get))|ch(dir|mod)|connect|cdup|close|\n delete|put|pwd|pasv|exec|quit|f(put|get)|login|alloc|rename|raw(list)?|rmdir|get(_option)?|mdtm|mkdir\n)\\b", + "name": "support.function.php_ftp.php" + }, + { + "match": "(?xi)\\b\nimap_(\n (create|delete|list|rename|scan)(mailbox)?|status|sort|subscribe|set_quota|set(flag_full|acl)|search|savebody|\n num_(recent|msg)|check|close|clearflag_full|thread|timeout|open|header(info)?|headers|append|alerts|reopen|\n 8bit|unsubscribe|undelete|utf7_(decode|encode)|utf8|uid|ping|errors|expunge|qprint|gc|\n fetch(structure|header|text|mime|body)|fetch_overview|lsub|list(scan|subscribed)|last_error|\n rfc822_(parse_(headers|adrlist)|write_address)|get(subscribed|acl|mailboxes)|get_quota(root)?|\n msgno|mime_header_decode|mail_(copy|compose|move)|mail|mailboxmsginfo|binary|body(struct)?|base64\n)\\b", + "name": "support.function.php_imap.php" + }, + { + "match": "(?xi)\\b\nmssql_(\n select_db|num_(fields|rows)|next_result|connect|close|init|data_seek|pconnect|execute|query|\n field_(seek|name|type|length)|fetch_(object|field|assoc|array|row|batch)|free_(statement|result)|\n rows_affected|result|guid_string|get_last_message|min_(error|message)_severity|bind\n)\\b", + "name": "support.function.php_mssql.php" + }, + { + "match": "(?xi)\\b\nodbc_(\n statistics|specialcolumns|setoption|num_(fields|rows)|next_result|connect|columns|columnprivileges|commit|\n cursor|close(_all)?|tables|tableprivileges|do|data_source|pconnect|primarykeys|procedures|procedurecolumns|\n prepare|error(msg)?|exec(ute)?|field_(scale|num|name|type|precision|len)|foreignkeys|free_result|\n fetch_(into|object|array|row)|longreadlen|autocommit|rollback|result(_all)?|gettypeinfo|binmode\n)\\b", + "name": "support.function.php_odbc.php" + }, + { + "match": "(?i)\\bpreg_(split|quote|filter|last_error|replace(_callback)?|grep|match(_all)?)\\b", + "name": "support.function.php_pcre.php" + }, + { + "match": "(?i)\\b(spl_(classes|object_hash|autoload(_(call|unregister|extensions|functions|register))?)|class_(implements|uses|parents)|iterator_(count|to_array|apply))\\b", + "name": "support.function.php_spl.php" + }, + { + "match": "(?i)\\bzip_(close|open|entry_(name|compressionmethod|compressedsize|close|open|filesize|read)|read)\\b", + "name": "support.function.php_zip.php" + }, + { + "match": "(?xi)\\b\nposix_(\n strerror|set(s|e?u|[ep]?g)id|ctermid|ttyname|times|isatty|initgroups|uname|errno|kill|access|\n get(sid|cwd|uid|pid|ppid|pwnam|pwuid|pgid|pgrp|euid|egid|login|rlimit|gid|grnam|groups|grgid)|\n get_last_error|mknod|mkfifo\n)\\b", + "name": "support.function.posix.php" + }, + { + "match": "(?i)\\bset(thread|proc)title\\b", + "name": "support.function.proctitle.php" + }, + { + "match": "(?xi)\\b\npspell_(\n store_replacement|suggest|save_wordlist|new(_(config|personal))?|check|clear_session|\n config_(save_repl|create|ignore|(data|dict)_dir|personal|runtogether|repl|mode)|add_to_(session|personal)\n)\\b", + "name": "support.function.pspell.php" + }, + { + "match": "(?i)\\breadline(_(completion_function|clear_history|callback_(handler_(install|remove)|read_char)|info|on_new_line|write_history|list_history|add_history|redisplay|read_history))?\\b", + "name": "support.function.readline.php" + }, + { + "match": "(?i)\\brecode(_(string|file))?\\b", + "name": "support.function.recode.php" + }, + { + "match": "(?i)\\brrd(c_disconnect|_(create|tune|info|update|error|version|first|fetch|last(update)?|restore|graph|xport))\\b", + "name": "support.function.rrd.php" + }, + { + "match": "(?xi)\\b\n(\n shm_((get|has|remove|put)_var|detach|attach|remove)|sem_(acquire|release|remove|get)|ftok|\n msg_((get|remove|set|stat)_queue|send|queue_exists|receive)\n)\\b", + "name": "support.function.sem.php" + }, + { + "match": "(?xi)\\b\nsession_(\n status|start|set_(save_handler|cookie_params)|save_path|name|commit|cache_(expire|limiter)|\n is_registered|id|destroy|decode|unset|unregister|encode|write_close|abort|reset|register(_shutdown)?|\n regenerate_id|get_cookie_params|module_name\n)\\b", + "name": "support.function.session.php" + }, + { + "match": "(?i)\\bshmop_(size|close|open|delete|write|read)\\b", + "name": "support.function.shmop.php" + }, + { + "match": "(?i)\\bsimplexml_(import_dom|load_(string|file))\\b", + "name": "support.function.simplexml.php" + }, + { + "match": "(?xi)\\b\n(\n snmp(walk(oid)?|realwalk|get(next)?|set)|\n snmp_(set_(valueretrieval|quick_print|enum_print|oid_(numeric_print|output_format))|read_mib|\n get_(valueretrieval|quick_print))|\n snmp[23]_(set|walk|real_walk|get(next)?)\n)\\b", + "name": "support.function.snmp.php" + }, + { + "match": "(?i)\\b(is_soap_fault|use_soap_error_handler)\\b", + "name": "support.function.soap.php" + }, + { + "match": "(?xi)\\b\nsocket_(\n shutdown|strerror|send(to|msg)?|set_((non)?block|option)|select|connect|close|clear_error|bind|\n create(_(pair|listen))?|cmsg_space|import_stream|write|listen|last_error|accept|recv(from|msg)?|\n read|get(peer|sock)name|get_option\n)\\b", + "name": "support.function.sockets.php" + }, + { + "match": "(?xi)\\b\nsqlite_(\n single_query|seek|has_(more|prev)|num_(fields|rows)|next|changes|column|current|close|\n create_(aggregate|function)|open|unbuffered_query|udf_(decode|encode)_binary|popen|prev|\n escape_string|error_string|exec|valid|key|query|field_name|factory|\n fetch_(string|single|column_types|object|all|array)|lib(encoding|version)|\n last_(insert_rowid|error)|array_query|rewind|busy_timeout\n)\\b", + "name": "support.function.sqlite.php" + }, + { + "match": "(?xi)\\b\nsqlsrv_(\n send_stream_data|server_info|has_rows|num_(fields|rows)|next_result|connect|configure|commit|\n client_info|close|cancel|prepare|errors|execute|query|field_metadata|fetch(_(array|object))?|\n free_stmt|rows_affected|rollback|get_(config|field)|begin_transaction\n)\\b", + "name": "support.function.sqlsrv.php" + }, + { + "match": "(?xi)\\b\nstats_(\n harmonic_mean|covariance|standard_deviation|skew|\n cdf_(noncentral_(chisquare|f)|negative_binomial|chisquare|cauchy|t|uniform|poisson|exponential|f|weibull|\n logistic|laplace|gamma|binomial|beta)|\n stat_(noncentral_t|correlation|innerproduct|independent_t|powersum|percentile|paired_t|gennch|binomial_coef)|\n dens_(normal|negative_binomial|chisquare|cauchy|t|pmf_(hypergeometric|poisson|binomial)|exponential|f|\n weibull|logistic|laplace|gamma|beta)|\n den_uniform|variance|kurtosis|absolute_deviation|\n rand_(setall|phrase_to_seeds|ranf|get_seeds|\n gen_(noncentral_[ft]|noncenral_chisquare|normal|chisquare|t|int|\n i(uniform|poisson|binomial(_negative)?)|exponential|f(uniform)?|gamma|beta))\n)\\b", + "name": "support.function.stats.php" + }, + { + "match": "(?xi)\\b\n(\n set_socket_blocking|\n stream_(socket_(shutdown|sendto|server|client|pair|enable_crypto|accept|recvfrom|get_name)|\n set_(chunk_size|timeout|(read|write)_buffer|blocking)|select|notification_callback|supports_lock|\n context_(set_(option|default|params)|create|get_(options|default|params))|copy_to_stream|is_local|\n encoding|filter_(append|prepend|register|remove)|wrapper_((un)?register|restore)|\n resolve_include_path|register_wrapper|get_(contents|transports|filters|wrappers|line|meta_data)|\n bucket_(new|prepend|append|make_writeable)\n )\n)\\b", + "name": "support.function.streamsfuncs.php" + }, + { + "match": "(?xi)\\b\n(\n money_format|md5(_file)?|metaphone|bin2hex|sscanf|sha1(_file)?|\n str(str|c?spn|n(at)?(case)?cmp|chr|coll|(case)?cmp|to(upper|lower)|tok|tr|istr|pos|pbrk|len|rchr|ri?pos|rev)|\n str_(getcsv|ireplace|pad|repeat|replace|rot13|shuffle|split|word_count)|\n strip(c?slashes|os)|strip_tags|similar_text|soundex|substr(_(count|compare|replace))?|setlocale|\n html(specialchars(_decode)?|entities)|html_entity_decode|hex2bin|hebrev(c)?|number_format|nl2br|nl_langinfo|\n chop|chunk_split|chr|convert_(cyr_string|uu(decode|encode))|count_chars|crypt|crc32|trim|implode|ord|\n uc(first|words)|join|parse_str|print(f)?|echo|explode|v?[fs]?printf|quoted_printable_(decode|encode)|\n quotemeta|wordwrap|lcfirst|[lr]trim|localeconv|levenshtein|addc?slashes|get_html_translation_table\n)\\b", + "name": "support.function.string.php" + }, + { + "match": "(?xi)\\b\nsybase_(\n set_message_handler|select_db|num_(fields|rows)|connect|close|deadlock_retry_count|data_seek|\n unbuffered_query|pconnect|query|field_seek|fetch_(object|field|assoc|array|row)|free_result|\n affected_rows|result|get_last_message|min_(client|error|message|server)_severity\n)\\b", + "name": "support.function.sybase.php" + }, + { + "match": "(?i)\\b(taint|is_tainted|untaint)\\b", + "name": "support.function.taint.php" + }, + { + "match": "(?xi)\\b\n(\n tidy_((get|set)opt|set_encoding|save_config|config_count|clean_repair|is_(xhtml|xml)|diagnose|\n (access|error|warning)_count|load_config|reset_config|(parse|repair)_(string|file)|\n get_(status|html(_ver)?|head|config|output|opt_doc|root|release|body))|\n ob_tidyhandler\n)\\b", + "name": "support.function.tidy.php" + }, + { + "match": "(?i)\\btoken_(name|get_all)\\b", + "name": "support.function.tokenizer.php" + }, + { + "match": "(?xi)\\b\ntrader_(\n stoch(f|r|rsi)?|stddev|sin(h)?|sum|sub|set_(compat|unstable_period)|sqrt|sar(ext)?|sma|\n ht_(sine|trend(line|mode)|dc(period|phase)|phasor)|natr|cci|cos(h)?|correl|\n cdl(shootingstar|shortline|sticksandwich|stalledpattern|spinningtop|separatinglines|\n hikkake(mod)?|highwave|homingpigeon|hangingman|harami(cross)?|hammer|concealbabyswall|\n counterattack|closingmarubozu|thrusting|tasukigap|takuri|tristar|inneck|invertedhammer|\n identical3crows|2crows|onneck|doji(star)?|darkcloudcover|dragonflydoji|unique3river|\n upsidegap2crows|3(starsinsouth|inside|outside|whitesoldiers|linestrike|blackcrows)|\n piercing|engulfing|evening(doji)?star|kicking(bylength)?|longline|longleggeddoji|\n ladderbottom|advanceblock|abandonedbaby|risefall3methods|rickshawman|gapsidesidewhite|\n gravestonedoji|xsidegap3methods|morning(doji)?star|mathold|matchinglow|marubozu|\n belthold|breakaway)|\n ceil|cmo|tsf|typprice|t3|tema|tan(h)?|trix|trima|trange|obv|div|dema|dx|ultosc|ppo|\n plus_d[im]|errno|exp|ema|var|kama|floor|wclprice|willr|wma|ln|log10|bop|beta|bbands|\n linearreg(_(slope|intercept|angle))?|asin|acos|atan|atr|adosc|ad|add|adx(r)?|apo|avgprice|\n aroon(osc)?|rsi|roc|rocp|rocr(100)?|get_(compat|unstable_period)|min(index)?|minus_d[im]|\n minmax(index)?|mid(point|price)|mom|mult|medprice|mfi|macd(ext|fix)?|mavp|max(index)?|ma(ma)?\n)\\b", + "name": "support.function.trader.php" + }, + { + "match": "(?i)\\buopz_(copy|compose|implement|overload|delete|undefine|extend|function|flags|restore|rename|redefine|backup)\\b", + "name": "support.function.uopz.php" + }, + { + "match": "(?i)\\b(http_build_query|(raw)?url(decode|encode)|parse_url|get_(headers|meta_tags)|base64_(decode|encode))\\b", + "name": "support.function.url.php" + }, + { + "match": "(?xi)\\b\n(\n strval|settype|serialize|(bool|double|float)val|debug_zval_dump|intval|import_request_variables|isset|\n is_(scalar|string|null|numeric|callable|int(eger)?|object|double|float|long|array|resource|real|bool)|\n unset|unserialize|print_r|empty|var_(dump|export)|gettype|get_(defined_vars|resource_type)\n)\\b", + "name": "support.function.var.php" + }, + { + "match": "(?i)\\bwddx_(serialize_(value|vars)|deserialize|packet_(start|end)|add_vars)\\b", + "name": "support.function.wddx.php" + }, + { + "match": "(?i)\\bxhprof_(sample_)?(disable|enable)\\b", + "name": "support.function.xhprof.php" + }, + { + "match": "(?xi)\n\\b\n(\n utf8_(decode|encode)|\n xml_(set_((notation|(end|start)_namespace|unparsed_entity)_decl_handler|\n (character_data|default|element|external_entity_ref|processing_instruction)_handler|object)|\n parse(_into_struct)?|parser_((get|set)_option|create(_ns)?|free)|error_string|\n get_(current_((column|line)_number|byte_index)|error_code))\n)\\b", + "name": "support.function.xml.php" + }, + { + "match": "(?xi)\\b\nxmlrpc_(\n server_(call_method|create|destroy|add_introspection_data|register_(introspection_callback|method))|\n is_fault|decode(_request)?|parse_method_descriptions|encode(_request)?|(get|set)_type\n)\\b", + "name": "support.function.xmlrpc.php" + }, + { + "match": "(?xi)\\b\nxmlwriter_(\n (end|start|write)_(comment|cdata|dtd(_(attlist|entity|element))?|document|pi|attribute|element)|\n (start|write)_(attribute|element)_ns|write_raw|set_indent(_string)?|text|output_memory|open_(memory|uri)|\n full_end_element|flush|\n)\\b", + "name": "support.function.xmlwriter.php" + }, + { + "match": "(?xi)\\b\n(\n zlib_(decode|encode|get_coding_type)|readgzfile|\n gz(seek|compress|close|tell|inflate|open|decode|deflate|uncompress|puts|passthru|encode|eof|file|\n write|rewind|read|getc|getss?)\n)\\b", + "name": "support.function.zlib.php" + }, + { + "match": "(?i)\\bis_int(eger)?\\b", + "name": "support.function.alias.php" + } + ] + }, + "switch_statement": { + "patterns": [ + { + "match": "\\s+(?=switch\\b)" + }, + { + "begin": "\\bswitch\\b(?!\\s*\\(.*\\)\\s*:)", + "beginCaptures": { + "0": { + "name": "keyword.control.switch.php" + } + }, + "end": "}|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.section.switch-block.end.bracket.curly.php" + } + }, + "name": "meta.switch-statement.php", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.switch-expression.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.switch-expression.end.bracket.round.php" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.section.switch-block.begin.bracket.curly.php" + } + }, + "end": "(?=}|\\?>)", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + } + ] + }, + "match_statement": { + "patterns": [ + { + "match": "\\s+(?=match\\b)" + }, + { + "begin": "\\bmatch\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.match.php" + } + }, + "end": "}|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.section.match-block.end.bracket.curly.php" + } + }, + "name": "meta.match-statement.php", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.match-expression.begin.bracket.round.php" + } + }, + "end": "\\)|(?=\\?>)", + "endCaptures": { + "0": { + "name": "punctuation.definition.match-expression.end.bracket.round.php" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.section.match-block.begin.bracket.curly.php" + } + }, + "end": "(?=}|\\?>)", + "patterns": [ + { + "match": "=>", + "name": "keyword.definition.arrow.php" + }, + { + "include": "$self" + } + ] + } + ] + } + ] + }, + "use-inner": { + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "(?i)\\b(as)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.other.use-as.php" + } + }, + "end": "(?i)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*", + "endCaptures": { + "0": { + "name": "entity.other.alias.php" + } + } + }, + { + "include": "#class-name" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.php" + } + ] + }, + "var_basic": { + "patterns": [ + { + "match": "(?i)(\\$+)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*", + "name": "variable.other.php", + "captures": { + "1": { + "name": "punctuation.definition.variable.php" + } + } + } + ] + }, + "var_global": { + "captures": { + "1": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(\\$)((_(COOKIE|FILES|GET|POST|REQUEST))|arg(v|c))\\b", + "name": "variable.other.global.php" + }, + "var_global_safer": { + "captures": { + "1": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(\\$)((GLOBALS|_(ENV|SERVER|SESSION)))", + "name": "variable.other.global.safer.php" + }, + "var_language": { + "match": "(\\$)this\\b", + "name": "variable.language.this.php", + "captures": { + "1": { + "name": "punctuation.definition.variable.php" + } + } + }, + "variable-name": { + "patterns": [ + { + "include": "#var_global" + }, + { + "include": "#var_global_safer" + }, + { + "captures": { + "1": { + "name": "variable.other.php" + }, + "2": { + "name": "punctuation.definition.variable.php" + }, + "4": { + "name": "keyword.operator.class.php" + }, + "5": { + "name": "variable.other.property.php" + }, + "6": { + "name": "punctuation.section.array.begin.php" + }, + "7": { + "name": "constant.numeric.index.php" + }, + "8": { + "name": "variable.other.index.php" + }, + "9": { + "name": "punctuation.definition.variable.php" + }, + "10": { + "name": "string.unquoted.index.php" + }, + "11": { + "name": "punctuation.section.array.end.php" + } + }, + "match": "(?xi)\n((\\$)(?<name>[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*))\\s*\n(?:\n (\\??->)\\s*(\\g<name>)\n |\n (\\[)(?:(\\d+)|((\\$)\\g<name>)|([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*))(\\])\n)?" + }, + { + "captures": { + "1": { + "name": "variable.other.php" + }, + "2": { + "name": "punctuation.definition.variable.php" + }, + "4": { + "name": "punctuation.definition.variable.php" + } + }, + "match": "(?i)((\\${)(?<name>[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)(}))" + } + ] + }, + "variables": { + "patterns": [ + { + "include": "#var_language" + }, + { + "include": "#var_global" + }, + { + "include": "#var_global_safer" + }, + { + "include": "#var_basic" + }, + { + "begin": "\\${(?=.*?})", + "beginCaptures": { + "0": { + "name": "punctuation.definition.variable.php" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.variable.php" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "ternary_shorthand": { + "match": "\\?:", + "name": "keyword.operator.ternary.php" + }, + "ternary_expression": { + "begin": "\\?", + "beginCaptures": { + "0": { + "name": "keyword.operator.ternary.php" + } + }, + "end": "(?<!:):(?!:)", + "endCaptures": { + "0": { + "name": "keyword.operator.ternary.php" + } + }, + "patterns": [ + { + "match": "(?i)^\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\\s*(?=:(?!:))", + "captures": { + "1": { + "patterns": [ + { + "include": "$self" + } + ] + } + } + }, + { + "include": "$self" + } + ] + }, + "null_coalescing": { + "match": "\\?\\?", + "name": "keyword.operator.null-coalescing.php" + } + }, + "name": "php" +} diff --git a/src/lib/shiki/languages/plsql.tmLanguage.json b/src/lib/shiki/languages/plsql.tmLanguage.json new file mode 100644 index 0000000..1a1f38b --- /dev/null +++ b/src/lib/shiki/languages/plsql.tmLanguage.json @@ -0,0 +1,232 @@ +{ + "fileTypes": ["sql", "ddl", "dml", "pkh", "pks", "pkb", "pck", "pls", "plb"], + "foldingStartMarker": "(?i)^\\s*(begin|if|loop)\\b", + "foldingStopMarker": "(?i)^\\s*(end)\\b", + "keyEquivalent": "^~S", + "name": "plsql", + "patterns": [ + { + "begin": "/\\*", + "end": "\\*/", + "name": "comment.block.oracle" + }, + { + "match": "--.*$", + "name": "comment.line.double-dash.oracle" + }, + { + "match": "(?i)(?:^\\s*)rem(?:\\s+.*$)", + "name": "comment.line.sqlplus.oracle" + }, + { + "match": "(?i)(?:^\\s*)prompt(?:\\s+.*$)", + "name": "comment.line.sqlplus-prompt.oracle" + }, + { + "captures": { + "1": { + "name": "keyword.other.oracle" + }, + "2": { + "name": "keyword.other.oracle" + } + }, + "match": "(?i)^\\s*(create)(\\s+or\\s+replace)?\\s+", + "name": "meta.create.oracle" + }, + { + "captures": { + "1": { + "name": "keyword.other.oracle" + }, + "2": { + "name": "keyword.other.oracle" + }, + "3": { + "name": "entity.name.type.oracle" + } + }, + "match": "(?i)\\b(package)(\\s+body)?\\s+(\\S+)", + "name": "meta.package.oracle" + }, + { + "captures": { + "1": { + "name": "keyword.other.oracle" + }, + "2": { + "name": "entity.name.type.oracle" + } + }, + "match": "(?i)\\b(type)\\s+\"([^\"]+)\"", + "name": "meta.type.oracle" + }, + { + "captures": { + "1": { + "name": "keyword.other.oracle" + }, + "2": { + "name": "entity.name.function.oracle" + } + }, + "match": "(?i)^\\s*(function|procedure)\\s+\"?([-a-z0-9_]+)\"?", + "name": "meta.procedure.oracle" + }, + { + "match": "[!<>:]?=|<>|<|>|\\+|(?<!\\.)\\*|-|(?<!^)/|\\|\\|", + "name": "keyword.operator.oracle" + }, + { + "match": "(?i)\\b(true|false|null|is\\s+(not\\s+)?null)\\b", + "name": "constant.language.oracle" + }, + { + "match": "\\b\\d+(\\.\\d+)?\\b", + "name": "constant.numeric.oracle" + }, + { + "match": "(?i)\\b(if|elsif|else|end\\s+if|loop|end\\s+loop|for|while|case|end\\s+case|continue|return|goto)\\b", + "name": "keyword.control.oracle" + }, + { + "match": "(?i)\\b(or|and|not|like)\\b", + "name": "keyword.other.oracle" + }, + { + "match": "(?i)\\b(%(isopen|found|notfound|rowcount)|commit|rollback|sqlerrm)\\b", + "name": "support.function.oracle" + }, + { + "match": "(?i)\\b(sql|sqlcode)\\b", + "name": "variable.language.oracle" + }, + { + "match": "(?i)\\b(ascii|asciistr|chr|compose|concat|convert|decompose|dump|initcap|instr|instrb|instrc|instr2|instr4|unistr|length|lengthb|lengthc|length2|length4|lower|lpad|ltrim|nchr|replace|rpad|rtrim|soundex|substr|translate|trim|upper|vsize)\\b", + "name": "support.function.builtin.char.oracle" + }, + { + "match": "(?i)\\b(add_months|current_date|current_timestamp|dbtimezone|last_day|localtimestamp|months_between|new_time|next_day|round|sessiontimezone|sysdate|tz_offset|systimestamp)\\b", + "name": "support.function.builtin.date.oracle" + }, + { + "match": "(?i)\\b(avg|count|sum|max|min|median|corr|corr_\\w+|covar_(pop|samp)|cume_dist|dense_rank|first|group_id|grouping|grouping_id|last|percentile_cont|percentile_disc|percent_rank|rank|regr_\\w+|row_number|stats_binomial_test|stats_crosstab|stats_f_test|stats_ks_test|stats_mode|stats_mw_test|stats_one_way_anova|stats_t_test_\\w+|stats_wsr_test|stddev|stddev_pop|stddev_samp|var_pop|var_samp|variance)\\b", + "name": "support.function.builtin.aggregate.oracle" + }, + { + "match": "(?i)\\b(bfilename|cardinality|coalesce|decode|empty_(blob|clob)|lag|lead|listagg|lnnvl|nanvl|nullif|nvl|nvl2|sys_(context|guid|typeid|connect_by_path|extract_utc)|uid|(current\\s+)?user|userenv|cardinality|(bulk\\s+)?collect|powermultiset(_by_cardinality)?|ora_hash|standard_hash|execute\\s+immediate|alter\\s+session)\\b", + "name": "support.function.builtin.advanced.oracle" + }, + { + "match": "(?i)\\b(bin_to_num|cast|chartorowid|from_tz|hextoraw|numtodsinterval|numtoyminterval|rawtohex|rawtonhex|to_char|to_clob|to_date|to_dsinterval|to_lob|to_multi_byte|to_nclob|to_number|to_single_byte|to_timestamp|to_timestamp_tz|to_yminterval|scn_to_timestamp|timestamp_to_scn|rowidtochar|rowidtonchar|to_binary_double|to_binary_float|to_blob|to_nchar|con_dbid_to_id|con_guid_to_id|con_name_to_id|con_uid_to_id)\\b", + "name": "support.function.builtin.convert.oracle" + }, + { + "match": "(?i)\\b(abs|acos|asin|atan|atan2|bit_(and|or|xor)|ceil|cos|cosh|exp|extract|floor|greatest|least|ln|log|mod|power|remainder|round|sign|sin|sinh|sqrt|tan|tanh|trunc)\\b", + "name": "support.function.builtin.math.oracle" + }, + { + "match": "(?i)\\b(\\.(count|delete|exists|extend|first|last|limit|next|prior|trim|reverse))\\b", + "name": "support.function.builtin.collection.oracle" + }, + { + "match": "(?i)\\b(cluster_details|cluster_distance|cluster_id|cluster_probability|cluster_set|feature_details|feature_id|feature_set|feature_value|prediction|prediction_bounds|prediction_cost|prediction_details|prediction_probability|prediction_set)\\b", + "name": "support.function.builtin.data_mining.oracle" + }, + { + "match": "(?i)\\b(appendchildxml|deletexml|depth|extract|existsnode|extractvalue|insertchildxml|insertxmlbefore|xmlcast|xmldiff|xmlelement|xmlexists|xmlisvalid|insertchildxmlafter|insertchildxmlbefore|path|sys_dburigen|sys_xmlagg|sys_xmlgen|updatexml|xmlagg|xmlcdata|xmlcolattval|xmlcomment|xmlconcat|xmlforest|xmlparse|xmlpi|xmlquery|xmlroot|xmlsequence|xmlserialize|xmltable|xmltransform)\\b", + "name": "support.function.builtin.xml.oracle" + }, + { + "match": "(?i)\\b(pragma\\s+(autonomous_transaction|serially_reusable|restrict_references|exception_init|inline))\\b", + "name": "keyword.other.pragma.oracle" + }, + { + "match": "(?i)\\b(p(i|o|io)_[-a-z0-9_]+)\\b", + "name": "variable.parameter.oracle" + }, + { + "match": "(?i)\\b(l_[-a-z0-9_]+)\\b", + "name": "variable.other.oracle" + }, + { + "match": "(?i):\\b(new|old)\\b", + "name": "variable.trigger.oracle" + }, + { + "match": "(?i)\\b(connect\\s+by\\s+(nocycle\\s+)?(prior|level)|connect_by_(root|icycle)|level|start\\s+with)\\b", + "name": "keyword.hierarchical.sql.oracle" + }, + { + "match": "(?i)\\b(language|name|java|c)\\b", + "name": "keyword.wrapper.oracle" + }, + { + "match": "(?i)\\b(end|then|deterministic|exception|when|declare|begin|in|out|nocopy|is|as|exit|open|fetch|into|close|subtype|type|rowtype|default|exclusive|mode|lock|record|index\\s+by|result_cache|constant|comment|\\.(nextval|currval))\\b", + "name": "keyword.other.oracle" + }, + { + "match": "(?i)\\b(grant|revoke|alter|drop|force|add|check|constraint|primary\\s+key|foreign\\s+key|references|unique(\\s+index)?|column|sequence|increment\\s+by|cache|(materialized\\s+)?view|trigger|storage|tablespace|pct(free|used)|(init|max)trans|logging)\\b", + "name": "keyword.other.ddl.oracle" + }, + { + "match": "(?i)\\b(with|select|from|where|order\\s+(siblings\\s+)?by|group\\s+by|rollup|cube|((left|right|cross|natural)\\s+(outer\\s+)?)?join|on|asc|desc|update|set|insert|into|values|delete|distinct|union|minus|intersect|having|limit|table|between|like|of|row|(range|rows)\\s+between|nulls\\s+first|nulls\\s+last|before|after|all|any|exists|rownum|cursor|returning|over|partition\\s+by|merge|using|matched|pivot|unpivot)\\b", + "name": "keyword.other.sql.oracle" + }, + { + "match": "(?i)\\b(define|whenever\\s+sqlerror|exec|timing\\s+start|timing\\s+stop)\\b", + "name": "keyword.other.sqlplus.oracle" + }, + { + "match": "(?i)\\b(access_into_null|case_not_found|collection_is_null|cursor_already_open|dup_val_on_index|invalid_cursor|invalid_number|login_denied|no_data_found|not_logged_on|program_error|rowtype_mismatch|self_is_null|storage_error|subscript_beyond_count|subscript_outside_limit|sys_invalid_rowid|timeout_on_resource|too_many_rows|value_error|zero_divide|others)\\b", + "name": "support.type.exception.oracle" + }, + { + "captures": { + "3": { + "name": "support.class.oracle" + } + }, + "match": "(?i)\\b((dbms|utl|owa|apex)_\\w+\\.(\\w+))\\b", + "name": "support.function.oracle" + }, + { + "captures": { + "3": { + "name": "support.class.oracle" + } + }, + "match": "(?i)\\b((htf|htp)\\.(\\w+))\\b", + "name": "support.function.oracle" + }, + { + "captures": { + "3": { + "name": "support.class.user-defined.oracle" + } + }, + "match": "(?i)\\b((\\w+_pkg|pkg_\\w+)\\.(\\w+))\\b", + "name": "support.function.user-defined.oracle" + }, + { + "match": "(?i)\\b(raise|raise_application_error)\\b", + "name": "support.function.oracle" + }, + { + "begin": "'", + "end": "'", + "name": "string.quoted.single.oracle" + }, + { + "begin": "\"", + "end": "\"", + "name": "string.quoted.double.oracle" + }, + { + "match": "(?i)\\b(char|varchar|varchar2|nchar|nvarchar2|boolean|date|timestamp(\\s+with(\\s+local)?\\s+time\\s+zone)?|interval\\s*day(\\(\\d*\\))?\\s*to\\s*month|interval\\s*year(\\(\\d*\\))?\\s*to\\s*second(\\(\\d*\\))?|xmltype|blob|clob|nclob|bfile|long|long\\s+raw|raw|number|integer|decimal|smallint|float|binary_(float|double|integer)|pls_(float|double|integer)|rowid|urowid|vararray|natural|naturaln|positive|positiven|signtype|simple_(float|double|integer))\\b", + "name": "storage.type.oracle" + } + ], + "scopeName": "source.plsql.oracle", + "uuid": "28DCE4DD-F5E1-4ED3-8847-64DA6B1F9163" +} diff --git a/src/lib/shiki/languages/postcss.tmLanguage.json b/src/lib/shiki/languages/postcss.tmLanguage.json new file mode 100644 index 0000000..8569316 --- /dev/null +++ b/src/lib/shiki/languages/postcss.tmLanguage.json @@ -0,0 +1,374 @@ +{ + "patterns": [ + { + "patterns": [ + { + "include": "#comment-tag" + } + ], + "begin": "/\\*", + "name": "comment.block.postcss", + "end": "\\*/" + }, + { + "include": "#double-slash" + }, + { + "include": "#double-quoted" + }, + { + "include": "#single-quoted" + }, + { + "include": "#interpolation" + }, + { + "include": "#placeholder-selector" + }, + { + "include": "#variable" + }, + { + "include": "#variable-root-css" + }, + { + "include": "#numeric" + }, + { + "include": "#unit" + }, + { + "include": "#flag" + }, + { + "include": "#dotdotdot" + }, + { + "captures": { + "0": { + "name": "keyword.control.at-rule.css.postcss" + } + }, + "begin": "@include", + "name": "support.function.name.postcss.library", + "end": "(?=\\n|\\(|{|;)" + }, + { + "captures": { + "0": { + "name": "keyword.control.at-rule.css.postcss" + } + }, + "patterns": [ + { + "name": "entity.name.function", + "match": "[\\w-]+" + } + ], + "begin": "@mixin|@function", + "name": "support.function.name.postcss.no-completions", + "end": "$\\n?|(?=\\(|{)" + }, + { + "name": "string.quoted.double.css.postcss", + "match": "(?<=@import)\\s[\\w/.*-]+" + }, + { + "begin": "@", + "name": "keyword.control.at-rule.css.postcss", + "end": "$\\n?|\\s(?!(all|braille|embossed|handheld|print|projection|screen|speech|tty|tv|if|only|not)(\\s|,))|(?=;)" + }, + { + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "#pseudo-class" + } + ], + "begin": "#", + "name": "entity.other.attribute-name.id.css.postcss", + "end": "$\\n?|(?=\\s|,|;|\\(|\\)|\\.|\\[|{|>)" + }, + { + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "#pseudo-class" + } + ], + "begin": "\\.|(?<=&)(-|_)", + "name": "entity.other.attribute-name.class.css.postcss", + "end": "$\\n?|(?=\\s|,|;|\\(|\\)|\\[|{|>)" + }, + { + "patterns": [ + { + "include": "#double-quoted" + }, + { + "include": "#single-quoted" + }, + { + "name": "keyword.other.regex.postcss", + "match": "\\^|\\$|\\*|~" + } + ], + "begin": "\\[", + "name": "entity.other.attribute-selector.postcss", + "end": "\\]" + }, + { + "name": "entity.other.attribute-name.pseudo-class.css.postcss", + "match": "(?<=\\]|\\)|not\\(|\\*|>|>\\s):[a-z:-]+|(::|:-)[a-z:-]+" + }, + { + "patterns": [ + { + "include": "#double-slash" + }, + { + "include": "#double-quoted" + }, + { + "include": "#single-quoted" + }, + { + "include": "#interpolation" + }, + { + "include": "#variable" + }, + { + "include": "#rgb-value" + }, + { + "include": "#numeric" + }, + { + "include": "#unit" + }, + { + "include": "#flag" + }, + { + "include": "#function" + }, + { + "include": "#function-content" + }, + { + "include": "#function-content-var" + }, + { + "include": "#operator" + }, + { + "include": "#parent-selector" + }, + { + "include": "#property-value" + } + ], + "begin": ":", + "name": "meta.property-list.css.postcss", + "end": "$\\n?|(?=;|\\s\\(|and\\(|{|}|\\),)" + }, + { + "include": "#rgb-value" + }, + { + "include": "#function" + }, + { + "include": "#function-content" + }, + { + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "#pseudo-class" + } + ], + "begin": "(?<!\\-|\\()\\b(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video|main|svg|rect|ruby|center|circle|ellipse|line|polyline|polygon|path|text|u|x)\\b(?!-|\\)|:\\s)|&", + "name": "entity.name.tag.css.postcss.symbol", + "end": "(?=\\s|,|;|\\(|\\)|\\.|\\[|{|>|-|_)" + }, + { + "include": "#operator" + }, + { + "name": "support.type.property-name.css.postcss", + "match": "[a-z-]+((?=:|#{))" + }, + { + "include": "#reserved-words" + }, + { + "include": "#property-value" + } + ], + "name": "postcss", + "repository": { + "reserved-words": { + "name": "support.type.property-name.css.postcss", + "match": "\\b(false|from|in|not|null|through|to|true)\\b" + }, + "double-quoted": { + "patterns": [ + { + "include": "#quoted-interpolation" + } + ], + "begin": "\"", + "name": "string.quoted.double.css.postcss", + "end": "\"" + }, + "operator": { + "name": "keyword.operator.postcss", + "match": "\\+|\\s-\\s|\\s-(?=\\$)|(?<=\\()-(?=\\$)|\\s-(?=\\()|\\*|/|%|=|!|<|>|~" + }, + "function-content": { + "name": "string.quoted.double.css.postcss", + "match": "(?<=url\\(|format\\(|attr\\().+?(?=\\))" + }, + "double-slash": { + "patterns": [ + { + "include": "#comment-tag" + } + ], + "begin": "//", + "name": "comment.line.postcss", + "end": "$" + }, + "numeric": { + "name": "constant.numeric.css.postcss", + "match": "(-|\\.)?[0-9]+(\\.[0-9]+)?" + }, + "variable-root-css": { + "name": "variable.parameter.postcss", + "match": "(?<!&)--[\\w-]+" + }, + "function": { + "name": "support.function.name.postcss", + "match": "(?<=[\\s|\\(|,|:])(?!url|format|attr)[\\w-][\\w-]*(?=\\()" + }, + "rgb-value": { + "name": "constant.other.color.rgb-value.css.postcss", + "match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b" + }, + "comment-tag": { + "patterns": [ + { + "name": "comment.tag.postcss", + "match": "[\\w-]+" + } + ], + "begin": "{{", + "name": "comment.tags.postcss", + "end": "}}" + }, + "interpolation": { + "patterns": [ + { + "include": "#variable" + }, + { + "include": "#numeric" + }, + { + "include": "#operator" + }, + { + "include": "#unit" + }, + { + "include": "#double-quoted" + }, + { + "include": "#single-quoted" + } + ], + "begin": "#{", + "name": "support.function.interpolation.postcss", + "end": "}" + }, + "unit": { + "name": "keyword.other.unit.css.postcss", + "match": "(?<=[\\d]|})(ch|cm|deg|dpcm|dpi|dppx|em|ex|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vw|%)" + }, + "function-content-var": { + "name": "variable.parameter.postcss", + "match": "(?<=var\\()[\\w-]+(?=\\))" + }, + "dotdotdot": { + "name": "variable.other", + "match": "\\.{3}" + }, + "variable": { + "name": "variable.parameter.postcss", + "match": "\\$[\\w-]+" + }, + "single-quoted": { + "patterns": [ + { + "include": "#quoted-interpolation" + } + ], + "begin": "'", + "name": "string.quoted.single.css.postcss", + "end": "'" + }, + "quoted-interpolation": { + "patterns": [ + { + "include": "#variable" + }, + { + "include": "#numeric" + }, + { + "include": "#operator" + }, + { + "include": "#unit" + } + ], + "begin": "#{", + "name": "support.function.interpolation.postcss", + "end": "}" + }, + "pseudo-class": { + "name": "entity.other.attribute-name.pseudo-class.css.postcss", + "match": ":[a-z:-]+" + }, + "property-value": { + "name": "meta.property-value.css.postcss, support.constant.property-value.css.postcss", + "match": "[\\w-]+" + }, + "placeholder-selector": { + "begin": "(?<!\\d)%(?!\\d)", + "name": "entity.other.attribute-name.placeholder-selector.postcss", + "end": "$\\n?|\\s|(?=;|{)" + }, + "flag": { + "name": "keyword.other.important.css.postcss", + "match": "!(important|default|optional|global)" + }, + "parent-selector": { + "name": "entity.name.tag.css.postcss", + "match": "&" + } + }, + "foldingStartMarker": "/\\*|^#|^\\*|^\\b|^\\.", + "foldingStopMarker": "\\*/|^\\s*$", + "fileTypes": ["pcss", "postcss"], + "uuid": "90DAEA60-88AA-11E2-9E96-0800200C9A66", + "scopeName": "source.css.postcss" +} diff --git a/src/lib/shiki/languages/powerquery.tmLanguage.json b/src/lib/shiki/languages/powerquery.tmLanguage.json new file mode 100644 index 0000000..5ffcfab --- /dev/null +++ b/src/lib/shiki/languages/powerquery.tmLanguage.json @@ -0,0 +1,346 @@ +{ + "name": "powerquery", + "scopeName": "source.powerquery", + "fileTypes": ["pq", "pqm"], + "uuid": "41968B57-12E6-4AC5-92A4-A837010E8B0A", + "patterns": [ + { + "include": "#Noise" + }, + { + "include": "#LiteralExpression" + }, + { + "include": "#Keywords" + }, + { + "include": "#ImplicitVariable" + }, + { + "include": "#IntrinsicVariable" + }, + { + "include": "#Operators" + }, + { + "include": "#DotOperators" + }, + { + "include": "#TypeName" + }, + { + "include": "#RecordExpression" + }, + { + "include": "#Punctuation" + }, + { + "include": "#QuotedIdentifier" + }, + { + "include": "#Identifier" + } + ], + "repository": { + "Keywords": { + "match": "\\b(?:(and|or|not)|(if|then|else)|(try|otherwise)|(as|each|in|is|let|meta|type|error)|(section|shared))\\b", + "captures": { + "1": { + "name": "keyword.operator.word.logical.powerquery" + }, + "2": { + "name": "keyword.control.conditional.powerquery" + }, + "3": { + "name": "keyword.control.exception.powerquery" + }, + "4": { + "name": "keyword.other.powerquery" + }, + "5": { + "name": "keyword.powerquery" + } + } + }, + "TypeName": { + "match": "\\b(?:(optional|nullable)|(action|any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|null|number|record|table|text|type))\\b", + "captures": { + "1": { + "name": "storage.modifier.powerquery" + }, + "2": { + "name": "storage.type.powerquery" + } + } + }, + "LiteralExpression": { + "patterns": [ + { + "include": "#String" + }, + { + "include": "#NumericConstant" + }, + { + "include": "#LogicalConstant" + }, + { + "include": "#NullConstant" + }, + { + "include": "#FloatNumber" + }, + { + "include": "#DecimalNumber" + }, + { + "include": "#HexNumber" + }, + { + "include": "#IntNumber" + } + ] + }, + "Noise": { + "patterns": [ + { + "include": "#BlockComment" + }, + { + "include": "#LineComment" + }, + { + "include": "#Whitespace" + } + ] + }, + "Whitespace": { + "match": "\\s+" + }, + "BlockComment": { + "begin": "/\\*", + "end": "\\*/", + "name": "comment.block.powerquery" + }, + "LineComment": { + "match": "//.*", + "name": "comment.line.double-slash.powerquery" + }, + "String": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.powerquery" + } + }, + "end": "\"(?!\")", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.powerquery" + } + }, + "patterns": [ + { + "match": "\"\"", + "name": "constant.character.escape.quote.powerquery" + }, + { + "include": "#EscapeSequence" + } + ], + "name": "string.quoted.double.powerquery" + }, + "QuotedIdentifier": { + "begin": "#\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.quotedidentifier.begin.powerquery" + } + }, + "end": "\"(?!\")", + "endCaptures": { + "0": { + "name": "punctuation.definition.quotedidentifier.end.powerquery" + } + }, + "patterns": [ + { + "match": "\"\"", + "name": "constant.character.escape.quote.powerquery" + }, + { + "include": "#EscapeSequence" + } + ], + "name": "entity.name.powerquery" + }, + "EscapeSequence": { + "begin": "#\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.escapesequence.begin.powerquery" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.escapesequence.end.powerquery" + } + }, + "patterns": [ + { + "match": "(#|\\h{4}|\\h{8}|cr|lf|tab)(?:,(#|\\h{4}|\\h{8}|cr|lf|tab))*" + }, + { + "match": "[^\\)]", + "name": "invalid.illegal.escapesequence.powerquery" + } + ], + "name": "constant.character.escapesequence.powerquery" + }, + "LogicalConstant": { + "match": "\\b(true|false)\\b", + "name": "constant.language.logical.powerquery" + }, + "NullConstant": { + "match": "\\b(null)\\b", + "name": "constant.language.null.powerquery" + }, + "NumericConstant": { + "match": "(?<![\\d\\w])(#infinity|#nan)\\b", + "captures": { + "1": { + "name": "constant.language.numeric.float.powerquery" + } + } + }, + "HexNumber": { + "match": "0(x|X)\\h+", + "name": "constant.numeric.integer.hexadecimal.powerquery" + }, + "IntNumber": { + "match": "\\b(\\d+)\\b", + "captures": { + "1": { + "name": "constant.numeric.integer.powerquery" + } + } + }, + "DecimalNumber": { + "match": "(?<![\\d\\w])(\\d*\\.\\d+)\\b", + "name": "constant.numeric.decimal.powerquery" + }, + "FloatNumber": { + "match": "(\\d*\\.)?\\d+(e|E)(\\+|-)?\\d+", + "name": "constant.numeric.float.powerquery" + }, + "InclusiveIdentifier": { + "match": "@", + "captures": { + "0": { + "name": "inclusiveidentifier.powerquery" + } + } + }, + "Identifier": { + "match": "(?x:(?<![\\._\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Nd}\\p{Pc}\\p{Mn}\\p{Mc}\\p{Cf}])(@?)([_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}][_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Nd}\\p{Pc}\\p{Mn}\\p{Mc}\\p{Cf}]*(?:\\.[_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}][_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Nd}\\p{Pc}\\p{Mn}\\p{Mc}\\p{Cf}])*)\\b)", + "captures": { + "1": { + "name": "keyword.operator.inclusiveidentifier.powerquery" + }, + "2": { + "name": "entity.name.powerquery" + } + } + }, + "Operators": { + "match": "(=>)|(=)|(<>|<|>|<=|>=)|(&)|(\\+|-|\\*|\\/)|(!)|(\\?)", + "captures": { + "1": { + "name": "keyword.operator.function.powerquery" + }, + "2": { + "name": "keyword.operator.assignment-or-comparison.powerquery" + }, + "3": { + "name": "keyword.operator.comparison.powerquery" + }, + "4": { + "name": "keyword.operator.combination.powerquery" + }, + "5": { + "name": "keyword.operator.arithmetic.powerquery" + }, + "6": { + "name": "keyword.operator.sectionaccess.powerquery" + }, + "7": { + "name": "keyword.operator.optional.powerquery" + } + } + }, + "DotOperators": { + "match": "(?<!\\.)(?:(\\.\\.\\.)|(\\.\\.))(?!\\.)", + "captures": { + "1": { + "name": "keyword.operator.ellipsis.powerquery" + }, + "2": { + "name": "keyword.operator.list.powerquery" + } + } + }, + "RecordExpression": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.brackets.begin.powerquery" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.section.brackets.end.powerquery" + } + }, + "patterns": [ + { + "include": "$self" + } + ], + "contentName": "meta.recordexpression.powerquery" + }, + "Punctuation": { + "match": "(,)|(\\()|(\\))|({)|(})", + "captures": { + "1": { + "name": "punctuation.separator.powerquery" + }, + "2": { + "name": "punctuation.section.parens.begin.powerquery" + }, + "3": { + "name": "punctuation.section.parens.end.powerquery" + }, + "4": { + "name": "punctuation.section.braces.begin.powerquery" + }, + "5": { + "name": "punctuation.section.braces.end.powerquery" + } + } + }, + "ImplicitVariable": { + "match": "\\b_\\b", + "name": "keyword.operator.implicitvariable.powerquery" + }, + "IntrinsicVariable": { + "match": "(?<![\\d\\w])(#sections|#shared)\\b", + "captures": { + "1": { + "name": "constant.language.intrinsicvariable.powerquery" + } + } + } + } +} diff --git a/src/lib/shiki/languages/powershell.tmLanguage.json b/src/lib/shiki/languages/powershell.tmLanguage.json new file mode 100644 index 0000000..61d40c6 --- /dev/null +++ b/src/lib/shiki/languages/powershell.tmLanguage.json @@ -0,0 +1,1029 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/PowerShell/EditorSyntax/blob/master/PowerShellSyntax.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/PowerShell/EditorSyntax/commit/742f0b5d4b60f5930c0b47fcc1f646860521296e", + "name": "powershell", + "scopeName": "source.powershell", + "patterns": [ + { + "begin": "<#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.block.begin.powershell" + } + }, + "end": "#>", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.block.end.powershell" + } + }, + "name": "comment.block.powershell", + "patterns": [ + { + "include": "#commentEmbeddedDocs" + } + ] + }, + { + "match": "[2-6]>&1|>>|>|<<|<|>|>\\||[1-6]>|[1-6]>>", + "name": "keyword.operator.redirection.powershell" + }, + { + "include": "#commands" + }, + { + "include": "#commentLine" + }, + { + "include": "#variable" + }, + { + "include": "#subexpression" + }, + { + "include": "#function" + }, + { + "include": "#attribute" + }, + { + "include": "#UsingDirective" + }, + { + "include": "#type" + }, + { + "include": "#hashtable" + }, + { + "include": "#doubleQuotedString" + }, + { + "include": "#scriptblock" + }, + { + "comment": "Needed to parse stuff correctly in 'argument mode'. (See about_parsing.)", + "include": "#doubleQuotedStringEscapes" + }, + { + "begin": "['\\x{2018}-\\x{201B}]", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.powershell" + } + }, + "end": "['\\x{2018}-\\x{201B}]", + "applyEndPatternLast": true, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.powershell" + } + }, + "name": "string.quoted.single.powershell", + "patterns": [ + { + "match": "['\\x{2018}-\\x{201B}]{2}", + "name": "constant.character.escape.powershell" + } + ] + }, + { + "begin": "(@[\"\\x{201C}-\\x{201E}])\\s*$", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.powershell" + } + }, + "end": "^[\"\\x{201C}-\\x{201E}]@", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.powershell" + } + }, + "name": "string.quoted.double.heredoc.powershell", + "patterns": [ + { + "include": "#variableNoProperty" + }, + { + "include": "#doubleQuotedStringEscapes" + }, + { + "include": "#interpolation" + } + ] + }, + { + "begin": "(@['\\x{2018}-\\x{201B}])\\s*$", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.powershell" + } + }, + "end": "^['\\x{2018}-\\x{201B}]@", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.powershell" + } + }, + "name": "string.quoted.single.heredoc.powershell" + }, + { + "include": "#numericConstant" + }, + { + "begin": "(@)(\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.array.begin.powershell" + }, + "2": { + "name": "punctuation.section.group.begin.powershell" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.group.end.powershell" + } + }, + "name": "meta.group.array-expression.powershell", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "((\\$))(\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.substatement.powershell" + }, + "2": { + "name": "punctuation.definition.subexpression.powershell" + }, + "3": { + "name": "punctuation.section.group.begin.powershell" + } + }, + "comment": "TODO: move to repo; make recursive.", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.group.end.powershell" + } + }, + "name": "meta.group.complex.subexpression.powershell", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "match": "(\\b(([A-Za-z0-9\\-_\\.]+)\\.(?i:exe|com|cmd|bat))\\b)", + "name": "support.function.powershell" + }, + { + "match": "(?<!\\w|-|\\.)((?i:begin|break|catch|clean|continue|data|default|define|do|dynamicparam|else|elseif|end|exit|finally|for|from|if|in|inlinescript|parallel|param|process|return|sequence|switch|throw|trap|try|until|var|while)|%|\\?)(?!\\w)", + "name": "keyword.control.powershell" + }, + { + "match": "(?<!\\w|-|[^\\)]\\.)((?i:(foreach|where)(?!-object))|%|\\?)(?!\\w)", + "name": "keyword.control.powershell" + }, + { + "begin": "(?<!\\w)(--%)(?!\\w)", + "beginCaptures": { + "1": { + "name": "keyword.control.powershell" + } + }, + "end": "$", + "patterns": [ + { + "match": ".+", + "name": "string.unquoted.powershell" + } + ], + "comment": "This should be moved to the repository at some point." + }, + { + "comment": "This should only be relevant inside a class but will require a rework of how classes are matched. This is a temp fix.", + "match": "(?<!\\w)((?i:hidden|static))(?!\\w)", + "name": "storage.modifier.powershell" + }, + { + "captures": { + "1": { + "name": "storage.type.powershell" + }, + "2": { + "name": "entity.name.function" + } + }, + "comment": "capture should be entity.name.type, but it doesn't provide a good color in the default schema.", + "match": "(?<!\\w|-)((?i:class)|%|\\?)(?:\\s)+((?:\\p{L}|\\d|_|-|)+)\\b" + }, + { + "match": "(?<!\\w)-(?i:is(?:not)?|as)\\b", + "name": "keyword.operator.comparison.powershell" + }, + { + "match": "(?<!\\w)-(?i:[ic]?(?:eq|ne|[gl][te]|(?:not)?(?:like|match|contains|in)|replace))(?!\\p{L})", + "name": "keyword.operator.comparison.powershell" + }, + { + "match": "(?<!\\w)-(?i:join|split)(?!\\p{L})|!", + "name": "keyword.operator.unary.powershell" + }, + { + "match": "(?<!\\w)-(?i:and|or|not|xor)(?!\\p{L})|!", + "name": "keyword.operator.logical.powershell" + }, + { + "match": "(?<!\\w)-(?i:band|bor|bnot|bxor|shl|shr)(?!\\p{L})", + "name": "keyword.operator.bitwise.powershell" + }, + { + "match": "(?<!\\w)-(?i:f)(?!\\p{L})", + "name": "keyword.operator.string-format.powershell" + }, + { + "match": "[+%*/-]?=|[+/*%-]", + "name": "keyword.operator.assignment.powershell" + }, + { + "match": "\\|{2}|&{2}|;", + "name": "punctuation.terminator.statement.powershell" + }, + { + "match": "&|(?<!\\w)\\.(?= )|`|,|\\|", + "name": "keyword.operator.other.powershell" + }, + { + "comment": "This is very imprecise, is there a syntax for 'must come after...' ", + "match": "(?<!\\s|^)\\.\\.(?=\\-?\\d|\\(|\\$)", + "name": "keyword.operator.range.powershell" + } + ], + "repository": { + "commentLine": { + "begin": "(?<![`\\\\-])(#)#*", + "captures": { + "1": { + "name": "punctuation.definition.comment.powershell" + } + }, + "end": "$\\n?", + "name": "comment.line.powershell", + "patterns": [ + { + "include": "#commentEmbeddedDocs" + }, + { + "include": "#RequiresDirective" + } + ] + }, + "attribute": { + "begin": "(\\[)\\s*\\b(?i)(cmdletbinding|alias|outputtype|parameter|validatenotnull|validatenotnullorempty|validatecount|validateset|allownull|allowemptycollection|allowemptystring|validatescript|validaterange|validatepattern|validatelength|supportswildcards)\\b", + "beginCaptures": { + "1": { + "name": "punctuation.section.bracket.begin.powershell" + }, + "2": { + "name": "support.function.attribute.powershell" + } + }, + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.section.bracket.end.powershell" + } + }, + "name": "meta.attribute.powershell", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.group.begin.powershell" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.group.end.powershell" + } + }, + "patterns": [ + { + "include": "$self" + }, + { + "match": "(?i)\\b(mandatory|valuefrompipeline|valuefrompipelinebypropertyname|valuefromremainingarguments|position|parametersetname|defaultparametersetname|supportsshouldprocess|supportspaging|positionalbinding|helpuri|confirmimpact|helpmessage)\\b(?:\\s+)?(=)?", + "captures": { + "1": { + "name": "variable.parameter.attribute.powershell" + }, + "2": { + "name": "keyword.operator.assignment.powershell" + } + } + } + ] + } + ] + }, + "commands": { + "patterns": [ + { + "comment": "Verb-Noun pattern:", + "match": "(?:(\\p{L}|\\d|_|-|\\\\|\\:)*\\\\)?\\b(?i:Add|Approve|Assert|Backup|Block|Build|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Deploy|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Mount|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Write)\\-.+?(?:\\.(?i:exe|cmd|bat|ps1))?\\b", + "name": "support.function.powershell" + }, + { + "comment": "Builtin cmdlets with reserved verbs", + "match": "(?<!\\w)(?i:foreach-object)(?!\\w)", + "name": "support.function.powershell" + }, + { + "comment": "Builtin cmdlets with reserved verbs", + "match": "(?<!\\w)(?i:where-object)(?!\\w)", + "name": "support.function.powershell" + }, + { + "comment": "Builtin cmdlets with reserved verbs", + "match": "(?<!\\w)(?i:sort-object)(?!\\w)", + "name": "support.function.powershell" + }, + { + "comment": "Builtin cmdlets with reserved verbs", + "match": "(?<!\\w)(?i:tee-object)(?!\\w)", + "name": "support.function.powershell" + } + ] + }, + "commentEmbeddedDocs": { + "patterns": [ + { + "captures": { + "1": { + "name": "constant.string.documentation.powershell" + }, + "2": { + "name": "keyword.operator.documentation.powershell" + } + }, + "comment": "these embedded doc keywords do not support arguments, must be the only thing on the line", + "match": "(?:^|\\G)(?i:\\s*(\\.)(COMPONENT|DESCRIPTION|EXAMPLE|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|ROLE|SYNOPSIS))\\s*$", + "name": "comment.documentation.embedded.powershell" + }, + { + "captures": { + "1": { + "name": "constant.string.documentation.powershell" + }, + "2": { + "name": "keyword.operator.documentation.powershell" + }, + "3": { + "name": "keyword.operator.documentation.powershell" + } + }, + "comment": "these embedded doc keywords require arguments though the type required may be inconsistent, they may not all be able to use the same argument match", + "match": "(?:^|\\G)(?i:\\s*(\\.)(EXTERNALHELP|FORWARDHELP(?:CATEGORY|TARGETNAME)|PARAMETER|REMOTEHELPRUNSPACE))\\s+(.+?)\\s*$", + "name": "comment.documentation.embedded.powershell" + } + ] + }, + "doubleQuotedStringEscapes": { + "patterns": [ + { + "match": "`[`0abefnrtv'\"\\x{2018}-\\x{201E}$]", + "name": "constant.character.escape.powershell" + }, + { + "include": "#unicodeEscape" + } + ] + }, + "unicodeEscape": { + "comment": "`u{xxxx} added in PowerShell 6.0", + "patterns": [ + { + "match": "`u\\{(?:(?:10)?([0-9a-fA-F]){1,4}|0?\\g<1>{1,5})}", + "name": "constant.character.escape.powershell" + }, + { + "match": "`u(?:\\{[0-9a-fA-F]{,6}.)?", + "name": "invalid.character.escape.powershell" + } + ] + }, + "function": { + "begin": "^(?:\\s*+)(?i)(function|filter|configuration|workflow)\\s+(?:(global|local|script|private):)?((?:\\p{L}|\\d|_|-|\\.)+)", + "beginCaptures": { + "0": { + "name": "meta.function.powershell" + }, + "1": { + "name": "storage.type.powershell" + }, + "2": { + "name": "storage.modifier.scope.powershell" + }, + "3": { + "name": "entity.name.function.powershell" + } + }, + "end": "(?=\\{|\\()", + "patterns": [ + { + "include": "#commentLine" + } + ] + }, + "subexpression": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.group.begin.powershell" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.group.end.powershell" + } + }, + "name": "meta.group.simple.subexpression.powershell", + "patterns": [ + { + "include": "$self" + } + ] + }, + "interpolation": { + "begin": "(((\\$)))((\\())", + "beginCaptures": { + "1": { + "name": "keyword.other.substatement.powershell" + }, + "2": { + "name": "punctuation.definition.substatement.powershell" + }, + "3": { + "name": "punctuation.section.embedded.substatement.begin.powershell" + }, + "4": { + "name": "punctuation.section.group.begin.powershell" + }, + "5": { + "name": "punctuation.section.embedded.substatement.begin.powershell" + } + }, + "contentName": "interpolated.complex.source.powershell", + "end": "(\\))", + "endCaptures": { + "0": { + "name": "punctuation.section.group.end.powershell" + }, + "1": { + "name": "punctuation.section.embedded.substatement.end.powershell" + } + }, + "name": "meta.embedded.substatement.powershell", + "patterns": [ + { + "include": "$self" + } + ] + }, + "numericConstant": { + "patterns": [ + { + "captures": { + "1": { + "name": "constant.numeric.hex.powershell" + }, + "2": { + "name": "keyword.other.powershell" + } + }, + "match": "(?<!\\w)([-+]?0(?:x|X)[0-9a-fA-F_]+(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\\b" + }, + { + "captures": { + "1": { + "name": "constant.numeric.integer.powershell" + }, + "2": { + "name": "keyword.other.powershell" + } + }, + "match": "(?<!\\w)([-+]?(?:[0-9_]+)?\\.[0-9_]+(?:(?:e|E)[0-9]+)?(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\\b" + }, + { + "captures": { + "1": { + "name": "constant.numeric.octal.powershell" + }, + "2": { + "name": "keyword.other.powershell" + } + }, + "match": "(?<!\\w)([-+]?0(?:b|B)[01_]+(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\\b" + }, + { + "captures": { + "1": { + "name": "constant.numeric.integer.powershell" + }, + "2": { + "name": "keyword.other.powershell" + } + }, + "match": "(?<!\\w)([-+]?[0-9_]+(?:e|E)(?:[0-9_])?+(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\\b" + }, + { + "captures": { + "1": { + "name": "constant.numeric.integer.powershell" + }, + "2": { + "name": "keyword.other.powershell" + } + }, + "match": "(?<!\\w)([-+]?[0-9_]+\\.(?:e|E)(?:[0-9_])?+(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\\b" + }, + { + "captures": { + "1": { + "name": "constant.numeric.integer.powershell" + }, + "2": { + "name": "keyword.other.powershell" + } + }, + "match": "(?<!\\w)([-+]?[0-9_]+[\\.]?(?:F|f|D|d|M|m))((?i:[kmgtp]b)?)\\b" + }, + { + "captures": { + "1": { + "name": "constant.numeric.integer.powershell" + }, + "2": { + "name": "keyword.other.powershell" + } + }, + "match": "(?<!\\w)([-+]?[0-9_]+[\\.]?(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\\b" + } + ] + }, + "scriptblock": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.braces.begin.powershell" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.braces.end.powershell" + } + }, + "name": "meta.scriptblock.powershell", + "patterns": [ + { + "include": "$self" + } + ] + }, + "type": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.bracket.begin.powershell" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.section.bracket.end.powershell" + } + }, + "patterns": [ + { + "match": "(?!\\d+|\\.)(?:\\p{L}|\\p{N}|\\.)+", + "name": "storage.type.powershell" + }, + { + "include": "$self" + } + ] + }, + "variable": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.language.powershell" + }, + "1": { + "name": "punctuation.definition.variable.powershell" + } + }, + "comment": "These are special constants.", + "match": "(\\$)(?i:(False|Null|True))\\b" + }, + { + "captures": { + "0": { + "name": "support.constant.variable.powershell" + }, + "1": { + "name": "punctuation.definition.variable.powershell" + }, + "3": { + "name": "variable.other.member.powershell" + } + }, + "comment": "These are the other built-in constants.", + "match": "(\\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?\\b" + }, + { + "captures": { + "0": { + "name": "support.variable.automatic.powershell" + }, + "1": { + "name": "punctuation.definition.variable.powershell" + }, + "3": { + "name": "variable.other.member.powershell" + } + }, + "comment": "Automatic variables are not constants, but they are read-only. In monokai (default) color schema support.variable doesn't have color, so we use constant.", + "match": "(\\$)((?:[$^?])|(?i:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\\b)((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?" + }, + { + "captures": { + "0": { + "name": "variable.language.powershell" + }, + "1": { + "name": "punctuation.definition.variable.powershell" + }, + "3": { + "name": "variable.other.member.powershell" + } + }, + "comment": "Style preference variables as language variables so that they stand out.", + "match": "(\\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?\\b" + }, + { + "captures": { + "0": { + "name": "variable.other.readwrite.powershell" + }, + "1": { + "name": "punctuation.definition.variable.powershell" + }, + "2": { + "name": "storage.modifier.scope.powershell" + }, + "4": { + "name": "variable.other.member.powershell" + } + }, + "match": "(?i:(\\$|@)(global|local|private|script|using|workflow):((?:\\p{L}|\\d|_)+))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?" + }, + { + "captures": { + "0": { + "name": "variable.other.readwrite.powershell" + }, + "1": { + "name": "punctuation.definition.variable.powershell" + }, + "2": { + "name": "punctuation.section.braces.begin.powershell" + }, + "3": { + "name": "storage.modifier.scope.powershell" + }, + "5": { + "name": "punctuation.section.braces.end.powershell" + }, + "6": { + "name": "variable.other.member.powershell" + } + }, + "match": "(?i:(\\$)(\\{)(global|local|private|script|using|workflow):([^}]*[^}`])(\\}))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?" + }, + { + "captures": { + "0": { + "name": "variable.other.readwrite.powershell" + }, + "1": { + "name": "punctuation.definition.variable.powershell" + }, + "2": { + "name": "support.variable.drive.powershell" + }, + "4": { + "name": "variable.other.member.powershell" + } + }, + "match": "(?i:(\\$|@)((?:\\p{L}|\\d|_)+:)?((?:\\p{L}|\\d|_)+))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?" + }, + { + "captures": { + "0": { + "name": "variable.other.readwrite.powershell" + }, + "1": { + "name": "punctuation.definition.variable.powershell" + }, + "2": { + "name": "punctuation.section.braces.begin.powershell" + }, + "3": { + "name": "support.variable.drive.powershell" + }, + "5": { + "name": "punctuation.section.braces.end.powershell" + }, + "6": { + "name": "variable.other.member.powershell" + } + }, + "match": "(?i:(\\$)(\\{)((?:\\p{L}|\\d|_)+:)?([^}]*[^}`])(\\}))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?" + } + ] + }, + "UsingDirective": { + "match": "(?<!\\w)(?i:(using))\\s+(?i:(namespace|module))\\s+(?i:((?:\\w+(?:\\.)?)+))", + "captures": { + "1": { + "name": "keyword.control.using.powershell" + }, + "2": { + "name": "keyword.other.powershell" + }, + "3": { + "name": "variable.parameter.powershell" + } + } + }, + "RequiresDirective": { + "begin": "(?<=#)(?i:(requires))\\s", + "beginCaptures": { + "0": { + "name": "keyword.control.requires.powershell" + } + }, + "end": "$", + "name": "meta.requires.powershell", + "patterns": [ + { + "match": "\\-(?i:Modules|PSSnapin|RunAsAdministrator|ShellId|Version|Assembly|PSEdition)", + "name": "keyword.other.powershell" + }, + { + "match": "(?<!-)\\b\\p{L}+|\\d+(?:\\.\\d+)*", + "name": "variable.parameter.powershell" + }, + { + "include": "#hashtable" + } + ] + }, + "variableNoProperty": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.language.powershell" + }, + "1": { + "name": "punctuation.definition.variable.powershell" + } + }, + "comment": "These are special constants.", + "match": "(\\$)(?i:(False|Null|True))\\b" + }, + { + "captures": { + "0": { + "name": "support.constant.variable.powershell" + }, + "1": { + "name": "punctuation.definition.variable.powershell" + }, + "3": { + "name": "variable.other.member.powershell" + } + }, + "comment": "These are the other built-in constants.", + "match": "(\\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))\\b" + }, + { + "captures": { + "0": { + "name": "support.variable.automatic.powershell" + }, + "1": { + "name": "punctuation.definition.variable.powershell" + }, + "3": { + "name": "variable.other.member.powershell" + } + }, + "comment": "Automatic variables are not constants, but they are read-only...", + "match": "(\\$)((?:[$^?])|(?i:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\\b)" + }, + { + "captures": { + "0": { + "name": "variable.language.powershell" + }, + "1": { + "name": "punctuation.definition.variable.powershell" + }, + "3": { + "name": "variable.other.member.powershell" + } + }, + "comment": "Style preference variables as language variables so that they stand out.", + "match": "(\\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference))\\b" + }, + { + "captures": { + "0": { + "name": "variable.other.readwrite.powershell" + }, + "1": { + "name": "punctuation.definition.variable.powershell" + }, + "2": { + "name": "storage.modifier.scope.powershell" + }, + "4": { + "name": "variable.other.member.powershell" + } + }, + "match": "(?i:(\\$)(global|local|private|script|using|workflow):((?:\\p{L}|\\d|_)+))" + }, + { + "captures": { + "0": { + "name": "variable.other.readwrite.powershell" + }, + "1": { + "name": "punctuation.definition.variable.powershell" + }, + "2": { + "name": "storage.modifier.scope.powershell" + }, + "4": { + "name": "keyword.other.powershell" + }, + "5": { + "name": "variable.other.member.powershell" + } + }, + "match": "(?i:(\\$)(\\{)(global|local|private|script|using|workflow):([^}]*[^}`])(\\}))" + }, + { + "captures": { + "0": { + "name": "variable.other.readwrite.powershell" + }, + "1": { + "name": "punctuation.definition.variable.powershell" + }, + "2": { + "name": "support.variable.drive.powershell" + }, + "4": { + "name": "variable.other.member.powershell" + } + }, + "match": "(?i:(\\$)((?:\\p{L}|\\d|_)+:)?((?:\\p{L}|\\d|_)+))" + }, + { + "captures": { + "0": { + "name": "variable.other.readwrite.powershell" + }, + "1": { + "name": "punctuation.definition.variable.powershell" + }, + "2": { + "name": "punctuation.section.braces.begin" + }, + "3": { + "name": "support.variable.drive.powershell" + }, + "5": { + "name": "punctuation.section.braces.end" + } + }, + "match": "(?i:(\\$)(\\{)((?:\\p{L}|\\d|_)+:)?([^}]*[^}`])(\\}))" + } + ] + }, + "hashtable": { + "begin": "(@)(\\{)", + "beginCaptures": { + "1": { + "name": "keyword.other.hashtable.begin.powershell" + }, + "2": { + "name": "punctuation.section.braces.begin.powershell" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.section.braces.end.powershell" + } + }, + "name": "meta.hashtable.powershell", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.string.begin.powershell" + }, + "2": { + "name": "variable.other.readwrite.powershell" + }, + "3": { + "name": "punctuation.definition.string.end.powershell" + }, + "4": { + "name": "keyword.operator.assignment.powershell" + } + }, + "match": "\\b((?:\\'|\\\")?)(\\w+)((?:\\'|\\\")?)(?:\\s+)?(=)(?:\\s+)?", + "name": "meta.hashtable.assignment.powershell" + }, + { + "include": "#scriptblock" + }, + { + "include": "$self" + } + ] + }, + "doubleQuotedString": { + "begin": "[\"\\x{201C}-\\x{201E}]", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.powershell" + } + }, + "end": "[\"\\x{201C}-\\x{201E}]", + "applyEndPatternLast": true, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.powershell" + } + }, + "name": "string.quoted.double.powershell", + "patterns": [ + { + "match": "(?i)\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,64}\\b" + }, + { + "include": "#variableNoProperty" + }, + { + "include": "#doubleQuotedStringEscapes" + }, + { + "match": "[\"\\x{201C}-\\x{201E}]{2}", + "name": "constant.character.escape.powershell" + }, + { + "include": "#interpolation" + }, + { + "match": "`\\s*$", + "name": "keyword.other.powershell" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/prisma.tmLanguage.json b/src/lib/shiki/languages/prisma.tmLanguage.json new file mode 100644 index 0000000..b60095a --- /dev/null +++ b/src/lib/shiki/languages/prisma.tmLanguage.json @@ -0,0 +1,441 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "prisma", + "scopeName": "source.prisma", + "fileTypes": ["prisma"], + "patterns": [ + { + "include": "#triple_comment" + }, + { + "include": "#double_comment" + }, + { + "include": "#model_block_definition" + }, + { + "include": "#config_block_definition" + }, + { + "include": "#enum_block_definition" + }, + { + "include": "#type_definition" + } + ], + "repository": { + "model_block_definition": { + "begin": "^\\s*(model|type|view)\\s+([A-Za-z][\\w]*)\\s*({)", + "name": "source.prisma.embedded.source", + "beginCaptures": { + "1": { + "name": "storage.type.model.prisma" + }, + "2": { + "name": "entity.name.type.model.prisma" + }, + "3": { + "name": "punctuation.definition.tag.prisma" + } + }, + "patterns": [ + { + "include": "#triple_comment" + }, + { + "include": "#double_comment" + }, + { + "include": "#field_definition" + } + ], + "end": "\\s*\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.prisma" + } + } + }, + "enum_block_definition": { + "begin": "^\\s*(enum)\\s+([A-Za-z][\\w]*)\\s+({)", + "name": "source.prisma.embedded.source", + "beginCaptures": { + "1": { + "name": "storage.type.enum.prisma" + }, + "2": { + "name": "entity.name.type.enum.prisma" + }, + "3": { + "name": "punctuation.definition.tag.prisma" + } + }, + "patterns": [ + { + "include": "#triple_comment" + }, + { + "include": "#double_comment" + }, + { + "include": "#enum_value_definition" + } + ], + "end": "\\s*\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.prisma" + } + } + }, + "config_block_definition": { + "begin": "^\\s*(generator|datasource)\\s+([A-Za-z][\\w]*)\\s+({)", + "name": "source.prisma.embedded.source", + "beginCaptures": { + "1": { + "name": "storage.type.config.prisma" + }, + "2": { + "name": "entity.name.type.config.prisma" + }, + "3": { + "name": "punctuation.definition.tag.prisma" + } + }, + "patterns": [ + { + "include": "#triple_comment" + }, + { + "include": "#double_comment" + }, + { + "include": "#assignment" + } + ], + "end": "\\s*\\}", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.prisma" + } + } + }, + "assignment": { + "patterns": [ + { + "begin": "^\\s*(\\w+)\\s*(=)\\s*", + "beginCaptures": { + "1": { + "name": "variable.other.assignment.prisma" + }, + "2": { + "name": "keyword.operator.terraform" + } + }, + "patterns": [ + { + "include": "#value" + }, + { + "include": "#double_comment_inline" + } + ], + "end": "\\n" + } + ] + }, + "field_definition": { + "name": "scalar.field", + "patterns": [ + { + "match": "^\\s*(\\w+)(\\s*:)?\\s+((?!(?:Int|String|DateTime|Bytes|Decimal|Float|Json|Boolean)\\b)\\b\\w+)?(Int|String|DateTime|Bytes|Decimal|Float|Json|Boolean)?(\\[\\])?(\\?)?(\\!)?", + "captures": { + "1": { + "name": "variable.other.assignment.prisma" + }, + "2": { + "name": "invalid.illegal.colon.prisma" + }, + "3": { + "name": "variable.language.relations.prisma" + }, + "4": { + "name": "support.type.primitive.prisma" + }, + "5": { + "name": "keyword.operator.list_type.prisma" + }, + "6": { + "name": "keyword.operator.optional_type.prisma" + }, + "7": { + "name": "invalid.illegal.required_type.prisma" + } + } + }, + { + "include": "#attribute_with_arguments" + }, + { + "include": "#attribute" + } + ] + }, + "type_definition": { + "patterns": [ + { + "match": "^\\s*(type)\\s+(\\w+)\\s*=\\s*(\\w+)", + "captures": { + "1": { + "name": "storage.type.type.prisma" + }, + "2": { + "name": "entity.name.type.type.prisma" + }, + "3": { + "name": "support.type.primitive.prisma" + } + } + }, + { + "include": "#attribute_with_arguments" + }, + { + "include": "#attribute" + } + ] + }, + "enum_value_definition": { + "patterns": [ + { + "match": "^\\s*(\\w+)\\s*", + "captures": { + "1": { + "name": "variable.other.assignment.prisma" + } + } + }, + { + "include": "#attribute_with_arguments" + }, + { + "include": "#attribute" + } + ] + }, + "attribute_with_arguments": { + "name": "source.prisma.attribute.with_arguments", + "begin": "(@@?[\\w\\.]+)(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.attribute.prisma" + }, + "2": { + "name": "punctuation.definition.tag.prisma" + } + }, + "patterns": [ + { + "include": "#named_argument" + }, + { + "include": "#value" + } + ], + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.prisma" + } + } + }, + "attribute": { + "name": "source.prisma.attribute", + "match": "(@@?[\\w\\.]+)", + "captures": { + "1": { + "name": "entity.name.function.attribute.prisma" + } + } + }, + "array": { + "name": "source.prisma.array", + "begin": "\\[", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.prisma" + } + }, + "patterns": [ + { + "include": "#value" + } + ], + "end": "\\]", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.prisma" + } + } + }, + "value": { + "name": "source.prisma.value", + "patterns": [ + { + "include": "#array" + }, + { + "include": "#functional" + }, + { + "include": "#literal" + } + ] + }, + "functional": { + "name": "source.prisma.functional", + "begin": "(\\w+)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.functional.prisma" + }, + "2": { + "name": "punctuation.definition.tag.prisma" + } + }, + "patterns": [ + { + "include": "#value" + } + ], + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.prisma" + } + } + }, + "literal": { + "name": "source.prisma.literal", + "patterns": [ + { + "include": "#boolean" + }, + { + "include": "#number" + }, + { + "include": "#double_quoted_string" + }, + { + "include": "#identifier" + } + ] + }, + "identifier": { + "patterns": [ + { + "match": "\\b(\\w)+\\b", + "name": "support.constant.constant.prisma" + } + ] + }, + "map_key": { + "name": "source.prisma.key", + "patterns": [ + { + "match": "(\\w+)\\s*(:)\\s*", + "captures": { + "1": { + "name": "variable.parameter.key.prisma" + }, + "2": { + "name": "punctuation.definition.separator.key-value.prisma" + } + } + } + ] + }, + "named_argument": { + "name": "source.prisma.named_argument", + "patterns": [ + { + "include": "#map_key" + }, + { + "include": "#value" + } + ] + }, + "triple_comment": { + "begin": "///", + "end": "$\\n?", + "name": "comment.prisma" + }, + "double_comment": { + "begin": "//", + "end": "$\\n?", + "name": "comment.prisma" + }, + "double_comment_inline": { + "match": "//[^\\n]*", + "name": "comment.prisma" + }, + "boolean": { + "match": "\\b(true|false)\\b", + "name": "constant.language.boolean.prisma" + }, + "number": { + "match": "((0(x|X)[0-9a-fA-F]*)|(\\+|-)?\\b(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDdg]|UL|ul)?\\b", + "name": "constant.numeric.prisma" + }, + "double_quoted_string": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "string.quoted.double.start.prisma" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "string.quoted.double.end.prisma" + } + }, + "patterns": [ + { + "include": "#string_interpolation" + }, + { + "match": "([\\w\\-\\/\\._\\\\%@:\\?=]+)", + "name": "string.quoted.double.prisma" + } + ], + "name": "unnamed" + }, + "string_interpolation": { + "patterns": [ + { + "begin": "\\$\\{", + "beginCaptures": { + "0": { + "name": "keyword.control.interpolation.start.prisma" + } + }, + "end": "\\s*\\}", + "endCaptures": { + "0": { + "name": "keyword.control.interpolation.end.prisma" + } + }, + "name": "source.tag.embedded.source.prisma", + "patterns": [ + { + "include": "#value" + } + ] + } + ] + } + } +} diff --git a/src/lib/shiki/languages/prolog.tmLanguage.json b/src/lib/shiki/languages/prolog.tmLanguage.json new file mode 100644 index 0000000..b871d35 --- /dev/null +++ b/src/lib/shiki/languages/prolog.tmLanguage.json @@ -0,0 +1,296 @@ +{ + "comment": "This Source Code Form is subject to the terms of the Mozilla Public License,\nv. 2.0. If a copy of the MPL was not distributed with this file, You can obtain\none at http://mozilla.org/MPL/2.0/.", + "name": "prolog", + "scopeName": "source.prolog", + "fileTypes": ["pl", "pro"], + "uuid": "df89928b-6612-475a-b414-f319d9b98664", + "patterns": [ + { + "include": "#comments" + }, + { + "name": "meta.clause.body.prolog", + "begin": "(?<=:-)\\s*", + "end": "(\\.)", + "endCaptures": { + "1": { + "name": "keyword.control.clause.bodyend.prolog" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#builtin" + }, + { + "include": "#controlandkeywords" + }, + { + "include": "#atom" + }, + { + "include": "#variable" + }, + { + "include": "#constants" + }, + { + "name": "meta.clause.body.prolog", + "match": "." + } + ] + }, + { + "name": "meta.clause.head.prolog", + "begin": "^\\s*([a-z][a-zA-Z0-9_]*)(\\(?)(?=.*:-.*)", + "beginCaptures": { + "1": { + "name": "entity.name.function.clause.prolog" + }, + "2": { + "name": "punctuation.definition.parameters.begin" + } + }, + "end": "((\\)?))\\s*(:-)", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end" + }, + "3": { + "name": "keyword.control.clause.bodybegin.prolog" + } + }, + "patterns": [ + { + "include": "#atom" + }, + { + "include": "#variable" + }, + { + "include": "#constants" + } + ] + }, + { + "name": "meta.dcg.head.prolog", + "begin": "^\\s*([a-z][a-zA-Z0-9_]*)(\\(?)(?=.*-->.*)", + "beginCaptures": { + "1": { + "name": "entity.name.function.dcg.prolog" + }, + "2": { + "name": "punctuation.definition.parameters.begin" + } + }, + "end": "((\\)?))\\s*(-->)", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end" + }, + "3": { + "name": "keyword.control.dcg.bodybegin.prolog" + } + }, + "patterns": [ + { + "include": "#atom" + }, + { + "include": "#variable" + }, + { + "include": "#constants" + } + ] + }, + { + "name": "meta.dcg.body.prolog", + "begin": "(?<=-->)\\s*", + "end": "(\\.)", + "endCaptures": { + "1": { + "name": "keyword.control.dcg.bodyend.prolog" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#controlandkeywords" + }, + { + "include": "#atom" + }, + { + "include": "#variable" + }, + { + "include": "#constants" + }, + { + "name": "meta.dcg.body.prolog", + "match": "." + } + ] + }, + { + "name": "meta.fact.prolog", + "begin": "^\\s*([a-zA-Z][a-zA-Z0-9_]*)(\\(?)(?!.*(:-|-->).*)", + "beginCaptures": { + "1": { + "name": "entity.name.function.fact.prolog" + }, + "2": { + "name": "punctuation.definition.parameters.begin" + } + }, + "end": "((\\)?))\\s*(\\.)(?!\\d+)", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end" + }, + "3": { + "name": "keyword.control.fact.end.prolog" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#atom" + }, + { + "include": "#variable" + }, + { + "include": "#constants" + } + ] + } + ], + "repository": { + "atom": { + "patterns": [ + { + "name": "constant.other.atom.simple.prolog", + "match": "(?<![a-zA-Z0-9_])[a-z][a-zA-Z0-9_]*(?!\\s*\\(|[a-zA-Z0-9_])" + }, + { + "name": "constant.other.atom.quoted.prolog", + "match": "'.*?'" + }, + { + "name": "constant.other.atom.emptylist.prolog", + "match": "\\[\\]" + } + ] + }, + "builtin": { + "patterns": [ + { + "name": "keyword.other", + "match": "\\b(op|nl|fail|dynamic|discontiguous|initialization|meta_predicate|module_transparent|multifile|public|thread_local|thread_initialization|volatile)\\b" + }, + { + "name": "support.function.builtin.prolog", + "match": "\\b(abolish|abort|abs|absolute_file_name|access_file|acos|acosh|acyclic_term|add_import_module|append|apropos|arg|asin|asinh|assert|asserta|assertz|at_end_of_stream|at_halt|atan|atanh|atom|atom_chars|atom_codes|atom_concat|atom_length|atom_number|atom_prefix|atom_string|atom_to_stem_list|atom_to_term|atomic|atomic_concat|atomic_list_concat|atomics_to_string|attach_packs|attr_portray_hook|attr_unify_hook|attribute_goals|attvar|autoload|autoload_path|b_getval|b_set_dict|b_setval|bagof|begin_tests|between|blob|break|byte_count|call_dcg|call_residue_vars|callable|cancel_halt|catch|ceil|ceiling|char_code|char_conversion|char_type|character_count|chdir|chr_leash|chr_notrace|chr_show_store|chr_trace|clause|clause_property|close|close_dde_conversation|close_table|code_type|collation_key|compare|compare_strings|compile_aux_clauses|compile_predicates|compiling|compound|compound_name_arguments|compound_name_arity|consult|context_module|copy_predicate_clauses|copy_stream_data|copy_term|copy_term_nat|copysign|cos|cosh|cputime|create_prolog_flag|current_arithmetic_function|current_atom|current_blob|current_char_conversion|current_engine|current_flag|current_format_predicate|current_functor|current_input|current_key|current_locale|current_module|current_op|current_output|current_predicate|current_prolog_flag|current_signal|current_stream|current_trie|cyclic_term|date_time_stamp|date_time_value|day_of_the_week|dcg_translate_rule|dde_current_connection|dde_current_service|dde_execute|dde_poke|dde_register_service|dde_request|dde_unregister_service|debug|debugging|default_module|del_attr|del_attrs|del_dict|delete_directory|delete_file|delete_import_module|deterministic|dict_create|dict_pairs|dif|directory_files|divmod|doc_browser|doc_collect|doc_load_library|doc_server|double_metaphone|downcase_atom|dtd|dtd_property|duplicate_term|dwim_match|dwim_predicate|e|edit|encoding|engine_create|engine_fetch|engine_next|engine_next_reified|engine_post|engine_self|engine_yield|ensure_loaded|epsilon|erase|erf|erfc|eval|exception|exists_directory|exists_file|exists_source|exp|expand_answer|expand_file_name|expand_file_search_path|expand_goal|expand_query|expand_term|explain|fast_read|fast_term_serialized|fast_write|file_base_name|file_directory_name|file_name_extension|file_search_path|fill_buffer|find_chr_constraint|findall|findnsols|flag|float|float_fractional_part|float_integer_part|floor|flush_output|forall|format|format_predicate|format_time|free_dtd|free_sgml_parser|free_table|freeze|frozen|functor|garbage_collect|garbage_collect_atoms|garbage_collect_clauses|gdebug|get|get_attr|get_attrs|get_byte|get_char|get_code|get_dict|get_flag|get_sgml_parser|get_single_char|get_string_code|get_table_attribute|get_time|getbit|getenv|goal_expansion|ground|gspy|gtrace|guitracer|gxref|gzopen|halt|help|import_module|in_pce_thread|in_pce_thread_sync|in_table|include|inf|instance|integer|iri_xml_namespace|is_absolute_file_name|is_dict|is_engine|is_list|is_stream|is_thread|keysort|known_licenses|leash|length|lgamma|library_directory|license|line_count|line_position|list_strings|listing|load_dtd|load_files|load_html|load_rdf|load_sgml|load_structure|load_test_files|load_xml|locale_create|locale_destroy|locale_property|locale_sort|log|lsb|make|make_directory|make_library_index|max|memberchk|message_hook|message_property|message_queue_create|message_queue_destroy|message_queue_property|message_to_string|min|module|module_property|msb|msort|mutex_create|mutex_destroy|mutex_lock|mutex_property|mutex_statistics|mutex_trylock|mutex_unlock|name|nan|nb_current|nb_delete|nb_getval|nb_link_dict|nb_linkarg|nb_linkval|nb_set_dict|nb_setarg|nb_setval|new_dtd|new_order_table|new_sgml_parser|new_table|nl|nodebug|noguitracer|nonvar|noprotocol|normalize_space|nospy|nospyall|notrace|nth_clause|nth_integer_root_and_remainder|number|number_chars|number_codes|number_string|numbervars|odbc_close_statement|odbc_connect|odbc_current_connection|odbc_current_table|odbc_data_source|odbc_debug|odbc_disconnect|odbc_driver_connect|odbc_end_transaction|odbc_execute|odbc_fetch|odbc_free_statement|odbc_get_connection|odbc_prepare|odbc_query|odbc_set_connection|odbc_statistics|odbc_table_column|odbc_table_foreign_key|odbc_table_primary_key|odbc_type|on_signal|op|open|open_dde_conversation|open_dtd|open_null_stream|open_resource|open_string|open_table|order_table_mapping|parse_time|passed|pce_dispatch|pdt_install_console|peek_byte|peek_char|peek_code|peek_string|phrase|plus|popcount|porter_stem|portray|portray_clause|powm|predicate_property|predsort|prefix_string|print|print_message|print_message_lines|process_rdf|profile|profiler|project_attributes|prolog|prolog_choice_attribute|prolog_current_choice|prolog_current_frame|prolog_cut_to|prolog_debug|prolog_exception_hook|prolog_file_type|prolog_frame_attribute|prolog_ide|prolog_list_goal|prolog_load_context|prolog_load_file|prolog_nodebug|prolog_skip_frame|prolog_skip_level|prolog_stack_property|prolog_to_os_filename|prolog_trace_interception|prompt|protocol|protocola|protocolling|put|put_attr|put_attrs|put_byte|put_char|put_code|put_dict|qcompile|qsave_program|random|random_float|random_property|rational|rationalize|rdf_write_xml|read|read_clause|read_history|read_link|read_pending_chars|read_pending_codes|read_string|read_table_fields|read_table_record|read_table_record_data|read_term|read_term_from_atom|recorda|recorded|recordz|redefine_system_predicate|reexport|reload_library_index|rename_file|require|reset|reset_profiler|resource|retract|retractall|round|run_tests|running_tests|same_file|same_term|see|seeing|seek|seen|select_dict|set_end_of_stream|set_flag|set_input|set_locale|set_module|set_output|set_prolog_IO|set_prolog_flag|set_prolog_stack|set_random|set_sgml_parser|set_stream|set_stream_position|set_test_options|setarg|setenv|setlocale|setof|sgml_parse|shell|shift|show_coverage|show_profile|sign|sin|sinh|size_file|skip|sleep|sort|source_exports|source_file|source_file_property|source_location|split_string|spy|sqrt|stamp_date_time|statistics|stream_pair|stream_position_data|stream_property|string|string_chars|string_code|string_codes|string_concat|string_length|string_lower|string_upper|strip_module|style_check|sub_atom|sub_atom_icasechk|sub_string|subsumes_term|succ|suite|swritef|tab|table_previous_record|table_start_of_record|table_version|table_window|tan|tanh|tell|telling|term_attvars|term_expansion|term_hash|term_string|term_subsumer|term_to_atom|term_variables|test|test_report|text_to_string|thread_at_exit|thread_create|thread_detach|thread_exit|thread_get_message|thread_join|thread_message_hook|thread_peek_message|thread_property|thread_self|thread_send_message|thread_setconcurrency|thread_signal|thread_statistics|throw|time|time_file|tmp_file|tmp_file_stream|tokenize_atom|told|trace|tracing|trie_destroy|trie_gen|trie_insert|trie_insert_new|trie_lookup|trie_new|trie_property|trie_term|trim_stacks|truncate|tty_get_capability|tty_goto|tty_put|tty_size|ttyflush|unaccent_atom|unifiable|unify_with_occurs_check|unix|unknown|unload_file|unsetenv|upcase_atom|use_module|var|var_number|var_property|variant_hash|version|visible|wait_for_input|when|wildcard_match|win_add_dll_directory|win_exec|win_folder|win_has_menu|win_insert_menu|win_insert_menu_item|win_registry_get_value|win_remove_dll_directory|win_shell|win_window_pos|window_title|with_mutex|with_output_to|working_directory|write|write_canonical|write_length|write_term|writef|writeln|writeq|xml_is_dom|xml_to_rdf|zopen)\\b" + } + ] + }, + "comments": { + "patterns": [ + { + "name": "comment.line.percent-sign.prolog", + "match": "%.*" + }, + { + "name": "comment.block.prolog", + "begin": "/\\*", + "end": "\\*/", + "captures": { + "0": { + "name": "punctuation.definition.comment.prolog" + } + } + } + ] + }, + "constants": { + "patterns": [ + { + "name": "constant.numeric.integer.prolog", + "match": "(?<![a-zA-Z]|/)(\\d+|(\\d+\\.\\d+))" + }, + { + "name": "string.quoted.double.prolog", + "match": "\".*?\"" + } + ] + }, + "controlandkeywords": { + "patterns": [ + { + "name": "meta.if.prolog", + "begin": "(->)", + "beginCaptures": { + "1": { + "name": "keyword.control.if.prolog" + } + }, + "end": "(;)", + "endCaptures": { + "1": { + "name": "keyword.control.else.prolog" + } + }, + "patterns": [ + { + "include": "$self" + }, + { + "include": "#builtin" + }, + { + "include": "#comments" + }, + { + "include": "#atom" + }, + { + "include": "#variable" + }, + { + "name": "meta.if.body.prolog", + "match": "." + } + ] + }, + { + "name": "keyword.control.cut.prolog", + "match": "!" + }, + { + "name": "keyword.operator.prolog", + "match": "(\\s(is)\\s)|=:=|=\\.\\.|=?\\\\?=|\\\\\\+|@?>|@?=?<|\\+|\\*|\\-" + } + ] + }, + "variable": { + "patterns": [ + { + "name": "variable.parameter.uppercase.prolog", + "match": "(?<![a-zA-Z0-9_])[A-Z][a-zA-Z0-9_]*" + }, + { + "name": "variable.language.anonymous.prolog", + "match": "(?<!\\w)_" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/proto.tmLanguage.json b/src/lib/shiki/languages/proto.tmLanguage.json new file mode 100644 index 0000000..3d55f7a --- /dev/null +++ b/src/lib/shiki/languages/proto.tmLanguage.json @@ -0,0 +1,504 @@ +{ + "name": "proto", + "scopeName": "source.proto", + "fileTypes": ["proto"], + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#syntax" + }, + { + "include": "#package" + }, + { + "include": "#import" + }, + { + "include": "#optionStmt" + }, + { + "include": "#message" + }, + { + "include": "#enum" + }, + { + "include": "#service" + } + ], + "repository": { + "comments": { + "patterns": [ + { + "name": "comment.block.proto", + "begin": "/\\*", + "end": "\\*/" + }, + { + "name": "comment.line.double-slash.proto", + "begin": "//", + "end": "$\\n?" + } + ] + }, + "syntax": { + "match": "\\s*(syntax)\\s*(=)\\s*(\"proto[23]\")\\s*(;)", + "captures": { + "1": { + "name": "keyword.other.proto" + }, + "2": { + "name": "keyword.operator.assignment.proto" + }, + "3": { + "name": "string.quoted.double.proto.syntax" + }, + "4": { + "name": "punctuation.terminator.proto" + } + } + }, + "package": { + "match": "\\s*(package)\\s+([\\w.]+)\\s*(;)", + "captures": { + "1": { + "name": "keyword.other.proto" + }, + "2": { + "name": "string.unquoted.proto.package" + }, + "3": { + "name": "punctuation.terminator.proto" + } + } + }, + "import": { + "match": "\\s*(import)\\s+(weak|public)?\\s*(\"[^\"]+\")\\s*(;)", + "captures": { + "1": { + "name": "keyword.other.proto" + }, + "2": { + "name": "keyword.other.proto" + }, + "3": { + "name": "string.quoted.double.proto.import" + }, + "4": { + "name": "punctuation.terminator.proto" + } + } + }, + "optionStmt": { + "begin": "(option)\\s+(\\w+|\\(\\w+(\\.\\w+)*\\))(\\.\\w+)*\\s*(=)", + "beginCaptures": { + "1": { + "name": "keyword.other.proto" + }, + "2": { + "name": "support.other.proto" + }, + "3": { + "name": "support.other.proto" + }, + "4": { + "name": "support.other.proto" + }, + "5": { + "name": "keyword.operator.assignment.proto" + } + }, + "end": "(;)", + "endCaptures": { + "1": { + "name": "punctuation.terminator.proto" + } + }, + "patterns": [ + { + "include": "#constants" + }, + { + "include": "#number" + }, + { + "include": "#string" + }, + { + "include": "#subMsgOption" + } + ] + }, + "subMsgOption": { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#kv" + }, + { + "include": "#comments" + } + ] + }, + "kv": { + "begin": "(\\w+)\\s*(:)", + "beginCaptures": { + "1": { + "name": "keyword.other.proto" + }, + "2": { + "name": "punctuation.separator.key-value.proto" + } + }, + "end": "(;)|,|(?=[}/_a-zA-Z])", + "endCaptures": { + "1": { + "name": "punctuation.terminator.proto" + } + }, + "patterns": [ + { + "include": "#constants" + }, + { + "include": "#number" + }, + { + "include": "#string" + }, + { + "include": "#subMsgOption" + } + ] + }, + "fieldOptions": { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#constants" + }, + { + "include": "#number" + }, + { + "include": "#string" + }, + { + "include": "#subMsgOption" + }, + { + "include": "#optionName" + } + ] + }, + "optionName": { + "match": "(\\w+|\\(\\w+(\\.\\w+)*\\))(\\.\\w+)*", + "captures": { + "1": { + "name": "support.other.proto" + }, + "2": { + "name": "support.other.proto" + }, + "3": { + "name": "support.other.proto" + } + } + }, + "message": { + "begin": "(message|extend)(\\s+)([A-Za-z_][A-Za-z0-9_.]*)(\\s*)(\\{)?", + "beginCaptures": { + "1": { + "name": "keyword.other.proto" + }, + "3": { + "name": "entity.name.class.message.proto" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#reserved" + }, + { + "include": "$self" + }, + { + "include": "#enum" + }, + { + "include": "#optionStmt" + }, + { + "include": "#comments" + }, + { + "include": "#oneof" + }, + { + "include": "#field" + }, + { + "include": "#mapfield" + } + ] + }, + "reserved": { + "begin": "(reserved)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.other.proto" + } + }, + "end": "(;)", + "endCaptures": { + "1": { + "name": "punctuation.terminator.proto" + } + }, + "patterns": [ + { + "match": "(\\d+)(\\s+(to)\\s+(\\d+))?", + "captures": { + "1": { + "name": "constant.numeric.proto" + }, + "3": { + "name": "keyword.other.proto" + }, + "4": { + "name": "constant.numeric.proto" + } + } + }, + { + "include": "#string" + } + ] + }, + "field": { + "begin": "\\s*(optional|repeated|required)?\\s*\\b([\\w.]+)\\s+(\\w+)\\s*(=)\\s*(0[xX][0-9a-fA-F]+|[0-9]+)", + "beginCaptures": { + "1": { + "name": "storage.modifier.proto" + }, + "2": { + "name": "storage.type.proto" + }, + "3": { + "name": "variable.other.proto" + }, + "4": { + "name": "keyword.operator.assignment.proto" + }, + "5": { + "name": "constant.numeric.proto" + } + }, + "end": "(;)", + "endCaptures": { + "1": { + "name": "punctuation.terminator.proto" + } + }, + "patterns": [ + { + "include": "#fieldOptions" + } + ] + }, + "mapfield": { + "begin": "\\s*(map)\\s*(<)\\s*([\\w.]+)\\s*,\\s*([\\w.]+)\\s*(>)\\s+(\\w+)\\s*(=)\\s*(\\d+)", + "beginCaptures": { + "1": { + "name": "storage.type.proto" + }, + "2": { + "name": "punctuation.definition.typeparameters.begin.proto" + }, + "3": { + "name": "storage.type.proto" + }, + "4": { + "name": "storage.type.proto" + }, + "5": { + "name": "punctuation.definition.typeparameters.end.proto" + }, + "6": { + "name": "variable.other.proto" + }, + "7": { + "name": "keyword.operator.assignment.proto" + }, + "8": { + "name": "constant.numeric.proto" + } + }, + "end": "(;)", + "endCaptures": { + "1": { + "name": "punctuation.terminator.proto" + } + }, + "patterns": [ + { + "include": "#fieldOptions" + } + ] + }, + "oneof": { + "begin": "(oneof)\\s+([A-Za-z][A-Za-z0-9_]*)\\s*\\{?", + "beginCaptures": { + "1": { + "name": "keyword.other.proto" + }, + "2": { + "name": "variable.other.proto" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#optionStmt" + }, + { + "include": "#comments" + }, + { + "include": "#field" + } + ] + }, + "enum": { + "begin": "(enum)(\\s+)([A-Za-z][A-Za-z0-9_]*)(\\s*)(\\{)?", + "beginCaptures": { + "1": { + "name": "keyword.other.proto" + }, + "3": { + "name": "entity.name.class.proto" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#reserved" + }, + { + "include": "#optionStmt" + }, + { + "include": "#comments" + }, + { + "begin": "([A-Za-z][A-Za-z0-9_]*)\\s*(=)\\s*(0[xX][0-9a-fA-F]+|[0-9]+)", + "beginCaptures": { + "1": { + "name": "variable.other.proto" + }, + "2": { + "name": "keyword.operator.assignment.proto" + }, + "3": { + "name": "constant.numeric.proto" + } + }, + "end": "(;)", + "endCaptures": { + "1": { + "name": "punctuation.terminator.proto" + } + }, + "patterns": [ + { + "include": "#fieldOptions" + } + ] + } + ] + }, + "service": { + "begin": "(service)\\s+([A-Za-z][A-Za-z0-9_.]*)\\s*\\{?", + "beginCaptures": { + "1": { + "name": "keyword.other.proto" + }, + "2": { + "name": "entity.name.class.message.proto" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#optionStmt" + }, + { + "include": "#method" + } + ] + }, + "method": { + "begin": "(rpc)\\s+([A-Za-z][A-Za-z0-9_]*)", + "beginCaptures": { + "1": { + "name": "keyword.other.proto" + }, + "2": { + "name": "entity.name.function" + } + }, + "end": "\\}|(;)", + "endCaptures": { + "1": { + "name": "punctuation.terminator.proto" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#optionStmt" + }, + { + "include": "#rpcKeywords" + }, + { + "include": "#ident" + } + ] + }, + "rpcKeywords": { + "match": "\\b(stream|returns)\\b", + "name": "keyword.other.proto" + }, + "ident": { + "match": "[A-Za-z][A-Za-z0-9_]*", + "name": "entity.name.class.proto" + }, + "constants": { + "match": "\\b(true|false|max|[A-Z_]+)\\b", + "name": "constant.language.proto" + }, + "storagetypes": { + "match": "\\b(double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes)\\b", + "name": "storage.type.proto" + }, + "string": { + "match": "('([^']|\\')*')|(\"([^\"]|\\\")*\")", + "name": "string.quoted.double.proto" + }, + "number": { + "name": "constant.numeric.proto", + "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b" + } + } +} diff --git a/src/lib/shiki/languages/pug.tmLanguage.json b/src/lib/shiki/languages/pug.tmLanguage.json new file mode 100644 index 0000000..44700bc --- /dev/null +++ b/src/lib/shiki/languages/pug.tmLanguage.json @@ -0,0 +1,1038 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/davidrios/pug-tmbundle/blob/master/Syntaxes/Pug.JSON-tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/davidrios/pug-tmbundle/commit/ae1dd60ca4aa4b45617f236d584216cd8d19eecf", + "name": "pug", + "scopeName": "text.pug", + "patterns": [ + { + "match": "^(!!!|doctype)(\\s*[a-zA-Z0-9-_]+)?", + "name": "meta.tag.sgml.doctype.html", + "comment": "Doctype declaration." + }, + { + "begin": "^(\\s*)//-", + "end": "^(?!(\\1\\s)|\\s*$)", + "name": "comment.unbuffered.block.pug", + "comment": "Unbuffered (pug-only) comments." + }, + { + "begin": "^(\\s*)//", + "end": "^(?!(\\1\\s)|\\s*$)", + "name": "string.comment.buffered.block.pug", + "comment": "Buffered (html) comments.", + "patterns": [ + { + "captures": { + "1": { + "name": "invalid.illegal.comment.comment.block.pug" + } + }, + "match": "^\\s*(//)(?!-)", + "name": "string.comment.buffered.block.pug", + "comment": "Buffered comments inside buffered comments will generate invalid html." + } + ] + }, + { + "begin": "<!--", + "end": "--\\s*>", + "name": "comment.unbuffered.block.pug", + "patterns": [ + { + "match": "--", + "name": "invalid.illegal.comment.comment.block.pug" + } + ] + }, + { + "begin": "^(\\s*)-$", + "end": "^(?!(\\1\\s)|\\s*$)", + "name": "source.js", + "comment": "Unbuffered code block.", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "begin": "^(\\s*)(script)((\\.$)|(?=[^\\n]*((text|application)/javascript|module).*\\.$))", + "beginCaptures": { + "2": { + "name": "entity.name.tag.pug" + } + }, + "end": "^(?!(\\1\\s)|\\s*$)", + "name": "meta.tag.other", + "comment": "Script tag with JavaScript code.", + "patterns": [ + { + "begin": "\\G(?=\\()", + "end": "$", + "patterns": [ + { + "include": "#tag_attributes" + } + ] + }, + { + "begin": "\\G(?=[.#])", + "end": "$", + "patterns": [ + { + "include": "#complete_tag" + } + ] + }, + { + "include": "source.js" + } + ] + }, + { + "begin": "^(\\s*)(style)((\\.$)|(?=[.#(].*\\.$))", + "beginCaptures": { + "2": { + "name": "entity.name.tag.pug" + } + }, + "end": "^(?!(\\1\\s)|\\s*$)", + "name": "meta.tag.other", + "comment": "Style tag with CSS code.", + "patterns": [ + { + "begin": "\\G(?=\\()", + "end": "$", + "patterns": [ + { + "include": "#tag_attributes" + } + ] + }, + { + "begin": "\\G(?=[.#])", + "end": "$", + "patterns": [ + { + "include": "#complete_tag" + } + ] + }, + { + "include": "source.css" + } + ] + }, + { + "begin": "^(\\s*):(sass)(?=\\(|$)", + "beginCaptures": { + "2": { + "name": "constant.language.name.sass.filter.pug" + } + }, + "end": "^(?!(\\1\\s)|\\s*$)", + "name": "source.sass.filter.pug", + "patterns": [ + { + "include": "#tag_attributes" + }, + { + "include": "source.sass" + } + ] + }, + { + "begin": "^(\\s*):(scss)(?=\\(|$)", + "beginCaptures": { + "2": { + "name": "constant.language.name.scss.filter.pug" + } + }, + "end": "^(?!(\\1\\s)|\\s*$)", + "name": "source.css.scss.filter.pug", + "patterns": [ + { + "include": "#tag_attributes" + }, + { + "include": "source.css.scss" + } + ] + }, + { + "begin": "^(\\s*):(less)(?=\\(|$)", + "beginCaptures": { + "2": { + "name": "constant.language.name.less.filter.pug" + } + }, + "end": "^(?!(\\1\\s)|\\s*$)", + "name": "source.less.filter.pug", + "patterns": [ + { + "include": "#tag_attributes" + }, + { + "include": "source.less" + } + ] + }, + { + "begin": "^(\\s*):(stylus)(?=\\(|$)", + "beginCaptures": { + "2": { + "name": "constant.language.name.stylus.filter.pug" + } + }, + "end": "^(?!(\\1\\s)|\\s*$)", + "patterns": [ + { + "include": "#tag_attributes" + }, + { + "include": "source.stylus" + } + ] + }, + { + "begin": "^(\\s*):(coffee(-?script)?)(?=\\(|$)", + "beginCaptures": { + "2": { + "name": "constant.language.name.coffeescript.filter.pug" + } + }, + "end": "^(?!(\\1\\s)|\\s*$)", + "name": "source.coffeescript.filter.pug", + "patterns": [ + { + "include": "#tag_attributes" + }, + { + "include": "source.coffee" + } + ] + }, + { + "begin": "^(\\s*):(uglify-js)(?=\\(|$)", + "beginCaptures": { + "2": { + "name": "constant.language.name.js.filter.pug" + } + }, + "end": "^(?!(\\1\\s)|\\s*$)", + "name": "source.js.filter.pug", + "patterns": [ + { + "include": "#tag_attributes" + }, + { + "include": "source.js" + } + ] + }, + { + "begin": "^(\\s*)((:(?=.))|(:$))", + "beginCaptures": { + "4": { + "name": "invalid.illegal.empty.generic.filter.pug" + } + }, + "end": "^(?!(\\1\\s)|\\s*$)", + "comment": "Generic Pug filter.", + "patterns": [ + { + "begin": "\\G(?<=:)(?=.)", + "end": "$", + "name": "name.generic.filter.pug", + "patterns": [ + { + "match": "\\G\\(", + "name": "invalid.illegal.name.generic.filter.pug" + }, + { + "match": "[\\w-]", + "name": "constant.language.name.generic.filter.pug" + }, + { + "include": "#tag_attributes" + }, + { + "match": "\\W", + "name": "invalid.illegal.name.generic.filter.pug" + } + ] + } + ] + }, + { + "begin": "^(\\s*)(?:(?=\\.$)|(?:(?=[\\w.#].*?\\.$)(?=(?:(?:(?:(?:(?:#[\\w-]+)|(?:\\.[\\w-]+))|(?:(?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))(?:(?:#[\\w-]+)|(?:\\.[\\w-]+)|(?:\\((?:[^()\\'\\\"]*(?:(?:\\'(?:[^\\']|(?:(?<!\\\\)\\\\\\'))*\\')|(?:\\\"(?:[^\\\"]|(?:(?<!\\\\)\\\\\\\"))*\\\")))*[^()]*\\))*)*)(?:(?:(?::\\s+)|(?<=\\)))(?:(?:(?:(?:#[\\w-]+)|(?:\\.[\\w-]+))|(?:(?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))(?:(?:#[\\w-]+)|(?:\\.[\\w-]+)|(?:\\((?:[^()\\'\\\"]*(?:(?:\\'(?:[^\\']|(?:(?<!\\\\)\\\\\\'))*\\')|(?:\\\"(?:[^\\\"]|(?:(?<!\\\\)\\\\\\\"))*\\\")))*[^()]*\\))*)*))*)\\.$)(?:(?:(#[\\w-]+)|(\\.[\\w-]+))|((?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))))", + "beginCaptures": { + "2": { + "name": "meta.selector.css entity.other.attribute-name.id.css.pug" + }, + "3": { + "name": "meta.selector.css entity.other.attribute-name.class.css.pug" + }, + "4": { + "name": "meta.tag.other entity.name.tag.pug" + } + }, + "end": "^(?!(\\1\\s)|\\s*$)", + "comment": "Generated from dot_block_tag.py", + "patterns": [ + { + "match": "\\.$", + "name": "storage.type.function.pug.dot-block-dot" + }, + { + "include": "#tag_attributes" + }, + { + "include": "#complete_tag" + }, + { + "begin": "^(?=.)", + "end": "$", + "name": "text.block.pug", + "patterns": [ + { + "include": "#inline_pug" + }, + { + "include": "#embedded_html" + }, + { + "include": "#html_entity" + }, + { + "include": "#interpolated_value" + }, + { + "include": "#interpolated_error" + } + ] + } + ] + }, + { + "begin": "^\\s*", + "end": "$", + "comment": "All constructs that generally span a single line starting with any number of white-spaces.", + "patterns": [ + { + "include": "#inline_pug" + }, + { + "include": "#blocks_and_includes" + }, + { + "include": "#unbuffered_code" + }, + { + "include": "#mixin_definition" + }, + { + "include": "#mixin_call" + }, + { + "include": "#flow_control" + }, + { + "include": "#flow_control_each" + }, + { + "include": "#case_conds" + }, + { + "begin": "\\|", + "end": "$", + "name": "text.block.pipe.pug", + "comment": "Tag pipe text line.", + "patterns": [ + { + "include": "#inline_pug" + }, + { + "include": "#embedded_html" + }, + { + "include": "#html_entity" + }, + { + "include": "#interpolated_value" + }, + { + "include": "#interpolated_error" + } + ] + }, + { + "include": "#printed_expression" + }, + { + "begin": "\\G(?=(#[^\\{\\w-])|[^\\w.#])", + "end": "$", + "comment": "Line starting with characters incompatible with tag name/id/class is standalone text.", + "patterns": [ + { + "begin": "</?(?=[!#])", + "end": ">|$", + "patterns": [ + { + "include": "#inline_pug" + }, + { + "include": "#interpolated_value" + }, + { + "include": "#interpolated_error" + } + ] + }, + { + "include": "#inline_pug" + }, + { + "include": "#embedded_html" + }, + { + "include": "#html_entity" + }, + { + "include": "#interpolated_value" + }, + { + "include": "#interpolated_error" + } + ] + }, + { + "include": "#complete_tag" + } + ] + } + ], + "repository": { + "blocks_and_includes": { + "captures": { + "1": { + "name": "storage.type.import.include.pug" + }, + "4": { + "name": "variable.control.import.include.pug" + } + }, + "match": "(extends|include|yield|append|prepend|block( (append|prepend))?)\\s+(.*)$", + "name": "meta.first-class.pug", + "comment": "Template blocks and includes." + }, + "unbuffered_code": { + "begin": "(-|(([a-zA-Z0-9_]+)\\s+=))", + "beginCaptures": { + "3": { + "name": "variable.parameter.javascript.embedded.pug" + } + }, + "end": "(?=\\])|(({\\s*)?$)", + "name": "source.js", + "comment": "name = function() {}", + "patterns": [ + { + "include": "#js_brackets" + }, + { + "include": "#babel_parens" + }, + { + "include": "source.js" + } + ] + }, + "mixin_definition": { + "match": "(mixin\\s+)([\\w-]+)(?:(\\()\\s*((?:[a-zA-Z_]\\w*\\s*)(?:,\\s*[a-zA-Z_]\\w*\\s*)*)(\\)))?$", + "captures": { + "1": { + "name": "storage.type.function.pug" + }, + "2": { + "name": "meta.tag.other entity.name.function.pug" + }, + "3": { + "name": "punctuation.definition.parameters.begin.js" + }, + "4": { + "name": "variable.parameter.function.js" + }, + "5": { + "name": "punctuation.definition.parameters.begin.js" + } + } + }, + "mixin_call": { + "begin": "((?:mixin\\s+)|\\+)([\\w-]+)", + "beginCaptures": { + "1": { + "name": "storage.type.function.pug" + }, + "2": { + "name": "meta.tag.other entity.name.function.pug" + } + }, + "end": "(?!\\()|$", + "patterns": [ + { + "begin": "(?<!\\))\\(", + "end": "\\)", + "name": "args.mixin.pug", + "patterns": [ + { + "include": "#js_parens" + }, + { + "match": "([^\\s(),=/]+)\\s*=\\s*", + "captures": { + "1": { + "name": "meta.tag.other entity.other.attribute-name.tag.pug" + } + } + }, + { + "include": "source.js" + } + ] + }, + { + "include": "#tag_attributes" + } + ] + }, + "flow_control": { + "begin": "(for|if|else if|else|until|while|unless|case)(\\s+|$)", + "captures": { + "1": { + "name": "storage.type.function.pug" + } + }, + "end": "$", + "name": "meta.control.flow.pug", + "comment": "Pug control flow.", + "patterns": [ + { + "begin": "", + "end": "$", + "name": "js.embedded.control.flow.pug", + "patterns": [ + { + "include": "source.js" + } + ] + } + ] + }, + "flow_control_each": { + "begin": "(each)(\\s+|$)", + "captures": { + "1": { + "name": "storage.type.function.pug" + } + }, + "end": "$", + "name": "meta.control.flow.pug.each", + "patterns": [ + { + "match": "([\\w$_]+)(?:\\s*,\\s*([\\w$_]+))?", + "name": "variable.other.pug.each-var" + }, + { + "begin": "", + "end": "$", + "name": "js.embedded.control.flow.pug", + "patterns": [ + { + "include": "source.js" + } + ] + } + ] + }, + "case_when_paren": { + "begin": "\\(", + "end": "\\)", + "name": "js.when.control.flow.pug", + "patterns": [ + { + "include": "#case_when_paren" + }, + { + "match": ":", + "name": "invalid.illegal.name.tag.pug" + }, + { + "include": "source.js" + } + ] + }, + "case_conds": { + "begin": "(default|when)((\\s+|(?=:))|$)", + "captures": { + "1": { + "name": "storage.type.function.pug" + } + }, + "end": "$", + "name": "meta.control.flow.pug", + "comment": "Pug case conditionals.", + "patterns": [ + { + "begin": "\\G(?!:)", + "end": "(?=:\\s+)|$", + "name": "js.embedded.control.flow.pug", + "patterns": [ + { + "include": "#case_when_paren" + }, + { + "include": "source.js" + } + ] + }, + { + "begin": ":\\s+", + "end": "$", + "name": "tag.case.control.flow.pug", + "patterns": [ + { + "include": "#complete_tag" + } + ] + } + ] + }, + "complete_tag": { + "begin": "(?=[\\w.#])|(:\\s*)", + "end": "(\\.?$)|(?=:.)", + "endCaptures": { + "1": { + "name": "storage.type.function.pug.dot-block-dot" + } + }, + "patterns": [ + { + "include": "#blocks_and_includes" + }, + { + "include": "#unbuffered_code" + }, + { + "include": "#mixin_call" + }, + { + "include": "#flow_control" + }, + { + "include": "#flow_control_each" + }, + { + "match": "(?<=:)\\w.*$", + "name": "invalid.illegal.name.tag.pug" + }, + { + "include": "#tag_name" + }, + { + "include": "#tag_id" + }, + { + "include": "#tag_classes" + }, + { + "include": "#tag_attributes" + }, + { + "include": "#tag_mixin_attributes" + }, + { + "match": "((\\.)\\s+$)|((:)\\s*$)", + "captures": { + "2": { + "name": "invalid.illegal.end.tag.pug" + }, + "4": { + "name": "invalid.illegal.end.tag.pug" + } + } + }, + { + "include": "#printed_expression" + }, + { + "include": "#tag_text" + } + ] + }, + "tag_name": { + "begin": "([#!]\\{(?=.*?\\}))|(\\w(([\\w:-]+[\\w-])|([\\w-]*)))", + "end": "(\\G(?<!\\5[^\\w-]))|\\}|$", + "name": "meta.tag.other entity.name.tag.pug", + "patterns": [ + { + "begin": "\\G(?<=\\{)", + "end": "(?=\\})", + "name": "meta.tag.other entity.name.tag.pug", + "patterns": [ + { + "match": "{", + "name": "invalid.illegal.tag.pug" + }, + { + "include": "source.js" + } + ] + } + ] + }, + "tag_id": { + "match": "#[\\w-]+", + "name": "meta.selector.css entity.other.attribute-name.id.css.pug" + }, + "tag_classes": { + "match": "\\.([^\\w-])?[\\w-]*", + "captures": { + "1": { + "name": "invalid.illegal.tag.pug" + } + }, + "name": "meta.selector.css entity.other.attribute-name.class.css.pug" + }, + "tag_attributes": { + "begin": "(\\(\\s*)", + "captures": { + "1": { + "name": "constant.name.attribute.tag.pug" + } + }, + "end": "(\\))", + "name": "meta.tag.other", + "patterns": [ + { + "include": "#tag_attribute_name_paren" + }, + { + "include": "#tag_attribute_name" + }, + { + "match": "!(?!=)", + "name": "invalid.illegal.tag.pug" + }, + { + "begin": "=\\s*", + "end": "$|(?=,|(?:\\s+[^!%&*\\-+~|<>?/])|\\))", + "name": "attribute_value", + "patterns": [ + { + "include": "#js_parens" + }, + { + "include": "#js_brackets" + }, + { + "include": "#js_braces" + }, + { + "include": "source.js" + } + ] + }, + { + "begin": "(?<=[%&*\\-+~|<>:?/])\\s+", + "end": "$|(?=,|(?:\\s+[^!%&*\\-+~|<>?/])|\\))", + "name": "attribute_value2", + "patterns": [ + { + "include": "#js_parens" + }, + { + "include": "#js_brackets" + }, + { + "include": "#js_braces" + }, + { + "include": "source.js" + } + ] + } + ] + }, + "tag_attribute_name": { + "match": "([^\\s(),=/!]+)\\s*", + "captures": { + "1": { + "name": "entity.other.attribute-name.tag.pug" + } + } + }, + "tag_attribute_name_paren": { + "begin": "\\(\\s*", + "end": "\\)", + "name": "entity.other.attribute-name.tag.pug", + "patterns": [ + { + "include": "#tag_attribute_name_paren" + }, + { + "include": "#tag_attribute_name" + } + ] + }, + "tag_mixin_attributes": { + "begin": "(&attributes\\()", + "captures": { + "1": { + "name": "entity.name.function.pug" + } + }, + "end": "(\\))", + "name": "meta.tag.other", + "patterns": [ + { + "match": "attributes(?=\\))", + "name": "storage.type.keyword.pug" + }, + { + "include": "source.js" + } + ] + }, + "tag_text": { + "begin": "(?=.)", + "end": "$", + "patterns": [ + { + "include": "#inline_pug" + }, + { + "include": "#embedded_html" + }, + { + "include": "#html_entity" + }, + { + "include": "#interpolated_value" + }, + { + "include": "#interpolated_error" + } + ] + }, + "inline_pug_text": { + "begin": "", + "end": "(?=\\])", + "patterns": [ + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#inline_pug_text" + } + ] + }, + { + "include": "#inline_pug" + }, + { + "include": "#embedded_html" + }, + { + "include": "#html_entity" + }, + { + "include": "#interpolated_value" + }, + { + "include": "#interpolated_error" + } + ] + }, + "inline_pug": { + "begin": "(?<!\\\\)(#\\[)", + "captures": { + "1": { + "name": "entity.name.function.pug" + }, + "2": { + "name": "entity.name.function.pug" + } + }, + "end": "(\\])", + "name": "inline.pug", + "patterns": [ + { + "include": "#inline_pug" + }, + { + "include": "#mixin_call" + }, + { + "begin": "(?<!\\])(?=[\\w.#])|(:\\s*)", + "end": "(?=\\]|(:.)|=|\\s)", + "name": "tag.inline.pug", + "patterns": [ + { + "include": "#tag_name" + }, + { + "include": "#tag_id" + }, + { + "include": "#tag_classes" + }, + { + "include": "#tag_attributes" + }, + { + "include": "#tag_mixin_attributes" + }, + { + "include": "#inline_pug" + }, + { + "match": "\\[", + "name": "invalid.illegal.tag.pug" + } + ] + }, + { + "include": "#unbuffered_code" + }, + { + "include": "#printed_expression" + }, + { + "match": "\\[", + "name": "invalid.illegal.tag.pug" + }, + { + "include": "#inline_pug_text" + } + ] + }, + "html_entity": { + "patterns": [ + { + "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", + "name": "constant.character.entity.html.text.pug" + }, + { + "match": "[<>&]", + "name": "invalid.illegal.html_entity.text.pug" + } + ] + }, + "interpolated_value": { + "begin": "(?<!\\\\)[#!]\\{(?=.*?\\})", + "end": "\\}", + "name": "string.interpolated.pug", + "patterns": [ + { + "match": "{", + "name": "invalid.illegal.tag.pug" + }, + { + "include": "source.js" + } + ] + }, + "interpolated_error": { + "match": "(?<!\\\\)[#!]\\{(?=[^}]*$)", + "name": "invalid.illegal.tag.pug" + }, + "printed_expression": { + "begin": "(!?\\=)\\s*", + "captures": { + "1": { + "name": "constant" + } + }, + "end": "(?=\\])|$", + "name": "source.js", + "patterns": [ + { + "include": "#js_brackets" + }, + { + "include": "source.js" + } + ] + }, + "embedded_html": { + "begin": "(?=<[^>]*>)", + "end": "$|(?=>)", + "name": "html", + "patterns": [ + { + "include": "text.html.basic" + }, + { + "include": "#interpolated_value" + }, + { + "include": "#interpolated_error" + } + ] + }, + "js_parens": { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#js_parens" + }, + { + "include": "source.js" + } + ] + }, + "js_brackets": { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#js_brackets" + }, + { + "include": "source.js" + } + ] + }, + "js_braces": { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#js_braces" + }, + { + "include": "source.js" + } + ] + }, + "babel_parens": { + "begin": "\\(", + "end": "\\)|(({\\s*)?$)", + "patterns": [ + { + "include": "#babel_parens" + }, + { + "include": "source.js" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/puppet.tmLanguage.json b/src/lib/shiki/languages/puppet.tmLanguage.json new file mode 100644 index 0000000..ad50dd4 --- /dev/null +++ b/src/lib/shiki/languages/puppet.tmLanguage.json @@ -0,0 +1,774 @@ +{ + "scopeName": "source.puppet", + "fileTypes": ["pp"], + "foldingStartMarker": "(^\\s*/\\*|(\\{|\\[|\\()\\s*$)", + "foldingStopMarker": "(\\*/|^\\s*(\\}|\\]|\\)))", + "name": "puppet", + "patterns": [ + { + "include": "#line_comment" + }, + { + "include": "#constants" + }, + { + "begin": "^\\s*/\\*", + "end": "\\*/", + "name": "comment.block.puppet" + }, + { + "begin": "\\b(node)\\b", + "captures": { + "1": { + "name": "storage.type.puppet" + }, + "2": { + "name": "entity.name.type.class.puppet" + } + }, + "end": "(?={)", + "name": "meta.definition.class.puppet", + "patterns": [ + { + "match": "\\bdefault\\b", + "name": "keyword.puppet" + }, + { + "include": "#strings" + }, + { + "include": "#regex-literal" + } + ] + }, + { + "begin": "\\b(class)\\s+((?#Qualified Resource Name)(?:[a-z][a-z0-9_]*)?(?:::[a-z][a-z0-9_]*)+|(?#Bareword Resource Name)[a-z][a-z0-9_]*)\\s*", + "captures": { + "1": { + "name": "storage.type.puppet" + }, + "2": { + "name": "entity.name.type.class.puppet" + } + }, + "end": "(?={)", + "name": "meta.definition.class.puppet", + "patterns": [ + { + "begin": "\\b(inherits)\\b\\s+", + "captures": { + "1": { + "name": "storage.modifier.puppet" + } + }, + "end": "(?=\\(|{)", + "name": "meta.definition.class.inherits.puppet", + "patterns": [ + { + "match": "\\b((?:[-_A-Za-z0-9\".]+::)*[-_A-Za-z0-9\".]+)\\b", + "name": "support.type.puppet" + } + ] + }, + { + "include": "#line_comment" + }, + { + "include": "#resource-parameters" + }, + { + "include": "#parameter-default-types" + } + ] + }, + { + "begin": "^\\s*(plan)\\s+((?#Qualified Resource Name)(?:[a-z][a-z0-9_]*)?(?:::[a-z][a-z0-9_]*)+|(?#Bareword Resource Name)[a-z][a-z0-9_]*)\\s*", + "captures": { + "1": { + "name": "storage.type.puppet" + }, + "2": { + "name": "entity.name.type.plan.puppet" + } + }, + "end": "(?={)", + "name": "meta.definition.plan.puppet", + "patterns": [ + { + "include": "#line_comment" + }, + { + "include": "#resource-parameters" + }, + { + "include": "#parameter-default-types" + } + ] + }, + { + "begin": "^\\s*(define|function)\\s+((?#Bareword Resource Name)[a-z][a-z0-9_]*|(?#Qualified Resource Name)(?:[a-z][a-z0-9_]*)?(?:::[a-z][a-z0-9_]*)+)\\s*(\\()", + "captures": { + "1": { + "name": "storage.type.function.puppet" + }, + "2": { + "name": "entity.name.function.puppet" + } + }, + "end": "(?={)", + "name": "meta.function.puppet", + "patterns": [ + { + "include": "#line_comment" + }, + { + "include": "#resource-parameters" + }, + { + "include": "#parameter-default-types" + } + ] + }, + { + "match": "\\b(case|else|elsif|if|unless)(?!::)\\b", + "captures": { + "1": { + "name": "keyword.control.puppet" + } + } + }, + { + "include": "#keywords" + }, + { + "include": "#resource-definition" + }, + { + "include": "#heredoc" + }, + { + "include": "#strings" + }, + { + "include": "#puppet-datatypes" + }, + { + "include": "#array" + }, + { + "match": "((\\$?)\"?[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*\"?):(?=\\s+|$)", + "name": "entity.name.section.puppet" + }, + { + "include": "#numbers" + }, + { + "include": "#variable" + }, + { + "begin": "\\b(import|include|contain|require)\\s+(?!.*=>)", + "beginCaptures": { + "1": { + "name": "keyword.control.import.include.puppet" + } + }, + "end": "(?=\\s|$)", + "contentName": "variable.parameter.include.puppet", + "name": "meta.include.puppet" + }, + { + "match": "\\b\\w+\\s*(?==>)\\s*", + "name": "constant.other.key.puppet" + }, + { + "match": "(?<={)\\s*\\w+\\s*(?=})", + "name": "constant.other.bareword.puppet" + }, + { + "match": "\\b(alert|crit|debug|defined|emerg|err|escape|fail|failed|file|generate|gsub|info|notice|package|realize|search|tag|tagged|template|warning)\\b(?!.*{)", + "name": "support.function.puppet" + }, + { + "match": "=>", + "name": "punctuation.separator.key-value.puppet" + }, + { + "match": "->", + "name": "keyword.control.orderarrow.puppet" + }, + { + "match": "~>", + "name": "keyword.control.notifyarrow.puppet" + }, + { + "include": "#regex-literal" + } + ], + "repository": { + "constants": { + "patterns": [ + { + "match": "\\b(absent|directory|false|file|present|running|stopped|true)\\b(?!.*{)", + "name": "constant.language.puppet" + } + ] + }, + "double-quoted-string": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.puppet" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.puppet" + } + }, + "name": "string.quoted.double.interpolated.puppet", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_puppet" + } + ] + }, + "interpolated_puppet": { + "patterns": [ + { + "begin": "(\\${)(\\d+)", + "beginCaptures": { + "1": { + "name": "punctuation.section.embedded.begin.puppet" + }, + "2": { + "name": "source.puppet variable.other.readwrite.global.pre-defined.puppet" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.puppet" + } + }, + "contentName": "source.puppet", + "name": "meta.embedded.line.puppet", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "(\\${)(_[a-zA-Z0-9_]*)", + "beginCaptures": { + "1": { + "name": "punctuation.section.embedded.begin.puppet" + }, + "2": { + "name": "source.puppet variable.other.readwrite.global.puppet" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.puppet" + } + }, + "contentName": "source.puppet", + "name": "meta.embedded.line.puppet", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "(\\${)(([a-z][a-z0-9_]*)?(?:::[a-z][a-z0-9_]*)*)", + "beginCaptures": { + "1": { + "name": "punctuation.section.embedded.begin.puppet" + }, + "2": { + "name": "source.puppet variable.other.readwrite.global.puppet" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.puppet" + } + }, + "contentName": "source.puppet", + "name": "meta.embedded.line.puppet", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\${", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.puppet" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.puppet" + } + }, + "contentName": "source.puppet", + "name": "meta.embedded.line.puppet", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "escaped_char": { + "match": "\\\\.", + "name": "constant.character.escape.puppet" + }, + "line_comment": { + "patterns": [ + { + "captures": { + "1": { + "name": "comment.line.number-sign.puppet" + }, + "2": { + "name": "punctuation.definition.comment.puppet" + } + }, + "match": "^((#).*$\\n?)", + "name": "meta.comment.full-line.puppet" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.comment.puppet" + } + }, + "match": "(#).*$\\n?", + "name": "comment.line.number-sign.puppet" + } + ] + }, + "nested_braces": { + "begin": "\\{", + "captures": { + "1": { + "name": "punctuation.section.scope.puppet" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_braces" + } + ] + }, + "nested_braces_interpolated": { + "begin": "\\{", + "captures": { + "1": { + "name": "punctuation.section.scope.puppet" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_braces_interpolated" + } + ] + }, + "nested_brackets": { + "begin": "\\[", + "captures": { + "1": { + "name": "punctuation.section.scope.puppet" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_brackets" + } + ] + }, + "nested_brackets_interpolated": { + "begin": "\\[", + "captures": { + "1": { + "name": "punctuation.section.scope.puppet" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_brackets_interpolated" + } + ] + }, + "nested_parens": { + "begin": "\\(", + "captures": { + "1": { + "name": "punctuation.section.scope.puppet" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#nested_parens" + } + ] + }, + "nested_parens_interpolated": { + "begin": "\\(", + "captures": { + "1": { + "name": "punctuation.section.scope.puppet" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#variable" + }, + { + "include": "#nested_parens_interpolated" + } + ] + }, + "parameter-default-types": { + "patterns": [ + { + "include": "#strings" + }, + { + "include": "#numbers" + }, + { + "include": "#variable" + }, + { + "include": "#hash" + }, + { + "include": "#array" + }, + { + "include": "#function_call" + }, + { + "include": "#constants" + }, + { + "include": "#puppet-datatypes" + } + ] + }, + "resource-parameters": { + "patterns": [ + { + "captures": { + "1": { + "name": "variable.other.puppet" + }, + "2": { + "name": "punctuation.definition.variable.puppet" + } + }, + "match": "((\\$+)[a-zA-Z_][a-zA-Z0-9_]*)\\s*(?=,|\\))", + "name": "meta.function.argument.puppet" + }, + { + "begin": "((\\$+)[a-zA-Z_][a-zA-Z0-9_]*)(?:\\s*(=)\\s*)\\s*", + "captures": { + "1": { + "name": "variable.other.puppet" + }, + "2": { + "name": "punctuation.definition.variable.puppet" + }, + "3": { + "name": "keyword.operator.assignment.puppet" + } + }, + "end": "(?=,|\\))", + "name": "meta.function.argument.puppet", + "patterns": [ + { + "include": "#parameter-default-types" + } + ] + } + ] + }, + "array": { + "begin": "(\\[)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.array.begin.puppet" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.puppet" + } + }, + "name": "meta.array.puppet", + "patterns": [ + { + "match": "\\s*,\\s*" + }, + { + "include": "#parameter-default-types" + }, + { + "include": "#line_comment" + } + ] + }, + "hash": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.hash.begin.puppet" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.hash.end.puppet" + } + }, + "name": "meta.hash.puppet", + "patterns": [ + { + "match": "\\b\\w+\\s*(?==>)\\s*", + "name": "constant.other.key.puppet" + }, + { + "include": "#parameter-default-types" + }, + { + "include": "#line_comment" + } + ] + }, + "single-quoted-string": { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.puppet" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.puppet" + } + }, + "name": "string.quoted.single.puppet", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + "strings": { + "patterns": [ + { + "include": "#double-quoted-string" + }, + { + "include": "#single-quoted-string" + } + ] + }, + "keywords": { + "match": "\\b(undef)\\b", + "captures": { + "1": { + "name": "keyword.puppet" + } + } + }, + "numbers": { + "patterns": [ + { + "comment": "HEX 0x 0-f", + "match": "(?<!\\w|\\d)([-+]?)(?i:0x)(?i:[0-9a-f])+(?!\\w|\\d)", + "name": "constant.numeric.hexadecimal.puppet" + }, + { + "comment": "INTEGERS [(+|-)] digits [e [(+|-)] digits]", + "match": "(?<!\\w|\\.)([-+]?)(?<!\\d)\\d+(?i:e(\\+|-){0,1}\\d+){0,1}(?!\\w|\\d|\\.)", + "name": "constant.numeric.integer.puppet" + }, + { + "comment": "FLOAT [(+|-)] digits . digits [e [(+|-)] digits]", + "match": "(?<!\\w)([-+]?)\\d+\\.\\d+(?i:e(\\+|-){0,1}\\d+){0,1}(?!\\w|\\d)", + "name": "constant.numeric.integer.puppet" + } + ] + }, + "resource-definition": { + "begin": "(?:^|\\b)((?#Toplevel Bareword)::[a-z][a-z0-9_]*|(?#Bareword Resource Name)[a-z][a-z0-9_]*|(?#Qualified Resource Name)(?:[a-z][a-z0-9_]*)?(?:::[a-z][a-z0-9_]*)+)\\s*({)\\s*", + "beginCaptures": { + "1": { + "name": "meta.definition.resource.puppet storage.type.puppet" + } + }, + "end": ":", + "contentName": "entity.name.section.puppet", + "patterns": [ + { + "include": "#strings" + }, + { + "include": "#variable" + }, + { + "include": "#array" + } + ] + }, + "variable": { + "patterns": [ + { + "match": "(\\$)(\\d+)", + "name": "variable.other.readwrite.global.pre-defined.puppet", + "captures": { + "1": { + "name": "punctuation.definition.variable.puppet" + } + } + }, + { + "match": "(\\$)_[a-zA-Z0-9_]*", + "name": "variable.other.readwrite.global.puppet", + "captures": { + "1": { + "name": "punctuation.definition.variable.puppet" + } + } + }, + { + "match": "(\\$)(([a-z][a-zA-Z0-9_]*)?(?:::[a-z][a-zA-Z0-9_]*)*)", + "name": "variable.other.readwrite.global.puppet", + "captures": { + "1": { + "name": "punctuation.definition.variable.puppet" + } + } + } + ] + }, + "function_call": { + "begin": "([a-zA-Z_][a-zA-Z0-9_]*)(\\()", + "end": "\\)", + "name": "meta.function-call.puppet", + "patterns": [ + { + "include": "#parameter-default-types" + }, + { + "match": ",", + "name": "punctuation.separator.parameters.puppet" + } + ] + }, + "puppet-datatypes": { + "patterns": [ + { + "comment": "Puppet Data type", + "match": "(?<![a-zA-Z\\$])([A-Z][a-zA-Z0-9_]*)(?![a-zA-Z0-9_])", + "name": "storage.type.puppet" + } + ] + }, + "regex-literal": { + "match": "(\\/)(.+?)(?:[^\\\\]\\/)", + "name": "string.regexp.literal.puppet", + "comment": "Puppet Regular expression literal without interpolation" + }, + "heredoc": { + "patterns": [ + { + "begin": "@\\([[:blank:]]*\"([^:\\/) \\t]+)\"[[:blank:]]*(:[[:blank:]]*[a-z][a-zA-Z0-9_+]*[[:blank:]]*)?(\\/[[:blank:]]*[tsrnL$]*)?[[:blank:]]*\\)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.puppet" + } + }, + "end": "^[[:blank:]]*(\\|[[:blank:]]*-|\\||-)?[[:blank:]]*\\1", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.puppet" + } + }, + "name": "string.interpolated.heredoc.puppet", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_puppet" + } + ] + }, + { + "begin": "@\\([[:blank:]]*([^:\\/) \\t]+)[[:blank:]]*(:[[:blank:]]*[a-z][a-zA-Z0-9_+]*[[:blank:]]*)?(\\/[[:blank:]]*[tsrnL$]*)?[[:blank:]]*\\)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.puppet" + } + }, + "end": "^[[:blank:]]*(\\|[[:blank:]]*-|\\||-)?[[:blank:]]*\\1", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.puppet" + } + }, + "name": "string.unquoted.heredoc.puppet" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/purescript.tmLanguage.json b/src/lib/shiki/languages/purescript.tmLanguage.json new file mode 100644 index 0000000..333c6a0 --- /dev/null +++ b/src/lib/shiki/languages/purescript.tmLanguage.json @@ -0,0 +1,886 @@ +{ + "fileTypes": ["purs"], + "name": "purescript", + "scopeName": "source.purescript", + "macros": { + "functionNameOne": "[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*", + "classNameOne": "[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*", + "functionName": "(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*", + "className": "[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*", + "operatorChar": "[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]", + "operator": "[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+", + "operatorFun": "(?:\\((?!--+\\))[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+\\))", + "character": "(?:[ -\\[\\]-~]|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_]))", + "classConstraint": "(?:(?:([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*)\\s+)(?:(?<classConstraint>(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)(?:\\s*(?:\\s+)\\s*\\g<classConstraint>)?)))", + "functionTypeDeclaration": "([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)\\s*(::|∷)", + "ctorArgs": "(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:(?:[\\w()'→⇒\\[\\],]|->|=>)+\\s*)+)", + "ctor": "(?:(?:\\b([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*)\\s+)(?:(?<ctorArgs>(?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:(?:[\\w()'→⇒\\[\\],]|->|=>)+\\s*)+))(?:\\s*(?:\\s+)\\s*\\g<ctorArgs>)?)?))", + "typeDecl": ".+?", + "indentChar": "[ \\t]", + "indentBlockEnd": "^(?!\\1[ \\t]|[ \\t]*$)", + "maybeBirdTrack": "^" + }, + "patterns": [ + { + "name": "keyword.operator.function.infix.purescript", + "match": "(`)(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(`)", + "captures": { + "1": { + "name": "punctuation.definition.entity.purescript" + }, + "2": { + "name": "punctuation.definition.entity.purescript" + } + } + }, + { + "name": "meta.declaration.module.purescript", + "begin": "^\\s*\\b(module)(?!')\\b", + "end": "(where)", + "beginCaptures": { + "1": { + "name": "keyword.other.purescript" + } + }, + "endCaptures": { + "1": { + "name": "keyword.other.purescript" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#module_name" + }, + { + "include": "#module_exports" + }, + { + "name": "invalid.purescript", + "match": "[a-z]+" + } + ] + }, + { + "name": "meta.declaration.typeclass.purescript", + "begin": "^\\s*\\b(class)(?!')\\b", + "end": "\\b(where)\\b|$", + "beginCaptures": { + "1": { + "name": "storage.type.class.purescript" + } + }, + "endCaptures": { + "1": { + "name": "keyword.other.purescript" + } + }, + "patterns": [ + { + "include": "#type_signature" + } + ] + }, + { + "name": "meta.declaration.instance.purescript", + "begin": "^\\s*\\b(else\\s+)?(derive\\s+)?(newtype\\s+)?(instance)(?!')\\b", + "end": "\\b(where)\\b|$", + "contentName": "meta.type-signature.purescript", + "beginCaptures": { + "1": { + "name": "keyword.other.purescript" + }, + "2": { + "name": "keyword.other.purescript" + }, + "3": { + "name": "keyword.other.purescript" + }, + "4": { + "name": "keyword.other.purescript" + } + }, + "endCaptures": { + "1": { + "name": "keyword.other.purescript" + } + }, + "patterns": [ + { + "include": "#type_signature" + } + ] + }, + { + "name": "meta.foreign.data.purescript", + "begin": "^(\\s*)(foreign)\\s+(import)\\s+(data)\\s+([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)", + "end": "^(?!\\1[ \\t]|[ \\t]*$)", + "contentName": "meta.kind-signature.purescript", + "beginCaptures": { + "2": { + "name": "keyword.other.purescript" + }, + "3": { + "name": "keyword.other.purescript" + }, + "4": { + "name": "keyword.other.purescript" + }, + "5": { + "name": "entity.name.type.purescript" + }, + "6": { + "name": "keyword.other.double-colon.purescript" + } + }, + "patterns": [ + { + "include": "#double_colon" + }, + { + "include": "#kind_signature" + } + ] + }, + { + "name": "meta.foreign.purescript", + "begin": "^(\\s*)(foreign)\\s+(import)\\s+([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)", + "end": "^(?!\\1[ \\t]|[ \\t]*$)", + "contentName": "meta.type-signature.purescript", + "beginCaptures": { + "2": { + "name": "keyword.other.purescript" + }, + "3": { + "name": "keyword.other.purescript" + }, + "4": { + "name": "entity.name.function.purescript" + } + }, + "patterns": [ + { + "include": "#double_colon" + }, + { + "include": "#type_signature" + } + ] + }, + { + "name": "meta.import.purescript", + "begin": "^\\s*\\b(import)(?!')\\b", + "end": "($|(?=--))", + "beginCaptures": { + "1": { + "name": "keyword.other.purescript" + } + }, + "patterns": [ + { + "include": "#module_name" + }, + { + "include": "#module_exports" + }, + { + "match": "\\b(as|hiding)\\b", + "captures": { + "1": { + "name": "keyword.other.purescript" + } + } + } + ] + }, + { + "name": "meta.declaration.type.data.purescript", + "begin": "^(\\s)*(data|newtype)\\s+(.+?)\\s*(?=\\=|$)", + "end": "^(?!\\1[ \\t]|[ \\t]*$)", + "beginCaptures": { + "2": { + "name": "storage.type.data.purescript" + }, + "3": { + "name": "meta.type-signature.purescript", + "patterns": [ + { + "include": "#type_signature" + } + ] + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "match": "=", + "captures": { + "0": { + "name": "keyword.operator.assignment.purescript" + } + } + }, + { + "match": "(?:(?:\\b([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*)\\s+)(?:(?<ctorArgs>(?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:(?:[\\w()'→⇒\\[\\],]|->|=>)+\\s*)+))(?:\\s*(?:\\s+)\\s*\\g<ctorArgs>)?)?))", + "captures": { + "1": { + "patterns": [ + { + "include": "#data_ctor" + } + ] + }, + "2": { + "name": "meta.type-signature.purescript", + "patterns": [ + { + "include": "#type_signature" + } + ] + } + } + }, + { + "match": "\\|", + "captures": { + "0": { + "name": "punctuation.separator.pipe.purescript" + } + } + }, + { + "include": "#record_types" + } + ] + }, + { + "name": "meta.declaration.type.type.purescript", + "begin": "^(\\s)*(type)\\s+(.+?)\\s*(?=\\=|$)", + "end": "^(?!\\1[ \\t]|[ \\t]*$)", + "contentName": "meta.type-signature.purescript", + "beginCaptures": { + "2": { + "name": "storage.type.data.purescript" + }, + "3": { + "name": "meta.type-signature.purescript", + "patterns": [ + { + "include": "#type_signature" + } + ] + } + }, + "patterns": [ + { + "match": "=", + "captures": { + "0": { + "name": "keyword.operator.assignment.purescript" + } + } + }, + { + "include": "#type_signature" + }, + { + "include": "#record_types" + }, + { + "include": "#comments" + } + ] + }, + { + "name": "keyword.other.purescript", + "match": "^\\s*\\b(derive|where|data|type|newtype|infix[lr]?|foreign(\\s+import)?(\\s+data)?)(?!')\\b" + }, + { + "name": "entity.name.function.typed-hole.purescript", + "match": "\\?(?:[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)" + }, + { + "name": "storage.type.purescript", + "match": "^\\s*\\b(data|type|newtype)(?!')\\b" + }, + { + "name": "keyword.control.purescript", + "match": "\\b(do|ado|if|then|else|case|of|let|in)(?!('|\\s*(:|=)))\\b" + }, + { + "name": "constant.numeric.hex.purescript", + "match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F]+\\b(?!\\$)" + }, + { + "name": "constant.numeric.decimal.purescript", + "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)", + "captures": { + "0": { + "name": "constant.numeric.decimal.purescript" + }, + "1": { + "name": "meta.delimiter.decimal.period.purescript" + }, + "2": { + "name": "meta.delimiter.decimal.period.purescript" + }, + "3": { + "name": "meta.delimiter.decimal.period.purescript" + }, + "4": { + "name": "meta.delimiter.decimal.period.purescript" + }, + "5": { + "name": "meta.delimiter.decimal.period.purescript" + }, + "6": { + "name": "meta.delimiter.decimal.period.purescript" + } + } + }, + { + "name": "constant.language.boolean.purescript", + "match": "\\b(true|false)\\b" + }, + { + "name": "constant.numeric.purescript", + "match": "\\b(([0-9]+_?)*[0-9]+|0([xX][0-9a-fA-F]+|[oO][0-7]+))\\b" + }, + { + "name": "string.quoted.triple.purescript", + "begin": "\"\"\"", + "end": "\"\"\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.purescript" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.purescript" + } + } + }, + { + "name": "string.quoted.double.purescript", + "begin": "\"", + "end": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.purescript" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.purescript" + } + }, + "patterns": [ + { + "include": "#characters" + }, + { + "begin": "\\\\\\s", + "end": "\\\\", + "beginCaptures": { + "0": { + "name": "markup.other.escape.newline.begin.purescript" + } + }, + "endCaptures": { + "0": { + "name": "markup.other.escape.newline.end.purescript" + } + }, + "patterns": [ + { + "match": "\\S+", + "name": "invalid.illegal.character-not-allowed-here.purescript" + } + ] + } + ] + }, + { + "name": "markup.other.escape.newline.purescript", + "match": "\\\\$" + }, + { + "name": "string.quoted.single.purescript", + "match": "(')((?:[ -\\[\\]-~]|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_])))(')", + "captures": { + "1": { + "name": "punctuation.definition.string.begin.purescript" + }, + "2": { + "patterns": [ + { + "include": "#characters" + } + ] + }, + "7": { + "name": "punctuation.definition.string.end.purescript" + } + } + }, + { + "include": "#function_type_declaration" + }, + { + "match": "\\((?<paren>(?:[^()]|\\(\\g<paren>\\))*)(::|∷)(?<paren2>(?:[^()]|\\(\\g<paren2>\\))*)\\)", + "captures": { + "1": { + "patterns": [ + { + "include": "$self" + } + ] + }, + "2": { + "name": "keyword.other.double-colon.purescript" + }, + "3": { + "name": "meta.type-signature.purescript", + "patterns": [ + { + "include": "#type_signature" + } + ] + } + } + }, + { + "begin": "^(\\s*)(?:(::|∷))", + "beginCaptures": { + "2": { + "name": "keyword.other.double-colon.purescript" + } + }, + "end": "^(?!\\1[ \\t]*|[ \\t]*$)", + "patterns": [ + { + "include": "#type_signature" + } + ] + }, + { + "include": "#data_ctor" + }, + { + "include": "#comments" + }, + { + "include": "#infix_op" + }, + { + "name": "keyword.other.arrow.purescript", + "match": "\\<-|-\\>" + }, + { + "name": "keyword.operator.purescript", + "match": "[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+" + }, + { + "name": "punctuation.separator.comma.purescript", + "match": "," + } + ], + "repository": { + "block_comment": { + "patterns": [ + { + "name": "comment.block.documentation.purescript", + "begin": "\\{-\\s*\\|", + "end": "-\\}", + "applyEndPatternLast": 1, + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.documentation.purescript" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.documentation.purescript" + } + }, + "patterns": [ + { + "include": "#block_comment" + } + ] + }, + { + "name": "comment.block.purescript", + "begin": "\\{-", + "end": "-\\}", + "applyEndPatternLast": 1, + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.purescript" + } + }, + "patterns": [ + { + "include": "#block_comment" + } + ] + } + ] + }, + "record_types": { + "patterns": [ + { + "name": "meta.type.record.purescript", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "keyword.operator.type.record.begin.purescript" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "keyword.operator.type.record.end.purescript" + } + }, + "patterns": [ + { + "name": "punctuation.separator.comma.purescript", + "match": "," + }, + { + "include": "#record_field_declaration" + }, + { + "include": "#comments" + } + ] + } + ] + }, + "comments": { + "patterns": [ + { + "begin": "(^[ \\t]+)?(?=--+\\s+\\|)", + "end": "(?!\\G)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.purescript" + } + }, + "patterns": [ + { + "name": "comment.line.double-dash.documentation.purescript", + "begin": "(--+)\\s+(\\|)", + "end": "\\n", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.purescript" + }, + "2": { + "name": "punctuation.definition.comment.documentation.purescript" + } + } + } + ] + }, + { + "begin": "(^[ \\t]+)?(?=--+(?![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]))", + "end": "(?!\\G)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.purescript" + } + }, + "patterns": [ + { + "name": "comment.line.double-dash.purescript", + "begin": "--", + "end": "\\n", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.purescript" + } + } + } + ] + }, + { + "include": "#block_comment" + } + ] + }, + "characters": { + "patterns": [ + { + "match": "(?:[ -\\[\\]-~]|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_]))", + "captures": { + "1": { + "name": "constant.character.escape.purescript" + }, + "2": { + "name": "constant.character.escape.octal.purescript" + }, + "3": { + "name": "constant.character.escape.hexadecimal.purescript" + }, + "4": { + "name": "constant.character.escape.control.purescript" + } + } + } + ] + }, + "infix_op": { + "patterns": [ + { + "name": "entity.name.function.infix.purescript", + "match": "(?:\\((?!--+\\))[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+\\))" + } + ] + }, + "module_exports": { + "patterns": [ + { + "name": "meta.declaration.exports.purescript", + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#comments" + }, + { + "name": "entity.name.function.purescript", + "match": "\\b(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*" + }, + { + "include": "#type_name" + }, + { + "name": "punctuation.separator.comma.purescript", + "match": "," + }, + { + "include": "#infix_op" + }, + { + "name": "meta.other.constructor-list.purescript", + "match": "\\(.*?\\)" + } + ] + } + ] + }, + "module_name": { + "patterns": [ + { + "name": "support.other.module.purescript", + "match": "(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)*[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.?" + } + ] + }, + "function_type_declaration": { + "patterns": [ + { + "name": "meta.function.type-declaration.purescript", + "begin": "^(\\s*)([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)\\s*(?:(::|∷)(?!.*<-))", + "end": "^(?!\\1[ \\t]|[ \\t]*$)", + "contentName": "meta.type-signature.purescript", + "beginCaptures": { + "2": { + "name": "entity.name.function.purescript" + }, + "3": { + "name": "keyword.other.double-colon.purescript" + } + }, + "patterns": [ + { + "include": "#double_colon" + }, + { + "include": "#type_signature" + } + ] + } + ] + }, + "record_field_declaration": { + "patterns": [ + { + "name": "meta.record-field.type-declaration.purescript", + "begin": "([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)\\s*(::|∷)", + "end": "(?=([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)\\s*(::|∷)|})", + "contentName": "meta.type-signature.purescript", + "beginCaptures": { + "1": { + "patterns": [ + { + "name": "entity.other.attribute-name.purescript", + "match": "(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*" + } + ] + }, + "2": { + "name": "keyword.other.double-colon.purescript" + } + }, + "patterns": [ + { + "include": "#type_signature" + }, + { + "include": "#record_types" + } + ] + } + ] + }, + "kind_signature": { + "patterns": [ + { + "name": "keyword.other.star.purescript", + "match": "\\*" + }, + { + "name": "keyword.other.exclaimation-point.purescript", + "match": "!" + }, + { + "name": "keyword.other.pound-sign.purescript", + "match": "#" + }, + { + "name": "keyword.other.arrow.purescript", + "match": "->|→" + } + ] + }, + "type_signature": { + "patterns": [ + { + "name": "meta.class-constraints.purescript", + "match": "(?:(?:\\()(?:(?<classConstraints>(?:(?:(?:([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*)\\s+)(?:(?<classConstraint>(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)(?:\\s*(?:\\s+)\\s*\\g<classConstraint>)?))))(?:\\s*(?:,)\\s*\\g<classConstraints>)?))(?:\\))(?:\\s*(=>|<=|⇐|⇒)))", + "captures": { + "1": { + "patterns": [ + { + "include": "#class_constraint" + } + ] + }, + "4": { + "name": "keyword.other.big-arrow.purescript" + } + } + }, + { + "name": "meta.class-constraints.purescript", + "match": "((?:(?:([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*)\\s+)(?:(?<classConstraint>(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)(?:\\s*(?:\\s+)\\s*\\g<classConstraint>)?))))\\s*(=>|<=|⇐|⇒)", + "captures": { + "1": { + "patterns": [ + { + "include": "#class_constraint" + } + ] + }, + "4": { + "name": "keyword.other.big-arrow.purescript" + } + } + }, + { + "name": "keyword.other.arrow.purescript", + "match": "->|→" + }, + { + "name": "keyword.other.big-arrow.purescript", + "match": "=>|⇒" + }, + { + "name": "keyword.other.big-arrow-left.purescript", + "match": "<=|⇐" + }, + { + "name": "keyword.other.forall.purescript", + "match": "forall|∀" + }, + { + "include": "#generic_type" + }, + { + "include": "#type_name" + }, + { + "include": "#comments" + } + ] + }, + "type_name": { + "patterns": [ + { + "name": "entity.name.type.purescript", + "match": "\\b[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*" + } + ] + }, + "data_ctor": { + "patterns": [ + { + "name": "entity.name.tag.purescript", + "match": "\\b[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*" + } + ] + }, + "generic_type": { + "patterns": [ + { + "name": "variable.other.generic-type.purescript", + "match": "\\b(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*" + } + ] + }, + "double_colon": { + "patterns": [ + { + "name": "keyword.other.double-colon.purescript", + "match": "(?:::|∷)" + } + ] + }, + "class_constraint": { + "patterns": [ + { + "name": "meta.class-constraint.purescript", + "match": "(?:(?:([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*)\\s+)(?:(?<classConstraint>(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)(?:\\s*(?:\\s+)\\s*\\g<classConstraint>)?)))", + "captures": { + "1": { + "patterns": [ + { + "name": "entity.name.type.purescript", + "match": "\\b[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#type_name" + }, + { + "include": "#generic_type" + } + ] + } + } + } + ] + } + } +} diff --git a/src/lib/shiki/languages/python.tmLanguage.json b/src/lib/shiki/languages/python.tmLanguage.json new file mode 100644 index 0000000..22715db --- /dev/null +++ b/src/lib/shiki/languages/python.tmLanguage.json @@ -0,0 +1,4213 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/MagicStack/MagicPython/blob/master/grammars/MagicPython.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/MagicStack/MagicPython/commit/7d0f2b22a5ad8fccbd7341bc7b7a715169283044", + "name": "python", + "scopeName": "source.python", + "patterns": [ + { + "include": "#statement" + }, + { + "include": "#expression" + } + ], + "repository": { + "impossible": { + "comment": "This is a special rule that should be used where no match is desired. It is not a good idea to match something like '1{0}' because in some cases that can result in infinite loops in token generation. So the rule instead matches and impossible expression to allow a match to fail and move to the next token.", + "match": "$.^" + }, + "statement": { + "patterns": [ + { + "include": "#import" + }, + { + "include": "#class-declaration" + }, + { + "include": "#function-declaration" + }, + { + "include": "#generator" + }, + { + "include": "#statement-keyword" + }, + { + "include": "#assignment-operator" + }, + { + "include": "#decorator" + }, + { + "include": "#docstring-statement" + }, + { + "include": "#semicolon" + } + ] + }, + "semicolon": { + "patterns": [ + { + "name": "invalid.deprecated.semicolon.python", + "match": "\\;$" + } + ] + }, + "comments": { + "patterns": [ + { + "name": "comment.line.number-sign.python", + "contentName": "meta.typehint.comment.python", + "begin": "(?x)\n (?:\n \\# \\s* (type:)\n \\s*+ (?# we want `\\s*+` which is possessive quantifier since\n we do not actually want to backtrack when matching\n whitespace here)\n (?! $ | \\#)\n )\n", + "end": "(?:$|(?=\\#))", + "beginCaptures": { + "0": { + "name": "meta.typehint.comment.python" + }, + "1": { + "name": "comment.typehint.directive.notation.python" + } + }, + "patterns": [ + { + "name": "comment.typehint.ignore.notation.python", + "match": "(?x)\n \\G ignore\n (?= \\s* (?: $ | \\#))\n" + }, + { + "name": "comment.typehint.type.notation.python", + "match": "(?x)\n (?<!\\.)\\b(\n bool | bytes | float | int | object | str\n | List | Dict | Iterable | Sequence | Set\n | FrozenSet | Callable | Union | Tuple\n | Any | None\n )\\b\n" + }, + { + "name": "comment.typehint.punctuation.notation.python", + "match": "([\\[\\]\\(\\),\\.\\=\\*]|(->))" + }, + { + "name": "comment.typehint.variable.notation.python", + "match": "([[:alpha:]_]\\w*)" + } + ] + }, + { + "include": "#comments-base" + } + ] + }, + "docstring-statement": { + "begin": "^(?=\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))", + "comment": "the string either terminates correctly or by the beginning of a new line (this is for single line docstrings that aren't terminated) AND it's not followed by another docstring", + "end": "((?<=\\1)|^)(?!\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))", + "patterns": [ + { + "include": "#docstring" + } + ] + }, + "docstring": { + "patterns": [ + { + "name": "string.quoted.docstring.multi.python", + "begin": "(\\'\\'\\'|\\\"\\\"\\\")", + "end": "(\\1)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + } + }, + "patterns": [ + { + "include": "#docstring-prompt" + }, + { + "include": "#codetags" + }, + { + "include": "#docstring-guts-unicode" + } + ] + }, + { + "name": "string.quoted.docstring.raw.multi.python", + "begin": "([rR])(\\'\\'\\'|\\\"\\\"\\\")", + "end": "(\\2)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + } + }, + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#docstring-prompt" + }, + { + "include": "#codetags" + } + ] + }, + { + "name": "string.quoted.docstring.single.python", + "begin": "(\\'|\\\")", + "end": "(\\1)|(\\n)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#codetags" + }, + { + "include": "#docstring-guts-unicode" + } + ] + }, + { + "name": "string.quoted.docstring.raw.single.python", + "begin": "([rR])(\\'|\\\")", + "end": "(\\2)|(\\n)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#codetags" + } + ] + } + ] + }, + "docstring-guts-unicode": { + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#escape-sequence" + }, + { + "include": "#string-line-continuation" + } + ] + }, + "docstring-prompt": { + "match": "(?x)\n (?:\n (?:^|\\G) \\s* (?# '\\G' is necessary for ST)\n ((?:>>>|\\.\\.\\.) \\s) (?=\\s*\\S)\n )\n", + "captures": { + "1": { + "name": "keyword.control.flow.python" + } + } + }, + "statement-keyword": { + "patterns": [ + { + "name": "storage.type.function.python", + "match": "\\b((async\\s+)?\\s*def)\\b" + }, + { + "name": "keyword.control.flow.python", + "comment": "if `as` is eventually followed by `:` or line continuation\nit's probably control flow like:\n with foo as bar, \\\n Foo as Bar:\n try:\n do_stuff()\n except Exception as e:\n pass\n", + "match": "\\b(?<!\\.)as\\b(?=.*[:\\\\])" + }, + { + "name": "keyword.control.import.python", + "comment": "other legal use of `as` is in an import", + "match": "\\b(?<!\\.)as\\b" + }, + { + "name": "keyword.control.flow.python", + "match": "(?x)\n \\b(?<!\\.)(\n async | continue | del | assert | break | finally | for\n | from | elif | else | if | except | pass | raise\n | return | try | while | with\n )\\b\n" + }, + { + "name": "storage.modifier.declaration.python", + "match": "(?x)\n \\b(?<!\\.)(\n global | nonlocal\n )\\b\n" + }, + { + "name": "storage.type.class.python", + "match": "\\b(?<!\\.)(class)\\b" + }, + { + "match": "(?x)\n ^\\s*(\n case | match\n )(?=\\s*([-+\\w\\d(\\[{'\":#]|$))\\b\n", + "captures": { + "1": { + "name": "keyword.control.flow.python" + } + } + } + ] + }, + "expression-bare": { + "comment": "valid Python expressions w/o comments and line continuation", + "patterns": [ + { + "include": "#backticks" + }, + { + "include": "#illegal-anno" + }, + { + "include": "#literal" + }, + { + "include": "#regexp" + }, + { + "include": "#string" + }, + { + "include": "#lambda" + }, + { + "include": "#generator" + }, + { + "include": "#illegal-operator" + }, + { + "include": "#operator" + }, + { + "include": "#curly-braces" + }, + { + "include": "#item-access" + }, + { + "include": "#list" + }, + { + "include": "#odd-function-call" + }, + { + "include": "#round-braces" + }, + { + "include": "#function-call" + }, + { + "include": "#builtin-functions" + }, + { + "include": "#builtin-types" + }, + { + "include": "#builtin-exceptions" + }, + { + "include": "#magic-names" + }, + { + "include": "#special-names" + }, + { + "include": "#illegal-names" + }, + { + "include": "#special-variables" + }, + { + "include": "#ellipsis" + }, + { + "include": "#punctuation" + }, + { + "include": "#line-continuation" + } + ] + }, + "expression-base": { + "comment": "valid Python expressions with comments and line continuation", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#expression-bare" + }, + { + "include": "#line-continuation" + } + ] + }, + "expression": { + "comment": "All valid Python expressions", + "patterns": [ + { + "include": "#expression-base" + }, + { + "include": "#member-access" + }, + { + "comment": "Tokenize identifiers to help linters", + "match": "(?x) \\b ([[:alpha:]_]\\w*) \\b" + } + ] + }, + "member-access": { + "name": "meta.member.access.python", + "begin": "(\\.)\\s*(?!\\.)", + "end": "(?x)\n # stop when you've just read non-whitespace followed by non-word\n # i.e. when finished reading an identifier or function call\n (?<=\\S)(?=\\W) |\n # stop when seeing the start of something that's not a word,\n # i.e. when seeing a non-identifier\n (^|(?<=\\s))(?=[^\\\\\\w\\s]) |\n $\n", + "beginCaptures": { + "1": { + "name": "punctuation.separator.period.python" + } + }, + "patterns": [ + { + "include": "#function-call" + }, + { + "include": "#member-access-base" + }, + { + "include": "#member-access-attribute" + } + ] + }, + "member-access-base": { + "patterns": [ + { + "include": "#magic-names" + }, + { + "include": "#illegal-names" + }, + { + "include": "#illegal-object-name" + }, + { + "include": "#special-names" + }, + { + "include": "#line-continuation" + }, + { + "include": "#item-access" + } + ] + }, + "member-access-attribute": { + "comment": "Highlight attribute access in otherwise non-specialized cases.", + "name": "meta.attribute.python", + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" + }, + "special-names": { + "name": "constant.other.caps.python", + "match": "(?x)\n \\b\n # we want to see \"enough\", meaning 2 or more upper-case\n # letters in the beginning of the constant\n #\n # for more details refer to:\n # https://github.com/MagicStack/MagicPython/issues/42\n (\n _* [[:upper:]] [_\\d]* [[:upper:]]\n )\n [[:upper:]\\d]* (_\\w*)?\n \\b\n" + }, + "curly-braces": { + "begin": "\\{", + "end": "\\}", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dict.begin.python" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.dict.end.python" + } + }, + "patterns": [ + { + "name": "punctuation.separator.dict.python", + "match": ":" + }, + { + "include": "#expression" + } + ] + }, + "list": { + "begin": "\\[", + "end": "\\]", + "beginCaptures": { + "0": { + "name": "punctuation.definition.list.begin.python" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.list.end.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "odd-function-call": { + "comment": "A bit obscured function call where there may have been an\narbitrary number of other operations to get the function.\nE.g. \"arr[idx](args)\"\n", + "begin": "(?x)\n (?<= \\] | \\) ) \\s*\n (?=\\()\n", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + } + }, + "patterns": [ + { + "include": "#function-arguments" + } + ] + }, + "round-braces": { + "begin": "\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.begin.python" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.end.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "line-continuation": { + "patterns": [ + { + "match": "(\\\\)\\s*(\\S.*$\\n?)", + "captures": { + "1": { + "name": "punctuation.separator.continuation.line.python" + }, + "2": { + "name": "invalid.illegal.line.continuation.python" + } + } + }, + { + "begin": "(\\\\)\\s*$\\n?", + "end": "(?x)\n (?=^\\s*$)\n |\n (?! (\\s* [rR]? (\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))\n |\n (\\G $) (?# '\\G' is necessary for ST)\n )\n", + "beginCaptures": { + "1": { + "name": "punctuation.separator.continuation.line.python" + } + }, + "patterns": [ + { + "include": "#regexp" + }, + { + "include": "#string" + } + ] + } + ] + }, + "assignment-operator": { + "name": "keyword.operator.assignment.python", + "match": "(?x)\n <<= | >>= | //= | \\*\\*=\n | \\+= | -= | /= | @=\n | \\*= | %= | ~= | \\^= | &= | \\|=\n | =(?!=)\n" + }, + "operator": { + "match": "(?x)\n \\b(?<!\\.)\n (?:\n (and | or | not | in | is) (?# 1)\n |\n (for | if | else | await | (?:yield(?:\\s+from)?)) (?# 2)\n )\n (?!\\s*:)\\b\n\n | (<< | >> | & | \\| | \\^ | ~) (?# 3)\n\n | (\\*\\* | \\* | \\+ | - | % | // | / | @) (?# 4)\n\n | (!= | == | >= | <= | < | >) (?# 5)\n\n | (:=) (?# 6)\n", + "captures": { + "1": { + "name": "keyword.operator.logical.python" + }, + "2": { + "name": "keyword.control.flow.python" + }, + "3": { + "name": "keyword.operator.bitwise.python" + }, + "4": { + "name": "keyword.operator.arithmetic.python" + }, + "5": { + "name": "keyword.operator.comparison.python" + }, + "6": { + "name": "keyword.operator.assignment.python" + } + } + }, + "punctuation": { + "patterns": [ + { + "name": "punctuation.separator.colon.python", + "match": ":" + }, + { + "name": "punctuation.separator.element.python", + "match": "," + } + ] + }, + "literal": { + "patterns": [ + { + "name": "constant.language.python", + "match": "\\b(True|False|None|NotImplemented|Ellipsis)\\b" + }, + { + "include": "#number" + } + ] + }, + "number": { + "name": "constant.numeric.python", + "patterns": [ + { + "include": "#number-float" + }, + { + "include": "#number-dec" + }, + { + "include": "#number-hex" + }, + { + "include": "#number-oct" + }, + { + "include": "#number-bin" + }, + { + "include": "#number-long" + }, + { + "name": "invalid.illegal.name.python", + "match": "\\b[0-9]+\\w+" + } + ] + }, + "number-float": { + "name": "constant.numeric.float.python", + "match": "(?x)\n (?<! \\w)(?:\n (?:\n \\.[0-9](?: _?[0-9] )*\n |\n [0-9](?: _?[0-9] )* \\. [0-9](?: _?[0-9] )*\n |\n [0-9](?: _?[0-9] )* \\.\n ) (?: [eE][+-]?[0-9](?: _?[0-9] )* )?\n |\n [0-9](?: _?[0-9] )* (?: [eE][+-]?[0-9](?: _?[0-9] )* )\n )([jJ])?\\b\n", + "captures": { + "1": { + "name": "storage.type.imaginary.number.python" + } + } + }, + "number-dec": { + "name": "constant.numeric.dec.python", + "match": "(?x)\n (?<![\\w\\.])(?:\n [1-9](?: _?[0-9] )*\n |\n 0+\n |\n [0-9](?: _?[0-9] )* ([jJ])\n |\n 0 ([0-9]+)(?![eE\\.])\n )\\b\n", + "captures": { + "1": { + "name": "storage.type.imaginary.number.python" + }, + "2": { + "name": "invalid.illegal.dec.python" + } + } + }, + "number-hex": { + "name": "constant.numeric.hex.python", + "match": "(?x)\n (?<![\\w\\.])\n (0[xX]) (_?[0-9a-fA-F])+\n \\b\n", + "captures": { + "1": { + "name": "storage.type.number.python" + } + } + }, + "number-oct": { + "name": "constant.numeric.oct.python", + "match": "(?x)\n (?<![\\w\\.])\n (0[oO]) (_?[0-7])+\n \\b\n", + "captures": { + "1": { + "name": "storage.type.number.python" + } + } + }, + "number-bin": { + "name": "constant.numeric.bin.python", + "match": "(?x)\n (?<![\\w\\.])\n (0[bB]) (_?[01])+\n \\b\n", + "captures": { + "1": { + "name": "storage.type.number.python" + } + } + }, + "number-long": { + "name": "constant.numeric.bin.python", + "comment": "this is to support python2 syntax for long ints", + "match": "(?x)\n (?<![\\w\\.])\n ([1-9][0-9]* | 0) ([lL])\n \\b\n", + "captures": { + "2": { + "name": "storage.type.number.python" + } + } + }, + "regexp": { + "patterns": [ + { + "include": "#regexp-single-three-line" + }, + { + "include": "#regexp-double-three-line" + }, + { + "include": "#regexp-single-one-line" + }, + { + "include": "#regexp-double-one-line" + } + ] + }, + "string": { + "patterns": [ + { + "include": "#string-quoted-multi-line" + }, + { + "include": "#string-quoted-single-line" + }, + { + "include": "#string-bin-quoted-multi-line" + }, + { + "include": "#string-bin-quoted-single-line" + }, + { + "include": "#string-raw-quoted-multi-line" + }, + { + "include": "#string-raw-quoted-single-line" + }, + { + "include": "#string-raw-bin-quoted-multi-line" + }, + { + "include": "#string-raw-bin-quoted-single-line" + }, + { + "include": "#fstring-fnorm-quoted-multi-line" + }, + { + "include": "#fstring-fnorm-quoted-single-line" + }, + { + "include": "#fstring-normf-quoted-multi-line" + }, + { + "include": "#fstring-normf-quoted-single-line" + }, + { + "include": "#fstring-raw-quoted-multi-line" + }, + { + "include": "#fstring-raw-quoted-single-line" + } + ] + }, + "string-unicode-guts": { + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#string-entity" + }, + { + "include": "#string-brace-formatting" + } + ] + }, + "string-consume-escape": { + "match": "\\\\['\"\\n\\\\]" + }, + "string-raw-guts": { + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#string-formatting" + }, + { + "include": "#string-brace-formatting" + } + ] + }, + "string-raw-bin-guts": { + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#string-formatting" + } + ] + }, + "string-entity": { + "patterns": [ + { + "include": "#escape-sequence" + }, + { + "include": "#string-line-continuation" + }, + { + "include": "#string-formatting" + } + ] + }, + "fstring-guts": { + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#escape-sequence" + }, + { + "include": "#string-line-continuation" + }, + { + "include": "#fstring-formatting" + } + ] + }, + "fstring-raw-guts": { + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#fstring-formatting" + } + ] + }, + "fstring-illegal-single-brace": { + "comment": "it is illegal to have a multiline brace inside a single-line string", + "begin": "(\\{)(?=[^\\n}]*$\\n?)", + "end": "(\\})|(?=\\n)", + "beginCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "endCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "patterns": [ + { + "include": "#fstring-terminator-single" + }, + { + "include": "#f-expression" + } + ] + }, + "fstring-illegal-multi-brace": { + "patterns": [ + { + "include": "#impossible" + } + ] + }, + "f-expression": { + "comment": "All valid Python expressions, except comments and line continuation", + "patterns": [ + { + "include": "#expression-bare" + }, + { + "include": "#member-access" + }, + { + "comment": "Tokenize identifiers to help linters", + "match": "(?x) \\b ([[:alpha:]_]\\w*) \\b" + } + ] + }, + "escape-sequence-unicode": { + "patterns": [ + { + "name": "constant.character.escape.python", + "match": "(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n | N\\{[\\w\\s]+?\\}\n )\n" + } + ] + }, + "escape-sequence": { + "name": "constant.character.escape.python", + "match": "(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | [0-7]{1,3}\n | [\\\\\"'abfnrtv]\n )\n" + }, + "string-line-continuation": { + "name": "constant.language.python", + "match": "\\\\$" + }, + "string-formatting": { + "name": "meta.format.percent.python", + "match": "(?x)\n (\n % (\\([\\w\\s]*\\))?\n [-+#0 ]*\n (\\d+|\\*)? (\\.(\\d+|\\*))?\n ([hlL])?\n [diouxXeEfFgGcrsab%]\n )\n", + "captures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + } + }, + "string-brace-formatting": { + "patterns": [ + { + "name": "meta.format.brace.python", + "match": "(?x)\n (\n {{ | }}\n | (?:\n {\n \\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'\"]+\\])*\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?\n })\n )\n", + "captures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + }, + "3": { + "name": "storage.type.format.python" + }, + "4": { + "name": "storage.type.format.python" + } + } + }, + { + "name": "meta.format.brace.python", + "match": "(?x)\n (\n {\n \\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'\"]+\\])*\n (![rsa])?\n (:)\n [^'\"{}\\n]* (?:\n \\{ [^'\"}\\n]*? \\} [^'\"{}\\n]*\n )*\n }\n )\n", + "captures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + }, + "3": { + "name": "storage.type.format.python" + }, + "4": { + "name": "storage.type.format.python" + } + } + } + ] + }, + "fstring-formatting": { + "patterns": [ + { + "include": "#fstring-formatting-braces" + }, + { + "include": "#fstring-formatting-singe-brace" + } + ] + }, + "fstring-formatting-singe-brace": { + "name": "invalid.illegal.brace.python", + "match": "(}(?!}))" + }, + "import": { + "comment": "Import statements used to correctly mark `from`, `import`, and `as`\n", + "patterns": [ + { + "begin": "\\b(?<!\\.)(from)\\b(?=.+import)", + "end": "$|(?=import)", + "beginCaptures": { + "1": { + "name": "keyword.control.import.python" + } + }, + "patterns": [ + { + "name": "punctuation.separator.period.python", + "match": "\\.+" + }, + { + "include": "#expression" + } + ] + }, + { + "begin": "\\b(?<!\\.)(import)\\b", + "end": "$", + "beginCaptures": { + "1": { + "name": "keyword.control.import.python" + } + }, + "patterns": [ + { + "name": "keyword.control.import.python", + "match": "\\b(?<!\\.)as\\b" + }, + { + "include": "#expression" + } + ] + } + ] + }, + "class-declaration": { + "patterns": [ + { + "name": "meta.class.python", + "begin": "(?x)\n \\s*(class)\\s+\n (?=\n [[:alpha:]_]\\w* \\s* (:|\\()\n )\n", + "end": "(:)", + "beginCaptures": { + "1": { + "name": "storage.type.class.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.section.class.begin.python" + } + }, + "patterns": [ + { + "include": "#class-name" + }, + { + "include": "#class-inheritance" + } + ] + } + ] + }, + "class-name": { + "patterns": [ + { + "include": "#illegal-object-name" + }, + { + "include": "#builtin-possible-callables" + }, + { + "name": "entity.name.type.class.python", + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" + } + ] + }, + "class-inheritance": { + "name": "meta.class.inheritance.python", + "begin": "(\\()", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.inheritance.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.inheritance.end.python" + } + }, + "patterns": [ + { + "name": "keyword.operator.unpacking.arguments.python", + "match": "(\\*\\*|\\*)" + }, + { + "name": "punctuation.separator.inheritance.python", + "match": "," + }, + { + "name": "keyword.operator.assignment.python", + "match": "=(?!=)" + }, + { + "name": "support.type.metaclass.python", + "match": "\\bmetaclass\\b" + }, + { + "include": "#illegal-names" + }, + { + "include": "#class-kwarg" + }, + { + "include": "#call-wrapper-inheritance" + }, + { + "include": "#expression-base" + }, + { + "include": "#member-access-class" + }, + { + "include": "#inheritance-identifier" + } + ] + }, + "class-kwarg": { + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\s*(=)(?!=)\n", + "captures": { + "1": { + "name": "entity.other.inherited-class.python variable.parameter.class.python" + }, + "2": { + "name": "keyword.operator.assignment.python" + } + } + }, + "inheritance-identifier": { + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n", + "captures": { + "1": { + "name": "entity.other.inherited-class.python" + } + } + }, + "member-access-class": { + "name": "meta.member.access.python", + "begin": "(\\.)\\s*(?!\\.)", + "end": "(?<=\\S)(?=\\W)|$", + "beginCaptures": { + "1": { + "name": "punctuation.separator.period.python" + } + }, + "patterns": [ + { + "include": "#call-wrapper-inheritance" + }, + { + "include": "#member-access-base" + }, + { + "include": "#inheritance-identifier" + } + ] + }, + "lambda": { + "patterns": [ + { + "match": "((?<=\\.)lambda|lambda(?=\\s*[\\.=]))", + "captures": { + "1": { + "name": "keyword.control.flow.python" + } + } + }, + { + "match": "\\b(lambda)\\s*?(?=[,\\n]|$)", + "captures": { + "1": { + "name": "storage.type.function.lambda.python" + } + } + }, + { + "name": "meta.lambda-function.python", + "begin": "(?x)\n \\b (lambda) \\b\n", + "end": "(:)|(\\n)", + "beginCaptures": { + "1": { + "name": "storage.type.function.lambda.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.section.function.lambda.begin.python" + } + }, + "contentName": "meta.function.lambda.parameters.python", + "patterns": [ + { + "name": "keyword.operator.positional.parameter.python", + "match": "/" + }, + { + "name": "keyword.operator.unpacking.parameter.python", + "match": "(\\*\\*|\\*)" + }, + { + "include": "#lambda-nested-incomplete" + }, + { + "include": "#illegal-names" + }, + { + "match": "([[:alpha:]_]\\w*)\\s*(?:(,)|(?=:|$))", + "captures": { + "1": { + "name": "variable.parameter.function.language.python" + }, + "2": { + "name": "punctuation.separator.parameters.python" + } + } + }, + { + "include": "#comments" + }, + { + "include": "#backticks" + }, + { + "include": "#illegal-anno" + }, + { + "include": "#lambda-parameter-with-default" + }, + { + "include": "#line-continuation" + }, + { + "include": "#illegal-operator" + } + ] + } + ] + }, + "lambda-incomplete": { + "name": "storage.type.function.lambda.python", + "match": "\\blambda(?=\\s*[,)])" + }, + "lambda-nested-incomplete": { + "name": "storage.type.function.lambda.python", + "match": "\\blambda(?=\\s*[:,)])" + }, + "lambda-parameter-with-default": { + "begin": "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (=)\n", + "end": "(,)|(?=:|$)", + "beginCaptures": { + "1": { + "name": "variable.parameter.function.language.python" + }, + "2": { + "name": "keyword.operator.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.separator.parameters.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "generator": { + "comment": "Match \"for ... in\" construct used in generators and for loops to\ncorrectly identify the \"in\" as a control flow keyword.\n", + "begin": "\\bfor\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.flow.python" + } + }, + "end": "\\bin\\b", + "endCaptures": { + "0": { + "name": "keyword.control.flow.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "function-declaration": { + "name": "meta.function.python", + "begin": "(?x)\n \\s*\n (?:\\b(async) \\s+)? \\b(def)\\s+\n (?=\n [[:alpha:]_][[:word:]]* \\s* \\(\n )\n", + "end": "(:|(?=[#'\"\\n]))", + "beginCaptures": { + "1": { + "name": "storage.type.function.async.python" + }, + "2": { + "name": "storage.type.function.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.section.function.begin.python" + } + }, + "patterns": [ + { + "include": "#function-def-name" + }, + { + "include": "#parameters" + }, + { + "include": "#line-continuation" + }, + { + "include": "#return-annotation" + } + ] + }, + "function-def-name": { + "patterns": [ + { + "include": "#illegal-object-name" + }, + { + "include": "#builtin-possible-callables" + }, + { + "name": "entity.name.function.python", + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" + } + ] + }, + "parameters": { + "name": "meta.function.parameters.python", + "begin": "(\\()", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.parameters.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.python" + } + }, + "patterns": [ + { + "name": "keyword.operator.positional.parameter.python", + "match": "/" + }, + { + "name": "keyword.operator.unpacking.parameter.python", + "match": "(\\*\\*|\\*)" + }, + { + "include": "#lambda-incomplete" + }, + { + "include": "#illegal-names" + }, + { + "include": "#illegal-object-name" + }, + { + "include": "#parameter-special" + }, + { + "match": "(?x)\n ([[:alpha:]_]\\w*)\n \\s* (?: (,) | (?=[)#\\n=]))\n", + "captures": { + "1": { + "name": "variable.parameter.function.language.python" + }, + "2": { + "name": "punctuation.separator.parameters.python" + } + } + }, + { + "include": "#comments" + }, + { + "include": "#loose-default" + }, + { + "include": "#annotated-parameter" + } + ] + }, + "parameter-special": { + "match": "(?x)\n \\b ((self)|(cls)) \\b \\s*(?:(,)|(?=\\)))\n", + "captures": { + "1": { + "name": "variable.parameter.function.language.python" + }, + "2": { + "name": "variable.parameter.function.language.special.self.python" + }, + "3": { + "name": "variable.parameter.function.language.special.cls.python" + }, + "4": { + "name": "punctuation.separator.parameters.python" + } + } + }, + "loose-default": { + "begin": "(=)", + "end": "(,)|(?=\\))", + "beginCaptures": { + "1": { + "name": "keyword.operator.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.separator.parameters.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "annotated-parameter": { + "begin": "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (:)\n", + "end": "(,)|(?=\\))", + "beginCaptures": { + "1": { + "name": "variable.parameter.function.language.python" + }, + "2": { + "name": "punctuation.separator.annotation.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.separator.parameters.python" + } + }, + "patterns": [ + { + "include": "#expression" + }, + { + "name": "keyword.operator.assignment.python", + "match": "=(?!=)" + } + ] + }, + "return-annotation": { + "begin": "(->)", + "end": "(?=:)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.annotation.result.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "item-access": { + "patterns": [ + { + "name": "meta.item-access.python", + "begin": "(?x)\n \\b(?=\n [[:alpha:]_]\\w* \\s* \\[\n )\n", + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + } + }, + "patterns": [ + { + "include": "#item-name" + }, + { + "include": "#item-index" + }, + { + "include": "#expression" + } + ] + } + ] + }, + "item-name": { + "patterns": [ + { + "include": "#special-variables" + }, + { + "include": "#builtin-functions" + }, + { + "include": "#special-names" + }, + { + "name": "meta.indexed-name.python", + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" + } + ] + }, + "item-index": { + "begin": "(\\[)", + "end": "(?=\\])", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.python" + } + }, + "contentName": "meta.item-access.arguments.python", + "patterns": [ + { + "name": "punctuation.separator.slice.python", + "match": ":" + }, + { + "include": "#expression" + } + ] + }, + "decorator": { + "name": "meta.function.decorator.python", + "begin": "(?x)\n ^\\s*\n ((@)) \\s* (?=[[:alpha:]_]\\w*)\n", + "end": "(?x)\n ( \\) )\n # trailing whitespace and comments are legal\n (?: (.*?) (?=\\s*(?:\\#|$)) )\n | (?=\\n|\\#)\n", + "beginCaptures": { + "1": { + "name": "entity.name.function.decorator.python" + }, + "2": { + "name": "punctuation.definition.decorator.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + }, + "2": { + "name": "invalid.illegal.decorator.python" + } + }, + "patterns": [ + { + "include": "#decorator-name" + }, + { + "include": "#function-arguments" + } + ] + }, + "decorator-name": { + "patterns": [ + { + "include": "#builtin-callables" + }, + { + "include": "#illegal-object-name" + }, + { + "name": "entity.name.function.decorator.python", + "match": "(?x)\n ([[:alpha:]_]\\w*) | (\\.)\n", + "captures": { + "2": { + "name": "punctuation.separator.period.python" + } + } + }, + { + "include": "#line-continuation" + }, + { + "name": "invalid.illegal.decorator.python", + "match": "(?x)\n \\s* ([^([:alpha:]\\s_\\.#\\\\] .*?) (?=\\#|$)\n", + "captures": { + "1": { + "name": "invalid.illegal.decorator.python" + } + } + } + ] + }, + "call-wrapper-inheritance": { + "comment": "same as a function call, but in inheritance context", + "name": "meta.function-call.python", + "begin": "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + } + }, + "patterns": [ + { + "include": "#inheritance-name" + }, + { + "include": "#function-arguments" + } + ] + }, + "inheritance-name": { + "patterns": [ + { + "include": "#lambda-incomplete" + }, + { + "include": "#builtin-possible-callables" + }, + { + "include": "#inheritance-identifier" + } + ] + }, + "function-call": { + "name": "meta.function-call.python", + "comment": "Regular function call of the type \"name(args)\"", + "begin": "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + } + }, + "patterns": [ + { + "include": "#special-variables" + }, + { + "include": "#function-name" + }, + { + "include": "#function-arguments" + } + ] + }, + "function-name": { + "patterns": [ + { + "include": "#builtin-possible-callables" + }, + { + "comment": "Some color schemas support meta.function-call.generic scope", + "name": "meta.function-call.generic.python", + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" + } + ] + }, + "function-arguments": { + "begin": "(\\()", + "end": "(?=\\))(?!\\)\\s*\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.python" + } + }, + "contentName": "meta.function-call.arguments.python", + "patterns": [ + { + "name": "punctuation.separator.arguments.python", + "match": "(,)" + }, + { + "match": "(?x)\n (?:(?<=[,(])|^) \\s* (\\*{1,2})\n", + "captures": { + "1": { + "name": "keyword.operator.unpacking.arguments.python" + } + } + }, + { + "include": "#lambda-incomplete" + }, + { + "include": "#illegal-names" + }, + { + "match": "\\b([[:alpha:]_]\\w*)\\s*(=)(?!=)", + "captures": { + "1": { + "name": "variable.parameter.function-call.python" + }, + "2": { + "name": "keyword.operator.assignment.python" + } + } + }, + { + "name": "keyword.operator.assignment.python", + "match": "=(?!=)" + }, + { + "include": "#expression" + }, + { + "match": "\\s*(\\))\\s*(\\()", + "captures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + }, + "2": { + "name": "punctuation.definition.arguments.begin.python" + } + } + } + ] + }, + "builtin-callables": { + "patterns": [ + { + "include": "#illegal-names" + }, + { + "include": "#illegal-object-name" + }, + { + "include": "#builtin-exceptions" + }, + { + "include": "#builtin-functions" + }, + { + "include": "#builtin-types" + } + ] + }, + "builtin-possible-callables": { + "patterns": [ + { + "include": "#builtin-callables" + }, + { + "include": "#magic-names" + } + ] + }, + "builtin-exceptions": { + "name": "support.type.exception.python", + "match": "(?x) (?<!\\.) \\b(\n (\n Arithmetic | Assertion | Attribute | Buffer | BlockingIO\n | BrokenPipe | ChildProcess\n | (Connection (Aborted | Refused | Reset)?)\n | EOF | Environment | FileExists | FileNotFound\n | FloatingPoint | IO | Import | Indentation | Index | Interrupted\n | IsADirectory | NotADirectory | Permission | ProcessLookup\n | Timeout\n | Key | Lookup | Memory | Name | NotImplemented | OS | Overflow\n | Reference | Runtime | Recursion | Syntax | System\n | Tab | Type | UnboundLocal | Unicode(Encode|Decode|Translate)?\n | Value | Windows | ZeroDivision | ModuleNotFound\n ) Error\n|\n ((Pending)?Deprecation | Runtime | Syntax | User | Future | Import\n | Unicode | Bytes | Resource\n )? Warning\n|\n SystemExit | Stop(Async)?Iteration\n | KeyboardInterrupt\n | GeneratorExit | (Base)?Exception\n)\\b\n" + }, + "builtin-functions": { + "patterns": [ + { + "name": "support.function.builtin.python", + "match": "(?x)\n (?<!\\.) \\b(\n __import__ | abs | aiter | all | any | anext | ascii | bin\n | breakpoint | callable | chr | compile | copyright | credits\n | delattr | dir | divmod | enumerate | eval | exec | exit\n | filter | format | getattr | globals | hasattr | hash | help\n | hex | id | input | isinstance | issubclass | iter | len\n | license | locals | map | max | memoryview | min | next\n | oct | open | ord | pow | print | quit | range | reload | repr\n | reversed | round | setattr | sorted | sum | vars | zip\n )\\b\n" + }, + { + "name": "variable.legacy.builtin.python", + "match": "(?x)\n (?<!\\.) \\b(\n file | reduce | intern | raw_input | unicode | cmp | basestring\n | execfile | long | xrange\n )\\b\n" + } + ] + }, + "builtin-types": { + "name": "support.type.python", + "match": "(?x)\n (?<!\\.) \\b(\n bool | bytearray | bytes | classmethod | complex | dict\n | float | frozenset | int | list | object | property\n | set | slice | staticmethod | str | tuple | type\n\n (?# Although 'super' is not a type, it's related to types,\n and is special enough to be highlighted differently from\n other built-ins)\n | super\n )\\b\n" + }, + "magic-function-names": { + "comment": "these methods have magic interpretation by python and are generally called\nindirectly through syntactic constructs\n", + "match": "(?x)\n \\b(\n __(?:\n abs | add | aenter | aexit | aiter | and | anext\n | await | bool | call | ceil | class_getitem\n | cmp | coerce | complex | contains | copy\n | deepcopy | del | delattr | delete | delitem\n | delslice | dir | div | divmod | enter | eq\n | exit | float | floor | floordiv | format | ge\n | get | getattr | getattribute | getinitargs\n | getitem | getnewargs | getslice | getstate | gt\n | hash | hex | iadd | iand | idiv | ifloordiv |\n | ilshift | imod | imul | index | init\n | instancecheck | int | invert | ior | ipow\n | irshift | isub | iter | itruediv | ixor | le\n | len | long | lshift | lt | missing | mod | mul\n | ne | neg | new | next | nonzero | oct | or | pos\n | pow | radd | rand | rdiv | rdivmod | reduce\n | reduce_ex | repr | reversed | rfloordiv |\n | rlshift | rmod | rmul | ror | round | rpow\n | rrshift | rshift | rsub | rtruediv | rxor | set\n | setattr | setitem | set_name | setslice\n | setstate | sizeof | str | sub | subclasscheck\n | truediv | trunc | unicode | xor | matmul\n | rmatmul | imatmul | init_subclass | set_name\n | fspath | bytes | prepare | length_hint\n )__\n )\\b\n", + "captures": { + "1": { + "name": "support.function.magic.python" + } + } + }, + "magic-variable-names": { + "comment": "magic variables which a class/module may have.", + "match": "(?x)\n \\b(\n __(?:\n all | annotations | bases | builtins | class\n | closure | code | debug | defaults | dict | doc | file | func\n | globals | kwdefaults | match_args | members | metaclass | methods\n | module | mro | mro_entries | name | qualname | post_init | self\n | signature | slots | subclasses | version | weakref | wrapped\n | classcell | spec | path | package | future | traceback\n )__\n )\\b\n", + "captures": { + "1": { + "name": "support.variable.magic.python" + } + } + }, + "magic-names": { + "patterns": [ + { + "include": "#magic-function-names" + }, + { + "include": "#magic-variable-names" + } + ] + }, + "illegal-names": { + "match": "(?x)\n \\b(?:\n (\n and | assert | async | await | break | class | continue | def\n | del | elif | else | except | finally | for | from | global\n | if | in | is | (?<=\\.)lambda | lambda(?=\\s*[\\.=])\n | nonlocal | not | or | pass | raise | return | try | while | with\n | yield\n ) | (\n as | import\n )\n )\\b\n", + "captures": { + "1": { + "name": "keyword.control.flow.python" + }, + "2": { + "name": "keyword.control.import.python" + } + } + }, + "special-variables": { + "match": "(?x)\n \\b (?<!\\.) (?:\n (self) | (cls)\n )\\b\n", + "captures": { + "1": { + "name": "variable.language.special.self.python" + }, + "2": { + "name": "variable.language.special.cls.python" + } + } + }, + "ellipsis": { + "name": "constant.other.ellipsis.python", + "match": "\\.\\.\\." + }, + "backticks": { + "name": "invalid.deprecated.backtick.python", + "begin": "\\`", + "end": "(?:\\`|(?<!\\\\)(\\n))", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "illegal-operator": { + "patterns": [ + { + "name": "invalid.illegal.operator.python", + "match": "&&|\\|\\||--|\\+\\+" + }, + { + "name": "invalid.illegal.operator.python", + "match": "[?$]" + }, + { + "name": "invalid.illegal.operator.python", + "comment": "We don't want `!` to flash when we're typing `!=`", + "match": "!\\b" + } + ] + }, + "illegal-object-name": { + "comment": "It's illegal to name class or function \"True\"", + "name": "keyword.illegal.name.python", + "match": "\\b(True|False|None)\\b" + }, + "illegal-anno": { + "name": "invalid.illegal.annotation.python", + "match": "->" + }, + "regexp-base-expression": { + "patterns": [ + { + "include": "#regexp-quantifier" + }, + { + "include": "#regexp-base-common" + } + ] + }, + "fregexp-base-expression": { + "patterns": [ + { + "include": "#fregexp-quantifier" + }, + { + "include": "#fstring-formatting-braces" + }, + { + "match": "\\{.*?\\}" + }, + { + "include": "#regexp-base-common" + } + ] + }, + "fstring-formatting-braces": { + "patterns": [ + { + "comment": "empty braces are illegal", + "match": "({)(\\s*?)(})", + "captures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + }, + "2": { + "name": "invalid.illegal.brace.python" + }, + "3": { + "name": "constant.character.format.placeholder.other.python" + } + } + }, + { + "name": "constant.character.escape.python", + "match": "({{|}})" + } + ] + }, + "regexp-base-common": { + "patterns": [ + { + "name": "support.other.match.any.regexp", + "match": "\\." + }, + { + "name": "support.other.match.begin.regexp", + "match": "\\^" + }, + { + "name": "support.other.match.end.regexp", + "match": "\\$" + }, + { + "name": "keyword.operator.quantifier.regexp", + "match": "[+*?]\\??" + }, + { + "name": "keyword.operator.disjunction.regexp", + "match": "\\|" + }, + { + "include": "#regexp-escape-sequence" + } + ] + }, + "regexp-quantifier": { + "name": "keyword.operator.quantifier.regexp", + "match": "(?x)\n \\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\n" + }, + "fregexp-quantifier": { + "name": "keyword.operator.quantifier.regexp", + "match": "(?x)\n \\{\\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\\}\n" + }, + "regexp-backreference-number": { + "name": "meta.backreference.regexp", + "match": "(\\\\[1-9]\\d?)", + "captures": { + "1": { + "name": "entity.name.tag.backreference.regexp" + } + } + }, + "regexp-backreference": { + "name": "meta.backreference.named.regexp", + "match": "(?x)\n (\\() (\\?P= \\w+(?:\\s+[[:alnum:]]+)?) (\\))\n", + "captures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.backreference.regexp" + }, + "3": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.end.regexp" + } + } + }, + "regexp-flags": { + "name": "storage.modifier.flag.regexp", + "match": "\\(\\?[aiLmsux]+\\)" + }, + "regexp-escape-special": { + "name": "support.other.escape.special.regexp", + "match": "\\\\([AbBdDsSwWZ])" + }, + "regexp-escape-character": { + "name": "constant.character.escape.regexp", + "match": "(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | 0[0-7]{1,2}\n | [0-7]{3}\n )\n" + }, + "regexp-escape-unicode": { + "name": "constant.character.unicode.regexp", + "match": "(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n )\n" + }, + "regexp-escape-catchall": { + "name": "constant.character.escape.regexp", + "match": "\\\\(.|\\n)" + }, + "regexp-escape-sequence": { + "patterns": [ + { + "include": "#regexp-escape-special" + }, + { + "include": "#regexp-escape-character" + }, + { + "include": "#regexp-escape-unicode" + }, + { + "include": "#regexp-backreference-number" + }, + { + "include": "#regexp-escape-catchall" + } + ] + }, + "regexp-charecter-set-escapes": { + "patterns": [ + { + "name": "constant.character.escape.regexp", + "match": "\\\\[abfnrtv\\\\]" + }, + { + "include": "#regexp-escape-special" + }, + { + "name": "constant.character.escape.regexp", + "match": "\\\\([0-7]{1,3})" + }, + { + "include": "#regexp-escape-character" + }, + { + "include": "#regexp-escape-unicode" + }, + { + "include": "#regexp-escape-catchall" + } + ] + }, + "codetags": { + "match": "(?:\\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\\b)", + "captures": { + "1": { + "name": "keyword.codetag.notation.python" + } + } + }, + "comments-base": { + "name": "comment.line.number-sign.python", + "begin": "(\\#)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.python" + } + }, + "end": "($)", + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "comments-string-single-three": { + "name": "comment.line.number-sign.python", + "begin": "(\\#)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.python" + } + }, + "end": "($|(?='''))", + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "comments-string-double-three": { + "name": "comment.line.number-sign.python", + "begin": "(\\#)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.python" + } + }, + "end": "($|(?=\"\"\"))", + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "single-one-regexp-expression": { + "patterns": [ + { + "include": "#regexp-base-expression" + }, + { + "include": "#single-one-regexp-character-set" + }, + { + "include": "#single-one-regexp-comments" + }, + { + "include": "#regexp-flags" + }, + { + "include": "#single-one-regexp-named-group" + }, + { + "include": "#regexp-backreference" + }, + { + "include": "#single-one-regexp-lookahead" + }, + { + "include": "#single-one-regexp-lookahead-negative" + }, + { + "include": "#single-one-regexp-lookbehind" + }, + { + "include": "#single-one-regexp-lookbehind-negative" + }, + { + "include": "#single-one-regexp-conditional" + }, + { + "include": "#single-one-regexp-parentheses-non-capturing" + }, + { + "include": "#single-one-regexp-parentheses" + } + ] + }, + "single-one-regexp-character-set": { + "patterns": [ + { + "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" + }, + { + "name": "meta.character.set.regexp", + "begin": "(\\[)(\\^)?(\\])?", + "end": "(\\]|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "1": { + "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + }, + "3": { + "name": "constant.character.set.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.character.set.end.regexp constant.other.set.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#regexp-charecter-set-escapes" + }, + { + "name": "constant.character.set.regexp", + "match": "[^\\n]" + } + ] + } + ] + }, + "single-one-regexp-named-group": { + "name": "meta.named.regexp", + "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.group.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-comments": { + "name": "comment.regexp", + "begin": "\\(\\?#", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "punctuation.comment.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.comment.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "single-one-regexp-lookahead": { + "begin": "(\\()\\?=", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-lookahead-negative": { + "begin": "(\\()\\?!", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-lookbehind": { + "begin": "(\\()\\?<=", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-lookbehind-negative": { + "begin": "(\\()\\?<!", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-conditional": { + "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.conditional.regexp" + }, + "1": { + "name": "punctuation.parenthesis.conditional.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-parentheses-non-capturing": { + "begin": "\\(\\?:", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-parentheses": { + "begin": "\\(", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-three-regexp-expression": { + "patterns": [ + { + "include": "#regexp-base-expression" + }, + { + "include": "#single-three-regexp-character-set" + }, + { + "include": "#single-three-regexp-comments" + }, + { + "include": "#regexp-flags" + }, + { + "include": "#single-three-regexp-named-group" + }, + { + "include": "#regexp-backreference" + }, + { + "include": "#single-three-regexp-lookahead" + }, + { + "include": "#single-three-regexp-lookahead-negative" + }, + { + "include": "#single-three-regexp-lookbehind" + }, + { + "include": "#single-three-regexp-lookbehind-negative" + }, + { + "include": "#single-three-regexp-conditional" + }, + { + "include": "#single-three-regexp-parentheses-non-capturing" + }, + { + "include": "#single-three-regexp-parentheses" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-character-set": { + "patterns": [ + { + "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" + }, + { + "name": "meta.character.set.regexp", + "begin": "(\\[)(\\^)?(\\])?", + "end": "(\\]|(?=\\'\\'\\'))", + "beginCaptures": { + "1": { + "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + }, + "3": { + "name": "constant.character.set.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.character.set.end.regexp constant.other.set.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#regexp-charecter-set-escapes" + }, + { + "name": "constant.character.set.regexp", + "match": "[^\\n]" + } + ] + } + ] + }, + "single-three-regexp-named-group": { + "name": "meta.named.regexp", + "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.group.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-comments": { + "name": "comment.regexp", + "begin": "\\(\\?#", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "punctuation.comment.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.comment.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "single-three-regexp-lookahead": { + "begin": "(\\()\\?=", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-lookahead-negative": { + "begin": "(\\()\\?!", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-lookbehind": { + "begin": "(\\()\\?<=", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-lookbehind-negative": { + "begin": "(\\()\\?<!", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-conditional": { + "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.conditional.regexp" + }, + "1": { + "name": "punctuation.parenthesis.conditional.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-parentheses-non-capturing": { + "begin": "\\(\\?:", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-parentheses": { + "begin": "\\(", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "double-one-regexp-expression": { + "patterns": [ + { + "include": "#regexp-base-expression" + }, + { + "include": "#double-one-regexp-character-set" + }, + { + "include": "#double-one-regexp-comments" + }, + { + "include": "#regexp-flags" + }, + { + "include": "#double-one-regexp-named-group" + }, + { + "include": "#regexp-backreference" + }, + { + "include": "#double-one-regexp-lookahead" + }, + { + "include": "#double-one-regexp-lookahead-negative" + }, + { + "include": "#double-one-regexp-lookbehind" + }, + { + "include": "#double-one-regexp-lookbehind-negative" + }, + { + "include": "#double-one-regexp-conditional" + }, + { + "include": "#double-one-regexp-parentheses-non-capturing" + }, + { + "include": "#double-one-regexp-parentheses" + } + ] + }, + "double-one-regexp-character-set": { + "patterns": [ + { + "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" + }, + { + "name": "meta.character.set.regexp", + "begin": "(\\[)(\\^)?(\\])?", + "end": "(\\]|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "1": { + "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + }, + "3": { + "name": "constant.character.set.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.character.set.end.regexp constant.other.set.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#regexp-charecter-set-escapes" + }, + { + "name": "constant.character.set.regexp", + "match": "[^\\n]" + } + ] + } + ] + }, + "double-one-regexp-named-group": { + "name": "meta.named.regexp", + "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.group.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-comments": { + "name": "comment.regexp", + "begin": "\\(\\?#", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "punctuation.comment.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.comment.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "double-one-regexp-lookahead": { + "begin": "(\\()\\?=", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-lookahead-negative": { + "begin": "(\\()\\?!", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-lookbehind": { + "begin": "(\\()\\?<=", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-lookbehind-negative": { + "begin": "(\\()\\?<!", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-conditional": { + "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.conditional.regexp" + }, + "1": { + "name": "punctuation.parenthesis.conditional.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-parentheses-non-capturing": { + "begin": "\\(\\?:", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-parentheses": { + "begin": "\\(", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-three-regexp-expression": { + "patterns": [ + { + "include": "#regexp-base-expression" + }, + { + "include": "#double-three-regexp-character-set" + }, + { + "include": "#double-three-regexp-comments" + }, + { + "include": "#regexp-flags" + }, + { + "include": "#double-three-regexp-named-group" + }, + { + "include": "#regexp-backreference" + }, + { + "include": "#double-three-regexp-lookahead" + }, + { + "include": "#double-three-regexp-lookahead-negative" + }, + { + "include": "#double-three-regexp-lookbehind" + }, + { + "include": "#double-three-regexp-lookbehind-negative" + }, + { + "include": "#double-three-regexp-conditional" + }, + { + "include": "#double-three-regexp-parentheses-non-capturing" + }, + { + "include": "#double-three-regexp-parentheses" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-character-set": { + "patterns": [ + { + "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" + }, + { + "name": "meta.character.set.regexp", + "begin": "(\\[)(\\^)?(\\])?", + "end": "(\\]|(?=\"\"\"))", + "beginCaptures": { + "1": { + "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + }, + "3": { + "name": "constant.character.set.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.character.set.end.regexp constant.other.set.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#regexp-charecter-set-escapes" + }, + { + "name": "constant.character.set.regexp", + "match": "[^\\n]" + } + ] + } + ] + }, + "double-three-regexp-named-group": { + "name": "meta.named.regexp", + "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.group.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-comments": { + "name": "comment.regexp", + "begin": "\\(\\?#", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "punctuation.comment.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.comment.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "double-three-regexp-lookahead": { + "begin": "(\\()\\?=", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-lookahead-negative": { + "begin": "(\\()\\?!", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-lookbehind": { + "begin": "(\\()\\?<=", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-lookbehind-negative": { + "begin": "(\\()\\?<!", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-conditional": { + "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.conditional.regexp" + }, + "1": { + "name": "punctuation.parenthesis.conditional.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-parentheses-non-capturing": { + "begin": "\\(\\?:", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-parentheses": { + "begin": "\\(", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "regexp-single-one-line": { + "name": "string.regexp.quoted.single.python", + "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\\')", + "end": "(\\')|(?<!\\\\)(\\n)", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "storage.type.string.python" + }, + "5": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "regexp-single-three-line": { + "name": "string.regexp.quoted.multi.python", + "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\\'\\'\\')", + "end": "(\\'\\'\\')", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "storage.type.string.python" + }, + "5": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + } + ] + }, + "regexp-double-one-line": { + "name": "string.regexp.quoted.single.python", + "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\")", + "end": "(\")|(?<!\\\\)(\\n)", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "storage.type.string.python" + }, + "5": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "regexp-double-three-line": { + "name": "string.regexp.quoted.multi.python", + "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\"\"\")", + "end": "(\"\"\")", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "storage.type.string.python" + }, + "5": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + } + ] + }, + "string-raw-quoted-single-line": { + "name": "string.quoted.raw.single.python", + "begin": "\\b(([uU]R)|(R))((['\"]))", + "end": "(\\4)|((?<!\\\\)\\n)", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-single-bad-brace1-formatting-raw" + }, + { + "include": "#string-single-bad-brace2-formatting-raw" + }, + { + "include": "#string-raw-guts" + } + ] + }, + "string-bin-quoted-single-line": { + "name": "string.quoted.binary.single.python", + "begin": "(\\b[bB])((['\"]))", + "end": "(\\2)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-entity" + } + ] + }, + "string-raw-bin-quoted-single-line": { + "name": "string.quoted.raw.binary.single.python", + "begin": "(\\b(?:R[bB]|[bB]R))((['\"]))", + "end": "(\\2)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-raw-bin-guts" + } + ] + }, + "string-quoted-single-line": { + "name": "string.quoted.single.python", + "begin": "(?:\\b([rR])(?=[uU]))?([uU])?((['\"]))", + "end": "(\\3)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "invalid.illegal.prefix.python" + }, + "2": { + "name": "storage.type.string.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-single-bad-brace1-formatting-unicode" + }, + { + "include": "#string-single-bad-brace2-formatting-unicode" + }, + { + "include": "#string-unicode-guts" + } + ] + }, + "string-single-bad-brace1-formatting-unicode": { + "comment": "template using {% ... %}", + "begin": "(?x)\n (?= \\{%\n ( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n %\\}\n )\n", + "end": "(?=(['\"])|((?<!\\\\)\\n))", + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#escape-sequence" + }, + { + "include": "#string-line-continuation" + } + ] + }, + "string-single-bad-brace1-formatting-raw": { + "comment": "template using {% ... %}", + "begin": "(?x)\n (?= \\{%\n ( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n %\\}\n )\n", + "end": "(?=(['\"])|((?<!\\\\)\\n))", + "patterns": [ + { + "include": "#string-consume-escape" + } + ] + }, + "string-single-bad-brace2-formatting-unicode": { + "comment": "odd format or format-like syntax", + "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n )\n .*?(?!(['\"])|((?<!\\\\)\\n))\n \\}\n )\n", + "end": "(?=(['\"])|((?<!\\\\)\\n))", + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#string-entity" + } + ] + }, + "string-single-bad-brace2-formatting-raw": { + "comment": "odd format or format-like syntax", + "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n )\n .*?(?!(['\"])|((?<!\\\\)\\n))\n \\}\n )\n", + "end": "(?=(['\"])|((?<!\\\\)\\n))", + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#string-formatting" + } + ] + }, + "string-raw-quoted-multi-line": { + "name": "string.quoted.raw.multi.python", + "begin": "\\b(([uU]R)|(R))('''|\"\"\")", + "end": "(\\4)", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-multi-bad-brace1-formatting-raw" + }, + { + "include": "#string-multi-bad-brace2-formatting-raw" + }, + { + "include": "#string-raw-guts" + } + ] + }, + "string-bin-quoted-multi-line": { + "name": "string.quoted.binary.multi.python", + "begin": "(\\b[bB])('''|\"\"\")", + "end": "(\\2)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-entity" + } + ] + }, + "string-raw-bin-quoted-multi-line": { + "name": "string.quoted.raw.binary.multi.python", + "begin": "(\\b(?:R[bB]|[bB]R))('''|\"\"\")", + "end": "(\\2)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-raw-bin-guts" + } + ] + }, + "string-quoted-multi-line": { + "name": "string.quoted.multi.python", + "begin": "(?:\\b([rR])(?=[uU]))?([uU])?('''|\"\"\")", + "end": "(\\3)", + "beginCaptures": { + "1": { + "name": "invalid.illegal.prefix.python" + }, + "2": { + "name": "storage.type.string.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-multi-bad-brace1-formatting-unicode" + }, + { + "include": "#string-multi-bad-brace2-formatting-unicode" + }, + { + "include": "#string-unicode-guts" + } + ] + }, + "string-multi-bad-brace1-formatting-unicode": { + "comment": "template using {% ... %}", + "begin": "(?x)\n (?= \\{%\n ( .*? (?!'''|\"\"\") )\n %\\}\n )\n", + "end": "(?='''|\"\"\")", + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#escape-sequence" + }, + { + "include": "#string-line-continuation" + } + ] + }, + "string-multi-bad-brace1-formatting-raw": { + "comment": "template using {% ... %}", + "begin": "(?x)\n (?= \\{%\n ( .*? (?!'''|\"\"\") )\n %\\}\n )\n", + "end": "(?='''|\"\"\")", + "patterns": [ + { + "include": "#string-consume-escape" + } + ] + }, + "string-multi-bad-brace2-formatting-unicode": { + "comment": "odd format or format-like syntax", + "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n )\n .*?(?!'''|\"\"\")\n \\}\n )\n", + "end": "(?='''|\"\"\")", + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#string-entity" + } + ] + }, + "string-multi-bad-brace2-formatting-raw": { + "comment": "odd format or format-like syntax", + "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n )\n .*?(?!'''|\"\"\")\n \\}\n )\n", + "end": "(?='''|\"\"\")", + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#string-formatting" + } + ] + }, + "fstring-fnorm-quoted-single-line": { + "name": "meta.fstring.python", + "begin": "(\\b[fF])([bBuU])?((['\"]))", + "end": "(\\3)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "string.interpolated.python string.quoted.single.python storage.type.string.python" + }, + "2": { + "name": "invalid.illegal.prefix.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python string.interpolated.python string.quoted.single.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-guts" + }, + { + "include": "#fstring-illegal-single-brace" + }, + { + "include": "#fstring-single-brace" + }, + { + "include": "#fstring-single-core" + } + ] + }, + "fstring-normf-quoted-single-line": { + "name": "meta.fstring.python", + "begin": "(\\b[bBuU])([fF])((['\"]))", + "end": "(\\3)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "invalid.illegal.prefix.python" + }, + "2": { + "name": "string.interpolated.python string.quoted.single.python storage.type.string.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python string.quoted.single.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-guts" + }, + { + "include": "#fstring-illegal-single-brace" + }, + { + "include": "#fstring-single-brace" + }, + { + "include": "#fstring-single-core" + } + ] + }, + "fstring-raw-quoted-single-line": { + "name": "meta.fstring.python", + "begin": "(\\b(?:[rR][fF]|[fF][rR]))((['\"]))", + "end": "(\\2)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "string.interpolated.python string.quoted.raw.single.python storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python string.quoted.raw.single.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.single.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-raw-guts" + }, + { + "include": "#fstring-illegal-single-brace" + }, + { + "include": "#fstring-single-brace" + }, + { + "include": "#fstring-raw-single-core" + } + ] + }, + "fstring-single-core": { + "name": "string.interpolated.python string.quoted.single.python", + "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n))\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n" + }, + "fstring-raw-single-core": { + "name": "string.interpolated.python string.quoted.raw.single.python", + "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n))\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n" + }, + "fstring-single-brace": { + "comment": "value interpolation using { ... }", + "begin": "(\\{)", + "end": "(?x)\n (\\})|(?=\\n)\n", + "beginCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "endCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "patterns": [ + { + "include": "#fstring-terminator-single" + }, + { + "include": "#f-expression" + } + ] + }, + "fstring-terminator-single": { + "patterns": [ + { + "name": "storage.type.format.python", + "match": "(=(![rsa])?)(?=})" + }, + { + "name": "storage.type.format.python", + "match": "(=?![rsa])(?=})" + }, + { + "match": "(?x)\n ( (?: =?) (?: ![rsa])? )\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n", + "captures": { + "1": { + "name": "storage.type.format.python" + }, + "2": { + "name": "storage.type.format.python" + } + } + }, + { + "include": "#fstring-terminator-single-tail" + } + ] + }, + "fstring-terminator-single-tail": { + "begin": "((?:=?)(?:![rsa])?)(:)(?=.*?{)", + "end": "(?=})|(?=\\n)", + "beginCaptures": { + "1": { + "name": "storage.type.format.python" + }, + "2": { + "name": "storage.type.format.python" + } + }, + "patterns": [ + { + "include": "#fstring-illegal-single-brace" + }, + { + "include": "#fstring-single-brace" + }, + { + "name": "storage.type.format.python", + "match": "([bcdeEfFgGnosxX%])(?=})" + }, + { + "name": "storage.type.format.python", + "match": "(\\.\\d+)" + }, + { + "name": "storage.type.format.python", + "match": "(,)" + }, + { + "name": "storage.type.format.python", + "match": "(\\d+)" + }, + { + "name": "storage.type.format.python", + "match": "(\\#)" + }, + { + "name": "storage.type.format.python", + "match": "([-+ ])" + }, + { + "name": "storage.type.format.python", + "match": "([<>=^])" + }, + { + "name": "storage.type.format.python", + "match": "(\\w)" + } + ] + }, + "fstring-fnorm-quoted-multi-line": { + "name": "meta.fstring.python", + "begin": "(\\b[fF])([bBuU])?('''|\"\"\")", + "end": "(\\3)", + "beginCaptures": { + "1": { + "name": "string.interpolated.python string.quoted.multi.python storage.type.string.python" + }, + "2": { + "name": "invalid.illegal.prefix.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python string.interpolated.python string.quoted.multi.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-guts" + }, + { + "include": "#fstring-illegal-multi-brace" + }, + { + "include": "#fstring-multi-brace" + }, + { + "include": "#fstring-multi-core" + } + ] + }, + "fstring-normf-quoted-multi-line": { + "name": "meta.fstring.python", + "begin": "(\\b[bBuU])([fF])('''|\"\"\")", + "end": "(\\3)", + "beginCaptures": { + "1": { + "name": "invalid.illegal.prefix.python" + }, + "2": { + "name": "string.interpolated.python string.quoted.multi.python storage.type.string.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python string.quoted.multi.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-guts" + }, + { + "include": "#fstring-illegal-multi-brace" + }, + { + "include": "#fstring-multi-brace" + }, + { + "include": "#fstring-multi-core" + } + ] + }, + "fstring-raw-quoted-multi-line": { + "name": "meta.fstring.python", + "begin": "(\\b(?:[rR][fF]|[fF][rR]))('''|\"\"\")", + "end": "(\\2)", + "beginCaptures": { + "1": { + "name": "string.interpolated.python string.quoted.raw.multi.python storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python string.quoted.raw.multi.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.multi.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-raw-guts" + }, + { + "include": "#fstring-illegal-multi-brace" + }, + { + "include": "#fstring-multi-brace" + }, + { + "include": "#fstring-raw-multi-core" + } + ] + }, + "fstring-multi-core": { + "name": "string.interpolated.python string.quoted.multi.python", + "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|'''|\"\"\")\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n" + }, + "fstring-raw-multi-core": { + "name": "string.interpolated.python string.quoted.raw.multi.python", + "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|'''|\"\"\")\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n" + }, + "fstring-multi-brace": { + "comment": "value interpolation using { ... }", + "begin": "(\\{)", + "end": "(?x)\n (\\})\n", + "beginCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "endCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "patterns": [ + { + "include": "#fstring-terminator-multi" + }, + { + "include": "#f-expression" + } + ] + }, + "fstring-terminator-multi": { + "patterns": [ + { + "name": "storage.type.format.python", + "match": "(=(![rsa])?)(?=})" + }, + { + "name": "storage.type.format.python", + "match": "(=?![rsa])(?=})" + }, + { + "match": "(?x)\n ( (?: =?) (?: ![rsa])? )\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n", + "captures": { + "1": { + "name": "storage.type.format.python" + }, + "2": { + "name": "storage.type.format.python" + } + } + }, + { + "include": "#fstring-terminator-multi-tail" + } + ] + }, + "fstring-terminator-multi-tail": { + "begin": "((?:=?)(?:![rsa])?)(:)(?=.*?{)", + "end": "(?=})", + "beginCaptures": { + "1": { + "name": "storage.type.format.python" + }, + "2": { + "name": "storage.type.format.python" + } + }, + "patterns": [ + { + "include": "#fstring-illegal-multi-brace" + }, + { + "include": "#fstring-multi-brace" + }, + { + "name": "storage.type.format.python", + "match": "([bcdeEfFgGnosxX%])(?=})" + }, + { + "name": "storage.type.format.python", + "match": "(\\.\\d+)" + }, + { + "name": "storage.type.format.python", + "match": "(,)" + }, + { + "name": "storage.type.format.python", + "match": "(\\d+)" + }, + { + "name": "storage.type.format.python", + "match": "(\\#)" + }, + { + "name": "storage.type.format.python", + "match": "([-+ ])" + }, + { + "name": "storage.type.format.python", + "match": "([<>=^])" + }, + { + "name": "storage.type.format.python", + "match": "(\\w)" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/r.tmLanguage.json b/src/lib/shiki/languages/r.tmLanguage.json new file mode 100644 index 0000000..19b3d47 --- /dev/null +++ b/src/lib/shiki/languages/r.tmLanguage.json @@ -0,0 +1,642 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/Ikuyadeu/vscode-R/blob/master/syntax/r.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/Ikuyadeu/vscode-R/commit/ff60e426f66503f3c9533c7a62a8fd3f9f6c53df", + "name": "r", + "scopeName": "source.r", + "patterns": [ + { + "include": "#roxygen" + }, + { + "include": "#comments" + }, + { + "include": "#constants" + }, + { + "include": "#keywords" + }, + { + "include": "#storage-type" + }, + { + "include": "#strings" + }, + { + "include": "#brackets" + }, + { + "include": "#function-declarations" + }, + { + "include": "#lambda-functions" + }, + { + "include": "#builtin-functions" + }, + { + "include": "#function-calls" + }, + { + "include": "#general-variables" + } + ], + "repository": { + "comments": { + "patterns": [ + { + "captures": { + "1": { + "name": "comment.line.pragma.r" + }, + "2": { + "name": "entity.name.pragma.name.r" + } + }, + "match": "^(#pragma[ \\t]+mark)[ \\t](.*)", + "name": "comment.line.pragma-mark.r" + }, + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.r" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.r" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.r" + } + ] + } + ] + }, + "constants": { + "patterns": [ + { + "match": "\\b(pi|letters|LETTERS|month\\.abb|month\\.name)\\b", + "name": "support.constant.misc.r" + }, + { + "match": "\\b(TRUE|FALSE|NULL|NA|NA_integer_|NA_real_|NA_complex_|NA_character_|Inf|NaN)\\b", + "name": "constant.language.r" + }, + { + "match": "\\b0(x|X)[0-9a-fA-F]+i\\b", + "name": "constant.numeric.imaginary.hexadecimal.r" + }, + { + "match": "\\b[0-9]+\\.?[0-9]*(?:(e|E)(\\+|-)?[0-9]+)?i\\b", + "name": "constant.numeric.imaginary.decimal.r" + }, + { + "match": "\\.[0-9]+(?:(e|E)(\\+|-)?[0-9]+)?i\\b", + "name": "constant.numeric.imaginary.decimal.r" + }, + { + "match": "\\b0(x|X)[0-9a-fA-F]+L\\b", + "name": "constant.numeric.integer.hexadecimal.r" + }, + { + "match": "\\b(?:[0-9]+\\.?[0-9]*)(?:(e|E)(\\+|-)?[0-9]+)?L\\b", + "name": "constant.numeric.integer.decimal.r" + }, + { + "match": "\\b0(x|X)[0-9a-fA-F]+\\b", + "name": "constant.numeric.float.hexadecimal.r" + }, + { + "match": "\\b[0-9]+\\.?[0-9]*(?:(e|E)(\\+|-)?[0-9]+)?\\b", + "name": "constant.numeric.float.decimal.r" + }, + { + "match": "\\.[0-9]+(?:(e|E)(\\+|-)?[0-9]+)?\\b", + "name": "constant.numeric.float.decimal.r" + } + ] + }, + "general-variables": { + "patterns": [ + { + "captures": { + "1": { + "name": "variable.parameter.r" + }, + "2": { + "name": "keyword.operator.assignment.r" + } + }, + "match": "([[:alpha:].][[:alnum:]._]*)\\s*(=)(?=[^=])" + }, + { + "captures": { + "1": { + "name": "variable.parameter.r" + }, + "2": { + "name": "keyword.operator.assignment.r" + } + }, + "match": "(`[^`]+`)\\s*(=)(?=[^=])" + }, + { + "match": "\\b([\\d_][[:alnum:]._]+)\\b", + "name": "invalid.illegal.variable.other.r" + }, + { + "match": "\\b([[:alnum:]_]+)(?=::)", + "name": "entity.namespace.r" + }, + { + "match": "\\b([[:alnum:]._]+)\\b", + "name": "variable.other.r" + }, + { + "match": "(`[^`]+`)", + "name": "variable.other.r" + } + ] + }, + "keywords": { + "patterns": [ + { + "match": "\\b(break|next|repeat|else|in)\\b", + "name": "keyword.control.r" + }, + { + "match": "\\b(ifelse|if|for|return|switch|while|invisible)\\b(?=\\s*\\()", + "name": "keyword.control.r" + }, + { + "match": "(\\-|\\+|\\*|\\/|%\\/%|%%|%\\*%|%o%|%x%|\\^)", + "name": "keyword.operator.arithmetic.r" + }, + { + "match": "(:=|<-|<<-|->|->>)", + "name": "keyword.operator.assignment.r" + }, + { + "match": "(==|<=|>=|!=|<>|<|>|%in%)", + "name": "keyword.operator.comparison.r" + }, + { + "match": "(!|&{1,2}|[|]{1,2})", + "name": "keyword.operator.logical.r" + }, + { + "match": "(\\|>)", + "name": "keyword.operator.pipe.r" + }, + { + "match": "(%between%|%chin%|%like%|%\\+%|%\\+replace%|%:%|%do%|%dopar%|%>%|%<>%|%T>%|%\\$%)", + "name": "keyword.operator.other.r" + }, + { + "match": "(\\.\\.\\.|\\$|:|\\~|@)", + "name": "keyword.other.r" + } + ] + }, + "storage-type": { + "patterns": [ + { + "match": "\\b(character|complex|double|expression|integer|list|logical|numeric|single|raw)\\b(?=\\s*\\()", + "name": "storage.type.r" + } + ] + }, + "strings": { + "patterns": [ + { + "begin": "[rR]\"(-*)\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.raw.begin.r" + } + }, + "end": "\\]\\1\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.raw.end.r" + } + }, + "name": "string.quoted.double.raw.r" + }, + { + "begin": "[rR]'(-*)\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.raw.begin.r" + } + }, + "end": "\\]\\1'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.raw.end.r" + } + }, + "name": "string.quoted.single.raw.r" + }, + { + "begin": "[rR]\"(-*)\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.raw.begin.r" + } + }, + "end": "\\}\\1\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.raw.end.r" + } + }, + "name": "string.quoted.double.raw.r" + }, + { + "begin": "[rR]'(-*)\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.raw.begin.r" + } + }, + "end": "\\}\\1'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.raw.end.r" + } + }, + "name": "string.quoted.single.raw.r" + }, + { + "begin": "[rR]\"(-*)\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.raw.begin.r" + } + }, + "end": "\\)\\1\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.raw.end.r" + } + }, + "name": "string.quoted.double.raw.r" + }, + { + "begin": "[rR]'(-*)\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.raw.begin.r" + } + }, + "end": "\\)\\1'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.raw.end.r" + } + }, + "name": "string.quoted.single.raw.r" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.r" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.r" + } + }, + "name": "string.quoted.double.r", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.r" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.r" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.r" + } + }, + "name": "string.quoted.single.r", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.r" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.r" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.r" + } + }, + "patterns": [ + { + "include": "source.r" + } + ] + }, + { + "begin": "\\[(?!\\[)", + "beginCaptures": { + "0": { + "name": "punctuation.section.brackets.single.begin.r" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.section.brackets.single.end.r" + } + }, + "patterns": [ + { + "include": "source.r" + } + ] + }, + { + "begin": "\\[\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.brackets.double.begin.r" + } + }, + "end": "\\]\\]", + "endCaptures": { + "0": { + "name": "punctuation.section.brackets.double.end.r" + } + }, + "contentName": "meta.item-access.arguments.r", + "patterns": [ + { + "include": "source.r" + } + ] + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.braces.begin.r" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.braces.end.r" + } + }, + "patterns": [ + { + "include": "source.r" + } + ] + } + ] + }, + "function-declarations": { + "patterns": [ + { + "match": "((?:`[^`\\\\]*(?:\\\\.[^`\\\\]*)*`)|(?:[[:alpha:].][[:alnum:]._]*))\\s*(<?<-|=(?!=))\\s*(function|\\\\)(?!\\w)", + "captures": { + "1": { + "name": "entity.name.function.r" + }, + "2": { + "name": "keyword.operator.assignment.r" + }, + "3": { + "name": "keyword.control.r" + } + }, + "name": "meta.function.r", + "patterns": [ + { + "include": "#lambda-functions" + } + ] + } + ] + }, + "lambda-functions": { + "patterns": [ + { + "begin": "\\b(function)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.control.r" + }, + "2": { + "name": "punctuation.section.parens.begin.r" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.r" + } + }, + "name": "meta.function.r", + "contentName": "meta.function.parameters.r", + "patterns": [ + { + "include": "#comments" + }, + { + "match": "(?:[a-zA-Z._][\\w.]*|`[^`]+`)", + "name": "variable.other.r" + }, + { + "begin": "(?==)", + "end": "(?=[,)])", + "patterns": [ + { + "include": "source.r" + } + ] + }, + { + "match": ",", + "name": "punctuation.separator.parameters.r" + } + ] + } + ] + }, + "function-calls": { + "begin": "(?:\\b|(?=\\.))((?:[a-zA-Z._][\\w.]*|`[^`]+`))\\s*(\\()", + "beginCaptures": { + "1": { + "name": "variable.function.r" + }, + "2": { + "name": "punctuation.section.parens.begin.r" + } + }, + "contentName": "meta.function-call.arguments.r", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.parens.end.r" + } + }, + "name": "meta.function-call.r", + "patterns": [ + { + "include": "#function-parameters" + } + ] + }, + "function-parameters": { + "patterns": [ + { + "name": "meta.function-call.r", + "contentName": "meta.function-call.parameters.r" + }, + { + "match": "(?:[a-zA-Z._][\\w.]*|`[^`]+`)(?=\\s[^=])", + "name": "variable.other.r" + }, + { + "begin": "(?==)", + "end": "(?=[,)])", + "patterns": [ + { + "include": "source.r" + } + ] + }, + { + "match": ",", + "name": "punctuation.separator.parameters.r" + }, + { + "include": "source.r" + } + ] + }, + "roxygen": { + "patterns": [ + { + "begin": "^\\s*(#')\\s*", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.r" + } + }, + "end": "$\\n?", + "name": "comment.line.roxygen.r", + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.other.r" + }, + "2": { + "name": "variable.parameter.r" + } + }, + "match": "(@param)\\s*((?:[a-zA-Z._][\\w.]*|`[^`]+`))" + }, + { + "match": "@[a-zA-Z0-9]+", + "name": "keyword.other.r" + } + ] + } + ] + }, + "builtin-functions": { + "patterns": [ + { + "match": "\\b(abbreviate|abs|acos|acosh|addNA|addTaskCallback|agrep|agrepl|alist|all|all\\.equal|all\\.equal.character|all\\.equal.default|all\\.equal.environment|all\\.equal.envRefClass|all\\.equal.factor|all\\.equal.formula|all\\.equal.language|all\\.equal.list|all\\.equal.numeric|all\\.equal.POSIXt|all\\.equal.raw|all\\.names|all\\.vars|any|anyDuplicated|anyDuplicated\\.array|anyDuplicated\\.data.frame|anyDuplicated\\.default|anyDuplicated\\.matrix|anyNA|anyNA\\.numeric_version|anyNA\\.POSIXlt|aperm|aperm\\.default|aperm\\.table|append|apply|Arg|args|array|arrayInd|as\\.array|as\\.array.default|as\\.call|as\\.character|as\\.character.condition|as\\.character.Date|as\\.character.default|as\\.character.error|as\\.character.factor|as\\.character.hexmode|as\\.character.numeric_version|as\\.character.octmode|as\\.character.POSIXt|as\\.character.srcref|as\\.complex|as\\.data.frame|as\\.data.frame.array|as\\.data.frame.AsIs|as\\.data.frame.character|as\\.data.frame.complex|as\\.data.frame.data.frame|as\\.data.frame.Date|as\\.data.frame.default|as\\.data.frame.difftime|as\\.data.frame.factor|as\\.data.frame.integer|as\\.data.frame.list|as\\.data.frame.logical|as\\.data.frame.matrix|as\\.data.frame.model.matrix|as\\.data.frame.noquote|as\\.data.frame.numeric|as\\.data.frame.numeric_version|as\\.data.frame.ordered|as\\.data.frame.POSIXct|as\\.data.frame.POSIXlt|as\\.data.frame.raw|as\\.data.frame.table|as\\.data.frame.ts|as\\.data.frame.vector|as\\.Date|as\\.Date.character|as\\.Date.date|as\\.Date.dates|as\\.Date.default|as\\.Date.factor|as\\.Date.numeric|as\\.Date.POSIXct|as\\.Date.POSIXlt|as\\.difftime|as\\.double|as\\.double.difftime|as\\.double.POSIXlt|as\\.environment|as\\.expression|as\\.expression.default|as\\.factor|as\\.function|as\\.function.default|as\\.hexmode|as\\.integer|as\\.list|as\\.list.data.frame|as\\.list.Date|as\\.list.default|as\\.list.environment|as\\.list.factor|as\\.list.function|as\\.list.numeric_version|as\\.list.POSIXct|as\\.logical|as\\.logical.factor|as\\.matrix|as\\.matrix.data.frame|as\\.matrix.default|as\\.matrix.noquote|as\\.matrix.POSIXlt|as\\.name|as\\.null|as\\.null.default|as\\.numeric|as\\.numeric_version|as\\.octmode|as\\.ordered|as\\.package_version|as\\.pairlist|as\\.POSIXct|as\\.POSIXct.date|as\\.POSIXct.Date|as\\.POSIXct.dates|as\\.POSIXct.default|as\\.POSIXct.numeric|as\\.POSIXct.POSIXlt|as\\.POSIXlt|as\\.POSIXlt.character|as\\.POSIXlt.date|as\\.POSIXlt.Date|as\\.POSIXlt.dates|as\\.POSIXlt.default|as\\.POSIXlt.factor|as\\.POSIXlt.numeric|as\\.POSIXlt.POSIXct|as\\.qr|as\\.raw|as\\.single|as\\.single.default|as\\.symbol|as\\.table|as\\.table.default|as\\.vector|as\\.vector.factor|asin|asinh|asNamespace|asS3|asS4|assign|atan|atan2|atanh|attach|attachNamespace|attr|attr\\.all.equal|attributes|autoload|autoloader|backsolve|baseenv|basename|besselI|besselJ|besselK|besselY|beta|bindingIsActive|bindingIsLocked|bindtextdomain|bitwAnd|bitwNot|bitwOr|bitwShiftL|bitwShiftR|bitwXor|body|bquote|break|browser|browserCondition|browserSetDebug|browserText|builtins|by|by\\.data.frame|by\\.default|bzfile|c|c\\.Date|c\\.difftime|c\\.noquote|c\\.numeric_version|c\\.POSIXct|c\\.POSIXlt|c\\.warnings|call|callCC|capabilities|casefold|cat|cbind|cbind\\.data.frame|ceiling|char\\.expand|character|charmatch|charToRaw|chartr|check_tzones|chkDots|chol|chol\\.default|chol2inv|choose|class|clearPushBack|close|close\\.connection|close\\.srcfile|close\\.srcfilealias|closeAllConnections|col|colMeans|colnames|colSums|commandArgs|comment|complex|computeRestarts|conditionCall|conditionCall\\.condition|conditionMessage|conditionMessage\\.condition|conflicts|Conj|contributors|cos|cosh|cospi|crossprod|Cstack_info|cummax|cummin|cumprod|cumsum|curlGetHeaders|cut|cut\\.Date|cut\\.default|cut\\.POSIXt|data\\.class|data\\.frame|data\\.matrix|date|debug|debuggingState|debugonce|default\\.stringsAsFactors|delayedAssign|deparse|det|detach|determinant|determinant\\.matrix|dget|diag|diff|diff\\.Date|diff\\.default|diff\\.difftime|diff\\.POSIXt|difftime|digamma|dim|dim\\.data.frame|dimnames|dimnames\\.data.frame|dir|dir\\.create|dir\\.exists|dirname|do\\.call|dontCheck|double|dput|dQuote|drop|droplevels|droplevels\\.data.frame|droplevels\\.factor|dump|duplicated|duplicated\\.array|duplicated\\.data.frame|duplicated\\.default|duplicated\\.matrix|duplicated\\.numeric_version|duplicated\\.POSIXlt|duplicated\\.warnings|dyn\\.load|dyn\\.unload|dynGet|eapply|eigen|emptyenv|enc2native|enc2utf8|encodeString|Encoding|endsWith|enquote|env\\.profile|environment|environmentIsLocked|environmentName|eval|eval\\.parent|evalq|exists|exp|expand\\.grid|expm1|expression|extSoftVersion|factor|factorial|fifo|file|file\\.access|file\\.append|file\\.choose|file\\.copy|file\\.create|file\\.exists|file\\.info|file\\.link|file\\.mode|file\\.mtime|file\\.path|file\\.remove|file\\.rename|file\\.show|file\\.size|file\\.symlink|Filter|Find|find\\.package|findInterval|findPackageEnv|findRestart|floor|flush|flush\\.connection|for|force|forceAndCall|formals|format|format\\.AsIs|format\\.data.frame|format\\.Date|format\\.default|format\\.difftime|format\\.factor|format\\.hexmode|format\\.info|format\\.libraryIQR|format\\.numeric_version|format\\.octmode|format\\.packageInfo|format\\.POSIXct|format\\.POSIXlt|format\\.pval|format\\.summaryDefault|formatC|formatDL|forwardsolve|function|gamma|gc|gc\\.time|gcinfo|gctorture|gctorture2|get|get0|getAllConnections|getCallingDLL|getCallingDLLe|getConnection|getDLLRegisteredRoutines|getDLLRegisteredRoutines\\.character|getDLLRegisteredRoutines\\.DLLInfo|getElement|geterrmessage|getExportedValue|getHook|getLoadedDLLs|getNamespace|getNamespaceExports|getNamespaceImports|getNamespaceInfo|getNamespaceName|getNamespaceUsers|getNamespaceVersion|getNativeSymbolInfo|getOption|getRversion|getSrcLines|getTaskCallbackNames|gettext|gettextf|getwd|gl|globalenv|gregexpr|grep|grepl|grepRaw|grouping|gsub|gzcon|gzfile|I|iconv|iconvlist|icuGetCollate|icuSetCollate|identical|identity|if|ifelse|Im|importIntoEnv|inherits|integer|interaction|interactive|intersect|intToBits|intToUtf8|inverse\\.rle|invisible|invokeRestart|invokeRestartInteractively|is\\.array|is\\.atomic|is\\.call|is\\.character|is\\.complex|is\\.data.frame|is\\.double|is\\.element|is\\.environment|is\\.expression|is\\.factor|is\\.finite|is\\.function|is\\.infinite|is\\.integer|is\\.language|is\\.list|is\\.loaded|is\\.logical|is\\.matrix|is\\.na|is\\.na.data.frame|is\\.na.numeric_version|is\\.na.POSIXlt|is\\.name|is\\.nan|is\\.null|is\\.numeric|is\\.numeric_version|is\\.numeric.Date|is\\.numeric.difftime|is\\.numeric.POSIXt|is\\.object|is\\.ordered|is\\.package_version|is\\.pairlist|is\\.primitive|is\\.qr|is\\.R|is\\.raw|is\\.recursive|is\\.single|is\\.symbol|is\\.table|is\\.unsorted|is\\.vector|isatty|isBaseNamespace|isdebugged|isIncomplete|isNamespace|isNamespaceLoaded|ISOdate|ISOdatetime|isOpen|isRestart|isS4|isSeekable|isSymmetric|isSymmetric\\.matrix|isTRUE|jitter|julian|julian\\.Date|julian\\.POSIXt|kappa|kappa\\.default|kappa\\.lm|kappa\\.qr|kronecker|l10n_info|La_library|La_version|La\\.svd|labels|labels\\.default|lapply|lazyLoad|lazyLoadDBexec|lazyLoadDBfetch|lbeta|lchoose|length|length\\.POSIXlt|lengths|levels|levels\\.default|lfactorial|lgamma|libcurlVersion|library|library\\.dynam|library\\.dynam.unload|licence|license|list|list\\.dirs|list\\.files|list2env|load|loadedNamespaces|loadingNamespaceInfo|loadNamespace|local|lockBinding|lockEnvironment|log|log10|log1p|log2|logb|logical|lower\\.tri|ls|make\\.names|make\\.unique|makeActiveBinding|Map|mapply|margin\\.table|mat\\.or.vec|match|match\\.arg|match\\.call|match\\.fun|Math\\.data.frame|Math\\.Date|Math\\.difftime|Math\\.factor|Math\\.POSIXt|matrix|max|max\\.col|mean|mean\\.Date|mean\\.default|mean\\.difftime|mean\\.POSIXct|mean\\.POSIXlt|mem\\.limits|memCompress|memDecompress|memory\\.profile|merge|merge\\.data.frame|merge\\.default|message|mget|min|missing|Mod|mode|months|months\\.Date|months\\.POSIXt|names|names\\.POSIXlt|namespaceExport|namespaceImport|namespaceImportClasses|namespaceImportFrom|namespaceImportMethods|nargs|nchar|ncol|NCOL|Negate|new\\.env|next|NextMethod|ngettext|nlevels|noquote|norm|normalizePath|nrow|NROW|numeric|numeric_version|nzchar|objects|oldClass|OlsonNames|on\\.exit|open|open\\.connection|open\\.srcfile|open\\.srcfilealias|open\\.srcfilecopy|Ops\\.data.frame|Ops\\.Date|Ops\\.difftime|Ops\\.factor|Ops\\.numeric_version|Ops\\.ordered|Ops\\.POSIXt|options|order|ordered|outer|package_version|packageEvent|packageHasNamespace|packageStartupMessage|packBits|pairlist|parent\\.env|parent\\.frame|parse|parseNamespaceFile|paste|paste0|path\\.expand|path\\.package|pcre_config|pipe|pmatch|pmax|pmax\\.int|pmin|pmin\\.int|polyroot|pos\\.to.env|Position|pretty|pretty\\.default|prettyNum|print|print\\.AsIs|print\\.by|print\\.condition|print\\.connection|print\\.data.frame|print\\.Date|print\\.default|print\\.difftime|print\\.Dlist|print\\.DLLInfo|print\\.DLLInfoList|print\\.DLLRegisteredRoutines|print\\.eigen|print\\.factor|print\\.function|print\\.hexmode|print\\.libraryIQR|print\\.listof|print\\.NativeRoutineList|print\\.noquote|print\\.numeric_version|print\\.octmode|print\\.packageInfo|print\\.POSIXct|print\\.POSIXlt|print\\.proc_time|print\\.restart|print\\.rle|print\\.simple.list|print\\.srcfile|print\\.srcref|print\\.summary.table|print\\.summaryDefault|print\\.table|print\\.warnings|prmatrix|proc\\.time|prod|prop\\.table|provideDimnames|psigamma|pushBack|pushBackLength|q|qr|qr\\.coef|qr\\.default|qr\\.fitted|qr\\.Q|qr\\.qty|qr\\.qy|qr\\.R|qr\\.resid|qr\\.solve|qr\\.X|quarters|quarters\\.Date|quarters\\.POSIXt|quit|quote|R_system_version|R\\.home|R\\.Version|range|range\\.default|rank|rapply|raw|rawConnection|rawConnectionValue|rawShift|rawToBits|rawToChar|rbind|rbind\\.data.frame|rcond|Re|read\\.dcf|readBin|readChar|readline|readLines|readRDS|readRenviron|Recall|Reduce|reg\\.finalizer|regexec|regexpr|registerS3method|registerS3methods|regmatches|remove|removeTaskCallback|rep|rep_len|rep\\.Date|rep\\.factor|rep\\.int|rep\\.numeric_version|rep\\.POSIXct|rep\\.POSIXlt|repeat|replace|replicate|require|requireNamespace|restartDescription|restartFormals|retracemem|return|returnValue|rev|rev\\.default|rle|rm|RNGkind|RNGversion|round|round\\.Date|round\\.POSIXt|row|row\\.names|row\\.names.data.frame|row\\.names.default|rowMeans|rownames|rowsum|rowsum\\.data.frame|rowsum\\.default|rowSums|sample|sample\\.int|sapply|save|save\\.image|saveRDS|scale|scale\\.default|scan|search|searchpaths|seek|seek\\.connection|seq|seq_along|seq_len|seq\\.Date|seq\\.default|seq\\.int|seq\\.POSIXt|sequence|serialize|set\\.seed|setdiff|setequal|setHook|setNamespaceInfo|setSessionTimeLimit|setTimeLimit|setwd|showConnections|shQuote|sign|signalCondition|signif|simpleCondition|simpleError|simpleMessage|simpleWarning|simplify2array|sin|single|sinh|sink|sink\\.number|sinpi|slice\\.index|socketConnection|socketSelect|solve|solve\\.default|solve\\.qr|sort|sort\\.default|sort\\.int|sort\\.list|sort\\.POSIXlt|source|split|split\\.data.frame|split\\.Date|split\\.default|split\\.POSIXct|sprintf|sqrt|sQuote|srcfile|srcfilealias|srcfilecopy|srcref|standardGeneric|startsWith|stderr|stdin|stdout|stop|stopifnot|storage\\.mode|strftime|strptime|strrep|strsplit|strtoi|strtrim|structure|strwrap|sub|subset|subset\\.data.frame|subset\\.default|subset\\.matrix|substitute|substr|substring|sum|summary|summary\\.connection|summary\\.data.frame|Summary\\.data.frame|summary\\.Date|Summary\\.Date|summary\\.default|Summary\\.difftime|summary\\.factor|Summary\\.factor|summary\\.matrix|Summary\\.numeric_version|Summary\\.ordered|summary\\.POSIXct|Summary\\.POSIXct|summary\\.POSIXlt|Summary\\.POSIXlt|summary\\.proc_time|summary\\.srcfile|summary\\.srcref|summary\\.table|suppressMessages|suppressPackageStartupMessages|suppressWarnings|svd|sweep|switch|sys\\.call|sys\\.calls|Sys\\.chmod|Sys\\.Date|sys\\.frame|sys\\.frames|sys\\.function|Sys\\.getenv|Sys\\.getlocale|Sys\\.getpid|Sys\\.glob|Sys\\.info|sys\\.load.image|Sys\\.localeconv|sys\\.nframe|sys\\.on.exit|sys\\.parent|sys\\.parents|Sys\\.readlink|sys\\.save.image|Sys\\.setenv|Sys\\.setFileTime|Sys\\.setlocale|Sys\\.sleep|sys\\.source|sys\\.status|Sys\\.time|Sys\\.timezone|Sys\\.umask|Sys\\.unsetenv|Sys\\.which|system|system\\.file|system\\.time|system2|t|t\\.data.frame|t\\.default|table|tabulate|tan|tanh|tanpi|tapply|taskCallbackManager|tcrossprod|tempdir|tempfile|testPlatformEquivalence|textConnection|textConnectionValue|tolower|topenv|toString|toString\\.default|toupper|trace|traceback|tracemem|tracingState|transform|transform\\.data.frame|transform\\.default|trigamma|trimws|trunc|trunc\\.Date|trunc\\.POSIXt|truncate|truncate\\.connection|try|tryCatch|typeof|unclass|undebug|union|unique|unique\\.array|unique\\.data.frame|unique\\.default|unique\\.matrix|unique\\.numeric_version|unique\\.POSIXlt|unique\\.warnings|units|units\\.difftime|unix\\.time|unlink|unlist|unloadNamespace|unlockBinding|unname|unserialize|unsplit|untrace|untracemem|unz|upper\\.tri|url|UseMethod|utf8ToInt|validEnc|validUTF8|vapply|vector|Vectorize|warning|warnings|weekdays|weekdays\\.Date|weekdays\\.POSIXt|which|which\\.max|which\\.min|while|with|with\\.default|withAutoprint|withCallingHandlers|within|within\\.data.frame|within\\.list|withRestarts|withVisible|write|write\\.dcf|writeBin|writeChar|writeLines|xor|xor\\.hexmode|xor\\.octmode|xpdrows\\.data.frame|xtfrm|xtfrm\\.AsIs|xtfrm\\.Date|xtfrm\\.default|xtfrm\\.difftime|xtfrm\\.factor|xtfrm\\.numeric_version|xtfrm\\.POSIXct|xtfrm\\.POSIXlt|xtfrm\\.Surv|xzfile|zapsmall)\\s*(\\()", + "captures": { + "1": { + "name": "support.function.r" + } + } + }, + { + "match": "\\b(abline|arrows|assocplot|axis|Axis|axis\\.Date|Axis\\.Date|Axis\\.default|axis\\.POSIXct|Axis\\.POSIXt|Axis\\.table|axTicks|barplot|barplot\\.default|box|boxplot|boxplot\\.default|boxplot\\.formula|boxplot\\.matrix|bxp|cdplot|cdplot\\.default|cdplot\\.formula|clip|close\\.screen|co\\.intervals|contour|contour\\.default|coplot|curve|dotchart|erase\\.screen|filled\\.contour|fourfoldplot|frame|grconvertX|grconvertY|grid|hist|hist\\.Date|hist\\.default|hist\\.POSIXt|identify|identify\\.default|image|image\\.default|layout|layout\\.show|lcm|legend|lines|lines\\.default|lines\\.formula|lines\\.histogram|lines\\.table|locator|matlines|matplot|matpoints|mosaicplot|mosaicplot\\.default|mosaicplot\\.formula|mtext|pairs|pairs\\.default|pairs\\.formula|panel\\.smooth|par|persp|persp\\.default|pie|piechart|plot|plot\\.data.frame|plot\\.default|plot\\.design|plot\\.factor|plot\\.formula|plot\\.function|plot\\.histogram|plot\\.new|plot\\.raster|plot\\.table|plot\\.window|plot\\.xy|plotHclust|points|points\\.default|points\\.formula|points\\.table|polygon|polypath|rasterImage|rect|rug|screen|segments|smoothScatter|spineplot|spineplot\\.default|spineplot\\.formula|split\\.screen|stars|stem|strheight|stripchart|stripchart\\.default|stripchart\\.formula|strwidth|sunflowerplot|sunflowerplot\\.default|sunflowerplot\\.formula|symbols|text|text\\.default|text\\.formula|title|xinch|xspline|xyinch|yinch)\\s*(\\()", + "captures": { + "1": { + "name": "support.function.r" + } + } + }, + { + "match": "\\b(adjustcolor|anyNA\\.raster|as\\.graphicsAnnot|as\\.matrix.raster|as\\.raster|as\\.raster.array|as\\.raster.character|as\\.raster.logical|as\\.raster.matrix|as\\.raster.numeric|as\\.raster.raster|as\\.raster.raw|axisTicks|bitmap|bmp|boxplot\\.stats|c2to3|cairo_pdf|cairo_ps|cairoVersion|check_for_XQuartz|check_gs_type|check\\.options|checkFont|checkFont\\.CIDFont|checkFont\\.default|checkFont\\.Type1Font|checkFontInUse|checkIntFormat|checkQuartzFont|checkX11Font|chromaticAdaptation|chull|CIDFont|cm|cm\\.colors|col2rgb|colorConverter|colorRamp|colorRampPalette|colors|colours|contourLines|convertColor|densCols|dev\\.capabilities|dev\\.capture|dev\\.control|dev\\.copy|dev\\.copy2eps|dev\\.copy2pdf|dev\\.cur|dev\\.displaylist|dev\\.flush|dev\\.hold|dev\\.interactive|dev\\.list|dev\\.new|dev\\.next|dev\\.off|dev\\.prev|dev\\.print|dev\\.set|dev\\.size|dev2bitmap|devAskNewPage|deviceIsInteractive|embedFonts|extendrange|getGraphicsEvent|getGraphicsEventEnv|graphics\\.off|gray|gray\\.colors|grey|grey\\.colors|grSoftVersion|guessEncoding|hcl|heat\\.colors|hsv|initPSandPDFfonts|is\\.na.raster|is\\.raster|isPDF|jpeg|make\\.rgb|matchEncoding|matchEncoding\\.CIDFont|matchEncoding\\.Type1Font|matchFont|n2mfrow|nclass\\.FD|nclass\\.scott|nclass\\.Sturges|Ops\\.raster|palette|pdf|pdf\\.options|pdfFonts|pictex|png|postscript|postscriptFonts|prettyDate|print\\.colorConverter|print\\.raster|print\\.recordedplot|print\\.RGBcolorConverter|printFont|printFont\\.CIDFont|printFont\\.Type1Font|printFonts|ps\\.options|quartz|quartz\\.options|quartz\\.save|quartzFont|quartzFonts|rainbow|recordGraphics|recordPalette|recordPlot|replayPlot|restoreRecordedPlot|rgb|rgb2hsv|savePlot|seqDtime|setEPS|setFonts|setGraphicsEventEnv|setGraphicsEventHandlers|setPS|setQuartzFonts|setX11Fonts|svg|terrain\\.colors|tiff|topo\\.colors|trans3d|trunc_POSIXt|Type1Font|x11|X11|X11\\.options|X11Font|X11FontError|X11Fonts|xfig|xy\\.coords|xyTable|xyz\\.coords)\\s*(\\()", + "captures": { + "1": { + "name": "support.function.r" + } + } + }, + { + "match": "\\b(addNextMethod|allGenerics|allNames|Arith|as|asMethodDefinition|assignClassDef|assignMethodsMetaData|balanceMethodsList|bind_activation|cacheGenericsMetaData|cacheMetaData|cacheMethod|cacheOnAssign|callGeneric|callNextMethod|canCoerce|cbind|cbind2|checkAtAssignment|checkSlotAssignment|classesToAM|classGeneratorFunction|classLabel|classMetaName|className|coerce|Compare|completeClassDefinition|completeExtends|completeSubclasses|Complex|conformMethod|defaultDumpName|defaultPrototype|dispatchIsInternal|doPrimitiveMethod|dumpMethod|dumpMethods|el|elNamed|empty\\.dump|emptyMethodsList|envRefInferField|envRefSetField|evalOnLoad|evalqOnLoad|evalSource|existsFunction|existsMethod|extends|externalRefMethod|finalDefaultMethod|findClass|findFunction|findMethod|findMethods|findMethodSignatures|findUnique|fixPre1\\.8|formalArgs|fromNextMethod|functionBody|generic\\.skeleton|genericForBasic|getAccess|getAllMethods|getAllSuperClasses|getClass|getClassDef|getClasses|getClassName|getClassPackage|getDataPart|getExtends|getFunction|getGeneric|getGenericFromCall|getGenerics|getGroup|getGroupMembers|getLoadActions|getMethod|getMethods|getMethodsAndAccessors|getMethodsForDispatch|getMethodsMetaData|getPackageName|getProperties|getPrototype|getRefClass|getRefSuperClasses|getSlots|getSubclasses|getValidity|getVirtual|hasArg|hasLoadAction|hasMethod|hasMethods|implicitGeneric|inBasicFuns|inferProperties|inheritedSlotNames|inheritedSubMethodLists|initFieldArgs|initialize|initMethodDispatch|initRefFields|insertClassMethods|insertMethod|insertMethodInEmptyList|insertSource|installClassMethod|is|isBaseFun|isClass|isClassDef|isClassUnion|isGeneric|isGrammarSymbol|isGroup|isMixin|isRematched|isS3Generic|isSealedClass|isSealedMethod|isVirtualClass|isXS3Class|kronecker|languageEl|linearizeMlist|listFromMethods|listFromMlist|loadMethod|Logic|makeClassMethod|makeClassRepresentation|makeEnvRefMethods|makeExtends|makeGeneric|makeMethodsList|makePrototypeFromClassDef|makeStandardGeneric|matchDefaults|matchSignature|Math|Math2|mergeMethods|metaNameUndo|method\\.skeleton|MethodAddCoerce|methodSignatureMatrix|MethodsList|MethodsListSelect|methodsPackageMetaName|missingArg|mlistMetaName|multipleClasses|new|newBasic|newClassRepresentation|newEmptyObject|Ops|outerLabels|packageSlot|possibleExtends|print\\.MethodsList|printClassRepresentation|printPropertiesList|prohibitGeneric|promptClass|promptMethods|prototype|Quote|rbind|rbind2|reconcilePropertiesAndPrototype|refClassFields|refClassInformation|refClassMethods|refClassPrompt|refObjectClass|registerImplicitGenerics|rematchDefinition|removeClass|removeGeneric|removeMethod|removeMethods|removeMethodsObject|representation|requireMethods|resetClass|resetGeneric|S3Class|S3forS4Methods|S3Part|sealClass|seemsS4Object|selectMethod|selectSuperClasses|setAs|setCacheOnAssign|setClass|setClassUnion|setDataPart|setGeneric|setGenericImplicit|setGroupGeneric|setIs|setLoadAction|setLoadActions|setMethod|setNames|setOldClass|setPackageName|setPrimitiveMethods|setRefClass|setReplaceMethod|setValidity|show|showClass|showClassMethod|showDefault|showExtends|showExtraSlots|showMethods|showMlist|showRefClassDef|signature|SignatureMethod|sigToEnv|slot|slotNames|slotsFromS3|substituteDirect|substituteFunctionArgs|Summary|superClassDepth|superClassMethodName|tableNames|testInheritedMethods|testVirtual|traceOff|traceOn|tryNew|unRematchDefinition|useMTable|validObject|validSlotNames)\\s*(\\()", + "captures": { + "1": { + "name": "support.function.r" + } + } + }, + { + "match": "\\b(acf|acf2AR|add\\.name|add1|add1\\.default|add1\\.glm|add1\\.lm|add1\\.mlm|addmargins|aggregate|aggregate\\.data.frame|aggregate\\.default|aggregate\\.formula|aggregate\\.ts|AIC|AIC\\.default|AIC\\.logLik|alias|alias\\.formula|alias\\.lm|anova|anova\\.glm|anova\\.glmlist|anova\\.lm|anova\\.lmlist|anova\\.loess|anova\\.mlm|anova\\.mlmlist|anova\\.nls|anovalist\\.nls|ansari\\.test|ansari\\.test.default|ansari\\.test.formula|aov|approx|approxfun|ar|ar\\.burg|ar\\.burg.default|ar\\.burg.mts|ar\\.mle|ar\\.ols|ar\\.yw|ar\\.yw.default|ar\\.yw.mts|arima|arima\\.sim|arima0|arima0\\.diag|ARMAacf|ARMAtoMA|as\\.data.frame.aovproj|as\\.data.frame.ftable|as\\.data.frame.logLik|as\\.dendrogram|as\\.dendrogram.dendrogram|as\\.dendrogram.hclust|as\\.dist|as\\.dist.default|as\\.formula|as\\.hclust|as\\.hclust.default|as\\.hclust.dendrogram|as\\.hclust.twins|as\\.matrix.dist|as\\.matrix.ftable|as\\.stepfun|as\\.stepfun.default|as\\.stepfun.isoreg|as\\.table.ftable|as\\.ts|as\\.ts.default|asOneSidedFormula|ave|bandwidth\\.kernel|bartlett\\.test|bartlett\\.test.default|bartlett\\.test.formula|BIC|BIC\\.default|BIC\\.logLik|binom\\.test|binomial|biplot|biplot\\.default|biplot\\.prcomp|biplot\\.princomp|Box\\.test|bw_pair_cnts|bw\\.bcv|bw\\.nrd|bw\\.nrd0|bw\\.SJ|bw\\.ucv|C|cancor|case\\.names|case\\.names.default|case\\.names.lm|cbind\\.ts|ccf|check_exact|chisq\\.test|cmdscale|coef|coef\\.aov|coef\\.Arima|coef\\.default|coef\\.listof|coef\\.maov|coef\\.nls|coefficients|complete\\.cases|confint|confint\\.default|confint\\.glm|confint\\.lm|confint\\.nls|constrOptim|contr\\.helmert|contr\\.poly|contr\\.SAS|contr\\.sum|contr\\.treatment|contrasts|convolve|cooks\\.distance|cooks\\.distance.glm|cooks\\.distance.lm|cophenetic|cophenetic\\.default|cophenetic\\.dendrogram|cor|cor\\.test|cor\\.test.default|cor\\.test.formula|cov|cov\\.wt|cov2cor|covratio|cpgram|cut\\.dendrogram|cutree|cycle|cycle\\.default|cycle\\.ts|D|dbeta|dbinom|dcauchy|dchisq|decompose|delete\\.response|deltat|deltat\\.default|dendrapply|density|density\\.default|deriv|deriv\\.default|deriv\\.formula|deriv3|deriv3\\.default|deriv3\\.formula|deviance|deviance\\.default|deviance\\.glm|deviance\\.lm|deviance\\.mlm|deviance\\.nls|dexp|df|df\\.kernel|df\\.residual|df\\.residual.default|df\\.residual.nls|dfbeta|dfbeta\\.lm|dfbetas|dfbetas\\.lm|dffits|dgamma|dgeom|dhyper|diff\\.ts|diffinv|diffinv\\.default|diffinv\\.ts|diffinv\\.vector|dist|dlnorm|dlogis|dmultinom|dnbinom|dnorm|dpois|drop\\.name|drop\\.terms|drop1|drop1\\.default|drop1\\.glm|drop1\\.lm|drop1\\.mlm|dsignrank|dt|dummy\\.coef|dummy\\.coef.aovlist|dummy\\.coef.lm|dunif|dweibull|dwilcox|ecdf|eff\\.aovlist|effects|effects\\.glm|effects\\.lm|embed|end|end\\.default|estVar|estVar\\.mlm|estVar\\.SSD|expand\\.model.frame|extractAIC|extractAIC\\.aov|extractAIC\\.coxph|extractAIC\\.glm|extractAIC\\.lm|extractAIC\\.negbin|extractAIC\\.survreg|factanal|factanal\\.fit.mle|factor\\.name|family|family\\.glm|family\\.lm|fft|filter|fisher\\.test|fitted|fitted\\.default|fitted\\.isoreg|fitted\\.kmeans|fitted\\.nls|fitted\\.smooth.spline|fitted\\.values|fivenum|fligner\\.test|fligner\\.test.default|fligner\\.test.formula|format_perc|format\\.dist|format\\.ftable|format\\.perc|formula|formula\\.character|formula\\.data.frame|formula\\.default|formula\\.formula|formula\\.glm|formula\\.lm|formula\\.nls|formula\\.terms|frequency|frequency\\.default|friedman\\.test|friedman\\.test.default|friedman\\.test.formula|ftable|ftable\\.default|ftable\\.formula|Gamma|gaussian|get_all_vars|getCall|getCall\\.default|getInitial|getInitial\\.default|getInitial\\.formula|getInitial\\.selfStart|glm|glm\\.control|glm\\.fit|hasTsp|hat|hatvalues|hatvalues\\.lm|hatvalues\\.smooth.spline|hclust|heatmap|HL|HoltWinters|hyman_filter|identify\\.hclust|influence|influence\\.glm|influence\\.lm|influence\\.measures|integrate|interaction\\.plot|inverse\\.gaussian|IQR|is\\.empty.model|is\\.leaf|is\\.mts|is\\.stepfun|is\\.ts|is\\.tskernel|isoreg|KalmanForecast|KalmanLike|KalmanRun|KalmanSmooth|kernapply|kernapply\\.default|kernapply\\.ts|kernapply\\.tskernel|kernapply\\.vector|kernel|kmeans|knots|knots\\.stepfun|kruskal\\.test|kruskal\\.test.default|kruskal\\.test.formula|ks\\.test|ksmooth|labels\\.dendrogram|labels\\.dist|labels\\.lm|labels\\.terms|lag|lag\\.default|lag\\.plot|line|lines\\.isoreg|lines\\.stepfun|lines\\.ts|lm|lm\\.fit|lm\\.influence|lm\\.wfit|loadings|loess|loess\\.control|loess\\.smooth|logLik|logLik\\.Arima|logLik\\.glm|logLik\\.lm|logLik\\.logLik|logLik\\.nls|loglin|lowess|ls\\.diag|ls\\.print|lsfit|mad|mahalanobis|make\\.link|make\\.tables.aovproj|make\\.tables.aovprojlist|makeARIMA|makepredictcall|makepredictcall\\.default|makepredictcall\\.poly|manova|mantelhaen\\.test|mauchly\\.test|mauchly\\.test.mlm|mauchly\\.test.SSD|mcnemar\\.test|median|median\\.default|medpolish|merge\\.dendrogram|midcache\\.dendrogram|model\\.extract|model\\.frame|model\\.frame.aovlist|model\\.frame.default|model\\.frame.glm|model\\.frame.lm|model\\.matrix|model\\.matrix.default|model\\.matrix.lm|model\\.offset|model\\.response|model\\.tables|model\\.tables.aov|model\\.tables.aovlist|model\\.weights|monthplot|monthplot\\.default|monthplot\\.stl|monthplot\\.StructTS|monthplot\\.ts|mood\\.test|mood\\.test.default|mood\\.test.formula|mvfft|n\\.knots|na\\.action|na\\.action.default|na\\.contiguous|na\\.contiguous.default|na\\.exclude|na\\.exclude.data.frame|na\\.exclude.default|na\\.fail|na\\.fail.default|na\\.omit|na\\.omit.data.frame|na\\.omit.default|na\\.omit.ts|na\\.pass|napredict|napredict\\.default|napredict\\.exclude|naprint|naprint\\.default|naprint\\.exclude|naprint\\.omit|naresid|naresid\\.default|naresid\\.exclude|nextn|nleaves|nlm|nlminb|nls|nls_port_fit|nls\\.control|nlsModel|nlsModel\\.plinear|NLSstAsymptotic|NLSstAsymptotic\\.sortedXyData|NLSstClosestX|NLSstClosestX\\.sortedXyData|NLSstLfAsymptote|NLSstLfAsymptote\\.sortedXyData|NLSstRtAsymptote|NLSstRtAsymptote\\.sortedXyData|nobs|nobs\\.default|nobs\\.dendrogram|nobs\\.glm|nobs\\.lm|nobs\\.logLik|nobs\\.nls|numericDeriv|offset|oneway\\.test|Ops\\.ts|optim|optimHess|optimise|optimize|order\\.dendrogram|p\\.adjust|pacf|pacf\\.default|pairwise\\.prop.test|pairwise\\.t.test|pairwise\\.table|pairwise\\.wilcox.test|pbeta|pbinom|pbirthday|pcauchy|pchisq|pexp|pf|pgamma|pgeom|phyper|Pillai|plclust|plnorm|plogis|plot\\.acf|plot\\.decomposed.ts|plot\\.dendrogram|plot\\.density|plot\\.ecdf|plot\\.hclust|plot\\.HoltWinters|plot\\.isoreg|plot\\.lm|plot\\.medpolish|plot\\.mlm|plot\\.ppr|plot\\.prcomp|plot\\.princomp|plot\\.profile.nls|plot\\.spec|plot\\.spec.coherency|plot\\.spec.phase|plot\\.stepfun|plot\\.stl|plot\\.ts|plot\\.tskernel|plot\\.TukeyHSD|plotNode|plotNodeLimit|pnbinom|pnorm|pointwise|poisson|poisson\\.test|poly|polym|port_get_named_v|port_msg|power|power\\.anova.test|power\\.prop.test|power\\.t.test|PP\\.test|ppoints|ppois|ppr|ppr\\.default|ppr\\.formula|prcomp|prcomp\\.default|prcomp\\.formula|predict|predict\\.ar|predict\\.Arima|predict\\.arima0|predict\\.glm|predict\\.HoltWinters|predict\\.lm|predict\\.loess|predict\\.mlm|predict\\.nls|predict\\.poly|predict\\.ppr|predict\\.prcomp|predict\\.princomp|predict\\.smooth.spline|predict\\.smooth.spline.fit|predict\\.StructTS|predLoess|preplot|princomp|princomp\\.default|princomp\\.formula|print\\.acf|print\\.anova|print\\.aov|print\\.aovlist|print\\.ar|print\\.Arima|print\\.arima0|print\\.dendrogram|print\\.density|print\\.dist|print\\.dummy_coef|print\\.dummy_coef_list|print\\.ecdf|print\\.factanal|print\\.family|print\\.formula|print\\.ftable|print\\.glm|print\\.hclust|print\\.HoltWinters|print\\.htest|print\\.infl|print\\.integrate|print\\.isoreg|print\\.kmeans|print\\.lm|print\\.loadings|print\\.loess|print\\.logLik|print\\.medpolish|print\\.mtable|print\\.nls|print\\.pairwise.htest|print\\.power.htest|print\\.ppr|print\\.prcomp|print\\.princomp|print\\.smooth.spline|print\\.stepfun|print\\.stl|print\\.StructTS|print\\.summary.aov|print\\.summary.aovlist|print\\.summary.ecdf|print\\.summary.glm|print\\.summary.lm|print\\.summary.loess|print\\.summary.manova|print\\.summary.nls|print\\.summary.ppr|print\\.summary.prcomp|print\\.summary.princomp|print\\.tables_aov|print\\.terms|print\\.ts|print\\.tskernel|print\\.TukeyHSD|print\\.tukeyline|print\\.tukeysmooth|print\\.xtabs|printCoefmat|profile|profile\\.nls|profiler|profiler\\.nls|proj|proj\\.aov|proj\\.aovlist|proj\\.default|proj\\.lm|proj\\.matrix|promax|prop\\.test|prop\\.trend.test|psignrank|pt|ptukey|punif|pweibull|pwilcox|qbeta|qbinom|qbirthday|qcauchy|qchisq|qexp|qf|qgamma|qgeom|qhyper|qlnorm|qlogis|qnbinom|qnorm|qpois|qqline|qqnorm|qqnorm\\.default|qqplot|qr\\.lm|qsignrank|qt|qtukey|quade\\.test|quade\\.test.default|quade\\.test.formula|quantile|quantile\\.default|quantile\\.ecdf|quantile\\.POSIXt|quasi|quasibinomial|quasipoisson|qunif|qweibull|qwilcox|r2dtable|Rank|rbeta|rbinom|rcauchy|rchisq|read\\.ftable|rect\\.hclust|reformulate|regularize\\.values|relevel|relevel\\.default|relevel\\.factor|relevel\\.ordered|reorder|reorder\\.default|reorder\\.dendrogram|replications|reshape|resid|residuals|residuals\\.default|residuals\\.glm|residuals\\.HoltWinters|residuals\\.isoreg|residuals\\.lm|residuals\\.nls|residuals\\.smooth.spline|residuals\\.tukeyline|rev\\.dendrogram|rexp|rf|rgamma|rgeom|rhyper|rlnorm|rlogis|rmultinom|rnbinom|rnorm|Roy|rpois|rsignrank|rstandard|rstandard\\.glm|rstandard\\.lm|rstudent|rstudent\\.glm|rstudent\\.lm|rt|runif|runmed|rweibull|rwilcox|rWishart|safe_pchisq|safe_pf|scatter\\.smooth|screeplot|screeplot\\.default|sd|se\\.aov|se\\.aovlist|se\\.contrast|se\\.contrast.aov|se\\.contrast.aovlist|selfStart|selfStart\\.default|selfStart\\.formula|setNames|shapiro\\.test|sigma|sigma\\.default|sigma\\.mlm|simpleLoess|simulate|simulate\\.lm|smooth|smooth\\.spline|smoothEnds|sortedXyData|sortedXyData\\.default|spec\\.ar|spec\\.pgram|spec\\.taper|spectrum|sphericity|spl_coef_conv|spline|splinefun|splinefunH|splinefunH0|SSasymp|SSasympOff|SSasympOrig|SSbiexp|SSD|SSD\\.mlm|SSfol|SSfpl|SSgompertz|SSlogis|SSmicmen|SSweibull|start|start\\.default|stat\\.anova|step|stepfun|stl|str\\.dendrogram|str\\.logLik|StructTS|summary\\.aov|summary\\.aovlist|summary\\.ecdf|summary\\.glm|summary\\.infl|summary\\.lm|summary\\.loess|summary\\.manova|summary\\.mlm|summary\\.nls|summary\\.ppr|summary\\.prcomp|summary\\.princomp|summary\\.stepfun|summary\\.stl|summary\\.tukeysmooth|supsmu|symnum|t\\.test|t\\.test.default|t\\.test.formula|t\\.ts|termplot|terms|terms\\.aovlist|terms\\.default|terms\\.formula|terms\\.terms|Thin\\.col|Thin\\.row|time|time\\.default|time\\.ts|toeplitz|Tr|ts|ts\\.intersect|ts\\.plot|ts\\.union|tsdiag|tsdiag\\.Arima|tsdiag\\.arima0|tsdiag\\.StructTS|tsp|tsSmooth|tsSmooth\\.StructTS|TukeyHSD|TukeyHSD\\.aov|uniroot|update|update\\.default|update\\.formula|var|var\\.test|var\\.test.default|var\\.test.formula|variable\\.names|variable\\.names.default|variable\\.names.lm|varimax|vcov|vcov\\.Arima|vcov\\.glm|vcov\\.lm|vcov\\.mlm|vcov\\.nls|vcov\\.summary.glm|vcov\\.summary.lm|weighted\\.mean|weighted\\.mean.Date|weighted\\.mean.default|weighted\\.mean.difftime|weighted\\.mean.POSIXct|weighted\\.mean.POSIXlt|weighted\\.residuals|weights|weights\\.default|weights\\.glm|weights\\.nls|wilcox\\.test|wilcox\\.test.default|wilcox\\.test.formula|Wilks|window|window\\.default|window\\.ts|write\\.ftable|xtabs)\\s*(\\()", + "captures": { + "1": { + "name": "support.function.r" + } + } + }, + { + "match": "\\b(adist|alarm|apropos|aregexec|argNames|argsAnywhere|as\\.bibentry|as\\.bibentry.bibentry|as\\.bibentry.citation|as\\.character.person|as\\.character.roman|as\\.person|as\\.person.default|as\\.personList|as\\.personList.default|as\\.personList.person|as\\.relistable|as\\.roman|aspell|aspell_find_dictionaries|aspell_find_program|aspell_inspect_context|aspell_package|aspell_package_C_files|aspell_package_description|aspell_package_pot_files|aspell_package_R_files|aspell_package_Rd_files|aspell_package_vignettes|aspell_R_C_files|aspell_R_manuals|aspell_R_R_files|aspell_R_Rd_files|aspell_R_vignettes|aspell_write_personal_dictionary_file|assignInMyNamespace|assignInNamespace|attachedPackageCompletions|available\\.packages|bibentry|blank_out_ignores_in_lines|blank_out_regexp_matches|browseEnv|browseURL|browseVignettes|bug\\.report|bug\\.report.info|c\\.bibentry|c\\.person|capture\\.output|changedFiles|check_for_XQuartz|checkCRAN|chooseBioCmirror|chooseCRANmirror|citation|cite|citeNatbib|citEntry|citFooter|citHeader|close\\.socket|close\\.txtProgressBar|combn|compareVersion|contrib\\.url|correctFilenameToken|count\\.fields|CRAN\\.packages|create\\.post|data|data\\.entry|dataentry|de|de\\.ncols|de\\.restore|de\\.setup|debugcall|debugger|defaultUserAgent|demo|download\\.file|download\\.packages|dump\\.frames|edit|edit\\.data.frame|edit\\.default|edit\\.matrix|edit\\.vignette|emacs|example|expr2token|file_test|file\\.edit|fileCompletionPreferred|fileCompletions|fileSnapshot|filter_packages_by_depends_predicates|find|find_files_in_directories|findExactMatches|findFuzzyMatches|findGeneric|findLineNum|findMatches|fix|fixInNamespace|flush\\.console|fnLineNum|format\\.aspell|format\\.bibentry|format\\.citation|format\\.news_db|format\\.object_size|format\\.person|format\\.roman|formatOL|formatUL|functionArgs|fuzzyApropos|get_parse_data_for_message_strings|getAnywhere|getCRANmirrors|getDependencies|getFromNamespace|getIsFirstArg|getKnownS3generics|getParseData|getParseText|getRcode|getRcode\\.vignette|getS3method|getSrcDirectory|getSrcfile|getSrcFilename|getSrcLocation|getSrcref|getTxtProgressBar|glob2rx|globalVariables|hasName|head|head\\.data.frame|head\\.default|head\\.ftable|head\\.function|head\\.matrix|head\\.table|help|help\\.request|help\\.search|help\\.start|helpCompletions|history|hsearch_db|hsearch_db_concepts|hsearch_db_keywords|index\\.search|inFunction|install\\.packages|installed\\.packages|is\\.relistable|isBasePkg|isInsideQuotes|isS3method|isS3stdGeneric|keywordCompletions|limitedLabels|loadedPackageCompletions|loadhistory|localeToCharset|ls\\.str|lsf\\.str|maintainer|make_sysdata_rda|make\\.packages.html|make\\.socket|makeRegexpSafe|makeRweaveLatexCodeRunner|makeUserAgent|matchAvailableTopics|memory\\.limit|memory\\.size|menu|merge_demo_index|merge_vignette_index|methods|mirror2html|modifyList|new\\.packages|news|normalCompletions|nsl|object\\.size|offline_help_helper|old\\.packages|Ops\\.roman|package\\.skeleton|packageDescription|packageName|packageStatus|packageVersion|page|person|personList|pico|print\\.aspell|print\\.aspell_inspect_context|print\\.bibentry|print\\.Bibtex|print\\.browseVignettes|print\\.changedFiles|print\\.citation|print\\.fileSnapshot|print\\.findLineNumResult|print\\.getAnywhere|print\\.help_files_with_topic|print\\.hsearch|print\\.hsearch_db|print\\.Latex|print\\.ls_str|print\\.MethodsFunction|print\\.news_db|print\\.object_size|print\\.packageDescription|print\\.packageIQR|print\\.packageStatus|print\\.person|print\\.roman|print\\.sessionInfo|print\\.socket|print\\.summary.packageStatus|print\\.vignette|printhsearchInternal|process\\.events|prompt|prompt\\.data.frame|prompt\\.default|promptData|promptImport|promptPackage|rc\\.getOption|rc\\.options|rc\\.settings|rc\\.status|read\\.csv|read\\.csv2|read\\.delim|read\\.delim2|read\\.DIF|read\\.fortran|read\\.fwf|read\\.socket|read\\.table|readCitationFile|recover|registerNames|regquote|relist|relist\\.default|relist\\.factor|relist\\.list|relist\\.matrix|remove\\.packages|removeSource|rep\\.bibentry|rep\\.roman|resolvePkgType|Rprof|Rprof_memory_summary|Rprofmem|RShowDoc|RSiteSearch|rtags|rtags\\.file|Rtangle|RtangleFinish|RtangleRuncode|RtangleSetup|RtangleWritedoc|RweaveChunkPrefix|RweaveEvalWithOpt|RweaveLatex|RweaveLatexFinish|RweaveLatexOptions|RweaveLatexRuncode|RweaveLatexSetup|RweaveLatexWritedoc|RweaveTryStop|savehistory|select\\.list|sessionInfo|setBreakpoint|setIsFirstArg|setRepositories|setTxtProgressBar|shorten\\.to.string|simplifyRepos|sort\\.bibentry|specialCompletions|specialFunctionArgs|specialOpCompletionsHelper|specialOpLocs|stack|stack\\.data.frame|stack\\.default|Stangle|str|str\\.data.frame|str\\.Date|str\\.default|str\\.POSIXt|strcapture|strextract|strOptions|substr_with_tabs|summary\\.aspell|summary\\.packageStatus|summaryRprof|suppressForeignCheck|Sweave|SweaveGetSyntax|SweaveHooks|SweaveParseOptions|SweaveReadFile|SweaveSyntConv|tail|tail\\.data.frame|tail\\.default|tail\\.ftable|tail\\.function|tail\\.matrix|tail\\.table|tar|timestamp|toBibtex|toBibtex\\.bibentry|toBibtex\\.person|toLatex|toLatex\\.sessionInfo|topicName|txtProgressBar|type\\.convert|undebugcall|unique\\.bibentry|unlist\\.relistable|unstack|unstack\\.data.frame|unstack\\.default|untar|untar2|unzip|update\\.packages|update\\.packageStatus|upgrade|upgrade\\.packageStatus|url\\.show|URLdecode|URLencode|vi|View|vignette|write\\.csv|write\\.csv2|write\\.etags|write\\.socket|write\\.table|wsbrowser|xedit|xemacs|zip)\\s*(\\()", + "captures": { + "1": { + "name": "support.function.r" + } + } + } + ] + } + } +} diff --git a/src/lib/shiki/languages/raku.tmLanguage.json b/src/lib/shiki/languages/raku.tmLanguage.json new file mode 100644 index 0000000..4bf7a15 --- /dev/null +++ b/src/lib/shiki/languages/raku.tmLanguage.json @@ -0,0 +1,315 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/perl.tmbundle/blob/master/Syntaxes/Perl%206.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/textmate/perl.tmbundle/commit/d9841a0878239fa43f88c640f8d458590f97e8f5", + "name": "raku", + "scopeName": "source.perl.6", + "patterns": [ + { + "begin": "^=begin", + "end": "^=end", + "name": "comment.block.perl" + }, + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.perl" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.perl" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.perl" + } + ] + }, + { + "captures": { + "1": { + "name": "storage.type.class.perl.6" + }, + "3": { + "name": "entity.name.type.class.perl.6" + } + }, + "match": "(class|enum|grammar|knowhow|module|package|role|slang|subset)(\\s+)(((?:::|')?(?:([a-zA-Z_\\x{C0}-\\x{FF}\\$])([a-zA-Z0-9_\\x{C0}-\\x{FF}\\\\$]|[\\-'][a-zA-Z0-9_\\x{C0}-\\x{FF}\\$])*))+)", + "name": "meta.class.perl.6" + }, + { + "begin": "(?<=\\s)'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.single.perl", + "patterns": [ + { + "match": "\\\\['\\\\]", + "name": "constant.character.escape.perl" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.perl" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.perl" + } + }, + "name": "string.quoted.double.perl", + "patterns": [ + { + "match": "\\\\[abtnfre\"\\\\]", + "name": "constant.character.escape.perl" + } + ] + }, + { + "begin": "q(q|to|heredoc)*\\s*:?(q|to|heredoc)*\\s*/(.+)/", + "end": "\\3", + "name": "string.quoted.single.heredoc.perl" + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*{{", + "end": "}}", + "name": "string.quoted.double.heredoc.brace.perl", + "patterns": [ + { + "include": "#qq_brace_string_content" + } + ] + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*\\(\\(", + "end": "\\)\\)", + "name": "string.quoted.double.heredoc.paren.perl", + "patterns": [ + { + "include": "#qq_paren_string_content" + } + ] + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*\\[\\[", + "end": "\\]\\]", + "name": "string.quoted.double.heredoc.bracket.perl", + "patterns": [ + { + "include": "#qq_bracket_string_content" + } + ] + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*{", + "end": "}", + "name": "string.quoted.single.heredoc.brace.perl", + "patterns": [ + { + "include": "#qq_brace_string_content" + } + ] + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*/", + "end": "/", + "name": "string.quoted.single.heredoc.slash.perl", + "patterns": [ + { + "include": "#qq_slash_string_content" + } + ] + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*\\(", + "end": "\\)", + "name": "string.quoted.single.heredoc.paren.perl", + "patterns": [ + { + "include": "#qq_paren_string_content" + } + ] + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*\\[", + "end": "\\]", + "name": "string.quoted.single.heredoc.bracket.perl", + "patterns": [ + { + "include": "#qq_bracket_string_content" + } + ] + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*'", + "end": "'", + "name": "string.quoted.single.heredoc.single.perl", + "patterns": [ + { + "include": "#qq_single_string_content" + } + ] + }, + { + "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*\"", + "end": "\"", + "name": "string.quoted.single.heredoc.double.perl", + "patterns": [ + { + "include": "#qq_double_string_content" + } + ] + }, + { + "match": "\\b\\$\\w+\\b", + "name": "variable.other.perl" + }, + { + "match": "\\b(macro|sub|submethod|method|multi|proto|only|rule|token|regex|category)\\b", + "name": "storage.type.declare.routine.perl" + }, + { + "match": "\\b(self)\\b", + "name": "variable.language.perl" + }, + { + "match": "\\b(use|require)\\b", + "name": "keyword.other.include.perl" + }, + { + "match": "\\b(if|else|elsif|unless)\\b", + "name": "keyword.control.conditional.perl" + }, + { + "match": "\\b(let|my|our|state|temp|has|constant)\\b", + "name": "storage.type.variable.perl" + }, + { + "match": "\\b(for|loop|repeat|while|until|gather|given)\\b", + "name": "keyword.control.repeat.perl" + }, + { + "match": "\\b(take|do|when|next|last|redo|return|contend|maybe|defer|default|exit|make|continue|break|goto|leave|async|lift)\\b", + "name": "keyword.control.flowcontrol.perl" + }, + { + "match": "\\b(is|as|but|trusts|of|returns|handles|where|augment|supersede)\\b", + "name": "storage.modifier.type.constraints.perl" + }, + { + "match": "\\b(BEGIN|CHECK|INIT|START|FIRST|ENTER|LEAVE|KEEP|UNDO|NEXT|LAST|PRE|POST|END|CATCH|CONTROL|TEMP)\\b", + "name": "meta.function.perl" + }, + { + "match": "\\b(die|fail|try|warn)\\b", + "name": "keyword.control.control-handlers.perl" + }, + { + "match": "\\b(prec|irs|ofs|ors|export|deep|binary|unary|reparsed|rw|parsed|cached|readonly|defequiv|will|ref|copy|inline|tighter|looser|equiv|assoc|required)\\b", + "name": "storage.modifier.perl" + }, + { + "match": "\\b(NaN|Inf)\\b", + "name": "constant.numeric.perl" + }, + { + "match": "\\b(oo|fatal)\\b", + "name": "keyword.other.pragma.perl" + }, + { + "match": "\\b(Object|Any|Junction|Whatever|Capture|MatchSignature|Proxy|Matcher|Package|Module|ClassGrammar|Scalar|Array|Hash|KeyHash|KeySet|KeyBagPair|List|Seq|Range|Set|Bag|Mapping|Void|UndefFailure|Exception|Code|Block|Routine|Sub|MacroMethod|Submethod|Regex|Str|str|Blob|Char|ByteCodepoint|Grapheme|StrPos|StrLen|Version|NumComplex|num|complex|Bit|bit|bool|True|FalseIncreasing|Decreasing|Ordered|Callable|AnyCharPositional|Associative|Ordering|KeyExtractorComparator|OrderingPair|IO|KitchenSink|RoleInt|int|int1|int2|int4|int8|int16|int32|int64Rat|rat|rat1|rat2|rat4|rat8|rat16|rat32|rat64Buf|buf|buf1|buf2|buf4|buf8|buf16|buf32|buf64UInt|uint|uint1|uint2|uint4|uint8|uint16|uint32uint64|Abstraction|utf8|utf16|utf32)\\b", + "name": "support.type.perl6" + }, + { + "match": "\\b(div|xx|x|mod|also|leg|cmp|before|after|eq|ne|le|lt|not|gt|ge|eqv|ff|fff|and|andthen|or|xor|orelse|extra|lcm|gcd)\\b", + "name": "keyword.operator.perl" + }, + { + "match": "(\\$|@|%|&)(\\*|:|!|\\^|~|=|\\?|(<(?=.+>)))?([a-zA-Z_\\x{C0}-\\x{FF}\\$])([a-zA-Z0-9_\\x{C0}-\\x{FF}\\$]|[\\-'][a-zA-Z0-9_\\x{C0}-\\x{FF}\\$])*", + "name": "variable.other.identifier.perl.6" + }, + { + "match": "\\b(eager|hyper|substr|index|rindex|grep|map|sort|join|lines|hints|chmod|split|reduce|min|max|reverse|truncate|zip|cat|roundrobin|classify|first|sum|keys|values|pairs|defined|delete|exists|elems|end|kv|any|all|one|wrap|shape|key|value|name|pop|push|shift|splice|unshift|floor|ceiling|abs|exp|log|log10|rand|sign|sqrt|sin|cos|tan|round|strand|roots|cis|unpolar|polar|atan2|pick|chop|p5chop|chomp|p5chomp|lc|lcfirst|uc|ucfirst|capitalize|normalize|pack|unpack|quotemeta|comb|samecase|sameaccent|chars|nfd|nfc|nfkd|nfkc|printf|sprintf|caller|evalfile|run|runinstead|nothing|want|bless|chr|ord|gmtime|time|eof|localtime|gethost|getpw|chroot|getlogin|getpeername|kill|fork|wait|perl|graphs|codes|bytes|clone|print|open|read|write|readline|say|seek|close|opendir|readdir|slurp|spurt|shell|run|pos|fmt|vec|link|unlink|symlink|uniq|pair|asin|atan|sec|cosec|cotan|asec|acosec|acotan|sinh|cosh|tanh|asinh|done|acos|acosh|atanh|sech|cosech|cotanh|sech|acosech|acotanh|asech|ok|nok|plan_ok|dies_ok|lives_ok|skip|todo|pass|flunk|force_todo|use_ok|isa_ok|diag|is_deeply|isnt|like|skip_rest|unlike|cmp_ok|eval_dies_ok|nok_error|eval_lives_ok|approx|is_approx|throws_ok|version_lt|plan|EVAL|succ|pred|times|nonce|once|signature|new|connect|operator|undef|undefine|sleep|from|to|infix|postfix|prefix|circumfix|postcircumfix|minmax|lazy|count|unwrap|getc|pi|e|context|void|quasi|body|each|contains|rewinddir|subst|can|isa|flush|arity|assuming|rewind|callwith|callsame|nextwith|nextsame|attr|eval_elsewhere|none|srand|trim|trim_start|trim_end|lastcall|WHAT|WHERE|HOW|WHICH|VAR|WHO|WHENCE|ACCEPTS|REJECTS|not|true|iterator|by|re|im|invert|flip|gist|flat|tree|is-prime|throws_like|trans)\\b", + "name": "support.function.perl" + } + ], + "repository": { + "qq_brace_string_content": { + "begin": "{", + "end": "}", + "patterns": [ + { + "include": "#qq_brace_string_content" + } + ] + }, + "qq_bracket_string_content": { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#qq_bracket_string_content" + } + ] + }, + "qq_double_string_content": { + "begin": "\"", + "end": "\"", + "patterns": [ + { + "include": "#qq_double_string_content" + } + ] + }, + "qq_paren_string_content": { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#qq_paren_string_content" + } + ] + }, + "qq_single_string_content": { + "begin": "'", + "end": "'", + "patterns": [ + { + "include": "#qq_single_string_content" + } + ] + }, + "qq_slash_string_content": { + "begin": "\\\\/", + "end": "\\\\/", + "patterns": [ + { + "include": "#qq_slash_string_content" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/razor.tmLanguage.json b/src/lib/shiki/languages/razor.tmLanguage.json new file mode 100644 index 0000000..01f0350 --- /dev/null +++ b/src/lib/shiki/languages/razor.tmLanguage.json @@ -0,0 +1,1809 @@ +{ + "name": "razor", + "scopeName": "text.aspnetcorerazor", + "fileTypes": ["razor", "cshtml"], + "patterns": [ + { + "include": "#razor-control-structures" + }, + { + "include": "text.html.basic" + } + ], + "repository": { + "razor-control-structures": { + "patterns": [ + { + "include": "#razor-comment" + }, + { + "include": "#razor-codeblock" + }, + { + "include": "#explicit-razor-expression" + }, + { + "include": "#escaped-transition" + }, + { + "include": "#directives" + }, + { + "include": "#transitioned-csharp-control-structures" + }, + { + "include": "#implicit-expression" + } + ] + }, + "optionally-transitioned-razor-control-structures": { + "patterns": [ + { + "include": "#razor-comment" + }, + { + "include": "#razor-codeblock" + }, + { + "include": "#explicit-razor-expression" + }, + { + "include": "#escaped-transition" + }, + { + "include": "#directives" + }, + { + "include": "#optionally-transitioned-csharp-control-structures" + }, + { + "include": "#implicit-expression" + } + ] + }, + "escaped-transition": { + "name": "constant.character.escape.razor.transition", + "match": "@@" + }, + "transition": { + "match": "@", + "name": "keyword.control.cshtml.transition" + }, + "razor-codeblock": { + "name": "meta.structure.razor.codeblock", + "begin": "(@)(\\{)", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.razor.directive.codeblock.open" + } + }, + "contentName": "source.cs", + "patterns": [ + { + "include": "#razor-codeblock-body" + } + ], + "end": "(\\})", + "endCaptures": { + "1": { + "name": "keyword.control.razor.directive.codeblock.close" + } + } + }, + "razor-codeblock-body": { + "patterns": [ + { + "include": "#text-tag" + }, + { + "include": "#wellformed-html" + }, + { + "include": "#razor-single-line-markup" + }, + { + "include": "#optionally-transitioned-razor-control-structures" + }, + { + "include": "source.cs" + } + ] + }, + "razor-single-line-markup": { + "match": "(\\@\\:)([^$]*)$", + "captures": { + "1": { + "name": "keyword.control.razor.singleLineMarkup" + }, + "2": { + "patterns": [ + { + "include": "#razor-control-structures" + }, + { + "include": "text.html.basic" + } + ] + } + } + }, + "text-tag": { + "begin": "(<text\\s*>)", + "beginCaptures": { + "1": { + "name": "keyword.control.cshtml.transition.textTag.open" + } + }, + "patterns": [ + { + "include": "#wellformed-html" + }, + { + "include": "$self" + } + ], + "end": "(</text>)", + "endCaptures": { + "1": { + "name": "keyword.control.cshtml.transition.textTag.close" + } + } + }, + "razor-comment": { + "name": "meta.comment.razor", + "begin": "(@)(\\*)", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.razor.comment.star" + } + }, + "contentName": "comment.block.razor", + "end": "(\\*)(@)", + "endCaptures": { + "1": { + "name": "keyword.control.razor.comment.star" + }, + "2": { + "patterns": [ + { + "include": "#transition" + } + ] + } + } + }, + "wellformed-html": { + "patterns": [ + { + "include": "#void-tag" + }, + { + "include": "#non-void-tag" + } + ] + }, + "void-tag": { + "name": "meta.tag.structure.$3.void.html", + "begin": "(?i)(<)(!)?(area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "constant.character.escape.razor.tagHelperOptOut" + }, + "3": { + "name": "entity.name.tag.html" + } + }, + "patterns": [ + { + "include": "text.html.basic#attribute" + } + ], + "end": "/?>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + } + }, + "non-void-tag": { + "begin": "(?=<(!)?([^/\\s>]+)(\\s|/?>))", + "end": "(</)(\\2)\\s*(>)|(/>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + }, + "3": { + "name": "punctuation.definition.tag.end.html" + }, + "4": { + "name": "punctuation.definition.tag.end.html" + } + }, + "patterns": [ + { + "begin": "(<)(!)?([^/\\s>]+)(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "constant.character.escape.razor.tagHelperOptOut" + }, + "3": { + "name": "entity.name.tag.html" + } + }, + "end": "(?=/?>)", + "patterns": [ + { + "include": "#razor-control-structures" + }, + { + "include": "text.html.basic#attribute" + } + ] + }, + { + "begin": ">", + "beginCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "end": "(?=</)", + "patterns": [ + { + "include": "#wellformed-html" + }, + { + "include": "$self" + } + ] + } + ] + }, + "explicit-razor-expression": { + "name": "meta.expression.explicit.cshtml", + "begin": "(@)\\(", + "beginCaptures": { + "0": { + "name": "keyword.control.cshtml" + }, + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + } + }, + "patterns": [ + { + "include": "source.cs#expression" + } + ], + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.control.cshtml" + } + } + }, + "implicit-expression": { + "name": "meta.expression.implicit.cshtml", + "contentName": "source.cs", + "begin": "(?<![[:alpha:][:alnum:]])(@)", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + } + }, + "patterns": [ + { + "include": "#await-prefix" + }, + { + "include": "#implicit-expression-body" + } + ], + "end": "(?=[\\s<>\\{\\}\\)\\]'\"])" + }, + "implicit-expression-body": { + "patterns": [ + { + "include": "#implicit-expression-invocation-start" + }, + { + "include": "#implicit-expression-accessor-start" + } + ], + "end": "(?=[\\s<>\\{\\}\\)\\]'\"])" + }, + "implicit-expression-invocation-start": { + "begin": "([_[:alpha:]][_[:alnum:]]*)(?=\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.cs" + } + }, + "patterns": [ + { + "include": "#implicit-expression-continuation" + } + ], + "end": "(?=[\\s<>\\{\\}\\)\\]'\"])" + }, + "implicit-expression-accessor-start": { + "begin": "([_[:alpha:]][_[:alnum:]]*)", + "beginCaptures": { + "1": { + "name": "variable.other.object.cs" + } + }, + "patterns": [ + { + "include": "#implicit-expression-continuation" + } + ], + "end": "(?=[\\s<>\\{\\}\\)\\]'\"])" + }, + "implicit-expression-continuation": { + "patterns": [ + { + "include": "#balanced-parenthesis-csharp" + }, + { + "include": "#balanced-brackets-csharp" + }, + { + "include": "#implicit-expression-invocation" + }, + { + "include": "#implicit-expression-accessor" + }, + { + "include": "#implicit-expression-extension" + } + ], + "end": "(?=[\\s<>\\{\\}\\)\\]'\"])" + }, + "implicit-expression-accessor": { + "match": "(?<=\\.)[_[:alpha:]][_[:alnum:]]*", + "name": "variable.other.object.property.cs" + }, + "implicit-expression-invocation": { + "match": "(?<=\\.)[_[:alpha:]][_[:alnum:]]*(?=\\()", + "name": "entity.name.function.cs" + }, + "implicit-expression-operator": { + "patterns": [ + { + "include": "#implicit-expression-dot-operator" + }, + { + "include": "#implicit-expression-null-conditional-operator" + }, + { + "include": "#implicit-expression-null-forgiveness-operator" + } + ] + }, + "implicit-expression-dot-operator": { + "match": "(\\.)(?=[_[:alpha:]][_[:alnum:]]*)", + "captures": { + "1": { + "name": "punctuation.accessor.cs" + } + } + }, + "implicit-expression-null-conditional-operator": { + "match": "(\\?)(?=[.\\[])", + "captures": { + "1": { + "name": "keyword.operator.null-conditional.cs" + } + } + }, + "implicit-expression-null-forgiveness-operator": { + "match": "(\\!)(?=(?:\\.[_[:alpha:]][_[:alnum:]]*)|\\?|[\\[\\(])", + "captures": { + "1": { + "name": "keyword.operator.logical.cs" + } + } + }, + "balanced-parenthesis-csharp": { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.parenthesis.open.cs" + } + }, + "name": "razor.test.balanced.parenthesis", + "patterns": [ + { + "include": "source.cs" + } + ], + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.parenthesis.close.cs" + } + } + }, + "balanced-brackets-csharp": { + "begin": "(\\[)", + "beginCaptures": { + "1": { + "name": "punctuation.squarebracket.open.cs" + } + }, + "name": "razor.test.balanced.brackets", + "patterns": [ + { + "include": "source.cs" + } + ], + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.squarebracket.close.cs" + } + } + }, + "directives": { + "patterns": [ + { + "include": "#code-directive" + }, + { + "include": "#functions-directive" + }, + { + "include": "#page-directive" + }, + { + "include": "#addTagHelper-directive" + }, + { + "include": "#removeTagHelper-directive" + }, + { + "include": "#tagHelperPrefix-directive" + }, + { + "include": "#model-directive" + }, + { + "include": "#inherits-directive" + }, + { + "include": "#implements-directive" + }, + { + "include": "#namespace-directive" + }, + { + "include": "#inject-directive" + }, + { + "include": "#attribute-directive" + }, + { + "include": "#section-directive" + }, + { + "include": "#layout-directive" + }, + { + "include": "#using-directive" + } + ] + }, + "code-directive": { + "begin": "(@)(code)((?=\\{)|\\s+)", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.razor.directive.code" + } + }, + "patterns": [ + { + "include": "#directive-codeblock" + } + ], + "end": "(?<=})|\\s" + }, + "functions-directive": { + "begin": "(@)(functions)((?=\\{)|\\s+)", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.razor.directive.functions" + } + }, + "patterns": [ + { + "include": "#directive-codeblock" + } + ], + "end": "(?<=})|\\s" + }, + "directive-codeblock": { + "begin": "(\\{)", + "beginCaptures": { + "1": { + "name": "keyword.control.razor.directive.codeblock.open" + } + }, + "name": "meta.structure.razor.directive.codeblock", + "contentName": "source.cs", + "patterns": [ + { + "include": "source.cs#class-or-struct-members" + } + ], + "end": "(\\})", + "endCaptures": { + "1": { + "name": "keyword.control.razor.directive.codeblock.close" + } + } + }, + "page-directive": { + "name": "meta.directive", + "match": "(@)(page)\\s+([^$]+)?", + "captures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.razor.directive.page" + }, + "3": { + "patterns": [ + { + "include": "source.cs#string-literal" + } + ] + } + } + }, + "addTagHelper-directive": { + "name": "meta.directive", + "match": "(@)(addTagHelper)\\s+([^$]+)?", + "captures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.razor.directive.addTagHelper" + }, + "3": { + "patterns": [ + { + "include": "#tagHelper-directive-argument" + } + ] + } + } + }, + "removeTagHelper-directive": { + "name": "meta.directive", + "match": "(@)(removeTagHelper)\\s+([^$]+)?", + "captures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.razor.directive.removeTagHelper" + }, + "3": { + "patterns": [ + { + "include": "#tagHelper-directive-argument" + } + ] + } + } + }, + "tagHelperPrefix-directive": { + "name": "meta.directive", + "match": "(@)(tagHelperPrefix)\\s+([^$]+)?", + "captures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.razor.directive.tagHelperPrefix" + }, + "3": { + "patterns": [ + { + "include": "#tagHelper-directive-argument" + } + ] + } + } + }, + "tagHelper-directive-argument": { + "patterns": [ + { + "include": "source.cs#string-literal" + }, + { + "include": "#unquoted-string-argument" + } + ] + }, + "unquoted-string-argument": { + "name": "string.quoted.double.cs", + "match": "[^$]+" + }, + "model-directive": { + "name": "meta.directive", + "match": "(@)(model)\\s+([^$]+)?", + "captures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.razor.directive.model" + }, + "3": { + "patterns": [ + { + "include": "source.cs#type" + } + ] + } + } + }, + "inherits-directive": { + "name": "meta.directive", + "match": "(@)(inherits)\\s+([^$]+)?", + "captures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.razor.directive.inherits" + }, + "3": { + "patterns": [ + { + "include": "source.cs#type" + } + ] + } + } + }, + "implements-directive": { + "name": "meta.directive", + "match": "(@)(implements)\\s+([^$]+)?", + "captures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.razor.directive.implements" + }, + "3": { + "patterns": [ + { + "include": "source.cs#type" + } + ] + } + } + }, + "layout-directive": { + "name": "meta.directive", + "match": "(@)(layout)\\s+([^$]+)?", + "captures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.razor.directive.layout" + }, + "3": { + "patterns": [ + { + "include": "source.cs#type" + } + ] + } + } + }, + "namespace-directive": { + "name": "meta.directive", + "match": "(@)(namespace)\\s+([^\\s]+)?", + "captures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.razor.directive.namespace" + }, + "3": { + "patterns": [ + { + "include": "#namespace-directive-argument" + } + ] + } + } + }, + "namespace-directive-argument": { + "match": "([_[:alpha:]][_[:alnum:]]*)(\\.)?", + "captures": { + "1": { + "name": "entity.name.type.namespace.cs" + }, + "2": { + "name": "punctuation.accessor.cs" + } + } + }, + "inject-directive": { + "name": "meta.directive", + "match": "(@)(inject)\\s*([\\S\\s]+?)?\\s*([_[:alpha:]][_[:alnum:]]*)?\\s*(?=$)", + "captures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.razor.directive.inject" + }, + "3": { + "patterns": [ + { + "include": "source.cs#type" + } + ] + }, + "4": { + "name": "entity.name.variable.property.cs" + } + } + }, + "attribute-directive": { + "name": "meta.directive", + "begin": "(@)(attribute)\\b\\s+", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.razor.directive.attribute" + } + }, + "patterns": [ + { + "include": "source.cs#attribute-section" + } + ], + "end": "(?<=\\])|$" + }, + "section-directive": { + "name": "meta.directive.block", + "begin": "(@)(section)\\b\\s+([_[:alpha:]][_[:alnum:]]*)?", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.razor.directive.section" + }, + "3": { + "name": "variable.other.razor.directive.sectionName" + } + }, + "patterns": [ + { + "include": "#directive-markupblock" + } + ], + "end": "(?<=})" + }, + "directive-markupblock": { + "name": "meta.structure.razor.directive.markblock", + "begin": "(\\{)", + "beginCaptures": { + "1": { + "name": "keyword.control.razor.directive.codeblock.open" + } + }, + "patterns": [ + { + "include": "$self" + } + ], + "end": "(\\})", + "endCaptures": { + "1": { + "name": "keyword.control.razor.directive.codeblock.close" + } + } + }, + "using-directive": { + "name": "meta.directive", + "match": "(@)(using)\\b\\s+(?!\\(|\\s)(.+?)?(;)?$", + "captures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.other.using.cs" + }, + "3": { + "patterns": [ + { + "include": "#using-static-directive" + }, + { + "include": "#using-alias-directive" + }, + { + "include": "#using-standard-directive" + } + ] + }, + "4": { + "name": "keyword.control.razor.optionalSemicolon" + } + } + }, + "using-static-directive": { + "match": "(static)\\b\\s+(.+)", + "captures": { + "1": { + "name": "keyword.other.static.cs" + }, + "2": { + "patterns": [ + { + "include": "source.cs#type" + } + ] + } + } + }, + "using-alias-directive": { + "match": "([_[:alpha:]][_[:alnum:]]*)\\b\\s*(=)\\s*(.+)\\s*", + "captures": { + "1": { + "name": "entity.name.type.alias.cs" + }, + "2": { + "name": "keyword.operator.assignment.cs" + }, + "3": { + "patterns": [ + { + "include": "source.cs#type" + } + ] + } + } + }, + "using-standard-directive": { + "match": "([_[:alpha:]][_[:alnum:]]*)\\s*", + "captures": { + "1": { + "name": "entity.name.type.namespace.cs" + } + } + }, + "optionally-transitioned-csharp-control-structures": { + "patterns": [ + { + "include": "#using-statement-with-optional-transition" + }, + { + "include": "#if-statement-with-optional-transition" + }, + { + "include": "#else-part" + }, + { + "include": "#foreach-statement-with-optional-transition" + }, + { + "include": "#for-statement-with-optional-transition" + }, + { + "include": "#while-statement" + }, + { + "include": "#switch-statement-with-optional-transition" + }, + { + "include": "#lock-statement-with-optional-transition" + }, + { + "include": "#do-statement-with-optional-transition" + }, + { + "include": "#try-statement-with-optional-transition" + } + ] + }, + "transitioned-csharp-control-structures": { + "patterns": [ + { + "include": "#using-statement" + }, + { + "include": "#if-statement" + }, + { + "include": "#else-part" + }, + { + "include": "#foreach-statement" + }, + { + "include": "#for-statement" + }, + { + "include": "#while-statement" + }, + { + "include": "#switch-statement" + }, + { + "include": "#lock-statement" + }, + { + "include": "#do-statement" + }, + { + "include": "#try-statement" + } + ] + }, + "using-statement": { + "name": "meta.statement.using.razor", + "begin": "(?:(@))(using)\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.other.using.cs" + } + }, + "patterns": [ + { + "include": "#csharp-condition" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "using-statement-with-optional-transition": { + "name": "meta.statement.using.razor", + "begin": "(?:^\\s*|(@))(using)\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.other.using.cs" + } + }, + "patterns": [ + { + "include": "#csharp-condition" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "if-statement": { + "name": "meta.statement.if.razor", + "begin": "(?:(@))(if)\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.conditional.if.cs" + } + }, + "patterns": [ + { + "include": "#csharp-condition" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "if-statement-with-optional-transition": { + "name": "meta.statement.if.razor", + "begin": "(?:^\\s*|(@))(if)\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.conditional.if.cs" + } + }, + "patterns": [ + { + "include": "#csharp-condition" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "else-part": { + "name": "meta.statement.else.razor", + "begin": "(?:^|(?<=}))\\s*(else)\\b\\s*?(?: (if))?\\s*?(?=[\\n\\(\\{])", + "beginCaptures": { + "1": { + "name": "keyword.control.conditional.else.cs" + }, + "2": { + "name": "keyword.control.conditional.if.cs" + } + }, + "patterns": [ + { + "include": "#csharp-condition" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "for-statement": { + "name": "meta.statement.for.razor", + "begin": "(?:(@))(for)\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.loop.for.cs" + } + }, + "patterns": [ + { + "include": "#csharp-condition" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "for-statement-with-optional-transition": { + "name": "meta.statement.for.razor", + "begin": "(?:^\\s*|(@))(for)\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.loop.for.cs" + } + }, + "patterns": [ + { + "include": "#csharp-condition" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "foreach-statement": { + "name": "meta.statement.foreach.razor", + "begin": "(?:(@)(await\\s+)?)(foreach)\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#await-prefix" + } + ] + }, + "3": { + "name": "keyword.control.loop.foreach.cs" + } + }, + "patterns": [ + { + "include": "#foreach-condition" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "foreach-statement-with-optional-transition": { + "name": "meta.statement.foreach.razor", + "begin": "(?:^\\s*|(@)(await\\s+)?)(foreach)\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#await-prefix" + } + ] + }, + "3": { + "name": "keyword.control.loop.foreach.cs" + } + }, + "patterns": [ + { + "include": "#foreach-condition" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "foreach-condition": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.cs" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.cs" + } + }, + "patterns": [ + { + "match": "(?x)\n(?:\n (\\bvar\\b)|\n (?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g<identifier>)\\s+\n\\b(in)\\b", + "captures": { + "1": { + "name": "keyword.other.var.cs" + }, + "2": { + "patterns": [ + { + "include": "source.cs#type" + } + ] + }, + "7": { + "name": "entity.name.variable.local.cs" + }, + "8": { + "name": "keyword.control.loop.in.cs" + } + } + }, + { + "match": "(?x) # match foreach (var (x, y) in ...)\n(?:\\b(var)\\b\\s*)?\n(?<tuple>\\((?:[^\\(\\)]|\\g<tuple>)+\\))\\s+\n\\b(in)\\b", + "captures": { + "1": { + "name": "keyword.other.var.cs" + }, + "2": { + "patterns": [ + { + "include": "source.cs#tuple-declaration-deconstruction-element-list" + } + ] + }, + "3": { + "name": "keyword.control.loop.in.cs" + } + } + }, + { + "include": "source.cs#expression" + } + ] + }, + "do-statement": { + "name": "meta.statement.do.razor", + "begin": "(?:(@))(do)\\b\\s", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.loop.do.cs" + } + }, + "patterns": [ + { + "include": "#csharp-condition" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "do-statement-with-optional-transition": { + "name": "meta.statement.do.razor", + "begin": "(?:^\\s*|(@))(do)\\b\\s", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.loop.do.cs" + } + }, + "patterns": [ + { + "include": "#csharp-condition" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "while-statement": { + "name": "meta.statement.while.razor", + "begin": "(?:(@)|^\\s*|(?<=})\\s*)(while)\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.loop.while.cs" + } + }, + "patterns": [ + { + "include": "#csharp-condition" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})|(;)", + "endCaptures": { + "1": { + "name": "punctuation.terminator.statement.cs" + } + } + }, + "switch-statement": { + "name": "meta.statement.switch.razor", + "begin": "(?:(@))(switch)\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.switch.cs" + } + }, + "patterns": [ + { + "include": "#csharp-condition" + }, + { + "include": "#switch-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "switch-statement-with-optional-transition": { + "name": "meta.statement.switch.razor", + "begin": "(?:^\\s*|(@))(switch)\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.switch.cs" + } + }, + "patterns": [ + { + "include": "#csharp-condition" + }, + { + "include": "#switch-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "switch-code-block": { + "name": "meta.structure.razor.csharp.codeblock.switch", + "begin": "(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.curlybrace.open.cs" + } + }, + "patterns": [ + { + "include": "source.cs#switch-label" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.curlybrace.close.cs" + } + } + }, + "lock-statement": { + "name": "meta.statement.lock.razor", + "begin": "(?:(@))(lock)\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.other.lock.cs" + } + }, + "patterns": [ + { + "include": "#csharp-condition" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "lock-statement-with-optional-transition": { + "name": "meta.statement.lock.razor", + "begin": "(?:^\\s*|(@))(lock)\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.other.lock.cs" + } + }, + "patterns": [ + { + "include": "#csharp-condition" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "try-statement": { + "patterns": [ + { + "include": "#try-block" + }, + { + "include": "#catch-clause" + }, + { + "include": "#finally-clause" + } + ] + }, + "try-statement-with-optional-transition": { + "patterns": [ + { + "include": "#try-block-with-optional-transition" + }, + { + "include": "#catch-clause" + }, + { + "include": "#finally-clause" + } + ] + }, + "try-block": { + "name": "meta.statement.try.razor", + "begin": "(?:(@))(try)\\b\\s*", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.try.cs" + } + }, + "patterns": [ + { + "include": "#csharp-condition" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "try-block-with-optional-transition": { + "name": "meta.statement.try.razor", + "begin": "(?:^\\s*|(@))(try)\\b\\s*", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#transition" + } + ] + }, + "2": { + "name": "keyword.control.try.cs" + } + }, + "patterns": [ + { + "include": "#csharp-condition" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "catch-clause": { + "name": "meta.statement.catch.razor", + "begin": "(?:^|(?<=}))\\s*(catch)\\b\\s*?(?=[\\n\\(\\{])", + "beginCaptures": { + "1": { + "name": "keyword.control.try.catch.cs" + } + }, + "patterns": [ + { + "include": "#catch-condition" + }, + { + "include": "source.cs#when-clause" + }, + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "catch-condition": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.cs" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.cs" + } + }, + "patterns": [ + { + "match": "(?x)\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?:(\\g<identifier>)\\b)?", + "captures": { + "1": { + "patterns": [ + { + "include": "source.cs#type" + } + ] + }, + "6": { + "name": "entity.name.variable.local.cs" + } + } + } + ] + }, + "finally-clause": { + "name": "meta.statement.finally.razor", + "begin": "(?:^|(?<=}))\\s*(finally)\\b\\s*?(?=[\\n\\{])", + "beginCaptures": { + "1": { + "name": "keyword.control.try.finally.cs" + } + }, + "patterns": [ + { + "include": "#csharp-code-block" + }, + { + "include": "#razor-codeblock-body" + } + ], + "end": "(?<=})" + }, + "await-prefix": { + "name": "keyword.other.await.cs", + "match": "(await)\\s+" + }, + "csharp-code-block": { + "name": "meta.structure.razor.csharp.codeblock", + "begin": "(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.curlybrace.open.cs" + } + }, + "patterns": [ + { + "include": "#razor-codeblock-body" + } + ], + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.curlybrace.close.cs" + } + } + }, + "csharp-condition": { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.parenthesis.open.cs" + } + }, + "patterns": [ + { + "include": "source.cs#local-variable-declaration" + }, + { + "include": "source.cs#expression" + }, + { + "include": "source.cs#punctuation-comma" + }, + { + "include": "source.cs#punctuation-semicolon" + } + ], + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.parenthesis.close.cs" + } + } + } + } +} diff --git a/src/lib/shiki/languages/reg.tmLanguage.json b/src/lib/shiki/languages/reg.tmLanguage.json new file mode 100644 index 0000000..a04132f --- /dev/null +++ b/src/lib/shiki/languages/reg.tmLanguage.json @@ -0,0 +1,133 @@ +{ + "fileTypes": ["reg", "REG"], + "name": "reg", + "patterns": [ + { + "match": "Windows Registry Editor Version 5\\.00|REGEDIT4", + "name": "keyword.control.import.reg" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.comment.reg" + } + }, + "match": "(;).*$", + "name": "comment.line.semicolon.reg" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.section.reg" + }, + "2": { + "name": "entity.section.reg" + }, + "3": { + "name": "punctuation.definition.section.reg" + } + }, + "match": "^\\s*(\\[(?!-))(.*?)(\\])", + "name": "entity.name.function.section.add.reg" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.section.reg" + }, + "2": { + "name": "entity.section.reg" + }, + "3": { + "name": "punctuation.definition.section.reg" + } + }, + "match": "^\\s*(\\[-)(.*?)(\\])", + "name": "entity.name.function.section.delete.reg" + }, + { + "captures": { + "2": { + "name": "punctuation.definition.quote.reg" + }, + "3": { + "name": "support.function.regname.ini" + }, + "4": { + "name": "punctuation.definition.quote.reg" + }, + "5": { + "name": "punctuation.definition.equals.reg" + }, + "7": { + "name": "keyword.operator.arithmetic.minus.reg" + }, + "9": { + "name": "punctuation.definition.quote.reg" + }, + "10": { + "name": "string.name.regdata.reg" + }, + "11": { + "name": "punctuation.definition.quote.reg" + }, + "13": { + "name": "support.type.dword.reg" + }, + "14": { + "name": "keyword.operator.arithmetic.colon.reg" + }, + "15": { + "name": "constant.numeric.dword.reg" + }, + "17": { + "name": "support.type.dword.reg" + }, + "18": { + "name": "keyword.operator.arithmetic.parenthesis.reg" + }, + "19": { + "name": "keyword.operator.arithmetic.parenthesis.reg" + }, + "20": { + "name": "constant.numeric.hex.size.reg" + }, + "21": { + "name": "keyword.operator.arithmetic.parenthesis.reg" + }, + "22": { + "name": "keyword.operator.arithmetic.colon.reg" + }, + "23": { + "name": "constant.numeric.hex.reg" + }, + "24": { + "name": "keyword.operator.arithmetic.linecontinuation.reg" + }, + "25": { + "name": "comment.declarationline.semicolon.reg" + } + }, + "match": "^(\\s*([\"']?)(.+?)([\"']?)\\s*(=))?\\s*((-)|(([\"'])(.*?)([\"']))|(((?i:dword))(\\:)\\s*([\\dabcdefABCDEF]{1,8}))|(((?i:hex))((\\()([\\d]*)(\\)))?(\\:)(.*?)(\\\\?)))\\s*(;.*)?$", + "name": "meta.declaration.reg" + }, + { + "match": "[0-9]+", + "name": "constant.numeric.reg" + }, + { + "match": "[a-fA-F]+", + "name": "constant.numeric.hex.reg" + }, + { + "match": ",+", + "name": "constant.numeric.hex.comma.reg" + }, + { + "match": "\\\\", + "name": "keyword.operator.arithmetic.linecontinuation.reg" + } + ], + "scopeName": "source.reg", + "uuid": "B7773F5B-C43A-4BB9-843A-4AC119250EBD" +} diff --git a/src/lib/shiki/languages/rel.tmLanguage.json b/src/lib/shiki/languages/rel.tmLanguage.json new file mode 100644 index 0000000..c8e72f5 --- /dev/null +++ b/src/lib/shiki/languages/rel.tmLanguage.json @@ -0,0 +1,200 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "rel", + "patterns": [ + { + "include": "#strings" + }, + { + "include": "#comment" + }, + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#deprecated-temporary" + }, + { + "include": "#operators" + }, + { + "include": "#symbols" + }, + { + "include": "#keywords" + }, + { + "include": "#otherkeywords" + }, + { + "include": "#types" + }, + { + "include": "#constants" + } + ], + "repository": { + "strings": { + "name": "string.quoted.double.rel", + "begin": "\"", + "end": "\"", + "patterns": [ + { + "name": "constant.character.escape.rel", + "match": "\\\\." + } + ] + }, + "comment": { + "patterns": [ + { + "name": "comment.block.documentation.rel", + "begin": "/\\*\\*(?!/)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.rel" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.rel" + } + }, + "patterns": [ + { + "include": "#docblock" + } + ] + }, + { + "name": "comment.block.rel", + "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.rel" + }, + "2": { + "name": "storage.type.internaldeclaration.rel" + }, + "3": { + "name": "punctuation.decorator.internaldeclaration.rel" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.rel" + } + } + }, + { + "name": "comment.block.documentation.rel", + "begin": "doc\"\"\"", + "end": "\"\"\"" + }, + { + "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.rel" + }, + "2": { + "name": "comment.line.double-slash.rel" + }, + "3": { + "name": "punctuation.definition.comment.rel" + }, + "4": { + "name": "storage.type.internaldeclaration.rel" + }, + "5": { + "name": "punctuation.decorator.internaldeclaration.rel" + } + }, + "end": "(?=$)", + "contentName": "comment.line.double-slash.rel" + } + ] + }, + "single-line-comment-consuming-line-ending": { + "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.rel" + }, + "2": { + "name": "comment.line.double-slash.rel" + }, + "3": { + "name": "punctuation.definition.comment.rel" + }, + "4": { + "name": "storage.type.internaldeclaration.rel" + }, + "5": { + "name": "punctuation.decorator.internaldeclaration.rel" + } + }, + "end": "(?=^)", + "contentName": "comment.line.double-slash.rel" + }, + "deprecated-temporary": { + "patterns": [ + { + "name": "keyword.other.rel", + "match": "@inspect" + } + ] + }, + "operators": { + "patterns": [ + { + "name": "keyword.other.rel", + "match": "(\\b(if|then|else|and|or|not|eq|neq|lt|lt_eq|gt|gt_eq)\\b)|(\\+|\\-|\\*|\\/|÷|\\^|\\%|\\=|\\!\\=|≠|\\<|\\<\\=|≤|\\>|\\>\\=|≥|\\&)|\\s+(end)" + } + ] + }, + "symbols": { + "patterns": [ + { + "name": "variable.parameter.rel", + "match": "(:[\\[_$[:alpha:]](\\]|[_$[:alnum:]]*))" + } + ] + }, + "keywords": { + "patterns": [ + { + "name": "keyword.control.rel", + "match": "(\\b(def|entity|bound|include|ic|forall|exists|∀|∃|return|module|^end)\\b)|(((\\<)?\\|(\\>)?)|∀|∃)" + } + ] + }, + "otherkeywords": { + "patterns": [ + { + "name": "keyword.other.rel", + "match": "\\s*(@inline)\\s*|\\s*(@auto_number)\\s*|\\s*(function)\\s|(\\b(implies|select|from|∈|where|for|in)\\b)|(((\\<)?\\|(\\>)?)|∈)" + } + ] + }, + "types": { + "patterns": [ + { + "name": "entity.name.type.rel", + "match": "(\\b(Symbol|Char|Bool|Rational|FixedDecimal|Float16|Float32|Float64|Int8|Int16|Int32|Int64|Int128|UInt8|UInt16|UInt32|UInt64|UInt128|Date|DateTime|Day|Week|Month|Year|Nanosecond|Microsecond|Millisecond|Second|Minute|Hour|FilePos|HashValue|AutoNumberValue)\\b)" + } + ] + }, + "constants": { + "patterns": [ + { + "name": "constant.language.rel", + "match": "(\\b(true|false)\\b)" + } + ] + } + }, + "scopeName": "source.rel" +} diff --git a/src/lib/shiki/languages/riscv.tmLanguage.json b/src/lib/shiki/languages/riscv.tmLanguage.json new file mode 100644 index 0000000..ba928b5 --- /dev/null +++ b/src/lib/shiki/languages/riscv.tmLanguage.json @@ -0,0 +1,294 @@ +{ + "fileTypes": ["S", "s", "riscv", "asm"], + "keyEquivalent": "^~M", + "name": "riscv", + "patterns": [ + { + "comment": "ok actually this are instructions, but one also could call them funtions…", + "match": "\\b(la|lb|lh|lw|ld|nop|li|mv|not|neg|negw|sext\\.w|seqz|snez|sltz|sgtz|beqz|bnez|blez|bgez|bltz|bgtz|bgt|ble|bgtu|bleu|j|jal|jr|ret|call|tail|fence|csr[r|w|s|c]|csr[w|s|c]i)\\b", + "name": "support.function.pseudo.riscv" + }, + { + "match": "\\b(add|addw|auipc|lui|jalr|beq|bne|blt|bge|bltu|bgeu|lb|lh|lw|ld|lbu|lhu|sb|sh|sw|sd|addi|addiw|slti|sltiu|xori|ori|andi|slli|slliw|srli|srliw|srai|sraiw|sub|subw|sll|sllw|slt|sltu|xor|srl|srlw|sra|sraw|or|and|fence|fence\\.i|csrrw|csrrs|csrrc|csrrwi|csrrsi|csrrci)\\b", + "name": "support.function.riscv" + }, + { + "comment": "priviledged instructions", + "match": "\\b(ecall|ebreak|sfence\\.vma|mret|sret|uret|wfi)\\b", + "name": "support.function.riscv.privileged" + }, + { + "comment": "M extension (multiplication and division)", + "match": "\\b(mul|mulh|mulhsu|mulhu|div|divu|rem|remu|mulw|divw|divuw|remw|remuw)\\b", + "name": "support.function.riscv.m" + }, + { + "comment": "C extension (compressed instructions)", + "match": "\\b(c\\.addi4spn|c\\.fld|c\\.lq|c\\.lw|c\\.flw|c\\.ld|c\\.fsd|c\\.sq|c\\.sw|c\\.fsw|c\\.sd|c\\.nop|c\\.addi|c\\.jal|c\\.addiw|c\\.li|c\\.addi16sp|c\\.lui|c\\.srli|c\\.srli64|c\\.srai|c\\.srai64|c\\.andi|c\\.sub|c\\.xor|c\\.or|c\\.and|c\\.subw|c\\.addw|c\\.j|c\\.beqz|c\\.bnez)\\b", + "name": "support.function.riscv.c" + }, + { + "comment": "A extension (atomic instructions)", + "match": "\\b(lr\\.[w|d]|sc\\.[w|d]|amoswap\\.[w|d]|amoadd\\.[w|d]|amoxor\\.[w|d]|amoand\\.[w|d]|amoor\\.[w|d]|amomin\\.[w|d]|amomax\\.[w|d]|amominu\\.[w|d]|amomaxu\\.[w|d])\\b", + "name": "support.function.riscv.a" + }, + { + "comment": "F extension (single precision floating point)", + "match": "\\b(flw|fsw|fmadd\\.s|fmsub\\.s|fnmsub\\.s|fnmadd\\.s|fadd\\.s|fsub\\.s|fmul\\.s|fdiv\\.s|fsqrt\\.s|fsgnj\\.s|fsgnjn\\.s|fsgnjx\\.s|fmin\\.s|fmax\\.s|fcvt\\.w\\.s|fcvt\\.wu\\.s|fmv\\.x\\.w|feq\\.s|flt\\.s|fle\\.s|fclass\\.s|fcvt\\.s\\.w|fcvt\\.s\\.wu|fmv\\.w\\.x|fcvt\\.l\\.s|fcvt\\.lu\\.s|fcvt\\.s\\.l|fcvt\\.s\\.lu)\\b", + "name": "support.function.riscv.f" + }, + { + "comment": "D extension (double precision floating point)", + "match": "\\b(fld|fsd|fmadd\\.d|fmsub\\.d|fnmsub\\.d|fnmadd\\.d|fadd\\.d|fsub\\.d|fmul\\.d|fdiv\\.d|fsqrt\\.d|fsgnj\\.d|fsgnjn\\.d|fsgnjx\\.d|fmin\\.d|fmax\\.d|fcvt\\.s\\.d|fcvt\\.d\\.s|feq\\.d|flt\\.d|fle\\.d|fclass\\.d|fcvt\\.w\\.d|fcvt\\.wu\\.d|fcvt\\.d\\.w|fcvt\\.d\\.wu|fcvt\\.l\\.d|fcvt\\.lu\\.d|fmv\\.x\\.d|fcvt\\.d\\.l|fcvt\\.d\\.lu|fmv\\.d\\.x)\\b", + "name": "support.function.riscv.d" + }, + { + "match": "\\.(skip|ascii|asciiz|byte|[2|4|8]byte|data|double|float|half|kdata|ktext|space|text|word|dword|dtprelword|dtpreldword|set\\s*(noat|at)|[s|u]leb128|string|incbin|zero|rodata|comm|common)\\b", + "name": "storage.type.riscv" + }, + { + "match": "\\.(balign|align|p2align|extern|globl|global|local|pushsection|section|bss|insn|option|type|equ|macro|endm|file|ident)\\b", + "name": "storage.modifier.riscv" + }, + { + "captures": { + "1": { + "name": "entity.name.function.label.riscv" + } + }, + "match": "\\b([A-Za-z0-9_]+):", + "name": "meta.function.label.riscv" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.riscv" + } + }, + "match": "\\b(x([0-9]|1[0-9]|2[0-9]|3[0-1]))\\b", + "name": "variable.other.register.usable.by-number.riscv" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.riscv" + } + }, + "match": "\\b(zero|ra|sp|gp|tp|t[0-6]|a[0-7]|s[0-9]|fp|s1[0-1])\\b", + "name": "variable.other.register.usable.by-name.riscv" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.riscv" + } + }, + "match": "\\b(([umsh]|vs)status|([umsh]|vs)ie|([ums]|vs)tvec|([ums]|vs)scratch|([ums]|vs)epc|([ums]|vs)cause|([umsh]|vs)tval|([umsh]|vs)ip|fflags|frm|fcsr|m?cycleh?|timeh?|m?instreth?|m?hpmcounter([3-9]|[12][0-9]|3[01])h?|[msh][ei]deleg|[msh]counteren|v?satp|hgeie|hgeip|[hm]tinst|hvip|hgatp|htimedeltah?|mvendorid|marchid|mimpid|mhartid|misa|mstatush|mtval2|pmpcfg[0-3]|pmpaddr([0-9]|1[0-5])|mcountinhibit|mhpmevent([3-9]|[12][0-9]|3[01])|tselect|tdata[1-3]|dcsr|dpc|dscratch[0-1])\\b", + "name": "variable.other.csr.names.riscv" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.riscv" + } + }, + "match": "\\bf([0-9]|1[0-9]|2[0-9]|3[0-1])\\b", + "name": "variable.other.register.usable.floating-point.riscv" + }, + { + "match": "\\b\\d+\\.\\d+\\b", + "name": "constant.numeric.float.riscv" + }, + { + "match": "\\b(\\d+|0(x|X)[a-fA-F0-9]+)\\b", + "name": "constant.numeric.integer.riscv" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.riscv" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.riscv" + } + }, + "name": "string.quoted.double.riscv", + "patterns": [ + { + "match": "\\\\[rnt\\\\\"]", + "name": "constant.character.escape.riscv" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.riscv" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.riscv" + } + }, + "name": "string.quoted.single.riscv", + "patterns": [ + { + "match": "\\\\[rnt\\\\\"]", + "name": "constant.character.escape.riscv" + } + ] + }, + { + "begin": "\\/\\*", + "end": "\\*\\/", + "name": "comment.block" + }, + { + "begin": "\\/\\/", + "end": "\\n", + "name": "comment.line.double-slash" + }, + { + "begin": "(?x)\n ^\\s*\\#\\s*(define)\\s+ # define\n ((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name\n (?: # and optionally:\n (\\() # an open parenthesis\n (\n \\s* \\g<id> \\s* # first argument\n ((,) \\s* \\g<id> \\s*)* # additional arguments\n (?:\\.\\.\\.)? # varargs ellipsis?\n )\n (\\)) # a close parenthesis\n )?\n ", + "beginCaptures": { + "1": { + "name": "keyword.control.import.define.c" + }, + "2": { + "name": "entity.name.function.preprocessor.c" + }, + "4": { + "name": "punctuation.definition.parameters.c" + }, + "5": { + "name": "variable.parameter.preprocessor.c" + }, + "7": { + "name": "punctuation.separator.parameters.c" + }, + "8": { + "name": "punctuation.definition.parameters.c" + } + }, + "end": "(?=(?://|/\\*))|$", + "name": "meta.preprocessor.macro.c", + "patterns": [ + { + "match": "(?>\\\\\\s*\\n)", + "name": "punctuation.separator.continuation.c" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^\\s*#\\s*(error|warning)\\b", + "captures": { + "1": { + "name": "keyword.control.import.error.c" + } + }, + "end": "$", + "name": "meta.preprocessor.diagnostic.c", + "patterns": [ + { + "match": "(?>\\\\\\s*\\n)", + "name": "punctuation.separator.continuation.c" + } + ] + }, + { + "begin": "^\\s*#\\s*(include|import)\\b\\s+", + "captures": { + "1": { + "name": "keyword.control.import.include.c" + } + }, + "end": "(?=(?://|/\\*))|$", + "name": "meta.preprocessor.c.include", + "patterns": [ + { + "match": "(?>\\\\\\s*\\n)", + "name": "punctuation.separator.continuation.c" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.c" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.c" + } + }, + "name": "string.quoted.double.include.c" + }, + { + "begin": "<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.c" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.c" + } + }, + "name": "string.quoted.other.lt-gt.include.c" + } + ] + }, + { + "begin": "^\\s*#\\s*(define|defined|elif|else|if|ifdef|ifndef|line|pragma|undef|endif)\\b", + "captures": { + "1": { + "name": "keyword.control.import.c" + } + }, + "end": "(?=(?://|/\\*))|$", + "name": "meta.preprocessor.c", + "patterns": [ + { + "match": "(?>\\\\\\s*\\n)", + "name": "punctuation.separator.continuation.c" + } + ] + }, + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.riscv" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#|(\\/\\/)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.riscv" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.riscv" + } + ] + } + ], + "scopeName": "source.riscv", + "uuid": "003223C7-B8D1-4B7F-BF91-5E0062B19B53" +} diff --git a/src/lib/shiki/languages/rst.tmLanguage.json b/src/lib/shiki/languages/rst.tmLanguage.json new file mode 100644 index 0000000..8b2e9cb --- /dev/null +++ b/src/lib/shiki/languages/rst.tmLanguage.json @@ -0,0 +1,740 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/trond-snekvik/vscode-rst/blob/master/syntaxes/rst.tmLanguage.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/trond-snekvik/vscode-rst/commit/4f6f1a8f94e0d16e30dddc9c4e359d062b715408", + "scopeName": "source.rst", + "patterns": [ + { + "include": "#body" + } + ], + "repository": { + "body": { + "patterns": [ + { + "include": "#title" + }, + { + "include": "#inline-markup" + }, + { + "include": "#anchor" + }, + { + "include": "#line-block" + }, + { + "include": "#replace-include" + }, + { + "include": "#footnote" + }, + { + "include": "#substitution" + }, + { + "include": "#blocks" + }, + { + "include": "#table" + }, + { + "include": "#simple-table" + }, + { + "include": "#options-list" + } + ] + }, + "title": { + "match": "^(\\*{3,}|#{3,}|\\={3,}|~{3,}|\\+{3,}|-{3,}|`{3,}|\\^{3,}|:{3,}|\"{3,}|_{3,}|'{3,})$", + "name": "markup.heading" + }, + "inline-markup": { + "patterns": [ + { + "include": "#escaped" + }, + { + "include": "#ignore" + }, + { + "include": "#ref" + }, + { + "include": "#literal" + }, + { + "include": "#monospaced" + }, + { + "include": "#citation" + }, + { + "include": "#bold" + }, + { + "include": "#italic" + }, + { + "include": "#list" + }, + { + "include": "#macro" + }, + { + "include": "#reference" + }, + { + "include": "#footnote-ref" + } + ] + }, + "ignore": { + "patterns": [ + { + "match": "'[`*]+'" + }, + { + "match": "<[`*]+>" + }, + { + "match": "{[`*]+}" + }, + { + "match": "\\([`*]+\\)" + }, + { + "match": "\\[[`*]+\\]" + }, + { + "match": "\"[`*]+\"" + } + ] + }, + "table": { + "begin": "^\\s*\\+[=+-]+\\+\\s*$", + "end": "^(?![+|])", + "beginCaptures": { + "0": { + "name": "keyword.control.table" + } + }, + "patterns": [ + { + "match": "[=+|-]", + "name": "keyword.control.table" + } + ] + }, + "simple-table": { + "match": "^[=\\s]+$", + "name": "keyword.control.table" + }, + "ref": { + "begin": "(:ref:)`", + "end": "`|^\\s*$", + "name": "entity.name.tag", + "beginCaptures": { + "1": { + "name": "keyword.control" + } + }, + "patterns": [ + { + "match": "<.*?>", + "name": "markup.underline.link" + } + ] + }, + "reference": { + "match": "[\\w-]*[a-zA-Z\\d-]__?\\b", + "name": "entity.name.tag" + }, + "macro": { + "match": "\\|[^\\|]+\\|", + "name": "entity.name.tag" + }, + "literal": { + "match": "(:\\S+:)(`.*?`\\\\?)", + "captures": { + "1": { + "name": "keyword.control" + }, + "2": { + "name": "entity.name.tag" + } + } + }, + "monospaced": { + "begin": "(?<=[\\s\"'(\\[{<]|^)``[^\\s`]", + "end": "``|^\\s*$", + "name": "string.interpolated" + }, + "citation": { + "begin": "(?<=[\\s\"'(\\[{<]|^)`[^\\s`]", + "end": "`_{,2}|^\\s*$", + "name": "entity.name.tag", + "applyEndPatternLast": 0 + }, + "bold": { + "begin": "(?<=[\\s\"'(\\[{<]|^)\\*{2}[^\\s*]", + "end": "\\*{2}|^\\s*$", + "name": "markup.bold" + }, + "italic": { + "begin": "(?<=[\\s\"'(\\[{<]|^)\\*[^\\s*]", + "end": "\\*|^\\s*$", + "name": "markup.italic" + }, + "escaped": { + "match": "\\\\.", + "name": "constant.character.escape" + }, + "list": { + "match": "^\\s*(\\d+\\.|\\* -|[a-zA-Z#]\\.|[iIvVxXmMcC]+\\.|\\(\\d+\\)|\\d+\\)|[*+-])\\s+", + "name": "keyword.control" + }, + "line-block": { + "match": "^\\|\\s+", + "name": "keyword.control" + }, + "raw-html": { + "begin": "^(\\s*)(\\.{2}\\s+raw\\s*::)\\s+(html)\\s*$", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.control" + }, + "3": { + "name": "variable.parameter.html" + } + }, + "patterns": [ + { + "include": "#block-param" + }, + { + "include": "text.html.derivative" + } + ] + }, + "anchor": { + "match": "^\\.{2}\\s+(_[^:]+:)\\s*", + "name": "entity.name.tag.anchor" + }, + "replace-include": { + "match": "^\\s*(\\.{2})\\s+(\\|[^\\|]+\\|)\\s+(replace::)", + "captures": { + "1": { + "name": "keyword.control" + }, + "2": { + "name": "entity.name.tag" + }, + "3": { + "name": "keyword.control" + } + } + }, + "footnote": { + "match": "^\\s*\\.{2}\\s+\\[(?:[\\w\\.-]+|[#*]|#\\w+)\\]\\s+", + "name": "entity.name.tag" + }, + "footnote-ref": { + "match": "\\[(?:[\\w\\.-]+|[#*])\\]_", + "name": "entity.name.tag" + }, + "substitution": { + "match": "^\\.{2}\\s*\\|([^|]+)\\|", + "name": "entity.name.tag" + }, + "options-list": { + "match": "^((?:-\\w|--[\\w-]+|/\\w+)(?:,? ?[\\w-]+)*)(?: |\\t|$)", + "name": "variable.parameter" + }, + "blocks": { + "patterns": [ + { + "include": "#domains" + }, + { + "include": "#doctest" + }, + { + "include": "#code-block-cpp" + }, + { + "include": "#code-block-py" + }, + { + "include": "#code-block-console" + }, + { + "include": "#code-block-javascript" + }, + { + "include": "#code-block-yaml" + }, + { + "include": "#code-block-cmake" + }, + { + "include": "#code-block-kconfig" + }, + { + "include": "#code-block-ruby" + }, + { + "include": "#code-block-dts" + }, + { + "include": "#code-block" + }, + { + "include": "#doctest-block" + }, + { + "include": "#raw-html" + }, + { + "include": "#block" + }, + { + "include": "#literal-block" + }, + { + "include": "#block-comment" + } + ] + }, + "block-comment": { + "begin": "^(\\s*)\\.{2}(\\s+|$)", + "end": "^(?=\\S)|^\\s*$", + "name": "comment.block", + "patterns": [ + { + "begin": "^\\s{3,}(?=\\S)", + "while": "^\\s{3}.*|^\\s*$", + "name": "comment.block" + } + ] + }, + "literal-block": { + "begin": "^(\\s*)(.*)(::)\\s*$", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "patterns": [ + { + "include": "#inline-markup" + } + ] + }, + "3": { + "name": "keyword.control" + } + } + }, + "block": { + "begin": "^(\\s*)(\\.{2}\\s+\\S+::)(.*)", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.control" + }, + "3": { + "name": "variable" + } + }, + "patterns": [ + { + "include": "#block-param" + }, + { + "include": "#body" + } + ] + }, + "block-param": { + "patterns": [ + { + "match": "(:param\\s+(.+?):)(?:\\s|$)", + "captures": { + "1": { + "name": "keyword.control" + }, + "2": { + "name": "variable.parameter" + } + } + }, + { + "match": "(:.+?:)(?:$|\\s+(.*))", + "captures": { + "1": { + "name": "keyword.control" + }, + "2": { + "patterns": [ + { + "match": "\\b(0x[a-fA-F\\d]+|\\d+)\\b", + "name": "constant.numeric" + }, + { + "include": "#inline-markup" + } + ] + } + } + } + ] + }, + "domains": { + "patterns": [ + { + "include": "#domain-cpp" + }, + { + "include": "#domain-py" + }, + { + "include": "#domain-auto" + }, + { + "include": "#domain-js" + } + ] + }, + "domain-cpp": { + "begin": "^(\\s*)(\\.{2}\\s+(?:cpp|c):(?:class|struct|function|member|var|type|enum|enum-struct|enum-class|enumerator|union|concept)::)\\s*(?:(@\\w+)|(.*))", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.control" + }, + "3": { + "name": "entity.name.tag" + }, + "4": { + "patterns": [ + { + "include": "source.cpp" + } + ] + } + }, + "patterns": [ + { + "include": "#block-param" + }, + { + "include": "#body" + } + ] + }, + "domain-py": { + "begin": "^(\\s*)(\\.{2}\\s+py:(?:module|function|data|exception|class|attribute|property|method|staticmethod|classmethod|decorator|decoratormethod)::)\\s*(.*)", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.control" + }, + "3": { + "patterns": [ + { + "include": "source.python" + } + ] + } + }, + "patterns": [ + { + "include": "#block-param" + }, + { + "include": "#body" + } + ] + }, + "domain-auto": { + "begin": "^(\\s*)(\\.{2}\\s+auto(?:class|module|exception|function|decorator|data|method|attribute|property)::)\\s*(.*)", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.control.py" + }, + "3": { + "patterns": [ + { + "include": "source.python" + } + ] + } + }, + "patterns": [ + { + "include": "#block-param" + }, + { + "include": "#body" + } + ] + }, + "domain-js": { + "begin": "^(\\s*)(\\.{2}\\s+js:\\w+::)\\s*(.*)", + "end": "^(?!\\1[ \\t]|$)", + "beginCaptures": { + "2": { + "name": "keyword.control" + }, + "3": { + "patterns": [ + { + "include": "source.js" + } + ] + } + }, + "patterns": [ + { + "include": "#block-param" + }, + { + "include": "#body" + } + ] + }, + "doctest": { + "begin": "^(>>>)\\s*(.*)", + "end": "^\\s*$", + "beginCaptures": { + "1": { + "name": "keyword.control" + }, + "2": { + "patterns": [ + { + "include": "source.python" + } + ] + } + } + }, + "code-block-cpp": { + "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(c|c\\+\\+|cpp|C|C\\+\\+|CPP|Cpp)\\s*$", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.control" + }, + "4": { + "name": "variable.parameter.codeblock.cpp" + } + }, + "patterns": [ + { + "include": "#block-param" + }, + { + "include": "source.cpp" + } + ] + }, + "code-block-console": { + "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(console|shell|bash)\\s*$", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.control" + }, + "4": { + "name": "variable.parameter.codeblock.console" + } + }, + "patterns": [ + { + "include": "#block-param" + }, + { + "include": "source.shell" + } + ] + }, + "code-block-py": { + "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(python)\\s*$", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.control" + }, + "4": { + "name": "variable.parameter.codeblock.py" + } + }, + "patterns": [ + { + "include": "#block-param" + }, + { + "include": "source.python" + } + ] + }, + "code-block-javascript": { + "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(javascript)\\s*$", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.control" + }, + "4": { + "name": "variable.parameter.codeblock.js" + } + }, + "patterns": [ + { + "include": "#block-param" + }, + { + "include": "source.js" + } + ] + }, + "code-block-yaml": { + "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(ya?ml)\\s*$", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.control" + }, + "4": { + "name": "variable.parameter.codeblock.yaml" + } + }, + "patterns": [ + { + "include": "#block-param" + }, + { + "include": "source.yaml" + } + ] + }, + "code-block-cmake": { + "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(cmake)\\s*$", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.control" + }, + "4": { + "name": "variable.parameter.codeblock.cmake" + } + }, + "patterns": [ + { + "include": "#block-param" + }, + { + "include": "source.cmake" + } + ] + }, + "code-block-kconfig": { + "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*([kK]config)\\s*$", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.control" + }, + "4": { + "name": "variable.parameter.codeblock.kconfig" + } + }, + "patterns": [ + { + "include": "#block-param" + }, + { + "include": "source.kconfig" + } + ] + }, + "code-block-ruby": { + "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(ruby)\\s*$", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.control" + }, + "4": { + "name": "variable.parameter.codeblock.ruby" + } + }, + "patterns": [ + { + "include": "#block-param" + }, + { + "include": "source.ruby" + } + ] + }, + "code-block-dts": { + "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(dts|DTS|devicetree)\\s*$", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.control" + }, + "4": { + "name": "variable.parameter.codeblock.dts" + } + }, + "patterns": [ + { + "include": "#block-param" + }, + { + "include": "source.dts" + } + ] + }, + "code-block": { + "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.control" + } + }, + "patterns": [ + { + "include": "#block-param" + } + ] + }, + "doctest-block": { + "begin": "^(\\s*)(\\.{2}\\s+doctest::)\\s*$", + "while": "^\\1(?=\\s)|^\\s*$", + "beginCaptures": { + "2": { + "name": "keyword.control" + } + }, + "patterns": [ + { + "include": "#block-param" + }, + { + "include": "source.python" + } + ] + } + }, + "name": "rst" +} diff --git a/src/lib/shiki/languages/ruby.tmLanguage.json b/src/lib/shiki/languages/ruby.tmLanguage.json new file mode 100644 index 0000000..0b04405 --- /dev/null +++ b/src/lib/shiki/languages/ruby.tmLanguage.json @@ -0,0 +1,2775 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/ruby.tmbundle/blob/master/Syntaxes/Ruby.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/textmate/ruby.tmbundle/commit/efcb8941c701343f1b2e9fb105c678152fea6892", + "name": "ruby", + "scopeName": "source.ruby", + "comment": "\n\tTODO: unresolved issues\n\n\ttext:\n\t\"p <<end\n\tprint me!\n\tend\"\n\tsymptoms:\n\tnot recognized as a heredoc\n\tsolution:\n\tthere is no way to distinguish perfectly between the << operator and the start\n\tof a heredoc. Currently, we require assignment to recognize a heredoc. More\n\trefinement is possible.\n\t• Heredocs with indented terminators (<<-) are always distinguishable, however.\n\t• Nested heredocs are not really supportable at present\n\n\ttext:\n\tprint <<-'THERE' \n\tThis is single quoted. \n\tThe above used #{Time.now} \n\tTHERE \n\tsymtoms:\n\tFrom Programming Ruby p306; should be a non-interpolated heredoc.\n\t\n text:\n val?(a):p(b)\n val?'a':'b'\n symptoms:\n ':p' is recognized as a symbol.. its 2 things ':' and 'p'.\n :'b' has same problem.\n solution:\n ternary operator rule, precedence stuff, symbol rule.\n but also consider 'a.b?(:c)' ??\n", + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.control.class.ruby" + }, + "2": { + "name": "entity.name.type.class.ruby" + }, + "3": { + "name": "keyword.operator.other.ruby" + }, + "4": { + "name": "entity.other.inherited-class.ruby" + }, + "5": { + "name": "keyword.operator.other.ruby" + }, + "6": { + "name": "variable.other.object.ruby" + } + }, + "match": "^\\s*(class)\\s+(?:([.a-zA-Z0-9_:]+)(?:\\s*(<)\\s*([.a-zA-Z0-9_:]+))?|(<<)\\s*([.a-zA-Z0-9_:]+))", + "name": "meta.class.ruby" + }, + { + "captures": { + "1": { + "name": "keyword.control.module.ruby" + }, + "2": { + "name": "entity.name.type.module.ruby" + }, + "3": { + "name": "entity.other.inherited-class.module.first.ruby" + }, + "4": { + "name": "punctuation.separator.inheritance.ruby" + }, + "5": { + "name": "entity.other.inherited-class.module.second.ruby" + }, + "6": { + "name": "punctuation.separator.inheritance.ruby" + }, + "7": { + "name": "entity.other.inherited-class.module.third.ruby" + }, + "8": { + "name": "punctuation.separator.inheritance.ruby" + } + }, + "match": "^\\s*(module)\\s+(([A-Z]\\w*(::))?([A-Z]\\w*(::))?([A-Z]\\w*(::))*[A-Z]\\w*)", + "name": "meta.module.ruby" + }, + { + "comment": "else if is a common mistake carried over from other languages. it works if you put in a second end, but it’s never what you want.", + "match": "(?<!\\.)\\belse(\\s)+if\\b", + "name": "invalid.deprecated.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.ruby" + } + }, + "comment": "symbols as hash key (1.9 syntax)", + "match": "(?>[a-zA-Z_]\\w*(?>[?!])?)(:)(?!:)", + "name": "constant.other.symbol.hashkey.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.ruby" + } + }, + "comment": "symbols as hash key (1.8 syntax)", + "match": "(?<!:)(:)(?>[a-zA-Z_]\\w*(?>[?!])?)(?=\\s*=>)", + "name": "constant.other.symbol.hashkey.ruby" + }, + { + "comment": "everything being a reserved word, not a value and needing a 'end' is a..", + "match": "(?<!\\.)\\b(BEGIN|begin|case|class|else|elsif|END|end|ensure|for|if|in|module|rescue|then|unless|until|when|while)\\b(?![?!])", + "name": "keyword.control.ruby" + }, + { + "comment": "contextual smart pair support for block parameters", + "match": "(?<!\\.)\\bdo\\b", + "name": "keyword.control.start-block.ruby" + }, + { + "comment": "contextual smart pair support", + "match": "(?<=\\{)(\\s+)", + "name": "meta.syntax.ruby.start-block" + }, + { + "match": "(?<!\\.)\\b(alias|alias_method|block_given[?]|break|defined[?]|iterator[?]|next|redo|retry|return|super|undef|yield)(\\b|(?<=[?]))(?![?!])", + "name": "keyword.control.pseudo-method.ruby" + }, + { + "match": "\\b(nil|true|false)\\b(?![?!])", + "name": "constant.language.ruby" + }, + { + "match": "\\b(__(dir|FILE|LINE)__)\\b(?![?!])", + "name": "variable.language.ruby" + }, + { + "begin": "^__END__\\n", + "captures": { + "0": { + "name": "string.unquoted.program-block.ruby" + } + }, + "comment": "__END__ marker", + "contentName": "text.plain", + "end": "(?=not)impossible", + "patterns": [ + { + "begin": "(?=<?xml|<(?i:html\\b)|!DOCTYPE (?i:html\\b))", + "end": "(?=not)impossible", + "name": "text.html.embedded.ruby", + "patterns": [ + { + "include": "text.html.basic" + } + ] + } + ] + }, + { + "match": "\\b(self)\\b(?![?!])", + "name": "variable.language.self.ruby" + }, + { + "comment": " everything being a method but having a special function is a..", + "match": "\\b(initialize|new|loop|include|extend|prepend|fail|raise|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|private_class_method|module_function|public|public_class_method|protected|refine|using)\\b(?![?!])", + "name": "keyword.other.special-method.ruby" + }, + { + "begin": "\\b(?<!\\.|::)(require|require_relative)\\b", + "captures": { + "1": { + "name": "keyword.other.special-method.ruby" + } + }, + "end": "$|(?=#|\\})", + "name": "meta.require.ruby", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.ruby" + } + }, + "match": "(@)[a-zA-Z_]\\w*", + "name": "variable.other.readwrite.instance.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.ruby" + } + }, + "match": "(@@)[a-zA-Z_]\\w*", + "name": "variable.other.readwrite.class.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.ruby" + } + }, + "match": "(\\$)[a-zA-Z_]\\w*", + "name": "variable.other.readwrite.global.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.ruby" + } + }, + "match": "(\\$)(!|@|&|`|'|\\+|\\d+|~|=|/|\\\\|,|;|\\.|<|>|_|\\*|\\$|\\?|:|\"|-[0adFiIlpvw])", + "name": "variable.other.readwrite.global.pre-defined.ruby" + }, + { + "begin": "\\b(ENV)\\[", + "beginCaptures": { + "1": { + "name": "variable.other.constant.ruby" + } + }, + "end": "\\]", + "name": "meta.environment-variable.ruby", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "match": "\\b[A-Z]\\w*(?=((\\.|::)[A-Za-z]|\\[))", + "name": "support.class.ruby" + }, + { + "match": "\\b(abort|at_exit|autoload[?]?|binding|callcc|caller|caller_locations|chomp|chop|eval|exec|exit|exit!|fork|format|gets|global_variables|gsub|lambda|load|local_variables|open|p|print|printf|proc|putc|puts|rand|readline|readlines|select|set_trace_func|sleep|spawn|sprintf|srand|sub|syscall|system|test|trace_var|trap|untrace_var|warn)(\\b|(?<=[?!]))(?![?!])", + "name": "support.function.kernel.ruby" + }, + { + "match": "\\b[A-Z]\\w*\\b", + "name": "variable.other.constant.ruby" + }, + { + "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|!=|!~|>[>=]?|<=>|<[<=]?|[%&`/\\|^]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t \\s*(\\() # the openning parenthesis for arguments\n\t\t\t ", + "beginCaptures": { + "1": { + "name": "keyword.control.def.ruby" + }, + "2": { + "name": "entity.name.function.ruby" + }, + "3": { + "name": "punctuation.definition.parameters.ruby" + } + }, + "comment": "the method pattern comes from the symbol pattern, see there for a explaination", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.ruby" + } + }, + "name": "meta.function.method.with-arguments.ruby", + "patterns": [ + { + "begin": "(?=[&*_a-zA-Z])", + "end": "(?=[,)])", + "patterns": [ + { + "captures": { + "1": { + "name": "storage.type.variable.ruby" + }, + "2": { + "name": "constant.other.symbol.hashkey.parameter.function.ruby" + }, + "3": { + "name": "punctuation.definition.constant.ruby" + }, + "4": { + "name": "variable.parameter.function.ruby" + } + }, + "match": "\\G([&*]?)(?:([_a-zA-Z]\\w*(:))|([_a-zA-Z]\\w*))" + }, + { + "include": "#parens" + }, + { + "include": "#braces" + }, + { + "include": "$self" + } + ] + } + ], + "repository": { + "braces": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.function.begin.ruby" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.function.end.ruby" + } + }, + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#braces" + }, + { + "include": "$self" + } + ] + }, + "parens": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.function.begin.ruby" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.function.end.ruby" + } + }, + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#braces" + }, + { + "include": "$self" + } + ] + } + } + }, + { + "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|!=|!~|>[>=]?|<=>|<[<=]?|[%&`/\\|^]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t [ \\t] # the space separating the arguments\n\t\t\t (?=[ \\t]*[^\\s#;]) # make sure arguments and not a comment follow\n\t\t\t ", + "beginCaptures": { + "1": { + "name": "keyword.control.def.ruby" + }, + "2": { + "name": "entity.name.function.ruby" + } + }, + "comment": "same as the previous rule, but without parentheses around the arguments", + "end": "$", + "name": "meta.function.method.with-arguments.ruby", + "patterns": [ + { + "begin": "(?![\\s,])", + "end": "(?=,|$)", + "patterns": [ + { + "captures": { + "1": { + "name": "storage.type.variable.ruby" + }, + "2": { + "name": "constant.other.symbol.hashkey.parameter.function.ruby" + }, + "3": { + "name": "punctuation.definition.constant.ruby" + }, + "4": { + "name": "variable.parameter.function.ruby" + } + }, + "match": "\\G([&*]?)(?:([_a-zA-Z]\\w*(:))|([_a-zA-Z]\\w*))", + "name": "variable.parameter.function.ruby" + }, + { + "include": "$self" + } + ] + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.control.def.ruby" + }, + "3": { + "name": "entity.name.function.ruby" + } + }, + "comment": " the optional name is just to catch the def also without a method-name", + "match": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\b # the def keyword\n\t\t\t ( \\s+ # an optional group of whitespace followed by…\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|!=|!~|>[>=]?|<=>|<[<=]?|[%&`/\\|^]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) )? # …or an operator method\n\t\t\t ", + "name": "meta.function.method.without-arguments.ruby" + }, + { + "match": "\\b\\d(?>_?\\d)*(?=\\.\\d|[eE])(\\.\\d(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?r?i?\\b", + "name": "constant.numeric.float.ruby" + }, + { + "match": "\\b(0|(0[dD]\\d|[1-9])(?>_?\\d)*)r?i?\\b", + "name": "constant.numeric.integer.ruby" + }, + { + "match": "\\b0[xX]\\h(?>_?\\h)*r?i?\\b", + "name": "constant.numeric.hex.ruby" + }, + { + "match": "\\b0[bB][01](?>_?[01])*r?i?\\b", + "name": "constant.numeric.binary.ruby" + }, + { + "match": "\\b0([oO]?[0-7](?>_?[0-7])*)?r?i?\\b", + "name": "constant.numeric.octal.ruby" + }, + { + "begin": ":'", + "captures": { + "0": { + "name": "punctuation.definition.constant.ruby" + } + }, + "end": "'", + "name": "constant.other.symbol.single-quoted.ruby", + "patterns": [ + { + "match": "\\\\['\\\\]", + "name": "constant.character.escape.ruby" + } + ] + }, + { + "begin": ":\"", + "captures": { + "0": { + "name": "punctuation.definition.constant.ruby" + } + }, + "end": "\"", + "name": "constant.other.symbol.double-quoted.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "comment": "Needs higher precedence than regular expressions.", + "match": "(?<!\\()/=", + "name": "keyword.operator.assignment.augmented.ruby" + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "comment": "single quoted string (does not allow interpolation)", + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.single.ruby", + "patterns": [ + { + "match": "\\\\'|\\\\\\\\", + "name": "constant.character.escape.ruby" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "comment": "double quoted string (allows for interpolation)", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.double.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "`", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "comment": "execute string (allows for interpolation)", + "end": "`", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "include": "#percent_literals" + }, + { + "begin": "(?x)\n\t\t\t (?:\n\t\t\t ^ # beginning of line\n\t\t\t | (?<= # or look-behind on:\n\t\t\t [=>~(?:\\[,|&;]\n\t\t\t | [\\s;]if\\s\t\t\t# keywords\n\t\t\t | [\\s;]elsif\\s\n\t\t\t | [\\s;]while\\s\n\t\t\t | [\\s;]unless\\s\n\t\t\t | [\\s;]when\\s\n\t\t\t | [\\s;]assert_match\\s\n\t\t\t | [\\s;]or\\s\t\t\t# boolean opperators\n\t\t\t | [\\s;]and\\s\n\t\t\t | [\\s;]not\\s\n\t\t\t | [\\s.]index\\s\t\t\t# methods\n\t\t\t | [\\s.]scan\\s\n\t\t\t | [\\s.]sub\\s\n\t\t\t | [\\s.]sub!\\s\n\t\t\t | [\\s.]gsub\\s\n\t\t\t | [\\s.]gsub!\\s\n\t\t\t | [\\s.]match\\s\n\t\t\t )\n\t\t\t | (?<= # or a look-behind with line anchor:\n\t\t\t ^when\\s # duplication necessary due to limits of regex\n\t\t\t | ^if\\s\n\t\t\t | ^elsif\\s\n\t\t\t | ^while\\s\n\t\t\t | ^unless\\s\n\t\t\t )\n\t\t\t )\n\t\t\t \\s*((/))(?![*+{}?])\n\t\t\t", + "captures": { + "1": { + "name": "string.regexp.classic.ruby" + }, + "2": { + "name": "punctuation.definition.string.ruby" + } + }, + "comment": "regular expressions (normal)\n\t\t\twe only start a regexp if the character before it (excluding whitespace)\n\t\t\tis what we think is before a regexp\n\t\t\t", + "contentName": "string.regexp.classic.ruby", + "end": "((/[eimnosux]*))", + "patterns": [ + { + "include": "#regex_sub" + } + ] + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.ruby" + } + }, + "comment": "symbols", + "match": "(?<!:)(:)(?>[a-zA-Z_]\\w*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?|(@@?|\\$)[a-zA-Z_]\\w*)", + "name": "constant.other.symbol.ruby" + }, + { + "begin": "^=begin", + "captures": { + "0": { + "name": "punctuation.definition.comment.ruby" + } + }, + "comment": "multiline comments", + "end": "^=end", + "name": "comment.block.documentation.ruby" + }, + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.ruby" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.ruby" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.ruby" + } + ] + }, + { + "comment": "\n\t\t\tmatches questionmark-letters.\n\n\t\t\texamples (1st alternation = hex):\n\t\t\t?\\x1 ?\\x61\n\n\t\t\texamples (2nd alternation = octal):\n\t\t\t?\\0 ?\\07 ?\\017\n\n\t\t\texamples (3rd alternation = escaped):\n\t\t\t?\\n ?\\b\n\n\t\t\texamples (4th alternation = meta-ctrl):\n\t\t\t?\\C-a ?\\M-a ?\\C-\\M-\\C-\\M-a\n\n\t\t\texamples (4th alternation = normal):\n\t\t\t?a ?A ?0 \n\t\t\t?* ?\" ?( \n\t\t\t?. ?#\n\t\t\t\n\t\t\t\n\t\t\tthe negative lookbehind prevents against matching\n\t\t\tp(42.tainted?)\n\t\t\t", + "match": "(?<!\\w)\\?(\\\\(x\\h{1,2}(?!\\h)\\b|0[0-7]{0,2}(?![0-7])\\b|[^x0MC])|(\\\\[MC]-)+\\w|[^\\s\\\\])", + "name": "constant.numeric.ruby" + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)HTML)\\b\\1))", + "comment": "Heredoc with embedded html", + "end": "(?!\\G)", + "name": "meta.embedded.block.html", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)HTML)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "text.html", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "text.html.basic" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)XML)\\b\\1))", + "comment": "Heredoc with embedded xml", + "end": "(?!\\G)", + "name": "meta.embedded.block.xml", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)XML)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "text.xml", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "text.xml" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)SQL)\\b\\1))", + "comment": "Heredoc with embedded sql", + "end": "(?!\\G)", + "name": "meta.embedded.block.sql", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)SQL)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.sql", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.sql" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)CSS)\\b\\1))", + "comment": "Heredoc with embedded css", + "end": "(?!\\G)", + "name": "meta.embedded.block.css", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)CSS)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.css", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.css" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)CPP)\\b\\1))", + "comment": "Heredoc with embedded c++", + "end": "(?!\\G)", + "name": "meta.embedded.block.c++", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)CPP)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.c++", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.c++" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)C)\\b\\1))", + "comment": "Heredoc with embedded c", + "end": "(?!\\G)", + "name": "meta.embedded.block.c", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)C)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.c", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.c" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1))", + "comment": "Heredoc with embedded javascript", + "end": "(?!\\G)", + "name": "meta.embedded.block.js", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.js", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.js" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)JQUERY)\\b\\1))", + "comment": "Heredoc with embedded jQuery javascript", + "end": "(?!\\G)", + "name": "meta.embedded.block.js.jquery", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)JQUERY)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.js.jquery", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.js.jquery" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1))", + "comment": "Heredoc with embedded shell", + "end": "(?!\\G)", + "name": "meta.embedded.block.shell", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.shell", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.shell" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)LUA)\\b\\1))", + "comment": "Heredoc with embedded lua", + "end": "(?!\\G)", + "name": "meta.embedded.block.lua", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)LUA)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.lua", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.lua" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)RUBY)\\b\\1))", + "comment": "Heredoc with embedded ruby", + "end": "(?!\\G)", + "name": "meta.embedded.block.ruby", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)RUBY)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.ruby", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.ruby" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?>=\\s*<<(\\w+))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "^\\1$", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?><<[-~](\\w+))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "comment": "heredoc with indented terminator", + "end": "\\s*\\1$", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?<=\\{|do|\\{\\s|do\\s)(\\|)", + "captures": { + "1": { + "name": "punctuation.separator.arguments.ruby" + } + }, + "end": "(?<!\\|)(\\|)(?!\\|)", + "patterns": [ + { + "include": "$self" + }, + { + "match": "[_a-zA-Z][_a-zA-Z0-9]*", + "name": "variable.other.block.ruby" + }, + { + "match": ",", + "name": "punctuation.separator.variable.ruby" + } + ] + }, + { + "match": "=>", + "name": "punctuation.separator.key-value" + }, + { + "match": "->", + "name": "support.function.kernel.lambda.ruby" + }, + { + "match": "<<=|%=|&{1,2}=|\\*=|\\*\\*=|\\+=|-=|\\^=|\\|{1,2}=|<<", + "name": "keyword.operator.assignment.augmented.ruby" + }, + { + "match": "<=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|(?<=[ \\t])\\?", + "name": "keyword.operator.comparison.ruby" + }, + { + "match": "(?<!\\.)\\b(and|not|or)\\b(?![?!])", + "name": "keyword.operator.logical.ruby" + }, + { + "comment": "Make sure this goes after assignment and comparison", + "match": "(?<=^|[ \\t])!|&&|\\|\\||\\^", + "name": "keyword.operator.logical.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.method.ruby" + } + }, + "comment": "Safe navigation operator - Added in 2.3", + "match": "(&\\.)\\s*(?![A-Z])" + }, + { + "match": "(%|&|\\*\\*|\\*|\\+|-|/)", + "name": "keyword.operator.arithmetic.ruby" + }, + { + "match": "=", + "name": "keyword.operator.assignment.ruby" + }, + { + "match": "\\||~|>>", + "name": "keyword.operator.other.ruby" + }, + { + "match": ";", + "name": "punctuation.separator.statement.ruby" + }, + { + "match": ",", + "name": "punctuation.separator.object.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.namespace.ruby" + } + }, + "comment": "Mark as namespace separator if double colons followed by capital letter", + "match": "(::)\\s*(?=[A-Z])" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.method.ruby" + } + }, + "comment": "Mark as method separator if double colons not followed by capital letter", + "match": "(\\.|::)\\s*(?![A-Z])" + }, + { + "comment": "Must come after method and constant separators to prefer double colons", + "match": ":", + "name": "punctuation.separator.other.ruby" + }, + { + "match": "\\{", + "name": "punctuation.section.scope.begin.ruby" + }, + { + "match": "\\}", + "name": "punctuation.section.scope.end.ruby" + }, + { + "match": "\\[", + "name": "punctuation.section.array.begin.ruby" + }, + { + "match": "\\]", + "name": "punctuation.section.array.end.ruby" + }, + { + "match": "\\(|\\)", + "name": "punctuation.section.function.ruby" + } + ], + "repository": { + "escaped_char": { + "match": "\\\\(?:[0-7]{1,3}|x[\\da-fA-F]{1,2}|.)", + "name": "constant.character.escape.ruby" + }, + "heredoc": { + "begin": "^<<[-~]?\\w+", + "end": "$", + "patterns": [ + { + "include": "$self" + } + ] + }, + "interpolated_ruby": { + "patterns": [ + { + "begin": "#\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.ruby" + } + }, + "contentName": "source.ruby", + "end": "(\\})", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.ruby" + }, + "1": { + "name": "source.ruby" + } + }, + "name": "meta.embedded.line.ruby", + "patterns": [ + { + "include": "#nest_curly_and_self" + }, + { + "include": "$self" + } + ], + "repository": { + "nest_curly_and_self": { + "patterns": [ + { + "begin": "\\{", + "captures": { + "0": { + "name": "punctuation.section.scope.ruby" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#nest_curly_and_self" + } + ] + }, + { + "include": "$self" + } + ] + } + } + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.ruby" + } + }, + "match": "(#@)[a-zA-Z_]\\w*", + "name": "variable.other.readwrite.instance.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.ruby" + } + }, + "match": "(#@@)[a-zA-Z_]\\w*", + "name": "variable.other.readwrite.class.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.ruby" + } + }, + "match": "(#\\$)[a-zA-Z_]\\w*", + "name": "variable.other.readwrite.global.ruby" + } + ] + }, + "percent_literals": { + "patterns": [ + { + "begin": "%i(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "meta.array.symbol.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#symbol" + } + ] + }, + { + "include": "#symbol" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\<|\\\\>", + "name": "constant.other.symbol.ruby" + }, + { + "begin": "<", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": ">", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\{|\\\\\\}", + "name": "constant.other.symbol.ruby" + }, + { + "begin": "\\{", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\[|\\\\\\]", + "name": "constant.other.symbol.ruby" + }, + { + "begin": "\\[", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\(|\\\\\\)", + "name": "constant.other.symbol.ruby" + }, + { + "begin": "\\(", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "symbol": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\\\|\\\\[ ]", + "name": "constant.other.symbol.ruby" + }, + { + "match": "\\S\\w*", + "name": "constant.other.symbol.ruby" + } + ] + } + } + }, + { + "begin": "%I(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "meta.array.symbol.interpolated.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#symbol" + } + ] + }, + { + "include": "#symbol" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "begin": "<", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": ">", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "begin": "\\{", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "begin": "\\[", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "begin": "\\(", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "symbol": { + "patterns": [ + { + "begin": "(?=\\\\|#\\{)", + "end": "(?!\\G)", + "name": "constant.other.symbol.ruby", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + } + ] + }, + { + "match": "\\S\\w*", + "name": "constant.other.symbol.ruby" + } + ] + } + } + }, + { + "begin": "%q(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + } + ] + } + ], + "repository": { + "angles": { + "patterns": [ + { + "match": "\\\\<|\\\\>|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "<", + "end": ">", + "patterns": [ + { + "include": "#angles" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "match": "\\\\\\{|\\\\\\}|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#braces" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "match": "\\\\\\[|\\\\\\]|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "match": "\\\\\\(|\\\\\\)|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#parens" + } + ] + } + ] + } + } + }, + { + "begin": "%Q?(?:([(\\[{<])|([^\\w\\s=]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.interpolated.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + } + ] + }, + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "<", + "end": ">", + "patterns": [ + { + "include": "#angles" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#braces" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#parens" + } + ] + } + ] + } + } + }, + { + "begin": "%r(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "([)\\]}>]\\2|\\1\\2)[eimnosux]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.regexp.percent.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + } + ] + }, + { + "include": "#regex_sub" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "include": "#regex_sub" + }, + { + "begin": "<", + "end": ">", + "patterns": [ + { + "include": "#angles" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "include": "#regex_sub" + }, + { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#braces" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "include": "#regex_sub" + }, + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "include": "#regex_sub" + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#parens" + } + ] + } + ] + } + } + }, + { + "begin": "%s(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.constant.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.definition.constant.end.ruby" + } + }, + "name": "constant.other.symbol.percent.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + } + ] + } + ], + "repository": { + "angles": { + "patterns": [ + { + "match": "\\\\<|\\\\>|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "<", + "end": ">", + "patterns": [ + { + "include": "#angles" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "match": "\\\\\\{|\\\\\\}|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#braces" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "match": "\\\\\\[|\\\\\\]|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "match": "\\\\\\(|\\\\\\)|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#parens" + } + ] + } + ] + } + } + }, + { + "begin": "%w(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "meta.array.string.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#string" + } + ] + }, + { + "include": "#string" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\<|\\\\>", + "name": "string.other.ruby" + }, + { + "begin": "<", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": ">", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#string" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\{|\\\\\\}", + "name": "string.other.ruby" + }, + { + "begin": "\\{", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#string" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\[|\\\\\\]", + "name": "string.other.ruby" + }, + { + "begin": "\\[", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#string" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\(|\\\\\\)", + "name": "string.other.ruby" + }, + { + "begin": "\\(", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#string" + } + ] + } + ] + }, + "string": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\\\|\\\\[ ]", + "name": "string.other.ruby" + }, + { + "match": "\\S\\w*", + "name": "string.other.ruby" + } + ] + } + } + }, + { + "begin": "%W(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "meta.array.string.interpolated.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#string" + } + ] + }, + { + "include": "#string" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "begin": "<", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": ">", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#string" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "begin": "\\{", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#string" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "begin": "\\[", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#string" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "begin": "\\(", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#string" + } + ] + } + ] + }, + "string": { + "patterns": [ + { + "begin": "(?=\\\\|#\\{)", + "end": "(?!\\G)", + "name": "string.other.ruby", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + } + ] + }, + { + "match": "\\S\\w*", + "name": "string.other.ruby" + } + ] + } + } + }, + { + "begin": "%x(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.interpolated.percent.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + } + ] + }, + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "<", + "end": ">", + "patterns": [ + { + "include": "#angles" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#braces" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#parens" + } + ] + } + ] + } + } + } + ] + }, + "regex_sub": { + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.quantifier.begin.ruby" + }, + "3": { + "name": "punctuation.definition.quantifier.end.ruby" + } + }, + "match": "(\\{)\\d+(,\\d+)?(\\})", + "name": "keyword.operator.quantifier.ruby" + }, + { + "begin": "\\[\\^?", + "beginCaptures": { + "0": { + "name": "punctuation.definition.character-class.begin.ruby" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.character-class.end.ruby" + } + }, + "name": "constant.other.character-class.set.ruby", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "\\(\\?#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.ruby" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.ruby" + } + }, + "name": "comment.line.number-sign.ruby", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "\\(", + "captures": { + "0": { + "name": "punctuation.definition.group.ruby" + } + }, + "end": "\\)", + "name": "meta.group.regexp.ruby", + "patterns": [ + { + "include": "#regex_sub" + } + ] + }, + { + "begin": "(?<=^|\\s)(#)\\s(?=[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.ruby" + } + }, + "comment": "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.", + "end": "$\\n?", + "name": "comment.line.number-sign.ruby" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/rust.tmLanguage.json b/src/lib/shiki/languages/rust.tmLanguage.json new file mode 100644 index 0000000..0731f01 --- /dev/null +++ b/src/lib/shiki/languages/rust.tmLanguage.json @@ -0,0 +1,1170 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/dustypomerleau/rust-syntax/blob/master/syntaxes/rust.tmLanguage.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/dustypomerleau/rust-syntax/commit/20462d50ff97338f42c6b64c3f421c634fd60734", + "name": "rust", + "scopeName": "source.rust", + "patterns": [ + { + "comment": "boxed slice literal", + "begin": "(<)(\\[)", + "beginCaptures": { + "1": { + "name": "punctuation.brackets.angle.rust" + }, + "2": { + "name": "punctuation.brackets.square.rust" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.brackets.angle.rust" + } + }, + "patterns": [ + { + "include": "#block-comments" + }, + { + "include": "#comments" + }, + { + "include": "#gtypes" + }, + { + "include": "#lvariables" + }, + { + "include": "#lifetimes" + }, + { + "include": "#punctuation" + }, + { + "include": "#types" + } + ] + }, + { + "comment": "macro type metavariables", + "name": "meta.macro.metavariable.type.rust", + "match": "(\\$)((crate)|([A-Z][A-Za-z0-9_]*))((:)(block|expr|ident|item|lifetime|literal|meta|path?|stmt|tt|ty|vis))?", + "captures": { + "1": { + "name": "keyword.operator.macro.dollar.rust" + }, + "3": { + "name": "keyword.other.crate.rust" + }, + "4": { + "name": "entity.name.type.metavariable.rust" + }, + "6": { + "name": "keyword.operator.key-value.rust" + }, + "7": { + "name": "variable.other.metavariable.specifier.rust" + } + }, + "patterns": [ + { + "include": "#keywords" + } + ] + }, + { + "comment": "macro metavariables", + "name": "meta.macro.metavariable.rust", + "match": "(\\$)([a-z][A-Za-z0-9_]*)((:)(block|expr|ident|item|lifetime|literal|meta|path?|stmt|tt|ty|vis))?", + "captures": { + "1": { + "name": "keyword.operator.macro.dollar.rust" + }, + "2": { + "name": "variable.other.metavariable.name.rust" + }, + "4": { + "name": "keyword.operator.key-value.rust" + }, + "5": { + "name": "variable.other.metavariable.specifier.rust" + } + }, + "patterns": [ + { + "include": "#keywords" + } + ] + }, + { + "comment": "macro rules", + "name": "meta.macro.rules.rust", + "match": "\\b(macro_rules!)\\s+(([a-z0-9_]+)|([A-Z][a-z0-9_]*))\\s+(\\{)", + "captures": { + "1": { + "name": "entity.name.function.macro.rules.rust" + }, + "3": { + "name": "entity.name.function.macro.rust" + }, + "4": { + "name": "entity.name.type.macro.rust" + }, + "5": { + "name": "punctuation.brackets.curly.rust" + } + } + }, + { + "comment": "attributes", + "name": "meta.attribute.rust", + "begin": "(#)(\\!?)(\\[)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.attribute.rust" + }, + "2": { + "name": "keyword.operator.attribute.inner.rust" + }, + "3": { + "name": "punctuation.brackets.attribute.rust" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.brackets.attribute.rust" + } + }, + "patterns": [ + { + "include": "#block-comments" + }, + { + "include": "#comments" + }, + { + "include": "#keywords" + }, + { + "include": "#lifetimes" + }, + { + "include": "#punctuation" + }, + { + "include": "#strings" + }, + { + "include": "#gtypes" + }, + { + "include": "#types" + } + ] + }, + { + "comment": "modules", + "match": "(mod)\\s+((?:r#(?!crate|[Ss]elf|super))?[a-z][A-Za-z0-9_]*)", + "captures": { + "1": { + "name": "storage.type.rust" + }, + "2": { + "name": "entity.name.module.rust" + } + } + }, + { + "comment": "external crate imports", + "name": "meta.import.rust", + "begin": "\\b(extern)\\s+(crate)", + "beginCaptures": { + "1": { + "name": "storage.type.rust" + }, + "2": { + "name": "keyword.other.crate.rust" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.semi.rust" + } + }, + "patterns": [ + { + "include": "#block-comments" + }, + { + "include": "#comments" + }, + { + "include": "#keywords" + }, + { + "include": "#punctuation" + } + ] + }, + { + "comment": "use statements", + "name": "meta.use.rust", + "begin": "\\b(use)\\s", + "beginCaptures": { + "1": { + "name": "keyword.other.rust" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.semi.rust" + } + }, + "patterns": [ + { + "include": "#block-comments" + }, + { + "include": "#comments" + }, + { + "include": "#keywords" + }, + { + "include": "#namespaces" + }, + { + "include": "#punctuation" + }, + { + "include": "#types" + }, + { + "include": "#lvariables" + } + ] + }, + { + "include": "#block-comments" + }, + { + "include": "#comments" + }, + { + "include": "#lvariables" + }, + { + "include": "#constants" + }, + { + "include": "#gtypes" + }, + { + "include": "#functions" + }, + { + "include": "#types" + }, + { + "include": "#keywords" + }, + { + "include": "#lifetimes" + }, + { + "include": "#macros" + }, + { + "include": "#namespaces" + }, + { + "include": "#punctuation" + }, + { + "include": "#strings" + }, + { + "include": "#variables" + } + ], + "repository": { + "comments": { + "patterns": [ + { + "comment": "documentation comments", + "name": "comment.line.documentation.rust", + "match": "^\\s*///.*" + }, + { + "comment": "line comments", + "name": "comment.line.double-slash.rust", + "match": "\\s*//.*" + } + ] + }, + "block-comments": { + "patterns": [ + { + "comment": "empty block comments", + "name": "comment.block.rust", + "match": "/\\*\\*/" + }, + { + "comment": "block documentation comments", + "name": "comment.block.documentation.rust", + "begin": "/\\*\\*", + "end": "\\*/", + "patterns": [ + { + "include": "#block-comments" + } + ] + }, + { + "comment": "block comments", + "name": "comment.block.rust", + "begin": "/\\*(?!\\*)", + "end": "\\*/", + "patterns": [ + { + "include": "#block-comments" + } + ] + } + ] + }, + "constants": { + "patterns": [ + { + "comment": "ALL CAPS constants", + "name": "constant.other.caps.rust", + "match": "\\b[A-Z]{2}[A-Z0-9_]*\\b" + }, + { + "comment": "constant declarations", + "match": "\\b(const)\\s+([A-Z][A-Za-z0-9_]*)\\b", + "captures": { + "1": { + "name": "storage.type.rust" + }, + "2": { + "name": "constant.other.caps.rust" + } + } + }, + { + "comment": "decimal integers and floats", + "name": "constant.numeric.decimal.rust", + "match": "\\b\\d[\\d_]*(\\.?)[\\d_]*(?:(E)([+-])([\\d_]+))?(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b", + "captures": { + "1": { + "name": "punctuation.separator.dot.decimal.rust" + }, + "2": { + "name": "keyword.operator.exponent.rust" + }, + "3": { + "name": "keyword.operator.exponent.sign.rust" + }, + "4": { + "name": "constant.numeric.decimal.exponent.mantissa.rust" + }, + "5": { + "name": "entity.name.type.numeric.rust" + } + } + }, + { + "comment": "hexadecimal integers", + "name": "constant.numeric.hex.rust", + "match": "\\b0x[\\da-fA-F_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b", + "captures": { + "1": { + "name": "entity.name.type.numeric.rust" + } + } + }, + { + "comment": "octal integers", + "name": "constant.numeric.oct.rust", + "match": "\\b0o[0-7_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b", + "captures": { + "1": { + "name": "entity.name.type.numeric.rust" + } + } + }, + { + "comment": "binary integers", + "name": "constant.numeric.bin.rust", + "match": "\\b0b[01_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b", + "captures": { + "1": { + "name": "entity.name.type.numeric.rust" + } + } + }, + { + "comment": "booleans", + "name": "constant.language.bool.rust", + "match": "\\b(true|false)\\b" + } + ] + }, + "escapes": { + "comment": "escapes: ASCII, byte, Unicode, quote, regex", + "name": "constant.character.escape.rust", + "match": "(\\\\)(?:(?:(x[0-7][0-7a-fA-F])|(u(\\{)[\\da-fA-F]{4,6}(\\}))|.))", + "captures": { + "1": { + "name": "constant.character.escape.backslash.rust" + }, + "2": { + "name": "constant.character.escape.bit.rust" + }, + "3": { + "name": "constant.character.escape.unicode.rust" + }, + "4": { + "name": "constant.character.escape.unicode.punctuation.rust" + }, + "5": { + "name": "constant.character.escape.unicode.punctuation.rust" + } + } + }, + "functions": { + "patterns": [ + { + "comment": "pub as a function", + "match": "\\b(pub)(\\()", + "captures": { + "1": { + "name": "keyword.other.rust" + }, + "2": { + "name": "punctuation.brackets.round.rust" + } + } + }, + { + "comment": "function definition", + "name": "meta.function.definition.rust", + "begin": "\\b(fn)\\s+((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)((\\()|(<))", + "beginCaptures": { + "1": { + "name": "keyword.other.fn.rust" + }, + "2": { + "name": "entity.name.function.rust" + }, + "4": { + "name": "punctuation.brackets.round.rust" + }, + "5": { + "name": "punctuation.brackets.angle.rust" + } + }, + "end": "\\{|;", + "endCaptures": { + "0": { + "name": "punctuation.brackets.curly.rust" + } + }, + "patterns": [ + { + "include": "#block-comments" + }, + { + "include": "#comments" + }, + { + "include": "#keywords" + }, + { + "include": "#lvariables" + }, + { + "include": "#constants" + }, + { + "include": "#gtypes" + }, + { + "include": "#functions" + }, + { + "include": "#lifetimes" + }, + { + "include": "#macros" + }, + { + "include": "#namespaces" + }, + { + "include": "#punctuation" + }, + { + "include": "#strings" + }, + { + "include": "#types" + }, + { + "include": "#variables" + } + ] + }, + { + "comment": "function/method calls, chaining", + "name": "meta.function.call.rust", + "begin": "((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.rust" + }, + "2": { + "name": "punctuation.brackets.round.rust" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.brackets.round.rust" + } + }, + "patterns": [ + { + "include": "#block-comments" + }, + { + "include": "#comments" + }, + { + "include": "#keywords" + }, + { + "include": "#lvariables" + }, + { + "include": "#constants" + }, + { + "include": "#gtypes" + }, + { + "include": "#functions" + }, + { + "include": "#lifetimes" + }, + { + "include": "#macros" + }, + { + "include": "#namespaces" + }, + { + "include": "#punctuation" + }, + { + "include": "#strings" + }, + { + "include": "#types" + }, + { + "include": "#variables" + } + ] + }, + { + "comment": "function/method calls with turbofish", + "name": "meta.function.call.rust", + "begin": "((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)(?=::<.*>\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.rust" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.brackets.round.rust" + } + }, + "patterns": [ + { + "include": "#block-comments" + }, + { + "include": "#comments" + }, + { + "include": "#keywords" + }, + { + "include": "#lvariables" + }, + { + "include": "#constants" + }, + { + "include": "#gtypes" + }, + { + "include": "#functions" + }, + { + "include": "#lifetimes" + }, + { + "include": "#macros" + }, + { + "include": "#namespaces" + }, + { + "include": "#punctuation" + }, + { + "include": "#strings" + }, + { + "include": "#types" + }, + { + "include": "#variables" + } + ] + } + ] + }, + "keywords": { + "patterns": [ + { + "comment": "control flow keywords", + "name": "keyword.control.rust", + "match": "\\b(await|break|continue|do|else|for|if|loop|match|return|try|while|yield)\\b" + }, + { + "comment": "storage keywords", + "name": "keyword.other.rust storage.type.rust", + "match": "\\b(extern|let|macro|mod)\\b" + }, + { + "comment": "const keyword", + "name": "storage.modifier.rust", + "match": "\\b(const)\\b" + }, + { + "comment": "type keyword", + "name": "keyword.declaration.type.rust storage.type.rust", + "match": "\\b(type)\\b" + }, + { + "comment": "enum keyword", + "name": "keyword.declaration.enum.rust storage.type.rust", + "match": "\\b(enum)\\b" + }, + { + "comment": "trait keyword", + "name": "keyword.declaration.trait.rust storage.type.rust", + "match": "\\b(trait)\\b" + }, + { + "comment": "struct keyword", + "name": "keyword.declaration.struct.rust storage.type.rust", + "match": "\\b(struct)\\b" + }, + { + "comment": "storage modifiers", + "name": "storage.modifier.rust", + "match": "\\b(abstract|static)\\b" + }, + { + "comment": "other keywords", + "name": "keyword.other.rust", + "match": "\\b(as|async|become|box|dyn|move|final|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual|where)\\b" + }, + { + "comment": "fn", + "name": "keyword.other.fn.rust", + "match": "\\bfn\\b" + }, + { + "comment": "crate", + "name": "keyword.other.crate.rust", + "match": "\\bcrate\\b" + }, + { + "comment": "mut", + "name": "storage.modifier.mut.rust", + "match": "\\bmut\\b" + }, + { + "comment": "logical operators", + "name": "keyword.operator.logical.rust", + "match": "(\\^|\\||\\|\\||&&|<<|>>|!)(?!=)" + }, + { + "comment": "logical AND, borrow references", + "name": "keyword.operator.borrow.and.rust", + "match": "&(?![&=])" + }, + { + "comment": "assignment operators", + "name": "keyword.operator.assignment.rust", + "match": "(\\+=|-=|\\*=|/=|%=|\\^=|&=|\\|=|<<=|>>=)" + }, + { + "comment": "single equal", + "name": "keyword.operator.assignment.equal.rust", + "match": "(?<![<>])=(?!=|>)" + }, + { + "comment": "comparison operators", + "name": "keyword.operator.comparison.rust", + "match": "(=(=)?(?!>)|!=|<=|(?<!=)>=)" + }, + { + "comment": "math operators", + "name": "keyword.operator.math.rust", + "match": "(([+%]|(\\*(?!\\w)))(?!=))|(-(?!>))|(/(?!/))" + }, + { + "comment": "less than, greater than (special case)", + "match": "(?:\\b|(?:(\\))|(\\])|(\\})))[ \\t]+([<>])[ \\t]+(?:\\b|(?:(\\()|(\\[)|(\\{)))", + "captures": { + "1": { + "name": "punctuation.brackets.round.rust" + }, + "2": { + "name": "punctuation.brackets.square.rust" + }, + "3": { + "name": "punctuation.brackets.curly.rust" + }, + "4": { + "name": "keyword.operator.comparison.rust" + }, + "5": { + "name": "punctuation.brackets.round.rust" + }, + "6": { + "name": "punctuation.brackets.square.rust" + }, + "7": { + "name": "punctuation.brackets.curly.rust" + } + } + }, + { + "comment": "namespace operator", + "name": "keyword.operator.namespace.rust", + "match": "::" + }, + { + "comment": "dereference asterisk", + "match": "(\\*)(?=\\w+)", + "captures": { + "1": { + "name": "keyword.operator.dereference.rust" + } + } + }, + { + "comment": "subpattern binding", + "name": "keyword.operator.subpattern.rust", + "match": "@" + }, + { + "comment": "dot access", + "name": "keyword.operator.access.dot.rust", + "match": "\\.(?!\\.)" + }, + { + "comment": "ranges, range patterns", + "name": "keyword.operator.range.rust", + "match": "\\.{2}(=|\\.)?" + }, + { + "comment": "colon", + "name": "keyword.operator.key-value.rust", + "match": ":(?!:)" + }, + { + "comment": "dashrocket, skinny arrow", + "name": "keyword.operator.arrow.skinny.rust", + "match": "->" + }, + { + "comment": "hashrocket, fat arrow", + "name": "keyword.operator.arrow.fat.rust", + "match": "=>" + }, + { + "comment": "dollar macros", + "name": "keyword.operator.macro.dollar.rust", + "match": "\\$" + }, + { + "comment": "question mark operator, questionably sized, macro kleene matcher", + "name": "keyword.operator.question.rust", + "match": "\\?" + } + ] + }, + "interpolations": { + "comment": "curly brace interpolations", + "name": "meta.interpolation.rust", + "match": "({)[^\"{}]*(})", + "captures": { + "1": { + "name": "punctuation.definition.interpolation.rust" + }, + "2": { + "name": "punctuation.definition.interpolation.rust" + } + } + }, + "lifetimes": { + "patterns": [ + { + "comment": "named lifetime parameters", + "match": "(['])([a-zA-Z_][0-9a-zA-Z_]*)(?!['])\\b", + "captures": { + "1": { + "name": "punctuation.definition.lifetime.rust" + }, + "2": { + "name": "entity.name.type.lifetime.rust" + } + } + }, + { + "comment": "borrowing references to named lifetimes", + "match": "(\\&)(['])([a-zA-Z_][0-9a-zA-Z_]*)(?!['])\\b", + "captures": { + "1": { + "name": "keyword.operator.borrow.rust" + }, + "2": { + "name": "punctuation.definition.lifetime.rust" + }, + "3": { + "name": "entity.name.type.lifetime.rust" + } + } + } + ] + }, + "macros": { + "patterns": [ + { + "comment": "macros", + "name": "meta.macro.rust", + "match": "(([a-z_][A-Za-z0-9_]*!)|([A-Z_][A-Za-z0-9_]*!))", + "captures": { + "2": { + "name": "entity.name.function.macro.rust" + }, + "3": { + "name": "entity.name.type.macro.rust" + } + } + } + ] + }, + "namespaces": { + "patterns": [ + { + "comment": "namespace (non-type, non-function path segment)", + "match": "(?<![A-Za-z0-9_])([a-z0-9_]+)((?<!super|self)::)", + "captures": { + "1": { + "name": "entity.name.namespace.rust" + }, + "2": { + "name": "keyword.operator.namespace.rust" + } + } + } + ] + }, + "types": { + "patterns": [ + { + "comment": "numeric types", + "match": "(?<![A-Za-z])(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)\\b", + "captures": { + "1": { + "name": "entity.name.type.numeric.rust" + } + } + }, + { + "comment": "parameterized types", + "begin": "\\b([A-Z][A-Za-z0-9]*)(<)", + "beginCaptures": { + "1": { + "name": "entity.name.type.rust" + }, + "2": { + "name": "punctuation.brackets.angle.rust" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.brackets.angle.rust" + } + }, + "patterns": [ + { + "include": "#block-comments" + }, + { + "include": "#comments" + }, + { + "include": "#keywords" + }, + { + "include": "#lvariables" + }, + { + "include": "#lifetimes" + }, + { + "include": "#punctuation" + }, + { + "include": "#types" + }, + { + "include": "#variables" + } + ] + }, + { + "comment": "primitive types", + "name": "entity.name.type.primitive.rust", + "match": "\\b(bool|char|str)\\b" + }, + { + "comment": "trait declarations", + "match": "\\b(trait)\\s+([A-Z][A-Za-z0-9]*)\\b", + "captures": { + "1": { + "name": "keyword.declaration.trait.rust storage.type.rust" + }, + "2": { + "name": "entity.name.type.trait.rust" + } + } + }, + { + "comment": "struct declarations", + "match": "\\b(struct)\\s+([A-Z][A-Za-z0-9]*)\\b", + "captures": { + "1": { + "name": "keyword.declaration.struct.rust storage.type.rust" + }, + "2": { + "name": "entity.name.type.struct.rust" + } + } + }, + { + "comment": "enum declarations", + "match": "\\b(enum)\\s+([A-Z][A-Za-z0-9_]*)\\b", + "captures": { + "1": { + "name": "keyword.declaration.enum.rust storage.type.rust" + }, + "2": { + "name": "entity.name.type.enum.rust" + } + } + }, + { + "comment": "type declarations", + "match": "\\b(type)\\s+([A-Z][A-Za-z0-9_]*)\\b", + "captures": { + "1": { + "name": "keyword.declaration.type.rust storage.type.rust" + }, + "2": { + "name": "entity.name.type.declaration.rust" + } + } + }, + { + "comment": "types", + "name": "entity.name.type.rust", + "match": "\\b[A-Z][A-Za-z0-9]*\\b(?!!)" + } + ] + }, + "gtypes": { + "patterns": [ + { + "comment": "option types", + "name": "entity.name.type.option.rust", + "match": "\\b(Some|None)\\b" + }, + { + "comment": "result types", + "name": "entity.name.type.result.rust", + "match": "\\b(Ok|Err)\\b" + } + ] + }, + "punctuation": { + "patterns": [ + { + "comment": "comma", + "name": "punctuation.comma.rust", + "match": "," + }, + { + "comment": "curly braces", + "name": "punctuation.brackets.curly.rust", + "match": "[{}]" + }, + { + "comment": "parentheses, round brackets", + "name": "punctuation.brackets.round.rust", + "match": "[()]" + }, + { + "comment": "semicolon", + "name": "punctuation.semi.rust", + "match": ";" + }, + { + "comment": "square brackets", + "name": "punctuation.brackets.square.rust", + "match": "[\\[\\]]" + }, + { + "comment": "angle brackets", + "name": "punctuation.brackets.angle.rust", + "match": "(?<!=)[<>]" + } + ] + }, + "strings": { + "patterns": [ + { + "comment": "double-quoted strings and byte strings", + "name": "string.quoted.double.rust", + "begin": "(b?)(\")", + "beginCaptures": { + "1": { + "name": "string.quoted.byte.raw.rust" + }, + "2": { + "name": "punctuation.definition.string.rust" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.rust" + } + }, + "patterns": [ + { + "include": "#escapes" + }, + { + "include": "#interpolations" + } + ] + }, + { + "comment": "double-quoted raw strings and raw byte strings", + "name": "string.quoted.double.rust", + "begin": "(b?r)(#*)(\")", + "beginCaptures": { + "1": { + "name": "string.quoted.byte.raw.rust" + }, + "2": { + "name": "punctuation.definition.string.raw.rust" + }, + "3": { + "name": "punctuation.definition.string.rust" + } + }, + "end": "(\")(\\2)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.rust" + }, + "2": { + "name": "punctuation.definition.string.raw.rust" + } + } + }, + { + "comment": "characters and bytes", + "name": "string.quoted.single.char.rust", + "begin": "(b)?(')", + "beginCaptures": { + "1": { + "name": "string.quoted.byte.raw.rust" + }, + "2": { + "name": "punctuation.definition.char.rust" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.char.rust" + } + }, + "patterns": [ + { + "include": "#escapes" + } + ] + } + ] + }, + "lvariables": { + "patterns": [ + { + "comment": "self", + "name": "variable.language.self.rust", + "match": "\\b[Ss]elf\\b" + }, + { + "comment": "super", + "name": "variable.language.super.rust", + "match": "\\bsuper\\b" + } + ] + }, + "variables": { + "patterns": [ + { + "comment": "variables", + "name": "variable.other.rust", + "match": "\\b(?<!(?<!\\.)\\.)(?:r#(?!(crate|[Ss]elf|super)))?[a-z0-9_]+\\b" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/sas.tmLanguage.json b/src/lib/shiki/languages/sas.tmLanguage.json new file mode 100644 index 0000000..b8a9b32 --- /dev/null +++ b/src/lib/shiki/languages/sas.tmLanguage.json @@ -0,0 +1,301 @@ +{ + "comment": "A work in progress--improves over the existing in that it populates symbols, and handles comments more gracefully.", + "fileTypes": ["sas"], + "foldingStartMarker": "(?i:(proc|data|%macro).*;$)", + "foldingStopMarker": "(?i:(run|quit|%mend)\\s?);", + "name": "sas", + "patterns": [ + { + "include": "#starComment" + }, + { + "include": "#blockComment" + }, + { + "include": "#macro" + }, + { + "include": "#constant" + }, + { + "include": "#quote" + }, + { + "include": "#operator" + }, + { + "begin": "\\b(?i:(data))\\s+", + "beginCaptures": { + "1": { + "name": "keyword.other.sas" + } + }, + "comment": "Begins a DATA step and provides names for any output SAS data sets, views, or programs.", + "end": "(;)", + "patterns": [ + { + "include": "#blockComment" + }, + { + "include": "#dataSet" + }, + { + "captures": { + "1": { + "name": "keyword.other.sas" + }, + "2": { + "name": "keyword.other.sas" + } + }, + "match": "(?i:(?:(stack|pgm|view|source)\\s?=\\s?)|(debug|nesting|nolist))" + } + ] + }, + { + "begin": "\\b(?i:(set|update|modify|merge))\\s+", + "beginCaptures": { + "1": { + "name": "support.function.sas" + }, + "2": { + "name": "entity.name.class.sas" + }, + "3": { + "name": "entity.name.class.sas" + } + }, + "comment": "DATA set File-Handling Statements for DATA step", + "end": "(;)", + "patterns": [ + { + "include": "#blockComment" + }, + { + "include": "#dataSet" + } + ] + }, + { + "match": "(?i:\\b(if|while|until|for|do|end|then|else|run|quit|cancel|options)\\b)", + "name": "keyword.control.sas" + }, + { + "captures": { + "1": { + "name": "support.class.sas" + }, + "3": { + "name": "entity.name.function.sas" + } + }, + "match": "(?i:(%(bquote|do|else|end|eval|global|goto|if|inc|include|index|input|length|let|list|local|lowcase|macro|mend|nrbquote|nrquote|nrstr|put|qscan|qsysfunc|quote|run|scan|str|substr|syscall|sysevalf|sysexec|sysfunc|sysrc|then|to|unquote|upcase|until|while|window)\\b))\\s*(\\w*)", + "name": "keyword.other.sas" + }, + { + "begin": "(?i:\\b(proc\\s*(sql))\\b)", + "beginCaptures": { + "1": { + "name": "support.function.sas" + }, + "2": { + "name": "support.class.sas" + } + }, + "comment": "Looks like for this to work there must be a *name* as well as the patterns/include bit.", + "end": "(?i:\\b(quit)\\s*;)", + "endCaptures": { + "1": { + "name": "keyword.control.sas" + } + }, + "name": "meta.sql.sas", + "patterns": [ + { + "include": "#starComment" + }, + { + "include": "#blockComment" + }, + { + "include": "source.sql" + } + ] + }, + { + "match": "(?i:\\b(by|label|format)\\b)", + "name": "keyword.datastep.sas" + }, + { + "captures": { + "1": { + "name": "support.function.sas" + }, + "2": { + "name": "support.class.sas" + } + }, + "match": "(?i:\\b(proc (\\w+))\\b)", + "name": "meta.function-call.sas" + }, + { + "match": "(?i:\\b(_n_|_error_)\\b)", + "name": "variable.language.sas" + }, + { + "captures": { + "1": { + "name": "support.class.sas" + } + }, + "match": "\\b(?i:(_all_|_character_|_cmd_|_freq_|_i_|_infile_|_last_|_msg_|_null_|_numeric_|_temporary_|_type_|abort|abs|addr|adjrsq|airy|alpha|alter|altlog|altprint|and|arcos|array|arsin|as|atan|attrc|attrib|attrn|authserver|autoexec|awscontrol|awsdef|awsmenu|awsmenumerge|awstitle|backward|band|base|betainv|between|blocksize|blshift|bnot|bor|brshift|bufno|bufsize|bxor|by|byerr|byline|byte|calculated|call|cards|cards4|case|catcache|cbufno|cdf|ceil|center|cexist|change|chisq|cinv|class|cleanup|close|cnonct|cntllev|coalesce|codegen|col|collate|collin|column|comamid|comaux1|comaux2|comdef|compbl|compound|compress|config|continue|convert|cos|cosh|cpuid|create|cross|crosstab|css|curobs|cv|daccdb|daccdbsl|daccsl|daccsyd|dacctab|dairy|datalines|datalines4|date|datejul|datepart|datetime|day|dbcslang|dbcstype|dclose|ddm|delete|delimiter|depdb|depdbsl|depsl|depsyd|deptab|dequote|descending|descript|design=|device|dflang|dhms|dif|digamma|dim|dinfo|display|distinct|dkricond|dkrocond|dlm|dnum|do|dopen|doptname|doptnum|dread|drop|dropnote|dsname|dsnferr|echo|else|emaildlg|emailid|emailpw|emailserver|emailsys|encrypt|end|endsas|engine|eof|eov|erf|erfc|error|errorcheck|errors|exist|exp|fappend|fclose|fcol|fdelete|feedback|fetch|fetchobs|fexist|fget|file|fileclose|fileexist|filefmt|filename|fileref|filevar|finfo|finv|fipname|fipnamel|fipstate|first|firstobs|floor|fmterr|fmtsearch|fnonct|fnote|font|fontalias|footnote[1-9]?|fopen|foptname|foptnum|force|formatted|formchar|formdelim|formdlim|forward|fpoint|fpos|fput|fread|frewind|frlen|from|fsep|full|fullstimer|fuzz|fwrite|gaminv|gamma|getoption|getvarc|getvarn|go|goto|group|gwindow|hbar|hbound|helpenv|helploc|hms|honorappearance|hosthelp|hostprint|hour|hpct|html|hvar|ibessel|ibr|id|if|index|indexc|indexw|infile|informat|initcmd|initstmt|inner|input|inputc|inputn|inr|insert|int|intck|intnx|into|intrr|invaliddata|irr|is|jbessel|join|juldate|keep|kentb|kurtosis|label|lag|last|lbound|leave|left|length|levels|lgamma|lib|libname|library|libref|line|linesize|link|list|log|log10|log2|logpdf|logpmf|logsdf|lostcard|lowcase|lrecl|ls|macro|macrogen|maps|mautosource|max|maxdec|maxr|mdy|mean|measures|median|memtype|merge|merror|min|minute|missing|missover|mlogic|mod|mode|model|modify|month|mopen|mort|mprint|mrecall|msglevel|msymtabmax|mvarsize|myy|n|nest|netpv|new|news|nmiss|no|nobatch|nobs|nocaps|nocardimage|nocenter|nocharcode|nocmdmac|nocol|nocum|nodate|nodbcs|nodetails|nodmr|nodms|nodmsbatch|nodup|nodupkey|noduplicates|noechoauto|noequals|noerrorabend|noexitwindows|nofullstimer|noicon|noimplmac|noint|nolist|noloadlist|nomiss|nomlogic|nomprint|nomrecall|nomsgcase|nomstored|nomultenvappl|nonotes|nonumber|noobs|noovp|nopad|nopercent|noprint|noprintinit|normal|norow|norsasuser|nosetinit|nosource|nosource2|nosplash|nosymbolgen|note|notes|notitle|notitles|notsorted|noverbose|noxsync|noxwait|npv|null|number|numkeys|nummousekeys|nway|obs|ods|on|open|option|order|ordinal|otherwise|out|outer|outp=|output|over|ovp|p(1|5|10|25|50|75|90|95|99)|pad|pad2|page|pageno|pagesize|paired|parm|parmcards|path|pathdll|pathname|pdf|peek|peekc|pfkey|pmf|point|poisson|poke|position|printer|probbeta|probbnml|probchi|probf|probgam|probhypr|probit|probnegb|probnorm|probsig|probt|procleave|project|prt|propcase|prxmatch|prxparse|prxchange|prxposn|ps|put|putc|putn|pw|pwreq|qtr|quote|r|ranbin|rancau|ranexp|rangam|range|ranks|rannor|ranpoi|rantbl|rantri|ranuni|read|recfm|register|regr|remote|remove|rename|repeat|replace|resolve|retain|return|reuse|reverse|rewind|right|round|rsquare|rtf|rtrace|rtraceloc|s|s2|samploc|sasautos|sascontrol|sasfrscr|sashelp|sasmsg|sasmstore|sasscript|sasuser|saving|scan|sdf|second|select|selection|separated|seq|serror|set|setcomm|setot|sign|simple|sin|sinh|siteinfo|skewness|skip|sle|sls|sortedby|sortpgm|sortseq|sortsize|soundex|source2|spedis|splashlocation|split|spool|sqrt|start|std|stderr|stdin|stfips|stimer|stname|stnamel|stop|stopover|strip|subgroup|subpopn|substr|sum|sumwgt|symbol|symbolgen|symget|symput|sysget|sysin|sysleave|sysmsg|sysparm|sysprint|sysprintfont|sysprod|sysrc|system|t|table|tables|tan|tanh|tapeclose|tbufsize|terminal|test|then|time|timepart|tinv|title[1-9]?|tnonct|to|today|tol|tooldef|totper|transformout|translate|trantab|tranwrd|trigamma|trim|trimn|trunc|truncover|type|unformatted|uniform|union|until|upcase|update|user|usericon|uss|validate|value|var|varfmt|varinfmt|varlabel|varlen|varname|varnum|varray|varrayx|vartype|verify|vformat|vformatd|vformatdx|vformatn|vformatnx|vformatw|vformatwx|vformatx|vinarray|vinarrayx|vinformat|vinformatd|vinformatdx|vinformatn|vinformatnx|vinformatw|vinformatwx|vinformatx|vlabel|vlabelx|vlength|vlengthx|vname|vnamex|vnferr|vtype|vtypex|weekday|weight|when|where|while|wincharset|window|work|workinit|workterm|write|wsum|wsumx|x|xsync|xwait|year|yearcutoff|yes|yyq|zipfips|zipname|zipnamel|zipstate))\\b", + "name": "support.function.sas" + } + ], + "repository": { + "blockComment": { + "patterns": [ + { + "begin": "\\/\\*", + "end": "\\*\\/", + "name": "comment.block.slashstar.sas" + } + ] + }, + "constant": { + "patterns": [ + { + "comment": "numeric constant", + "match": "(?<![&\\}])\\b[0-9]*\\.?[0-9]+([eEdD][-+]?[0-9]+)?\\b", + "name": "constant.numeric.sas" + }, + { + "comment": "single quote numeric-type constant", + "match": "(')([^']+)(')(dt|[dt])", + "name": "constant.numeric.quote.single.sas" + }, + { + "comment": "double quote numeric-type constant", + "match": "(\")([^\"]+)(\")(dt|[dt])", + "name": "constant.numeric.quote.double.sas" + } + ] + }, + "dataSet": { + "patterns": [ + { + "begin": "((\\w+)\\.)?(\\w+)\\s?\\(", + "beginCaptures": { + "2": { + "name": "entity.name.class.libref.sas" + }, + "3": { + "name": "entity.name.class.dsname.sas" + } + }, + "comment": "data set with options", + "end": "\\)", + "patterns": [ + { + "include": "#dataSetOptions" + }, + { + "include": "#blockComment" + }, + { + "include": "#macro" + }, + { + "include": "#constant" + }, + { + "include": "#quote" + }, + { + "include": "#operator" + } + ] + }, + { + "captures": { + "2": { + "name": "entity.name.class.libref.sas" + }, + "3": { + "name": "entity.name.class.dsname.sas" + } + }, + "comment": "data set without options", + "match": "\\b((\\w+)\\.)?(\\w+)\\b" + } + ] + }, + "dataSetOptions": { + "patterns": [ + { + "match": "(?<=\\s|\\(|\\))(?i:ALTER|BUFNO|BUFSIZE|CNTLLEV|COMPRESS|DLDMGACTION|ENCRYPT|ENCRYPTKEY|EXTENDOBSCOUNTER|GENMAX|GENNUM|INDEX|LABEL|OBSBUF|OUTREP|PW|PWREQ|READ|REPEMPTY|REPLACE|REUSE|ROLE|SORTEDBY|SPILL|TOBSNO|TYPE|WRITE|FILECLOSE|FIRSTOBS|IN|OBS|POINTOBS|WHERE|WHEREUP|IDXNAME|IDXWHERE|DROP|KEEP|RENAME)\\s?=", + "name": "keyword.other.sas" + } + ] + }, + "macro": { + "patterns": [ + { + "match": "(&+(?i:[a-z_]([a-z0-9_]+)?)(\\.+)?)\\b", + "name": "variable.other.macro.sas" + } + ] + }, + "operator": { + "patterns": [ + { + "match": "([\\+\\-\\*\\^\\/])", + "name": "keyword.operator.arithmetic.sas" + }, + { + "match": "\\b(?i:(eq|ne|gt|lt|ge|le|in|not|&|and|or|min|max))\\b", + "name": "keyword.operator.comparison.sas" + }, + { + "match": "([¬<>^~]?=(:)?|>|<|\\||!|¦|¬|^|~|<>|><|\\|\\|)", + "name": "keyword.operator.sas" + } + ] + }, + "quote": { + "patterns": [ + { + "begin": "(?<!%)(')", + "comment": "single quoted string block", + "end": "(')([bx])?", + "name": "string.quoted.single.sas" + }, + { + "begin": "(\")", + "comment": "double quoted string block", + "end": "(\")([bx])?", + "name": "string.quoted.double.sas" + } + ] + }, + "starComment": { + "patterns": [ + { + "include": "#blockcomment" + }, + { + "begin": "(?<=;)[\\s%]*\\*", + "end": ";", + "name": "comment.line.inline.star.sas" + }, + { + "begin": "^[\\s%]*\\*", + "end": ";", + "name": "comment.line.start.sas" + } + ] + } + }, + "scopeName": "source.sas", + "uuid": "7e721b1e-6265-4865-bc4b-308d49affba1" +} diff --git a/src/lib/shiki/languages/sass.tmLanguage.json b/src/lib/shiki/languages/sass.tmLanguage.json new file mode 100644 index 0000000..25eb7b8 --- /dev/null +++ b/src/lib/shiki/languages/sass.tmLanguage.json @@ -0,0 +1,615 @@ +{ + "fileTypes": ["sass"], + "foldingStartMarker": "/\\*|^#|^\\*|^\\b|*#?region|^\\.", + "foldingStopMarker": "\\*/|*#?endregion|^\\s*$", + "name": "sass", + "patterns": [ + { + "begin": "^(\\s*)(/\\*)", + "end": "(\\*/)|^(?!\\s\\1)", + "name": "comment.block.sass", + "patterns": [ + { + "include": "#comment-tag" + }, + { + "include": "#comment-param" + } + ] + }, + { + "match": "^[\\t ]*/?//[\\t ]*[SRI][\\t ]*$", + "name": "keyword.other.sass.formatter.action" + }, + { + "begin": "^[\\t ]*//[\\t ]*(import)[\\t ]*(css-variables)[\\t ]*(from)", + "end": "$\\n?", + "name": "comment.import.css.variables", + "captures": { + "1": { + "name": "keyword.control" + }, + "2": { + "name": "variable" + }, + "3": { + "name": "keyword.control" + } + }, + "patterns": [ + { + "include": "#import-quotes" + } + ] + }, + { + "include": "#double-slash" + }, + { + "include": "#double-quoted" + }, + { + "include": "#single-quoted" + }, + { + "include": "#interpolation" + }, + { + "include": "#curly-brackets" + }, + { + "include": "#placeholder-selector" + }, + { + "begin": "\\$[a-zA-Z0-9_-]+(?=:)", + "end": "$\\n?|(?=\\)\\s\\)|\\)\\n)", + "name": "sass.script.maps", + "captures": { + "0": { + "name": "variable.other.name" + } + }, + "patterns": [ + { + "include": "#double-slash" + }, + { + "include": "#double-quoted" + }, + { + "include": "#single-quoted" + }, + { + "include": "#interpolation" + }, + { + "include": "#variable" + }, + { + "include": "#rgb-value" + }, + { + "include": "#numeric" + }, + { + "include": "#unit" + }, + { + "include": "#flag" + }, + { + "include": "#comma" + }, + { + "include": "#function" + }, + { + "include": "#function-content" + }, + { + "include": "#operator" + }, + { + "include": "#reserved-words" + }, + { + "include": "#parent-selector" + }, + { + "include": "#property-value" + }, + { + "include": "#semicolon" + }, + { + "include": "#dotdotdot" + } + ] + }, + { + "include": "#variable-root" + }, + { + "include": "#numeric" + }, + { + "include": "#unit" + }, + { + "include": "#flag" + }, + { + "include": "#comma" + }, + { + "include": "#semicolon" + }, + { + "include": "#dotdotdot" + }, + { + "begin": "@include|\\+(?!\\W|\\d)", + "end": "(?=\\n|\\()", + "name": "support.function.name.sass.library", + "captures": { + "0": { + "name": "keyword.control.at-rule.css.sass" + } + } + }, + { + "begin": "^(@use)", + "end": "(?=\\n)", + "name": "sass.use", + "captures": { + "0": { + "name": "keyword.control.at-rule.css.sass.use" + } + }, + "patterns": [ + { + "match": "as|with", + "name": "support.type.css.sass" + }, + { + "include": "#numeric" + }, + { + "include": "#unit" + }, + { + "include": "#variable-root" + }, + { + "include": "#rgb-value" + }, + { + "include": "#comma" + }, + { + "include": "#parenthesis-open" + }, + { + "include": "#parenthesis-close" + }, + { + "include": "#colon" + }, + { + "include": "#import-quotes" + } + ] + }, + { + "begin": "^@import(.*?)( as.*)?$", + "end": "(?=\\n)", + "name": "keyword.control.at-rule.use", + "captures": { + "1": { + "name": "constant.character.css.sass" + }, + "2": { + "name": "invalid" + } + } + }, + { + "begin": "@mixin|^[\\t ]*=|@function", + "end": "$\\n?|(?=\\()", + "name": "support.function.name.sass", + "captures": { + "0": { + "name": "keyword.control.at-rule.css.sass" + } + }, + "patterns": [ + { + "match": "[\\w-]+", + "name": "entity.name.function" + } + ] + }, + { + "begin": "@", + "end": "$\\n?|\\s(?!(all|braille|embossed|handheld|print|projection|screen|speech|tty|tv|if|only|not)(\\s|,))", + "name": "keyword.control.at-rule.css.sass" + }, + { + "begin": "(?<!\\-|\\()\\b(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video|main|svg|rect|ruby|center|circle|ellipse|line|polyline|polygon|path|text|u|slot)\\b(?!-|\\)|:\\s)|&", + "end": "$\\n?|(?=\\s|,|\\(|\\)|\\.|\\#|\\[|>|-|_)", + "name": "entity.name.tag.css.sass.symbol", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "#pseudo-class" + } + ] + }, + { + "begin": "#", + "end": "$\\n?|(?=\\s|,|\\(|\\)|\\.|\\[|>)", + "name": "entity.other.attribute-name.id.css.sass", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "#pseudo-class" + } + ] + }, + { + "begin": "\\.|(?<=&)(-|_)", + "end": "$\\n?|(?=\\s|,|\\(|\\)|\\[|>)", + "name": "entity.other.attribute-name.class.css.sass", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "#pseudo-class" + } + ] + }, + { + "begin": "\\[", + "end": "\\]", + "name": "entity.other.attribute-selector.sass", + "patterns": [ + { + "include": "#double-quoted" + }, + { + "include": "#single-quoted" + }, + { + "match": "\\^|\\$|\\*|~", + "name": "keyword.other.regex.sass" + } + ] + }, + { + "match": "^((?<=\\]|\\)|not\\(|\\*|>|>\\s)|\n*):[a-z:-]+|(::|:-)[a-z:-]+", + "name": "entity.other.attribute-name.pseudo-class.css.sass" + }, + { + "include": "#module" + }, + { + "match": "[\\w-]*\\(", + "name": "entity.name.function" + }, + { + "match": "\\)", + "name": "entity.name.function.close" + }, + { + "begin": ":", + "end": "$\\n?|(?=\\s\\(|and\\(|\\),)", + "name": "meta.property-list.css.sass.prop", + "patterns": [ + { + "match": "(?<=:)[a-z-]+\\s", + "name": "support.type.property-name.css.sass.prop.name" + }, + { + "include": "#double-slash" + }, + { + "include": "#double-quoted" + }, + { + "include": "#single-quoted" + }, + { + "include": "#interpolation" + }, + { + "include": "#curly-brackets" + }, + { + "include": "#variable" + }, + { + "include": "#rgb-value" + }, + { + "include": "#numeric" + }, + { + "include": "#unit" + }, + { + "include": "#module" + }, + { + "match": "--.+?(?=\\))", + "name": "variable.css" + }, + { + "match": "[\\w-]*\\(", + "name": "entity.name.function" + }, + { + "match": "\\)", + "name": "entity.name.function.close" + }, + { + "include": "#flag" + }, + { + "include": "#comma" + }, + { + "include": "#semicolon" + }, + { + "include": "#function" + }, + { + "include": "#function-content" + }, + { + "include": "#operator" + }, + { + "include": "#parent-selector" + }, + { + "include": "#property-value" + } + ] + }, + { + "include": "#rgb-value" + }, + { + "include": "#function" + }, + { + "include": "#function-content" + }, + { + "begin": "(?<=})(?!\\n|\\(|\\)|[a-zA-Z0-9_-]+:)", + "end": "\\s|(?=,|\\.|\\[|\\)|\\n)", + "name": "entity.name.tag.css.sass", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "#pseudo-class" + } + ] + }, + { + "include": "#operator" + }, + { + "match": "[a-z-]+((?=:|#{))", + "name": "support.type.property-name.css.sass.prop.name" + }, + { + "include": "#reserved-words" + }, + { + "include": "#property-value" + } + ], + "repository": { + "module": { + "match": "([\\w-]+?)(\\.)", + "name": "constant.character.module", + "captures": { + "1": { + "name": "constant.character.module.name" + }, + "2": { + "name": "constant.numeric.module.dot" + } + } + }, + "comma": { + "match": "\\band\\b|\\bor\\b|,", + "name": "comment.punctuation.comma.sass" + }, + "comment-tag": { + "begin": "(?<={{)", + "end": "(?=}})", + "name": "comment.tag.sass" + }, + "comment-param": { + "match": "\\@(\\w+)", + "name": "storage.type.class.jsdoc" + }, + "curly-brackets": { + "match": "{|}", + "name": "invalid" + }, + "dotdotdot": { + "match": "\\.\\.\\.", + "name": "variable.other" + }, + "double-slash": { + "begin": "//", + "end": "$\\n?", + "name": "comment.line.sass", + "patterns": [ + { + "include": "#comment-tag" + } + ] + }, + "double-quoted": { + "begin": "\"", + "end": "\"", + "name": "string.quoted.double.css.sass", + "patterns": [ + { + "include": "#quoted-interpolation" + } + ] + }, + "flag": { + "match": "!(important|default|optional|global)", + "name": "keyword.other.important.css.sass" + }, + "function": { + "match": "(?<=[\\s|\\(|,|:])(?!url|format|attr)[a-zA-Z0-9_-][\\w-]*(?=\\()", + "name": "support.function.name.sass" + }, + "function-content": { + "begin": "(?<=url\\(|format\\(|attr\\()", + "end": ".(?=\\))", + "name": "string.quoted.double.css.sass" + }, + "parenthesis-open": { + "match": "\\(", + "name": "entity.name.function.parenthesis.open" + }, + "parenthesis-close": { + "match": "\\)", + "name": "entity.name.function.parenthesis.close" + }, + "colon": { + "match": ":", + "name": "meta.property-list.css.sass.colon" + }, + "interpolation": { + "begin": "#{", + "end": "}", + "name": "support.function.interpolation.sass", + "patterns": [ + { + "include": "#variable" + }, + { + "include": "#numeric" + }, + { + "include": "#operator" + }, + { + "include": "#unit" + }, + { + "include": "#comma" + }, + { + "include": "#double-quoted" + }, + { + "include": "#single-quoted" + } + ] + }, + "numeric": { + "match": "(-|\\.)?[0-9]+(\\.[0-9]+)?", + "name": "constant.numeric.css.sass" + }, + "operator": { + "match": "\\+|\\s-\\s|\\s-(?=\\$)|(?<=\\()-(?=\\$)|\\s-(?=\\()|\\*|/|%|=|!|<|>|~", + "name": "keyword.operator.sass" + }, + "parent-selector": { + "match": "&", + "name": "entity.name.tag.css.sass" + }, + "placeholder-selector": { + "begin": "(?<!\\d)%(?!\\d)", + "end": "$\\n?|\\s", + "name": "entity.other.inherited-class.placeholder-selector.css.sass" + }, + "property-value": { + "match": "[a-zA-Z0-9_-]+", + "name": "meta.property-value.css.sass support.constant.property-value.css.sass" + }, + "pseudo-class": { + "match": ":[a-z:-]+", + "name": "entity.other.attribute-name.pseudo-class.css.sass" + }, + "quoted-interpolation": { + "begin": "#{", + "end": "}", + "name": "support.function.interpolation.sass", + "patterns": [ + { + "include": "#variable" + }, + { + "include": "#numeric" + }, + { + "include": "#operator" + }, + { + "include": "#unit" + }, + { + "include": "#comma" + } + ] + }, + "reserved-words": { + "match": "\\b(false|from|in|not|null|through|to|true)\\b", + "name": "support.type.property-name.css.sass" + }, + "rgb-value": { + "match": "(#)([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\\b", + "name": "constant.language.color.rgb-value.css.sass" + }, + "semicolon": { + "match": ";", + "name": "invalid" + }, + "single-quoted": { + "begin": "'", + "end": "'", + "name": "string.quoted.single.css.sass", + "patterns": [ + { + "include": "#quoted-interpolation" + } + ] + }, + "unit": { + "match": "(?<=[\\d]|})(ch|cm|deg|dpcm|dpi|dppx|em|ex|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vw|fr|%)", + "name": "keyword.control.unit.css.sass" + }, + "variable-root": { + "match": "\\$[a-zA-Z0-9_-]+", + "name": "variable.other.root" + }, + "variable": { + "match": "\\$[a-zA-Z0-9_-]+", + "name": "variable.other.value" + }, + "import-quotes": { + "match": "[\"']?\\.{0,2}[\\w/]+[\"']?", + "name": "constant.character.css.sass" + } + }, + "scopeName": "source.sass" +} diff --git a/src/lib/shiki/languages/scala.tmLanguage.json b/src/lib/shiki/languages/scala.tmLanguage.json new file mode 100644 index 0000000..11b23a2 --- /dev/null +++ b/src/lib/shiki/languages/scala.tmLanguage.json @@ -0,0 +1,1312 @@ +{ + "fileTypes": ["scala"], + "firstLineMatch": "^#!/.*\\b\\w*scala\\b", + "foldingStartMarker": "/\\*\\*|\\{\\s*$", + "foldingStopMarker": "\\*\\*/|^\\s*\\}", + "keyEquivalent": "^~S", + "repository": { + "empty-parentheses": { + "match": "(\\(\\))", + "captures": { + "1": { + "name": "meta.bracket.scala" + } + }, + "name": "meta.parentheses.scala" + }, + "imports": { + "end": "(?<=[\\n;])", + "begin": "\\b(import)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.other.import.scala" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "match": "\\b(given)\\b", + "name": "keyword.other.import.given.scala" + }, + { + "match": "[A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?", + "name": "entity.name.class.import.scala" + }, + { + "match": "(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))", + "name": "entity.name.import.scala" + }, + { + "match": "\\.", + "name": "punctuation.definition.import" + }, + { + "end": "}", + "begin": "{", + "beginCaptures": { + "0": { + "name": "meta.bracket.scala" + } + }, + "patterns": [ + { + "match": "(?x)(given\\s)?\\s*(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))\\s*(=>)\\s*(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))\\s*", + "captures": { + "1": { + "name": "keyword.other.import.given.scala" + }, + "2": { + "name": "entity.name.class.import.renamed-from.scala" + }, + "3": { + "name": "entity.name.import.renamed-from.scala" + }, + "4": { + "name": "keyword.other.arrow.scala" + }, + "5": { + "name": "entity.name.class.import.renamed-to.scala" + }, + "6": { + "name": "entity.name.import.renamed-to.scala" + } + } + }, + { + "match": "\\b(given)\\b", + "name": "keyword.other.import.given.scala" + }, + { + "match": "(given\\s+)?(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))", + "captures": { + "1": { + "name": "keyword.other.import.given.scala" + }, + "2": { + "name": "entity.name.class.import.scala" + }, + "3": { + "name": "entity.name.import.scala" + } + } + } + ], + "endCaptures": { + "0": { + "name": "meta.bracket.scala" + } + }, + "name": "meta.import.selector.scala" + } + ], + "name": "meta.import.scala" + }, + "exports": { + "end": "(?<=[\\n;])", + "begin": "\\b(export)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.other.export.scala" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "match": "\\b(given)\\b", + "name": "keyword.other.export.given.scala" + }, + { + "match": "[A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?", + "name": "entity.name.class.export.scala" + }, + { + "match": "(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))", + "name": "entity.name.export.scala" + }, + { + "match": "\\.", + "name": "punctuation.definition.export" + }, + { + "end": "}", + "begin": "{", + "beginCaptures": { + "0": { + "name": "meta.bracket.scala" + } + }, + "patterns": [ + { + "match": "(?x)(given\\s)?\\s*(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))\\s*(=>)\\s*(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))\\s*", + "captures": { + "1": { + "name": "keyword.other.export.given.scala" + }, + "2": { + "name": "entity.name.class.export.renamed-from.scala" + }, + "3": { + "name": "entity.name.export.renamed-from.scala" + }, + "4": { + "name": "keyword.other.arrow.scala" + }, + "5": { + "name": "entity.name.class.export.renamed-to.scala" + }, + "6": { + "name": "entity.name.export.renamed-to.scala" + } + } + }, + { + "match": "\\b(given)\\b", + "name": "keyword.other.export.given.scala" + }, + { + "match": "(given\\s+)?(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))", + "captures": { + "1": { + "name": "keyword.other.export.given.scala" + }, + "2": { + "name": "entity.name.class.export.scala" + }, + "3": { + "name": "entity.name.export.scala" + } + } + } + ], + "endCaptures": { + "0": { + "name": "meta.bracket.scala" + } + }, + "name": "meta.export.selector.scala" + } + ], + "name": "meta.export.scala" + }, + "constants": { + "patterns": [ + { + "match": "\\b(false|null|true)\\b", + "name": "constant.language.scala" + }, + { + "match": "\\b(0[xX][0-9a-fA-F_]*)\\b", + "name": "constant.numeric.scala" + }, + { + "match": "\\b(([0-9][0-9_]*(\\.[0-9][0-9_]*)?)([eE](\\+|-)?[0-9][0-9_]*)?|[0-9][0-9_]*)[LlFfDd]?\\b", + "name": "constant.numeric.scala" + }, + { + "match": "(\\.[0-9][0-9_]*)([eE](\\+|-)?[0-9][0-9_]*)?[LlFfDd]?\\b", + "name": "constant.numeric.scala" + }, + { + "match": "\\b(this|super)\\b", + "name": "variable.language.scala" + } + ] + }, + "script-header": { + "match": "^#!(.*)$", + "captures": { + "1": { + "name": "string.unquoted.shebang.scala" + } + }, + "name": "comment.block.shebang.scala" + }, + "code": { + "patterns": [ + { + "include": "#using-directive" + }, + { + "include": "#script-header" + }, + { + "include": "#storage-modifiers" + }, + { + "include": "#declarations" + }, + { + "include": "#inheritance" + }, + { + "include": "#extension" + }, + { + "include": "#imports" + }, + { + "include": "#exports" + }, + { + "include": "#comments" + }, + { + "include": "#strings" + }, + { + "include": "#initialization" + }, + { + "include": "#xml-literal" + }, + { + "include": "#keywords" + }, + { + "include": "#using" + }, + { + "include": "#constants" + }, + { + "include": "#singleton-type" + }, + { + "include": "#inline" + }, + { + "include": "#scala-quoted-or-symbol" + }, + { + "include": "#char-literal" + }, + { + "include": "#empty-parentheses" + }, + { + "include": "#parameter-list" + }, + { + "include": "#qualifiedClassName" + }, + { + "include": "#backQuotedVariable" + }, + { + "include": "#curly-braces" + }, + { + "include": "#meta-brackets" + }, + { + "include": "#meta-bounds" + }, + { + "include": "#meta-colons" + } + ] + }, + "strings": { + "patterns": [ + { + "end": "\"\"\"(?!\")", + "begin": "\"\"\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.scala" + } + }, + "patterns": [ + { + "match": "\\\\\\\\|\\\\u[0-9A-Fa-f]{4}", + "name": "constant.character.escape.scala" + } + ], + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.scala" + } + }, + "name": "string.quoted.triple.scala" + }, + { + "begin": "\\b(raw)(\"\"\")", + "end": "(\"\"\")(?!\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])", + "beginCaptures": { + "1": { + "name": "keyword.interpolation.scala" + }, + "2": { + "name": "string.quoted.triple.interpolated.scala punctuation.definition.string.begin.scala" + } + }, + "patterns": [ + { + "match": "\\$[\\$\"]", + "name": "constant.character.escape.scala" + }, + { + "include": "#string-interpolation" + }, + { + "match": ".", + "name": "string.quoted.triple.interpolated.scala" + } + ], + "endCaptures": { + "1": { + "name": "string.quoted.triple.interpolated.scala punctuation.definition.string.end.scala" + }, + "2": { + "name": "invalid.illegal.unrecognized-string-escape.scala" + } + } + }, + { + "begin": "\\b((?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?))(\"\"\")", + "end": "(\"\"\")(?!\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])", + "beginCaptures": { + "1": { + "name": "keyword.interpolation.scala" + }, + "2": { + "name": "string.quoted.triple.interpolated.scala punctuation.definition.string.begin.scala" + } + }, + "patterns": [ + { + "include": "#string-interpolation" + }, + { + "match": "\\\\\\\\|\\\\u[0-9A-Fa-f]{4}", + "name": "constant.character.escape.scala" + }, + { + "match": ".", + "name": "string.quoted.triple.interpolated.scala" + } + ], + "endCaptures": { + "1": { + "name": "string.quoted.triple.interpolated.scala punctuation.definition.string.end.scala" + }, + "2": { + "name": "invalid.illegal.unrecognized-string-escape.scala" + } + } + }, + { + "end": "\"", + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.scala" + } + }, + "patterns": [ + { + "match": "\\\\(?:[btnfr\\\\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4})", + "name": "constant.character.escape.scala" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unrecognized-string-escape.scala" + } + ], + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.scala" + } + }, + "name": "string.quoted.double.scala" + }, + { + "begin": "\\b(raw)(\")", + "end": "(\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])", + "beginCaptures": { + "1": { + "name": "keyword.interpolation.scala" + }, + "2": { + "name": "string.quoted.double.interpolated.scala punctuation.definition.string.begin.scala" + } + }, + "patterns": [ + { + "match": "\\$[\\$\"]", + "name": "constant.character.escape.scala" + }, + { + "include": "#string-interpolation" + }, + { + "match": ".", + "name": "string.quoted.double.interpolated.scala" + } + ], + "endCaptures": { + "1": { + "name": "string.quoted.double.interpolated.scala punctuation.definition.string.end.scala" + }, + "2": { + "name": "invalid.illegal.unrecognized-string-escape.scala" + } + } + }, + { + "begin": "\\b((?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?))(\")", + "end": "(\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])", + "beginCaptures": { + "1": { + "name": "keyword.interpolation.scala" + }, + "2": { + "name": "string.quoted.double.interpolated.scala punctuation.definition.string.begin.scala" + } + }, + "patterns": [ + { + "match": "\\$[\\$\"]", + "name": "constant.character.escape.scala" + }, + { + "include": "#string-interpolation" + }, + { + "match": "\\\\(?:[btnfr\\\\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4})", + "name": "constant.character.escape.scala" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unrecognized-string-escape.scala" + }, + { + "match": ".", + "name": "string.quoted.double.interpolated.scala" + } + ], + "endCaptures": { + "1": { + "name": "string.quoted.double.interpolated.scala punctuation.definition.string.end.scala" + }, + "2": { + "name": "invalid.illegal.unrecognized-string-escape.scala" + } + } + } + ] + }, + "using": { + "patterns": [ + { + "match": "(?<=\\()\\s*(using)\\s", + "captures": { + "1": { + "name": "keyword.declaration.scala" + } + } + } + ] + }, + "string-interpolation": { + "patterns": [ + { + "name": "constant.character.escape.interpolation.scala", + "match": "\\$\\$" + }, + { + "name": "meta.template.expression.scala", + "match": "(\\$)([A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\p{Lo}\\p{Nl}\\p{Ll}0-9]*)", + "captures": { + "1": { + "name": "punctuation.definition.template-expression.begin.scala" + } + } + }, + { + "name": "meta.template.expression.scala", + "begin": "\\$\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.template-expression.begin.scala" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.template-expression.end.scala" + } + }, + "patterns": [ + { + "include": "#code" + } + ], + "contentName": "meta.embedded.line.scala" + } + ] + }, + "xml-entity": { + "match": "(&)([:a-zA-Z_][:a-zA-Z0-9_.-]*|#[0-9]+|#x[0-9a-fA-F]+)(;)", + "captures": { + "1": { + "name": "punctuation.definition.constant.xml" + }, + "3": { + "name": "punctuation.definition.constant.xml" + } + }, + "name": "constant.character.entity.xml" + }, + "xml-singlequotedString": { + "end": "'", + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.xml" + } + }, + "patterns": [ + { + "include": "#xml-entity" + } + ], + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.xml" + } + }, + "name": "string.quoted.single.xml" + }, + "meta-colons": { + "patterns": [ + { + "match": "(?<!:):(?!:)", + "name": "meta.colon.scala" + } + ], + "comment": "For themes: Matching type colons" + }, + "keywords": { + "patterns": [ + { + "match": "\\b(return|throw)\\b", + "name": "keyword.control.flow.jump.scala" + }, + { + "match": "\\b(classOf|isInstanceOf|asInstanceOf)\\b", + "name": "support.function.type-of.scala" + }, + { + "match": "\\b(else|if|then|do|while|for|yield|match|case)\\b", + "name": "keyword.control.flow.scala" + }, + { + "match": "^\\s*(end)\\s+(if|while|for|match)(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)", + "name": "keyword.control.flow.end.scala" + }, + { + "match": "^\\s*(end)\\s+(val)(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)", + "name": "keyword.declaration.stable.end.scala" + }, + { + "match": "^\\s*(end)\\s+(var)(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)", + "name": "keyword.declaration.volatile.end.scala" + }, + { + "match": "^\\s*(end)\\s+(?:(new|extension)|([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?))(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)", + "captures": { + "1": { + "name": "keyword.declaration.end.scala" + }, + "2": { + "name": "keyword.declaration.end.scala" + }, + "3": { + "name": "entity.name.type.declaration" + } + } + }, + { + "match": "\\b(catch|finally|try)\\b", + "name": "keyword.control.exception.scala" + }, + { + "match": "^\\s*(end)\\s+(try)(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)", + "name": "keyword.control.exception.end.scala" + }, + { + "match": "^\\s*(end)\\s+(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))?(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)", + "captures": { + "1": { + "name": "keyword.declaration.end.scala" + }, + "2": { + "name": "entity.name.declaration" + } + } + }, + { + "match": "(==?|!=|<=|>=|<>|<|>)", + "name": "keyword.operator.comparison.scala" + }, + { + "match": "(\\-|\\+|\\*|/(?![/*])|%|~)", + "name": "keyword.operator.arithmetic.scala" + }, + { + "match": "(?<![!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]|_)(!|&&|\\|\\|)(?![!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}])", + "name": "keyword.operator.logical.scala" + }, + { + "match": "(<-|←|->|→|=>|⇒|\\?|\\:+|@|\\|)+", + "name": "keyword.operator.scala" + } + ] + }, + "singleton-type": { + "match": "\\.(type)(?![A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[0-9])", + "captures": { + "1": { + "name": "keyword.type.scala" + } + } + }, + "inline": { + "patterns": [ + { + "match": "\\b(inline)(?=\\s+((?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)\\s*:)", + "name": "storage.modifier.other" + }, + { + "match": "\\b(inline)\\b(?=(?:.(?!\\b(?:val|def|given)\\b))*\\b(if|match)\\b)", + "name": "keyword.control.flow.scala" + } + ] + }, + "scala-quoted-or-symbol": { + "patterns": [ + { + "match": "(')((?>(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))(?!')", + "captures": { + "1": { + "name": "keyword.control.flow.staging.scala constant.other.symbol.scala" + }, + "2": { + "name": "constant.other.symbol.scala" + } + } + }, + { + "match": "'(?=\\s*\\{(?!'))", + "name": "keyword.control.flow.staging.scala" + }, + { + "match": "'(?=\\s*\\[(?!'))", + "name": "keyword.control.flow.staging.scala" + }, + { + "match": "\\$(?=\\s*\\{)", + "name": "keyword.control.flow.staging.scala" + } + ] + }, + "xml-doublequotedString": { + "end": "\"", + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.xml" + } + }, + "patterns": [ + { + "include": "#xml-entity" + } + ], + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.xml" + } + }, + "name": "string.quoted.double.xml" + }, + "declarations": { + "patterns": [ + { + "match": "\\b(def)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?", + "captures": { + "1": { + "name": "keyword.declaration.scala" + }, + "2": { + "name": "entity.name.function.declaration" + } + } + }, + { + "match": "\\b(trait)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?", + "captures": { + "1": { + "name": "keyword.declaration.scala" + }, + "2": { + "name": "entity.name.class.declaration" + } + } + }, + { + "match": "\\b(?:(case)\\s+)?(class|object|enum)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?", + "captures": { + "1": { + "name": "keyword.declaration.scala" + }, + "2": { + "name": "keyword.declaration.scala" + }, + "3": { + "name": "entity.name.class.declaration" + } + } + }, + { + "match": "(?<!\\.)\\b(type)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?", + "captures": { + "1": { + "name": "keyword.declaration.scala" + }, + "2": { + "name": "entity.name.type.declaration" + } + } + }, + { + "match": "\\b(?:(val)|(var))\\b\\s*(?!//|/\\*)(?=(?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)?\\()", + "captures": { + "1": { + "name": "keyword.declaration.stable.scala" + }, + "2": { + "name": "keyword.declaration.volatile.scala" + } + } + }, + { + "match": "\\b(val)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)(?:\\s*,\\s*(?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))*)?", + "captures": { + "1": { + "name": "keyword.declaration.stable.scala" + }, + "2": { + "name": "variable.stable.declaration.scala" + } + } + }, + { + "match": "\\b(var)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)(?:\\s*,\\s*(?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))*)?", + "captures": { + "1": { + "name": "keyword.declaration.volatile.scala" + }, + "2": { + "name": "variable.volatile.declaration.scala" + } + } + }, + { + "match": "\\b(package)\\s+(object)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?", + "captures": { + "1": { + "name": "keyword.other.scoping.scala" + }, + "2": { + "name": "keyword.declaration.scala" + }, + "3": { + "name": "entity.name.class.declaration" + } + } + }, + { + "end": "(?<=[\\n;])", + "begin": "\\b(package)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.other.import.scala" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "match": "(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))", + "name": "entity.name.package.scala" + }, + { + "match": "\\.", + "name": "punctuation.definition.package" + } + ], + "name": "meta.package.scala" + }, + { + "match": "\\b(given)\\b\\s*([_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|`[^`]+`)?", + "captures": { + "1": { + "name": "keyword.declaration.scala" + }, + "2": { + "name": "entity.name.given.declaration" + } + } + } + ] + }, + "char-literal": { + "end": "'|$", + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.character.begin.scala" + } + }, + "patterns": [ + { + "match": "\\\\(?:[btnfr\\\\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4})", + "name": "constant.character.escape.scala" + }, + { + "match": "\\\\.", + "name": "invalid.illegal.unrecognized-character-escape.scala" + }, + { + "match": "[^']{2,}", + "name": "invalid.illegal.character-literal-too-long" + }, + { + "match": "(?<!')[^']", + "name": "invalid.illegal.character-literal-too-long" + } + ], + "endCaptures": { + "0": { + "name": "punctuation.definition.character.end.scala" + } + }, + "name": "string.quoted.other constant.character.literal.scala" + }, + "initialization": { + "match": "\\b(new)\\b", + "captures": { + "1": { + "name": "keyword.declaration.scala" + } + } + }, + "curly-braces": { + "begin": "\\{", + "end": "\\}", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.scala" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.scala" + } + }, + "patterns": [ + { + "include": "#code" + } + ] + }, + "meta-brackets": { + "patterns": [ + { + "match": "\\{", + "comment": "The punctuation.section.*.begin is needed for return snippet in source bundle", + "name": "punctuation.section.block.begin.scala" + }, + { + "match": "\\}", + "comment": "The punctuation.section.*.end is needed for return snippet in source bundle", + "name": "punctuation.section.block.end.scala" + }, + { + "match": "{|}|\\(|\\)|\\[|\\]", + "name": "meta.bracket.scala" + } + ], + "comment": "For themes: Brackets look nice when colored." + }, + "qualifiedClassName": { + "match": "(\\b([A-Z][\\w]*)(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)", + "captures": { + "1": { + "name": "entity.name.class" + } + } + }, + "backQuotedVariable": { + "match": "`[^`]+`" + }, + "storage-modifiers": { + "patterns": [ + { + "match": "\\b(private\\[\\S+\\]|protected\\[\\S+\\]|private|protected)\\b", + "name": "storage.modifier.access" + }, + { + "match": "\\b(synchronized|@volatile|abstract|final|lazy|sealed|implicit|override|@transient|@native)\\b", + "name": "storage.modifier.other" + }, + { + "match": "(?<=^|\\s)\\b(transparent|opaque|infix|open|inline)\\b(?=[a-z\\s]*\\b(def|val|var|given|type|class|trait|object|enum)\\b)", + "name": "storage.modifier.other" + } + ] + }, + "meta-bounds": { + "match": "<%|=:=|<:<|<%<|>:|<:", + "comment": "For themes: Matching view bounds", + "name": "meta.bounds.scala" + }, + "using-directive": { + "end": "\\n", + "begin": "^\\s*(//>)\\s*(using)[^\\S\\n]+(?:(\\S+))?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.scala" + }, + "2": { + "name": "keyword.other.import.scala" + }, + "3": { + "patterns": [ + { + "match": "[A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)", + "name": "entity.name.import.scala" + }, + { + "match": "\\.", + "name": "punctuation.definition.import" + } + ] + } + }, + "patterns": [ + { + "include": "#constants" + }, + { + "include": "#strings" + }, + { + "match": "[^\\s,]+", + "name": "string.quoted.double.scala" + } + ], + "name": "comment.line.shebang.scala" + }, + "comments": { + "patterns": [ + { + "include": "#block-comments" + }, + { + "end": "(?!\\G)", + "begin": "(^[ \\t]+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.scala" + } + }, + "patterns": [ + { + "end": "\\n", + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.scala" + } + }, + "name": "comment.line.double-slash.scala" + } + ] + } + ] + }, + "block-comments": { + "patterns": [ + { + "match": "/\\*\\*/", + "captures": { + "0": { + "name": "punctuation.definition.comment.scala" + } + }, + "name": "comment.block.empty.scala" + }, + { + "end": "\\*/", + "begin": "^\\s*(/\\*\\*)(?!/)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.scala" + } + }, + "patterns": [ + { + "match": "(@param)\\s+(\\S+)", + "captures": { + "1": { + "name": "keyword.other.documentation.scaladoc.scala" + }, + "2": { + "name": "variable.parameter.scala" + } + } + }, + { + "match": "(@(?:tparam|throws))\\s+(\\S+)", + "captures": { + "1": { + "name": "keyword.other.documentation.scaladoc.scala" + }, + "2": { + "name": "entity.name.class" + } + } + }, + { + "match": "@(return|see|note|example|constructor|usecase|author|version|since|todo|deprecated|migration|define|inheritdoc)\\b", + "name": "keyword.other.documentation.scaladoc.scala" + }, + { + "match": "(\\[\\[)([^\\]]+)(\\]\\])", + "captures": { + "1": { + "name": "punctuation.definition.documentation.link.scala" + }, + "2": { + "name": "string.other.link.title.markdown" + }, + "3": { + "name": "punctuation.definition.documentation.link.scala" + } + } + }, + { + "include": "#block-comments" + } + ], + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.scala" + } + }, + "name": "comment.block.documentation.scala" + }, + { + "end": "\\*/", + "begin": "/\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.scala" + } + }, + "patterns": [ + { + "include": "#block-comments" + } + ], + "name": "comment.block.scala" + } + ] + }, + "xml-embedded-content": { + "patterns": [ + { + "end": "}", + "begin": "{", + "patterns": [ + { + "include": "#code" + } + ], + "captures": { + "0": { + "name": "meta.bracket.scala" + } + }, + "name": "meta.source.embedded.scala" + }, + { + "match": " (?:([-_a-zA-Z0-9]+)((:)))?([_a-zA-Z-]+)=", + "captures": { + "1": { + "name": "entity.other.attribute-name.namespace.xml" + }, + "2": { + "name": "entity.other.attribute-name.xml" + }, + "3": { + "name": "punctuation.separator.namespace.xml" + }, + "4": { + "name": "entity.other.attribute-name.localname.xml" + } + } + }, + { + "include": "#xml-doublequotedString" + }, + { + "include": "#xml-singlequotedString" + } + ] + }, + "inheritance": { + "patterns": [ + { + "match": "\\b(extends|with|derives)\\b\\s*([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|`[^`]+`|(?=\\([^\\)]+=>)|(?=(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))|(?=\"))?", + "captures": { + "1": { + "name": "keyword.declaration.scala" + }, + "2": { + "name": "entity.name.class" + } + } + } + ] + }, + "extension": { + "patterns": [ + { + "match": "^\\s*(extension)\\s+(?=[\\[\\(])", + "captures": { + "1": { + "name": "keyword.declaration.scala" + } + } + } + ] + }, + "parameter-list": { + "patterns": [ + { + "match": "(?<=[^\\._$a-zA-Z0-9])(`[^`]+`|[_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)\\s*(:)\\s+", + "captures": { + "1": { + "name": "variable.parameter.scala" + }, + "2": { + "name": "meta.colon.scala" + } + } + } + ] + }, + "xml-literal": { + "patterns": [ + { + "end": "(>(<))/(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]*[_a-zA-Z0-9])(>)", + "begin": "(<)((?:([_a-zA-Z0-9][_a-zA-Z0-9]*)((:)))?([_a-zA-Z0-9][-_a-zA-Z0-9:]*))(?=(\\s[^>]*)?></\\2>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.xml" + }, + "3": { + "name": "entity.name.tag.namespace.xml" + }, + "4": { + "name": "entity.name.tag.xml" + }, + "5": { + "name": "punctuation.separator.namespace.xml" + }, + "6": { + "name": "entity.name.tag.localname.xml" + } + }, + "patterns": [ + { + "include": "#xml-embedded-content" + } + ], + "comment": "We do not allow a tag name to start with a - since this would likely conflict with the <- operator. This is not very common for tag names anyway. Also code such as -- if (val <val2 || val> val3) will falsly be recognized as an xml tag. The solution is to put a space on either side of the comparison operator", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.xml" + }, + "2": { + "name": "meta.scope.between-tag-pair.xml" + }, + "3": { + "name": "entity.name.tag.namespace.xml" + }, + "4": { + "name": "entity.name.tag.xml" + }, + "5": { + "name": "punctuation.separator.namespace.xml" + }, + "6": { + "name": "entity.name.tag.localname.xml" + }, + "7": { + "name": "punctuation.definition.tag.xml" + } + }, + "name": "meta.tag.no-content.xml" + }, + { + "end": "(/?>)", + "begin": "(</?)(?:([_a-zA-Z0-9][-_a-zA-Z0-9]*)((:)))?([_a-zA-Z0-9][-_a-zA-Z0-9:]*)(?=[^>]*?>)", + "patterns": [ + { + "include": "#xml-embedded-content" + } + ], + "captures": { + "1": { + "name": "punctuation.definition.tag.xml" + }, + "2": { + "name": "entity.name.tag.namespace.xml" + }, + "3": { + "name": "entity.name.tag.xml" + }, + "4": { + "name": "punctuation.separator.namespace.xml" + }, + "5": { + "name": "entity.name.tag.localname.xml" + } + }, + "name": "meta.tag.xml" + }, + { + "include": "#xml-entity" + } + ] + } + }, + "uuid": "158C0929-299A-40C8-8D89-316BE0C446E8", + "patterns": [ + { + "include": "#code" + } + ], + "name": "scala", + "scopeName": "source.scala" +} diff --git a/src/lib/shiki/languages/scheme.tmLanguage.json b/src/lib/shiki/languages/scheme.tmLanguage.json new file mode 100644 index 0000000..a56273e --- /dev/null +++ b/src/lib/shiki/languages/scheme.tmLanguage.json @@ -0,0 +1,381 @@ +{ + "comment": "\n\t\tThe foldings do not currently work the way I want them to. This\n\t\tmay be a limitation of the way they are applied rather than the\n\t\tregexps in use. Nonetheless, the foldings will end on the last\n\t\tidentically indented blank line following an s-expression. Not\n\t\tideal perhaps, but it works. Also, the #illegal pattern never\n\t\tmatches an unpaired ( as being illegal. Why?! -- Rob Rix\n\t\t\n\t\tOk, hopefully this grammar works better on quoted stuff now. It\n\t\tmay break for fancy macros, but should generally work pretty\n\t\tsmoothly. -- Jacob Rus\n\t\t\n\t\tI have attempted to get this under control but because of the way folding\n\t\tand indentation interact in Textmate, I am not sure if it is possible. In the\n\t\tmeantime, I have implemented Python-style folding anchored at newlines.\n\t\tAdditionally, I have made some minor improvements to the numeric constant\n\t\thighlighting. Next up is square bracket expressions, I guess, but that\n\t\tshould be trivial. -- ozy`\n\t", + "fileTypes": ["scm", "ss", "sch", "rkt"], + "keyEquivalent": "^~S", + "name": "scheme", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#block-comment" + }, + { + "include": "#sexp" + }, + { + "include": "#string" + }, + { + "include": "#language-functions" + }, + { + "include": "#quote" + }, + { + "include": "#illegal" + } + ], + "repository": { + "comment": { + "begin": "(^[ \\t]+)?(?=;)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.scheme" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": ";", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.scheme" + } + }, + "end": "\\n", + "name": "comment.line.semicolon.scheme" + } + ] + }, + "block-comment": { + "begin": "\\#\\|", + "contentName": "comment", + "end": "\\|\\#", + "name": "comment", + "patterns": [ + { + "include": "#block-comment", + "name": "comment" + } + ] + }, + "constants": { + "patterns": [ + { + "match": "#[t|f]", + "name": "constant.language.boolean.scheme" + }, + { + "match": "(?<=[\\(\\s])((#e|#i)?[0-9]+(\\.[0-9]+)?|(#x)[0-9a-fA-F]+|(#o)[0-7]+|(#b)[01]+)(?=[\\s;()'\",\\[\\]])", + "name": "constant.numeric.scheme" + } + ] + }, + "illegal": { + "match": "[()\\[\\]]", + "name": "invalid.illegal.parenthesis.scheme" + }, + "language-functions": { + "patterns": [ + { + "match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\(|\\[)) # preceded by space or ( \n\t\t\t\t\t\t( do|or|and|else|quasiquote|begin|if|case|set!|\n\t\t\t\t\t\t cond|let|unquote|define|let\\*|unquote-splicing|delay|\n\t\t\t\t\t\t letrec)\n\t\t\t\t\t\t(?=(\\s|\\())", + "name": "keyword.control.scheme" + }, + { + "comment": "\n\t\t\t\t\t\tThese functions run a test, and return a boolean\n\t\t\t\t\t\tanswer.\n\t\t\t\t\t", + "match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t( char-alphabetic|char-lower-case|char-numeric|\n\t\t\t\t\t\t char-ready|char-upper-case|char-whitespace|\n\t\t\t\t\t\t (?:char|string)(?:-ci)?(?:=|<=?|>=?)|\n\t\t\t\t\t\t atom|boolean|bound-identifier=|char|complex|\n\t\t\t\t\t\t identifier|integer|symbol|free-identifier=|inexact|\n\t\t\t\t\t\t eof-object|exact|list|(?:input|output)-port|pair|\n\t\t\t\t\t\t real|rational|zero|vector|negative|odd|null|string|\n\t\t\t\t\t\t eq|equal|eqv|even|number|positive|procedure\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(\\?)\t\t# name ends with ? sign\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\t\t\t\t\t", + "name": "support.function.boolean-test.scheme" + }, + { + "comment": "\n\t\t\t\t\t\tThese functions change one type into another.\n\t\t\t\t\t", + "match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t( char->integer|exact->inexact|inexact->exact|\n\t\t\t\t\t\t integer->char|symbol->string|list->vector|\n\t\t\t\t\t\t list->string|identifier->symbol|vector->list|\n\t\t\t\t\t\t string->list|string->number|string->symbol|\n\t\t\t\t\t\t number->string\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\t\t\t\t\t\n\t\t\t\t\t", + "name": "support.function.convert-type.scheme" + }, + { + "comment": "\n\t\t\t\t\t\tThese functions are potentially dangerous because\n\t\t\t\t\t\tthey have side-effects which could affect other\n\t\t\t\t\t\tparts of the program.\n\t\t\t\t\t", + "match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t( set-(?:car|cdr)|\t\t\t\t # set car/cdr\n\t\t\t\t\t\t (?:vector|string)-(?:fill|set) # fill/set string/vector\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(!)\t\t\t# name ends with ! sign\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\t\t\t\t\t", + "name": "support.function.with-side-effects.scheme" + }, + { + "comment": "\n\t\t\t\t\t\t+, -, *, /, =, >, etc. \n\t\t\t\t\t", + "match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t( >=?|<=?|=|[*/+-])\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\t\t\t\t\t\t", + "name": "keyword.operator.arithmetic.scheme" + }, + { + "match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t( append|apply|approximate|\n\t\t\t\t\t\t call-with-current-continuation|call/cc|catch|\n\t\t\t\t\t\t construct-identifier|define-syntax|display|foo|\n\t\t\t\t\t\t for-each|force|format|cd|gen-counter|gen-loser|\n\t\t\t\t\t\t generate-identifier|last-pair|length|let-syntax|\n\t\t\t\t\t\t letrec-syntax|list|list-ref|list-tail|load|log|\n\t\t\t\t\t\t macro|magnitude|map|map-streams|max|member|memq|\n\t\t\t\t\t\t memv|min|newline|nil|not|peek-char|rationalize|\n\t\t\t\t\t\t read|read-char|return|reverse|sequence|substring|\n\t\t\t\t\t\t syntax|syntax-rules|transcript-off|transcript-on|\n\t\t\t\t\t\t truncate|unwrap-syntax|values-list|write|write-char|\n\t\t\t\t\t\t \n\t\t\t\t\t\t # cons, car, cdr, etc\n\t\t\t\t\t\t cons|c(a|d){1,4}r| \n \n\t\t\t\t\t\t # unary math operators\n\t\t\t\t\t\t abs|acos|angle|asin|assoc|assq|assv|atan|ceiling|\n\t\t\t\t\t\t cos|floor|round|sin|sqrt|tan|\n\t\t\t\t\t\t (?:real|imag)-part|numerator|denominator\n \n\t\t\t\t\t\t # other math operators\n\t\t\t\t\t\t modulo|exp|expt|remainder|quotient|lcm|\n \n\t\t\t\t\t\t # ports / files\n\t\t\t\t\t\t call-with-(?:input|output)-file|\n\t\t\t\t\t\t (?:close|current)-(?:input|output)-port|\n\t\t\t\t\t\t with-(?:input|output)-from-file|\n\t\t\t\t\t\t open-(?:input|output)-file|\n\t\t\t\t\t\t \n\t\t\t\t\t\t # char-«foo»\n\t\t\t\t\t\t char-(?:downcase|upcase|ready)|\n\t\t\t\t\t\t \n\t\t\t\t\t\t # make-«foo»\n\t\t\t\t\t\t make-(?:polar|promise|rectangular|string|vector)\n\t\t\t\t\t\t \n\t\t\t\t\t\t # string-«foo», vector-«foo»\n\t\t\t\t\t\t string(?:-(?:append|copy|length|ref))?|\n\t\t\t\t\t\t vector(?:-length|-ref)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\t\t\t\t\t", + "name": "support.function.general.scheme" + } + ] + }, + "quote": { + "comment": "\n\t\t\t\tWe need to be able to quote any kind of item, which creates\n\t\t\t\ta tiny bit of complexity in our grammar. It is hopefully\n\t\t\t\tnot overwhelming complexity.\n\t\t\t\t\n\t\t\t\tNote: the first two matches are special cases. quoted\n\t\t\t\tsymbols, and quoted empty lists are considered constant.other\n\t\t\t\t\n\t\t\t", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.section.quoted.symbol.scheme" + } + }, + "match": "(?x)\n\t\t\t\t\t\t(')\\s*\n\t\t\t\t\t\t([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*)\n\t\t\t\t\t", + "name": "constant.other.symbol.scheme" + }, + { + "captures": { + "1": { + "name": "punctuation.section.quoted.empty-list.scheme" + }, + "2": { + "name": "meta.expression.scheme" + }, + "3": { + "name": "punctuation.section.expression.begin.scheme" + }, + "4": { + "name": "punctuation.section.expression.end.scheme" + } + }, + "match": "(?x)\n\t\t\t\t\t\t(')\\s*\n\t\t\t\t\t\t((\\()\\s*(\\)))\n\t\t\t\t\t", + "name": "constant.other.empty-list.schem" + }, + { + "begin": "(')\\s*", + "beginCaptures": { + "1": { + "name": "punctuation.section.quoted.scheme" + } + }, + "comment": "quoted double-quoted string or s-expression", + "end": "(?=[\\s()])|(?<=\\n)", + "name": "string.other.quoted-object.scheme", + "patterns": [ + { + "include": "#quoted" + } + ] + } + ] + }, + "quote-sexp": { + "begin": "(?<=\\()\\s*(quote)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.control.quote.scheme" + } + }, + "comment": "\n\t\t\t\tSomething quoted with (quote «thing»). In this case «thing»\n\t\t\t\twill not be evaluated, so we are considering it a string.\n\t\t\t", + "contentName": "string.other.quote.scheme", + "end": "(?=[\\s)])|(?<=\\n)", + "patterns": [ + { + "include": "#quoted" + } + ] + }, + "quoted": { + "patterns": [ + { + "include": "#string" + }, + { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.section.expression.begin.scheme" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.expression.end.scheme" + } + }, + "name": "meta.expression.scheme", + "patterns": [ + { + "include": "#quoted" + } + ] + }, + { + "include": "#quote" + }, + { + "include": "#illegal" + } + ] + }, + "sexp": { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.section.expression.begin.scheme" + } + }, + "end": "(\\))(\\n)?", + "endCaptures": { + "1": { + "name": "punctuation.section.expression.end.scheme" + }, + "2": { + "name": "meta.after-expression.scheme" + } + }, + "name": "meta.expression.scheme", + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?x)\n\t\t\t\t\t\t(?<=\\() # preceded by (\n\t\t\t\t\t\t(define)\\s+ # define\n\t\t\t\t\t\t(\\() # list of parameters\n\t\t\t\t\t\t ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*)\n\t\t\t\t\t\t ((\\s+\n\t\t\t\t\t\t ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*|[._])\n\t\t\t\t\t\t )*\n\t\t\t\t\t\t )\\s*\n\t\t\t\t\t\t(\\))\n\t\t\t\t\t", + "captures": { + "1": { + "name": "keyword.control.scheme" + }, + "2": { + "name": "punctuation.definition.function.scheme" + }, + "3": { + "name": "entity.name.function.scheme" + }, + "4": { + "name": "variable.parameter.function.scheme" + }, + "7": { + "name": "punctuation.definition.function.scheme" + } + }, + "end": "(?=\\))", + "name": "meta.declaration.procedure.scheme", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#sexp" + }, + { + "include": "#illegal" + } + ] + }, + { + "begin": "(?x)\n\t\t\t\t\t\t(?<=\\() # preceded by (\n\t\t\t\t\t\t(lambda)\\s+\n\t\t\t\t\t\t(\\() # opening paren\n\t\t\t\t\t\t((?:\n\t\t\t\t\t\t ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*|[._])\n\t\t\t\t\t\t \\s+\n\t\t\t\t\t\t)*(?:\n\t\t\t\t\t\t ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*|[._])\n\t\t\t\t\t\t)?)\n\t\t\t\t\t\t(\\)) # closing paren\n\t\t\t\t\t", + "captures": { + "1": { + "name": "keyword.control.scheme" + }, + "2": { + "name": "punctuation.definition.variable.scheme" + }, + "3": { + "name": "variable.parameter.scheme" + }, + "6": { + "name": "punctuation.definition.variable.scheme" + } + }, + "comment": "\n\t\t\t\t\t\tNot sure this one is quite correct. That \\s* is\n\t\t\t\t\t\tparticularly troubling\n\t\t\t\t\t", + "end": "(?=\\))", + "name": "meta.declaration.procedure.scheme", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#sexp" + }, + { + "include": "#illegal" + } + ] + }, + { + "begin": "(?<=\\()(define)\\s([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*)\\s*.*?", + "captures": { + "1": { + "name": "keyword.control.scheme" + }, + "2": { + "name": "variable.other.scheme" + } + }, + "end": "(?=\\))", + "name": "meta.declaration.variable.scheme", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#sexp" + }, + { + "include": "#illegal" + } + ] + }, + { + "include": "#quote-sexp" + }, + { + "include": "#quote" + }, + { + "include": "#language-functions" + }, + { + "include": "#string" + }, + { + "include": "#constants" + }, + { + "match": "(?<=[\\(\\s])(#\\\\)(space|newline|tab)(?=[\\s\\)])", + "name": "constant.character.named.scheme" + }, + { + "match": "(?<=[\\(\\s])(#\\\\)x[0-9A-F]{2,4}(?=[\\s\\)])", + "name": "constant.character.hex-literal.scheme" + }, + { + "match": "(?<=[\\(\\s])(#\\\\).(?=[\\s\\)])", + "name": "constant.character.escape.scheme" + }, + { + "comment": "\n\t\t\t\t\t\tthe . in (a . b) which conses together two elements\n\t\t\t\t\t\ta and b. (a b c) == (a . (b . (c . nil)))\n\t\t\t\t\t", + "match": "(?<=[ ()])\\.(?=[ ()])", + "name": "punctuation.separator.cons.scheme" + }, + { + "include": "#sexp" + }, + { + "include": "#illegal" + } + ] + }, + "string": { + "begin": "(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.scheme" + } + }, + "end": "(\")", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.scheme" + } + }, + "name": "string.quoted.double.scheme", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.scheme" + } + ] + } + }, + "scopeName": "source.scheme", + "uuid": "3EC2CFD0-909C-4692-AC29-1A60ADBC161E" +} diff --git a/src/lib/shiki/languages/scss.tmLanguage.json b/src/lib/shiki/languages/scss.tmLanguage.json new file mode 100644 index 0000000..23e26ce --- /dev/null +++ b/src/lib/shiki/languages/scss.tmLanguage.json @@ -0,0 +1,1879 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-sass/blob/master/grammars/scss.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/atom/language-sass/commit/f52ab12f7f9346cc2568129d8c4419bd3d506b47", + "name": "scss", + "scopeName": "source.css.scss", + "patterns": [ + { + "include": "#variable_setting" + }, + { + "include": "#at_rule_forward" + }, + { + "include": "#at_rule_use" + }, + { + "include": "#at_rule_include" + }, + { + "include": "#at_rule_import" + }, + { + "include": "#general" + }, + { + "include": "#flow_control" + }, + { + "include": "#rules" + }, + { + "include": "#property_list" + }, + { + "include": "#at_rule_mixin" + }, + { + "include": "#at_rule_media" + }, + { + "include": "#at_rule_function" + }, + { + "include": "#at_rule_charset" + }, + { + "include": "#at_rule_option" + }, + { + "include": "#at_rule_namespace" + }, + { + "include": "#at_rule_fontface" + }, + { + "include": "#at_rule_page" + }, + { + "include": "#at_rule_keyframes" + }, + { + "include": "#at_rule_at_root" + }, + { + "include": "#at_rule_supports" + }, + { + "match": ";", + "name": "punctuation.terminator.rule.css" + } + ], + "repository": { + "at_rule_charset": { + "begin": "\\s*((@)charset\\b)\\s*", + "captures": { + "1": { + "name": "keyword.control.at-rule.charset.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "end": "\\s*((?=;|$))", + "name": "meta.at-rule.charset.scss", + "patterns": [ + { + "include": "#variable" + }, + { + "include": "#string_single" + }, + { + "include": "#string_double" + } + ] + }, + "at_rule_content": { + "begin": "\\s*((@)content\\b)\\s*", + "captures": { + "1": { + "name": "keyword.control.content.scss" + } + }, + "end": "\\s*((?=;))", + "name": "meta.content.scss", + "patterns": [ + { + "include": "#variable" + }, + { + "include": "#selectors" + }, + { + "include": "#property_values" + } + ] + }, + "at_rule_each": { + "begin": "\\s*((@)each\\b)\\s*", + "captures": { + "1": { + "name": "keyword.control.each.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "end": "\\s*((?=}))", + "name": "meta.at-rule.each.scss", + "patterns": [ + { + "match": "\\b(in|,)\\b", + "name": "keyword.control.operator" + }, + { + "include": "#variable" + }, + { + "include": "#property_values" + }, + { + "include": "$self" + } + ] + }, + "at_rule_else": { + "begin": "\\s*((@)else(\\s*(if)?))\\s*", + "captures": { + "1": { + "name": "keyword.control.else.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "end": "\\s*(?={)", + "name": "meta.at-rule.else.scss", + "patterns": [ + { + "include": "#conditional_operators" + }, + { + "include": "#variable" + }, + { + "include": "#property_values" + } + ] + }, + "at_rule_extend": { + "begin": "\\s*((@)extend\\b)\\s*", + "captures": { + "1": { + "name": "keyword.control.at-rule.extend.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "end": "\\s*(?=;)", + "name": "meta.at-rule.extend.scss", + "patterns": [ + { + "include": "#variable" + }, + { + "include": "#selectors" + }, + { + "include": "#property_values" + } + ] + }, + "at_rule_fontface": { + "patterns": [ + { + "begin": "^\\s*((@)font-face\\b)", + "beginCaptures": { + "1": { + "name": "keyword.control.at-rule.fontface.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "end": "\\s*(?={)", + "name": "meta.at-rule.fontface.scss", + "patterns": [ + { + "include": "#function_attributes" + } + ] + } + ] + }, + "at_rule_for": { + "begin": "\\s*((@)for\\b)\\s*", + "captures": { + "1": { + "name": "keyword.control.for.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "end": "\\s*(?={)", + "name": "meta.at-rule.for.scss", + "patterns": [ + { + "match": "(==|!=|<=|>=|<|>|from|to|through)", + "name": "keyword.control.operator" + }, + { + "include": "#variable" + }, + { + "include": "#property_values" + }, + { + "include": "$self" + } + ] + }, + "at_rule_forward": { + "begin": "\\s*((@)forward\\b)\\s*", + "captures": { + "1": { + "name": "keyword.control.at-rule.forward.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "end": "\\s*(?=;)", + "name": "meta.at-rule.forward.scss", + "patterns": [ + { + "match": "\\b(as|hide|show)\\b", + "name": "keyword.control.operator" + }, + { + "match": "\\b([\\w-]+)(\\*)", + "captures": { + "1": { + "name": "entity.other.attribute-name.module.scss" + }, + "2": { + "name": "punctuation.definition.wildcard.scss" + } + } + }, + { + "match": "\\b[\\w-]+\\b", + "name": "entity.name.function.scss" + }, + { + "include": "#variable" + }, + { + "include": "#string_single" + }, + { + "include": "#string_double" + }, + { + "include": "#comment_line" + }, + { + "include": "#comment_block" + } + ] + }, + "at_rule_function": { + "patterns": [ + { + "begin": "\\s*((@)function\\b)\\s*", + "captures": { + "1": { + "name": "keyword.control.at-rule.function.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + }, + "3": { + "name": "entity.name.function.scss" + } + }, + "end": "\\s*(?={)", + "name": "meta.at-rule.function.scss", + "patterns": [ + { + "include": "#function_attributes" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.control.at-rule.function.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + }, + "3": { + "name": "entity.name.function.scss" + } + }, + "match": "\\s*((@)function\\b)\\s*", + "name": "meta.at-rule.function.scss" + } + ] + }, + "at_rule_if": { + "begin": "\\s*((@)if\\b)\\s*", + "captures": { + "1": { + "name": "keyword.control.if.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "end": "\\s*(?={)", + "name": "meta.at-rule.if.scss", + "patterns": [ + { + "include": "#conditional_operators" + }, + { + "include": "#variable" + }, + { + "include": "#property_values" + } + ] + }, + "at_rule_import": { + "begin": "\\s*((@)import\\b)\\s*", + "captures": { + "1": { + "name": "keyword.control.at-rule.import.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "end": "\\s*((?=;)|(?=}))", + "name": "meta.at-rule.import.scss", + "patterns": [ + { + "include": "#variable" + }, + { + "include": "#string_single" + }, + { + "include": "#string_double" + }, + { + "include": "#functions" + }, + { + "include": "#comment_line" + } + ] + }, + "at_rule_include": { + "patterns": [ + { + "begin": "(?<=@include)\\s+(?:([\\w-]+)\\s*(\\.))?([\\w-]+)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "variable.scss" + }, + "2": { + "name": "punctuation.access.module.scss" + }, + "3": { + "name": "entity.name.function.scss" + }, + "4": { + "name": "punctuation.definition.parameters.begin.bracket.round.scss" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.scss" + } + }, + "name": "meta.at-rule.include.scss", + "patterns": [ + { + "include": "#function_attributes" + } + ] + }, + { + "match": "(?<=@include)\\s+(?:([\\w-]+)\\s*(\\.))?([\\w-]+)", + "captures": { + "0": { + "name": "meta.at-rule.include.scss" + }, + "1": { + "name": "variable.scss" + }, + "2": { + "name": "punctuation.access.module.scss" + }, + "3": { + "name": "entity.name.function.scss" + } + } + }, + { + "match": "((@)include)\\b", + "captures": { + "0": { + "name": "meta.at-rule.include.scss" + }, + "1": { + "name": "keyword.control.at-rule.include.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + } + } + ] + }, + "at_rule_keyframes": { + "begin": "(?<=^|\\s)(@)(?:-(?:webkit|moz)-)?keyframes\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.at-rule.keyframes.scss" + }, + "1": { + "name": "punctuation.definition.keyword.scss" + } + }, + "end": "(?<=})", + "name": "meta.at-rule.keyframes.scss", + "patterns": [ + { + "match": "(?<=@keyframes)\\s+((?:[_A-Za-z][-\\w]|-[_A-Za-z])[-\\w]*)", + "captures": { + "1": { + "name": "entity.name.function.scss" + } + } + }, + { + "begin": "(?<=@keyframes)\\s+(\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.scss" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.scss" + } + }, + "name": "string.quoted.double.scss", + "contentName": "entity.name.function.scss", + "patterns": [ + { + "match": "\\\\(\\h{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "include": "#interpolation" + } + ] + }, + { + "begin": "(?<=@keyframes)\\s+(')", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.scss" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.scss" + } + }, + "name": "string.quoted.single.scss", + "contentName": "entity.name.function.scss", + "patterns": [ + { + "match": "\\\\(\\h{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "include": "#interpolation" + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.keyframes.begin.scss" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.keyframes.end.scss" + } + }, + "patterns": [ + { + "match": "\\b(?:(?:100|[1-9]\\d|\\d)%|from|to)(?=\\s*{)", + "name": "entity.other.attribute-name.scss" + }, + { + "include": "#flow_control" + }, + { + "include": "#interpolation" + }, + { + "include": "#property_list" + }, + { + "include": "#rules" + } + ] + } + ] + }, + "at_rule_media": { + "patterns": [ + { + "begin": "^\\s*((@)media)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.at-rule.media.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "end": "\\s*(?={)", + "name": "meta.at-rule.media.scss", + "patterns": [ + { + "include": "#comment_docblock" + }, + { + "include": "#comment_block" + }, + { + "include": "#comment_line" + }, + { + "match": "\\b(only)\\b", + "name": "keyword.control.operator.css.scss" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.media-query.begin.bracket.round.scss" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.media-query.end.bracket.round.scss" + } + }, + "name": "meta.property-list.media-query.scss", + "patterns": [ + { + "begin": "(?<![-a-z])(?=[-a-z])", + "end": "$|(?![-a-z])", + "name": "meta.property-name.media-query.scss", + "patterns": [ + { + "include": "source.css#media-features" + }, + { + "include": "source.css#property-names" + } + ] + }, + { + "begin": "(:)\\s*(?!(\\s*{))", + "beginCaptures": { + "1": { + "name": "punctuation.separator.key-value.scss" + } + }, + "end": "\\s*(;|(?=}|\\)))", + "endCaptures": { + "1": { + "name": "punctuation.terminator.rule.scss" + } + }, + "contentName": "meta.property-value.media-query.scss", + "patterns": [ + { + "include": "#general" + }, + { + "include": "#property_values" + } + ] + } + ] + }, + { + "include": "#variable" + }, + { + "include": "#conditional_operators" + }, + { + "include": "source.css#media-types" + } + ] + } + ] + }, + "at_rule_mixin": { + "patterns": [ + { + "begin": "(?<=@mixin)\\s+([\\w-]+)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.scss" + }, + "2": { + "name": "punctuation.definition.parameters.begin.bracket.round.scss" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.scss" + } + }, + "name": "meta.at-rule.mixin.scss", + "patterns": [ + { + "include": "#function_attributes" + } + ] + }, + { + "match": "(?<=@mixin)\\s+([\\w-]+)", + "captures": { + "1": { + "name": "entity.name.function.scss" + } + }, + "name": "meta.at-rule.mixin.scss" + }, + { + "match": "((@)mixin)\\b", + "captures": { + "1": { + "name": "keyword.control.at-rule.mixin.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "name": "meta.at-rule.mixin.scss" + } + ] + }, + "at_rule_namespace": { + "patterns": [ + { + "begin": "(?<=@namespace)\\s+(?=url)", + "end": "(?=;|$)", + "name": "meta.at-rule.namespace.scss", + "patterns": [ + { + "include": "#property_values" + }, + { + "include": "#string_single" + }, + { + "include": "#string_double" + } + ] + }, + { + "begin": "(?<=@namespace)\\s+([\\w-]*)", + "captures": { + "1": { + "name": "entity.name.namespace-prefix.scss" + } + }, + "end": "(?=;|$)", + "name": "meta.at-rule.namespace.scss", + "patterns": [ + { + "include": "#variables" + }, + { + "include": "#property_values" + }, + { + "include": "#string_single" + }, + { + "include": "#string_double" + } + ] + }, + { + "match": "((@)namespace)\\b", + "captures": { + "1": { + "name": "keyword.control.at-rule.namespace.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "name": "meta.at-rule.namespace.scss" + } + ] + }, + "at_rule_option": { + "captures": { + "1": { + "name": "keyword.control.at-rule.charset.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "match": "^\\s*((@)option\\b)\\s*", + "name": "meta.at-rule.option.scss" + }, + "at_rule_page": { + "patterns": [ + { + "begin": "^\\s*((@)page)(?=:|\\s)\\s*([-:\\w]*)", + "captures": { + "1": { + "name": "keyword.control.at-rule.page.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + }, + "3": { + "name": "entity.name.function.scss" + } + }, + "end": "\\s*(?={)", + "name": "meta.at-rule.page.scss" + } + ] + }, + "at_rule_return": { + "begin": "\\s*((@)(return)\\b)", + "captures": { + "1": { + "name": "keyword.control.return.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "end": "\\s*((?=;))", + "name": "meta.at-rule.return.scss", + "patterns": [ + { + "include": "#variable" + }, + { + "include": "#property_values" + } + ] + }, + "at_rule_at_root": { + "begin": "\\s*((@)(at-root))(\\s+|$)", + "end": "\\s*(?={)", + "beginCaptures": { + "1": { + "name": "keyword.control.at-rule.at-root.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "name": "meta.at-rule.at-root.scss", + "patterns": [ + { + "include": "#function_attributes" + }, + { + "include": "#functions" + }, + { + "include": "#selectors" + } + ] + }, + "at_rule_supports": { + "begin": "(?<=^|\\s)(@)supports\\b", + "captures": { + "0": { + "name": "keyword.control.at-rule.supports.scss" + }, + "1": { + "name": "punctuation.definition.keyword.scss" + } + }, + "end": "(?={)|$", + "name": "meta.at-rule.supports.scss", + "patterns": [ + { + "include": "#logical_operators" + }, + { + "include": "#properties" + }, + { + "match": "\\(", + "name": "punctuation.definition.condition.begin.bracket.round.scss" + }, + { + "match": "\\)", + "name": "punctuation.definition.condition.end.bracket.round.scss" + } + ] + }, + "at_rule_use": { + "begin": "\\s*((@)use\\b)\\s*", + "captures": { + "1": { + "name": "keyword.control.at-rule.use.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "end": "\\s*(?=;)", + "name": "meta.at-rule.use.scss", + "patterns": [ + { + "match": "\\b(as|with)\\b", + "name": "keyword.control.operator" + }, + { + "match": "\\b[\\w-]+\\b", + "name": "variable.scss" + }, + { + "match": "\\*", + "name": "variable.language.expanded-namespace.scss" + }, + { + "include": "#string_single" + }, + { + "include": "#string_double" + }, + { + "include": "#comment_line" + }, + { + "include": "#comment_block" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.parameters.begin.bracket.round.scss" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.scss" + } + }, + "patterns": [ + { + "include": "#function_attributes" + } + ] + } + ] + }, + "at_rule_warn": { + "begin": "\\s*((@)(warn|debug|error)\\b)\\s*", + "captures": { + "1": { + "name": "keyword.control.warn.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "end": "\\s*(?=;)", + "name": "meta.at-rule.warn.scss", + "patterns": [ + { + "include": "#variable" + }, + { + "include": "#string_double" + }, + { + "include": "#string_single" + } + ] + }, + "at_rule_while": { + "begin": "\\s*((@)while\\b)\\s*", + "captures": { + "1": { + "name": "keyword.control.while.scss" + }, + "2": { + "name": "punctuation.definition.keyword.scss" + } + }, + "end": "\\s*(?=})", + "name": "meta.at-rule.while.scss", + "patterns": [ + { + "include": "#conditional_operators" + }, + { + "include": "#variable" + }, + { + "include": "#property_values" + }, + { + "include": "$self" + } + ] + }, + "comment_docblock": { + "name": "comment.block.documentation.scss", + "begin": "///", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.scss" + } + }, + "end": "(?=$)", + "patterns": [ + { + "include": "source.sassdoc" + } + ] + }, + "comment_block": { + "begin": "/\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.scss" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.scss" + } + }, + "name": "comment.block.scss" + }, + "comment_line": { + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.scss" + } + }, + "end": "\\n", + "name": "comment.line.scss" + }, + "constant_default": { + "match": "!default", + "name": "keyword.other.default.scss" + }, + "constant_functions": { + "begin": "(?:([\\w-]+)(\\.))?([\\w-]+)(\\()", + "beginCaptures": { + "1": { + "name": "variable.scss" + }, + "2": { + "name": "punctuation.access.module.scss" + }, + "3": { + "name": "support.function.misc.scss" + }, + "4": { + "name": "punctuation.section.function.scss" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.function.scss" + } + }, + "patterns": [ + { + "include": "#parameters" + } + ] + }, + "constant_important": { + "match": "!important", + "name": "keyword.other.important.scss" + }, + "constant_mathematical_symbols": { + "match": "\\b(\\+|-|\\*|/)\\b", + "name": "support.constant.mathematical-symbols.scss" + }, + "constant_optional": { + "match": "!optional", + "name": "keyword.other.optional.scss" + }, + "constant_sass_functions": { + "begin": "(headings|stylesheet-url|rgba?|hsla?|ie-hex-str|red|green|blue|alpha|opacity|hue|saturation|lightness|prefixed|prefix|-moz|-svg|-css2|-pie|-webkit|-ms|font-(?:files|url)|grid-image|image-(?:width|height|url|color)|sprites?|sprite-(?:map|map-name|file|url|position)|inline-(?:font-files|image)|opposite-position|grad-point|grad-end-position|color-stops|color-stops-in-percentages|grad-color-stops|(?:radial|linear)-(?:gradient|svg-gradient)|opacify|fade-?in|transparentize|fade-?out|lighten|darken|saturate|desaturate|grayscale|adjust-(?:hue|lightness|saturation|color)|scale-(?:lightness|saturation|color)|change-color|spin|complement|invert|mix|-compass-(?:list|space-list|slice|nth|list-size)|blank|compact|nth|first-value-of|join|length|append|nest|append-selector|headers|enumerate|range|percentage|unitless|unit|if|type-of|comparable|elements-of-type|quote|unquote|escape|e|sin|cos|tan|abs|round|ceil|floor|pi|translate(?:X|Y))(\\()", + "beginCaptures": { + "1": { + "name": "support.function.misc.scss" + }, + "2": { + "name": "punctuation.section.function.scss" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.function.scss" + } + }, + "patterns": [ + { + "include": "#parameters" + } + ] + }, + "flow_control": { + "patterns": [ + { + "include": "#at_rule_if" + }, + { + "include": "#at_rule_else" + }, + { + "include": "#at_rule_warn" + }, + { + "include": "#at_rule_for" + }, + { + "include": "#at_rule_while" + }, + { + "include": "#at_rule_each" + }, + { + "include": "#at_rule_return" + } + ] + }, + "function_attributes": { + "patterns": [ + { + "match": ":", + "name": "punctuation.separator.key-value.scss" + }, + { + "include": "#general" + }, + { + "include": "#property_values" + }, + { + "match": "[={}\\?;@]", + "name": "invalid.illegal.scss" + } + ] + }, + "functions": { + "patterns": [ + { + "begin": "([\\w-]{1,})(\\()\\s*", + "beginCaptures": { + "1": { + "name": "support.function.misc.scss" + }, + "2": { + "name": "punctuation.section.function.scss" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.function.scss" + } + }, + "patterns": [ + { + "include": "#parameters" + } + ] + }, + { + "match": "([\\w-]{1,})", + "name": "support.function.misc.scss" + } + ] + }, + "general": { + "patterns": [ + { + "include": "#variable" + }, + { + "include": "#comment_docblock" + }, + { + "include": "#comment_block" + }, + { + "include": "#comment_line" + } + ] + }, + "interpolation": { + "begin": "#{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.interpolation.begin.bracket.curly.scss" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.interpolation.end.bracket.curly.scss" + } + }, + "name": "variable.interpolation.scss", + "patterns": [ + { + "include": "#variable" + }, + { + "include": "#property_values" + } + ] + }, + "conditional_operators": { + "patterns": [ + { + "include": "#comparison_operators" + }, + { + "include": "#logical_operators" + } + ] + }, + "comparison_operators": { + "match": "==|!=|<=|>=|<|>", + "name": "keyword.operator.comparison.scss" + }, + "logical_operators": { + "match": "\\b(not|or|and)\\b", + "name": "keyword.operator.logical.scss" + }, + "map": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.map.begin.bracket.round.scss" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.map.end.bracket.round.scss" + } + }, + "name": "meta.definition.variable.map.scss", + "patterns": [ + { + "include": "#comment_docblock" + }, + { + "include": "#comment_block" + }, + { + "include": "#comment_line" + }, + { + "match": "\\b([\\w-]+)\\s*(:)", + "captures": { + "1": { + "name": "support.type.map.key.scss" + }, + "2": { + "name": "punctuation.separator.key-value.scss" + } + } + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.scss" + }, + { + "include": "#map" + }, + { + "include": "#variable" + }, + { + "include": "#property_values" + } + ] + }, + "operators": { + "match": "[-+*/](?!\\s*[-+*/])", + "name": "keyword.operator.css" + }, + "parameters": { + "patterns": [ + { + "include": "#variable" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.begin.bracket.round.scss" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.end.bracket.round.scss" + } + }, + "patterns": [ + { + "include": "#function_attributes" + } + ] + }, + { + "include": "#property_values" + }, + { + "include": "#comment_block" + }, + { + "match": "[^'\",) \\t]+", + "name": "variable.parameter.url.scss" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.scss" + } + ] + }, + "properties": { + "patterns": [ + { + "begin": "(?<![-a-z])(?=[-a-z])", + "end": "$|(?![-a-z])", + "name": "meta.property-name.scss", + "patterns": [ + { + "include": "source.css#property-names" + }, + { + "include": "#at_rule_include" + } + ] + }, + { + "begin": "(:)\\s*(?!(\\s*{))", + "beginCaptures": { + "1": { + "name": "punctuation.separator.key-value.scss" + } + }, + "end": "\\s*(;|(?=}|\\)))", + "endCaptures": { + "1": { + "name": "punctuation.terminator.rule.scss" + } + }, + "contentName": "meta.property-value.scss", + "patterns": [ + { + "include": "#general" + }, + { + "include": "#property_values" + } + ] + } + ] + }, + "property_list": { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.property-list.begin.bracket.curly.scss" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.property-list.end.bracket.curly.scss" + } + }, + "name": "meta.property-list.scss", + "patterns": [ + { + "include": "#flow_control" + }, + { + "include": "#rules" + }, + { + "include": "#properties" + }, + { + "include": "$self" + } + ] + }, + "property_values": { + "patterns": [ + { + "include": "#string_single" + }, + { + "include": "#string_double" + }, + { + "include": "#constant_functions" + }, + { + "include": "#constant_sass_functions" + }, + { + "include": "#constant_important" + }, + { + "include": "#constant_default" + }, + { + "include": "#constant_optional" + }, + { + "include": "source.css#numeric-values" + }, + { + "include": "source.css#property-keywords" + }, + { + "include": "source.css#color-keywords" + }, + { + "include": "source.css#property-names" + }, + { + "include": "#constant_mathematical_symbols" + }, + { + "include": "#operators" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.begin.bracket.round.scss" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.end.bracket.round.scss" + } + }, + "patterns": [ + { + "include": "#general" + }, + { + "include": "#property_values" + } + ] + } + ] + }, + "rules": { + "patterns": [ + { + "include": "#general" + }, + { + "include": "#at_rule_extend" + }, + { + "include": "#at_rule_content" + }, + { + "include": "#at_rule_include" + }, + { + "include": "#at_rule_media" + }, + { + "include": "#selectors" + } + ] + }, + "selector_attribute": { + "match": "(?xi)\n(\\[)\n\\s*\n(\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+?\n)\n(?:\n \\s*([~|^$*]?=)\\s*\n (?:\n (\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n )\n |\n ((\")(.*?)(\"))\n |\n ((')(.*?)('))\n )\n)?\n\\s*\n(\\])", + "name": "meta.attribute-selector.scss", + "captures": { + "1": { + "name": "punctuation.definition.attribute-selector.begin.bracket.square.scss" + }, + "2": { + "name": "entity.other.attribute-name.attribute.scss", + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\\\([0-9a-fA-F]{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "match": "\\$|}", + "name": "invalid.illegal.scss" + } + ] + }, + "3": { + "name": "keyword.operator.scss" + }, + "4": { + "name": "string.unquoted.attribute-value.scss", + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\\\([0-9a-fA-F]{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "match": "\\$|}", + "name": "invalid.illegal.scss" + } + ] + }, + "5": { + "name": "string.quoted.double.attribute-value.scss" + }, + "6": { + "name": "punctuation.definition.string.begin.scss" + }, + "7": { + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\\\([0-9a-fA-F]{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "match": "\\$|}", + "name": "invalid.illegal.scss" + } + ] + }, + "8": { + "name": "punctuation.definition.string.end.scss" + }, + "9": { + "name": "string.quoted.single.attribute-value.scss" + }, + "10": { + "name": "punctuation.definition.string.begin.scss" + }, + "11": { + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\\\([0-9a-fA-F]{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "match": "\\$|}", + "name": "invalid.illegal.scss" + } + ] + }, + "12": { + "name": "punctuation.definition.string.end.scss" + }, + "13": { + "name": "punctuation.definition.attribute-selector.end.bracket.square.scss" + } + } + }, + "selector_class": { + "match": "(?x)\n(\\.) # Valid class-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n | ; # - A semicolon\n)", + "name": "entity.other.attribute-name.class.css", + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + }, + "2": { + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\\\([0-9a-fA-F]{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "match": "\\$|}", + "name": "invalid.illegal.scss" + } + ] + } + } + }, + "selector_custom": { + "match": "\\b([a-zA-Z0-9]+(-[a-zA-Z0-9]+)+)(?=\\.|\\s++[^:]|\\s*[,\\[{]|:(link|visited|hover|active|focus|target|lang|disabled|enabled|checked|indeterminate|root|nth-(child|last-child|of-type|last-of-type)|first-child|last-child|first-of-type|last-of-type|only-child|only-of-type|empty|not|valid|invalid)(\\([0-9A-Za-z]*\\))?)", + "name": "entity.name.tag.custom.scss" + }, + "selector_id": { + "match": "(?x)\n(\\#) # Valid id-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n)", + "name": "entity.other.attribute-name.id.css", + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + }, + "2": { + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\\\([0-9a-fA-F]{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "match": "\\$|}", + "name": "invalid.illegal.identifier.scss" + } + ] + } + } + }, + "selector_placeholder": { + "match": "(?x)\n(%) # Valid placeholder-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.\\$ # Possible start of interpolation module scope variable\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= ; # - End of statement\n | $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n)", + "name": "entity.other.attribute-name.placeholder.css", + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + }, + "2": { + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\\\([0-9a-fA-F]{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "match": "\\$|}", + "name": "invalid.illegal.identifier.scss" + } + ] + } + } + }, + "parent_selector_suffix": { + "match": "(?x)\n(?<=&)\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)", + "name": "entity.other.attribute-name.parent-selector-suffix.css", + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + }, + "2": { + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\\\([0-9a-fA-F]{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "match": "\\$|}", + "name": "invalid.illegal.identifier.scss" + } + ] + } + } + }, + "selector_pseudo_class": { + "patterns": [ + { + "begin": "((:)\\bnth-(?:child|last-child|of-type|last-of-type))(\\()", + "beginCaptures": { + "1": { + "name": "entity.other.attribute-name.pseudo-class.css" + }, + "2": { + "name": "punctuation.definition.entity.css" + }, + "3": { + "name": "punctuation.definition.pseudo-class.begin.bracket.round.css" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.pseudo-class.end.bracket.round.css" + } + }, + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\d+", + "name": "constant.numeric.css" + }, + { + "match": "(?<=\\d)n\\b|\\b(n|even|odd)\\b", + "name": "constant.other.scss" + }, + { + "match": "\\w+", + "name": "invalid.illegal.scss" + } + ] + }, + { + "include": "source.css#pseudo-classes" + }, + { + "include": "source.css#pseudo-elements" + }, + { + "include": "source.css#functional-pseudo-classes" + } + ] + }, + "selectors": { + "patterns": [ + { + "include": "source.css#tag-names" + }, + { + "include": "#selector_custom" + }, + { + "include": "#selector_class" + }, + { + "include": "#selector_id" + }, + { + "include": "#selector_pseudo_class" + }, + { + "include": "#tag_wildcard" + }, + { + "include": "#tag_parent_reference" + }, + { + "include": "source.css#pseudo-elements" + }, + { + "include": "#selector_attribute" + }, + { + "include": "#selector_placeholder" + }, + { + "include": "#parent_selector_suffix" + } + ] + }, + "string_double": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.scss" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.scss" + } + }, + "name": "string.quoted.double.scss", + "patterns": [ + { + "match": "\\\\(\\h{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "include": "#interpolation" + } + ] + }, + "string_single": { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.scss" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.scss" + } + }, + "name": "string.quoted.single.scss", + "patterns": [ + { + "match": "\\\\(\\h{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "include": "#interpolation" + } + ] + }, + "tag_parent_reference": { + "match": "&", + "name": "entity.name.tag.reference.scss" + }, + "tag_wildcard": { + "match": "\\*", + "name": "entity.name.tag.wildcard.scss" + }, + "variable": { + "patterns": [ + { + "include": "#variables" + }, + { + "include": "#interpolation" + } + ] + }, + "variable_setting": { + "begin": "(?=\\$[\\w-]+\\s*:)", + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.terminator.rule.scss" + } + }, + "contentName": "meta.definition.variable.scss", + "patterns": [ + { + "match": "\\$[\\w-]+(?=\\s*:)", + "name": "variable.scss" + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.key-value.scss" + } + }, + "end": "(?=;)", + "patterns": [ + { + "include": "#comment_docblock" + }, + { + "include": "#comment_block" + }, + { + "include": "#comment_line" + }, + { + "include": "#map" + }, + { + "include": "#property_values" + }, + { + "include": "#variable" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.scss" + } + ] + } + ] + }, + "variables": { + "patterns": [ + { + "match": "\\b([\\w-]+)(\\.)(\\$[\\w-]+)\\b", + "captures": { + "1": { + "name": "variable.scss" + }, + "2": { + "name": "punctuation.access.module.scss" + }, + "3": { + "name": "variable.scss" + } + } + }, + { + "match": "(\\$|\\-\\-)[A-Za-z0-9_-]+\\b", + "name": "variable.scss" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/shaderlab.tmLanguage.json b/src/lib/shiki/languages/shaderlab.tmLanguage.json new file mode 100644 index 0000000..5913b10 --- /dev/null +++ b/src/lib/shiki/languages/shaderlab.tmLanguage.json @@ -0,0 +1,204 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/tgjones/shaders-tmLanguage/blob/master/grammars/shaderlab.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/tgjones/shaders-tmLanguage/commit/c72c8b39380ba5a86c58ceed053b5d965ebf38b3", + "name": "shaderlab", + "scopeName": "source.shaderlab", + "patterns": [ + { + "name": "comment.line.double-slash.shaderlab", + "begin": "//", + "end": "$" + }, + { + "name": "support.type.basic.shaderlab", + "match": "\\b(?i:Range|Float|Int|Color|Vector|2D|3D|Cube|Any)\\b" + }, + { + "include": "#numbers" + }, + { + "name": "storage.type.structure.shaderlab", + "match": "\\b(?i:Shader|Properties|SubShader|Pass|Category)\\b" + }, + { + "name": "support.type.propertyname.shaderlab", + "match": "\\b(?i:Name|Tags|Fallback|CustomEditor|Cull|ZWrite|ZTest|Offset|Blend|BlendOp|ColorMask|AlphaToMask|LOD|Lighting|Stencil|Ref|ReadMask|WriteMask|Comp|CompBack|CompFront|Fail|ZFail|UsePass|GrabPass|Dependency|Material|Diffuse|Ambient|Shininess|Specular|Emission|Fog|Mode|Density|SeparateSpecular|SetTexture|Combine|ConstantColor|Matrix|AlphaTest|ColorMaterial|BindChannels|Bind)\\b" + }, + { + "name": "support.constant.property-value.shaderlab", + "match": "\\b(?i:Back|Front|On|Off|[RGBA]{1,3}|AmbientAndDiffuse|Emission)\\b" + }, + { + "name": "support.constant.property-value.comparisonfunction.shaderlab", + "match": "\\b(?i:Less|Greater|LEqual|GEqual|Equal|NotEqual|Always|Never)\\b" + }, + { + "name": "support.constant.property-value.stenciloperation.shaderlab", + "match": "\\b(?i:Keep|Zero|Replace|IncrSat|DecrSat|Invert|IncrWrap|DecrWrap)\\b" + }, + { + "name": "support.constant.property-value.texturecombiners.shaderlab", + "match": "\\b(?i:Previous|Primary|Texture|Constant|Lerp|Double|Quad|Alpha)\\b" + }, + { + "name": "support.constant.property-value.fog.shaderlab", + "match": "\\b(?i:Global|Linear|Exp2|Exp)\\b" + }, + { + "name": "support.constant.property-value.bindchannels.shaderlab", + "match": "\\b(?i:Vertex|Normal|Tangent|TexCoord0|TexCoord1)\\b" + }, + { + "name": "support.constant.property-value.blendoperations.shaderlab", + "match": "\\b(?i:Add|Sub|RevSub|Min|Max|LogicalClear|LogicalSet|LogicalCopyInverted|LogicalCopy|LogicalNoop|LogicalInvert|LogicalAnd|LogicalNand|LogicalOr|LogicalNor|LogicalXor|LogicalEquiv|LogicalAndReverse|LogicalAndInverted|LogicalOrReverse|LogicalOrInverted)\\b" + }, + { + "name": "support.constant.property-value.blendfactors.shaderlab", + "match": "\\b(?i:One|Zero|SrcColor|SrcAlpha|DstColor|DstAlpha|OneMinusSrcColor|OneMinusSrcAlpha|OneMinusDstColor|OneMinusDstAlpha)\\b" + }, + { + "name": "support.variable.reference.shaderlab", + "match": "\\[([a-zA-Z_][a-zA-Z0-9_]*)\\](?!\\s*[a-zA-Z_][a-zA-Z0-9_]*\\s*\\(\")" + }, + { + "name": "meta.attribute.shaderlab", + "begin": "(\\[)", + "end": "(\\])", + "patterns": [ + { + "name": "support.type.attributename.shaderlab", + "match": "\\G([a-zA-Z]+)\\b" + }, + { + "include": "#numbers" + } + ] + }, + { + "name": "support.variable.declaration.shaderlab", + "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\(" + }, + { + "name": "meta.cgblock", + "begin": "\\b(CGPROGRAM|CGINCLUDE)\\b", + "beginCaptures": { + "1": { + "name": "keyword.other" + } + }, + "end": "\\b(ENDCG)\\b", + "endCaptures": { + "1": { + "name": "keyword.other" + } + }, + "patterns": [ + { + "include": "#hlsl-embedded" + } + ] + }, + { + "name": "meta.hlslblock", + "begin": "\\b(HLSLPROGRAM|HLSLINCLUDE)\\b", + "beginCaptures": { + "1": { + "name": "keyword.other" + } + }, + "end": "\\b(ENDHLSL)\\b", + "endCaptures": { + "1": { + "name": "keyword.other" + } + }, + "patterns": [ + { + "include": "#hlsl-embedded" + } + ] + }, + { + "name": "string.quoted.double.shaderlab", + "begin": "\"", + "end": "\"" + } + ], + "repository": { + "numbers": { + "patterns": [ + { + "name": "constant.numeric.shaderlab", + "match": "\\b([0-9]+\\.?[0-9]*)\\b" + } + ] + }, + "hlsl-embedded": { + "patterns": [ + { + "include": "source.hlsl" + }, + { + "name": "storage.type.basic.shaderlab", + "match": "\\b(fixed([1-4](x[1-4])?)?)\\b" + }, + { + "name": "support.variable.transformations.shaderlab", + "match": "\\b(UNITY_MATRIX_MVP|UNITY_MATRIX_MV|UNITY_MATRIX_M|UNITY_MATRIX_V|UNITY_MATRIX_P|UNITY_MATRIX_VP|UNITY_MATRIX_T_MV|UNITY_MATRIX_I_V|UNITY_MATRIX_IT_MV|_Object2World|_World2Object|unity_ObjectToWorld|unity_WorldToObject)\\b" + }, + { + "name": "support.variable.camera.shaderlab", + "match": "\\b(_WorldSpaceCameraPos|_ProjectionParams|_ScreenParams|_ZBufferParams|unity_OrthoParams|unity_CameraProjection|unity_CameraInvProjection|unity_CameraWorldClipPlanes)\\b" + }, + { + "name": "support.variable.time.shaderlab", + "match": "\\b(_Time|_SinTime|_CosTime|unity_DeltaTime)\\b" + }, + { + "name": "support.variable.lighting.shaderlab", + "match": "\\b(_LightColor0|_WorldSpaceLightPos0|_LightMatrix0|unity_4LightPosX0|unity_4LightPosY0|unity_4LightPosZ0|unity_4LightAtten0|unity_LightColor|_LightColor|unity_LightPosition|unity_LightAtten|unity_SpotDirection)\\b" + }, + { + "name": "support.variable.fog.shaderlab", + "match": "\\b(unity_AmbientSky|unity_AmbientEquator|unity_AmbientGround|UNITY_LIGHTMODEL_AMBIENT|unity_FogColor|unity_FogParams)\\b" + }, + { + "name": "support.variable.various.shaderlab", + "match": "\\b(unity_LODFade)\\b" + }, + { + "name": "support.variable.preprocessor.targetplatform.shaderlab", + "match": "\\b(SHADER_API_D3D9|SHADER_API_D3D11|SHADER_API_GLCORE|SHADER_API_OPENGL|SHADER_API_GLES|SHADER_API_GLES3|SHADER_API_METAL|SHADER_API_D3D11_9X|SHADER_API_PSSL|SHADER_API_XBOXONE|SHADER_API_PSP2|SHADER_API_WIIU|SHADER_API_MOBILE|SHADER_API_GLSL)\\b" + }, + { + "name": "support.variable.preprocessor.targetmodel.shaderlab", + "match": "\\b(SHADER_TARGET)\\b" + }, + { + "name": "support.variable.preprocessor.unityversion.shaderlab", + "match": "\\b(UNITY_VERSION)\\b" + }, + { + "name": "support.variable.preprocessor.platformdifference.shaderlab", + "match": "\\b(UNITY_BRANCH|UNITY_FLATTEN|UNITY_NO_SCREENSPACE_SHADOWS|UNITY_NO_LINEAR_COLORSPACE|UNITY_NO_RGBM|UNITY_NO_DXT5nm|UNITY_FRAMEBUFFER_FETCH_AVAILABLE|UNITY_USE_RGBA_FOR_POINT_SHADOWS|UNITY_ATTEN_CHANNEL|UNITY_HALF_TEXEL_OFFSET|UNITY_UV_STARTS_AT_TOP|UNITY_MIGHT_NOT_HAVE_DEPTH_Texture|UNITY_NEAR_CLIP_VALUE|UNITY_VPOS_TYPE|UNITY_CAN_COMPILE_TESSELLATION|UNITY_COMPILER_HLSL|UNITY_COMPILER_HLSL2GLSL|UNITY_COMPILER_CG|UNITY_REVERSED_Z)\\b" + }, + { + "name": "support.variable.preprocessor.texture2D.shaderlab", + "match": "\\b(UNITY_PASS_FORWARDBASE|UNITY_PASS_FORWARDADD|UNITY_PASS_DEFERRED|UNITY_PASS_SHADOWCASTER|UNITY_PASS_PREPASSBASE|UNITY_PASS_PREPASSFINAL)\\b" + }, + { + "name": "support.class.structures.shaderlab", + "match": "\\b(appdata_base|appdata_tan|appdata_full|appdata_img)\\b" + }, + { + "name": "support.class.surface.shaderlab", + "match": "\\b(SurfaceOutputStandardSpecular|SurfaceOutputStandard|SurfaceOutput|Input)\\b" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/shellscript.tmLanguage.json b/src/lib/shiki/languages/shellscript.tmLanguage.json new file mode 100644 index 0000000..70fa52a --- /dev/null +++ b/src/lib/shiki/languages/shellscript.tmLanguage.json @@ -0,0 +1,2009 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/jeff-hykin/better-shell-syntax/blob/master/autogenerated/shell.tmLanguage.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/jeff-hykin/better-shell-syntax/commit/ce62ea59e8e522f8a07d8d8a2d1f992c6c600b91", + "name": "shellscript", + "scopeName": "source.shell", + "patterns": [ + { + "include": "#initial_context" + } + ], + "repository": { + "alias_statement": { + "begin": "(alias)[ \\t]*+[ \\t]*+(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))[ \\t]*+)?((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?:(\\[)((?:(?:(?:\\$)?(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)|@)|\\*))(\\]))?(?:(?:(\\=)|(\\+\\=))|(\\-\\=))", + "end": "(?:(?= |\\t|$)|(?:(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))|\\n))", + "beginCaptures": { + "1": { + "name": "storage.type.alias.shell" + }, + "2": { + "name": "storage.modifier.$2.shell" + }, + "3": { + "name": "variable.other.assignment.shell" + }, + "4": { + "name": "punctuation.definition.array.access.shell" + }, + "5": { + "name": "variable.other.assignment.shell" + }, + "6": { + "name": "punctuation.definition.array.access.shell" + }, + "7": { + "name": "keyword.operator.assignment.shell" + }, + "8": { + "name": "keyword.operator.assignment.compound.shell" + }, + "9": { + "name": "keyword.operator.assignment.compound.shell" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.terminator.statement.semicolon.shell" + }, + "2": { + "name": "punctuation.separator.statement.and.shell" + }, + "3": { + "name": "punctuation.separator.statement.or.shell" + }, + "4": { + "name": "punctuation.separator.statement.background.shell" + } + }, + "name": "meta.expression.assignment.shell", + "patterns": [ + { + "include": "#normal_statement_context" + } + ] + }, + "argument": { + "begin": "[ \\t]++(?!(?:&|\\||\\(|\\[|#|\\n|$|;))", + "end": "(?= |\\t|;|\\||&|$|\\n|\\)|\\`)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.argument.shell", + "patterns": [ + { + "include": "#argument_context" + }, + { + "include": "#line_continuation" + } + ] + }, + "argument_context": { + "patterns": [ + { + "match": "[ \\t]*+([^ \t\n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>))", + "captures": { + "1": { + "name": "string.unquoted.argument.shell", + "patterns": [ + { + "match": "\\*", + "name": "variable.language.special.wildcard.shell" + }, + { + "include": "#variable" + }, + { + "include": "#numeric_literal" + }, + { + "match": "(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)", + "captures": { + "1": { + "name": "constant.language.$1.shell" + } + } + } + ] + } + } + }, + { + "include": "#normal_statement_context" + } + ] + }, + "assignment": { + "patterns": [ + { + "begin": "[ \\t]*+(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))[ \\t]*+)?((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?:(\\[)((?:(?:(?:\\$)?(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)|@)|\\*))(\\]))?(?:(?:(\\=)|(\\+\\=))|(\\-\\=))[ \\t]*+(\\()", + "end": "\\)", + "beginCaptures": { + "1": { + "name": "storage.modifier.$1.shell" + }, + "2": { + "name": "variable.other.assignment.shell" + }, + "3": { + "name": "punctuation.definition.array.access.shell" + }, + "4": { + "name": "variable.other.assignment.shell" + }, + "5": { + "name": "punctuation.definition.array.access.shell" + }, + "6": { + "name": "keyword.operator.assignment.shell" + }, + "7": { + "name": "keyword.operator.assignment.compound.shell" + }, + "8": { + "name": "keyword.operator.assignment.compound.shell" + }, + "9": { + "name": "punctuation.shell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.shell" + } + }, + "name": "meta.expression.assignment.shell", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#argument_context" + } + ] + }, + { + "begin": "[ \\t]*+(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))[ \\t]*+)?((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?:(\\[)((?:(?:(?:\\$)?(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)|@)|\\*))(\\]))?(?:(?:(\\=)|(\\+\\=))|(\\-\\=))", + "end": "(?:(?= |\\t|$)|(?:(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))|\\n))", + "beginCaptures": { + "1": { + "name": "storage.modifier.$1.shell" + }, + "2": { + "name": "variable.other.assignment.shell" + }, + "3": { + "name": "punctuation.definition.array.access.shell" + }, + "4": { + "name": "variable.other.assignment.shell" + }, + "5": { + "name": "punctuation.definition.array.access.shell" + }, + "6": { + "name": "keyword.operator.assignment.shell" + }, + "7": { + "name": "keyword.operator.assignment.compound.shell" + }, + "8": { + "name": "keyword.operator.assignment.compound.shell" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.terminator.statement.semicolon.shell" + }, + "2": { + "name": "punctuation.separator.statement.and.shell" + }, + "3": { + "name": "punctuation.separator.statement.or.shell" + }, + "4": { + "name": "punctuation.separator.statement.background.shell" + } + }, + "name": "meta.expression.assignment.shell", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#argument_context" + } + ] + } + ] + }, + "basic_command_name": { + "match": "(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))|((?!\"|'|\\\\\\n?$)[^!'\" \\t\\n\\r]+?))(?:(?= |\\t)|(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\))", + "captures": { + "1": { + "name": "storage.modifier.$1.shell" + }, + "2": { + "name": "entity.name.function.call.shell entity.name.command.shell", + "patterns": [ + { + "match": "(?<!\\w)(?:continue|return|break)(?!\\w)", + "name": "keyword.control.$0.shell" + }, + { + "match": "(?<!\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|:|\\.)(?!\\/)(?!\\w)", + "name": "support.function.builtin.shell" + }, + { + "include": "#variable" + } + ] + } + }, + "name": "meta.statement.command.name.basic.shell" + }, + "block_comment": { + "begin": "\\s*+(\\/\\*)", + "end": "\\*\\/", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.begin.shell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.shell" + } + }, + "name": "comment.block.shell" + }, + "boolean": { + "match": "\\b(?:true|false)\\b", + "name": "constant.language.$0.shell" + }, + "case-clause": { + "patterns": [ + { + "begin": "(?=\\S)", + "end": ";;", + "endCaptures": { + "0": { + "name": "punctuation.terminator.case-clause.shell" + } + }, + "name": "meta.scope.case-clause.shell", + "patterns": [ + { + "begin": "\\(|(?=\\S)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.case-pattern.shell" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.case-pattern.shell" + } + }, + "name": "meta.scope.case-pattern.shell", + "patterns": [ + { + "match": "\\|", + "name": "punctuation.separator.pipe-sign.shell" + }, + { + "include": "#string" + }, + { + "include": "#variable" + }, + { + "include": "#interpolation" + }, + { + "include": "#pathname" + } + ] + }, + { + "begin": "(?<=\\))", + "end": "(?=;;)", + "name": "meta.scope.case-clause-body.shell", + "patterns": [ + { + "include": "#initial_context" + } + ] + } + ] + } + ] + }, + "comment": { + "match": "(?:^|[ \\t]++)(?:((#!).*)|((#).*))", + "captures": { + "1": { + "name": "comment.line.number-sign.shell meta.shebang.shell" + }, + "2": { + "name": "punctuation.definition.comment.shebang.shell" + }, + "3": { + "name": "comment.line.number-sign.shell" + }, + "4": { + "name": "punctuation.definition.comment.shell" + } + } + }, + "comments": { + "patterns": [ + { + "include": "#block_comment" + }, + { + "include": "#line_comment" + } + ] + }, + "compound-command": { + "patterns": [ + { + "begin": "\\[{1,2}", + "beginCaptures": { + "0": { + "name": "punctuation.definition.logical-expression.shell" + } + }, + "end": "\\]{1,2}", + "endCaptures": { + "0": { + "name": "punctuation.definition.logical-expression.shell" + } + }, + "name": "meta.scope.logical-expression.shell", + "patterns": [ + { + "include": "#logical-expression" + }, + { + "include": "#initial_context" + } + ] + }, + { + "begin": "\\({2}", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.shell" + } + }, + "end": "\\){2}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.shell" + } + }, + "name": "string.other.math.shell", + "patterns": [ + { + "include": "#math" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.subshell.shell" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.subshell.shell" + } + }, + "name": "meta.scope.subshell.shell", + "patterns": [ + { + "include": "#initial_context" + } + ] + }, + { + "begin": "(?<=\\s|^){(?=\\s|$)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.group.shell" + } + }, + "end": "(?<=^|;)\\s*(})", + "endCaptures": { + "1": { + "name": "punctuation.definition.group.shell" + } + }, + "name": "meta.scope.group.shell", + "patterns": [ + { + "include": "#initial_context" + } + ] + } + ] + }, + "continuation_of_double_quoted_command_name": { + "begin": "\\G(?<=\")", + "end": "\"", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell" + } + }, + "contentName": "meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command", + "patterns": [ + { + "match": "\\\\[\\$\\n`\"\\\\]", + "name": "constant.character.escape.shell" + }, + { + "include": "#variable" + }, + { + "include": "#interpolation" + } + ] + }, + "continuation_of_single_quoted_command_name": { + "begin": "\\G(?<=')", + "end": "'", + "beginCaptures": {}, + "endCaptures": { + "0": { + "name": "string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell" + } + }, + "contentName": "meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command" + }, + "custom_command_names": { + "patterns": [] + }, + "custom_commands": { + "patterns": [] + }, + "double_quote_context": { + "patterns": [ + { + "match": "\\\\[\\$`\"\\\\\\n]", + "name": "constant.character.escape.shell" + }, + { + "include": "#variable" + }, + { + "include": "#interpolation" + } + ] + }, + "double_quote_escape_char": { + "match": "\\\\[\\$`\"\\\\\\n]", + "name": "constant.character.escape.shell" + }, + "function_definition": { + "begin": "[ \\t]*+(?:(\\bfunction\\b)[ \\t]*+([^ \\t\\n\\r\\(\\)=]+)(?:(\\()[ \\t]*+(\\)))?|([^ \\t\\n\\r\\(\\)=]+)[ \\t]*+(\\()[ \\t]*+(\\)))", + "end": "(?<=\\}|\\))", + "beginCaptures": { + "1": { + "name": "storage.type.function.shell" + }, + "2": { + "name": "entity.name.function.shell" + }, + "3": { + "name": "punctuation.definition.arguments.shell" + }, + "4": { + "name": "punctuation.definition.arguments.shell" + }, + "5": { + "name": "entity.name.function.shell" + }, + "6": { + "name": "punctuation.definition.arguments.shell" + }, + "7": { + "name": "punctuation.definition.arguments.shell" + } + }, + "endCaptures": {}, + "name": "meta.function.shell", + "patterns": [ + { + "match": "\\G(?:\\t| |\\n)" + }, + { + "begin": "\\{", + "end": "\\}", + "beginCaptures": { + "0": { + "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell" + } + }, + "name": "meta.function.body.shell", + "patterns": [ + { + "include": "#initial_context" + } + ] + }, + { + "begin": "\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell" + } + }, + "name": "meta.function.body.shell", + "patterns": [ + { + "include": "#initial_context" + } + ] + } + ], + "applyEndPatternLast": 1 + }, + "heredoc": { + "patterns": [ + { + "begin": "((?<!<)<<-)[ \\t]*+(\"|')[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|\"|')(?:\\2)(.*)", + "end": "^\\t*(?:\\3)(?=\\s|;|&|$)", + "beginCaptures": { + "1": { + "name": "keyword.operator.heredoc.shell" + }, + "2": {}, + "3": { + "name": "punctuation.definition.string.heredoc.shell" + }, + "4": { + "patterns": [ + { + "include": "#normal_statement_context" + } + ] + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.heredoc.shell" + } + }, + "contentName": "string.quoted.heredoc.indent", + "patterns": [] + }, + { + "begin": "((?<!<)<<(?!<))[ \\t]*+(\"|')[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|\"|')(?:\\2)(.*)", + "end": "^(?:\\3)(?=\\s|;|&|$)", + "beginCaptures": { + "1": { + "name": "keyword.operator.heredoc.shell" + }, + "2": {}, + "3": { + "name": "punctuation.definition.string.heredoc.shell" + }, + "4": { + "patterns": [ + { + "include": "#normal_statement_context" + } + ] + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.heredoc.shell" + } + }, + "contentName": "string.quoted.heredoc.no-indent", + "patterns": [] + }, + { + "begin": "((?<!<)<<-)[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|\"|')(.*)", + "end": "^\\t*(?:\\2)(?=\\s|;|&|$)", + "beginCaptures": { + "1": { + "name": "keyword.operator.heredoc.shell" + }, + "2": { + "name": "punctuation.definition.string.heredoc.shell" + }, + "3": { + "patterns": [ + { + "include": "#normal_statement_context" + } + ] + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.heredoc.shell" + } + }, + "contentName": "string.unquoted.heredoc.indent", + "patterns": [ + { + "include": "#double_quote_escape_char" + }, + { + "include": "#variable" + }, + { + "include": "#interpolation" + } + ] + }, + { + "begin": "((?<!<)<<(?!<))[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|\"|')(.*)", + "end": "^(?:\\2)(?=\\s|;|&|$)", + "beginCaptures": { + "1": { + "name": "keyword.operator.heredoc.shell" + }, + "2": { + "name": "punctuation.definition.string.heredoc.shell" + }, + "3": { + "patterns": [ + { + "include": "#normal_statement_context" + } + ] + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.heredoc.shell" + } + }, + "contentName": "string.unquoted.heredoc.no-indent", + "patterns": [ + { + "include": "#double_quote_escape_char" + }, + { + "include": "#variable" + }, + { + "include": "#interpolation" + } + ] + } + ] + }, + "herestring": { + "patterns": [ + { + "begin": "(<<<)\\s*(('))", + "beginCaptures": { + "1": { + "name": "keyword.operator.herestring.shell" + }, + "2": { + "name": "string.quoted.single.shell" + }, + "3": { + "name": "punctuation.definition.string.begin.shell" + } + }, + "end": "(')", + "endCaptures": { + "0": { + "name": "string.quoted.single.shell" + }, + "1": { + "name": "punctuation.definition.string.end.shell" + } + }, + "name": "meta.herestring.shell", + "contentName": "string.quoted.single.shell" + }, + { + "begin": "(<<<)\\s*((\"))", + "beginCaptures": { + "1": { + "name": "keyword.operator.herestring.shell" + }, + "2": { + "name": "string.quoted.double.shell" + }, + "3": { + "name": "punctuation.definition.string.begin.shell" + } + }, + "end": "(\")", + "endCaptures": { + "0": { + "name": "string.quoted.double.shell" + }, + "1": { + "name": "punctuation.definition.string.end.shell" + } + }, + "name": "meta.herestring.shell", + "contentName": "string.quoted.double.shell", + "patterns": [ + { + "include": "#double_quote_context" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.operator.herestring.shell" + }, + "2": { + "name": "string.unquoted.herestring.shell", + "patterns": [ + { + "include": "#initial_context" + } + ] + } + }, + "match": "(<<<)\\s*(([^\\s)\\\\]|\\\\.)+)", + "name": "meta.herestring.shell" + } + ] + }, + "initial_context": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#pipeline" + }, + { + "include": "#normal_statement_seperator" + }, + { + "include": "#logical_expression_double" + }, + { + "include": "#logical_expression_single" + }, + { + "include": "#misc_ranges" + }, + { + "include": "#loop" + }, + { + "include": "#function_definition" + }, + { + "include": "#variable" + }, + { + "include": "#interpolation" + }, + { + "include": "#heredoc" + }, + { + "include": "#herestring" + }, + { + "include": "#redirection" + }, + { + "include": "#pathname" + }, + { + "include": "#keyword" + }, + { + "include": "#alias_statement" + }, + { + "include": "#normal_statement" + }, + { + "include": "#string" + }, + { + "include": "#support" + } + ] + }, + "inline_comment": { + "match": "(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/))", + "captures": { + "1": { + "name": "comment.block.shell punctuation.definition.comment.begin.shell" + }, + "2": { + "name": "comment.block.shell" + }, + "3": { + "patterns": [ + { + "match": "\\*\\/", + "name": "comment.block.shell punctuation.definition.comment.end.shell" + }, + { + "match": "\\*", + "name": "comment.block.shell" + } + ] + } + } + }, + "interpolation": { + "patterns": [ + { + "begin": "\\$\\({2}", + "beginCaptures": { + "0": { + "name": "punctuation.definition.evaluation.arithmetic.begin.shell" + } + }, + "end": "\\)\\s*\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.evaluation.arithmetic.end.shell" + } + }, + "name": "string.other.math.shell", + "patterns": [ + { + "include": "#math" + } + ] + }, + { + "begin": "`", + "beginCaptures": { + "0": { + "name": "punctuation.definition.evaluation.backticks.shell" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "punctuation.definition.evaluation.backticks.shell" + } + }, + "name": "string.interpolated.backtick.shell", + "patterns": [ + { + "match": "\\\\[`\\\\$]", + "name": "constant.character.escape.shell" + }, + { + "begin": "(?<=\\W)(?=#)(?!#{)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.shell" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.shell" + } + }, + "end": "(?=`)", + "name": "comment.line.number-sign.shell" + } + ] + }, + { + "include": "#initial_context" + } + ] + }, + { + "begin": "\\$\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.evaluation.parens.begin.shell" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.evaluation.parens.end.shell" + } + }, + "name": "string.interpolated.dollar.shell", + "patterns": [ + { + "include": "#initial_context" + } + ] + } + ] + }, + "keyword": { + "patterns": [ + { + "match": "(?<=^|;|&| |\\t)(?:continue|foreach|return|select|repeat|break|until|while|case|done|elif|else|esac|then|for|end|do|if|fi|in)(?= |\\t|;|&|$)", + "name": "keyword.control.$0.shell" + } + ] + }, + "line_comment": { + "begin": "\\s*+(\\/\\/)", + "end": "(?<=\\n)(?<!\\\\\\n)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.shell" + } + }, + "endCaptures": {}, + "name": "comment.line.double-slash.shell", + "patterns": [ + { + "include": "#line_continuation_character" + } + ] + }, + "line_continuation": { + "match": "\\\\(?=\\n)", + "name": "constant.character.escape.line-continuation.shell" + }, + "logical-expression": { + "patterns": [ + { + "comment": "do we want a special rule for ( expr )?", + "match": "=[=~]?|!=?|<|>|&&|\\|\\|", + "name": "keyword.operator.logical.shell" + }, + { + "match": "(?<!\\S)-(nt|ot|ef|eq|ne|l[te]|g[te]|[a-hknoprstuwxzOGLSN])\\b", + "name": "keyword.operator.logical.shell" + } + ] + }, + "logical_expression_context": { + "patterns": [ + { + "include": "#regex_comparison" + }, + { + "include": "#logical-expression" + }, + { + "include": "#logical_expression_single" + }, + { + "include": "#logical_expression_double" + }, + { + "include": "#comment" + }, + { + "include": "#boolean" + }, + { + "include": "#redirect_number" + }, + { + "include": "#numeric_literal" + }, + { + "include": "#pipeline" + }, + { + "include": "#normal_statement_seperator" + }, + { + "include": "#string" + }, + { + "include": "#variable" + }, + { + "include": "#interpolation" + }, + { + "include": "#heredoc" + }, + { + "include": "#herestring" + }, + { + "include": "#pathname" + }, + { + "include": "#keyword" + }, + { + "include": "#support" + } + ] + }, + "logical_expression_double": { + "begin": "\\[\\[", + "end": "\\]\\]", + "beginCaptures": { + "0": { + "name": "punctuation.definition.logical-expression.shell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.logical-expression.shell" + } + }, + "name": "meta.scope.logical-expression.shell", + "patterns": [ + { + "include": "#logical_expression_context" + } + ] + }, + "logical_expression_single": { + "begin": "\\[", + "end": "\\]", + "beginCaptures": { + "0": { + "name": "punctuation.definition.logical-expression.shell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.logical-expression.shell" + } + }, + "name": "meta.scope.logical-expression.shell", + "patterns": [ + { + "include": "#logical_expression_context" + } + ] + }, + "loop": { + "patterns": [ + { + "begin": "(?<=^|;|&|\\s)(for)\\s+(?=\\({2})", + "beginCaptures": { + "1": { + "name": "keyword.control.shell" + } + }, + "end": "(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))", + "endCaptures": { + "0": { + "name": "keyword.control.shell" + } + }, + "name": "meta.scope.for-loop.shell", + "patterns": [ + { + "include": "#initial_context" + } + ] + }, + { + "begin": "(?<=^|;|&|\\s)(for)\\s+(.+?)\\s+(in)(?=\\s|;|&|$)", + "beginCaptures": { + "1": { + "name": "keyword.control.shell" + }, + "2": { + "name": "variable.other.loop.shell", + "patterns": [ + { + "include": "#string" + } + ] + }, + "3": { + "name": "keyword.control.shell" + } + }, + "end": "(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))", + "endCaptures": { + "0": { + "name": "keyword.control.shell" + } + }, + "name": "meta.scope.for-in-loop.shell", + "patterns": [ + { + "include": "#initial_context" + } + ] + }, + { + "begin": "(?<=^|;|&|\\s)(while|until)(?=\\s|;|&|$)", + "beginCaptures": { + "1": { + "name": "keyword.control.shell" + } + }, + "end": "(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))", + "endCaptures": { + "0": { + "name": "keyword.control.shell" + } + }, + "name": "meta.scope.while-loop.shell", + "patterns": [ + { + "include": "#initial_context" + } + ] + }, + { + "begin": "(?<=^|;|&|\\s)(select)\\s+((?:[^\\s\\\\]|\\\\.)+)(?=\\s|;|&|$)", + "beginCaptures": { + "1": { + "name": "keyword.control.shell" + }, + "2": { + "name": "variable.other.loop.shell" + } + }, + "end": "(?<=^|;|&|\\s)(done)(?=\\s|;|&|$|\\))", + "endCaptures": { + "1": { + "name": "keyword.control.shell" + } + }, + "name": "meta.scope.select-block.shell", + "patterns": [ + { + "include": "#initial_context" + } + ] + }, + { + "begin": "(?<=^|;|&|\\s)case(?=\\s|;|&|$)", + "beginCaptures": { + "0": { + "name": "keyword.control.shell" + } + }, + "end": "(?<=^|;|&|\\s)esac(?=\\s|;|&|$)", + "endCaptures": { + "0": { + "name": "keyword.control.shell" + } + }, + "name": "meta.scope.case-block.shell", + "patterns": [ + { + "begin": "(?<=^|;|&|\\s)in(?=\\s|;|&|$)", + "beginCaptures": { + "0": { + "name": "keyword.control.shell" + } + }, + "end": "(?<=^|;|&|\\s)(?=esac(\\s|;|&|$))", + "name": "meta.scope.case-body.shell", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#case-clause" + } + ] + }, + { + "include": "#initial_context" + } + ] + }, + { + "begin": "(?<=^|;|&|\\s)if(?=\\s|;|&|$)", + "beginCaptures": { + "0": { + "name": "keyword.control.shell" + } + }, + "end": "(?<=^|;|&|\\s)fi(?=\\s|;|&|$)", + "endCaptures": { + "0": { + "name": "keyword.control.shell" + } + }, + "name": "meta.scope.if-block.shell", + "patterns": [ + { + "include": "#initial_context" + } + ] + } + ] + }, + "math": { + "patterns": [ + { + "include": "#variable" + }, + { + "match": "\\+{1,2}|-{1,2}|!|~|\\*{1,2}|/|%|<[<=]?|>[>=]?|==|!=|^|\\|{1,2}|&{1,2}|\\?|\\:|,|=|[*/%+\\-&^|]=|<<=|>>=", + "name": "keyword.operator.arithmetic.shell" + }, + { + "match": "0[xX][0-9A-Fa-f]+", + "name": "constant.numeric.hex.shell" + }, + { + "match": "0\\d+", + "name": "constant.numeric.octal.shell" + }, + { + "match": "\\d{1,2}#[0-9a-zA-Z@_]+", + "name": "constant.numeric.other.shell" + }, + { + "match": "\\d+", + "name": "constant.numeric.integer.shell" + } + ] + }, + "misc_ranges": { + "patterns": [ + { + "include": "#logical_expression_single" + }, + { + "include": "#logical_expression_double" + }, + { + "begin": "\\(\\(", + "end": "\\)\\)", + "beginCaptures": { + "0": { + "name": "punctuation.section.arithmetic.shell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.arithmetic.shell" + } + }, + "name": "meta.arithmetic.shell", + "patterns": [ + { + "include": "#math" + } + ] + }, + { + "begin": "(?<!=)\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.subshell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.subshell" + } + }, + "name": "meta.scope.subshell", + "patterns": [ + { + "include": "#initial_context" + } + ] + }, + { + "begin": "(?<![^ \\t])({)", + "end": "}", + "beginCaptures": { + "1": { + "name": "punctuation.definition.group.shell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.group.shell" + } + }, + "name": "meta.scope.group.shell", + "patterns": [ + { + "include": "#initial_context" + } + ] + } + ] + }, + "modifiers": { + "match": "(?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$)", + "name": "storage.modifier.$0.shell" + }, + "normal_statement": { + "begin": "(?!^[ \\t]*+$)(?:(?<=^until | until |\\tuntil |^while | while |\\twhile |^elif | elif |\\telif |^else | else |\\telse |^then | then |\\tthen |^do | do |\\tdo |^if | if |\\tif )|(?<=(?:^|;|\\||&|!|\\(|\\{|\\`)))[ \\t]*+(?!nocorrect\\W|nocorrect\\$|function\\W|function\\$|foreach\\W|foreach\\$|repeat\\W|repeat\\$|logout\\W|logout\\$|coproc\\W|coproc\\$|select\\W|select\\$|while\\W|while\\$|pushd\\W|pushd\\$|until\\W|until\\$|case\\W|case\\$|done\\W|done\\$|elif\\W|elif\\$|else\\W|else\\$|esac\\W|esac\\$|popd\\W|popd\\$|then\\W|then\\$|time\\W|time\\$|for\\W|for\\$|end\\W|end\\$|fi\\W|fi\\$|do\\W|do\\$|in\\W|in\\$|if\\W|if\\$)", + "end": "(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.statement.shell", + "patterns": [ + { + "include": "#function_definition" + }, + { + "include": "#assignment" + }, + { + "begin": "[ \\t]*+(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?!\\\\\\n?$)", + "end": "(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.statement.command.shell", + "patterns": [ + { + "begin": "\\G", + "end": "(?= |\\t|;|\\||&|$|\\n|\\)|\\`)", + "beginCaptures": {}, + "endCaptures": {}, + "name": "meta.statement.command.name.shell", + "patterns": [ + { + "include": "#modifiers" + }, + { + "match": "(?<!\\w)(?:continue|return|break)(?!\\w)", + "name": "entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell" + }, + { + "match": "(?<!\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|:|\\.)(?!\\/)(?!\\w)", + "name": "entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell" + }, + { + "include": "#variable" + }, + { + "match": "(?<=\\G|'|\"|\\}|\\))([^ \\n\\t\\r\"'=;&\\|`\\)\\{]+)", + "captures": { + "1": { + "name": "entity.name.function.call.shell entity.name.command.shell" + } + } + }, + { + "begin": "(?:\\G|(?<! |\\t|;|\\||&|\\n|\\{|#))((?:\\$)?)((?:(\")|(')))", + "end": "(?<!\\G)(?<=(?:\\2))", + "beginCaptures": { + "1": { + "name": "meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell" + }, + "2": {}, + "3": { + "name": "meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" + }, + "4": { + "name": "meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" + } + }, + "endCaptures": {}, + "patterns": [ + { + "include": "#continuation_of_single_quoted_command_name" + }, + { + "include": "#continuation_of_double_quoted_command_name" + } + ] + }, + { + "include": "#line_continuation" + } + ] + }, + { + "include": "#line_continuation" + }, + { + "include": "#option" + }, + { + "include": "#argument" + }, + { + "include": "#statement_context" + }, + { + "include": "#string" + } + ] + }, + { + "include": "#line_continuation" + }, + { + "include": "#normal_statement_context" + } + ] + }, + "normal_statement_context": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#pipeline" + }, + { + "include": "#normal_statement_seperator" + }, + { + "include": "#misc_ranges" + }, + { + "include": "#boolean" + }, + { + "include": "#redirect_number" + }, + { + "include": "#numeric_literal" + }, + { + "include": "#string" + }, + { + "include": "#variable" + }, + { + "include": "#interpolation" + }, + { + "include": "#heredoc" + }, + { + "include": "#herestring" + }, + { + "include": "#redirection" + }, + { + "include": "#pathname" + }, + { + "include": "#keyword" + }, + { + "include": "#support" + } + ] + }, + "normal_statement_seperator": { + "match": "(?:(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))|\\n)", + "captures": { + "1": { + "name": "punctuation.terminator.statement.semicolon.shell" + }, + "2": { + "name": "punctuation.separator.statement.and.shell" + }, + "3": { + "name": "punctuation.separator.statement.or.shell" + }, + "4": { + "name": "punctuation.separator.statement.background.shell" + } + } + }, + "numeric_literal": { + "match": "[ \\t]*+(?<==| |\\t|^|\\{|\\(|\\[)(?:(?:(?:(?:(0[xX][0-9A-Fa-f]+)|(0\\d+))|(\\d{1,2}#[0-9a-zA-Z@_]+))|(-?\\d+\\.\\d+))|(-?\\d+))(?!>)", + "captures": { + "1": { + "name": "constant.numeric.shell constant.numeric.hex.shell" + }, + "2": { + "name": "constant.numeric.shell constant.numeric.octal.shell" + }, + "3": { + "name": "constant.numeric.shell constant.numeric.other.shell" + }, + "4": { + "name": "constant.numeric.shell constant.numeric.integer.shell" + }, + "5": { + "name": "constant.numeric.shell constant.numeric.integer.shell" + } + } + }, + "option": { + "begin": "[ \\t]++(-)((?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t])))", + "end": "(?:(?=[ \\t])|(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\))", + "beginCaptures": { + "1": { + "name": "string.unquoted.argument.shell constant.other.option.dash.shell" + }, + "2": { + "name": "string.unquoted.argument.shell constant.other.option.shell" + } + }, + "endCaptures": {}, + "contentName": "string.unquoted.argument constant.other.option", + "patterns": [ + { + "include": "#option_context" + } + ] + }, + "option_context": { + "patterns": [ + { + "include": "#misc_ranges" + }, + { + "include": "#string" + }, + { + "include": "#variable" + }, + { + "include": "#interpolation" + }, + { + "include": "#heredoc" + }, + { + "include": "#herestring" + }, + { + "include": "#redirection" + }, + { + "include": "#pathname" + }, + { + "include": "#keyword" + }, + { + "include": "#support" + } + ] + }, + "pathname": { + "patterns": [ + { + "match": "(?<=\\s|:|=|^)~", + "name": "keyword.operator.tilde.shell" + }, + { + "match": "\\*|\\?", + "name": "keyword.operator.glob.shell" + }, + { + "begin": "([?*+@!])(\\()", + "beginCaptures": { + "1": { + "name": "keyword.operator.extglob.shell" + }, + "2": { + "name": "punctuation.definition.extglob.shell" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.extglob.shell" + } + }, + "name": "meta.structure.extglob.shell", + "patterns": [ + { + "include": "#initial_context" + } + ] + } + ] + }, + "pipeline": { + "patterns": [ + { + "match": "(?<=^|;|&|\\s)(time)(?=\\s|;|&|$)", + "name": "keyword.other.shell" + }, + { + "match": "[|!]", + "name": "keyword.operator.pipe.shell" + } + ] + }, + "redirect_number": { + "match": "(?<=[ \\t])(?:(1)|(2)|(\\d+))(?=>)", + "captures": { + "1": { + "name": "keyword.operator.redirect.stdout.shell" + }, + "2": { + "name": "keyword.operator.redirect.stderr.shell" + }, + "3": { + "name": "keyword.operator.redirect.$3.shell" + } + } + }, + "redirection": { + "patterns": [ + { + "begin": "[><]\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.shell" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.shell" + } + }, + "name": "string.interpolated.process-substitution.shell", + "patterns": [ + { + "include": "#initial_context" + } + ] + }, + { + "match": "(?<![<>])(&>|\\d*>&\\d*|\\d*(>>|>|<)|\\d*<&|\\d*<>)(?![<>])", + "name": "keyword.operator.redirect.shell" + } + ] + }, + "regex_comparison": { + "match": "\\=~", + "name": "keyword.operator.logical.regex.shell" + }, + "regexp": { + "patterns": [ + { + "match": ".+" + } + ] + }, + "simple_options": { + "match": "(?:[ \\t]++\\-\\w+)*", + "captures": { + "0": { + "patterns": [ + { + "match": "[ \\t]++(\\-)(\\w+)", + "captures": { + "1": { + "name": "string.unquoted.argument.shell constant.other.option.dash.shell" + }, + "2": { + "name": "string.unquoted.argument.shell constant.other.option.shell" + } + } + } + ] + } + } + }, + "start_of_command": { + "match": "[ \\t]*+(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?!\\\\\\n?$)" + }, + "start_of_double_quoted_command_name": { + "match": "(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?:[ \\t]*+([^ \t\n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>)))?(?:(?:\\$\")|\")", + "captures": { + "1": { + "name": "entity.name.function.call.shell entity.name.command.shell", + "patterns": [ + { + "match": "\\*", + "name": "variable.language.special.wildcard.shell" + }, + { + "include": "#variable" + }, + { + "include": "#numeric_literal" + }, + { + "match": "(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)", + "captures": { + "1": { + "name": "constant.language.$1.shell" + } + } + } + ] + } + }, + "name": "meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" + }, + "start_of_single_quoted_command_name": { + "match": "(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?:[ \\t]*+([^ \t\n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>)))?(?:(?:\\$')|')", + "captures": { + "1": { + "name": "entity.name.function.call.shell entity.name.command.shell", + "patterns": [ + { + "match": "\\*", + "name": "variable.language.special.wildcard.shell" + }, + { + "include": "#variable" + }, + { + "include": "#numeric_literal" + }, + { + "match": "(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)", + "captures": { + "1": { + "name": "constant.language.$1.shell" + } + } + } + ] + } + }, + "name": "meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" + }, + "string": { + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.shell" + }, + { + "begin": "'", + "end": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.shell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.shell" + } + }, + "name": "string.quoted.single.shell" + }, + { + "begin": "\\$?\"", + "end": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.shell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.shell" + } + }, + "name": "string.quoted.double.shell", + "patterns": [ + { + "match": "\\\\[\\$\\n`\"\\\\]", + "name": "constant.character.escape.shell" + }, + { + "include": "#variable" + }, + { + "include": "#interpolation" + } + ] + }, + { + "begin": "\\$'", + "end": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.shell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.shell" + } + }, + "name": "string.quoted.single.dollar.shell", + "patterns": [ + { + "match": "\\\\(?:a|b|e|f|n|r|t|v|\\\\|')", + "name": "constant.character.escape.ansi-c.shell" + }, + { + "match": "\\\\[0-9]{3}\"", + "name": "constant.character.escape.octal.shell" + }, + { + "match": "\\\\x[0-9a-fA-F]{2}\"", + "name": "constant.character.escape.hex.shell" + }, + { + "match": "\\\\c.\"", + "name": "constant.character.escape.control-char.shell" + } + ] + } + ] + }, + "support": { + "patterns": [ + { + "match": "(?<=^|;|&|\\s)(?::|\\.)(?=\\s|;|&|$)", + "name": "support.function.builtin.shell" + } + ] + }, + "variable": { + "patterns": [ + { + "match": "(\\$)(\\@(?!\\w))", + "captures": { + "1": { + "name": "punctuation.definition.variable.shell variable.parameter.positional.all.shell" + }, + "2": { + "name": "variable.parameter.positional.all.shell" + } + } + }, + { + "match": "(\\$)([0-9](?!\\w))", + "captures": { + "1": { + "name": "punctuation.definition.variable.shell variable.parameter.positional.shell" + }, + "2": { + "name": "variable.parameter.positional.shell" + } + } + }, + { + "match": "(\\$)([-*#?$!0_](?!\\w))", + "captures": { + "1": { + "name": "punctuation.definition.variable.shell variable.language.special.shell" + }, + "2": { + "name": "variable.language.special.shell" + } + } + }, + { + "begin": "(\\$)(\\{)[ \\t]*+(?=\\d)", + "end": "\\}", + "beginCaptures": { + "1": { + "name": "punctuation.definition.variable.shell variable.parameter.positional.shell" + }, + "2": { + "name": "punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell" + } + }, + "contentName": "meta.parameter-expansion", + "patterns": [ + { + "match": "!|:[-=?]?|\\*|@|##|#|%%|%|\\/", + "name": "keyword.operator.expansion.shell" + }, + { + "match": "(\\[)[^\\]]+(\\])", + "captures": { + "1": { + "name": "punctuation.section.array.shell" + }, + "2": { + "name": "punctuation.section.array.shell" + } + } + }, + { + "match": "[0-9]+", + "name": "variable.parameter.positional.shell" + }, + { + "match": "(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)", + "name": "variable.other.normal.shell" + }, + { + "include": "#variable" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "(\\$)(\\{)", + "end": "\\}", + "beginCaptures": { + "1": { + "name": "punctuation.definition.variable.shell" + }, + "2": { + "name": "punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell" + } + }, + "contentName": "meta.parameter-expansion", + "patterns": [ + { + "match": "!|:[-=?]?|\\*|@|##|#|%%|%|\\/", + "name": "keyword.operator.expansion.shell" + }, + { + "match": "(\\[)[^\\]]+(\\])", + "captures": { + "1": { + "name": "punctuation.section.array.shell" + }, + "2": { + "name": "punctuation.section.array.shell" + } + } + }, + { + "match": "(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)", + "name": "variable.other.normal.shell" + }, + { + "include": "#variable" + }, + { + "include": "#string" + } + ] + }, + { + "match": "(\\$)(\\w+(?!\\w))", + "captures": { + "1": { + "name": "punctuation.definition.variable.shell variable.other.normal.shell" + }, + "2": { + "name": "variable.other.normal.shell" + } + } + } + ] + } + } +} diff --git a/src/lib/shiki/languages/shellsession.tmLanguage.json b/src/lib/shiki/languages/shellsession.tmLanguage.json new file mode 100644 index 0000000..66be461 --- /dev/null +++ b/src/lib/shiki/languages/shellsession.tmLanguage.json @@ -0,0 +1,30 @@ +{ + "name": "shellsession", + "scopeName": "text.shell-session", + "patterns": [ + { + "match": "(?x) ^ (?: ( (?:\\(\\S+\\)\\s*)? (?: sh\\S*? | \\w+\\S+[@:]\\S+(?:\\s+\\S+)? | \\[\\S+?[@:][^\\n]+?\\].*? ) ) \\s* )? ( [>$#%❯➜] | \\p{Greek} ) \\s+ (.*) $", + "captures": { + "1": { + "name": "entity.other.prompt-prefix.shell-session" + }, + "2": { + "name": "punctuation.separator.prompt.shell-session" + }, + "3": { + "name": "source.shell", + "patterns": [ + { + "include": "source.shell" + } + ] + } + } + }, + { + "name": "meta.output.shell-session", + "match": "^.+$" + } + ], + "fileTypes": ["sh-session"] +} diff --git a/src/lib/shiki/languages/smalltalk.tmLanguage.json b/src/lib/shiki/languages/smalltalk.tmLanguage.json new file mode 100644 index 0000000..6b6410a --- /dev/null +++ b/src/lib/shiki/languages/smalltalk.tmLanguage.json @@ -0,0 +1,239 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/smalltalk.tmbundle/blob/master/Syntaxes/SmallTalk.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "name": "smalltalk", + "foldingStartMarker": "\\[", + "foldingStopMarker": "^\\s*\\]|^\\s\\]", + "keyEquivalent": "^~S", + "fileTypes": ["st"], + "patterns": [ + { + "match": "\\$.", + "name": "constant.character.smalltalk" + }, + { + "match": "\\b(class)\\b", + "name": "storage.type.$1.smalltalk" + }, + { + "match": "\\b(extend|super|self)\\b", + "name": "storage.modifier.$1.smalltalk" + }, + { + "match": "\\b(yourself|new|Smalltalk)\\b", + "name": "keyword.control.$1.smalltalk" + }, + { + "match": ":=", + "name": "keyword.operator.assignment.smalltalk" + }, + { + "comment": "Parse the variable declaration like: |a b c|", + "match": "/^:\\w*\\s*\\|/", + "name": "constant.other.block.smalltalk" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.instance-variables.begin.smalltalk" + }, + "2": { + "patterns": [ + { + "match": "\\w+", + "name": "support.type.variable.declaration.smalltalk" + } + ] + }, + "3": { + "name": "punctuation.definition.instance-variables.end.smalltalk" + } + }, + "match": "(\\|)(\\s*\\w[\\w ]*)(\\|)" + }, + { + "captures": { + "1": { + "patterns": [ + { + "match": ":\\w+", + "name": "entity.name.function.block.smalltalk" + } + ] + } + }, + "comment": "Parse the blocks like: [ :a :b | ...... ]", + "match": "\\[((\\s+|:\\w+)*)\\|" + }, + { + "include": "#numeric" + }, + { + "match": "<(?!<|=)|>(?!<|=|>)|<=|>=|=|==|~=|~~|>>|\\^", + "name": "keyword.operator.comparison.smalltalk" + }, + { + "match": "(\\*|\\+|\\-|/|\\\\)", + "name": "keyword.operator.arithmetic.smalltalk" + }, + { + "match": "(?<=[ \\t])!+|\\bnot\\b|&|\\band\\b|\\||\\bor\\b", + "name": "keyword.operator.logical.smalltalk" + }, + { + "comment": "Fake reserved word -> main Smalltalk messages", + "match": "(?<!\\.)\\b(ensure|resume|retry|signal)\\b(?![?!])", + "name": "keyword.control.smalltalk" + }, + { + "comment": "Fake conditionals. Smalltalk Methods.", + "match": "ifCurtailed:|ifTrue:|ifFalse:|whileFalse:|whileTrue:", + "name": "keyword.control.conditionals.smalltalk" + }, + { + "captures": { + "1": { + "name": "entity.other.inherited-class.smalltalk" + }, + "3": { + "name": "keyword.control.smalltalk" + }, + "4": { + "name": "entity.name.type.class.smalltalk" + } + }, + "match": "(\\w+)(\\s+(subclass:))\\s*(\\w*)", + "name": "meta.class.smalltalk" + }, + { + "begin": "\"", + "beginCaptures": [ + { + "name": "punctuation.definition.comment.begin.smalltalk" + } + ], + "end": "\"", + "endCaptures": [ + { + "name": "punctuation.definition.comment.end.smalltalk" + } + ], + "name": "comment.block.smalltalk" + }, + { + "match": "\\b(true|false)\\b", + "name": "constant.language.boolean.smalltalk" + }, + { + "match": "\\b(nil)\\b", + "name": "constant.language.nil.smalltalk" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.smalltalk" + } + }, + "comment": "messages/methods", + "match": "(?>[a-zA-Z_]\\w*(?>[?!])?)(:)(?!:)", + "name": "constant.other.messages.smalltalk" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.smalltalk" + } + }, + "comment": "symbols", + "match": "(#)[a-zA-Z_][a-zA-Z0-9_:]*", + "name": "constant.other.symbol.smalltalk" + }, + { + "begin": "#\\[", + "beginCaptures": [ + { + "name": "punctuation.definition.constant.begin.smalltalk" + } + ], + "end": "\\]", + "endCaptures": [ + { + "name": "punctuation.definition.constant.end.smalltalk" + } + ], + "name": "meta.array.byte.smalltalk", + "patterns": [ + { + "match": "[0-9]+(r[a-zA-Z0-9]+)?", + "name": "constant.numeric.integer.smalltalk" + }, + { + "match": "[^\\s\\]]+", + "name": "invalid.illegal.character-not-allowed-here.smalltalk" + } + ] + }, + { + "begin": "#\\(", + "beginCaptures": [ + { + "name": "punctuation.definition.constant.begin.smalltalk" + } + ], + "comment": "Array Constructor", + "end": "\\)", + "endCaptures": [ + { + "name": "punctuation.definition.constant.end.smalltalk" + } + ], + "name": "constant.other.array.smalltalk" + }, + { + "begin": "'", + "beginCaptures": [ + { + "name": "punctuation.definition.string.begin.smalltalk" + } + ], + "end": "'", + "endCaptures": [ + { + "name": "punctuation.definition.string.end.smalltalk" + } + ], + "name": "string.quoted.single.smalltalk" + }, + { + "match": "\\b[A-Z]\\w*\\b", + "name": "variable.other.constant.smalltalk" + } + ], + "repository": { + "numeric": { + "patterns": [ + { + "match": "(?<!\\w)[0-9]+\\.[0-9]+s[0-9]*", + "name": "constant.numeric.float.scaled.smalltalk" + }, + { + "match": "(?<!\\w)[0-9]+\\.[0-9]+([edq]-?[0-9]+)?", + "name": "constant.numeric.float.smalltalk" + }, + { + "match": "(?<!\\w)-?[0-9]+r[a-zA-Z0-9]+", + "name": "constant.numeric.integer.radix.smalltalk" + }, + { + "match": "(?<!\\w)-?[0-9]+([edq]-?[0-9]+)?", + "name": "constant.numeric.integer.smalltalk" + } + ] + } + }, + "scopeName": "source.smalltalk", + "uuid": "1ED64A34-BCB1-44E1-A0FE-84053003E232" +} diff --git a/src/lib/shiki/languages/solidity.tmLanguage.json b/src/lib/shiki/languages/solidity.tmLanguage.json new file mode 100644 index 0000000..30a4731 --- /dev/null +++ b/src/lib/shiki/languages/solidity.tmLanguage.json @@ -0,0 +1,1208 @@ +{ + "fileTypes": ["sol"], + "name": "solidity", + "patterns": [ + { + "include": "#natspec" + }, + { + "include": "#declaration-userType" + }, + { + "include": "#comment" + }, + { + "include": "#operator" + }, + { + "include": "#global" + }, + { + "include": "#control" + }, + { + "include": "#constant" + }, + { + "include": "#primitive" + }, + { + "include": "#type-primitive" + }, + { + "include": "#type-modifier-extended-scope" + }, + { + "include": "#declaration" + }, + { + "include": "#function-call" + }, + { + "include": "#assembly" + }, + { + "include": "#punctuation" + } + ], + "repository": { + "natspec": { + "patterns": [ + { + "begin": "/\\*\\*", + "end": "\\*/", + "name": "comment.block.documentation", + "patterns": [ + { + "include": "#natspec-tags" + } + ] + }, + { + "begin": "///", + "end": "$", + "name": "comment.block.documentation", + "patterns": [ + { + "include": "#natspec-tags" + } + ] + } + ] + }, + "natspec-tags": { + "patterns": [ + { + "include": "#comment-todo" + }, + { + "include": "#natspec-tag-title" + }, + { + "include": "#natspec-tag-author" + }, + { + "include": "#natspec-tag-notice" + }, + { + "include": "#natspec-tag-dev" + }, + { + "include": "#natspec-tag-param" + }, + { + "include": "#natspec-tag-return" + }, + { + "include": "#natspec-tag-custom" + }, + { + "include": "#natspec-tag-inheritdoc" + } + ] + }, + "natspec-tag-title": { + "match": "(@title)\\b", + "name": "storage.type.title.natspec" + }, + "natspec-tag-author": { + "match": "(@author)\\b", + "name": "storage.type.author.natspec" + }, + "natspec-tag-notice": { + "match": "(@notice)\\b", + "name": "storage.type.dev.natspec" + }, + "natspec-tag-custom": { + "match": "(@custom:\\w*)\\b", + "name": "storage.type.dev.natspec" + }, + "natspec-tag-inheritdoc": { + "match": "(@inheritdoc)\\b", + "name": "storage.type.author.natspec" + }, + "natspec-tag-dev": { + "match": "(@dev)\\b", + "name": "storage.type.dev.natspec" + }, + "natspec-tag-param": { + "match": "(@param)(\\s+([A-Za-z_]\\w*))?\\b", + "captures": { + "1": { + "name": "storage.type.param.natspec" + }, + "3": { + "name": "variable.other.natspec" + } + } + }, + "natspec-tag-return": { + "match": "(@return)(\\s+([A-Za-z_]\\w*))?\\b", + "captures": { + "1": { + "name": "storage.type.return.natspec" + }, + "3": { + "name": "variable.other.natspec" + } + } + }, + "comment": { + "patterns": [ + { + "include": "#comment-line" + }, + { + "include": "#comment-block" + } + ] + }, + "comment-todo": { + "match": "(?i)\\b(FIXME|TODO|CHANGED|XXX|IDEA|HACK|NOTE|REVIEW|NB|BUG|QUESTION|COMBAK|TEMP|SUPPRESS|LINT|\\w+-disable|\\w+-suppress)\\b(?-i)", + "name": "keyword.comment.todo" + }, + "comment-line": { + "begin": "(?<!tp:)//", + "end": "$", + "name": "comment.line", + "patterns": [ + { + "include": "#comment-todo" + } + ] + }, + "comment-block": { + "begin": "/\\*", + "end": "\\*/", + "name": "comment.block", + "patterns": [ + { + "include": "#comment-todo" + } + ] + }, + "operator": { + "patterns": [ + { + "include": "#operator-logic" + }, + { + "include": "#operator-mapping" + }, + { + "include": "#operator-arithmetic" + }, + { + "include": "#operator-binary" + }, + { + "include": "#operator-assignment" + } + ] + }, + "operator-logic": { + "match": "(==|\\!=|<(?!<)|<=|>(?!>)|>=|\\&\\&|\\|\\||\\:(?!=)|\\?|\\!)", + "name": "keyword.operator.logic" + }, + "operator-mapping": { + "match": "(=>)", + "name": "keyword.operator.mapping" + }, + "operator-arithmetic": { + "match": "(\\+|\\-|\\/|\\*)", + "name": "keyword.operator.arithmetic" + }, + "operator-binary": { + "match": "(\\^|\\&|\\||<<|>>)", + "name": "keyword.operator.binary" + }, + "operator-assignment": { + "match": "(\\:?=)", + "name": "keyword.operator.assignment" + }, + "control": { + "patterns": [ + { + "include": "#control-flow" + }, + { + "include": "#control-using" + }, + { + "include": "#control-import" + }, + { + "include": "#control-pragma" + }, + { + "include": "#control-underscore" + }, + { + "include": "#control-unchecked" + }, + { + "include": "#control-other" + } + ] + }, + "control-flow": { + "patterns": [ + { + "match": "\\b(if|else|for|while|do|break|continue|try|catch|finally|throw|return|global)\\b", + "name": "keyword.control.flow" + }, + { + "begin": "\\b(returns)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.flow.return" + } + }, + "end": "(?=\\))", + "patterns": [ + { + "include": "#declaration-function-parameters" + } + ] + } + ] + }, + "control-using": { + "patterns": [ + { + "match": "\\b(using)\\b\\s+\\b([A-Za-z\\d_]+)\\b\\s+\\b(for)\\b\\s+\\b([A-Za-z\\d_]+)", + "captures": { + "1": { + "name": "keyword.control.using" + }, + "2": { + "name": "entity.name.type.library" + }, + "3": { + "name": "keyword.control.for" + }, + "4": { + "name": "entity.name.type" + } + } + }, + { + "match": "\\b(using)\\b", + "name": "keyword.control.using" + } + ] + }, + "control-import": { + "patterns": [ + { + "begin": "\\b(import)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.import" + } + }, + "end": "(?=\\;)", + "patterns": [ + { + "begin": "((?=\\{))", + "end": "((?=\\}))", + "patterns": [ + { + "match": "\\b(\\w+)\\b", + "name": "entity.name.type.interface" + } + ] + }, + { + "match": "\\b(from)\\b", + "name": "keyword.control.import.from" + }, + { + "include": "#string" + }, + { + "include": "#punctuation" + } + ] + }, + { + "match": "\\b(import)\\b", + "name": "keyword.control.import" + } + ] + }, + "control-unchecked": { + "match": "\\b(unchecked)\\b", + "name": "keyword.control.unchecked" + }, + "control-pragma": { + "match": "\\b(pragma)(?:\\s+([A-Za-z_]\\w+)\\s+([^\\s]+))?\\b", + "captures": { + "1": { + "name": "keyword.control.pragma" + }, + "2": { + "name": "entity.name.tag.pragma" + }, + "3": { + "name": "constant.other.pragma" + } + } + }, + "control-underscore": { + "match": "\\b(_)\\b", + "name": "constant.other.underscore" + }, + "control-other": { + "match": "\\b(new|delete|emit)\\b", + "name": "keyword.control" + }, + "constant": { + "patterns": [ + { + "include": "#constant-boolean" + }, + { + "include": "#constant-time" + }, + { + "include": "#constant-currency" + } + ] + }, + "constant-boolean": { + "match": "\\b(true|false)\\b", + "name": "constant.language.boolean" + }, + "constant-time": { + "match": "\\b(seconds|minutes|hours|days|weeks|years)\\b", + "name": "constant.language.time" + }, + "constant-currency": { + "match": "\\b(ether|wei|gwei|finney|szabo)\\b", + "name": "constant.language.currency" + }, + "number": { + "patterns": [ + { + "include": "#number-decimal" + }, + { + "include": "#number-hex" + }, + { + "include": "#number-scientific" + } + ] + }, + "number-decimal": { + "match": "\\b([0-9_]+(\\.[0-9_]+)?)\\b", + "name": "constant.numeric.decimal" + }, + "number-hex": { + "match": "\\b(0[xX][a-fA-F0-9]+)\\b", + "name": "constant.numeric.hexadecimal" + }, + "number-scientific": { + "match": "\\b(?:0\\.(?:0[0-9]|[0-9][0-9_]?)|[0-9][0-9_]*(?:\\.\\d{1,2})?)(?:e[+-]?[0-9_]+)?", + "name": "constant.numeric.scientific" + }, + "string": { + "patterns": [ + { + "match": "\\\"(?:\\\\\"|[^\\\"])*\\\"", + "name": "string.quoted.double" + }, + { + "match": "\\'(?:\\\\'|[^\\'])*\\'", + "name": "string.quoted.single" + } + ] + }, + "primitive": { + "patterns": [ + { + "include": "#number-decimal" + }, + { + "include": "#number-hex" + }, + { + "include": "#number-scientific" + }, + { + "include": "#string" + } + ] + }, + "type-primitive": { + "patterns": [ + { + "begin": "\\b(address|string\\d*|bytes\\d*|int\\d*|uint\\d*|bool|hash\\d*)\\b(?:\\[\\])(\\()", + "beginCaptures": { + "1": { + "name": "support.type.primitive" + } + }, + "end": "(\\))", + "patterns": [ + { + "include": "#primitive" + }, + { + "include": "#punctuation" + }, + { + "include": "#global" + }, + { + "include": "#variable" + } + ] + }, + { + "match": "\\b(address|string\\d*|bytes\\d*|int\\d*|uint\\d*|bool|hash\\d*)\\b", + "name": "support.type.primitive" + } + ] + }, + "global": { + "patterns": [ + { + "include": "#global-variables" + }, + { + "include": "#global-functions" + } + ] + }, + "global-variables": { + "patterns": [ + { + "match": "\\b(this)\\b", + "name": "variable.language.this" + }, + { + "match": "\\b(super)\\b", + "name": "variable.language.super" + }, + { + "match": "\\b(abi)\\b", + "name": "variable.language.builtin.abi" + }, + { + "match": "\\b(msg\\.sender|msg|block|tx|now)\\b", + "name": "variable.language.transaction" + }, + { + "match": "\\b(tx\\.origin|tx\\.gasprice|msg\\.data|msg\\.sig|msg\\.value)\\b", + "name": "variable.language.transaction" + } + ] + }, + "global-functions": { + "patterns": [ + { + "match": "\\b(require|assert|revert)\\b", + "name": "keyword.control.exceptions" + }, + { + "match": "\\b(selfdestruct|suicide)\\b", + "name": "keyword.control.contract" + }, + { + "match": "\\b(addmod|mulmod|keccak256|sha256|sha3|ripemd160|ecrecover)\\b", + "name": "support.function.math" + }, + { + "match": "\\b(unicode)\\b", + "name": "support.function.string" + }, + { + "match": "\\b(blockhash|gasleft)\\b", + "name": "variable.language.transaction" + }, + { + "match": "\\b(type)\\b", + "name": "variable.language.type" + } + ] + }, + "type-modifier-access": { + "match": "\\b(internal|external|private|public)\\b", + "name": "storage.type.modifier.access" + }, + "type-modifier-payable": { + "match": "\\b(nonpayable|payable)\\b", + "name": "storage.type.modifier.payable" + }, + "type-modifier-constant": { + "match": "\\b(constant)\\b", + "name": "storage.type.modifier.readonly" + }, + "type-modifier-immutable": { + "match": "\\b(immutable)\\b", + "name": "storage.type.modifier.readonly" + }, + "type-modifier-extended-scope": { + "match": "\\b(pure|view|inherited|indexed|storage|memory|virtual|calldata|override|abstract)\\b", + "name": "storage.type.modifier.extendedscope" + }, + "variable": { + "patterns": [ + { + "match": "\\b(\\_\\w+)\\b", + "captures": { + "1": { + "name": "variable.parameter.function" + } + } + }, + { + "match": "(?:\\.)(\\w+)\\b", + "captures": { + "1": { + "name": "support.variable.property" + } + } + }, + { + "match": "\\b(\\w+)\\b", + "captures": { + "1": { + "name": "variable.parameter.other" + } + } + } + ] + }, + "modifier-call": { + "patterns": [ + { + "include": "#function-call" + }, + { + "match": "\\b(\\w+)\\b", + "name": "entity.name.function.modifier" + } + ] + }, + "declaration": { + "patterns": [ + { + "include": "#declaration-contract" + }, + { + "include": "#declaration-userType" + }, + { + "include": "#declaration-interface" + }, + { + "include": "#declaration-library" + }, + { + "include": "#declaration-function" + }, + { + "include": "#declaration-modifier" + }, + { + "include": "#declaration-constructor" + }, + { + "include": "#declaration-event" + }, + { + "include": "#declaration-storage" + }, + { + "include": "#declaration-error" + } + ] + }, + "declaration-storage-field": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#control" + }, + { + "include": "#type-primitive" + }, + { + "include": "#type-modifier-access" + }, + { + "include": "#type-modifier-immutable" + }, + { + "include": "#type-modifier-extend-scope" + }, + { + "include": "#type-modifier-payable" + }, + { + "include": "#type-modifier-constant" + }, + { + "include": "#primitive" + }, + { + "include": "#constant" + }, + { + "include": "#operator" + }, + { + "include": "#punctuation" + } + ] + }, + "declaration-storage": { + "patterns": [ + { + "include": "#declaration-storage-mapping" + }, + { + "include": "#declaration-struct" + }, + { + "include": "#declaration-enum" + }, + { + "include": "#declaration-storage-field" + } + ] + }, + "declaration-userType": { + "match": "\\b(type)\\b\\s+(\\w+)\\b\\s+\\b(is)\\b", + "captures": { + "1": { + "name": "storage.type.userType" + }, + "2": { + "name": "entity.name.type.userType" + }, + "3": { + "name": "storage.modifier.is" + } + } + }, + "declaration-contract": { + "patterns": [ + { + "begin": "\\b(contract)\\b\\s+(\\w+)\\b\\s+\\b(is)\\b\\s+", + "end": "(?=\\{)", + "beginCaptures": { + "1": { + "name": "storage.type.contract" + }, + "2": { + "name": "entity.name.type.contract" + }, + "3": { + "name": "storage.modifier.is" + } + }, + "patterns": [ + { + "match": "\\b(\\w+)\\b", + "name": "entity.name.type.contract.extend" + } + ] + }, + { + "match": "\\b(contract)(\\s+([A-Za-z_]\\w*))?\\b", + "captures": { + "1": { + "name": "storage.type.contract" + }, + "2": { + "name": "entity.name.type.contract" + } + } + } + ] + }, + "declaration-interface": { + "patterns": [ + { + "begin": "\\b(interface)\\b\\s+(\\w+)\\b\\s+\\b(is)\\b\\s+", + "end": "(?=\\{)", + "beginCaptures": { + "1": { + "name": "storage.type.interface" + }, + "2": { + "name": "entity.name.type.interface" + }, + "3": { + "name": "storage.modifier.is" + } + }, + "patterns": [ + { + "match": "\\b(\\w+)\\b", + "name": "entity.name.type.interface.extend" + } + ] + }, + { + "match": "\\b(interface)(\\s+([A-Za-z_]\\w*))?\\b", + "captures": { + "1": { + "name": "storage.type.interface" + }, + "2": { + "name": "entity.name.type.interface" + } + } + } + ] + }, + "declaration-library": { + "match": "\\b(library)(\\s+([A-Za-z_]\\w*))?\\b", + "captures": { + "1": { + "name": "storage.type.library" + }, + "3": { + "name": "entity.name.type.library" + } + } + }, + "declaration-struct": { + "patterns": [ + { + "match": "\\b(struct)(\\s+([A-Za-z_]\\w*))?\\b", + "captures": { + "1": { + "name": "storage.type.struct" + }, + "3": { + "name": "entity.name.type.struct" + } + } + }, + { + "begin": "\\b(struct)\\b\\s*(\\w+)?\\b\\s*(?=\\{)", + "beginCaptures": { + "1": { + "name": "storage.type.struct" + }, + "2": { + "name": "entity.name.type.struct" + } + }, + "end": "(?=\\})", + "patterns": [ + { + "include": "#type-primitive" + }, + { + "include": "#variable" + }, + { + "include": "#punctuation" + }, + { + "include": "#comment" + } + ] + } + ] + }, + "declaration-event": { + "patterns": [ + { + "begin": "\\b(event)\\b(?:\\s+(\\w+)\\b)?", + "end": "(?=\\))", + "beginCaptures": { + "1": { + "name": "storage.type.event" + }, + "2": { + "name": "entity.name.type.event" + } + }, + "patterns": [ + { + "include": "#type-primitive" + }, + { + "match": "\\b(?:(indexed)\\s)?(\\w+)(?:,\\s*|)", + "captures": { + "1": { + "name": "storage.type.modifier.indexed" + }, + "2": { + "name": "variable.parameter.event" + } + } + }, + { + "include": "#punctuation" + } + ] + }, + { + "match": "\\b(event)(\\s+([A-Za-z_]\\w*))?\\b", + "captures": { + "1": { + "name": "storage.type.event" + }, + "3": { + "name": "entity.name.type.event" + } + } + } + ] + }, + "declaration-constructor": { + "patterns": [ + { + "begin": "\\b(constructor)\\b", + "beginCaptures": { + "1": { + "name": "storage.type.constructor" + } + }, + "end": "(?=\\{)", + "patterns": [ + { + "begin": "\\G\\s*(?=\\()", + "end": "(?=\\))", + "patterns": [ + { + "include": "#declaration-function-parameters" + } + ] + }, + { + "begin": "(?<=\\))", + "end": "(?=\\{)", + "patterns": [ + { + "include": "#type-modifier-access" + }, + { + "include": "#function-call" + } + ] + } + ] + }, + { + "match": "\\b(constructor)\\b", + "captures": { + "1": { + "name": "storage.type.constructor" + } + } + } + ] + }, + "declaration-enum": { + "patterns": [ + { + "begin": "\\b(enum)\\s+(\\w+)\\b", + "beginCaptures": { + "1": { + "name": "storage.type.enum" + }, + "2": { + "name": "entity.name.type.enum" + } + }, + "end": "(?=\\})", + "patterns": [ + { + "match": "\\b(\\w+)\\b", + "name": "variable.other.enummember" + }, + { + "include": "#punctuation" + }, + { + "include": "#comment" + } + ] + }, + { + "match": "\\b(enum)(\\s+([A-Za-z_]\\w*))?\\b", + "captures": { + "1": { + "name": "storage.type.enum" + }, + "3": { + "name": "entity.name.type.enum" + } + } + } + ] + }, + "declaration-function-parameters": { + "begin": "\\G\\s*(?=\\()", + "end": "(?=\\))", + "patterns": [ + { + "include": "#type-primitive" + }, + { + "include": "#type-modifier-extended-scope" + }, + { + "match": "\\b([A-Z]\\w*)\\b", + "captures": { + "1": { + "name": "storage.type.struct" + } + } + }, + { + "include": "#variable" + }, + { + "include": "#punctuation" + }, + { + "include": "#comment" + } + ] + }, + "declaration-function": { + "patterns": [ + { + "begin": "\\b(function)\\s+(\\w+)\\b", + "beginCaptures": { + "1": { + "name": "storage.type.function" + }, + "2": { + "name": "entity.name.function" + } + }, + "end": "(?=\\{|;)", + "patterns": [ + { + "include": "#natspec" + }, + { + "include": "#global" + }, + { + "include": "#declaration-function-parameters" + }, + { + "include": "#type-modifier-access" + }, + { + "include": "#type-modifier-payable" + }, + { + "include": "#type-modifier-immutable" + }, + { + "include": "#type-modifier-extended-scope" + }, + { + "include": "#control-flow" + }, + { + "include": "#function-call" + }, + { + "include": "#modifier-call" + }, + { + "include": "#punctuation" + } + ] + }, + { + "match": "\\b(function)\\s+([A-Za-z_]\\w*)\\b", + "captures": { + "1": { + "name": "storage.type.function" + }, + "2": { + "name": "entity.name.function" + } + } + } + ] + }, + "declaration-modifier": { + "patterns": [ + { + "begin": "\\b(modifier)\\b\\s*(\\w+)", + "beginCaptures": { + "1": { + "name": "storage.type.function.modifier" + }, + "2": { + "name": "entity.name.function.modifier" + } + }, + "end": "(?=\\{)", + "patterns": [ + { + "include": "#declaration-function-parameters" + }, + { + "begin": "(?<=\\))", + "end": "(?=\\{)", + "patterns": [ + { + "include": "#declaration-function-parameters" + }, + { + "include": "#type-modifier-access" + }, + { + "include": "#type-modifier-payable" + }, + { + "include": "#type-modifier-immutable" + }, + { + "include": "#type-modifier-extended-scope" + }, + { + "include": "#function-call" + }, + { + "include": "#modifier-call" + }, + { + "include": "#control-flow" + } + ] + } + ] + }, + { + "match": "\\b(modifier)(\\s+([A-Za-z_]\\w*))?\\b", + "captures": { + "1": { + "name": "storage.type.modifier" + }, + "3": { + "name": "entity.name.function" + } + } + } + ] + }, + "declaration-storage-mapping": { + "patterns": [ + { + "begin": "\\b(mapping)\\b", + "beginCaptures": { + "1": { + "name": "storage.type.mapping" + } + }, + "end": "(?=\\))", + "patterns": [ + { + "include": "#declaration-storage-mapping" + }, + { + "include": "#type-primitive" + }, + { + "include": "#punctuation" + }, + { + "include": "#operator" + } + ] + }, + { + "match": "\\b(mapping)\\b", + "name": "storage.type.mapping" + } + ] + }, + "declaration-error": { + "match": "\\b(error)(\\s+([A-Za-z_]\\w*))?\\b", + "captures": { + "1": { + "name": "storage.type.error" + }, + "3": { + "name": "entity.name.type.error" + } + } + }, + "function-call": { + "match": "\\b([A-Za-z_]\\w*)\\s*(\\()", + "captures": { + "1": { + "name": "entity.name.function" + }, + "2": { + "name": "punctuation.parameters.begin" + } + } + }, + "assembly": { + "patterns": [ + { + "match": "\\b(assembly)\\b", + "name": "keyword.control.assembly" + }, + { + "match": "\\b(let)\\b", + "name": "storage.type.assembly" + } + ] + }, + "punctuation": { + "patterns": [ + { + "match": ";", + "name": "punctuation.terminator.statement" + }, + { + "match": "\\.", + "name": "punctuation.accessor" + }, + { + "match": ",", + "name": "punctuation.separator" + }, + { + "match": "\\{", + "name": "punctuation.brace.curly.begin" + }, + { + "match": "\\}", + "name": "punctuation.brace.curly.end" + }, + { + "match": "\\[", + "name": "punctuation.brace.square.begin" + }, + { + "match": "\\]", + "name": "punctuation.brace.square.end" + }, + { + "match": "\\(", + "name": "punctuation.parameters.begin" + }, + { + "match": "\\)", + "name": "punctuation.parameters.end" + } + ] + } + }, + "scopeName": "source.solidity", + "uuid": "ad87d2cd-8575-4afe-984e-9421a3788933" +} diff --git a/src/lib/shiki/languages/sparql.tmLanguage.json b/src/lib/shiki/languages/sparql.tmLanguage.json new file mode 100644 index 0000000..b40e554 --- /dev/null +++ b/src/lib/shiki/languages/sparql.tmLanguage.json @@ -0,0 +1,40 @@ +{ + "name": "sparql", + "scopeName": "source.sparql", + "fileTypes": ["rq", "sparql", "sq"], + "patterns": [ + { + "include": "source.turtle" + }, + { + "include": "#query-keyword-operators" + }, + { + "include": "#functions" + }, + { + "include": "#variables" + }, + { + "include": "#expression-operators" + } + ], + "repository": { + "query-keyword-operators": { + "name": "keyword.control.sparql", + "match": "\\b(?i:define|select|distinct|reduced|from|named|construct|ask|describe|where|graph|having|bind|as|filter|optional|union|order|by|group|limit|offset|values|insert data|delete data|with|delete|insert|clear|silent|default|all|create|drop|copy|move|add|to|using|service|not exists|exists|not in|in|minus|load)\\b" + }, + "functions": { + "name": "support.function.sparql", + "match": "\\b(?i:concat|regex|asc|desc|bound|isiri|isuri|isblank|isliteral|isnumeric|str|lang|datatype|sameterm|langmatches|avg|count|group_concat|separator|max|min|sample|sum|iri|uri|bnode|strdt|uuid|struuid|strlang|strlen|substr|ucase|lcase|strstarts|strends|contains|strbefore|strafter|encode_for_uri|replace|abs|round|ceil|floor|rand|now|year|month|day|hours|minutes|seconds|timezone|tz|md5|sha1|sha256|sha384|sha512|coalesce|if)\\b" + }, + "variables": { + "name": "constant.variable.sparql.turtle", + "match": "(?<!\\w)[?$]\\w+" + }, + "expression-operators": { + "name": "support.class.sparql", + "match": "(?:\\|\\||&&|=|!=|<|>|<=|>=|\\*|/|\\+|-|\\||\\^|\\?|\\!)" + } + } +} diff --git a/src/lib/shiki/languages/splunk.tmLanguage.json b/src/lib/shiki/languages/splunk.tmLanguage.json new file mode 100644 index 0000000..745ef4e --- /dev/null +++ b/src/lib/shiki/languages/splunk.tmLanguage.json @@ -0,0 +1,87 @@ +{ + "fileTypes": ["splunk", "spl"], + "name": "splunk", + "patterns": [ + { + "comment": "Splunk Built-in functions", + "match": "(?<=(\\||\\[))([\\s]*)\\b(abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|append|appendcols|appendpipe|arules|associate|audit|autoregress|bucket|bucketdir|chart|cluster|collect|concurrency|contingency|convert|correlate|crawl|datamodel|dbinspect|dbxquery|dbxlookup|dedup|delete|delta|diff|dispatch|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|file|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geostats|head|highlight|history|input|inputcsv|inputlookup|iplocation|join|kmeans|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|metadata|metasearch|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\\b(?=[\\s])", + "name": "support.class.splunk_search" + }, + { + "comment": "Splunk Eval functions", + "match": "\\b(abs|acos|acosh|asin|asinh|atan|atan2|atanh|case|cidrmatch|ceiling|coalesce|commands|cos|cosh|exact|exp|floor|hypot|if|in|isbool|isint|isnotnull|isnull|isnum|isstr|len|like|ln|log|lower|ltrim|match|max|md5|min|mvappend|mvcount|mvdedup|mvfilter|mvfind|mvindex|mvjoin|mvrange|mvsort|mvzip|now|null|nullif|pi|pow|printf|random|relative_time|replace|round|rtrim|searchmatch|sha1|sha256|sha512|sigfig|sin|sinh|spath|split|sqrt|strftime|strptime|substr|tan|tanh|time|tonumber|tostring|trim|typeof|upper|urldecode|validate)(?=\\()\\b", + "name": "support.function.splunk_search" + }, + { + "comment": "Splunk Transforming functions", + "match": "\\b(avg|count|distinct_count|estdc|estdc_error|eval|max|mean|median|min|mode|percentile|range|stdev|stdevp|sum|sumsq|var|varp|first|last|list|values|earliest|earliest_time|latest|latest_time|per_day|per_hour|per_minute|per_second|rate)\\b", + "name": "support.function.splunk_search" + }, + { + "comment": "Splunk Macro Names", + "match": "(?<=\\`)[\\w]+(?=\\(|\\`)", + "name": "entity.name.function.splunk_search" + }, + { + "comment": "Digits", + "match": "\\b(\\d+)\\b", + "name": "constant.numeric.splunk_search" + }, + { + "comment": "Escape Characters", + "match": "(\\\\\\\\|\\\\\\||\\\\\\*|\\\\\\=)", + "name": "contant.character.escape.splunk_search" + }, + { + "comment": "Splunk Operators", + "match": "(\\|,)", + "name": "keyword.operator.splunk_search" + }, + { + "comment": "Splunk Language Constants", + "match": "(?i)\\b(as|by|or|and|over|where|output|outputnew)\\b|(?-i)\\b(NOT|true|false)\\b", + "name": "constant.language.splunk_search" + }, + { + "comment": "Splunk Macro Parameters", + "match": "(?<=\\(|,|[^=]\\s{300})([^\\(\\)\\\",=]+)(?=\\)|,)", + "name": "variable.parameter.splunk_search" + }, + { + "comment": "Splunk Variables", + "match": "([\\w\\.]+)(\\[\\]|\\{\\})?([\\s]*)(?=\\=)", + "name": "variable.splunk_search" + }, + { + "comment": "Comparison or assignment", + "match": "=", + "name": "keyword.operator.splunk_search" + }, + { + "begin": "(?<!\\\\)\"", + "end": "(?<!\\\\)\"", + "name": "string.quoted.double.splunk_search" + }, + { + "begin": "(?<!\\\\)'", + "end": "(?<!\\\\)'", + "name": "string.quoted.single.splunk_search" + }, + { + "begin": "query=\\\"", + "end": "(?<!\\\\)\"", + "name": "meta.embedded.block.sql" + }, + { + "begin": "(?<!\\\\)```", + "end": "(?<!\\\\)```", + "name": "comment.block.splunk_search" + }, + { + "begin": "`comment\\(", + "end": "\\)`", + "name": "comment.block.splunk_search" + } + ], + "scopeName": "source.splunk_search" +} diff --git a/src/lib/shiki/languages/sql.tmLanguage.json b/src/lib/shiki/languages/sql.tmLanguage.json new file mode 100644 index 0000000..0e6bb0d --- /dev/null +++ b/src/lib/shiki/languages/sql.tmLanguage.json @@ -0,0 +1,635 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/microsoft/vscode-mssql/blob/master/syntaxes/SQL.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/microsoft/vscode-mssql/commit/9cb3529a978ddf599bf5bdd228f21bbcfe2914f5", + "name": "sql", + "scopeName": "source.sql", + "patterns": [ + { + "match": "((?<!@)@)\\b(\\w+)\\b", + "name": "text.variable" + }, + { + "match": "(\\[)[^\\]]*(\\])", + "name": "text.bracketed" + }, + { + "include": "#comments" + }, + { + "captures": { + "1": { + "name": "keyword.other.create.sql" + }, + "2": { + "name": "keyword.other.sql" + }, + "5": { + "name": "entity.name.function.sql" + } + }, + "match": "(?i:^\\s*(create(?:\\s+or\\s+replace)?)\\s+(aggregate|conversion|database|domain|function|group|(unique\\s+)?index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\s+)(['\"`]?)(\\w+)\\4", + "name": "meta.create.sql" + }, + { + "captures": { + "1": { + "name": "keyword.other.create.sql" + }, + "2": { + "name": "keyword.other.sql" + } + }, + "match": "(?i:^\\s*(drop)\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view))", + "name": "meta.drop.sql" + }, + { + "captures": { + "1": { + "name": "keyword.other.create.sql" + }, + "2": { + "name": "keyword.other.table.sql" + }, + "3": { + "name": "entity.name.function.sql" + }, + "4": { + "name": "keyword.other.cascade.sql" + } + }, + "match": "(?i:\\s*(drop)\\s+(table)\\s+(\\w+)(\\s+cascade)?\\b)", + "name": "meta.drop.sql" + }, + { + "captures": { + "1": { + "name": "keyword.other.create.sql" + }, + "2": { + "name": "keyword.other.table.sql" + } + }, + "match": "(?i:^\\s*(alter)\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|proc(edure)?|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\s+)", + "name": "meta.alter.sql" + }, + { + "captures": { + "1": { + "name": "storage.type.sql" + }, + "2": { + "name": "storage.type.sql" + }, + "3": { + "name": "constant.numeric.sql" + }, + "4": { + "name": "storage.type.sql" + }, + "5": { + "name": "constant.numeric.sql" + }, + "6": { + "name": "storage.type.sql" + }, + "7": { + "name": "constant.numeric.sql" + }, + "8": { + "name": "constant.numeric.sql" + }, + "9": { + "name": "storage.type.sql" + }, + "10": { + "name": "constant.numeric.sql" + }, + "11": { + "name": "storage.type.sql" + }, + "12": { + "name": "storage.type.sql" + }, + "13": { + "name": "storage.type.sql" + }, + "14": { + "name": "constant.numeric.sql" + }, + "15": { + "name": "storage.type.sql" + } + }, + "match": "(?xi)\n\n\t\t\t\t# normal stuff, capture 1\n\t\t\t\t \\b(bigint|bigserial|bit|boolean|box|bytea|cidr|circle|date|double\\sprecision|inet|int|integer|line|lseg|macaddr|money|oid|path|point|polygon|real|serial|smallint|sysdate|text)\\b\n\n\t\t\t\t# numeric suffix, capture 2 + 3i\n\t\t\t\t|\\b(bit\\svarying|character\\s(?:varying)?|tinyint|var\\schar|float|interval)\\((\\d+)\\)\n\n\t\t\t\t# optional numeric suffix, capture 4 + 5i\n\t\t\t\t|\\b(char|number|varchar\\d?)\\b(?:\\((\\d+)\\))?\n\n\t\t\t\t# special case, capture 6 + 7i + 8i\n\t\t\t\t|\\b(numeric|decimal)\\b(?:\\((\\d+),(\\d+)\\))?\n\n\t\t\t\t# special case, captures 9, 10i, 11\n\t\t\t\t|\\b(times?)\\b(?:\\((\\d+)\\))?(\\swith(?:out)?\\stime\\szone\\b)?\n\n\t\t\t\t# special case, captures 12, 13, 14i, 15\n\t\t\t\t|\\b(timestamp)(?:(s|tz))?\\b(?:\\((\\d+)\\))?(\\s(with|without)\\stime\\szone\\b)?\n\n\t\t\t" + }, + { + "match": "(?i:\\b((?:primary|foreign)\\s+key|references|on\\sdelete(\\s+cascade)?|nocheck|check|constraint|collate|default)\\b)", + "name": "storage.modifier.sql" + }, + { + "match": "\\b\\d+\\b", + "name": "constant.numeric.sql" + }, + { + "match": "(?i:\\b(select(\\s+(all|distinct))?|insert\\s+(ignore\\s+)?into|update|delete|from|set|where|group\\s+by|or|like|and|union(\\s+all)?|having|order\\s+by|limit|cross\\s+join|join|straight_join|(inner|(left|right|full)(\\s+outer)?)\\s+join|natural(\\s+(inner|(left|right|full)(\\s+outer)?))?\\s+join)\\b)", + "name": "keyword.other.DML.sql" + }, + { + "match": "(?i:\\b(on|off|((is\\s+)?not\\s+)?null)\\b)", + "name": "keyword.other.DDL.create.II.sql" + }, + { + "match": "(?i:\\bvalues\\b)", + "name": "keyword.other.DML.II.sql" + }, + { + "match": "(?i:\\b(begin(\\s+work)?|start\\s+transaction|commit(\\s+work)?|rollback(\\s+work)?)\\b)", + "name": "keyword.other.LUW.sql" + }, + { + "match": "(?i:\\b(grant(\\swith\\sgrant\\soption)?|revoke)\\b)", + "name": "keyword.other.authorization.sql" + }, + { + "match": "(?i:\\bin\\b)", + "name": "keyword.other.data-integrity.sql" + }, + { + "match": "(?i:^\\s*(comment\\s+on\\s+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\\s+.*?\\s+(is)\\s+)", + "name": "keyword.other.object-comments.sql" + }, + { + "match": "(?i)\\bAS\\b", + "name": "keyword.other.alias.sql" + }, + { + "match": "(?i)\\b(DESC|ASC)\\b", + "name": "keyword.other.order.sql" + }, + { + "match": "\\*", + "name": "keyword.operator.star.sql" + }, + { + "match": "[!<>]?=|<>|<|>", + "name": "keyword.operator.comparison.sql" + }, + { + "match": "-|\\+|/", + "name": "keyword.operator.math.sql" + }, + { + "match": "\\|\\|", + "name": "keyword.operator.concatenator.sql" + }, + { + "match": "(?i)\\b(approx_count_distinct|approx_percentile_cont|approx_percentile_disc|avg|checksum_agg|count|count_big|group|grouping|grouping_id|max|min|sum|stdev|stdevp|var|varp)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.aggregate.sql" + } + } + }, + { + "match": "(?i)\\b(cume_dist|first_value|lag|last_value|lead|percent_rank|percentile_cont|percentile_disc)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.analytic.sql" + } + } + }, + { + "match": "(?i)\\b(bit_count|get_bit|left_shift|right_shift|set_bit)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.bitmanipulation.sql" + } + } + }, + { + "match": "(?i)\\b(cast|convert|parse|try_cast|try_convert|try_parse)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.conversion.sql" + } + } + }, + { + "match": "(?i)\\b(collationproperty|tertiary_weights)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.collation.sql" + } + } + }, + { + "match": "(?i)\\b(asymkey_id|asymkeyproperty|certproperty|cert_id|crypt_gen_random|decryptbyasymkey|decryptbycert|decryptbykey|decryptbykeyautoasymkey|decryptbykeyautocert|decryptbypassphrase|encryptbyasymkey|encryptbycert|encryptbykey|encryptbypassphrase|hashbytes|is_objectsigned|key_guid|key_id|key_name|signbyasymkey|signbycert|symkeyproperty|verifysignedbycert|verifysignedbyasymkey)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.cryptographic.sql" + } + } + }, + { + "match": "(?i)\\b(cursor_status)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.cursor.sql" + } + } + }, + { + "match": "(?i)\\b(sysdatetime|sysdatetimeoffset|sysutcdatetime|current_time(stamp)?|getdate|getutcdate|datename|datepart|day|month|year|datefromparts|datetime2fromparts|datetimefromparts|datetimeoffsetfromparts|smalldatetimefromparts|timefromparts|datediff|dateadd|datetrunc|eomonth|switchoffset|todatetimeoffset|isdate|date_bucket)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.datetime.sql" + } + } + }, + { + "match": "(?i)\\b(datalength|ident_current|ident_incr|ident_seed|identity|sql_variant_property)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.datatype.sql" + } + } + }, + { + "match": "(?i)\\b(coalesce|nullif)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.expression.sql" + } + } + }, + { + "match": "(?<!@)@@(?i)\\b(cursor_rows|connections|cpu_busy|datefirst|dbts|error|fetch_status|identity|idle|io_busy|langid|language|lock_timeout|max_connections|max_precision|nestlevel|options|packet_errors|pack_received|pack_sent|procid|remserver|rowcount|servername|servicename|spid|textsize|timeticks|total_errors|total_read|total_write|trancount|version)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.globalvar.sql" + } + } + }, + { + "match": "(?i)\\b(json|isjson|json_object|json_array|json_value|json_query|json_modify|json_path_exists)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.json.sql" + } + } + }, + { + "match": "(?i)\\b(choose|iif|greatest|least)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.logical.sql" + } + } + }, + { + "match": "(?i)\\b(abs|acos|asin|atan|atn2|ceiling|cos|cot|degrees|exp|floor|log|log10|pi|power|radians|rand|round|sign|sin|sqrt|square|tan)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.mathematical.sql" + } + } + }, + { + "match": "(?i)\\b(app_name|applock_mode|applock_test|assemblyproperty|col_length|col_name|columnproperty|database_principal_id|databasepropertyex|db_id|db_name|file_id|file_idex|file_name|filegroup_id|filegroup_name|filegroupproperty|fileproperty|fulltextcatalogproperty|fulltextserviceproperty|index_col|indexkey_property|indexproperty|object_definition|object_id|object_name|object_schema_name|objectproperty|objectpropertyex|original_db_name|parsename|schema_id|schema_name|scope_identity|serverproperty|stats_date|type_id|type_name|typeproperty)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.metadata.sql" + } + } + }, + { + "match": "(?i)\\b(rank|dense_rank|ntile|row_number)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.ranking.sql" + } + } + }, + { + "match": "(?i)\\b(generate_series|opendatasource|openjson|openrowset|openquery|openxml|predict|string_split)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.rowset.sql" + } + } + }, + { + "match": "(?i)\\b(certencoded|certprivatekey|current_user|database_principal_id|has_perms_by_name|is_member|is_rolemember|is_srvrolemember|original_login|permissions|pwdcompare|pwdencrypt|schema_id|schema_name|session_user|suser_id|suser_sid|suser_sname|system_user|suser_name|user_id|user_name)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.security.sql" + } + } + }, + { + "match": "(?i)\\b(ascii|char|charindex|concat|difference|format|left|len|lower|ltrim|nchar|nodes|patindex|quotename|replace|replicate|reverse|right|rtrim|soundex|space|str|string_agg|string_escape|string_split|stuff|substring|translate|trim|unicode|upper)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.string.sql" + } + } + }, + { + "match": "(?i)\\b(binary_checksum|checksum|compress|connectionproperty|context_info|current_request_id|current_transaction_id|decompress|error_line|error_message|error_number|error_procedure|error_severity|error_state|formatmessage|get_filestream_transaction_context|getansinull|host_id|host_name|isnull|isnumeric|min_active_rowversion|newid|newsequentialid|rowcount_big|session_context|session_id|xact_state)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.system.sql" + } + } + }, + { + "match": "(?i)\\b(patindex|textptr|textvalid)\\b\\s*\\(", + "captures": { + "1": { + "name": "support.function.textimage.sql" + } + } + }, + { + "captures": { + "1": { + "name": "constant.other.database-name.sql" + }, + "2": { + "name": "constant.other.table-name.sql" + } + }, + "match": "(\\w+?)\\.(\\w+)" + }, + { + "include": "#strings" + }, + { + "include": "#regexps" + }, + { + "match": "\\b(?i)(abort|abort_after_wait|absent|absolute|accent_sensitivity|acceptable_cursopt|acp|action|activation|add|address|admin|aes_128|aes_192|aes_256|affinity|after|aggregate|algorithm|all_constraints|all_errormsgs|all_indexes|all_levels|all_results|allow_connections|allow_dup_row|allow_encrypted_value_modifications|allow_page_locks|allow_row_locks|allow_snapshot_isolation|alter|altercolumn|always|anonymous|ansi_defaults|ansi_null_default|ansi_null_dflt_off|ansi_null_dflt_on|ansi_nulls|ansi_padding|ansi_warnings|appdomain|append|application|apply|arithabort|arithignore|array|assembly|asymmetric|asynchronous_commit|at|atan2|atomic|attach|attach_force_rebuild_log|attach_rebuild_log|audit|auth_realm|authentication|auto|auto_cleanup|auto_close|auto_create_statistics|auto_drop|auto_shrink|auto_update_statistics|auto_update_statistics_async|automated_backup_preference|automatic|autopilot|availability|availability_mode|backup|backup_priority|base64|basic|batches|batchsize|before|between|bigint|binary|binding|bit|block|blockers|blocksize|bmk|both|break|broker|broker_instance|bucket_count|buffer|buffercount|bulk_logged|by|call|caller|card|case|catalog|catch|cert|certificate|change_retention|change_tracking|change_tracking_context|changes|char|character|character_set|check_expiration|check_policy|checkconstraints|checkindex|checkpoint|checksum|cleanup_policy|clear|clear_port|close|clustered|codepage|collection|column_encryption_key|column_master_key|columnstore|columnstore_archive|colv_80_to_100|colv_100_to_80|commit_differential_base|committed|compatibility_level|compress_all_row_groups|compression|compression_delay|concat_null_yields_null|concatenate|configuration|connect|containment|continue|continue_after_error|contract|contract_name|control|conversation|conversation_group_id|conversation_handle|copy|copy_only|count_rows|counter|create(\\\\s+or\\\\s+alter)?|credential|cross|cryptographic|cryptographic_provider|cube|cursor|cursor_close_on_commit|cursor_default|data|data_compression|data_flush_interval_seconds|data_mirroring|data_purity|data_source|database|database_name|database_snapshot|datafiletype|date_correlation_optimization|date|datefirst|dateformat|date_format|datetime|datetime2|datetimeoffset|day(s)?|db_chaining|dbid|dbidexec|dbo_only|deadlock_priority|deallocate|dec|decimal|declare|decrypt|decrypt_a|decryption|default_database|default_fulltext_language|default_language|default_logon_domain|default_schema|definition|delay|delayed_durability|delimitedtext|density_vector|dependent|des|description|desired_state|desx|differential|digest|disable|disable_broker|disable_def_cnst_chk|disabled|disk|distinct|distributed|distribution|drop|drop_existing|dts_buffers|dump|durability|dynamic|edition|elements|else|emergency|empty|enable|enable_broker|enabled|encoding|encrypted|encrypted_value|encryption|encryption_type|end|endpoint|endpoint_url|enhancedintegrity|entry|error_broker_conversations|errorfile|estimateonly|event|except|exec|executable|execute|exists|expand|expiredate|expiry_date|explicit|external|external_access|failover|failover_mode|failure_condition_level|fast|fast_forward|fastfirstrow|federated_service_account|fetch|field_terminator|fieldterminator|file|filelistonly|filegroup|filegrowth|filename|filestream|filestream_log|filestream_on|filetable|file_format|filter|first_row|fips_flagger|fire_triggers|first|firstrow|float|flush_interval_seconds|fmtonly|following|for|force|force_failover_allow_data_loss|force_service_allow_data_loss|forced|forceplan|formatfile|format_options|format_type|formsof|forward_only|free_cursors|free_exec_context|fullscan|fulltext|fulltextall|fulltextkey|function|generated|get|geography|geometry|global|go|goto|governor|guid|hadoop|hardening|hash|hashed|header_limit|headeronly|health_check_timeout|hidden|hierarchyid|histogram|histogram_steps|hits_cursors|hits_exec_context|hour(s)?|http|identity|identity_value|if|ifnull|ignore|ignore_constraints|ignore_dup_key|ignore_dup_row|ignore_triggers|image|immediate|implicit_transactions|include|include_null_values|incremental|index|inflectional|init|initiator|insensitive|insert|instead|int|integer|integrated|intersect|intermediate|interval_length_minutes|into|inuse_cursors|inuse_exec_context|io|is|isabout|iso_week|isolation|job_tracker_location|json|keep|keep_nulls|keep_replication|keepdefaults|keepfixed|keepidentity|keepnulls|kerberos|key|key_path|key_source|key_store_provider_name|keyset|kill|kilobytes_per_batch|labelonly|langid|language|last|lastrow|leading|legacy_cardinality_estimation|length|level|lifetime|lineage_80_to_100|lineage_100_to_80|listener_ip|listener_port|load|loadhistory|lob_compaction|local|local_service_name|locate|location|lock_escalation|lock_timeout|lockres|log|login|login_type|loop|manual|mark_in_use_for_removal|masked|master|matched|max_queue_readers|max_duration|max_outstanding_io_per_volume|maxdop|maxerrors|maxlength|maxtransfersize|max_plans_per_query|max_storage_size_mb|mediadescription|medianame|mediapassword|memogroup|memory_optimized|merge|message|message_forward_size|message_forwarding|microsecond|millisecond|minute(s)?|mirror_address|misses_cursors|misses_exec_context|mixed|modify|money|month|move|multi_user|must_change|name|namespace|nanosecond|native|native_compilation|nchar|ncharacter|nested_triggers|never|new_account|new_broker|newname|next|no|no_browsetable|no_checksum|no_compression|no_infomsgs|no_triggers|no_truncate|nocount|noexec|noexpand|noformat|noinit|nolock|nonatomic|nonclustered|nondurable|none|norecompute|norecovery|noreset|norewind|noskip|not|notification|nounload|now|nowait|ntext|ntlm|nulls|numeric|numeric_roundabort|nvarchar|object|objid|oem|offline|old_account|online|operation_mode|open|openjson|optimistic|option|orc|out|outer|output|over|override|owner|ownership|pad_index|page|page_checksum|page_verify|pagecount|paglock|param|parameter_sniffing|parameter_type_expansion|parameterization|parquet|parseonly|partial|partition|partner|password|path|pause|percentage|permission_set|persisted|period|physical_only|plan_forcing_mode|policy|pool|population|ports|preceding|precision|predicate|presume_abort|primary|primary_role|print|prior|priority |priority_level|private|proc(edure)?|procedure_name|profile|provider|quarter|query_capture_mode|query_governor_cost_limit|query_optimizer_hotfixes|query_store|queue|quoted_identifier|raiserror|range|raw|rcfile|rc2|rc4|rc4_128|rdbms|read_committed_snapshot|read|read_only|read_write|readcommitted|readcommittedlock|readonly|readpast|readuncommitted|readwrite|real|rebuild|receive|recmodel_70backcomp|recompile|reconfigure|recovery|recursive|recursive_triggers|redo_queue|reject_sample_value|reject_type|reject_value|relative|remote|remote_data_archive|remote_proc_transactions|remote_service_name|remove|removed_cursors|removed_exec_context|reorganize|repeat|repeatable|repeatableread|replace|replica|replicated|replnick_100_to_80|replnickarray_80_to_100|replnickarray_100_to_80|required|required_cursopt|resample|reset|resource|resource_manager_location|respect|restart|restore|restricted_user|resume|retaindays|retention|return|revert|rewind|rewindonly|returns|robust|role|rollup|root|round_robin|route|row|rowdump|rowguidcol|rowlock|row_terminator|rows|rows_per_batch|rowsets_only|rowterminator|rowversion|rsa_1024|rsa_2048|rsa_3072|rsa_4096|rsa_512|safe|safety|sample|save|scalar|schema|schemabinding|scoped|scroll|scroll_locks|sddl|second|secexpr|seconds|secondary|secondary_only|secondary_role|secret|security|securityaudit|selective|self|send|sent|sequence|serde_method|serializable|server|service|service_broker|service_name|service_objective|session_timeout|session|sessions|seterror|setopts|sets|shard_map_manager|shard_map_name|sharded|shared_memory|show_statistics|showplan_all|showplan_text|showplan_xml|showplan_xml_with_recompile|shrinkdb|shutdown|sid|signature|simple|single_blob|single_clob|single_nclob|single_user|singleton|site|size|size_based_cleanup_mode|skip|smalldatetime|smallint|smallmoney|snapshot|snapshot_import|snapshotrestorephase|soap|softnuma|sort_in_tempdb|sorted_data|sorted_data_reorg|spatial|sql|sql_bigint|sql_binary|sql_bit|sql_char|sql_date|sql_decimal|sql_double|sql_float|sql_guid|sql_handle|sql_longvarbinary|sql_longvarchar|sql_numeric|sql_real|sql_smallint|sql_time|sql_timestamp|sql_tinyint|sql_tsi_day|sql_tsi_frac_second|sql_tsi_hour|sql_tsi_minute|sql_tsi_month|sql_tsi_quarter|sql_tsi_second|sql_tsi_week|sql_tsi_year|sql_type_date|sql_type_time|sql_type_timestamp|sql_varbinary|sql_varchar|sql_variant|sql_wchar|sql_wlongvarchar|ssl|ssl_port|standard|standby|start|start_date|started|stat_header|state|statement|static|statistics|statistics_incremental|statistics_norecompute|statistics_only|statman|stats|stats_stream|status|stop|stop_on_error|stopat|stopatmark|stopbeforemark|stoplist|stopped|string_delimiter|subject|supplemental_logging|supported|suspend|symmetric|synchronous_commit|synonym|sysname|system|system_time|system_versioning|table|tableresults|tablock|tablockx|take|tape|target|target_index|target_partition|target_recovery_time|tcp|temporal_history_retention|text|textimage_on|then|thesaurus|throw|time|timeout|timestamp|tinyint|to|top|torn_page_detection|track_columns_updated|trailing|tran|transaction|transfer|transform_noise_words|triple_des|triple_des_3key|truncate|trustworthy|try|tsql|two_digit_year_cutoff|type|type_desc|type_warning|tzoffset|uid|unbounded|uncommitted|unique|uniqueidentifier|unlimited|unload|unlock|unsafe|updlock|url|use|useplan|useroptions|use_type_default|using|utcdatetime|valid_xml|validation|value|values|varbinary|varchar|verbose|verifyonly|version|view_metadata|virtual_device|visiblity|wait_at_low_priority|waitfor|webmethod|week|weekday|weight|well_formed_xml|when|while|widechar|widechar_ansi|widenative|window|windows|with|within|within group|witness|without|without_array_wrapper|workload|wsdl|xact_abort|xlock|xml|xmlschema|xquery|xsinil|year|zone)\\b", + "name": "keyword.other.sql" + }, + { + "captures": { + "1": { + "name": "punctuation.section.scope.begin.sql" + }, + "2": { + "name": "punctuation.section.scope.end.sql" + } + }, + "comment": "Allow for special ↩ behavior", + "match": "(\\()(\\))", + "name": "meta.block.sql" + } + ], + "repository": { + "comments": { + "patterns": [ + { + "begin": "(^[ \\t]+)?(?=--)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.sql" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "--", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.sql" + } + }, + "end": "\\n", + "name": "comment.line.double-dash.sql" + } + ] + }, + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.sql" + } + }, + "end": "(?!\\G)", + "patterns": [] + }, + { + "include": "#comment-block" + } + ] + }, + "comment-block": { + "begin": "/\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.sql" + } + }, + "end": "\\*/", + "name": "comment.block", + "patterns": [ + { + "include": "#comment-block" + } + ] + }, + "regexps": { + "patterns": [ + { + "begin": "/(?=\\S.*/)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.sql" + } + }, + "end": "/", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.sql" + } + }, + "name": "string.regexp.sql", + "patterns": [ + { + "include": "#string_interpolation" + }, + { + "match": "\\\\/", + "name": "constant.character.escape.slash.sql" + } + ] + }, + { + "begin": "%r\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.sql" + } + }, + "comment": "We should probably handle nested bracket pairs!?! -- Allan", + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.sql" + } + }, + "name": "string.regexp.modr.sql", + "patterns": [ + { + "include": "#string_interpolation" + } + ] + } + ] + }, + "string_escape": { + "match": "\\\\.", + "name": "constant.character.escape.sql" + }, + "string_interpolation": { + "captures": { + "1": { + "name": "punctuation.definition.string.begin.sql" + }, + "3": { + "name": "punctuation.definition.string.end.sql" + } + }, + "match": "(#\\{)([^\\}]*)(\\})", + "name": "string.interpolated.sql" + }, + "strings": { + "patterns": [ + { + "captures": { + "2": { + "name": "punctuation.definition.string.begin.sql" + }, + "3": { + "name": "punctuation.definition.string.end.sql" + } + }, + "comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.", + "match": "(N)?(')[^']*(')", + "name": "string.quoted.single.sql" + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.sql" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.sql" + } + }, + "name": "string.quoted.single.sql", + "patterns": [ + { + "include": "#string_escape" + } + ] + }, + { + "captures": { + "1": { + "name": "punctuation.definition.string.begin.sql" + }, + "2": { + "name": "punctuation.definition.string.end.sql" + } + }, + "comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.", + "match": "(`)[^`\\\\]*(`)", + "name": "string.quoted.other.backtick.sql" + }, + { + "begin": "`", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.sql" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.sql" + } + }, + "name": "string.quoted.other.backtick.sql", + "patterns": [ + { + "include": "#string_escape" + } + ] + }, + { + "captures": { + "1": { + "name": "punctuation.definition.string.begin.sql" + }, + "2": { + "name": "punctuation.definition.string.end.sql" + } + }, + "comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.", + "match": "(\")[^\"#]*(\")", + "name": "string.quoted.double.sql" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.sql" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.sql" + } + }, + "name": "string.quoted.double.sql", + "patterns": [ + { + "include": "#string_interpolation" + } + ] + }, + { + "begin": "%\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.sql" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.sql" + } + }, + "name": "string.other.quoted.brackets.sql", + "patterns": [ + { + "include": "#string_interpolation" + } + ] + } + ] + } + } +} diff --git a/src/lib/shiki/languages/ssh-config.tmLanguage.json b/src/lib/shiki/languages/ssh-config.tmLanguage.json new file mode 100644 index 0000000..0d097e3 --- /dev/null +++ b/src/lib/shiki/languages/ssh-config.tmLanguage.json @@ -0,0 +1,84 @@ +{ + "fileTypes": ["ssh_config", ".ssh/config", "sshd_config"], + "name": "ssh-config", + "patterns": [ + { + "match": "\\b(A(cceptEnv|dd(ressFamily|KeysToAgent)|llow(AgentForwarding|Groups|StreamLocalForwarding|TcpForwarding|Users)|uth(enticationMethods|orized((Keys(Command(User)?|File)|Principals(Command(User)?|File)))))|B(anner|atchMode|ind(Address|Interface))|C(anonical(Domains|ize(FallbackLocal|Hostname|MaxDots|PermittedCNAMEs))|ertificateFile|hallengeResponseAuthentication|heckHostIP|hrootDirectory|iphers?|learAllForwardings|ientAlive(CountMax|Interval)|ompression(Level)?|onnect(Timeout|ionAttempts)|ontrolMaster|ontrolPath|ontrolPersist)|D(eny(Groups|Users)|isableForwarding|ynamicForward)|E(nableSSHKeysign|scapeChar|xitOnForwardFailure|xposeAuthInfo)|F(ingerprintHash|orceCommand|orward(Agent|X11(Timeout|Trusted)?))|G(atewayPorts|SSAPI(Authentication|CleanupCredentials|ClientIdentity|DelegateCredentials|KeyExchange|RenewalForcesRekey|ServerIdentity|StrictAcceptorCheck|TrustDns)|atewayPorts|lobalKnownHostsFile)|H(ashKnownHosts|ost(based(AcceptedKeyTypes|Authentication|KeyTypes|UsesNameFromPacketOnly)|Certificate|Key(Agent|Algorithms|Alias)?|Name))|I(dentit(iesOnly|y(Agent|File))|gnore(Rhosts|Unknown|UserKnownHosts)|nclude|PQoS)|K(bdInteractive(Authentication|Devices)|erberos(Authentication|GetAFSToken|OrLocalPasswd|TicketCleanup)|exAlgorithms)|L(istenAddress|ocal(Command|Forward)|oginGraceTime|ogLevel)|M(ACs|atch|ax(AuthTries|Sessions|Startups))|N(oHostAuthenticationForLocalhost|umberOfPasswordPrompts)|P(KCS11Provider|asswordAuthentication|ermit(EmptyPasswords|LocalCommand|Open|RootLogin|TTY|Tunnel|User(Environment|RC))|idFile|ort|referredAuthentications|rint(LastLog|Motd)|rotocol|roxy(Command|Jump|UseFdpass)|ubkey(AcceptedKeyTypes|Authentication))|R(Domain|SAAuthentication|ekeyLimit|emote(Command|Forward)|equestTTY|evoked(HostKeys|Keys)|hostsRSAAuthentication)|S(endEnv|erverAlive(CountMax|Interval)|treamLocalBind(Mask|Unlink)|trict(HostKeyChecking|Modes)|ubsystem|yslogFacility)|T(CPKeepAlive|rustedUserCAKeys|unnel(Device)?)|U(pdateHostKeys|se(BlacklistedKeys|DNS|Keychain|PAM|PrivilegedPort|r(KnownHostsFile)?))|V(erifyHostKeyDNS|ersionAddendum|isualHostKey)|X(11(DisplayOffset|Forwarding|UseLocalhost)|AuthLocation))\\b", + "name": "keyword.other.ssh-config" + }, + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.ssh-config" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.ssh-config" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.ssh-config" + } + ] + }, + { + "begin": "(^[ \\t]+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.ssh-config" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.ssh-config" + } + }, + "end": "\\n", + "name": "comment.line.double-slash.ssh-config" + } + ] + }, + { + "captures": { + "1": { + "name": "storage.type.ssh-config" + }, + "2": { + "name": "entity.name.section.ssh-config" + }, + "3": { + "name": "meta.toc-list.ssh-config" + } + }, + "match": "(?:^| |\\t)(Host)\\s+((.*))$" + }, + { + "match": "\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b", + "name": "constant.numeric.ssh-config" + }, + { + "match": "\\b[0-9]+\\b", + "name": "constant.numeric.ssh-config" + }, + { + "match": "\\b(yes|no)\\b", + "name": "constant.language.ssh-config" + }, + { + "match": "\\b[A-Z_]+\\b", + "name": "constant.language.ssh-config" + } + ], + "scopeName": "source.ssh-config", + "uuid": "B273855C-59D3-4DF3-9B7C-E68E0057D315" +} diff --git a/src/lib/shiki/languages/stata.tmLanguage.json b/src/lib/shiki/languages/stata.tmLanguage.json new file mode 100644 index 0000000..f0786ec --- /dev/null +++ b/src/lib/shiki/languages/stata.tmLanguage.json @@ -0,0 +1,3045 @@ +{ + "scopeName": "source.stata", + "name": "stata", + "fileTypes": ["do", "ado", "mata"], + "foldingStartMarker": "\\{\\s*$", + "foldingStopMarker": "^\\s*\\}", + "patterns": [ + { + "include": "#ascii-regex-functions" + }, + { + "include": "#unicode-regex-functions" + }, + { + "include": "#constants" + }, + { + "include": "#functions" + }, + { + "include": "#comments" + }, + { + "include": "#subscripts" + }, + { + "include": "#operators" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#builtin_variables" + }, + { + "include": "#macro-commands" + }, + { + "comment": "keywords that delimit flow conditionals", + "name": "keyword.control.conditional.stata", + "match": "\\b(if|else if|else)\\b" + }, + { + "captures": { + "1": { + "name": "storage.type.scalar.stata" + } + }, + "match": "^\\s*(sca(lar|la|l)?(\\s+de(fine|fin|fi|f)?)?)\\s+(?!(drop|dir?|l(ist|is|i)?)\\s+)" + }, + { + "begin": "\\b(mer(ge|g)?)\\s+(1|m|n)(:)(1|m|n)", + "beginCaptures": { + "1": { + "name": "keyword.control.flow.stata" + }, + "3": { + "patterns": [ + { + "include": "#constants" + }, + { + "match": "m|n", + "name": "" + } + ] + }, + "4": { + "name": "punctuation.separator.key-value" + }, + "5": { + "patterns": [ + { + "include": "#constants" + }, + { + "match": "m|n", + "name": "" + } + ] + } + }, + "end": "using", + "patterns": [ + { + "include": "#builtin_variables" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#comments" + } + ] + }, + { + "match": "\\b(foreach)\\s+((?!in|of).+)\\s+(in|of var(list|lis|li|l)?|of new(list|lis|li|l)?|of num(list|lis|li|l)?)\\b", + "captures": { + "1": { + "name": "keyword.control.flow.stata" + }, + "2": { + "patterns": [ + { + "include": "#macro-local-identifiers" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + } + ] + }, + "3": { + "name": "keyword.control.flow.stata" + } + } + }, + { + "begin": "\\b(foreach)\\s+((?!in|of).+)\\s+(of loc(al|a)?|of glo(bal|ba|b)?)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.flow.stata" + }, + "2": { + "patterns": [ + { + "include": "#macro-local-identifiers" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + } + ] + }, + "3": { + "name": "keyword.control.flow.stata" + } + }, + "end": "(?=\\s*\\{)", + "patterns": [ + { + "include": "#macro-local-identifiers" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + } + ] + }, + { + "begin": "\\b(forvalues|forvalue|forvalu|forval|forva|forv)\\s*", + "end": "\\s*(=)\\s*([^\\{]+)\\s*|(?=\\n)", + "beginCaptures": { + "1": { + "name": "keyword.control.flow.stata" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.assignment.stata" + }, + "2": { + "patterns": [ + { + "include": "#constants" + }, + { + "include": "#operators" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + } + ] + } + }, + "patterns": [ + { + "include": "#macro-local-identifiers" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + } + ] + }, + { + "comment": "keywords that delimit loops", + "name": "keyword.control.flow.stata", + "match": "\\b(while|continue)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.other.stata" + } + }, + "comment": "keywords that haven't fit into other groups (yet).", + "match": "\\b(as|ass|asse|asser|assert)\\b" + }, + { + "match": "\\b(by(sort|sor|so|s)?|statsby|rolling|bootstrap|jackknife|permute|simulate|svy|mi est(imate|imat|ima|im|i)?|nestreg|stepwise|xi|fp|mfp|vers(ion|io|i)?)\\b", + "name": "storage.type.function.stata", + "comment": "prefixes that require a colon" + }, + { + "comment": "prefixes that don't need a colon", + "name": "keyword.control.flow.stata", + "match": "\\b(qui(etly|etl|et|e)?|n(oisily|oisil|oisi|ois|oi|o)?|cap(ture|tur|tu|t)?)\\b:?" + }, + { + "match": "\\s*(pr(ogram|ogra|ogr|og|o)?)\\s+((di(r)?|drop|l(ist|is|i)?)\\s+)([\\w&&[^0-9]]\\w{0,31})", + "captures": { + "1": { + "name": "storage.type.function.stata" + }, + "3": { + "name": "storage.type.function.stata" + }, + "7": { + "name": "entity.name.function.stata" + } + } + }, + { + "begin": "^\\s*(pr(ogram|ogra|ogr|og|o)?)\\s+(de(fine|fin|fi|f)?\\s+)?", + "beginCaptures": { + "1": { + "name": "storage.type.function.stata" + }, + "3": { + "name": "storage.type.function.stata" + } + }, + "end": "(?=,|\\n|/)", + "patterns": [ + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "match": "[\\w&&[^0-9]]\\w{0,31}", + "name": "entity.name.function.stata" + }, + { + "match": "[^A-za-z_0-9,\\n/ ]+", + "name": "invalid.illegal.name.stata" + } + ] + }, + { + "match": "\\b(form(at|a)?)\\s*([\\w&&[^0-9]]\\w{0,31})*\\s*(%)(-)?(0)?([0-9]+)(.)([0-9]+)(e|f|g)(c)?", + "captures": { + "1": "keyword.functions.data.stata.test" + } + }, + { + "include": "#braces-with-error" + }, + { + "begin": "(?=syntax)", + "end": "\\n", + "patterns": [ + { + "comment": "color before the comma", + "begin": "syntax", + "beginCaptures": { + "0": { + "name": "keyword.functions.program.stata" + } + }, + "end": "(?=,|\\n)", + "patterns": [ + { + "begin": "///", + "end": "\\n", + "name": "comment.block.stata" + }, + { + "match": "\\[", + "name": "punctuation.definition.parameters.begin.stata" + }, + { + "match": "\\]", + "name": "punctuation.definition.parameters.end.stata" + }, + { + "match": "\\b(varlist|varname|newvarlist|newvarname|namelist|name|anything)\\b", + "name": "entity.name.type.class.stata" + }, + { + "match": "\\b((if|in|using|fweight|aweight|pweight|iweight))\\b(/)?", + "captures": { + "2": { + "name": "entity.name.type.class.stata" + }, + "3": { + "name": "keyword.operator.arithmetic.stata" + } + } + }, + { + "match": "(/)?(exp)", + "captures": { + "1": { + "name": "keyword.operator.arithmetic.stata" + }, + "2": { + "name": "entity.name.type.class.stata" + } + } + }, + { + "include": "#constants" + }, + { + "include": "#operators" + }, + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#builtin_variables" + } + ] + }, + { + "comment": "things to color after the comma", + "begin": ",", + "beginCaptures": { + "0": { + "name": "punctuation.definition.variable.begin.stata" + } + }, + "end": "(?=\\n)", + "patterns": [ + { + "begin": "///", + "end": "\\n", + "name": "comment.block.stata" + }, + { + "comment": "color options with parentheses", + "begin": "([^\\s\\[\\]]+)(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#macro-local-identifiers" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + } + ], + "comment": "these are the names that become macros" + }, + "2": { + "name": "keyword.operator.parentheses.stata" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.operator.parentheses.stata" + } + }, + "patterns": [ + { + "comment": "the first word is often a type", + "match": "\\b(integer|intege|integ|inte|int|real|string|strin|stri|str)\\b", + "captures": { + "0": { + "name": "support.type.stata" + } + } + }, + { + "include": "#constants" + }, + { + "include": "#operators" + }, + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#builtin_variables" + } + ] + }, + { + "include": "#macro-local-identifiers" + }, + { + "include": "#constants" + }, + { + "include": "#operators" + }, + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#builtin_variables" + } + ] + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.functions.data.stata" + } + }, + "comment": "one-word commands", + "match": "\\b(sa(v|ve)|saveold|destring|tostring|u(se|s)?|note(s)?|form(at|a)?)\\b" + }, + { + "match": "\\b(exit|end)\\b", + "name": "keyword.functions.data.stata", + "comment": "programming commands" + }, + { + "match": "\\b(replace)\\s+([^=]+)\\s*((==)|(=))", + "captures": { + "1": { + "name": "keyword.functions.data.stata" + }, + "2": { + "patterns": [ + { + "include": "#macro-local" + } + ] + }, + "4": { + "name": "invalid.illegal.name.stata" + }, + "5": { + "name": "keyword.operator.assignment.stata" + } + } + }, + { + "match": "\\b(g(enerate|enerat|enera|ener|ene|en|e)?|egen)\\s+((byte|int|long|float|double|str[1-9]?[0-9]?[0-9]?[0-9]?|strL)\\s+)?([^=\\s]+)\\s*((==)|(=))", + "captures": { + "1": { + "name": "keyword.functions.data.stata" + }, + "3": { + "name": "support.type.stata" + }, + "5": { + "patterns": [ + { + "include": "#reserved-names" + }, + { + "include": "#macro-local" + } + ] + }, + "7": { + "name": "invalid.illegal.name.stata" + }, + "8": { + "name": "keyword.operator.assignment.stata" + } + } + }, + { + "match": "\\b(set ty(pe|p)?)\\s+((byte|int|long|float|double|str[1-9]?[0-9]?[0-9]?[0-9]?|strL)?\\s+)\\b", + "captures": { + "1": { + "name": "keyword.functions.data.stata" + }, + "3": { + "name": "support.type.stata" + } + } + }, + { + "match": "\\b(la(bel|be|b)?)\\s+(var(iable|iabl|iab|ia|i)?)\\s+([\\w&&[^0-9]]\\w{0,31})\\s+(`\")(.+)(\"')", + "captures": { + "1": { + "name": "keyword.functions.data.stata" + }, + "3": { + "name": "keyword.functions.data.stata" + }, + "6": { + "name": "punctuation.definition.string.begin.stata" + }, + "7": { + "patterns": [ + { + "include": "#string-compound" + }, + { + "include": "#macro-local-escaped" + }, + { + "include": "#macro-global-escaped" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "match": "[^`\\$]{81,}", + "name": "invalid.illegal.name.stata" + }, + { + "match": ".", + "name": "string.quoted.double.compound.stata" + } + ] + }, + "8": { + "name": "punctuation.definition.string.begin.stata" + } + } + }, + { + "match": "\\b(la(bel|be|b)?)\\s+(var(iable|iabl|iab|ia|i)?)\\s+([\\w&&[^0-9]]\\w{0,31})\\s+(\")(.+)(\")", + "captures": { + "1": { + "name": "keyword.functions.data.stata" + }, + "3": { + "name": "keyword.functions.data.stata" + }, + "6": { + "name": "punctuation.definition.string.begin.stata" + }, + "7": { + "patterns": [ + { + "include": "#macro-local-escaped" + }, + { + "include": "#macro-global-escaped" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "match": "[^`\\$]{81,}", + "name": "invalid.illegal.name.stata" + }, + { + "match": ".", + "name": "string.quoted.double.stata" + } + ] + }, + "8": { + "name": "punctuation.definition.string.begin.stata" + } + } + }, + { + "match": "\\b(la(bel|be|b)?)\\s+(da(ta|t)?|var(iable|iabl|iab|ia|i)?|de(f|fi|fin|fine)?|val(ues|ue|u)?|di(r)?|l(ist|is|i)?|copy|drop|save|lang(uage|uag|ua|u)?)\\b", + "captures": { + "1": { + "name": "keyword.functions.data.stata" + }, + "3": { + "name": "keyword.functions.data.stata" + } + } + }, + { + "begin": "\\b(drop|keep)\\b(?!\\s+(if|in)\\b)", + "beginCaptures": { + "1": { + "name": "keyword.functions.data.stata" + } + }, + "end": "\\n", + "patterns": [ + { + "match": "\\b(if|in)\\b", + "name": "invalid.illegal.name.stata" + }, + { + "include": "#comments" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#operators" + } + ] + }, + { + "match": "\\b(drop|keep)\\s+(if|in)\\b", + "captures": { + "1": { + "name": "keyword.functions.data.stata" + }, + "2": { + "name": "keyword.functions.data.stata" + } + } + }, + { + "begin": "^\\s*mata:?\\s*$", + "comment": "won't match single-line Mata statements", + "end": "^\\s*end\\s*$\\n?", + "name": "meta.embedded.block.mata", + "patterns": [ + { + "match": "(?<![^$\\s])(version|pragma|if|else|for|while|do|break|continue|goto|return)(?=\\s)", + "name": "keyword.control.mata" + }, + { + "captures": { + "1": { + "name": "storage.type.eltype.mata" + }, + "4": { + "name": "storage.type.orgtype.mata" + } + }, + "match": "\\b(transmorphic|string|numeric|real|complex|(pointer(\\([^)]+\\))?))\\s+(matrix|vector|rowvector|colvector|scalar)\\b", + "name": "storage.type.mata" + }, + { + "comment": "need to end with whitespace character here or last group doesn't match", + "match": "\\b(transmorphic|string|numeric|real|complex|(pointer(\\([^)]+\\))?))\\s", + "name": "storage.type.eltype.mata" + }, + { + "match": "\\b(matrix|vector|rowvector|colvector|scalar)\\b", + "name": "storage.type.orgtype.mata" + }, + { + "match": "\\!|\\+\\+|\\-\\-|\\&|\\'|\\?|\\\\|\\:\\:|\\,|\\.\\.|\\||\\=|\\=\\=|\\>\\=|\\<\\=|\\<|\\>|\\!\\=|\\#|\\+|\\-|\\*|\\^|\\/", + "name": "keyword.operator.mata" + }, + { + "include": "$self" + } + ] + }, + { + "begin": "\\b(odbc)\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.flow.stata" + } + }, + "end": "\\n", + "patterns": [ + { + "begin": "///", + "end": "\\n", + "name": "comment.block.stata" + }, + { + "begin": "(exec?)(\\(\")", + "beginCaptures": { + "1": { + "name": "support.function.builtin.stata" + }, + "2": { + "name": "punctuation.definition.parameters.begin.stata" + } + }, + "end": "\"\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.stata" + } + }, + "patterns": [ + { + "include": "source.sql" + } + ] + }, + { + "include": "$self" + } + ] + }, + { + "include": "#commands-other" + } + ], + "repository": { + "functions": { + "patterns": [ + { + "begin": "\\b((abbrev|abs|acos|acosh|asin|asinh|atan|atan2|atanh|autocode|betaden|binomial|binomialp|binomialtail|binormalbofd|byteorder|c|cauchy|cauchyden|cauchytail|Cdhms|ceil|char|chi2|chi2den|chi2tail|Chms|cholesky|chop|clip|clock|Clock|cloglog|Cmdyhms|cofC|Cofc|cofd|Cofd|coleqnumb|collatorlocale|collatorversion|colnfreeparms|colnumb|colsof|comb|cond|corr|cos|cosh|daily|date|day|det|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|dhms|diag|diag0cnt|digamma|dofb|dofc|dofC|dofh|dofm|dofq|dofw|dofy|dow|doy|dunnettprob|e|el|epsdouble|epsfloat|exp|exponential|exponentialden|exponentialtail|F|Fden|fileexists|fileread|filereaderror|filewrite|float|floor|fmtwidth|Ftail|gammaden|gammap|gammaptail|get|hadamard|halfyear|halfyearly|hh|hhC|hms|hofd|hours|hypergeometric|hypergeometricp|I|ibeta|ibetatail|igaussian|igaussianden|igaussiantail|indexnot|inlist|inrange|int|inv|invbinomial|invbinomialtail|invcauchy|invcauchytail|invchi2|invchi2tail|invcloglog|invdunnettprob|invexponential|invexponentialtail|invF|invFtail|invgammap|invgammaptail|invibeta|invibetatail|invigaussian|invigaussiantail|invlaplace|invlaplacetail|invlogistic|invlogistictail|invlogit|invnbinomial|invnbinomialtail|invnchi2|invnchi2tail|invnF|invnFtail|invnibeta|invnormal|invnt|invnttail|invpoisson|invpoissontail|invsym|invt|invttail|invtukeyprob|invweibull|invweibullph|invweibullphtail|invweibulltail|irecode|issymmetric|itrim|J|laplace|laplaceden|laplacetail|length|ln|lncauchyden|lnfactorial|lngamma|lnigammaden|lnigaussianden|lniwishartden|lnlaplaceden|lnmvnormalden|lnnormal|lnnormalden|lnwishartden|log|log10|logistic|logisticden|logistictail|logit|lower|ltrim|matmissing|matrix|matuniform|max|maxbyte|maxdouble|maxfloat|maxint|maxlong|mdy|mdyhms|mi|min|minbyte|mindouble|minfloat|minint|minlong|minutes|missing|mm|mmC|mod|mofd|month|monthly|mreldif|msofhours|msofminutes|msofseconds|nbetaden|nbinomial|nbinomialp|nbinomialtail|nchi2|nchi2den|nchi2tail|nF|nFden|nFtail|nibeta|normal|normalden|npnchi2|npnF|npnt|nt|ntden|nttail|nullmat|plural|poisson|poissonp|poissontail|proper|qofd|quarter|quarterly|r|rbeta|rbinomial|rcauchy|rchi2|real|recode|regexs|reldif|replay|return|reverse|rexponential|rgamma|rhypergeometric|rigaussian|rlaplace|rlogistic|rnbinomial|rnormal|round|roweqnumb|rownfreeparms|rownumb|rowsof|rpoisson|rt|rtrim|runiform|runiformint|rweibull|rweibullph|s|scalar|seconds|sign|sin|sinh|smallestdouble|soundex|sqrt|ss|ssC|string|stritrim|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrpos|strrtrim|strtoname|strtrim|strupper|subinstr|subinword|substr|sum|sweep|t|tan|tanh|tc|tC|td|tden|th|tin|tm|tobytes|tq|trace|trigamma|trim|trunc|ttail|tukeyprob|tw|twithin|uchar|udstrlen|udsubstr|uisdigit|uisletter|upper|ustrcompare|ustrcompareex|ustrfix|ustrfrom|ustrinvalidcnt|ustrleft|ustrlen|ustrlower|ustrltrim|ustrnormalize|ustrpos|ustrregexs|ustrreverse|ustrright|ustrrpos|ustrrtrim|ustrsortkey|ustrsortkeyex|ustrtitle|ustrto|ustrtohex|ustrtoname|ustrtrim|ustrunescape|ustrupper|ustrword|ustrwordcount|usubinstr|usubstr|vec|vecdiag|week|weekly|weibull|weibullden|weibullph|weibullphden|weibullphtail|weibulltail|wofd|word|wordbreaklocale|wordcount|year|yearly|yh|ym|yofd|yq|yw)|([\\w&&[^0-9]]\\w{0,31}))(\\()", + "beginCaptures": { + "2": { + "name": "support.function.builtin.stata" + }, + "3": { + "name": "support.function.custom.stata" + }, + "4": { + "name": "punctuation.definition.parameters.begin.stata" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.stata" + } + }, + "patterns": [ + { + "match": "[\\w&&[^0-9]]\\w{0,31}", + "name": "variable.parameter.function.stata" + }, + { + "begin": "\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "keyword.operator.parentheses.stata" + } + }, + "endCaptures": { + "0": { + "name": "keyword.operator.parentheses.stata" + } + }, + "patterns": [ + { + "include": "#ascii-regex-functions" + }, + { + "include": "#unicode-regex-functions" + }, + { + "include": "#functions" + }, + { + "include": "#subscripts" + }, + { + "include": "#constants" + }, + { + "include": "#comments" + }, + { + "include": "#operators" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#builtin_variables" + }, + { + "include": "#macro-commands" + }, + { + "include": "#braces-without-error" + }, + { + "match": "[\\w&&[^0-9]]\\w{0,31}", + "name": "variable.parameter.function.stata" + } + ] + }, + { + "include": "#ascii-regex-functions" + }, + { + "include": "#unicode-regex-functions" + }, + { + "include": "#functions" + }, + { + "include": "#subscripts" + }, + { + "include": "#constants" + }, + { + "include": "#comments" + }, + { + "include": "#operators" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#builtin_variables" + }, + { + "include": "#macro-commands" + }, + { + "include": "#braces-without-error" + } + ] + } + ] + }, + "builtin_types": { + "patterns": [ + { + "match": "\\b(byte|int|long|float|double|str[1-9]?[0-9]?[0-9]?[0-9]?|strL)\\b", + "name": "support.type.stata" + } + ] + }, + "builtin_variables": { + "patterns": [ + { + "match": "\\b(_b|_coef|_cons|_n|_N|_rc|_se)\\b", + "name": "variable.object.stata" + } + ] + }, + "braces-without-error": { + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "keyword.control.block.begin.stata" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "keyword.control.block.end.stata" + } + } + } + ] + }, + "braces-with-error": { + "patterns": [ + { + "comment": "correct with nothing else on the line but whitespace; before and after; before; after; correct", + "begin": "(\\{)\\s*([^\\n]*)(?=\\n)", + "beginCaptures": { + "1": { + "name": "keyword.control.block.begin.stata" + }, + "2": { + "patterns": [ + { + "include": "#comments" + }, + { + "match": "[^\\n]+", + "name": "illegal.invalid.name.stata" + } + ] + } + }, + "end": "^\\s*(\\})\\s*$|^\\s*([^\\*\"\\}]+)\\s+(\\})\\s*([^\\*\"\\}/\\n]+)|^\\s*([^\"\\*\\}]+)\\s+(\\})|\\s*(\\})\\s*([^\"\\*\\}/\\n]+)|(\\})$", + "endCaptures": { + "1": { + "name": "keyword.control.block.end.stata" + }, + "2": { + "name": "invalid.illegal.name.stata" + }, + "3": { + "name": "keyword.control.block.end.stata" + }, + "4": { + "name": "invalid.illegal.name.stata" + }, + "5": { + "name": "invalid.illegal.name.stata" + }, + "6": { + "name": "keyword.control.block.end.stata" + }, + "7": { + "name": "keyword.control.block.end.stata" + }, + "8": { + "name": "invalid.illegal.name.stata" + }, + "9": { + "name": "keyword.control.block.end.stata" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "commands-other": { + "patterns": [ + { + "comment": "Add on commands", + "match": "\\b(reghdfe|ivreghdfe|ivreg2|outreg|gcollapse|gcontract|gegen|gisid|glevelsof|gquantiles)\\b", + "name": "keyword.control.flow.stata" + }, + { + "comment": "Built in commands", + "match": "\\b(about|ac|acprplot|ado|adopath|adoupdate|alpha|ameans|an|ano|anov|anova|anova_terms|anovadef|aorder|ap|app|appe|appen|append|arch|arch_dr|arch_estat|arch_p|archlm|areg|areg_p|args|arima|arima_dr|arima_estat|arima_p|asmprobit|asmprobit_estat|asmprobit_lf|asmprobit_mfx__dlg|asmprobit_p|avplot|avplots|bcskew0|bgodfrey|binreg|bip0_lf|biplot|bipp_lf|bipr_lf|bipr_p|biprobit|bitest|bitesti|bitowt|blogit|bmemsize|boot|bootsamp|boxco_l|boxco_p|boxcox|boxcox_p|bprobit|br|break|brier|bro|brow|brows|browse|brr|brrstat|bs|bsampl_w|bsample|bsqreg|bstat|bstrap|ca|ca_estat|ca_p|cabiplot|camat|canon|canon_estat|canon_p|caprojection|cat|cc|cchart|cci|cd|censobs_table|centile|cf|char|chdir|checkdlgfiles|checkestimationsample|checkhlpfiles|checksum|chelp|ci|cii|cl|class|classutil|clear|cli|clis|clist|clog|clog_lf|clog_p|clogi|clogi_sw|clogit|clogit_lf|clogit_p|clogitp|clogl_sw|cloglog|clonevar|clslistarray|cluster|cluster_measures|cluster_stop|cluster_tree|cluster_tree_8|clustermat|cmdlog|cnr|cnre|cnreg|cnreg_p|cnreg_sw|cnsreg|codebook|collaps4|collapse|colormult_nb|colormult_nw|compare|compress|conf|confi|confir|confirm|conren|cons|const|constr|constra|constrai|constrain|constraint|contract|copy|copyright|copysource|cor|corc|corr|corr2data|corr_anti|corr_kmo|corr_smc|corre|correl|correla|correlat|correlate|corrgram|cou|coun|count|cprplot|crc|cret|cretu|cretur|creturn|cross|cs|cscript|cscript_log|csi|ct|ct_is|ctset|ctst_st|cttost|cumsp|cumul|cusum|cutil|d|datasig|datasign|datasigna|datasignat|datasignatu|datasignatur|datasignature|datetof|db|dbeta|de|dec|deco|decod|decode|deff|des|desc|descr|descri|describ|describe|dfbeta|dfgls|dfuller|di|di_g|dir|dirstats|dis|discard|disp|disp_res|disp_s|displ|displa|display|do|doe|doed|doedi|doedit|dotplot|dprobit|drawnorm|ds|ds_util|dstdize|duplicates|durbina|dwstat|dydx|ed|edi|edit|eivreg|emdef|en|enc|enco|encod|encode|eq|erase|ereg|ereg_lf|ereg_p|ereg_sw|ereghet|ereghet_glf|ereghet_glf_sh|ereghet_gp|ereghet_ilf|ereghet_ilf_sh|ereghet_ip|eret|eretu|eretur|ereturn|err|erro|error|est|est_cfexist|est_cfname|est_clickable|est_expand|est_hold|est_table|est_unhold|est_unholdok|estat|estat_default|estat_summ|estat_vce_only|esti|estimates|etodow|etof|etomdy|expand|expandcl|fac|fact|facto|factor|factor_estat|factor_p|factor_pca_rotated|factor_rotate|factormat|fcast|fcast_compute|fcast_graph|fdades|fdadesc|fdadescr|fdadescri|fdadescrib|fdadescribe|fdasav|fdasave|fdause|fh_st|file|filefilter|fillin|find_hlp_file|findfile|findit|fit|fl|fli|flis|flist|fpredict|frac_adj|frac_chk|frac_cox|frac_ddp|frac_dis|frac_dv|frac_in|frac_mun|frac_pp|frac_pq|frac_pv|frac_wgt|frac_xo|fracgen|fracplot|fracpoly|fracpred|fron_ex|fron_hn|fron_p|fron_tn|fron_tn2|frontier|ftodate|ftoe|ftomdy|ftowdate|gamhet_glf|gamhet_gp|gamhet_ilf|gamhet_ip|gamma|gamma_d2|gamma_p|gamma_sw|gammahet|gdi_hexagon|gdi_spokes|genrank|genstd|genvmean|gettoken|gladder|glim_l01|glim_l02|glim_l03|glim_l04|glim_l05|glim_l06|glim_l07|glim_l08|glim_l09|glim_l10|glim_l11|glim_l12|glim_lf|glim_mu|glim_nw1|glim_nw2|glim_nw3|glim_p|glim_v1|glim_v2|glim_v3|glim_v4|glim_v5|glim_v6|glim_v7|glm|glm_p|glm_sw|glmpred|glogit|glogit_p|gmeans|gnbre_lf|gnbreg|gnbreg_p|gomp_lf|gompe_sw|gomper_p|gompertz|gompertzhet|gomphet_glf|gomphet_glf_sh|gomphet_gp|gomphet_ilf|gomphet_ilf_sh|gomphet_ip|gphdot|gphpen|gphprint|gprefs|gprobi_p|gprobit|gr|gr7|gr_copy|gr_current|gr_db|gr_describe|gr_dir|gr_draw|gr_draw_replay|gr_drop|gr_edit|gr_editviewopts|gr_example|gr_example2|gr_export|gr_print|gr_qscheme|gr_query|gr_read|gr_rename|gr_replay|gr_save|gr_set|gr_setscheme|gr_table|gr_undo|gr_use|graph|grebar|greigen|grmeanby|gs_fileinfo|gs_filetype|gs_graphinfo|gs_stat|gsort|gwood|h|hareg|hausman|haver|he|heck_d2|heckma_p|heckman|heckp_lf|heckpr_p|heckprob|hel|help|hereg|hetpr_lf|hetpr_p|hetprob|hettest|hexdump|hilite|hist|histogram|hlogit|hlu|hmeans|hotel|hotelling|hprobit|hreg|hsearch|icd9|icd9_ff|icd9p|iis|impute|imtest|inbase|include|inf|infi|infil|infile|infix|inp|inpu|input|ins|insheet|insp|inspe|inspec|inspect|integ|inten|intreg|intreg_p|intrg2_ll|intrg_ll|intrg_ll2|ipolate|iqreg|ir|irf|irf_create|irfm|iri|is_svy|is_svysum|isid|istdize|ivprobit|ivprobit_p|ivreg|ivreg_footnote|ivtob_lf|ivtobit|ivtobit_p|jacknife|jknife|jkstat|joinby|kalarma1|kap|kapmeier|kappa|kapwgt|kdensity|ksm|ksmirnov|ktau|kwallis|labelbook|ladder|levelsof|leverage|lfit|lfit_p|li|lincom|line|linktest|lis|list|lloghet_glf|lloghet_glf_sh|lloghet_gp|lloghet_ilf|lloghet_ilf_sh|lloghet_ip|llogi_sw|llogis_p|llogist|llogistic|llogistichet|lnorm_lf|lnorm_sw|lnorma_p|lnormal|lnormalhet|lnormhet_glf|lnormhet_glf_sh|lnormhet_gp|lnormhet_ilf|lnormhet_ilf_sh|lnormhet_ip|lnskew0|loadingplot|(?<!\\.)log|logi|logis_lf|logistic|logistic_p|logit|logit_estat|logit_p|loglogs|logrank|loneway|lookfor|lookup|lowess|lpredict|lrecomp|lroc|lrtest|ls|lsens|lsens_x|lstat|ltable|ltriang|lv|lvr2plot|m|ma|mac|macr|macro|makecns|man|manova|manovatest|mantel|mark|markin|markout|marksample|mat|mat_capp|mat_order|mat_put_rr|mat_rapp|mata|mata_clear|mata_describe|mata_drop|mata_matdescribe|mata_matsave|mata_matuse|mata_memory|mata_mlib|mata_mosave|mata_rename|mata_which|matalabel|matcproc|matlist|matname|matr|matri|matrix|matrix_input__dlg|matstrik|mcc|mcci|md0_|md1_|md1debug_|md2_|md2debug_|mds|mds_estat|mds_p|mdsconfig|mdslong|mdsmat|mdsshepard|mdytoe|mdytof|me_derd|mean|means|median|memory|memsize|mfp|mfx|mhelp|mhodds|minbound|mixed_ll|mixed_ll_reparm|mkassert|mkdir|mkmat|mkspline|ml|ml_adjs|ml_bhhhs|ml_c_d|ml_check|ml_clear|ml_cnt|ml_debug|ml_defd|ml_e0|ml_e0_bfgs|ml_e0_cycle|ml_e0_dfp|ml_e0i|ml_e1|ml_e1_bfgs|ml_e1_bhhh|ml_e1_cycle|ml_e1_dfp|ml_e2|ml_e2_cycle|ml_ebfg0|ml_ebfr0|ml_ebfr1|ml_ebh0q|ml_ebhh0|ml_ebhr0|ml_ebr0i|ml_ecr0i|ml_edfp0|ml_edfr0|ml_edfr1|ml_edr0i|ml_eds|ml_eer0i|ml_egr0i|ml_elf|ml_elf_bfgs|ml_elf_bhhh|ml_elf_cycle|ml_elf_dfp|ml_elfi|ml_elfs|ml_enr0i|ml_enrr0|ml_erdu0|ml_erdu0_bfgs|ml_erdu0_bhhh|ml_erdu0_bhhhq|ml_erdu0_cycle|ml_erdu0_dfp|ml_erdu0_nrbfgs|ml_exde|ml_footnote|ml_geqnr|ml_grad0|ml_graph|ml_hbhhh|ml_hd0|ml_hold|ml_init|ml_inv|ml_log|ml_max|ml_mlout|ml_mlout_8|ml_model|ml_nb0|ml_opt|ml_p|ml_plot|ml_query|ml_rdgrd|ml_repor|ml_s_e|ml_score|ml_searc|ml_technique|ml_unhold|mleval|mlf_|mlmatbysum|mlmatsum|mlog|mlogi|mlogit|mlogit_footnote|mlogit_p|mlopts|mlsum|mlvecsum|mnl0_|mor|more|mov|move|mprobit|mprobit_lf|mprobit_p|mrdu0_|mrdu1_|mvdecode|mvencode|mvreg|mvreg_estat|nbreg|nbreg_al|nbreg_lf|nbreg_p|nbreg_sw|nestreg|net|newey|newey_p|news|nl|nlcom|nlcom_p|nlexp2|nlexp2a|nlexp3|nlgom3|nlgom4|nlinit|nllog3|nllog4|nlog_rd|nlogit|nlogit_p|nlogitgen|nlogittree|nlpred|nobreak|notes_dlg|nptrend|numlabel|numlist|old_ver|olo|olog|ologi|ologi_sw|ologit|ologit_p|ologitp|on|one|onew|onewa|oneway|op_colnm|op_comp|op_diff|op_inv|op_str|opr|opro|oprob|oprob_sw|oprobi|oprobi_p|oprobit|oprobitp|opts_exclusive|order|orthog|orthpoly|ou|out|outf|outfi|outfil|outfile|outs|outsh|outshe|outshee|outsheet|ovtest|pac|palette|parse_dissim|pause|pca|pca_display|pca_estat|pca_p|pca_rotate|pcamat|pchart|pchi|pcorr|pctile|pentium|pergram|personal|peto_st|pkcollapse|pkcross|pkequiv|pkexamine|pkshape|pksumm|plugin|pnorm|poisgof|poiss_lf|poiss_sw|poisso_p|poisson|poisson_estat|post|postclose|postfile|postutil|pperron|prais|prais_e|prais_e2|prais_p|predict|predictnl|preserve|print|prob|probi|probit|probit_estat|probit_p|proc_time|procoverlay|procrustes|procrustes_estat|procrustes_p|profiler|prop|proportion|prtest|prtesti|pwcorr|pwd|qs|qby|qbys|qchi|qladder|qnorm|qqplot|qreg|qreg_c|qreg_p|qreg_sw|qu|quadchk|quantile|que|quer|query|range|ranksum|ratio|rchart|rcof|recast|recode|reg|reg3|reg3_p|regdw|regr|regre|regre_p2|regres|regres_p|regress|regress_estat|regriv_p|remap|ren|rena|renam|rename|renpfix|repeat|reshape|restore|ret|retu|retur|return|rmdir|robvar|roccomp|rocf_lf|rocfit|rocgold|rocplot|roctab|rologit|rologit_p|rot|rota|rotat|rotate|rotatemat|rreg|rreg_p|ru|run|runtest|rvfplot|rvpplot|safesum|sample|sampsi|savedresults|sc|scatter|scm_mine|sco|scob_lf|scob_p|scobi_sw|scobit|scor|score|scoreplot|scoreplot_help|scree|screeplot|screeplot_help|sdtest|sdtesti|se|search|separate|seperate|serrbar|serset|set|set_defaults|sfrancia|sh|she|shel|shell|shewhart|signestimationsample|signrank|signtest|simul|sktest|sleep|slogit|slogit_d2|slogit_p|smooth|snapspan|so|sor|sort|spearman|spikeplot|spikeplt|spline_x|split|sqreg|sqreg_p|sret|sretu|sretur|sreturn|ssc|st|st_ct|st_hc|st_hcd|st_hcd_sh|st_is|st_issys|st_note|st_promo|st_set|st_show|st_smpl|st_subid|stack|stbase|stci|stcox|stcox_estat|stcox_fr|stcox_fr_ll|stcox_p|stcox_sw|stcoxkm|stcstat|stcurv|stcurve|stdes|stem|stepwise|stfill|stgen|stir|stjoin|stmc|stmh|stphplot|stphtest|stptime|strate|streg|streg_sw|streset|sts|stset|stsplit|stsum|sttocc|sttoct|stvary|su|suest|sum|summ|summa|summar|summari|summariz|summarize|sunflower|sureg|survcurv|survsum|svar|svar_p|svmat|svy_disp|svy_dreg|svy_est|svy_est_7|svy_estat|svy_get|svy_gnbreg_p|svy_head|svy_header|svy_heckman_p|svy_heckprob_p|svy_intreg_p|svy_ivreg_p|svy_logistic_p|svy_logit_p|svy_mlogit_p|svy_nbreg_p|svy_ologit_p|svy_oprobit_p|svy_poisson_p|svy_probit_p|svy_regress_p|svy_sub|svy_sub_7|svy_x|svy_x_7|svy_x_p|svydes|svygen|svygnbreg|svyheckman|svyheckprob|svyintreg|svyintrg|svyivreg|svylc|svylog_p|svylogit|svymarkout|svymean|svymlog|svymlogit|svynbreg|svyolog|svyologit|svyoprob|svyoprobit|svyopts|svypois|svypoisson|svyprobit|svyprobt|svyprop|svyratio|svyreg|svyreg_p|svyregress|svyset|svytab|svytest|svytotal|sw|swilk|symmetry|symmi|symplot|sysdescribe|sysdir|sysuse|szroeter|ta|tab|tab1|tab2|tab_or|tabd|tabdi|tabdis|tabdisp|tabi|table|tabodds|tabstat|tabu|tabul|tabula|tabulat|tabulate|te|tes|test|testnl|testparm|teststd|tetrachoric|time_it|timer|tis|tob|tobi|tobit|tobit_p|tobit_sw|token|tokeni|tokeniz|tokenize|total|translate|translator|transmap|treat_ll|treatr_p|treatreg|trim|trnb_cons|trnb_mean|trpoiss_d2|trunc_ll|truncr_p|truncreg|tsappend|tset|tsfill|tsline|tsline_ex|tsreport|tsrevar|tsrline|tsset|tssmooth|tsunab|ttest|ttesti|tut_chk|tut_wait|tutorial|tw|tware_st|two|twoway|twoway__fpfit_serset|twoway__function_gen|twoway__histogram_gen|twoway__ipoint_serset|twoway__ipoints_serset|twoway__kdensity_gen|twoway__lfit_serset|twoway__normgen_gen|twoway__pci_serset|twoway__qfit_serset|twoway__scatteri_serset|twoway__sunflower_gen|twoway_ksm_serset|ty|typ|type|typeof|unab|unabbrev|unabcmd|update|uselabel|var|var_mkcompanion|var_p|varbasic|varfcast|vargranger|varirf|varirf_add|varirf_cgraph|varirf_create|varirf_ctable|varirf_describe|varirf_dir|varirf_drop|varirf_erase|varirf_graph|varirf_ograph|varirf_rename|varirf_set|varirf_table|varlmar|varnorm|varsoc|varstable|varstable_w|varstable_w2|varwle|vec|vec_fevd|vec_mkphi|vec_p|vec_p_w|vecirf_create|veclmar|veclmar_w|vecnorm|vecnorm_w|vecrank|vecstable|verinst|vers|versi|versio|version|view|viewsource|vif|vwls|wdatetof|webdescribe|webseek|webuse|wh|whelp|whi|which|wilc_st|wilcoxon|win|wind|windo|window|winexec|wntestb|wntestq|xchart|xcorr|xi|xmlsav|xmlsave|xmluse|xpose|xsh|xshe|xshel|xshell|xt_iis|xt_tis|xtab_p|xtabond|xtbin_p|xtclog|xtcloglog|xtcloglog_d2|xtcloglog_pa_p|xtcloglog_re_p|xtcnt_p|xtcorr|xtdata|xtdes|xtfront_p|xtfrontier|xtgee|xtgee_elink|xtgee_estat|xtgee_makeivar|xtgee_p|xtgee_plink|xtgls|xtgls_p|xthaus|xthausman|xtht_p|xthtaylor|xtile|xtint_p|xtintreg|xtintreg_d2|xtintreg_p|xtivreg|xtline|xtline_ex|xtlogit|xtlogit_d2|xtlogit_fe_p|xtlogit_pa_p|xtlogit_re_p|xtmixed|xtmixed_estat|xtmixed_p|xtnb_fe|xtnb_lf|xtnbreg|xtnbreg_pa_p|xtnbreg_refe_p|xtpcse|xtpcse_p|xtpois|xtpoisson|xtpoisson_d2|xtpoisson_pa_p|xtpoisson_refe_p|xtpred|xtprobit|xtprobit_d2|xtprobit_re_p|xtps_fe|xtps_lf|xtps_ren|xtps_ren_8|xtrar_p|xtrc|xtrc_p|xtrchh|xtrefe_p|yx|yxview__barlike_draw|yxview_area_draw|yxview_bar_draw|yxview_dot_draw|yxview_dropline_draw|yxview_function_draw|yxview_iarrow_draw|yxview_ilabels_draw|yxview_normal_draw|yxview_pcarrow_draw|yxview_pcbarrow_draw|yxview_pccapsym_draw|yxview_pcscatter_draw|yxview_pcspike_draw|yxview_rarea_draw|yxview_rbar_draw|yxview_rbarm_draw|yxview_rcap_draw|yxview_rcapsym_draw|yxview_rconnected_draw|yxview_rline_draw|yxview_rscatter_draw|yxview_rspike_draw|yxview_spike_draw|yxview_sunflower_draw|zap_s|zinb|zinb_llf|zinb_plf|zip|zip_llf|zip_p|zip_plf|zt_ct_5|zt_hc_5|zt_hcd_5|zt_is_5|zt_iss_5|zt_sho_5|zt_smp_5|ztnb|ztnb_p|ztp|ztp_p|prtab|prchange|eststo|estout|esttab|estadd|estpost|ivregress|xtreg|xtreg_be|xtreg_fe|xtreg_ml|xtreg_pa_p|xtreg_re|xtregar|xtrere_p|xtset|xtsf_ll|xtsf_llti|xtsum|xttab|xttest0|xttobit|xttobit_p|xttrans)\\b", + "name": "keyword.control.flow.stata" + } + ] + }, + "comments": { + "patterns": [ + { + "include": "#comments-double-slash" + }, + { + "include": "#comments-star" + }, + { + "include": "#comments-block" + }, + { + "include": "#comments-triple-slash" + } + ] + }, + "comments-block": { + "patterns": [ + { + "begin": "/\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.stata" + } + }, + "end": "(\\*/\\s+\\*[^\\n]*)|(\\*/(?!\\*))", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.stata" + } + }, + "name": "comment.block.stata", + "patterns": [ + { + "match": "\\*/\\*", + "comment": "this ends and restarts a comment block. but need to catch this so that it doesn't start _another_ level of comment blocks" + }, + { + "include": "#docblockr-comment" + }, + { + "include": "#comments-block" + }, + { + "include": "#docstring" + } + ] + } + ] + }, + "comments-star": { + "patterns": [ + { + "captures": { + "0": { + "name": "punctuation.definition.comment.stata" + } + }, + "begin": "^\\s*(\\*)", + "name": "comment.line.star.stata", + "end": "(?=\\n)", + "comment": "TODO! need to except out the occasion that a * comes after a /// on the previous line. May be easiest to join with the comment.line.triple-slash.stata below", + "patterns": [ + { + "include": "#docblockr-comment" + }, + { + "begin": "///", + "end": "\\n", + "name": "comment.line-continuation.stata" + }, + { + "include": "#comments" + } + ] + } + ] + }, + "comments-triple-slash": { + "patterns": [ + { + "captures": { + "0": { + "name": "punctuation.definition.comment.stata" + } + }, + "begin": "(^///|(?<=\\s)///)", + "end": "(?=\\n)", + "name": "comment.line.triple-slash.stata", + "patterns": [ + { + "include": "#docblockr-comment" + } + ] + } + ] + }, + "comments-double-slash": { + "patterns": [ + { + "captures": { + "0": { + "name": "punctuation.definition.comment.stata" + } + }, + "begin": "(^//|(?<=\\s)//)(?!/)", + "end": "(?=\\n)", + "name": "comment.line.double-slash.stata", + "patterns": [ + { + "include": "#docblockr-comment" + } + ] + } + ] + }, + "docblockr-comment": { + "patterns": [ + { + "match": "(?<!\\w)(@(error|ERROR|Error))\\b", + "captures": { + "1": { + "name": "invalid.illegal.name.stata" + } + } + }, + { + "match": "(?<!\\w)(@\\w+)\\b", + "captures": { + "1": { + "name": "keyword.docblockr.stata" + } + } + } + ] + }, + "docstring": { + "patterns": [ + { + "begin": "'''", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.stata" + } + }, + "end": "'''", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.begin.stata" + } + }, + "name": "string.quoted.docstring.stata" + }, + { + "begin": "\"\"\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.stata" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.begin.stata" + } + }, + "name": "string.quoted.docstring.stata" + } + ] + }, + "macro-commands": { + "patterns": [ + { + "begin": "\\b(loc(al|a)?)\\s+([\\w'`\\$\\(\\)\\{\\}]+)\\s*(?=:|=)", + "beginCaptures": { + "1": { + "name": "keyword.macro.stata" + }, + "3": { + "patterns": [ + { + "include": "#macro-local-identifiers" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + } + ] + } + }, + "end": "\\n", + "patterns": [ + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "keyword.operator.arithmetic.stata" + } + }, + "end": "(?=\\n)", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "keyword.operator.arithmetic.stata" + } + }, + "end": "(?=\\n)", + "patterns": [ + { + "include": "#macro-extended-functions" + } + ] + } + ] + }, + { + "begin": "\\b(gl(obal|oba|ob|o)?)\\s+(?=[\\w`\\$])", + "beginCaptures": { + "1": { + "name": "keyword.macro.stata" + } + }, + "end": "(\\})|(?=\\\"|\\s|\\n|/|,|=)", + "patterns": [ + { + "include": "#reserved-names" + }, + { + "match": "[\\w&&[^0-9_]]\\w{0,31}", + "name": "entity.name.type.class.stata" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + } + ] + }, + { + "begin": "\\b(loc(al|a)?)\\s+(\\+\\+|\\-\\-)?(?=[\\w`\\$])", + "beginCaptures": { + "1": { + "name": "keyword.macro.stata" + }, + "3": { + "name": "keyword.operator.arithmetic.stata" + } + }, + "end": "(?=\\\"|\\s|\\n|/|,|=)", + "patterns": [ + { + "include": "#macro-local-identifiers" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + } + ] + }, + { + "begin": "\\b(tempvar|tempname|tempfile)\\s*(?=\\s)", + "beginCaptures": { + "1": { + "name": "keyword.macro.stata" + } + }, + "end": "\\n", + "patterns": [ + { + "begin": "///", + "end": "\\n", + "name": "comment.block.stata" + }, + { + "include": "#macro-local-identifiers" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + } + ] + }, + { + "begin": "\\b(ma(cro|cr|c)?)\\s+(drop|l(ist|is|i)?)\\s*(?=\\s)", + "beginCaptures": { + "0": { + "name": "keyword.macro.stata" + } + }, + "end": "\\n", + "patterns": [ + { + "begin": "///", + "end": "\\n", + "name": "comment.block.stata" + }, + { + "match": "\\*", + "name": "keyword.operator.arithmetic.stata" + }, + { + "include": "#constants" + }, + { + "include": "#macro-global" + }, + { + "include": "#macro-local" + }, + { + "include": "#comments" + }, + { + "match": "\\w{1,31}", + "name": "entity.name.type.class.stata" + } + ] + } + ] + }, + "macro-extended-functions": { + "patterns": [ + { + "match": "\\b(properties)\\b", + "name": "keyword.macro.extendedfcn.stata" + }, + { + "match": "\\b(t(ype|yp|y)?|f(ormat|orma|orm|or|o)?|val(ue|u)?\\s+l(able|abl|ab|a)?|var(iable|iabl|iab|ia|i)?\\s+l(abel|abe|ab|a)?|data\\s+l(able|abl|ab|a)?|sort(edby|edb|ed|e)?|lab(el|e)?|maxlength|constraint|char)\\b", + "name": "keyword.macro.extendedfcn.stata" + }, + { + "match": "\\b(permname)\\b", + "name": "keyword.macro.extendedfcn.stata" + }, + { + "match": "\\b(adosubdir|dir|files?|dirs?|other|sysdir)\\b", + "name": "keyword.macro.extendedfcn.stata" + }, + { + "match": "\\b(env(ironment|ironmen|ironme|ironm|iron|iro|ir|i)?)\\b", + "name": "keyword.macro.extendedfcn.stata" + }, + { + "match": "\\b(all\\s+(globals|scalars|matrices)|((numeric|string)\\s+scalars))\\b", + "name": "keyword.macro.extendedfcn.stata" + }, + { + "match": "\\b(list)\\s+(uniq|dups|sort|clean|retok(enize|eniz|eni|en|e)?|sizeof)\\s+(\\w{1,32})", + "captures": { + "1": { + "name": "keyword.macro.extendedfcn.stata" + }, + "2": { + "name": "keyword.macro.extendedfcn.stata" + }, + "3": { + "name": "entity.name.type.class.stata" + } + } + }, + { + "match": "\\b(list)\\s+(\\w{1,32})\\s+(\\||&|\\-|===|==|in)\\s+(\\w{1,32})", + "captures": { + "1": { + "name": "keyword.macro.extendedfcn.stata" + }, + "2": { + "name": "entity.name.type.class.stata" + }, + "3": { + "name": "keyword.operator.list.stata" + }, + "4": { + "name": "entity.name.type.class.stata" + } + } + }, + { + "match": "\\b(list\\s+posof)\\s+(\")(\\w+)(\")\\s+(in)\\s+(\\w{1,32})", + "captures": { + "1": { + "name": "keyword.macro.extendedfcn.stata" + }, + "2": { + "name": "punctuation.definition.string.begin.stata" + }, + "3": { + "name": "string.quoted.double.stata" + }, + "4": { + "name": "punctuation.definition.string.end.stata" + }, + "5": { + "name": "keyword.macro.extendedfcn.stata" + }, + "6": { + "name": "entity.name.type.class.stata" + } + } + }, + { + "match": "\\b(rown(ames|ame|am|a)?|coln(ames|ame|am|a)?|rowf(ullnames|ullname|ullnam|ullna|ulln|ull|ul|u)?|colf(ullnames|ullname|ullnam|ullna|ulln|ull|ul|u)?|roweq?|coleq?|rownumb|colnumb|roweqnumb|coleqnumb|rownfreeparms|colnfreeparms|rownlfs|colnlfs|rowsof|colsof|rowvarlist|colvarlist|rowlfnames|collfnames)\\b", + "name": "keyword.macro.extendedfcn.stata" + }, + { + "match": "\\b(tsnorm)\\b", + "name": "keyword.macro.extendedfcn.stata" + }, + { + "match": "\\b((copy|(ud|u)?strlen)\\s+(loc(al|a)?|gl(obal|oba|ob|o)?))\\s+([^']+)", + "captures": { + "1": { + "name": "keyword.macro.extendedfcn.stata" + }, + "7": { + "patterns": [ + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + } + ] + } + } + }, + { + "match": "\\b(word\\s+count)", + "captures": { + "1": { + "name": "keyword.macro.extendedfcn.stata" + } + } + }, + { + "match": "(word|piece)\\s+([\\s`'\\w]+)\\s+(of)", + "captures": { + "1": { + "name": "keyword.macro.extendedfcn.stata" + }, + "2": { + "patterns": [ + { + "include": "#macro-local" + }, + { + "include": "#constants" + } + ] + }, + "3": { + "name": "keyword.macro.extendedfcn.stata" + } + } + }, + { + "begin": "\\b(subinstr\\s+(loc(al|a)?|gl(obal|oba|ob|o)?))\\s+(\\w{1,32})", + "end": "(?=//|\\n)", + "beginCaptures": { + "1": { + "name": "keyword.macro.extendedfcn.stata" + }, + "5": { + "name": "entity.name.type.class.stata" + } + }, + "patterns": [ + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "match": "(count|coun|cou|co|c)(\\()(local|loca|loc|global|globa|glob|glo|gl)\\s+(\\w{1,32})(\\))", + "captures": { + "1": { + "name": "support.function.builtin.stata" + }, + "2": { + "name": "punctuation.definition.parameters.begin.stata" + }, + "3": { + "name": "keyword.macro.extendedfcn.stata" + }, + "4": { + "name": "entity.name.type.class.stata" + }, + "5": { + "name": "punctuation.definition.parameters.end.stata" + } + } + } + ] + }, + { + "include": "#comments" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "$self" + } + ] + }, + "macro-local-escaped": { + "patterns": [ + { + "comment": "appropriately color macros that have embedded escaped `,', and $ characters for lazy evaluation", + "begin": "\\\\`(?!\")", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.stata" + } + }, + "end": "\\\\'|'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.stata" + } + }, + "patterns": [ + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "match": "\\w{1,31}", + "name": "entity.name.type.class.stata" + } + ] + } + ] + }, + "macro-local": { + "patterns": [ + { + "begin": "(`)(=)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.stata" + }, + "2": { + "name": "keyword.operator.comparison.stata" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.stata" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "(`)(:)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.stata" + }, + "2": { + "name": "keyword.operator.comparison.stata" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.stata" + } + }, + "contentName": "meta.macro-extended-function.stata", + "patterns": [ + { + "include": "#macro-local" + }, + { + "include": "#macro-extended-functions" + }, + { + "include": "#constants" + }, + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + } + ] + }, + { + "begin": "(`)(macval)(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.stata" + }, + "2": { + "name": "support.function.builtin.stata" + }, + "3": { + "name": "punctuation.definition.parameters.begin.stata" + } + }, + "end": "(\\))(')", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.begin.stata" + }, + "2": { + "name": "punctuation.definition.string.end.stata" + } + }, + "contentName": "meta.macro-extended-function.stata", + "patterns": [ + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "match": "\\w{1,31}", + "name": "entity.name.type.class.stata" + } + ] + }, + { + "begin": "`(?!\")", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.stata" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.stata" + } + }, + "patterns": [ + { + "match": "\\+\\+|\\-\\-", + "name": "keyword.operator.arithmetic.stata" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#comments-block" + }, + { + "begin": "[^\\w]", + "end": "\\n|(?=')", + "name": "comment.line.stata" + }, + { + "match": "\\w{1,31}", + "name": "entity.name.type.class.stata" + } + ] + } + ] + }, + "macro-global-escaped": { + "patterns": [ + { + "begin": "(\\\\\\$)(\\\\\\{)?", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.stata" + } + }, + "end": "(\\\\\\})|(?=\\\"|\\s|\\n|/|,)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.stata" + } + }, + "patterns": [ + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "match": "[\\w&&[^0-9_]]\\w{0,31}|_\\w{1,31}", + "name": "entity.name.type.class.stata" + } + ] + } + ] + }, + "macro-global": { + "patterns": [ + { + "begin": "(\\$)(\\{)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.stata" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.stata" + } + }, + "patterns": [ + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#comments-block" + }, + { + "begin": "[^\\w]", + "end": "\\n|(?=})", + "name": "comment.line.stata" + }, + { + "match": "\\w{1,32}", + "name": "entity.name.type.class.stata" + } + ] + }, + { + "begin": "\\$", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.stata" + } + }, + "end": "(?!\\w)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.stata" + } + }, + "patterns": [ + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "match": "[\\w&&[^0-9_]]\\w{0,31}|_\\w{1,31}", + "name": "entity.name.type.class.stata" + } + ] + } + ] + }, + "constants": { + "patterns": [ + { + "include": "#factorvariables" + }, + { + "match": "\\b(?i:(\\d+\\.\\d*(e[\\-\\+]?\\d+)?))(?=[^a-zA-Z_])", + "name": "constant.numeric.float.stata" + }, + { + "match": "(?<=[^0-9a-zA-Z_])(?i:(\\.\\d+(e[\\-\\+]?\\d+)?))", + "name": "constant.numeric.float.stata" + }, + { + "match": "\\b(?i:(\\d+e[\\-\\+]?\\d+))", + "name": "constant.numeric.float.stata" + }, + { + "match": "\\b(\\d+)\\b", + "name": "constant.numeric.integer.decimal.stata" + }, + { + "match": "(?<![\\w])(\\.(?![\\./]))(?![\\w])", + "name": "constant.language.missing.stata" + }, + { + "match": "\\b_all\\b", + "name": "constant.language.allvars.stata" + } + ] + }, + "factorvariables": { + "patterns": [ + { + "match": "\\b(i|c|o)\\.(?=[\\w&&[^0-9]]|\\([\\w&&[^0-9]])", + "name": "constant.language.factorvars.stata" + }, + { + "match": "\\b(i?b)((\\d+)|n)\\.(?=[\\w&&[^0-9]]|\\([\\w&&[^0-9]])", + "captures": { + "0": { + "name": "constant.language.factorvars.stata" + }, + "3": { + "patterns": [ + { + "include": "#constants" + } + ] + } + } + }, + { + "match": "\\b(i?b)(\\()(#\\d+|first|last|freq)(\\))\\.(?=[\\w&&[^0-9]]|\\([\\w&&[^0-9]])", + "captures": { + "0": { + "name": "constant.language.factorvars.stata" + }, + "2": { + "name": "keyword.operator.parentheses.stata" + }, + "3": { + "patterns": [ + { + "include": "#constants" + }, + { + "include": "#operators" + } + ] + }, + "4": { + "name": "keyword.operator.parentheses.stata" + } + } + }, + { + "match": "\\b(i?o?)(\\d+)\\.(?=[\\w&&[^0-9]]|\\([\\w&&[^0-9]])", + "captures": { + "0": { + "name": "constant.language.factorvars.stata" + }, + "2": { + "patterns": [ + { + "include": "#constants" + } + ] + } + } + }, + { + "match": "\\b(i?o?)(\\()(.*?)(\\))(\\.)(?=[\\w&&[^0-9]]|\\([\\w&&[^0-9]])", + "captures": { + "1": { + "name": "constant.language.factorvars.stata" + }, + "2": { + "name": "keyword.operator.parentheses.stata" + }, + "3": { + "patterns": [ + { + "include": "$self" + } + ] + }, + "4": { + "name": "keyword.operator.parentheses.stata" + }, + "5": { + "name": "constant.language.factorvars.stata" + } + } + } + ] + }, + "operators": { + "patterns": [ + { + "match": "\\+\\+|\\-\\-|\\+|\\-|\\*|\\^", + "name": "keyword.operator.arithmetic.stata", + "comment": "++ and -- must come first to support ligatures" + }, + { + "comment": "match division operator but not path separator", + "match": "(?<![\\w.&&[^0-9]])/(?![\\w.&&[^0-9]]|$)", + "name": "keyword.operator.arithmetic.stata" + }, + { + "comment": "match division operator but not path separator", + "match": "(?<![\\w.&&[^0-9]])\\\\(?![\\w.&&[^0-9]]|$)", + "name": "keyword.operator.matrix.addrow.stata" + }, + { + "match": "\\|\\|", + "name": "keyword.operator.graphcombine.stata" + }, + { + "match": "\\&|\\|", + "name": "keyword.operator.logical.stata" + }, + { + "match": "(?:<=|>=|:=|==|!=|~=|<|>|=|!!|!)", + "name": "keyword.operator.comparison.stata" + }, + { + "match": "\\(|\\)", + "name": "keyword.operator.parentheses.stata" + }, + { + "match": "(##|#)", + "name": "keyword.operator.factor-variables.stata" + }, + { + "match": "%", + "name": "keyword.operator.format.stata" + }, + { + "match": ":", + "name": "punctuation.separator.key-value" + }, + { + "match": "\\[", + "name": "punctuation.definition.parameters.begin.stata" + }, + { + "match": "\\]", + "name": "punctuation.definition.parameters.end.stata" + }, + { + "match": ",", + "name": "punctuation.definition.variable.begin.stata" + }, + { + "match": ";", + "name": "keyword.operator.delimiter.stata" + } + ] + }, + "string-compound": { + "patterns": [ + { + "begin": "`\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.stata" + } + }, + "end": "\"'|(?=\n)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.stata" + } + }, + "name": "string.quoted.double.compound.stata", + "patterns": [ + { + "match": "\"", + "name": "string.quoted.double.compound.stata", + "comment": "This must come before #string-regular and #string-compound to accurately color `\"\"\"' in strings" + }, + { + "match": "```(?=[^']*\")", + "name": "meta.markdown.code.block.stata", + "comment": "see https://github.com/kylebarron/language-stata/issues/53" + }, + { + "include": "#string-regular" + }, + { + "include": "#string-compound" + }, + { + "include": "#macro-local-escaped" + }, + { + "include": "#macro-global-escaped" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + } + ] + } + ] + }, + "string-regular": { + "patterns": [ + { + "begin": "(?<!`)\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.stata" + } + }, + "end": "(\")(')?|(?=\n)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.stata" + }, + "2": { + "name": "invalid.illegal.punctuation.stata" + } + }, + "name": "string.quoted.double.stata", + "patterns": [ + { + "match": "```(?=[^']*\")", + "name": "meta.markdown.code.block.stata", + "comment": "see https://github.com/kylebarron/language-stata/issues/53" + }, + { + "include": "#macro-local-escaped" + }, + { + "include": "#macro-global-escaped" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + } + ] + } + ] + }, + "subscripts": { + "patterns": [ + { + "comment": "highlight expressions, like [_n], when using subscripts on a variable", + "begin": "(?<=[\\w'])(\\[)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.parameters.begin.stata" + } + }, + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.stata" + } + }, + "name": "meta.subscripts.stata", + "patterns": [ + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#builtin_variables" + }, + { + "include": "#operators" + }, + { + "include": "#constants" + }, + { + "include": "#functions" + } + ] + } + ] + }, + "reserved-names": { + "patterns": [ + { + "match": "\\b(_all|_b|byte|_coef|_cons|double|float|if|in|int|long|_n|_N|_pi|_pred|_rc|_skip|str[0-9]+|strL|using|with)\\b", + "name": "invalid.illegal.name.stata" + }, + { + "match": "[^\\w'`\\$\\(\\)\\s]", + "name": "invalid.illegal.name.stata" + }, + { + "match": "[0-9][\\w]{31,}", + "name": "invalid.illegal.name.stata" + }, + { + "match": "\\w{33,}", + "name": "invalid.illegal.name.stata" + } + ] + }, + "macro-local-identifiers": { + "patterns": [ + { + "match": "[^\\w'`\\$\\(\\)\\s]", + "name": "invalid.illegal.name.stata" + }, + { + "match": "\\w{32,}", + "name": "invalid.illegal.name.stata" + }, + { + "match": "\\w{1,31}", + "name": "entity.name.type.class.stata" + } + ] + }, + "ascii-regex-functions": { + "patterns": [ + { + "comment": "color regexm with regular quotes i.e. \" ", + "match": "\\b(regexm)(\\()([^,]+)(,)\\s*(\")([^\"]+)(\"(')?)\\s*(\\))", + "captures": { + "1": { + "name": "support.function.builtin.stata" + }, + "2": { + "name": "punctuation.definition.parameters.begin.stata" + }, + "3": { + "patterns": [ + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#functions" + }, + { + "match": "[\\w&&[^0-9]]\\w{0,31}", + "name": "variable.parameter.function.stata" + }, + { + "include": "#comments-triple-slash" + } + ] + }, + "4": { + "name": "punctuation.definition.variable.begin.stata" + }, + "5": { + "name": "punctuation.definition.string.begin.stata" + }, + "6": { + "patterns": [ + { + "include": "#ascii-regex-internals" + } + ] + }, + "7": { + "name": "punctuation.definition.string.end.stata" + }, + "8": { + "name": "invalid.illegal.punctuation.stata" + }, + "9": { + "name": "punctuation.definition.parameters.end.stata" + } + } + }, + { + "comment": "color regexm with compound quotes", + "match": "\\b(regexm)(\\()([^,]+)(,)\\s*(`\")([^\"]+)(\"')\\s*(\\))", + "captures": { + "1": { + "name": "support.function.builtin.stata" + }, + "2": { + "name": "punctuation.definition.parameters.begin.stata" + }, + "3": { + "patterns": [ + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#functions" + }, + { + "match": "[\\w&&[^0-9]]\\w{0,31}", + "name": "variable.parameter.function.stata" + }, + { + "include": "#comments-triple-slash" + } + ] + }, + "4": { + "name": "punctuation.definition.variable.begin.stata" + }, + "5": { + "name": "punctuation.definition.string.begin.stata" + }, + "6": { + "patterns": [ + { + "include": "#ascii-regex-internals" + } + ] + }, + "7": { + "name": "punctuation.definition.string.end.stata" + }, + "8": { + "name": "punctuation.definition.parameters.end.stata" + } + } + }, + { + "comment": "color regexr with regular quotes i.e. \" ", + "match": "\\b(regexr)(\\()([^,]+)(,)\\s*(\")([^\"]+)(\"(')?)\\s*([^\\)]*)(\\))", + "captures": { + "1": { + "name": "support.function.builtin.stata" + }, + "2": { + "name": "punctuation.definition.parameters.begin.stata" + }, + "3": { + "patterns": [ + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#functions" + }, + { + "match": "[\\w&&[^0-9]]\\w{0,31}", + "name": "variable.parameter.function.stata" + }, + { + "include": "#comments" + } + ] + }, + "4": { + "name": "punctuation.definition.variable.begin.stata" + }, + "5": { + "name": "punctuation.definition.string.begin.stata" + }, + "6": { + "patterns": [ + { + "include": "#ascii-regex-internals" + } + ] + }, + "7": { + "name": "punctuation.definition.string.end.stata" + }, + "8": { + "name": "invalid.illegal.punctuation.stata" + }, + "9": { + "patterns": [ + { + "match": ",", + "name": "punctuation.definition.variable.begin.stata" + }, + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#functions" + }, + { + "match": "[\\w&&[^0-9]]\\w{0,31}", + "name": "variable.parameter.function.stata" + }, + { + "include": "#comments-triple-slash" + } + ] + }, + "10": { + "name": "punctuation.definition.parameters.end.stata" + } + } + }, + { + "comment": "color regexr with compound quotes i.e. `\"text\"' ", + "match": "\\b(regexr)(\\()([^,]+)(,)\\s*(`\")([^\"]+)(\"')\\s*([^\\)]*)(\\))", + "captures": { + "1": { + "name": "support.function.builtin.stata" + }, + "2": { + "name": "punctuation.definition.parameters.begin.stata" + }, + "3": { + "patterns": [ + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#functions" + }, + { + "match": "[\\w&&[^0-9]]\\w{0,31}", + "name": "variable.parameter.function.stata" + }, + { + "include": "#comments" + } + ] + }, + "4": { + "name": "punctuation.definition.variable.begin.stata" + }, + "5": { + "name": "punctuation.definition.string.begin.stata" + }, + "6": { + "patterns": [ + { + "include": "#ascii-regex-internals" + } + ] + }, + "7": { + "name": "punctuation.definition.string.end.stata" + }, + "8": { + "patterns": [ + { + "match": ",", + "name": "punctuation.definition.variable.begin.stata" + }, + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#functions" + }, + { + "match": "[\\w&&[^0-9]]\\w{0,31}", + "name": "variable.parameter.function.stata" + }, + { + "include": "#comments-triple-slash" + } + ] + }, + "9": { + "name": "punctuation.definition.parameters.end.stata" + } + } + } + ] + }, + "ascii-regex-internals": { + "patterns": [ + { + "match": "\\^", + "name": "keyword.control.anchor.stata" + }, + { + "match": "\\$(?![a-zA-Z_\\{])", + "name": "keyword.control.anchor.stata", + "comment": "matched when not a global, but must be ascii" + }, + { + "match": "[\\?\\+\\*]", + "name": "keyword.control.quantifier.stata" + }, + { + "match": "\\|", + "name": "keyword.control.or.stata" + }, + { + "begin": "(\\()(?=\\?|\\*|\\+)", + "beginCaptures": { + "1": { + "name": "keyword.operator.group.stata" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.operator.group.stata" + } + }, + "contentName": "invalid.illegal.regexm.stata" + }, + { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "keyword.operator.group.stata" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "keyword.operator.group.stata" + } + }, + "patterns": [ + { + "include": "#ascii-regex-internals" + } + ] + }, + { + "include": "#ascii-regex-character-class" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "comment": "NOTE: Error if I have .+ No idea why but it works fine it seems with just .", + "match": ".", + "name": "string.quoted.stata" + } + ] + }, + "ascii-regex-character-class": { + "patterns": [ + { + "match": "\\\\[\\*\\+\\?\\-\\.\\^\\$\\|\\[\\]\\(\\)\\\\]", + "name": "constant.character.escape.backslash.stata" + }, + { + "match": "\\.", + "name": "constant.character.character-class.stata" + }, + { + "match": "\\\\.", + "name": "illegal.invalid.character-class.stata" + }, + { + "begin": "(\\[)(\\^)?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.character-class.stata" + }, + "2": { + "name": "keyword.operator.negation.stata" + } + }, + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.definition.character-class.stata" + } + }, + "name": "constant.other.character-class.set.stata", + "patterns": [ + { + "include": "#ascii-regex-character-class" + }, + { + "captures": { + "2": { + "name": "constant.character.escape.backslash.stata" + }, + "4": { + "name": "constant.character.escape.backslash.stata" + } + }, + "match": "((\\\\.)|.)\\-((\\\\.)|[^\\]])", + "name": "constant.other.character-class.range.stata" + } + ] + } + ] + }, + "unicode-regex-functions": { + "patterns": [ + { + "comment": "color regexm with regular quotes i.e. \" ", + "match": "\\b(ustrregexm)(\\()([^,]+)(,)\\s*(\")([^\"]+)(\"(')?)([,0-9\\s]*)?\\s*(\\))", + "captures": { + "1": { + "name": "support.function.builtin.stata" + }, + "2": { + "name": "punctuation.definition.parameters.begin.stata" + }, + "3": { + "patterns": [ + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#functions" + }, + { + "match": "[\\w&&[^0-9]]\\w{0,31}", + "name": "variable.parameter.function.stata" + }, + { + "include": "#comments-triple-slash" + } + ] + }, + "4": { + "name": "punctuation.definition.variable.begin.stata" + }, + "5": { + "name": "punctuation.definition.string.begin.stata" + }, + "6": { + "patterns": [ + { + "include": "#unicode-regex-internals" + } + ] + }, + "7": { + "name": "punctuation.definition.string.end.stata" + }, + "8": { + "name": "invalid.illegal.punctuation.stata" + }, + "9": { + "patterns": [ + { + "include": "#constants" + }, + { + "match": ",", + "name": "punctuation.definition.variable.begin.stata" + } + ] + }, + "10": { + "name": "punctuation.definition.parameters.end.stata" + } + } + }, + { + "comment": "color regexm with compound quotes", + "match": "\\b(ustrregexm)(\\()([^,]+)(,)\\s*(`\")([^\"]+)(\"')([,0-9\\s]*)?\\s*(\\))", + "captures": { + "1": { + "name": "support.function.builtin.stata" + }, + "2": { + "name": "punctuation.definition.parameters.begin.stata" + }, + "3": { + "patterns": [ + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#functions" + }, + { + "match": "[\\w&&[^0-9]]\\w{0,31}", + "name": "variable.parameter.function.stata" + }, + { + "include": "#comments-triple-slash" + } + ] + }, + "4": { + "name": "punctuation.definition.variable.begin.stata" + }, + "5": { + "name": "punctuation.definition.string.begin.stata" + }, + "6": { + "patterns": [ + { + "include": "#unicode-regex-internals" + } + ] + }, + "7": { + "name": "punctuation.definition.string.end.stata" + }, + "8": { + "patterns": [ + { + "include": "#constants" + }, + { + "match": ",", + "name": "punctuation.definition.variable.begin.stata" + } + ] + }, + "9": { + "name": "punctuation.definition.parameters.end.stata" + } + } + }, + { + "comment": "color regexr with regular quotes i.e. \" ", + "match": "\\b(ustrregexrf|ustrregexra)(\\()([^,]+)(,)\\s*(\")([^\"]+)(\"(')?)\\s*([^\\)]*)(\\))", + "captures": { + "1": { + "name": "support.function.builtin.stata" + }, + "2": { + "name": "punctuation.definition.parameters.begin.stata" + }, + "3": { + "patterns": [ + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#functions" + }, + { + "match": "[\\w&&[^0-9]]\\w{0,31}", + "name": "variable.parameter.function.stata" + }, + { + "include": "#comments" + } + ] + }, + "4": { + "name": "punctuation.definition.variable.begin.stata" + }, + "5": { + "name": "punctuation.definition.string.begin.stata" + }, + "6": { + "patterns": [ + { + "include": "#unicode-regex-internals" + } + ] + }, + "7": { + "name": "punctuation.definition.string.end.stata" + }, + "8": { + "name": "invalid.illegal.punctuation.stata" + }, + "9": { + "patterns": [ + { + "match": ",", + "name": "punctuation.definition.variable.begin.stata" + }, + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#functions" + }, + { + "match": "[\\w&&[^0-9]]\\w{0,31}", + "name": "variable.parameter.function.stata" + }, + { + "include": "#comments-triple-slash" + }, + { + "include": "#constants" + } + ] + }, + "10": { + "name": "punctuation.definition.parameters.end.stata" + } + } + }, + { + "comment": "color regexr with compound quotes i.e. `\"text\"' ", + "match": "\\b(ustrregexrf|ustrregexra)(\\()([^,]+)(,)\\s*(`\")([^\"]+)(\"')\\s*([^\\)]*)(\\))", + "captures": { + "1": { + "name": "support.function.builtin.stata" + }, + "2": { + "name": "punctuation.definition.parameters.begin.stata" + }, + "3": { + "patterns": [ + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#functions" + }, + { + "match": "[\\w&&[^0-9]]\\w{0,31}", + "name": "variable.parameter.function.stata" + }, + { + "include": "#comments" + } + ] + }, + "4": { + "name": "punctuation.definition.variable.begin.stata" + }, + "5": { + "name": "punctuation.definition.string.begin.stata" + }, + "6": { + "patterns": [ + { + "include": "#unicode-regex-internals" + } + ] + }, + "7": { + "name": "punctuation.definition.string.end.stata" + }, + "8": { + "patterns": [ + { + "match": ",", + "name": "punctuation.definition.variable.begin.stata" + }, + { + "include": "#string-compound" + }, + { + "include": "#string-regular" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "include": "#functions" + }, + { + "match": "[\\w&&[^0-9]]\\w{0,31}", + "name": "variable.parameter.function.stata" + }, + { + "include": "#comments-triple-slash" + }, + { + "include": "#constants" + } + ] + }, + "9": { + "name": "punctuation.definition.parameters.end.stata" + } + } + } + ] + }, + "unicode-regex-internals": { + "patterns": [ + { + "match": "\\\\[bBAZzG]|\\^", + "name": "keyword.control.anchor.stata" + }, + { + "match": "\\$(?![[\\w&&[^0-9_]][\\w]{0,31}|_[\\w]{1,31}\\{])", + "name": "keyword.control.anchor.stata", + "comment": "matched when not a global" + }, + { + "match": "\\\\[1-9][0-9]?", + "name": "keyword.other.back-reference.stata" + }, + { + "match": "[?+*][?+]?|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??", + "name": "keyword.operator.quantifier.stata" + }, + { + "match": "\\|", + "name": "keyword.operator.or.stata" + }, + { + "begin": "\\((?!\\?\\#|\\?=|\\?!|\\?<=|\\?<!)", + "end": "\\)", + "name": "keyword.operator.group.stata", + "patterns": [ + { + "include": "#unicode-regex-internals" + } + ] + }, + { + "begin": "\\(\\?\\#", + "end": "\\)", + "name": "comment.block.stata" + }, + { + "comment": "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.", + "match": "(?<=^|\\s)#\\s[[a-zA-Z0-9,. \\t?!-:][^\\x{00}-\\x{7F}]]*$", + "name": "comment.line.number-sign.stata" + }, + { + "match": "\\(\\?[iLmsux]+\\)", + "name": "keyword.other.option-toggle.stata" + }, + { + "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))", + "beginCaptures": { + "1": { + "name": "keyword.operator.group.stata" + }, + "2": { + "name": "punctuation.definition.group.assertion.stata" + }, + "3": { + "name": "keyword.assertion.look-ahead.stata" + }, + "4": { + "name": "keyword.assertion.negative-look-ahead.stata" + }, + "5": { + "name": "keyword.assertion.look-behind.stata" + }, + "6": { + "name": "keyword.assertion.negative-look-behind.stata" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "keyword.operator.group.stata" + } + }, + "name": "meta.group.assertion.stata", + "patterns": [ + { + "include": "#unicode-regex-internals" + } + ] + }, + { + "begin": "(\\()(\\?\\(([1-9][0-9]?|[a-zA-Z_][a-zA-Z_0-9]*)\\))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.group.stata" + }, + "2": { + "name": "punctuation.definition.group.assertion.conditional.stata" + }, + "3": { + "name": "entity.name.section.back-reference.stata" + } + }, + "comment": "we can make this more sophisticated to match the | character that separates yes-pattern from no-pattern, but it's not really necessary.", + "end": "(\\))", + "name": "meta.group.assertion.conditional.stata", + "patterns": [ + { + "include": "#unicode-regex-internals" + } + ] + }, + { + "include": "#unicode-regex-character-class" + }, + { + "include": "#macro-local" + }, + { + "include": "#macro-global" + }, + { + "comment": "NOTE: Error if I have .+ No idea why but it works fine it seems with just .", + "match": ".", + "name": "string.quoted.stata" + } + ] + }, + "unicode-regex-character-class": { + "patterns": [ + { + "match": "\\\\[wWsSdD]|\\.", + "name": "constant.character.character-class.stata" + }, + { + "match": "\\\\.", + "name": "constant.character.escape.backslash.stata" + }, + { + "begin": "(\\[)(\\^)?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.character-class.stata" + }, + "2": { + "name": "keyword.operator.negation.stata" + } + }, + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.definition.character-class.stata" + } + }, + "name": "constant.other.character-class.set.stata", + "patterns": [ + { + "include": "#unicode-regex-character-class" + }, + { + "captures": { + "2": { + "name": "constant.character.escape.backslash.stata" + }, + "4": { + "name": "constant.character.escape.backslash.stata" + } + }, + "match": "((\\\\.)|.)\\-((\\\\.)|[^\\]])", + "name": "constant.other.character-class.range.stata" + } + ] + } + ] + } + } +} diff --git a/src/lib/shiki/languages/stylus.tmLanguage.json b/src/lib/shiki/languages/stylus.tmLanguage.json new file mode 100644 index 0000000..13a7d7b --- /dev/null +++ b/src/lib/shiki/languages/stylus.tmLanguage.json @@ -0,0 +1,1202 @@ +{ + "name": "stylus", + "scopeName": "source.stylus", + "fileTypes": ["styl", "stylus", "css.styl", "css.stylus"], + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#at_rule" + }, + { + "include": "#language_keywords" + }, + { + "include": "#language_constants" + }, + { + "include": "#variable_declaration" + }, + { + "include": "#function" + }, + { + "include": "#selector" + }, + { + "include": "#declaration" + }, + { + "captures": { + "1": { + "name": "punctuation.section.property-list.begin.css" + }, + "2": { + "name": "punctuation.section.property-list.end.css" + } + }, + "match": "(\\{)(\\})", + "name": "meta.brace.curly.css" + }, + { + "match": "\\{|\\}", + "name": "meta.brace.curly.css" + }, + { + "include": "#numeric" + }, + { + "include": "#string" + }, + { + "include": "#operator" + } + ], + "repository": { + "comment": { + "patterns": [ + { + "include": "#comment_block" + }, + { + "include": "#comment_line" + } + ] + }, + "comment_block": { + "begin": "/\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.css" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.css" + } + }, + "name": "comment.block.css" + }, + "comment_line": { + "begin": "(^[ \\t]+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.stylus" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.stylus" + } + }, + "end": "(?=\\n)", + "name": "comment.line.double-slash.stylus" + } + ] + }, + "selector": { + "patterns": [ + { + "match": "(?:(?=\\w)(?<![\\w-]))(a|abbr|acronym|address|area|article|aside|audio|b|base|bdi|bdo|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|data|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|main|map|mark|math|menu|menuitem|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|rb|rp|rt|rtc|ruby|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)(?:(?<=\\w)(?![\\w-]))", + "name": "entity.name.tag.css" + }, + { + "match": "(?:(?=\\w)(?<![\\w-]))(vkern|view|use|tspan|tref|title|textPath|text|symbol|switch|svg|style|stop|set|script|rect|radialGradient|polyline|polygon|pattern|path|mpath|missing-glyph|metadata|mask|marker|linearGradient|line|image|hkern|glyphRef|glyph|g|foreignObject|font-face-uri|font-face-src|font-face-name|font-face-format|font-face|font|filter|feTurbulence|feTile|feSpotLight|feSpecularLighting|fePointLight|feOffset|feMorphology|feMergeNode|feMerge|feImage|feGaussianBlur|feFuncR|feFuncG|feFuncB|feFuncA|feFlood|feDistantLight|feDisplacementMap|feDiffuseLighting|feConvolveMatrix|feComposite|feComponentTransfer|feColorMatrix|feBlend|ellipse|desc|defs|cursor|color-profile|clipPath|circle|animateTransform|animateMotion|animateColor|animate|altGlyphItem|altGlyphDef|altGlyph|a)(?:(?<=\\w)(?![\\w-]))", + "name": "entity.name.tag.svg.css" + }, + { + "match": "\\s*(\\,)\\s*", + "name": "meta.selector.stylus" + }, + { + "match": "\\*", + "name": "meta.selector.stylus" + }, + { + "match": "\\s*(\\&)([a-zA-Z0-9_-]+)\\s*", + "captures": { + "2": { + "name": "entity.other.attribute-name.parent-selector-suffix.stylus" + } + }, + "name": "meta.selector.stylus" + }, + { + "match": "\\s*(\\&)\\s*", + "name": "meta.selector.stylus" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + } + }, + "match": "(\\.)[a-zA-Z0-9_-]+", + "name": "entity.other.attribute-name.class.css" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + } + }, + "match": "(#)[a-zA-Z][a-zA-Z0-9_-]*", + "name": "entity.other.attribute-name.id.css" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + } + }, + "match": "(:+)(after|before|content|first-letter|first-line|host|(-(moz|webkit|ms)-)?selection)\\b", + "name": "entity.other.attribute-name.pseudo-element.css" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + } + }, + "match": "(:)((first|last)-child|(first|last|only)-of-type|empty|root|target|first|left|right)\\b", + "name": "entity.other.attribute-name.pseudo-class.css" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + } + }, + "match": "(:)(checked|enabled|default|disabled|indeterminate|invalid|optional|required|valid)\\b", + "name": "entity.other.attribute-name.pseudo-class.ui-state.css" + }, + { + "begin": "((:)not)(\\()", + "beginCaptures": { + "1": { + "name": "entity.other.attribute-name.pseudo-class.css" + }, + "2": { + "name": "punctuation.definition.entity.css" + }, + "3": { + "name": "punctuation.section.function.css" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.function.css" + } + }, + "patterns": [ + { + "include": "#selector" + } + ] + }, + { + "captures": { + "1": { + "name": "entity.other.attribute-name.pseudo-class.css" + }, + "2": { + "name": "punctuation.definition.entity.css" + }, + "3": { + "name": "punctuation.section.function.css" + }, + "4": { + "name": "constant.numeric.css" + }, + "5": { + "name": "punctuation.section.function.css" + } + }, + "match": "((:)nth-(?:(?:last-)?child|(?:last-)?of-type))(\\()(\\-?(?:\\d+n?|n)(?:\\+\\d+)?|even|odd)(\\))" + }, + { + "match": "((:)dir)\\s*(?:(\\()(ltr|rtl)?(\\)))?", + "captures": { + "1": { + "name": "entity.other.attribute-name.pseudo-class.css" + }, + "2": { + "name": "puncutation.definition.entity.css" + }, + "3": { + "name": "punctuation.section.function.css" + }, + "4": { + "name": "constant.language.css" + }, + "5": { + "name": "punctuation.section.function.css" + } + } + }, + { + "match": "((:)lang)\\s*(?:(\\()(\\w+(-\\w+)?)?(\\)))?", + "captures": { + "1": { + "name": "entity.other.attribute-name.pseudo-class.css" + }, + "2": { + "name": "puncutation.definition.entity.css" + }, + "3": { + "name": "punctuation.section.function.css" + }, + "4": { + "name": "constant.language.css" + }, + "6": { + "name": "punctuation.section.function.css" + } + } + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + } + }, + "match": "(:)(active|hover|link|visited|focus)\\b", + "name": "entity.other.attribute-name.pseudo-class.css" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + } + }, + "match": "(::)(shadow)\\b", + "name": "entity.other.attribute-name.pseudo-class.css" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + }, + "2": { + "name": "entity.other.attribute-name.attribute.css" + }, + "3": { + "name": "punctuation.separator.operator.css" + }, + "4": { + "name": "string.unquoted.attribute-value.css" + }, + "5": { + "name": "string.quoted.double.attribute-value.css" + }, + "6": { + "name": "punctuation.definition.string.begin.css" + }, + "7": { + "name": "punctuation.definition.string.end.css" + }, + "8": { + "name": "punctuation.definition.entity.css" + } + }, + "match": "(?i)(\\[)\\s*(-?[_a-z\\\\[[:^ascii:]]][_a-z0-9\\-\\\\[[:^ascii:]]]*)(?:\\s*([~|^$*]?=)\\s*(?:(-?[_a-z\\\\[[:^ascii:]]][_a-z0-9\\-\\\\[[:^ascii:]]]*)|((?>(['\"])(?:[^\\\\]|\\\\.)*?(\\6)))))?\\s*(\\])", + "name": "meta.attribute-selector.css" + }, + { + "include": "#interpolation" + }, + { + "include": "#variable" + } + ] + }, + "variable_declaration": { + "begin": "^[^\\S\\n]*(\\$?[a-zA-Z_-][a-zA-Z0-9_-]*)[^\\S\\n]*(\\=|\\?\\=|\\:\\=)", + "beginCaptures": { + "1": { + "name": "variable.stylus" + }, + "2": { + "name": "keyword.operator.stylus" + } + }, + "end": "(\\n)|(;)|(?=\\})", + "endCaptures": { + "2": { + "name": "punctuation.terminator.rule.css" + } + }, + "patterns": [ + { + "include": "#property_values" + } + ] + }, + "declaration": { + "begin": "((?<=^)[^\\S\\n]+)|((?<=;)[^\\S\\n]*)|((?<=\\{)[^\\S\\n]*)", + "end": "(?=\\n)|(;)|(?=\\})|(\\n)", + "endCaptures": { + "2": { + "name": "punctuation.terminator.rule.css" + } + }, + "name": "meta.property-list.css", + "patterns": [ + { + "match": "(?x) (?<![\\w-])\n--\n(?:[-a-zA-Z_] | [^\\x00-\\x7F]) # First letter\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F] # Remainder of identifier\n |\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*", + "name": "variable.css" + }, + { + "include": "#language_keywords" + }, + { + "include": "#language_constants" + }, + { + "match": "(?:(?<=^)[^\\S\\n]+(\\n))" + }, + { + "match": "\\G\\s*(counter-reset|counter-increment)(?:(:)|[^\\S\\n])[^\\S\\n]*([a-zA-Z_-][a-zA-Z0-9_-]*)", + "captures": { + "1": { + "name": "support.type.property-name.css" + }, + "2": { + "name": "punctuation.separator.key-value.css" + }, + "3": { + "name": "variable.section.css" + } + }, + "name": "meta.property.counter.css" + }, + { + "begin": "\\G\\s*(filter)(?:(:)|[^\\S\\n])[^\\S\\n]*", + "beginCaptures": { + "1": { + "name": "support.type.property-name.css" + }, + "2": { + "name": "punctuation.separator.key-value.css" + } + }, + "end": "(?=\\n|;|\\}|$)", + "name": "meta.property.filter.css", + "patterns": [ + { + "include": "#function" + }, + { + "include": "#property_values" + } + ] + }, + { + "include": "#property" + }, + { + "include": "#interpolation" + }, + { + "include": "$self" + } + ] + }, + "property": { + "begin": "(?x:\\G\\s*(?:\n (-webkit-[-A-Za-z]+|-moz-[-A-Za-z]+|-o-[-A-Za-z]+|-ms-[-A-Za-z]+|-khtml-[-A-Za-z]+|zoom|z-index|y|x|wrap|word-wrap|word-spacing|word-break|word|width|widows|white-space-collapse|white-space|white|weight|volume|voice-volume|voice-stress|voice-rate|voice-pitch-range|voice-pitch|voice-family|voice-duration|voice-balance|voice|visibility|vertical-align|variant|user-select|up|unicode-bidi|unicode-range|unicode|trim|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform|touch-action|top-width|top-style|top-right-radius|top-left-radius|top-color|top|timing-function|text-wrap|text-transform|text-shadow|text-replace|text-rendering|text-overflow|text-outline|text-justify|text-indent|text-height|text-emphasis|text-decoration|text-align-last|text-align|text|target-position|target-new|target-name|target|table-layout|tab-size|style-type|style-position|style-image|style|string-set|stretch|stress|stacking-strategy|stacking-shift|stacking-ruby|stacking|src|speed|speech-rate|speech|speak-punctuation|speak-numeral|speak-header|speak|span|spacing|space-collapse|space|sizing|size-adjust|size|shadow|respond-to|rule-width|rule-style|rule-color|rule|ruby-span|ruby-position|ruby-overhang|ruby-align|ruby|rows|rotation-point|rotation|role|right-width|right-style|right-color|right|richness|rest-before|rest-after|rest|resource|resize|reset|replace|repeat|rendering-intent|rate|radius|quotes|punctuation-trim|punctuation|property|profile|presentation-level|presentation|position|pointer-events|point|play-state|play-during|play-count|pitch-range|pitch|phonemes|pause-before|pause-after|pause|page-policy|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-bottom|padding|pack|overhang|overflow-y|overflow-x|overflow-style|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|origin|orientation|orient|ordinal-group|order|opacity|offset|numeral|new|nav-up|nav-right|nav-left|nav-index|nav-down|nav|name|move-to|model|mix-blend-mode|min-width|min-height|min|max-width|max-height|max|marquee-style|marquee-speed|marquee-play-count|marquee-direction|marquee|marks|mark-before|mark-after|mark|margin-top|margin-right|margin-left|margin-bottom|margin|mask-image|list-style-type|list-style-position|list-style-image|list-style|list|lines|line-stacking-strategy|line-stacking-shift|line-stacking-ruby|line-stacking|line-height|line-break|level|letter-spacing|length|left-width|left-style|left-color|left|label|justify-content|justify|iteration-count|inline-box-align|initial-value|initial-size|initial-before-align|initial-before-adjust|initial-after-align|initial-after-adjust|index|indent|increment|image-resolution|image-orientation|image|icon|hyphens|hyphenate-resource|hyphenate-lines|hyphenate-character|hyphenate-before|hyphenate-after|hyphenate|height|header|hanging-punctuation|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|row-gap|gap|font-kerning|font-language-override|font-weight|font-variant-caps|font-variant|font-style|font-synthesis|font-stretch|font-size-adjust|font-size|font-family|font|float-offset|float|flex-wrap|flex-shrink|flex-grow|flex-group|flex-flow|flex-direction|flex-basis|flex|fit-position|fit|fill|filter|family|empty-cells|emphasis|elevation|duration|drop-initial-value|drop-initial-size|drop-initial-before-align|drop-initial-before-adjust|drop-initial-after-align|drop-initial-after-adjust|drop|down|dominant-baseline|display-role|display-model|display|direction|delay|decoration-break|decoration|cursor|cue-before|cue-after|cue|crop|counter-reset|counter-increment|counter|count|content|columns|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|column-break-before|column-break-after|column|color-profile|color|collapse|clip|clear|character|caption-side|break-inside|break-before|break-after|break|box-sizing|box-shadow|box-pack|box-orient|box-ordinal-group|box-lines|box-flex-group|box-flex|box-direction|box-decoration-break|box-align|box|bottom-width|bottom-style|bottom-right-radius|bottom-left-radius|bottom-color|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-length|border-left-width|border-left-style|border-left-color|border-left|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|bookmark-target|bookmark-level|bookmark-label|bookmark|binding|bidi|before|baseline-shift|baseline|balance|background-blend-mode|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-break|background-attachment|background|azimuth|attachment|appearance|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-duration|animation-direction|animation-delay|animation-fill-mode|animation|alignment-baseline|alignment-adjust|alignment|align-self|align-last|align-items|align-content|align|after|adjust|will-change)|\n (writing-mode|text-anchor|stroke-width|stroke-opacity|stroke-miterlimit|stroke-linejoin|stroke-linecap|stroke-dashoffset|stroke-dasharray|stroke|stop-opacity|stop-color|shape-rendering|marker-start|marker-mid|marker-end|lighting-color|kerning|image-rendering|glyph-orientation-vertical|glyph-orientation-horizontal|flood-opacity|flood-color|fill-rule|fill-opacity|fill|enable-background|color-rendering|color-interpolation-filters|color-interpolation|clip-rule|clip-path)|\n ([a-zA-Z_-][a-zA-Z0-9_-]*)\n)(?!([^\\S\\n]*&)|([^\\S\\n]*\\{))(?=:|([^\\S\\n]+[^\\s])))", + "beginCaptures": { + "1": { + "name": "support.type.property-name.css" + }, + "2": { + "name": "support.type.property-name.svg.css" + }, + "3": { + "name": "support.function.mixin.stylus" + } + }, + "end": "(;)|(?=\\n|\\}|$)", + "endCaptures": { + "1": { + "name": "punctuation.terminator.rule.css" + } + }, + "patterns": [ + { + "include": "#property_value" + } + ] + }, + "property_value": { + "begin": "\\G(?:(:)|(\\s))(\\s*)(?!&)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.key-value.css" + }, + "2": { + "name": "punctuation.separator.key-value.css" + } + }, + "end": "(?=\\n|;|\\})", + "endCaptures": { + "1": { + "name": "punctuation.terminator.rule.css" + } + }, + "name": "meta.property-value.css", + "patterns": [ + { + "include": "#property_values" + }, + { + "match": "[^\\n]+?" + } + ] + }, + "property_values": { + "patterns": [ + { + "include": "#function" + }, + { + "include": "#comment" + }, + { + "include": "#language_keywords" + }, + { + "include": "#language_constants" + }, + { + "match": "(?:(?=\\w)(?<![\\w-]))(wrap-reverse|wrap|whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|unicase|underline|ultra-expanded|ultra-condensed|transparent|transform|top|titling-caps|thin|thick|text-top|text-bottom|text|tb-rl|table-row-group|table-row|table-header-group|table-footer-group|table-column-group|table-column|table-cell|table|sw-resize|super|strict|stretch|step-start|step-end|static|square|space-between|space-around|space|solid|soft-light|small-caps|separate|semi-expanded|semi-condensed|se-resize|scroll|screen|saturation|s-resize|running|rtl|row-reverse|row-resize|row|round|right|ridge|reverse|repeat-y|repeat-x|repeat|relative|progressive|progress|pre-wrap|pre-line|pre|pointer|petite-caps|paused|pan-x|pan-left|pan-right|pan-y|pan-up|pan-down|padding-box|overline|overlay|outside|outset|optimizeSpeed|optimizeLegibility|opacity|oblique|nw-resize|nowrap|not-allowed|normal|none|no-repeat|no-drop|newspaper|ne-resize|n-resize|multiply|move|middle|medium|max-height|manipulation|main-size|luminosity|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|local|list-item|linear(?!-)|line-through|line-edge|line|lighter|lighten|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline-block|inline|inherit|infinite|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|hue|horizontal|hidden|help|hard-light|hand|groove|geometricPrecision|forwards|flex-start|flex-end|flex|fixed|extra-expanded|extra-condensed|expanded|exclusion|ellipsis|ease-out|ease-in-out|ease-in|ease|e-resize|double|dotted|distribute-space|distribute-letter|distribute-all-lines|distribute|disc|disabled|difference|default|decimal|dashed|darken|currentColor|crosshair|cover|content-box|contain|condensed|column-reverse|column|color-dodge|color-burn|color|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|border-box|bolder|bold|block|bidi-override|below|baseline|balance|backwards|auto|antialiased|always|alternate-reverse|alternate|all-small-caps|all-scroll|all-petite-caps|all|absolute)(?:(?<=\\w)(?![\\w-]))", + "name": "support.constant.property-value.css" + }, + { + "match": "(?:(?=\\w)(?<![\\w-]))(start|sRGB|square|round|optimizeSpeed|optimizeQuality|nonzero|miter|middle|linearRGB|geometricPrecision |evenodd |end |crispEdges|butt|bevel)(?:(?<=\\w)(?![\\w-]))", + "name": "support.constant.property-value.svg.css" + }, + { + "include": "#font_name" + }, + { + "include": "#numeric" + }, + { + "include": "#color" + }, + { + "include": "#string" + }, + { + "match": "\\!\\s*important", + "name": "keyword.other.important.css" + }, + { + "include": "#operator" + }, + { + "include": "#stylus_keywords" + }, + { + "include": "#property_variable" + } + ] + }, + "numeric": { + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.other.unit.css" + } + }, + "match": "(?x) (?<!\\w|-)(?:(?:-|\\+)?(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+)) ((?:px|pt|ch|cm|mm|in|r?em|ex|pc|deg|g?rad|dpi|dpcm|dppx|fr|ms|s|turn|vh|vmax|vmin|vw)\\b|%)?", + "name": "constant.numeric.css" + } + ] + }, + "color": { + "patterns": [ + { + "begin": "\\b(rgb|rgba|hsl|hsla)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.color.css" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.function.css" + } + }, + "name": "meta.function.color.css", + "patterns": [ + { + "match": "\\s*(,)\\s*", + "name": "punctuation.separator.parameter.css" + }, + { + "include": "#numeric" + }, + { + "include": "#property_variable" + } + ] + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.css" + } + }, + "match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b", + "name": "constant.other.color.rgb-value.css" + }, + { + "comment": "http://www.w3.org/TR/CSS21/syndata.html#value-def-color", + "match": "\\b(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\\b", + "name": "support.constant.color.w3c-standard-color-name.css" + }, + { + "comment": "http://www.w3.org/TR/css3-color/#svg-color", + "match": "\\b(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|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|gainsboro|ghostwhite|gold|goldenrod|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|limegreen|linen|magenta|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato|turquoise|violet|wheat|whitesmoke|yellowgreen)\\b", + "name": "support.constant.color.w3c-extended-color-name.css" + } + ] + }, + "string": { + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.css" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.css" + } + }, + "name": "string.quoted.double.css", + "patterns": [ + { + "match": "\\\\([a-fA-F0-9]{1,6}|.)", + "name": "constant.character.escape.css" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.css" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.css" + } + }, + "name": "string.quoted.single.css", + "patterns": [ + { + "match": "\\\\([a-fA-F0-9]{1,6}|.)", + "name": "constant.character.escape.css" + } + ] + } + ] + }, + "at_rule": { + "patterns": [ + { + "begin": "\\s*((@)(import|require))\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.at-rule.import.stylus" + }, + "2": { + "name": "punctuation.definition.keyword.stylus" + } + }, + "end": "\\s*((?=;|$|\\n))", + "endCaptures": { + "1": { + "name": "punctuation.terminator.rule.css" + } + }, + "name": "meta.at-rule.import.css", + "patterns": [ + { + "include": "#string" + } + ] + }, + { + "begin": "\\s*((@)(extend[s]?)\\b)\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.at-rule.extend.stylus" + }, + "2": { + "name": "punctuation.definition.keyword.stylus" + } + }, + "end": "\\s*((?=;|$|\\n))", + "endCaptures": { + "1": { + "name": "punctuation.terminator.rule.css" + } + }, + "name": "meta.at-rule.extend.css", + "patterns": [ + { + "include": "#selector" + } + ] + }, + { + "match": "^\\s*((@)font-face)\\b", + "captures": { + "1": { + "name": "keyword.control.at-rule.fontface.stylus" + }, + "2": { + "name": "punctuation.definition.keyword.stylus" + } + }, + "name": "meta.at-rule.fontface.stylus" + }, + { + "match": "^\\s*((@)css)\\b", + "captures": { + "1": { + "name": "keyword.control.at-rule.css.stylus" + }, + "2": { + "name": "punctuation.definition.keyword.stylus" + } + }, + "name": "meta.at-rule.css.stylus" + }, + { + "begin": "\\s*((@)charset)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.at-rule.charset.stylus" + }, + "2": { + "name": "punctuation.definition.keyword.stylus" + } + }, + "end": "\\s*((?=;|$|\\n))", + "name": "meta.at-rule.charset.stylus", + "patterns": [ + { + "include": "#string" + } + ] + }, + { + "begin": "\\s*((@)keyframes)\\b\\s+([a-zA-Z_-][a-zA-Z0-9_-]*)", + "beginCaptures": { + "1": { + "name": "keyword.control.at-rule.keyframes.stylus" + }, + "2": { + "name": "punctuation.definition.keyword.stylus" + }, + "3": { + "name": "entity.name.function.keyframe.stylus" + } + }, + "end": "\\s*((?=\\{|$|\\n))", + "name": "meta.at-rule.keyframes.stylus" + }, + { + "begin": "(?=(\\b(\\d+%|from\\b|to\\b)))", + "end": "(?=(\\{|\\n))", + "name": "meta.at-rule.keyframes.stylus", + "patterns": [ + { + "match": "(\\b(\\d+%|from\\b|to\\b))", + "name": "entity.other.attribute-name.stylus" + } + ] + }, + { + "match": "^\\s*((@)media)\\b", + "captures": { + "1": { + "name": "keyword.control.at-rule.media.stylus" + }, + "2": { + "name": "punctuation.definition.keyword.stylus" + } + }, + "name": "meta.at-rule.media.stylus" + }, + { + "match": "(?:(?=\\w)(?<![\\w-]))(width|scan|resolution|orientation|monochrome|min-width|min-resolution|min-monochrome|min-height|min-device-width|min-device-height|min-device-aspect-ratio|min-color-index|min-color|min-aspect-ratio|max-width|max-resolution|max-monochrome|max-height|max-device-width|max-device-height|max-device-aspect-ratio|max-color-index|max-color|max-aspect-ratio|height|grid|device-width|device-height|device-aspect-ratio|color-index|color|aspect-ratio)(?:(?<=\\w)(?![\\w-]))", + "name": "support.type.property-name.media-feature.media.css" + }, + { + "match": "(?:(?=\\w)(?<![\\w-]))(tv|tty|screen|projection|print|handheld|embossed|braille|aural|all)(?:(?<=\\w)(?![\\w-]))", + "name": "support.constant.media-type.media.css" + }, + { + "match": "(?:(?=\\w)(?<![\\w-]))(portrait|landscape)(?:(?<=\\w)(?![\\w-]))", + "name": "support.constant.property-value.media-property.media.css" + } + ] + }, + "operator": { + "patterns": [ + { + "match": "((?:\\?|:|!|~|\\+|(\\s-\\s)|(?:\\*)?\\*|\\/|%|(\\.)?\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!=)|\\b(?:in|is(?:nt)?|(?<!:)not|or|and)\\b)", + "name": "keyword.operator.stylus" + }, + { + "include": "#char_escape" + } + ] + }, + "font_name": { + "match": "(\\b(?i:arial|century|comic|courier|cursive|fantasy|futura|garamond|georgia|helvetica|impact|lucida|monospace|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif)\\b)", + "name": "support.constant.font-name.css" + }, + "variable": { + "match": "(\\$[a-zA-Z_-][a-zA-Z0-9_-]*)", + "name": "variable.stylus" + }, + "property_variable": { + "patterns": [ + { + "include": "#variable" + }, + { + "match": "(?<!^)(\\@[a-zA-Z_-][a-zA-Z0-9_-]*)", + "name": "variable.property.stylus" + } + ] + }, + "function": { + "begin": "(?=[a-zA-Z_-][a-zA-Z0-9_-]*\\()", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.function.css" + } + }, + "patterns": [ + { + "begin": "(format|url|local)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.misc.css" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "(?=\\))", + "name": "meta.function.misc.css", + "patterns": [ + { + "match": "(?<=\\()[^\\)\\s]*(?=\\))", + "name": "string.css" + }, + { + "include": "#string" + }, + { + "include": "#variable" + }, + { + "include": "#operator" + }, + { + "match": "\\s*" + } + ] + }, + { + "match": "(counter)(\\()([a-zA-Z_-][a-zA-Z0-9_-]*)(?=\\))", + "captures": { + "1": { + "name": "support.function.misc.counter.css" + }, + "2": { + "name": "punctuation.section.function.css" + }, + "3": { + "name": "variable.section.css" + } + }, + "name": "meta.function.misc.counter.css" + }, + { + "begin": "(counters)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.misc.counters.css" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "(?=\\))", + "name": "meta.function.misc.counters.css", + "patterns": [ + { + "match": "\\G[a-zA-Z_-][a-zA-Z0-9_-]*", + "name": "variable.section.css" + }, + { + "match": "\\s*(,)\\s*", + "name": "punctuation.separator.parameter.css" + }, + { + "include": "#string" + }, + { + "include": "#interpolation" + } + ] + }, + { + "begin": "(attr)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.misc.attr.css" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "(?=\\))", + "name": "meta.function.misc.attr.css", + "patterns": [ + { + "match": "\\G[a-zA-Z_-][a-zA-Z0-9_-]*", + "name": "entity.other.attribute-name.attribute.css" + }, + { + "match": "(?<=[a-zA-Z0-9_-])\\s*\\b(string|color|url|integer|number|length|em|ex|px|rem|vw|vh|vmin|vmax|mm|cm|in|pt|pc|angle|deg|grad|rad|time|s|ms|frequency|Hz|kHz|%)\\b", + "name": "support.type.attr.css" + }, + { + "match": "\\s*(,)\\s*", + "name": "punctuation.separator.parameter.css" + }, + { + "include": "#string" + }, + { + "include": "#interpolation" + } + ] + }, + { + "begin": "(calc)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.misc.calc.css" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "(?=\\))", + "name": "meta.function.misc.calc.css", + "patterns": [ + { + "include": "#property_values" + } + ] + }, + { + "begin": "(cubic-bezier)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.timing.cubic-bezier.css" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "(?=\\))", + "name": "meta.function.timing.cubic-bezier.css", + "patterns": [ + { + "match": "\\s*(,)\\s*", + "name": "punctuation.separator.parameter.css" + }, + { + "include": "#numeric" + }, + { + "include": "#interpolation" + } + ] + }, + { + "begin": "(steps)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.timing.steps.css" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "(?=\\))", + "name": "meta.function.timing.steps.css", + "patterns": [ + { + "match": "\\s*(,)\\s*", + "name": "punctuation.separator.parameter.css" + }, + { + "include": "#numeric" + }, + { + "match": "\\b(start|end)\\b", + "name": "support.constant.timing.steps.direction.css" + }, + { + "include": "#interpolation" + } + ] + }, + { + "begin": "(linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.gradient.css" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "(?=\\))", + "name": "meta.function.gradient.css", + "patterns": [ + { + "match": "\\s*(,)\\s*", + "name": "punctuation.separator.parameter.css" + }, + { + "include": "#numeric" + }, + { + "include": "#color" + }, + { + "match": "\\b(to|bottom|right|left|top|circle|ellipse|center|closest-side|closest-corner|farthest-side|farthest-corner|at)\\b", + "name": "support.constant.gradient.css" + }, + { + "include": "#interpolation" + } + ] + }, + { + "begin": "(blur|brightness|contrast|grayscale|hue-rotate|invert|opacity|saturate|sepia)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.filter.css" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "(?=\\))", + "name": "meta.function.filter.css", + "patterns": [ + { + "include": "#numeric" + }, + { + "include": "#property_variable" + }, + { + "include": "#interpolation" + } + ] + }, + { + "begin": "(drop-shadow)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.filter.drop-shadow.css" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "(?=\\))", + "name": "meta.function.filter.drop-shadow.css", + "patterns": [ + { + "include": "#numeric" + }, + { + "include": "#color" + }, + { + "include": "#property_variable" + }, + { + "include": "#interpolation" + } + ] + }, + { + "begin": "(matrix|matrix3d|perspective|rotate|rotate3d|rotate[Xx]|rotate[yY]|rotate[zZ]|scale|scale3d|scale[xX]|scale[yY]|scale[zZ]|skew|skew[xX]|skew[yY]|translate|translate3d|translate[xX]|translate[yY]|translate[zZ])(\\()", + "beginCaptures": { + "1": { + "name": "support.function.transform.css" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "(?=\\))", + "name": "meta.function.transform.css", + "patterns": [ + { + "include": "#numeric" + }, + { + "include": "#property_variable" + }, + { + "include": "#interpolation" + } + ] + }, + { + "match": "(url|local|format|counter|counters|attr|calc)(?=\\()", + "name": "support.function.misc.css" + }, + { + "match": "(cubic-bezier|steps)(?=\\()", + "name": "support.function.timing.css" + }, + { + "match": "(linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient)(?=\\()", + "name": "support.function.gradient.css" + }, + { + "match": "(blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)(?=\\()", + "name": "support.function.filter.css" + }, + { + "match": "(matrix|matrix3d|perspective|rotate|rotate3d|rotate[Xx]|rotate[yY]|rotate[zZ]|scale|scale3d|scale[xX]|scale[yY]|scale[zZ]|skew|skew[xX]|skew[yY]|translate|translate3d|translate[xX]|translate[yY]|translate[zZ])(?=\\()", + "name": "support.function.transform.css" + }, + { + "begin": "([a-zA-Z_-][a-zA-Z0-9_-]*)(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.stylus" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "(?=\\))", + "name": "meta.function.stylus", + "patterns": [ + { + "name": "variable.argument.stylus", + "match": "(?x)\n--\n(?:[-a-zA-Z_] | [^\\x00-\\x7F]) # First letter\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F] # Remainder of identifier\n |\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*" + }, + { + "match": "\\s*(,)\\s*", + "name": "punctuation.separator.parameter.css" + }, + { + "include": "#interpolation" + }, + { + "include": "#property_values" + } + ] + }, + { + "match": "\\(", + "name": "punctuation.section.function.css" + } + ] + }, + "interpolation": { + "name": "meta.interpolation.stylus", + "begin": "(?:(\\{)[^\\S\\n]*)(?=[^;=]*[^\\S\\n]*\\})", + "beginCaptures": { + "1": { + "name": "meta.brace.curly" + } + }, + "end": "(?:[^\\S\\n]*(\\}))|\\n|$", + "endCaptures": { + "1": { + "name": "meta.brace.curly" + } + }, + "patterns": [ + { + "include": "#variable" + }, + { + "include": "#numeric" + }, + { + "include": "#string" + }, + { + "include": "#operator" + } + ] + }, + "char_escape": { + "name": "constant.character.escape.stylus", + "match": "\\\\(.)" + }, + "language_constants": { + "match": "\\b(true|false|null)\\b", + "name": "constant.language.stylus" + }, + "language_keywords": { + "patterns": [ + { + "match": "(\\b|\\s)(return|else|for|unless|if|else)\\b", + "name": "keyword.control.stylus" + }, + { + "match": "(\\b|\\s)(!important|in|is defined|is a)\\b", + "name": "keyword.other.stylus" + }, + { + "match": "\\barguments\\b", + "name": "variable.language.stylus" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/svelte.tmLanguage.json b/src/lib/shiki/languages/svelte.tmLanguage.json new file mode 100644 index 0000000..1b27523 --- /dev/null +++ b/src/lib/shiki/languages/svelte.tmLanguage.json @@ -0,0 +1,1161 @@ +{ + "name": "svelte", + "scopeName": "source.svelte", + "fileTypes": ["svelte"], + "uuid": "7582b62f-51d9-4a84-8c8d-fc189530faf6", + "injections": { + "L:(meta.script.svelte | meta.style.svelte) (meta.lang.js | meta.lang.javascript) - (meta source)": { + "patterns": [ + { + "begin": "(?<=>)(?!</)", + "end": "(?=</)", + "name": "meta.embedded.block.svelte", + "contentName": "source.js", + "patterns": [ + { + "include": "source.js" + } + ] + } + ] + }, + "L:(meta.script.svelte | meta.style.svelte) (meta.lang.ts | meta.lang.typescript) - (meta source)": { + "patterns": [ + { + "begin": "(?<=>)(?!</)", + "end": "(?=</)", + "name": "meta.embedded.block.svelte", + "contentName": "source.ts", + "patterns": [ + { + "include": "source.ts" + } + ] + } + ] + }, + "L:(meta.script.svelte | meta.style.svelte) meta.lang.coffee - (meta source)": { + "patterns": [ + { + "begin": "(?<=>)(?!</)", + "end": "(?=</)", + "name": "meta.embedded.block.svelte", + "contentName": "source.coffee", + "patterns": [ + { + "include": "source.coffee" + } + ] + } + ] + }, + "L:meta.script.svelte - meta.lang - (meta source)": { + "patterns": [ + { + "begin": "(?<=>)(?!</)", + "end": "(?=</)", + "name": "meta.embedded.block.svelte", + "contentName": "source.js", + "patterns": [ + { + "include": "source.js" + } + ] + } + ] + }, + "L:meta.style.svelte meta.lang.stylus - (meta source)": { + "patterns": [ + { + "begin": "(?<=>)(?!</)", + "end": "(?=</)", + "name": "meta.embedded.block.svelte", + "contentName": "source.stylus", + "patterns": [ + { + "include": "source.stylus" + } + ] + } + ] + }, + "L:meta.style.svelte meta.lang.sass - (meta source)": { + "patterns": [ + { + "begin": "(?<=>)(?!</)", + "end": "(?=</)", + "name": "meta.embedded.block.svelte", + "contentName": "source.sass", + "patterns": [ + { + "include": "source.sass" + } + ] + } + ] + }, + "L:meta.style.svelte meta.lang.css - (meta source)": { + "patterns": [ + { + "begin": "(?<=>)(?!</)", + "end": "(?=</)", + "name": "meta.embedded.block.svelte", + "contentName": "source.css", + "patterns": [ + { + "include": "source.css" + } + ] + } + ] + }, + "L:meta.style.svelte meta.lang.scss - (meta source)": { + "patterns": [ + { + "begin": "(?<=>)(?!</)", + "end": "(?=</)", + "name": "meta.embedded.block.svelte", + "contentName": "source.css.scss", + "patterns": [ + { + "include": "source.css.scss" + } + ] + } + ] + }, + "L:meta.style.svelte meta.lang.less - (meta source)": { + "patterns": [ + { + "begin": "(?<=>)(?!</)", + "end": "(?=</)", + "name": "meta.embedded.block.svelte", + "contentName": "source.css.less", + "patterns": [ + { + "include": "source.css.less" + } + ] + } + ] + }, + "L:meta.style.svelte meta.lang.postcss - (meta source)": { + "patterns": [ + { + "begin": "(?<=>)(?!</)", + "end": "(?=</)", + "name": "meta.embedded.block.svelte", + "contentName": "source.css.postcss", + "patterns": [ + { + "include": "source.css.postcss" + } + ] + } + ] + }, + "L:meta.style.svelte - meta.lang - (meta source)": { + "patterns": [ + { + "begin": "(?<=>)(?!</)", + "end": "(?=</)", + "name": "meta.embedded.block.svelte", + "contentName": "source.css", + "patterns": [ + { + "include": "source.css" + } + ] + } + ] + }, + "L:meta.template.svelte meta.lang.pug - (meta source)": { + "patterns": [ + { + "begin": "(?<=>)(?!</)", + "end": "(?=</)", + "name": "meta.embedded.block.svelte", + "contentName": "text.pug", + "patterns": [ + { + "include": "text.pug" + } + ] + } + ] + }, + "L:meta.template.svelte - meta.lang - (meta source)": { + "patterns": [ + { + "begin": "(?<=>)\\s", + "end": "(?=</template)", + "patterns": [ + { + "include": "#scope" + } + ] + } + ] + }, + "L:(source.ts, source.js, source.coffee)": { + "patterns": [ + { + "match": "(?<![_$./'\"[:alnum:]])\\$(?=[_[:alpha:]][_$[:alnum:]]*)", + "name": "punctuation.definition.variable.svelte" + }, + { + "match": "(?<![_$./'\"[:alnum:]])(\\$\\$)(?=props|restProps|slots)", + "name": "punctuation.definition.variable.svelte" + } + ] + } + }, + "patterns": [ + { + "include": "#scope" + } + ], + "repository": { + "scope": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#special-tags" + }, + { + "include": "#tags" + }, + { + "include": "#interpolation" + }, + { + "begin": "(?<=>|})", + "end": "(?=<|{)", + "name": "text.svelte" + } + ] + }, + "comments": { + "begin": "<!--", + "end": "-->", + "captures": { + "0": { + "name": "punctuation.definition.comment.svelte" + } + }, + "name": "comment.block.svelte", + "patterns": [ + { + "begin": "(@)(component)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.keyword.svelte" + }, + "2": { + "name": "storage.type.class.component.svelte keyword.declaration.class.component.svelte" + } + }, + "end": "(?=-->)", + "contentName": "comment.block.documentation.svelte", + "patterns": [ + { + "match": ".*?(?=-->)", + "captures": { + "0": { + "patterns": [ + { + "include": "text.html.markdown" + } + ] + } + } + }, + { + "include": "text.html.markdown" + } + ] + }, + { + "match": "\\G-?>|<!--(?!>)|<!-(?=-->)|--!>", + "name": "invalid.illegal.characters-not-allowed-here.svelte" + } + ] + }, + "destructuring": { + "patterns": [ + { + "begin": "(?={)", + "end": "(?<=})", + "name": "meta.embedded.expression.svelte source.ts", + "patterns": [ + { + "include": "source.ts#object-binding-pattern" + } + ] + }, + { + "begin": "(?=\\[)", + "end": "(?<=\\])", + "name": "meta.embedded.expression.svelte source.ts", + "patterns": [ + { + "include": "source.ts#array-binding-pattern" + } + ] + } + ] + }, + "destructuring-const": { + "patterns": [ + { + "begin": "(?={)", + "end": "(?<=})", + "name": "meta.embedded.expression.svelte source.ts", + "patterns": [ + { + "include": "source.ts#object-binding-pattern-const" + } + ] + }, + { + "begin": "(?=\\[)", + "end": "(?<=\\])", + "name": "meta.embedded.expression.svelte source.ts", + "patterns": [ + { + "include": "source.ts#array-binding-pattern-const" + } + ] + } + ] + }, + "interpolation": { + "patterns": [ + { + "begin": "\\{", + "end": "\\}", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.svelte" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.svelte" + } + }, + "contentName": "meta.embedded.expression.svelte source.ts", + "patterns": [ + { + "begin": "\\G\\s*(?={)", + "end": "(?<=})", + "patterns": [ + { + "include": "source.ts#object-literal" + } + ] + }, + { + "include": "source.ts" + } + ] + } + ] + }, + "special-tags": { + "patterns": [ + { + "include": "#special-tags-void" + }, + { + "include": "#special-tags-block-begin" + }, + { + "include": "#special-tags-block-end" + } + ] + }, + "special-tags-keywords": { + "match": "([#@/:])(else\\s+if|[a-z]*)", + "captures": { + "1": { + "name": "punctuation.definition.keyword.svelte" + }, + "2": { + "patterns": [ + { + "match": "if|else\\s+if|else", + "name": "keyword.control.conditional.svelte" + }, + { + "match": "each|key", + "name": "keyword.control.svelte" + }, + { + "match": "await|then|catch", + "name": "keyword.control.flow.svelte" + }, + { + "match": "html", + "name": "keyword.other.svelte" + }, + { + "match": "debug", + "name": "keyword.other.debugger.svelte" + }, + { + "match": "const", + "name": "storage.type.svelte" + } + ] + } + } + }, + "special-tags-modes": { + "patterns": [ + { + "begin": "(?<=(if|key|then|catch|html).*?)\\G", + "end": "(?=})", + "name": "meta.embedded.expression.svelte source.ts", + "patterns": [ + { + "include": "source.ts" + } + ] + }, + { + "begin": "(?<=const.*?)\\G", + "end": "(?=})", + "patterns": [ + { + "include": "#destructuring-const" + }, + { + "begin": "\\G\\s*([_$[:alpha:]][_$[:alnum:]]+)\\s*", + "end": "(?=\\=)", + "beginCaptures": { + "1": { + "name": "variable.other.constant.svelte" + } + } + }, + { + "begin": "(?=\\=)", + "name": "meta.embedded.expression.svelte source.ts", + "end": "(?=})", + "patterns": [ + { + "include": "source.ts" + } + ] + } + ] + }, + { + "begin": "(?<=each.*?)\\G", + "end": "(?=})", + "patterns": [ + { + "begin": "\\G\\s*?(?=\\S)", + "end": "(?=(?:^\\s*|\\s+)(as))", + "contentName": "meta.embedded.expression.svelte source.ts", + "patterns": [ + { + "include": "source.ts" + } + ] + }, + { + "begin": "(as)", + "beginCaptures": { + "1": { + "name": "keyword.control.as.svelte" + } + }, + "end": "(?=})", + "patterns": [ + { + "include": "#destructuring" + }, + { + "begin": "\\(", + "end": "\\)|(?=})", + "captures": { + "0": { + "name": "meta.brace.round.svelte" + } + }, + "contentName": "meta.embedded.expression.svelte source.ts", + "patterns": [ + { + "include": "source.ts" + } + ] + }, + { + "match": "(\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*)", + "captures": { + "1": { + "name": "meta.embedded.expression.svelte source.ts", + "patterns": [ + { + "include": "source.ts" + } + ] + } + } + }, + { + "match": ",", + "name": "punctuation.separator.svelte" + } + ] + } + ] + }, + { + "begin": "(?<=await.*?)\\G", + "end": "(?=})", + "patterns": [ + { + "begin": "\\G\\s*?(?=\\S)", + "end": "\\s+(then)|(?=})", + "endCaptures": { + "1": { + "name": "keyword.control.flow.svelte" + } + }, + "contentName": "meta.embedded.expression.svelte source.ts", + "patterns": [ + { + "include": "source.ts" + } + ] + }, + { + "begin": "(?<=then\\b)", + "end": "(?=})", + "contentName": "meta.embedded.expression.svelte source.ts", + "patterns": [ + { + "include": "source.ts" + } + ] + } + ] + }, + { + "begin": "(?<=debug.*?)\\G", + "end": "(?=})", + "patterns": [ + { + "match": "[_$[:alpha:]][_$[:alnum:]]*", + "captures": { + "0": { + "name": "meta.embedded.expression.svelte source.ts", + "patterns": [ + { + "include": "source.ts" + } + ] + } + } + }, + { + "match": ",", + "name": "punctuation.separator.svelte" + } + ] + } + ] + }, + "special-tags-void": { + "begin": "({)\\s*((?:[@:])(else\\s+if|[a-z]*))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.block.begin.svelte" + }, + "2": { + "patterns": [ + { + "include": "#special-tags-keywords" + } + ] + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.end.svelte" + } + }, + "name": "meta.special.$3.svelte", + "patterns": [ + { + "include": "#special-tags-modes" + } + ] + }, + "special-tags-block-begin": { + "begin": "({)\\s*(#([a-z]*))", + "end": "(})", + "name": "meta.special.$3.svelte meta.special.start.svelte", + "beginCaptures": { + "1": { + "name": "punctuation.definition.block.begin.svelte" + }, + "2": { + "patterns": [ + { + "include": "#special-tags-keywords" + } + ] + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.block.end.svelte" + } + }, + "patterns": [ + { + "include": "#special-tags-modes" + } + ] + }, + "special-tags-block-end": { + "begin": "({)\\s*(/([a-z]*))", + "end": "(})", + "name": "meta.special.$3.svelte meta.special.end.svelte", + "beginCaptures": { + "1": { + "name": "punctuation.definition.block.begin.svelte" + }, + "2": { + "patterns": [ + { + "include": "#special-tags-keywords" + } + ] + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.block.end.svelte" + } + } + }, + "attributes": { + "patterns": [ + { + "include": "#attributes-directives" + }, + { + "include": "#attributes-keyvalue" + }, + { + "include": "#attributes-interpolated" + } + ] + }, + "attributes-interpolated": { + "begin": "(?<!:|=)\\s*({)", + "end": "(\\})", + "captures": { + "1": { + "name": "entity.other.attribute-name.svelte" + } + }, + "contentName": "meta.embedded.expression.svelte source.ts", + "patterns": [ + { + "include": "source.ts" + } + ] + }, + "attributes-keyvalue": { + "begin": "((?:--)?[_$[:alpha:]][_\\-$[:alnum:]]*)", + "beginCaptures": { + "0": { + "patterns": [ + { + "match": "--.*", + "name": "support.type.property-name.svelte" + }, + { + "match": ".*", + "name": "entity.other.attribute-name.svelte" + } + ] + } + }, + "end": "(?=\\s*+[^=\\s])", + "name": "meta.attribute.$1.svelte", + "patterns": [ + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "punctuation.separator.key-value.svelte" + } + }, + "end": "(?<=[^\\s=])(?!\\s*=)|(?=/?>)", + "patterns": [ + { + "include": "#attributes-value" + } + ] + } + ] + }, + "attributes-value": { + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "(?:(['\"])([0-9._]+[\\w%]{,4})(\\1))|(?:([0-9._]+[\\w%]{,4})(?=\\s|/?>))", + "captures": { + "1": { + "name": "punctuation.definition.string.begin.svelte" + }, + "2": { + "name": "constant.numeric.decimal.svelte" + }, + "3": { + "name": "punctuation.definition.string.end.svelte" + }, + "4": { + "name": "constant.numeric.decimal.svelte" + } + } + }, + { + "match": "([^\\s\"'=<>`/]|/(?!>))+", + "name": "string.unquoted.svelte", + "patterns": [ + { + "include": "#interpolation" + } + ] + }, + { + "begin": "(['\"])", + "end": "\\1", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.svelte" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.svelte" + } + }, + "name": "string.quoted.svelte", + "patterns": [ + { + "include": "#interpolation" + } + ] + } + ] + }, + "attributes-directives-keywords": { + "patterns": [ + { + "match": "on|use|bind", + "name": "keyword.control.svelte" + }, + { + "match": "transition|in|out|animate", + "name": "keyword.other.animation.svelte" + }, + { + "match": "let", + "name": "storage.type.svelte" + }, + { + "match": "class|style", + "name": "entity.other.attribute-name.svelte" + } + ] + }, + "attributes-directives-types": { + "patterns": [ + { + "match": "(?<=(on):).*$", + "name": "entity.name.type.svelte" + }, + { + "match": "(?<=(bind):).*$", + "name": "variable.parameter.svelte" + }, + { + "match": "(?<=(use|transition|in|out|animate):).*$", + "name": "variable.function.svelte" + }, + { + "match": "(?<=(let|class|style):).*$", + "name": "variable.parameter.svelte" + } + ] + }, + "attributes-directives-types-assigned": { + "patterns": [ + { + "match": "(?<=(bind):)this$", + "name": "variable.language.svelte" + }, + { + "match": "(?<=(bind):).*$", + "name": "entity.name.type.svelte" + }, + { + "match": "(?<=(class):).*$", + "name": "entity.other.attribute-name.class.svelte" + }, + { + "match": "(?<=(style):).*$", + "name": "support.type.property-name.svelte" + }, + { + "include": "#attributes-directives-types" + } + ] + }, + "attributes-directives": { + "begin": "(?<!<)(on|use|bind|transition|in|out|animate|let|class|style)(:)(?:((?:--)?[_$[:alpha:]][_\\-$[:alnum:]]*(?=\\s*=))|((?:--)?[_$[:alpha:]][_\\-$[:alnum:]]*))((\\|\\w+)*)", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#attributes-directives-keywords" + } + ] + }, + "2": { + "name": "punctuation.definition.keyword.svelte" + }, + "3": { + "patterns": [ + { + "include": "#attributes-directives-types-assigned" + } + ] + }, + "4": { + "patterns": [ + { + "include": "#attributes-directives-types" + } + ] + }, + "5": { + "patterns": [ + { + "match": "\\w+", + "name": "support.function.svelte" + }, + { + "match": "\\|", + "name": "punctuation.separator.svelte" + } + ] + } + }, + "end": "(?=\\s*+[^=\\s])", + "name": "meta.directive.$1.svelte", + "patterns": [ + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "punctuation.separator.key-value.svelte" + } + }, + "end": "(?<=[^\\s=])(?!\\s*=)|(?=/?>)", + "patterns": [ + { + "include": "#attributes-value" + } + ] + } + ] + }, + "attributes-generics": { + "begin": "(generics)(=)([\"'])", + "beginCaptures": { + "1": { + "name": "entity.other.attribute-name.svelte" + }, + "2": { + "name": "punctuation.separator.key-value.svelte" + }, + "3": { + "name": "punctuation.definition.string.begin.svelte" + } + }, + "end": "(\\3)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.svelte" + } + }, + "contentName": "meta.embedded.expression.svelte source.ts", + "patterns": [ + { + "include": "#type-parameters" + } + ] + }, + "type-parameters": { + "name": "meta.type.parameters.ts", + "patterns": [ + { + "include": "source.ts#comment" + }, + { + "name": "storage.modifier.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out|const)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "include": "source.ts#type" + }, + { + "include": "source.ts#punctuation-comma" + }, + { + "name": "keyword.operator.assignment.ts", + "match": "(=)(?!>)" + } + ] + }, + "tags": { + "patterns": [ + { + "include": "#tags-lang" + }, + { + "include": "#tags-void" + }, + { + "include": "#tags-general-end" + }, + { + "include": "#tags-general-start" + } + ] + }, + "tags-name": { + "patterns": [ + { + "match": "(svelte)(:)([a-z][\\w0-9:-]*)", + "captures": { + "1": { + "name": "keyword.control.svelte" + }, + "2": { + "name": "punctuation.definition.keyword.svelte" + }, + "3": { + "name": "entity.name.tag.svelte" + } + } + }, + { + "match": "slot", + "name": "keyword.control.svelte" + }, + { + "match": "[A-Z][a-zA-Z0-9_]*", + "name": "support.class.component.svelte" + }, + { + "match": "[a-z][\\w0-9:]*-[\\w0-9:-]*", + "name": "meta.tag.custom.svelte entity.name.tag.svelte" + }, + { + "match": "[a-z][\\w0-9:-]*", + "name": "entity.name.tag.svelte" + } + ] + }, + "tags-start-attributes": { + "begin": "\\G", + "end": "(?=/?>)", + "name": "meta.tag.start.svelte", + "patterns": [ + { + "include": "#attributes" + } + ] + }, + "tags-lang-start-attributes": { + "begin": "\\G", + "end": "(?=/>)|>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.svelte" + } + }, + "name": "meta.tag.start.svelte", + "patterns": [ + { + "include": "#attributes-generics" + }, + { + "include": "#attributes" + } + ] + }, + "tags-start-node": { + "match": "(<)([^/\\s>/]*)", + "captures": { + "1": { + "name": "punctuation.definition.tag.begin.svelte" + }, + "2": { + "patterns": [ + { + "include": "#tags-name" + } + ] + } + }, + "name": "meta.tag.start.svelte" + }, + "tags-end-node": { + "match": "(</)(.*?)\\s*(>)|(/>)", + "captures": { + "1": { + "name": "meta.tag.end.svelte punctuation.definition.tag.begin.svelte" + }, + "2": { + "name": "meta.tag.end.svelte", + "patterns": [ + { + "include": "#tags-name" + } + ] + }, + "3": { + "name": "meta.tag.end.svelte punctuation.definition.tag.end.svelte" + }, + "4": { + "name": "meta.tag.start.svelte punctuation.definition.tag.end.svelte" + } + } + }, + "tags-lang": { + "begin": "<(script|style|template)", + "end": "</\\1\\s*>|/>", + "beginCaptures": { + "0": { + "patterns": [ + { + "include": "#tags-start-node" + } + ] + } + }, + "endCaptures": { + "0": { + "patterns": [ + { + "include": "#tags-end-node" + } + ] + } + }, + "name": "meta.$1.svelte", + "patterns": [ + { + "begin": "\\G(?=\\s*[^>]*?(type|lang)\\s*=\\s*(['\"]|)(?:text/)?(\\w+)\\2)", + "end": "(?=</|/>)", + "name": "meta.lang.$3.svelte", + "patterns": [ + { + "include": "#tags-lang-start-attributes" + } + ] + }, + { + "include": "#tags-lang-start-attributes" + } + ] + }, + "tags-void": { + "begin": "(<)(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)(?=\\s|/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.svelte" + }, + "2": { + "name": "entity.name.tag.svelte" + } + }, + "end": "/?>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.begin.svelte" + } + }, + "name": "meta.tag.void.svelte", + "patterns": [ + { + "include": "#attributes" + } + ] + }, + "tags-general-start": { + "begin": "(<)([^/\\s>/]*)", + "end": "(/?>)", + "beginCaptures": { + "0": { + "patterns": [ + { + "include": "#tags-start-node" + } + ] + } + }, + "endCaptures": { + "1": { + "name": "meta.tag.start.svelte punctuation.definition.tag.end.svelte" + } + }, + "name": "meta.scope.tag.$2.svelte", + "patterns": [ + { + "include": "#tags-start-attributes" + } + ] + }, + "tags-general-end": { + "begin": "(</)([^/\\s>]*)", + "end": "(>)", + "beginCaptures": { + "1": { + "name": "meta.tag.end.svelte punctuation.definition.tag.begin.svelte" + }, + "2": { + "name": "meta.tag.end.svelte", + "patterns": [ + { + "include": "#tags-name" + } + ] + } + }, + "endCaptures": { + "1": { + "name": "meta.tag.end.svelte punctuation.definition.tag.end.svelte" + } + }, + "name": "meta.scope.tag.$2.svelte" + } + } +} diff --git a/src/lib/shiki/languages/swift.tmLanguage.json b/src/lib/shiki/languages/swift.tmLanguage.json new file mode 100644 index 0000000..0081b14 --- /dev/null +++ b/src/lib/shiki/languages/swift.tmLanguage.json @@ -0,0 +1,3303 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/swift.tmbundle/blob/master/Syntaxes/Swift.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/textmate/swift.tmbundle/commit/7a35637eb70aef3114b091c4ff6fbf6a2faa881b", + "name": "swift", + "scopeName": "source.swift", + "comment": "See swift.tmbundle/grammar-test.swift for test cases.", + "patterns": [ + { + "include": "#root" + } + ], + "repository": { + "async-throws": { + "captures": { + "1": { + "name": "invalid.illegal.await-must-precede-throws.swift" + }, + "2": { + "name": "keyword.control.exception.swift" + }, + "3": { + "name": "keyword.control.async.swift" + } + }, + "match": "\\b(?:(throws\\s+async|rethrows\\s+async)|(throws|rethrows)|(async))\\b" + }, + "attributes": { + "patterns": [ + { + "begin": "((@)available)(\\()", + "beginCaptures": { + "1": { + "name": "storage.modifier.attribute.swift" + }, + "2": { + "name": "punctuation.definition.attribute.swift" + }, + "3": { + "name": "punctuation.definition.arguments.begin.swift" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.swift" + } + }, + "name": "meta.attribute.available.swift", + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.other.platform.os.swift" + }, + "2": { + "name": "constant.numeric.swift" + } + }, + "match": "\\b(swift|(?:iOS|macOS|OSX|watchOS|tvOS|UIKitForMac)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))?" + }, + { + "begin": "\\b(introduced|deprecated|obsoleted)\\s*(:)\\s*", + "beginCaptures": { + "1": { + "name": "keyword.other.swift" + }, + "2": { + "name": "punctuation.separator.key-value.swift" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "match": "\\b[0-9]+(?:\\.[0-9]+)*\\b", + "name": "constant.numeric.swift" + } + ] + }, + { + "begin": "\\b(message|renamed)\\s*(:)\\s*(?=\")", + "beginCaptures": { + "1": { + "name": "keyword.other.swift" + }, + "2": { + "name": "punctuation.separator.key-value.swift" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "include": "#literals" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.other.platform.all.swift" + }, + "2": { + "name": "keyword.other.swift" + }, + "3": { + "name": "invalid.illegal.character-not-allowed-here.swift" + } + }, + "match": "(?:(\\*)|\\b(deprecated|unavailable|noasync)\\b)\\s*(.*?)(?=[,)])" + } + ] + }, + { + "begin": "((@)objc)(\\()", + "beginCaptures": { + "1": { + "name": "storage.modifier.attribute.swift" + }, + "2": { + "name": "punctuation.definition.attribute.swift" + }, + "3": { + "name": "punctuation.definition.arguments.begin.swift" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.swift" + } + }, + "name": "meta.attribute.objc.swift", + "patterns": [ + { + "captures": { + "1": { + "name": "invalid.illegal.missing-colon-after-selector-piece.swift" + } + }, + "match": "\\w*(?::(?:\\w*:)*(\\w*))?", + "name": "entity.name.function.swift" + } + ] + }, + { + "begin": "(@)(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)", + "beginCaptures": { + "0": { + "name": "storage.modifier.attribute.swift" + }, + "1": { + "name": "punctuation.definition.attribute.swift" + }, + "2": { + "name": "punctuation.definition.identifier.swift" + }, + "3": { + "name": "punctuation.definition.identifier.swift" + } + }, + "comment": "any other attribute", + "end": "(?!\\G\\()", + "name": "meta.attribute.swift", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.arguments.begin.swift" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.swift" + } + }, + "name": "meta.arguments.attribute.swift", + "patterns": [ + { + "include": "#expressions" + } + ] + } + ] + } + ] + }, + "builtin-functions": { + "patterns": [ + { + "comment": "Member functions in the standard library in Swift 3 which may be used with trailing closures and no parentheses", + "match": "(?<=\\.)(?:s(?:ort(?:ed)?|plit)|contains|index|partition|f(?:i(?:lter|rst)|orEach|latMap)|with(?:MutableCharacters|CString|U(?:nsafe(?:Mutable(?:BufferPointer|Pointer(?:s|To(?:Header|Elements)))|BufferPointer)|TF8Buffer))|m(?:in|a(?:p|x)))(?=\\s*[({])\\b", + "name": "support.function.swift" + }, + { + "comment": "Member functions in the standard library in Swift 3", + "match": "(?<=\\.)(?:s(?:ymmetricDifference|t(?:oreBytes|arts|ride)|ortInPlace|u(?:ccessor|ffix|btract(?:ing|InPlace|WithOverflow)?)|quareRoot|amePosition)|h(?:oldsUnique(?:Reference|OrPinnedReference)|as(?:Suffix|Prefix))|ne(?:gate(?:d)?|xt)|c(?:o(?:untByEnumerating|py(?:Bytes)?)|lamp(?:ed)?|reate)|t(?:o(?:IntMax|Opaque|UIntMax)|ake(?:RetainedValue|UnretainedValue)|r(?:uncatingRemainder|a(?:nscodedLength|ilSurrogate)))|i(?:s(?:MutableAndUniquelyReferenced(?:OrPinned)?|S(?:trictSu(?:perset(?:Of)?|bset(?:Of)?)|u(?:perset(?:Of)?|bset(?:Of)?))|Continuation|T(?:otallyOrdered|railSurrogate)|Disjoint(?:With)?|Unique(?:Reference|lyReferenced(?:OrPinned)?)|Equal|Le(?:ss(?:ThanOrEqualTo)?|adSurrogate))|n(?:sert(?:ContentsOf)?|tersect(?:ion|InPlace)?|itialize(?:Memory|From)?|dex(?:Of|ForKey)))|o(?:verlaps|bjectAt)|d(?:i(?:stance(?:To)?|vide(?:d|WithOverflow)?)|e(?:s(?:cendant|troy)|code(?:CString)?|initialize|alloc(?:ate(?:Capacity)?)?)|rop(?:First|Last))|u(?:n(?:ion(?:InPlace)?|derestimateCount|wrappedOrError)|p(?:date(?:Value)?|percased))|join(?:ed|WithSeparator)|p(?:op(?:First|Last)|ass(?:Retained|Unretained)|re(?:decessor|fix))|e(?:scape(?:d)?|n(?:code|umerate(?:d)?)|lementsEqual|xclusiveOr(?:InPlace)?)|f(?:orm(?:Remainder|S(?:ymmetricDifference|quareRoot)|TruncatingRemainder|In(?:tersection|dex)|Union)|latten|rom(?:CString(?:RepairingIllFormedUTF8)?|Opaque))|w(?:i(?:thMemoryRebound|dth)|rite(?:To)?)|l(?:o(?:wercased|ad)|e(?:adSurrogate|xicographical(?:Compare|lyPrecedes)))|a(?:ss(?:ign(?:BackwardFrom|From)?|umingMemoryBound)|d(?:d(?:ing(?:Product)?|Product|WithOverflow)?|vanced(?:By)?)|utorelease|ppend(?:ContentsOf)?|lloc(?:ate)?|bs)|r(?:ound(?:ed)?|e(?:serveCapacity|tain|duce|place(?:Range|Subrange)?|verse(?:d)?|quest(?:NativeBuffer|UniqueMutableBackingBuffer)|lease|m(?:ove(?:Range|Subrange|Value(?:ForKey)?|First|Last|A(?:tIndex|ll))?|ainder(?:WithOverflow)?)))|ge(?:nerate|t(?:Objects|Element))|m(?:in(?:imum(?:Magnitude)?|Element)|ove(?:Initialize(?:Memory|BackwardFrom|From)?|Assign(?:From)?)?|ultipl(?:y(?:WithOverflow)?|ied)|easure|a(?:ke(?:Iterator|Description)|x(?:imum(?:Magnitude)?|Element)))|bindMemory)(?=\\s*\\()", + "name": "support.function.swift" + }, + { + "comment": "Member functions in the standard library in Swift 2 only", + "match": "(?<=\\.)(?:s(?:uperclassMirror|amePositionIn|tartsWith)|nextObject|c(?:haracterAtIndex|o(?:untByEnumeratingWithState|pyWithZone)|ustom(?:Mirror|PlaygroundQuickLook))|is(?:EmptyInput|ASCII)|object(?:Enumerator|ForKey|AtIndex)|join|put|keyEnumerator|withUnsafeMutablePointerToValue|length|getMirror|m(?:oveInitializeAssignFrom|ember))(?=\\s*\\()", + "name": "support.function.swift" + } + ] + }, + "builtin-global-functions": { + "patterns": [ + { + "begin": "\\b(type)(\\()\\s*(of)(:)", + "beginCaptures": { + "1": { + "name": "support.function.dynamic-type.swift" + }, + "2": { + "name": "punctuation.definition.arguments.begin.swift" + }, + "3": { + "name": "support.variable.parameter.swift" + }, + "4": { + "name": "punctuation.separator.argument-label.begin.swift" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.swift" + } + }, + "patterns": [ + { + "include": "#expressions" + } + ] + }, + { + "comment": "Global functions available in Swift 3 which may be used with trailing closures and no parentheses", + "match": "\\b(?:anyGenerator|autoreleasepool)(?=\\s*[({])\\b", + "name": "support.function.swift" + }, + { + "comment": "Global functions available in Swift 3", + "match": "\\b(?:s(?:tride(?:of(?:Value)?)?|izeof(?:Value)?|equence|wap)|numericCast|transcode|is(?:UniquelyReferenced(?:NonObjC)?|KnownUniquelyReferenced)|zip|d(?:ump|ebugPrint)|unsafe(?:BitCast|Downcast|Unwrap|Address(?:Of)?)|pr(?:int|econdition(?:Failure)?)|fatalError|with(?:Unsafe(?:MutablePointer|Pointer)|ExtendedLifetime|VaList)|a(?:ssert(?:ionFailure)?|lignof(?:Value)?|bs)|re(?:peatElement|adLine)|getVaList|m(?:in|ax))(?=\\s*\\()", + "name": "support.function.swift" + }, + { + "comment": "Global functions available in Swift 2 only", + "match": "\\b(?:s(?:ort|uffix|pli(?:ce|t))|insert|overlaps|d(?:istance|rop(?:First|Last))|join|prefix|extend|withUnsafe(?:MutablePointers|Pointers)|lazy|advance|re(?:flect|move(?:Range|Last|A(?:tIndex|ll))))(?=\\s*\\()", + "name": "support.function.swift" + } + ] + }, + "builtin-properties": { + "patterns": [ + { + "comment": "The simpler (?<=\\bProcess\\.|\\bCommandLine\\.) breaks VS Code / Atom, see https://github.com/textmate/swift.tmbundle/issues/29", + "match": "(?<=^Process\\.|\\WProcess\\.|^CommandLine\\.|\\WCommandLine\\.)(arguments|argc|unsafeArgv)", + "name": "support.variable.swift" + }, + { + "comment": "Properties in the standard library in Swift 3", + "match": "(?<=\\.)(?:s(?:t(?:artIndex|ri(?:ngValue|de))|i(?:ze|gn(?:BitIndex|ificand(?:Bit(?:Count|Pattern)|Width)?|alingNaN)?)|u(?:perclassMirror|mmary|bscriptBaseAddress))|h(?:eader|as(?:hValue|PointerRepresentation))|n(?:ulTerminatedUTF8|ext(?:Down|Up)|a(?:n|tiveOwner))|c(?:haracters|ount(?:TrailingZeros)?|ustom(?:Mirror|PlaygroundQuickLook)|apacity)|i(?:s(?:S(?:ign(?:Minus|aling(?:NaN)?)|ubnormal)|N(?:ormal|aN)|Canonical|Infinite|Zero|Empty|Finite|ASCII)|n(?:dices|finity)|dentity)|owner|de(?:scription|bugDescription)|u(?:n(?:safelyUnwrapped|icodeScalar(?:s)?|derestimatedCount)|tf(?:16|8(?:Start|C(?:String|odeUnitCount))?)|intValue|ppercaseString|lp(?:OfOne)?)|p(?:i|ointee)|e(?:ndIndex|lements|xponent(?:Bit(?:Count|Pattern))?)|value(?:s)?|keys|quietNaN|f(?:irst(?:ElementAddress(?:IfContiguous)?)?|loatingPointClass)|l(?:ittleEndian|owercaseString|eastNo(?:nzeroMagnitude|rmalMagnitude)|a(?:st|zy))|a(?:l(?:ignment|l(?:ocatedElementCount|Zeros))|rray(?:PropertyIsNativeTypeChecked)?)|ra(?:dix|wValue)|greatestFiniteMagnitude|m(?:in|emory|ax)|b(?:yteS(?:ize|wapped)|i(?:nade|tPattern|gEndian)|uffer|ase(?:Address)?))\\b", + "name": "support.variable.swift" + }, + { + "comment": "Properties in the standard library in Swift 2 only", + "match": "(?<=\\.)(?:boolValue|disposition|end|objectIdentifier|quickLookObject|start|valueType)\\b", + "name": "support.variable.swift" + }, + { + "comment": "Enum cases in the standard library - note that there is some overlap between these and the properties", + "match": "(?<=\\.)(?:s(?:calarValue|i(?:ze|gnalingNaN)|o(?:und|me)|uppressed|prite|et)|n(?:one|egative(?:Subnormal|Normal|Infinity|Zero))|c(?:ol(?:or|lection)|ustomized)|t(?:o(?:NearestOr(?:Even|AwayFromZero)|wardZero)|uple|ext)|i(?:nt|mage)|optional|d(?:ictionary|o(?:uble|wn))|u(?:Int|p|rl)|p(?:o(?:sitive(?:Subnormal|Normal|Infinity|Zero)|int)|lus)|e(?:rror|mptyInput)|view|quietNaN|float|a(?:ttributedString|wayFromZero)|r(?:ectangle|ange)|generated|minus|b(?:ool|ezierPath))\\b", + "name": "support.variable.swift" + } + ] + }, + "builtin-types": { + "comment": "Types provided in the standard library", + "patterns": [ + { + "include": "#builtin-class-type" + }, + { + "include": "#builtin-enum-type" + }, + { + "include": "#builtin-protocol-type" + }, + { + "include": "#builtin-struct-type" + }, + { + "include": "#builtin-typealias" + }, + { + "match": "\\bAny\\b", + "name": "support.type.any.swift" + } + ], + "repository": { + "builtin-class-type": { + "comment": "Builtin class types", + "match": "\\b(Managed(Buffer|ProtoBuffer)|NonObjectiveCBase|AnyGenerator)\\b", + "name": "support.class.swift" + }, + "builtin-enum-type": { + "patterns": [ + { + "comment": "CommandLine is an enum, but it acts like a constant", + "match": "\\b(?:CommandLine|Process(?=\\.))\\b", + "name": "support.constant.swift" + }, + { + "comment": "The return type of a function that never returns", + "match": "\\bNever\\b", + "name": "support.constant.never.swift" + }, + { + "comment": "Enum types in the standard library in Swift 3", + "match": "\\b(?:ImplicitlyUnwrappedOptional|Representation|MemoryLayout|FloatingPointClassification|SetIndexRepresentation|SetIteratorRepresentation|FloatingPointRoundingRule|UnicodeDecodingResult|Optional|DictionaryIndexRepresentation|AncestorRepresentation|DisplayStyle|PlaygroundQuickLook|Never|FloatingPointSign|Bit|DictionaryIteratorRepresentation)\\b", + "name": "support.type.swift" + }, + { + "comment": "Enum types in the standard library in Swift 2 only", + "match": "\\b(?:MirrorDisposition|QuickLookObject)\\b", + "name": "support.type.swift" + } + ] + }, + "builtin-protocol-type": { + "patterns": [ + { + "comment": "Protocols in the standard library in Swift 3", + "match": "\\b(?:Ra(?:n(?:domAccess(?:Collection|Indexable)|geReplaceable(?:Collection|Indexable))|wRepresentable)|M(?:irrorPath|utable(?:Collection|Indexable))|Bi(?:naryFloatingPoint|twiseOperations|directional(?:Collection|Indexable))|S(?:tr(?:ideable|eamable)|igned(?:Number|Integer)|e(?:tAlgebra|quence))|Hashable|C(?:o(?:llection|mparable)|ustom(?:Reflectable|StringConvertible|DebugStringConvertible|PlaygroundQuickLookable|LeafReflectable)|VarArg)|TextOutputStream|I(?:n(?:teger(?:Arithmetic)?|dexable(?:Base)?)|teratorProtocol)|OptionSet|Un(?:signedInteger|icodeCodec)|E(?:quatable|rror|xpressibleBy(?:BooleanLiteral|String(?:Interpolation|Literal)|NilLiteral|IntegerLiteral|DictionaryLiteral|UnicodeScalarLiteral|ExtendedGraphemeClusterLiteral|FloatLiteral|ArrayLiteral))|FloatingPoint|L(?:osslessStringConvertible|azy(?:SequenceProtocol|CollectionProtocol))|A(?:nyObject|bsoluteValuable))\\b", + "name": "support.type.swift" + }, + { + "comment": "Protocols in the standard library in Swift 2 only", + "match": "\\b(?:Ran(?:domAccessIndexType|geReplaceableCollectionType)|GeneratorType|M(?:irror(?:Type|PathType)|utable(?:Sliceable|CollectionType))|B(?:i(?:twiseOperationsType|directionalIndexType)|oolean(?:Type|LiteralConvertible))|S(?:tring(?:InterpolationConvertible|LiteralConvertible)|i(?:nkType|gned(?:NumberType|IntegerType))|e(?:tAlgebraType|quenceType)|liceable)|NilLiteralConvertible|C(?:ollectionType|VarArgType)|Inte(?:rvalType|ger(?:Type|LiteralConvertible|ArithmeticType))|O(?:utputStreamType|ptionSetType)|DictionaryLiteralConvertible|Un(?:signedIntegerType|icode(?:ScalarLiteralConvertible|CodecType))|E(?:rrorType|xten(?:sibleCollectionType|dedGraphemeClusterLiteralConvertible))|F(?:orwardIndexType|loat(?:ingPointType|LiteralConvertible))|A(?:nyCollectionType|rrayLiteralConvertible))\\b", + "name": "support.type.swift" + } + ] + }, + "builtin-struct-type": { + "patterns": [ + { + "comment": "Structs in the standard library in Swift 3", + "match": "\\b(?:R(?:e(?:peat(?:ed)?|versed(?:RandomAccess(?:Collection|Index)|Collection|Index))|an(?:domAccessSlice|ge(?:Replaceable(?:RandomAccessSlice|BidirectionalSlice|Slice)|Generator)?))|Generator(?:Sequence|OfOne)|M(?:irror|utable(?:Ran(?:domAccessSlice|geReplaceable(?:RandomAccessSlice|BidirectionalSlice|Slice))|BidirectionalSlice|Slice)|anagedBufferPointer)|B(?:idirectionalSlice|ool)|S(?:t(?:aticString|ri(?:ng|deT(?:hrough(?:Generator|Iterator)?|o(?:Generator|Iterator)?)))|et(?:I(?:ndex|terator))?|lice)|HalfOpenInterval|C(?:haracter(?:View)?|o(?:ntiguousArray|untable(?:Range|ClosedRange)|llectionOfOne)|OpaquePointer|losed(?:Range(?:I(?:ndex|terator))?|Interval)|VaListPointer)|I(?:n(?:t(?:16|8|32|64)?|d(?:ices|ex(?:ing(?:Generator|Iterator))?))|terator(?:Sequence|OverOne)?)|Zip2(?:Sequence|Iterator)|O(?:paquePointer|bjectIdentifier)|D(?:ictionary(?:I(?:ndex|terator)|Literal)?|ouble|efault(?:RandomAccessIndices|BidirectionalIndices|Indices))|U(?:n(?:safe(?:RawPointer|Mutable(?:RawPointer|BufferPointer|Pointer)|BufferPointer(?:Generator|Iterator)?|Pointer)|icodeScalar(?:View)?|foldSequence|managed)|TF(?:16(?:View)?|8(?:View)?|32)|Int(?:16|8|32|64)?)|Join(?:Generator|ed(?:Sequence|Iterator))|PermutationGenerator|E(?:numerate(?:Generator|Sequence|d(?:Sequence|Iterator))|mpty(?:Generator|Collection|Iterator))|Fl(?:oat(?:80)?|atten(?:Generator|BidirectionalCollection(?:Index)?|Sequence|Collection(?:Index)?|Iterator))|L(?:egacyChildren|azy(?:RandomAccessCollection|Map(?:RandomAccessCollection|Generator|BidirectionalCollection|Sequence|Collection|Iterator)|BidirectionalCollection|Sequence|Collection|Filter(?:Generator|BidirectionalCollection|Sequence|Collection|I(?:ndex|terator))))|A(?:ny(?:RandomAccessCollection|Generator|BidirectionalCollection|Sequence|Hashable|Collection|I(?:ndex|terator))|utoreleasingUnsafeMutablePointer|rray(?:Slice)?))\\b", + "name": "support.type.swift" + }, + { + "comment": "Structs in the standard library in Swift 2 only", + "match": "\\b(?:R(?:everse(?:RandomAccess(?:Collection|Index)|Collection|Index)|awByte)|Map(?:Generator|Sequence|Collection)|S(?:inkOf|etGenerator)|Zip2Generator|DictionaryGenerator|Filter(?:Generator|Sequence|Collection(?:Index)?)|LazyForwardCollection|Any(?:RandomAccessIndex|BidirectionalIndex|Forward(?:Collection|Index)))\\b", + "name": "support.type.swift" + } + ] + }, + "builtin-typealias": { + "patterns": [ + { + "comment": "Typealiases in the standard library in Swift 3", + "match": "\\b(?:Raw(?:Significand|Exponent|Value)|B(?:ooleanLiteralType|uffer|ase)|S(?:t(?:orage|r(?:i(?:ngLiteralType|de)|eam(?:1|2)))|ubSequence)|NativeBuffer|C(?:hild(?:ren)?|Bool|S(?:hort|ignedChar)|odeUnit|Char(?:16|32)?|Int|Double|Unsigned(?:Short|Char|Int|Long(?:Long)?)|Float|WideChar|Long(?:Long)?)|I(?:n(?:t(?:Max|egerLiteralType)|d(?:ices|ex(?:Distance)?))|terator)|Distance|U(?:n(?:icodeScalar(?:Type|Index|View|LiteralType)|foldFirstSequence)|TF(?:16(?:Index|View)|8Index)|IntMax)|E(?:lement(?:s)?|x(?:tendedGraphemeCluster(?:Type|LiteralType)|ponent))|V(?:oid|alue)|Key|Float(?:32|LiteralType|64)|AnyClass)\\b", + "name": "support.type.swift" + }, + { + "comment": "Typealiases in the standard library in Swift 2 only", + "match": "\\b(?:Generator|PlaygroundQuickLook|UWord|Word)\\b", + "name": "support.type.swift" + } + ] + } + } + }, + "code-block": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.scope.begin.swift" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.scope.end.swift" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + "comments": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.comment.swift" + } + }, + "match": "\\A^(#!).*$\\n?", + "name": "comment.line.number-sign.swift" + }, + { + "begin": "/\\*\\*(?!/)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.swift" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.swift" + } + }, + "name": "comment.block.documentation.swift", + "patterns": [ + { + "include": "#nested" + } + ] + }, + { + "begin": "/\\*:", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.swift" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.swift" + } + }, + "name": "comment.block.documentation.playground.swift", + "patterns": [ + { + "include": "#nested" + } + ] + }, + { + "begin": "/\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.swift" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.swift" + } + }, + "name": "comment.block.swift", + "patterns": [ + { + "include": "#nested" + } + ] + }, + { + "match": "\\*/", + "name": "invalid.illegal.unexpected-end-of-block-comment.swift" + }, + { + "begin": "(^[ \\t]+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.swift" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "///", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.swift" + } + }, + "end": "^", + "name": "comment.line.triple-slash.documentation.swift" + }, + { + "begin": "//:", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.swift" + } + }, + "end": "^", + "name": "comment.line.double-slash.documentation.swift" + }, + { + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.swift" + } + }, + "end": "^", + "name": "comment.line.double-slash.swift" + } + ] + } + ], + "repository": { + "nested": { + "begin": "/\\*", + "end": "\\*/", + "patterns": [ + { + "include": "#nested" + } + ] + } + } + }, + "compiler-control": { + "patterns": [ + { + "begin": "^\\s*(#)(if|elseif)\\s+(false)\\b.*?(?=$|//|/\\*)", + "beginCaptures": { + "0": { + "name": "meta.preprocessor.conditional.swift" + }, + "1": { + "name": "punctuation.definition.preprocessor.swift" + }, + "2": { + "name": "keyword.control.preprocessor.conditional.swift" + }, + "3": { + "name": "constant.language.boolean.swift" + } + }, + "contentName": "comment.block.preprocessor.swift", + "end": "(?=^\\s*(#(elseif|else|endif)\\b))" + }, + { + "begin": "^\\s*(#)(if|elseif)\\s+", + "captures": { + "1": { + "name": "punctuation.definition.preprocessor.swift" + }, + "2": { + "name": "keyword.control.preprocessor.conditional.swift" + } + }, + "end": "(?=\\s*(?://|/\\*))|$", + "name": "meta.preprocessor.conditional.swift", + "patterns": [ + { + "match": "(&&|\\|\\|)", + "name": "keyword.operator.logical.swift" + }, + { + "match": "\\b(true|false)\\b", + "name": "constant.language.boolean.swift" + }, + { + "captures": { + "1": { + "name": "keyword.other.condition.swift" + }, + "2": { + "name": "punctuation.definition.parameters.begin.swift" + }, + "3": { + "name": "support.constant.platform.architecture.swift" + }, + "4": { + "name": "punctuation.definition.parameters.end.swift" + } + }, + "match": "\\b(arch)\\s*(\\()\\s*(?:(arm|arm64|powerpc64|powerpc64le|i386|x86_64|s390x)|\\w+)\\s*(\\))" + }, + { + "captures": { + "1": { + "name": "keyword.other.condition.swift" + }, + "2": { + "name": "punctuation.definition.parameters.begin.swift" + }, + "3": { + "name": "support.constant.platform.os.swift" + }, + "4": { + "name": "punctuation.definition.parameters.end.swift" + } + }, + "match": "\\b(os)\\s*(\\()\\s*(?:(macOS|OSX|iOS|tvOS|watchOS|Android|Linux|FreeBSD|Windows|PS4)|\\w+)\\s*(\\))" + }, + { + "captures": { + "1": { + "name": "keyword.other.condition.swift" + }, + "2": { + "name": "punctuation.definition.parameters.begin.swift" + }, + "3": { + "name": "entity.name.type.module.swift" + }, + "4": { + "name": "punctuation.definition.parameters.end.swift" + } + }, + "match": "\\b(canImport)\\s*(\\()([\\p{L}_][\\p{L}_\\p{N}\\p{M}]*)(\\))" + }, + { + "begin": "\\b(targetEnvironment)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.condition.swift" + }, + "2": { + "name": "punctuation.definition.parameters.begin.swift" + } + }, + "end": "(\\))|$", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.swift" + } + }, + "patterns": [ + { + "match": "\\b(simulator|UIKitForMac)\\b", + "name": "support.constant.platform.environment.swift" + } + ] + }, + { + "begin": "\\b(swift|compiler)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.condition.swift" + }, + "2": { + "name": "punctuation.definition.parameters.begin.swift" + } + }, + "end": "(\\))|$", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.swift" + } + }, + "patterns": [ + { + "match": ">=|<", + "name": "keyword.operator.comparison.swift" + }, + { + "match": "\\b[0-9]+(?:\\.[0-9]+)*\\b", + "name": "constant.numeric.swift" + } + ] + } + ] + }, + { + "captures": { + "1": { + "name": "punctuation.definition.preprocessor.swift" + }, + "2": { + "name": "keyword.control.preprocessor.conditional.swift" + }, + "3": { + "patterns": [ + { + "match": "\\S+", + "name": "invalid.illegal.character-not-allowed-here.swift" + } + ] + } + }, + "match": "^\\s*(#)(else|endif)(.*?)(?=$|//|/\\*)", + "name": "meta.preprocessor.conditional.swift" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.preprocessor.swift" + }, + "2": { + "name": "keyword.control.preprocessor.sourcelocation.swift" + }, + "4": { + "name": "punctuation.definition.parameters.begin.swift" + }, + "5": { + "patterns": [ + { + "begin": "(file)\\s*(:)\\s*(?=\")", + "beginCaptures": { + "1": { + "name": "support.variable.parameter.swift" + }, + "2": { + "name": "punctuation.separator.key-value.swift" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "include": "#literals" + } + ] + }, + { + "captures": { + "1": { + "name": "support.variable.parameter.swift" + }, + "2": { + "name": "punctuation.separator.key-value.swift" + }, + "3": { + "name": "constant.numeric.integer.swift" + } + }, + "match": "(line)\\s*(:)\\s*([0-9]+)" + }, + { + "match": ",", + "name": "punctuation.separator.parameters.swift" + }, + { + "match": "\\S+", + "name": "invalid.illegal.character-not-allowed-here.swift" + } + ] + }, + "6": { + "name": "punctuation.definition.parameters.begin.swift" + }, + "7": { + "patterns": [ + { + "match": "\\S+", + "name": "invalid.illegal.character-not-allowed-here.swift" + } + ] + } + }, + "match": "^\\s*(#)(sourceLocation)((\\()([^)]*)(\\)))(.*?)(?=$|//|/\\*)", + "name": "meta.preprocessor.sourcelocation.swift" + } + ] + }, + "declarations": { + "patterns": [ + { + "include": "#function" + }, + { + "include": "#function-initializer" + }, + { + "include": "#typed-variable-declaration" + }, + { + "include": "#import" + }, + { + "include": "#operator" + }, + { + "include": "#precedencegroup" + }, + { + "include": "#protocol" + }, + { + "include": "#type" + }, + { + "include": "#extension" + }, + { + "include": "#typealias" + } + ], + "repository": { + "available-types": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#builtin-types" + }, + { + "include": "#attributes" + }, + { + "match": "\\basync\\b", + "name": "keyword.control.async.swift" + }, + { + "match": "\\b(?:throws|rethrows)\\b", + "name": "keyword.control.exception.swift" + }, + { + "match": "\\bsome\\b", + "name": "keyword.operator.type.opaque.swift" + }, + { + "match": "\\bany\\b", + "name": "keyword.operator.type.existential.swift" + }, + { + "match": "\\b(?:inout|isolated)\\b", + "name": "storage.modifier.swift" + }, + { + "match": "\\bSelf\\b", + "name": "variable.language.swift" + }, + { + "captures": { + "1": { + "name": "keyword.operator.type.function.swift" + } + }, + "match": "(?<![/=\\-+!*%<>&|\\^~.])(->)(?![/=\\-+!*%<>&|\\^~.])" + }, + { + "captures": { + "1": { + "name": "keyword.operator.type.composition.swift" + } + }, + "comment": "Swift 3: A & B", + "match": "(?<![/=\\-+!*%<>&|\\^~.])(&)(?![/=\\-+!*%<>&|\\^~.])" + }, + { + "match": "[?!]", + "name": "keyword.operator.type.optional.swift" + }, + { + "match": "\\.\\.\\.", + "name": "keyword.operator.function.variadic-parameter.swift" + }, + { + "comment": "Swift 2: protocol<A, B>", + "match": "\\bprotocol\\b", + "name": "keyword.operator.type.composition.swift" + }, + { + "match": "(?<=\\.)(?:Protocol|Type)\\b", + "name": "keyword.operator.type.metatype.swift" + }, + { + "include": "#tuple-type" + }, + { + "include": "#collection-type" + }, + { + "include": "#generic-argument-clause" + } + ], + "repository": { + "collection-type": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.collection-type.begin.swift" + } + }, + "comment": "array and dictionary types [Value] and [Key: Value]", + "end": "\\]|(?=[>){}])", + "endCaptures": { + "0": { + "name": "punctuation.section.collection-type.end.swift" + } + }, + "patterns": [ + { + "include": "#available-types" + }, + { + "begin": ":", + "beginCaptures": { + "0": { + "name": "punctuation.separator.key-value.swift" + } + }, + "end": "(?=\\]|[>){}])", + "patterns": [ + { + "match": ":", + "name": "invalid.illegal.extra-colon-in-dictionary-type.swift" + }, + { + "include": "#available-types" + } + ] + } + ] + }, + "tuple-type": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.tuple-type.begin.swift" + } + }, + "end": "\\)|(?=[>\\]{}])", + "endCaptures": { + "0": { + "name": "punctuation.section.tuple-type.end.swift" + } + }, + "patterns": [ + { + "include": "#available-types" + } + ] + } + } + }, + "extension": { + "begin": "\\b(extension)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))", + "beginCaptures": { + "1": { + "name": "storage.type.$1.swift" + }, + "2": { + "name": "entity.name.type.swift", + "patterns": [ + { + "include": "#available-types" + } + ] + }, + "3": { + "name": "punctuation.definition.identifier.swift" + }, + "4": { + "name": "punctuation.definition.identifier.swift" + } + }, + "end": "(?<=\\})", + "name": "meta.definition.type.$1.swift", + "patterns": [ + { + "include": "#comments" + }, + { + "comment": "SE-0143: Conditional Conformances", + "include": "#generic-where-clause" + }, + { + "include": "#inheritance-clause" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.type.begin.swift" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.type.end.swift" + } + }, + "name": "meta.definition.type.body.swift", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "function": { + "begin": "(?x)\n\t\t\t\t\t\t\\b\n\t\t\t\t\t\t(?:(nonisolated)\\s+)?\n\t\t\t\t\t\t(func)\n\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)\n\t\t\t\t\t\t | (?:\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?<oph>\t\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\\g<oph>\n\t\t\t\t\t\t\t\t\t | (?<opc>\t\t\t\t\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t\t\t[\\x{0300}-\\x{036F}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t)*\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t | ( \\. ( \\g<oph> | \\g<opc> | \\. )+ )\t\t\t# Dot operators\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t(?=\\(|<)\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "storage.modifier.swift" + }, + "2": { + "name": "storage.type.function.swift" + }, + "3": { + "name": "entity.name.function.swift" + }, + "4": { + "name": "punctuation.definition.identifier.swift" + }, + "5": { + "name": "punctuation.definition.identifier.swift" + } + }, + "end": "(?<=\\})|$(?# functions in protocol declarations or generated interfaces have no body)", + "name": "meta.definition.function.swift", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#generic-parameter-clause" + }, + { + "include": "#parameter-clause" + }, + { + "include": "#function-result" + }, + { + "include": "#async-throws" + }, + { + "comment": "Swift 3: generic constraints after the parameters and return type", + "include": "#generic-where-clause" + }, + { + "begin": "(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.section.function.begin.swift" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.section.function.end.swift" + } + }, + "name": "meta.definition.function.body.swift", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "function-initializer": { + "begin": "(?<!\\.)\\b(init[?!]*(?# only one is valid, but we want the in⇥ snippet to produce something that looks good))\\s*(?=\\(|<)", + "beginCaptures": { + "1": { + "name": "storage.type.function.swift", + "patterns": [ + { + "match": "(?<=[?!])[?!]+", + "name": "invalid.illegal.character-not-allowed-here.swift" + } + ] + } + }, + "end": "(?<=\\})|$", + "name": "meta.definition.function.initializer.swift", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#generic-parameter-clause" + }, + { + "include": "#parameter-clause" + }, + { + "include": "#async-throws" + }, + { + "comment": "Swift 3: generic constraints after the parameters and return type", + "include": "#generic-where-clause" + }, + { + "begin": "(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.section.function.begin.swift" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.section.function.end.swift" + } + }, + "name": "meta.definition.function.body.swift", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "function-result": { + "begin": "(?<![/=\\-+!*%<>&|\\^~.])(->)(?![/=\\-+!*%<>&|\\^~.])\\s*", + "beginCaptures": { + "1": { + "name": "keyword.operator.function-result.swift" + } + }, + "end": "(?!\\G)(?=\\{|\\bwhere\\b|;)|$", + "name": "meta.function-result.swift", + "patterns": [ + { + "include": "#available-types" + } + ] + }, + "generic-argument-clause": { + "begin": "<", + "beginCaptures": { + "0": { + "name": "punctuation.separator.generic-argument-clause.begin.swift" + } + }, + "end": ">|(?=[)\\]{}])", + "endCaptures": { + "0": { + "name": "punctuation.separator.generic-argument-clause.end.swift" + } + }, + "name": "meta.generic-argument-clause.swift", + "patterns": [ + { + "include": "#available-types" + } + ] + }, + "generic-parameter-clause": { + "begin": "<", + "beginCaptures": { + "0": { + "name": "punctuation.separator.generic-parameter-clause.begin.swift" + } + }, + "end": ">|(?=[^\\w\\d:<>\\s,=&`])(?# characters besides these are never valid in a generic param list -- even if it's not really a valid clause, we should stop trying to parse it if we see one of them.)", + "endCaptures": { + "0": { + "name": "punctuation.separator.generic-parameter-clause.end.swift" + } + }, + "name": "meta.generic-parameter-clause.swift", + "patterns": [ + { + "include": "#comments" + }, + { + "comment": "Swift 2: constraints inside the generic param list", + "include": "#generic-where-clause" + }, + { + "captures": { + "1": { + "name": "variable.language.generic-parameter.swift" + } + }, + "match": "\\b((?!\\d)\\w[\\w\\d]*)\\b" + }, + { + "match": ",", + "name": "punctuation.separator.generic-parameters.swift" + }, + { + "begin": "(:)\\s*", + "beginCaptures": { + "1": { + "name": "punctuation.separator.generic-parameter-constraint.swift" + } + }, + "end": "(?=[,>]|(?!\\G)\\bwhere\\b)", + "name": "meta.generic-parameter-constraint.swift", + "patterns": [ + { + "begin": "\\G", + "end": "(?=[,>]|(?!\\G)\\bwhere\\b)", + "name": "entity.other.inherited-class.swift", + "patterns": [ + { + "include": "#type-identifier" + } + ] + } + ] + } + ] + }, + "generic-where-clause": { + "begin": "\\b(where)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.other.generic-constraint-introducer.swift" + } + }, + "end": "(?!\\G)$|(?=[>{};\\n]|//|/\\*)", + "name": "meta.generic-where-clause.swift", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#requirement-list" + } + ], + "repository": { + "requirement-list": { + "begin": "\\G|,\\s*", + "end": "(?=[,>{};\\n]|//|/\\*)", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#constraint" + }, + { + "include": "#available-types" + }, + { + "begin": "(?<![/=\\-+!*%<>&|\\^~.])(==)(?![/=\\-+!*%<>&|\\^~.])", + "beginCaptures": { + "1": { + "name": "keyword.operator.generic-constraint.same-type.swift" + } + }, + "end": "(?=\\s*[,>{};\\n]|//|/\\*)", + "name": "meta.generic-where-clause.same-type-requirement.swift", + "patterns": [ + { + "include": "#available-types" + } + ] + }, + { + "begin": "(?<![/=\\-+!*%<>&|\\^~.])(:)(?![/=\\-+!*%<>&|\\^~.])", + "beginCaptures": { + "1": { + "name": "keyword.operator.generic-constraint.conforms-to.swift" + } + }, + "end": "(?=\\s*[,>{};\\n]|//|/\\*)", + "name": "meta.generic-where-clause.conformance-requirement.swift", + "patterns": [ + { + "begin": "\\G\\s*", + "contentName": "entity.other.inherited-class.swift", + "end": "(?=\\s*[,>{};\\n]|//|/\\*)", + "patterns": [ + { + "include": "#available-types" + } + ] + } + ] + } + ] + } + } + }, + "import": { + "begin": "(?<!\\.)\\b(import)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.control.import.swift" + } + }, + "end": "(;)|$\\n?|(?=//|/\\*)", + "endCaptures": { + "1": { + "name": "punctuation.terminator.statement.swift" + } + }, + "name": "meta.import.swift", + "patterns": [ + { + "begin": "\\G(?!;|$|//|/\\*)(?:(typealias|struct|class|actor|enum|protocol|var|func)\\s+)?", + "beginCaptures": { + "1": { + "name": "storage.modifier.swift" + } + }, + "end": "(?=;|$|//|/\\*)", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.identifier.swift" + }, + "2": { + "name": "punctuation.definition.identifier.swift" + } + }, + "match": "(?x)\n\t\t\t\t\t\t\t\t\t\t(?<=\\G|\\.)\n\t\t\t\t\t\t\t\t\t\t(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)\n\t\t\t\t\t\t\t\t\t", + "name": "entity.name.type.swift" + }, + { + "match": "(?x)\n\t\t\t\t\t\t\t\t\t\t(?<=\\G|\\.)\n\t\t\t\t\t\t\t\t\t\t\\$[0-9]+\n\t\t\t\t\t\t\t\t\t", + "name": "entity.name.type.swift" + }, + { + "captures": { + "1": { + "patterns": [ + { + "match": "\\.", + "name": "invalid.illegal.dot-not-allowed-here.swift" + } + ] + } + }, + "match": "(?x)\n\t\t\t\t\t\t\t\t\t\t(?<=\\G|\\.)\n\t\t\t\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t(?<oph>\t\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\\g<oph>\n\t\t\t\t\t\t\t\t\t\t\t\t | (?<opc>\t\t\t\t\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\\x{0300}-\\x{036F}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)*\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t | ( \\. ( \\g<oph> | \\g<opc> | \\. )+ )\t\t\t# Dot operators\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t(?=\\.|;|$|//|/\\*|\\s)\n\t\t\t\t\t\t\t\t\t", + "name": "entity.name.type.swift" + }, + { + "match": "\\.", + "name": "punctuation.separator.import.swift" + }, + { + "begin": "(?!\\s*(;|$|//|/\\*))", + "end": "(?=\\s*(;|$|//|/\\*))", + "name": "invalid.illegal.character-not-allowed-here.swift" + } + ] + } + ] + }, + "inheritance-clause": { + "begin": "(:)(?=\\s*\\{)|(:)\\s*", + "beginCaptures": { + "1": { + "name": "invalid.illegal.empty-inheritance-clause.swift" + }, + "2": { + "name": "punctuation.separator.inheritance-clause.swift" + } + }, + "end": "(?!\\G)$|(?=[={}]|(?!\\G)\\bwhere\\b)", + "name": "meta.inheritance-clause.swift", + "patterns": [ + { + "begin": "\\bclass\\b", + "beginCaptures": { + "0": { + "name": "storage.type.class.swift" + } + }, + "end": "(?=[={}]|(?!\\G)\\bwhere\\b)", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#more-types" + } + ] + }, + { + "begin": "\\G", + "end": "(?!\\G)$|(?=[={}]|(?!\\G)\\bwhere\\b)", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#inherited-type" + }, + { + "include": "#more-types" + } + ] + } + ], + "repository": { + "inherited-type": { + "begin": "(?=[`\\p{L}_])", + "end": "(?!\\G)", + "name": "entity.other.inherited-class.swift", + "patterns": [ + { + "include": "#type-identifier" + } + ] + }, + "more-types": { + "begin": ",\\s*", + "end": "(?!\\G)(?!//|/\\*)|(?=[,={}]|(?!\\G)\\bwhere\\b)", + "name": "meta.inheritance-list.more-types", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#inherited-type" + }, + { + "include": "#more-types" + } + ] + } + } + }, + "operator": { + "begin": "(?x)\n\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\\b(prefix|infix|postfix)\n\t\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t)?\n\t\t\t\t\t\t\\b\n\t\t\t\t\t\t(operator)\n\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(?<oph>\t\t\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\n\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\\g<oph>\n\t\t\t\t\t\t\t\t | \\.\t\t\t\t\t\t\t\t\t# Invalid dot\n\t\t\t\t\t\t\t\t | (?<opc>\t\t\t\t\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t\t[\\x{0300}-\\x{036F}]\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)*+\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t | ( \\. ( \\g<oph> | \\g<opc> | \\. )++ )\t\t\t# Dot operators\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\\s*\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "storage.modifier.swift" + }, + "2": { + "name": "storage.type.function.operator.swift" + }, + "3": { + "name": "entity.name.function.operator.swift" + }, + "4": { + "patterns": [ + { + "match": "\\.", + "name": "invalid.illegal.dot-not-allowed-here.swift" + } + ] + } + }, + "end": "(;)|$\\n?|(?=//|/\\*)", + "endCaptures": { + "1": { + "name": "punctuation.terminator.statement.swift" + } + }, + "name": "meta.definition.operator.swift", + "patterns": [ + { + "include": "#swift2" + }, + { + "include": "#swift3" + }, + { + "match": "((?!$|;|//|/\\*)\\S)+", + "name": "invalid.illegal.character-not-allowed-here.swift" + } + ], + "repository": { + "swift2": { + "begin": "\\G(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.operator.begin.swift" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.operator.end.swift" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "captures": { + "1": { + "name": "storage.modifier.swift" + }, + "2": { + "name": "keyword.other.operator.associativity.swift" + } + }, + "match": "\\b(associativity)\\s+(left|right)\\b" + }, + { + "captures": { + "1": { + "name": "storage.modifier.swift" + }, + "2": { + "name": "constant.numeric.integer.swift" + } + }, + "match": "\\b(precedence)\\s+([0-9]+)\\b" + }, + { + "captures": { + "1": { + "name": "storage.modifier.swift" + } + }, + "match": "\\b(assignment)\\b" + } + ] + }, + "swift3": { + "captures": { + "2": { + "name": "entity.other.inherited-class.swift", + "patterns": [ + { + "include": "#types-precedencegroup" + } + ] + }, + "3": { + "name": "punctuation.definition.identifier.swift" + }, + "4": { + "name": "punctuation.definition.identifier.swift" + } + }, + "match": "\\G(:)\\s*((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))" + } + } + }, + "parameter-clause": { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.parameters.begin.swift" + } + }, + "end": "(\\))(?:\\s*(async)\\b)?", + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.swift" + }, + "2": { + "name": "keyword.control.async.swift" + } + }, + "name": "meta.parameter-clause.swift", + "patterns": [ + { + "include": "#parameter-list" + } + ] + }, + "parameter-list": { + "patterns": [ + { + "captures": { + "1": { + "name": "entity.name.function.swift" + }, + "2": { + "name": "punctuation.definition.identifier.swift" + }, + "3": { + "name": "punctuation.definition.identifier.swift" + }, + "4": { + "name": "variable.parameter.function.swift" + }, + "5": { + "name": "punctuation.definition.identifier.swift" + }, + "6": { + "name": "punctuation.definition.identifier.swift" + } + }, + "comment": "External parameter labels are considered part of the function name", + "match": "((?<q1>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q1>))\\s+((?<q2>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q2>))(?=\\s*:)" + }, + { + "captures": { + "1": { + "name": "variable.parameter.function.swift" + }, + "2": { + "name": "entity.name.function.swift" + }, + "3": { + "name": "punctuation.definition.identifier.swift" + }, + "4": { + "name": "punctuation.definition.identifier.swift" + } + }, + "comment": "If no external label is given, the name is both the external label and the internal variable name", + "match": "(((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)))(?=\\s*:)" + }, + { + "begin": ":\\s*(?!\\s)", + "end": "(?=[,)])", + "patterns": [ + { + "include": "#available-types" + }, + { + "match": ":", + "name": "invalid.illegal.extra-colon-in-parameter-list.swift" + }, + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "keyword.operator.assignment.swift" + } + }, + "comment": "a parameter's default value", + "end": "(?=[,)])", + "patterns": [ + { + "include": "#expressions" + } + ] + } + ] + } + ] + }, + "precedencegroup": { + "begin": "\\b(precedencegroup)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*(?=\\{)", + "beginCaptures": { + "1": { + "name": "storage.type.precedencegroup.swift" + }, + "2": { + "name": "entity.name.type.precedencegroup.swift" + }, + "3": { + "name": "punctuation.definition.identifier.swift" + }, + "4": { + "name": "punctuation.definition.identifier.swift" + } + }, + "end": "(?!\\G)", + "name": "meta.definition.precedencegroup.swift", + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.precedencegroup.begin.swift" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.precedencegroup.end.swift" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "captures": { + "1": { + "name": "storage.modifier.swift" + }, + "2": { + "name": "entity.other.inherited-class.swift", + "patterns": [ + { + "include": "#types-precedencegroup" + } + ] + }, + "3": { + "name": "punctuation.definition.identifier.swift" + }, + "4": { + "name": "punctuation.definition.identifier.swift" + } + }, + "match": "\\b(higherThan|lowerThan)\\s*:\\s*((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))" + }, + { + "captures": { + "1": { + "name": "storage.modifier.swift" + }, + "2": { + "name": "keyword.other.operator.associativity.swift" + } + }, + "match": "\\b(associativity)\\b(?:\\s*:\\s*(right|left|none)\\b)?" + }, + { + "captures": { + "1": { + "name": "storage.modifier.swift" + }, + "2": { + "name": "constant.language.boolean.swift" + } + }, + "match": "\\b(assignment)\\b(?:\\s*:\\s*(true|false)\\b)?" + } + ] + } + ] + }, + "protocol": { + "begin": "\\b(protocol)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))", + "beginCaptures": { + "1": { + "name": "storage.type.$1.swift" + }, + "2": { + "name": "entity.name.type.$1.swift" + }, + "3": { + "name": "punctuation.definition.identifier.swift" + }, + "4": { + "name": "punctuation.definition.identifier.swift" + } + }, + "end": "(?<=\\})", + "name": "meta.definition.type.protocol.swift", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#inheritance-clause" + }, + { + "comment": "SE-0142: Permit where clauses to constrain associated types", + "include": "#generic-where-clause" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.type.begin.swift" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.type.end.swift" + } + }, + "name": "meta.definition.type.body.swift", + "patterns": [ + { + "include": "#protocol-method" + }, + { + "include": "#protocol-initializer" + }, + { + "include": "#associated-type" + }, + { + "include": "$self" + } + ] + } + ], + "repository": { + "associated-type": { + "begin": "\\b(associatedtype)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*", + "beginCaptures": { + "1": { + "name": "keyword.other.declaration-specifier.swift" + }, + "2": { + "name": "variable.language.associatedtype.swift" + }, + "3": { + "name": "punctuation.definition.identifier.swift" + }, + "4": { + "name": "punctuation.definition.identifier.swift" + } + }, + "end": "(?!\\G)$|(?=[;}]|$)", + "name": "meta.definition.associatedtype.swift", + "patterns": [ + { + "include": "#inheritance-clause" + }, + { + "comment": "SE-0142: Permit where clauses to constrain associated types", + "include": "#generic-where-clause" + }, + { + "include": "#typealias-assignment" + } + ] + }, + "protocol-initializer": { + "begin": "(?<!\\.)\\b(init[?!]*(?# only one is valid, but we want the in⇥ snippet to produce something that looks good))\\s*(?=\\(|<)", + "beginCaptures": { + "1": { + "name": "storage.type.function.swift", + "patterns": [ + { + "match": "(?<=[?!])[?!]+", + "name": "invalid.illegal.character-not-allowed-here.swift" + } + ] + } + }, + "end": "$|(?=;|//|/\\*|\\})", + "name": "meta.definition.function.initializer.swift", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#generic-parameter-clause" + }, + { + "include": "#parameter-clause" + }, + { + "include": "#async-throws" + }, + { + "comment": "Swift 3: generic constraints after the parameters and return type", + "include": "#generic-where-clause" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.function.begin.swift" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.function.end.swift" + } + }, + "name": "invalid.illegal.function-body-not-allowed-in-protocol.swift", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "protocol-method": { + "begin": "(?x)\n\t\t\t\t\t\t\t\t\\b\n\t\t\t\t\t\t\t\t(func)\n\t\t\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)\n\t\t \t\t\t\t\t\t | (?:\n\t\t \t\t\t\t\t\t\t\t(\n\t\t \t\t\t\t\t\t\t\t\t(?<oph>\t\t\t\t\t\t\t\t# operator-head\n\t\t \t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t \t\t\t\t\t\t\t\t\t)\n\t\t \t\t\t\t\t\t\t\t\t(\n\t\t \t\t\t\t\t\t\t\t\t\t\\g<oph>\n\t\t \t\t\t\t\t\t\t\t\t | (?<opc>\t\t\t\t\t\t\t\t# operator-character\n\t\t \t\t\t\t\t\t\t\t\t\t\t[\\x{0300}-\\x{036F}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t \t\t\t\t\t\t\t\t\t\t)\n\t\t \t\t\t\t\t\t\t\t\t)*\n\t\t \t\t\t\t\t\t\t\t)\n\t\t \t\t\t\t\t\t\t | ( \\. ( \\g<oph> | \\g<opc> | \\. )+ )\t\t\t# Dot operators\n\t\t \t\t\t\t\t\t\t)\n\t\t \t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t(?=\\(|<)\n\t\t\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "storage.type.function.swift" + }, + "2": { + "name": "entity.name.function.swift" + }, + "3": { + "name": "punctuation.definition.identifier.swift" + }, + "4": { + "name": "punctuation.definition.identifier.swift" + } + }, + "end": "$|(?=;|//|/\\*|\\})", + "name": "meta.definition.function.swift", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#generic-parameter-clause" + }, + { + "include": "#parameter-clause" + }, + { + "include": "#function-result" + }, + { + "include": "#async-throws" + }, + { + "comment": "Swift 3: generic constraints after the parameters and return type", + "include": "#generic-where-clause" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.function.begin.swift" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.function.end.swift" + } + }, + "name": "invalid.illegal.function-body-not-allowed-in-protocol.swift", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + } + } + }, + "type": { + "patterns": [ + { + "begin": "\\b(class(?!\\s+(?:func|var|let)\\b)|struct|actor)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))", + "beginCaptures": { + "1": { + "name": "storage.type.$1.swift" + }, + "2": { + "name": "entity.name.type.$1.swift" + }, + "3": { + "name": "punctuation.definition.identifier.swift" + }, + "4": { + "name": "punctuation.definition.identifier.swift" + } + }, + "end": "(?<=\\})", + "name": "meta.definition.type.$1.swift", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#generic-parameter-clause" + }, + { + "comment": "Swift 3: generic constraints after the generic param list", + "include": "#generic-where-clause" + }, + { + "include": "#inheritance-clause" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.type.begin.swift" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.type.end.swift" + } + }, + "name": "meta.definition.type.body.swift", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + { + "include": "#type-enum" + } + ] + }, + "type-enum": { + "begin": "\\b(enum)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))", + "beginCaptures": { + "1": { + "name": "storage.type.$1.swift" + }, + "2": { + "name": "entity.name.type.$1.swift" + }, + "3": { + "name": "punctuation.definition.identifier.swift" + }, + "4": { + "name": "punctuation.definition.identifier.swift" + } + }, + "end": "(?<=\\})", + "name": "meta.definition.type.$1.swift", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#generic-parameter-clause" + }, + { + "comment": "Swift 3: generic constraints after the generic param list", + "include": "#generic-where-clause" + }, + { + "include": "#inheritance-clause" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.type.begin.swift" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.type.end.swift" + } + }, + "name": "meta.definition.type.body.swift", + "patterns": [ + { + "include": "#enum-case-clause" + }, + { + "include": "$self" + } + ] + } + ], + "repository": { + "associated-values": { + "begin": "\\G\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.parameters.begin.swift" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.swift" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "(?x)\n\t\t\t\t\t\t\t\t\t\t(?:(_)|((?<q1>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*\\k<q1>))\n\t\t\t\t\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t\t\t\t\t(((?<q2>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*\\k<q2>))\n\t\t\t\t\t\t\t\t\t\t\\s*(:)", + "beginCaptures": { + "1": { + "name": "entity.name.function.swift" + }, + "2": { + "name": "invalid.illegal.distinct-labels-not-allowed.swift" + }, + "5": { + "name": "variable.parameter.function.swift" + }, + "7": { + "name": "punctuation.separator.argument-label.swift" + } + }, + "end": "(?=[,)\\]])", + "patterns": [ + { + "include": "#available-types" + } + ] + }, + { + "begin": "(((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*\\k<q>))\\s*(:)", + "beginCaptures": { + "1": { + "name": "entity.name.function.swift" + }, + "2": { + "name": "variable.parameter.function.swift" + }, + "4": { + "name": "punctuation.separator.argument-label.swift" + } + }, + "end": "(?=[,)\\]])", + "patterns": [ + { + "include": "#available-types" + } + ] + }, + { + "begin": "(?![,)\\]])(?=\\S)", + "comment": "an element without a label (i.e. anything else)", + "end": "(?=[,)\\]])", + "patterns": [ + { + "include": "#available-types" + }, + { + "match": ":", + "name": "invalid.illegal.extra-colon-in-parameter-list.swift" + } + ] + } + ] + }, + "enum-case": { + "begin": "(?x)((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*", + "beginCaptures": { + "1": { + "name": "constant.other.swift" + } + }, + "end": "(?<=\\))|(?![=(])", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#associated-values" + }, + { + "include": "#raw-value-assignment" + } + ] + }, + "enum-case-clause": { + "begin": "\\b(case)\\b\\s*", + "beginCaptures": { + "1": { + "name": "storage.type.enum.case.swift" + } + }, + "end": "(?=[;}])|(?!\\G)(?!//|/\\*)(?=[^\\s,])", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#enum-case" + }, + { + "include": "#more-cases" + } + ] + }, + "more-cases": { + "begin": ",\\s*", + "end": "(?!\\G)(?!//|/\\*)(?=[;}]|[^\\s,])", + "name": "meta.enum-case.more-cases", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#enum-case" + }, + { + "include": "#more-cases" + } + ] + }, + "raw-value-assignment": { + "begin": "(=)\\s*", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.swift" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#literals" + } + ] + } + } + }, + "type-identifier": { + "begin": "((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*", + "beginCaptures": { + "1": { + "name": "meta.type-name.swift", + "patterns": [ + { + "include": "#builtin-types" + } + ] + }, + "2": { + "name": "punctuation.definition.identifier.swift" + }, + "3": { + "name": "punctuation.definition.identifier.swift" + } + }, + "end": "(?!<)", + "patterns": [ + { + "begin": "(?=<)", + "end": "(?!\\G)", + "patterns": [ + { + "include": "#generic-argument-clause" + } + ] + } + ] + }, + "typealias": { + "begin": "\\b(typealias)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*", + "beginCaptures": { + "1": { + "name": "keyword.other.declaration-specifier.swift" + }, + "2": { + "name": "entity.name.type.typealias.swift" + }, + "3": { + "name": "punctuation.definition.identifier.swift" + }, + "4": { + "name": "punctuation.definition.identifier.swift" + } + }, + "end": "(?!\\G)$|(?=;|//|/\\*|$)", + "name": "meta.definition.typealias.swift", + "patterns": [ + { + "begin": "\\G(?=<)", + "end": "(?!\\G)", + "patterns": [ + { + "include": "#generic-parameter-clause" + } + ] + }, + { + "include": "#typealias-assignment" + } + ] + }, + "typealias-assignment": { + "begin": "(=)\\s*", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.swift" + } + }, + "end": "(?!\\G)$|(?=;|//|/\\*|$)", + "patterns": [ + { + "include": "#available-types" + } + ] + }, + "typed-variable-declaration": { + "begin": "(?x)\n\t\t\t\t\t\t\\b(?:(async)\\s+)?(let|var)\\b\\s+\n\t\t\t\t\t\t(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)\\s*\n\t\t\t\t\t\t:\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.control.async.swift" + }, + "2": { + "name": "keyword.other.declaration-specifier.swift" + } + }, + "end": "(?=$|[={])", + "patterns": [ + { + "include": "#available-types" + } + ] + }, + "types-precedencegroup": { + "patterns": [ + { + "comment": "Precedence groups in the standard library", + "match": "\\b(?:BitwiseShift|Assignment|RangeFormation|Casting|Addition|NilCoalescing|Comparison|LogicalConjunction|LogicalDisjunction|Default|Ternary|Multiplication|FunctionArrow)Precedence\\b", + "name": "support.type.swift" + } + ] + } + } + }, + "expressions": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#code-block" + }, + { + "include": "#attributes" + }, + { + "include": "#closure-parameter" + }, + { + "include": "#literals" + }, + { + "include": "#operators" + }, + { + "include": "#builtin-types" + }, + { + "include": "#builtin-functions" + }, + { + "include": "#builtin-global-functions" + }, + { + "include": "#builtin-properties" + }, + { + "include": "#compound-name" + }, + { + "include": "#keywords" + }, + { + "include": "#function-call-expression" + }, + { + "include": "#subscript-expression" + }, + { + "include": "#parenthesized-expression" + }, + { + "include": "#member-reference" + }, + { + "include": "#availability-condition" + }, + { + "match": "\\b_\\b", + "name": "support.variable.discard-value.swift" + } + ], + "repository": { + "availability-condition": { + "begin": "\\B(#(?:un)?available)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.availability-condition.swift" + }, + "2": { + "name": "punctuation.definition.arguments.begin.swift" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.swift" + } + }, + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.other.platform.os.swift" + }, + "2": { + "name": "constant.numeric.swift" + } + }, + "match": "\\s*\\b((?:iOS|macOS|OSX|watchOS|tvOS|UIKitForMac)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))" + }, + { + "captures": { + "1": { + "name": "keyword.other.platform.all.swift" + }, + "2": { + "name": "invalid.illegal.character-not-allowed-here.swift" + } + }, + "match": "(\\*)\\s*(.*?)(?=[,)])" + }, + { + "match": "[^\\s,)]+", + "name": "invalid.illegal.character-not-allowed-here.swift" + } + ] + }, + "closure-parameter": { + "match": "\\$[0-9]+", + "name": "variable.language.closure-parameter.swift" + }, + "compound-name": { + "captures": { + "1": { + "name": "entity.name.function.compound-name.swift" + }, + "2": { + "name": "punctuation.definition.entity.swift" + }, + "3": { + "name": "punctuation.definition.entity.swift" + }, + "4": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.entity.swift" + }, + "2": { + "name": "punctuation.definition.entity.swift" + } + }, + "match": "(?<q>`?)(?!_:)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>):", + "name": "entity.name.function.compound-name.swift" + } + ] + } + }, + "comment": "a reference to a function with disambiguating argument labels, such as foo(_:), foo(bar:), etc.", + "match": "(?x)\n\t\t\t\t\t\t((?<q1>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q1>)) \t\t# function name\n\t\t\t\t\t\t\\(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t((?<q2>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q2>)) \t# argument label\n\t\t\t\t\t\t\t\t\t:\t\t\t\t\t\t\t\t\t\t\t\t# colon\n\t\t\t\t\t\t\t\t)+\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\\)\n\t\t\t\t\t" + }, + "expression-element-list": { + "patterns": [ + { + "include": "#comments" + }, + { + "begin": "((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*(:)", + "beginCaptures": { + "1": { + "name": "support.function.any-method.swift" + }, + "2": { + "name": "punctuation.definition.identifier.swift" + }, + "3": { + "name": "punctuation.definition.identifier.swift" + }, + "4": { + "name": "punctuation.separator.argument-label.swift" + } + }, + "comment": "an element with a label", + "end": "(?=[,)\\]])", + "patterns": [ + { + "include": "#expressions" + } + ] + }, + { + "begin": "(?![,)\\]])(?=\\S)", + "comment": "an element without a label (i.e. anything else)", + "end": "(?=[,)\\]])", + "patterns": [ + { + "include": "#expressions" + } + ] + } + ] + }, + "function-call-expression": { + "patterns": [ + { + "begin": "((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*(\\()", + "beginCaptures": { + "1": { + "name": "support.function.any-method.swift" + }, + "2": { + "name": "punctuation.definition.identifier.swift" + }, + "3": { + "name": "punctuation.definition.identifier.swift" + }, + "4": { + "name": "punctuation.definition.arguments.begin.swift" + } + }, + "comment": "foo(args) -- a call whose callee is a highlightable name", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.swift" + } + }, + "name": "meta.function-call.swift", + "patterns": [ + { + "include": "#expression-element-list" + } + ] + }, + { + "begin": "(?<=[`\\])}>\\p{L}_\\p{N}\\p{M}])\\s*(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.swift" + } + }, + "comment": "[Int](args) -- a call whose callee is a more complicated expression", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.swift" + } + }, + "name": "meta.function-call.swift", + "patterns": [ + { + "include": "#expression-element-list" + } + ] + } + ] + }, + "member-reference": { + "patterns": [ + { + "captures": { + "1": { + "name": "variable.other.swift" + }, + "2": { + "name": "punctuation.definition.identifier.swift" + }, + "3": { + "name": "punctuation.definition.identifier.swift" + } + }, + "match": "(?<=\\.)((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))" + } + ] + }, + "parenthesized-expression": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.tuple.begin.swift" + } + }, + "comment": "correctly matching closure expressions is too hard (depends on trailing \"in\") so we just tack on some basics to the end of parenthesized-expression", + "end": "(\\))\\s*((?:\\b(?:async|throws|rethrows)\\s)*)", + "endCaptures": { + "1": { + "name": "punctuation.section.tuple.end.swift" + }, + "2": { + "patterns": [ + { + "match": "\\brethrows\\b", + "name": "invalid.illegal.rethrows-only-allowed-on-function-declarations.swift" + }, + { + "include": "#async-throws" + } + ] + } + }, + "patterns": [ + { + "include": "#expression-element-list" + } + ] + }, + "subscript-expression": { + "begin": "(?<=[`\\p{L}_\\p{N}\\p{M}])\\s*(\\[)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.swift" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.swift" + } + }, + "name": "meta.subscript-expression.swift", + "patterns": [ + { + "include": "#expression-element-list" + } + ] + } + } + }, + "keywords": { + "patterns": [ + { + "match": "(?<!\\.)\\b(?:if|else|guard|where|switch|case|default|fallthrough)\\b", + "name": "keyword.control.branch.swift" + }, + { + "match": "(?<!\\.)\\b(?:continue|break|fallthrough|return)\\b", + "name": "keyword.control.transfer.swift" + }, + { + "match": "(?<!\\.)\\b(?:while|for|in)\\b", + "name": "keyword.control.loop.swift" + }, + { + "captures": { + "1": { + "name": "keyword.control.loop.swift" + }, + "2": { + "name": "punctuation.whitespace.trailing.repeat.swift" + } + }, + "comment": "extra scopes for repeat-while snippet", + "match": "(?<!\\.)\\b(repeat)\\b(\\s*)" + }, + { + "match": "(?<!\\.)\\bdefer\\b", + "name": "keyword.control.defer.swift" + }, + { + "captures": { + "1": { + "name": "invalid.illegal.try-must-precede-await.swift" + }, + "2": { + "name": "keyword.control.await.swift" + } + }, + "match": "(?<!\\.)\\b(?:(await\\s+try)|(await)\\b)" + }, + { + "match": "(?<!\\.)\\b(?:catch|throws?|rethrows|try)\\b|\\btry[?!]\\B", + "name": "keyword.control.exception.swift" + }, + { + "captures": { + "1": { + "name": "keyword.control.exception.swift" + }, + "2": { + "name": "punctuation.whitespace.trailing.do.swift" + } + }, + "comment": "extra scopes for do-catch snippet", + "match": "(?<!\\.)\\b(do)\\b(\\s*)" + }, + { + "captures": { + "1": { + "name": "keyword.control.async.swift" + }, + "2": { + "name": "storage.modifier.swift" + }, + "3": { + "name": "keyword.other.declaration-specifier.swift" + } + }, + "match": "(?<!\\.)\\b(?:(?:(async)|(nonisolated))\\s+)?(let|var)\\b" + }, + { + "match": "(?<!\\.)\\b(?:associatedtype|operator|typealias)\\b", + "name": "keyword.other.declaration-specifier.swift" + }, + { + "match": "(?<!\\.)\\b(class|enum|extension|precedencegroup|protocol|struct|actor)\\b", + "name": "storage.type.$1.swift" + }, + { + "match": "(?<!\\.)\\b(?:inout|static|final|lazy|mutating|nonmutating|optional|indirect|required|override|dynamic|convenience|infix|prefix|postfix)\\b", + "name": "storage.modifier.swift" + }, + { + "match": "\\binit[?!]|\\binit\\b|(?<!\\.)\\b(?:func|deinit|subscript|didSet|get|set|willSet)\\b", + "name": "storage.type.function.swift" + }, + { + "match": "(?<!\\.)\\b(?:fileprivate|private|internal|public|open)\\b", + "name": "keyword.other.declaration-specifier.accessibility.swift" + }, + { + "comment": "matches weak, unowned, unowned(safe), unowned(unsafe)", + "match": "(?<!\\.)\\bunowned\\((?:safe|unsafe)\\)|(?<!\\.)\\b(?:weak|unowned)\\b", + "name": "keyword.other.capture-specifier.swift" + }, + { + "captures": { + "1": { + "name": "keyword.operator.type.swift" + }, + "2": { + "name": "keyword.operator.type.metatype.swift" + } + }, + "match": "(?<=\\.)(?:(dynamicType|self)|(Protocol|Type))\\b" + }, + { + "match": "(?<!\\.)\\b(?:super|self|Self)\\b", + "name": "variable.language.swift" + }, + { + "match": "\\B(?:#file|#filePath|#fileID|#line|#column|#function|#dsohandle)\\b|\\b(?:__FILE__|__LINE__|__COLUMN__|__FUNCTION__|__DSO_HANDLE__)\\b", + "name": "support.variable.swift" + }, + { + "match": "(?<!\\.)\\bimport\\b", + "name": "keyword.control.import.swift" + } + ] + }, + "literals": { + "patterns": [ + { + "include": "#boolean" + }, + { + "include": "#numeric" + }, + { + "include": "#string" + }, + { + "match": "\\bnil\\b", + "name": "constant.language.nil.swift" + }, + { + "comment": "object \"literals\" used in playgrounds", + "match": "\\B#(colorLiteral|imageLiteral|fileLiteral)\\b", + "name": "support.function.object-literal.swift" + }, + { + "match": "\\B#keyPath\\b", + "name": "support.function.key-path.swift" + }, + { + "begin": "\\B(#selector)(\\()(?:\\s*(getter|setter)\\s*(:))?", + "beginCaptures": { + "1": { + "name": "support.function.selector-reference.swift" + }, + "2": { + "name": "punctuation.definition.arguments.begin.swift" + }, + "3": { + "name": "support.variable.parameter.swift" + }, + "4": { + "name": "punctuation.separator.argument-label.swift" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.swift" + } + }, + "patterns": [ + { + "include": "#expressions" + } + ] + } + ], + "repository": { + "boolean": { + "match": "\\b(true|false)\\b", + "name": "constant.language.boolean.swift" + }, + "numeric": { + "patterns": [ + { + "comment": "0.1, -4_2.5, 6.022e23, 10E-5", + "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)[0-9][0-9_]*(?=\\.[0-9]|[eE])(?:\\.[0-9][0-9_]*)?(?:[eE][-+]?[0-9][0-9_]*)?\\b(?!\\.[0-9])", + "name": "constant.numeric.float.decimal.swift" + }, + { + "comment": "-0x1.ap2_3, 0x31p-4", + "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)(0x[0-9a-fA-F][0-9a-fA-F_]*)(?:\\.[0-9a-fA-F][0-9a-fA-F_]*)?[pP][-+]?[0-9][0-9_]*\\b(?!\\.[0-9])", + "name": "constant.numeric.float.hexadecimal.swift" + }, + { + "comment": "0x1p, 0x1p_2, 0x1.5pa, 0x1.1p+1f, 0x1pz", + "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)(0x[0-9a-fA-F][0-9a-fA-F_]*)(?:\\.[0-9a-fA-F][0-9a-fA-F_]*)?(?:[pP][-+]?\\w*)\\b(?!\\.[0-9])", + "name": "invalid.illegal.numeric.float.invalid-exponent.swift" + }, + { + "comment": "0x1.5w (note that 0x1.f may be a valid expression)", + "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)(0x[0-9a-fA-F][0-9a-fA-F_]*)\\.[0-9][\\w.]*", + "name": "invalid.illegal.numeric.float.missing-exponent.swift" + }, + { + "comment": "-.5, .2f (note that 1.-.5 may be a valid expression)", + "match": "(?<=\\s|^)\\-?\\.[0-9][\\w.]*", + "name": "invalid.illegal.numeric.float.missing-leading-zero.swift" + }, + { + "comment": "0b_0_1, 0x_1p+3q", + "match": "(\\B\\-|\\b)0[box]_[0-9a-fA-F_]*(?:[pPeE][+-]?\\w+)?[\\w.]+", + "name": "invalid.illegal.numeric.leading-underscore.swift" + }, + { + "comment": "tuple positional member: not really a numeric literal, but not invalid", + "match": "(?<=[\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)[0-9]+\\b" + }, + { + "comment": "0b010, 0b1_0", + "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)0b[01][01_]*\\b(?!\\.[0-9])", + "name": "constant.numeric.integer.binary.swift" + }, + { + "comment": "0o1, 0o7_3", + "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)0o[0-7][0-7_]*\\b(?!\\.[0-9])", + "name": "constant.numeric.integer.octal.swift" + }, + { + "comment": "02, 3_456", + "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)[0-9][0-9_]*\\b(?!\\.[0-9])", + "name": "constant.numeric.integer.decimal.swift" + }, + { + "comment": "0x4, 0xF_7", + "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)0x[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\.[0-9])", + "name": "constant.numeric.integer.hexadecimal.swift" + }, + { + "match": "(\\B\\-|\\b)[0-9][\\w.]*", + "name": "invalid.illegal.numeric.other.swift" + } + ] + }, + "string": { + "patterns": [ + { + "begin": "\"\"\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.swift" + } + }, + "comment": "SE-0168: Multi-Line String Literals", + "end": "\"\"\"(#*)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.swift" + }, + "1": { + "name": "invalid.illegal.extra-closing-delimiter.swift" + } + }, + "name": "string.quoted.double.block.swift", + "patterns": [ + { + "match": "\\G.+(?=\"\"\")|\\G.+", + "name": "invalid.illegal.content-after-opening-delimiter.swift" + }, + { + "match": "\\\\\\s*\\n", + "name": "constant.character.escape.newline.swift" + }, + { + "include": "#string-guts" + }, + { + "comment": "Allow \\(\"\"\"...\"\"\") to appear inside a block string", + "match": "\\S((?!\\\\\\().)*(?=\"\"\")", + "name": "invalid.illegal.content-before-closing-delimiter.swift" + } + ] + }, + { + "begin": "#\"\"\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.swift" + } + }, + "end": "\"\"\"#(#*)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.swift" + }, + "1": { + "name": "invalid.illegal.extra-closing-delimiter.swift" + } + }, + "name": "string.quoted.double.block.raw.swift", + "patterns": [ + { + "match": "\\G.+(?=\"\"\")|\\G.+", + "name": "invalid.illegal.content-after-opening-delimiter.swift" + }, + { + "match": "\\\\#\\s*\\n", + "name": "constant.character.escape.newline.swift" + }, + { + "include": "#raw-string-guts" + }, + { + "comment": "Allow \\(\"\"\"...\"\"\") to appear inside a block string", + "match": "\\S((?!\\\\#\\().)*(?=\"\"\")", + "name": "invalid.illegal.content-before-closing-delimiter.swift" + } + ] + }, + { + "begin": "(##+)\"\"\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.swift" + } + }, + "end": "\"\"\"\\1(#*)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.swift" + }, + "1": { + "name": "invalid.illegal.extra-closing-delimiter.swift" + } + }, + "name": "string.quoted.double.block.raw.swift", + "patterns": [ + { + "match": "\\G.+(?=\"\"\")|\\G.+", + "name": "invalid.illegal.content-after-opening-delimiter.swift" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.swift" + } + }, + "end": "\"(#*)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.swift" + }, + "1": { + "name": "invalid.illegal.extra-closing-delimiter.swift" + } + }, + "name": "string.quoted.double.single-line.swift", + "patterns": [ + { + "match": "\\r|\\n", + "name": "invalid.illegal.returns-not-allowed.swift" + }, + { + "include": "#string-guts" + } + ] + }, + { + "begin": "(##+)\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.raw.swift" + } + }, + "comment": "SE-0168: raw string literals (more than one #, grammar limitations prevent us from supporting escapes)", + "end": "\"\\1(#*)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.raw.swift" + }, + "1": { + "name": "invalid.illegal.extra-closing-delimiter.swift" + } + }, + "name": "string.quoted.double.single-line.raw.swift", + "patterns": [ + { + "match": "\\r|\\n", + "name": "invalid.illegal.returns-not-allowed.swift" + } + ] + }, + { + "begin": "#\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.raw.swift" + } + }, + "comment": "SE-0168: raw string literals (one #, escapes supported)", + "end": "\"#(#*)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.raw.swift" + }, + "1": { + "name": "invalid.illegal.extra-closing-delimiter.swift" + } + }, + "name": "string.quoted.double.single-line.raw.swift", + "patterns": [ + { + "match": "\\r|\\n", + "name": "invalid.illegal.returns-not-allowed.swift" + }, + { + "include": "#raw-string-guts" + } + ] + } + ], + "repository": { + "raw-string-guts": { + "comment": "the same as #string-guts but with # in escapes", + "patterns": [ + { + "match": "\\\\#[0\\\\tnr\"']", + "name": "constant.character.escape.swift" + }, + { + "match": "\\\\#u\\{[0-9a-fA-F]{1,8}\\}", + "name": "constant.character.escape.unicode.swift" + }, + { + "begin": "\\\\#\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.swift" + } + }, + "contentName": "source.swift", + "end": "(\\))", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.swift" + }, + "1": { + "name": "source.swift" + } + }, + "name": "meta.embedded.line.swift", + "patterns": [ + { + "include": "$self" + }, + { + "begin": "\\(", + "comment": "Nested parens", + "end": "\\)" + } + ] + }, + { + "match": "\\\\#.", + "name": "invalid.illegal.escape-not-recognized" + } + ] + }, + "string-guts": { + "patterns": [ + { + "match": "\\\\[0\\\\tnr\"']", + "name": "constant.character.escape.swift" + }, + { + "match": "\\\\u\\{[0-9a-fA-F]{1,8}\\}", + "name": "constant.character.escape.unicode.swift" + }, + { + "begin": "\\\\\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.swift" + } + }, + "contentName": "source.swift", + "end": "(\\))", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.swift" + }, + "1": { + "name": "source.swift" + } + }, + "name": "meta.embedded.line.swift", + "patterns": [ + { + "include": "$self" + }, + { + "begin": "\\(", + "comment": "Nested parens", + "end": "\\)" + } + ] + }, + { + "match": "\\\\.", + "name": "invalid.illegal.escape-not-recognized" + } + ] + } + } + } + } + }, + "operators": { + "patterns": [ + { + "comment": "Type casting", + "match": "\\b(is\\b|as([!?]\\B|\\b))", + "name": "keyword.operator.type-casting.swift" + }, + { + "begin": "(?x)\n\t\t\t\t\t\t(?=\n\t\t\t\t\t\t\t(?<oph>\t\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\n\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t | \\.\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\\g<oph>\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t | \\.\n\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t", + "comment": "This rule helps us speed up the matching.", + "end": "(?!\\G)", + "patterns": [ + { + "captures": { + "0": { + "patterns": [ + { + "match": "\\G(\\+\\+|\\-\\-)$", + "name": "keyword.operator.increment-or-decrement.swift" + }, + { + "match": "\\G(\\+|\\-)$", + "name": "keyword.operator.arithmetic.unary.swift" + }, + { + "match": "\\G!$", + "name": "keyword.operator.logical.not.swift" + }, + { + "match": "\\G~$", + "name": "keyword.operator.bitwise.not.swift" + }, + { + "match": ".+", + "name": "keyword.operator.custom.prefix.swift" + } + ] + } + }, + "comment": "Prefix unary operator", + "match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(?<=^|[\\s(\\[{,;:])\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t\t(?![\\s)\\]},;:]|\\z)\n\t\t\t\t\t\t\t" + }, + { + "captures": { + "0": { + "patterns": [ + { + "match": "\\G(\\+\\+|\\-\\-)$", + "name": "keyword.operator.increment-or-decrement.swift" + }, + { + "match": "\\G!$", + "name": "keyword.operator.increment-or-decrement.swift" + }, + { + "match": ".+", + "name": "keyword.operator.custom.postfix.swift" + } + ] + } + }, + "comment": "Postfix unary operator", + "match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(?<!^|[\\s(\\[{,;:])\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t\t(?=[\\s)\\]},;:]|\\z)\n\t\t\t\t\t\t\t" + }, + { + "captures": { + "0": { + "patterns": [ + { + "match": "\\G=$", + "name": "keyword.operator.assignment.swift" + }, + { + "match": "\\G(\\+|\\-|\\*|/|%|<<|>>|&|\\^|\\||&&|\\|\\|)=$", + "name": "keyword.operator.assignment.compound.swift" + }, + { + "match": "\\G(\\+|\\-|\\*|/)$", + "name": "keyword.operator.arithmetic.swift" + }, + { + "match": "\\G&(\\+|\\-|\\*)$", + "name": "keyword.operator.arithmetic.overflow.swift" + }, + { + "match": "\\G%$", + "name": "keyword.operator.arithmetic.remainder.swift" + }, + { + "match": "\\G(==|!=|>|<|>=|<=|~=)$", + "name": "keyword.operator.comparison.swift" + }, + { + "match": "\\G\\?\\?$", + "name": "keyword.operator.coalescing.swift" + }, + { + "match": "\\G(&&|\\|\\|)$", + "name": "keyword.operator.logical.swift" + }, + { + "match": "\\G(&|\\||\\^|<<|>>)$", + "name": "keyword.operator.bitwise.swift" + }, + { + "match": "\\G(===|!==)$", + "name": "keyword.operator.bitwise.swift" + }, + { + "match": "\\G\\?$", + "name": "keyword.operator.ternary.swift" + }, + { + "match": ".+", + "name": "keyword.operator.custom.infix.swift" + } + ] + } + }, + "comment": "Infix operator", + "match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t" + }, + { + "captures": { + "0": { + "patterns": [ + { + "match": ".+", + "name": "keyword.operator.custom.prefix.dot.swift" + } + ] + } + }, + "comment": "Dot prefix unary operator", + "match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(?<=^|[\\s(\\[{,;:])\n\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t\t | [/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t\t(?![\\s)\\]},;:]|\\z)\n\t\t\t\t\t\t\t" + }, + { + "captures": { + "0": { + "patterns": [ + { + "match": ".+", + "name": "keyword.operator.custom.postfix.dot.swift" + } + ] + } + }, + "comment": "Dot postfix unary operator", + "match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(?<!^|[\\s(\\[{,;:])\n\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t\t | [/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t\t(?=[\\s)\\]},;:]|\\z)\n\t\t\t\t\t\t\t" + }, + { + "captures": { + "0": { + "patterns": [ + { + "match": "\\G\\.\\.[.<]$", + "name": "keyword.operator.range.swift" + }, + { + "match": ".+", + "name": "keyword.operator.custom.infix.dot.swift" + } + ] + } + }, + "comment": "Dot infix operator", + "match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t\t | [/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t" + } + ] + }, + { + "match": ":", + "name": "keyword.operator.ternary.swift" + } + ] + }, + "root": { + "patterns": [ + { + "include": "#compiler-control" + }, + { + "include": "#declarations" + }, + { + "include": "#expressions" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/system-verilog.tmLanguage.json b/src/lib/shiki/languages/system-verilog.tmLanguage.json new file mode 100644 index 0000000..7727808 --- /dev/null +++ b/src/lib/shiki/languages/system-verilog.tmLanguage.json @@ -0,0 +1,1055 @@ +{ + "fileTypes": ["sv", "SV", "v", "V", "svh", "SVH", "vh", "VH"], + "hidden": true, + "name": "system-verilog", + "patterns": [ + { + "begin": "\\s*\\b(function|task)\\b(\\s+automatic)?", + "beginCaptures": { + "1": { + "name": "keyword.control.systemverilog" + }, + "2": { + "name": "keyword.control.systemverilog" + } + }, + "end": ";", + "patterns": [ + { + "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*\\s+)?([a-zA-Z_][a-zA-Z0-9_:]*)\\s*(?=\\(|;)", + "captures": { + "1": { + "name": "storage.type.systemverilog" + }, + "2": { + "name": "entity.name.function.systemverilog" + } + } + }, + { + "include": "#port-dir" + }, + { + "include": "#base-grammar" + } + ], + "name": "meta.function.systemverilog" + }, + { + "match": "\\s*\\b(task)\\s+(automatic)?\\s*(\\w+)\\s*;", + "captures": { + "1": { + "name": "keyword.control.systemverilog" + }, + "2": { + "name": "keyword.control.systemverilog" + }, + "3": { + "name": "entity.name.function.systemverilog" + } + }, + "name": "meta.task.simple.systemverilog" + }, + { + "begin": "\\s*\\b(typedef\\s+(struct|enum|union)\\b)\\s*(packed)?\\s*([a-zA-Z_][a-zA-Z0-9_]*)?", + "beginCaptures": { + "1": { + "name": "keyword.control.systemverilog" + }, + "2": { + "name": "keyword.control.systemverilog" + }, + "3": { + "name": "keyword.control.systemverilog" + }, + "4": { + "name": "storage.type.systemverilog" + } + }, + "end": "(})\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*;", + "endCaptures": { + "1": { + "name": "keyword.operator.other.systemverilog" + }, + "2": { + "name": "entity.name.function.systemverilog" + } + }, + "patterns": [ + { + "include": "#struct-anonymous" + }, + { + "include": "#base-grammar" + } + ], + "name": "meta.typedef.struct.systemverilog" + }, + { + "match": "\\s*\\b(typedef\\s+class)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s*;", + "captures": { + "1": { + "name": "keyword.control.systemverilog" + }, + "2": { + "name": "entity.name.declaration.systemverilog" + } + }, + "name": "meta.typedef.class.systemverilog" + }, + { + "begin": "\\s*\\b(typedef)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.systemverilog" + } + }, + "end": "([a-zA-Z_][a-zA-Z0-9_]*)\\s*(?=(\\[[a-zA-Z0-9_:\\$\\-\\+]*\\])?;)", + "endCaptures": { + "1": { + "name": "entity.name.function.systemverilog" + } + }, + "patterns": [ + { + "match": "\\b([a-zA-Z_]\\w*)\\s*(#)\\(", + "captures": { + "1": { + "name": "storage.type.userdefined.systemverilog" + }, + "2": { + "name": "keyword.operator.param.systemverilog" + } + }, + "name": "meta.typedef.class.systemverilog" + }, + { + "include": "#base-grammar" + }, + { + "include": "#module-binding" + } + ], + "name": "meta.typedef.simple.systemverilog" + }, + { + "begin": "\\s*(module)\\s+\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.systemverilog" + }, + "2": { + "name": "entity.name.type.module.systemverilog" + } + }, + "end": ";", + "endCaptures": { + "1": { + "name": "entity.name.function.systemverilog" + } + }, + "patterns": [ + { + "include": "#port-dir" + }, + { + "match": "\\s*(parameter)", + "name": "keyword.other.systemverilog" + }, + { + "include": "#base-grammar" + }, + { + "include": "#ifmodport" + }, + { + "match": "\\$\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", + "name": "support.function.systemverilog" + } + ], + "name": "meta.module.systemverilog" + }, + { + "captures": { + "1": { + "name": "keyword.control.systemverilog" + }, + "2": { + "name": "entity.name.function.systemverilog" + } + }, + "match": "\\b(sequence)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", + "name": "meta.sequence.systemverilog" + }, + { + "match": "\\b(bind)\\s+([a-zA-Z_][a-zA-Z0-9_\\.]*)\\b", + "captures": { + "1": { + "name": "keyword.control.systemverilog" + } + } + }, + { + "captures": { + "0": { + "name": "meta.section.begin.systemverilog" + }, + "1": { + "name": "keyword.other.block.systemverilog" + }, + "3": { + "name": "keyword.operator.systemverilog" + }, + "4": { + "name": "entity.name.section.systemverilog" + } + }, + "match": "\\s*(begin|fork)\\s*((:)\\s*([a-zA-Z_][a-zA-Z0-9_]*))\\b", + "name": "meta.definition.systemverilog" + }, + { + "match": "\\b(asset|cover)\\s(property)\\s+(\\w+)", + "captures": { + "1": { + "name": "keyword.sva.systemverilog" + }, + "2": { + "name": "entity.name.sva.systemverilog" + } + } + }, + { + "match": "\\b(\\w+)\\s*(:)\\s*(assert)\\b", + "captures": { + "1": { + "name": "entity.name.sva.systemverilog" + }, + "2": { + "name": "keyword.operator.systemverilog" + }, + "3": { + "name": "keyword.sva.systemverilog" + } + } + }, + { + "begin": "\\s*(//)\\s*(psl)\\s+((\\w+)\\s*(:))?\\s*(default|assert|assume)", + "beginCaptures": { + "0": { + "name": "meta.psl.systemverilog" + }, + "1": { + "name": "comment.line.double-slash.systemverilog" + }, + "2": { + "name": "keyword.psl.systemverilog" + }, + "4": { + "name": "entity.psl.name.systemverilog" + }, + "5": { + "name": "keyword.operator.systemverilog" + }, + "6": { + "name": "keyword.psl.systemverilog" + } + }, + "end": ";", + "patterns": [ + { + "match": "\\b(never|always|default|clock|within|rose|fell|stable|until|before|next|eventually|abort|posedge)\\b", + "name": "keyword.psl.systemverilog" + }, + { + "include": "#operators" + }, + { + "include": "#functions" + }, + { + "include": "#constants" + } + ], + "name": "meta.psl.systemverilog" + }, + { + "begin": "\\s*(/\\*)\\s*(psl)", + "beginCaptures": { + "0": { + "name": "meta.psl.systemverilog" + }, + "1": { + "name": "comment.block.systemverilog" + }, + "2": { + "name": "keyword.psl.systemverilog" + } + }, + "end": "(\\*/)", + "endCaptures": { + "1": { + "name": "comment.block.systemverilog" + } + }, + "patterns": [ + { + "match": "^\\s*((\\w+)\\s*(:))?\\s*(default|assert|assume)", + "captures": { + "0": { + "name": "meta.psl.systemverilog" + }, + "2": { + "name": "entity.psl.name.systemverilog" + }, + "3": { + "name": "keyword.operator.systemverilog" + }, + "4": { + "name": "keyword.psl.systemverilog" + } + } + }, + { + "match": "\\b(asset|cover)\\s+(property)\\s+(\\w+)", + "captures": { + "1": { + "name": "keyword.psl.systemverilog" + }, + "2": { + "name": "entity.psl.name.systemverilog" + } + } + }, + { + "match": "\\b(never|always|default|clock|within|rose|fell|stable|until|before|next|eventually|abort|posedge|negedge)\\b", + "name": "keyword.psl.systemverilog" + }, + { + "include": "#operators" + }, + { + "include": "#functions" + }, + { + "include": "#constants" + } + ], + "name": "meta.psl.systemverilog" + }, + { + "match": "\\s*\\b(automatic|cell|config|deassign|defparam|design|disable|edge|endconfig|endgenerate|endspecify|endtable|event|generate|genvar|ifnone|incdir|instance|liblist|library|macromodule|negedge|noshowcancelled|posedge|pulsestyle_onevent|pulsestyle_ondetect|scalared|showcancelled|specify|specparam|table|use|vectored)\\b", + "captures": { + "1": { + "name": "keyword.other.systemverilog" + } + } + }, + { + "match": "\\s*\\b(initial|always|wait|force|release|assign|always_comb|always_ff|always_latch|forever|repeat|while|for|if|iff|else|case|casex|casez|default|endcase|return|break|continue|do|foreach|with|inside|dist|clocking|cover|coverpoint|property|bins|binsof|illegal_bins|ignore_bins|randcase|modport|matches|solve|static|assert|assume|before|expect|cross|ref|first_match|srandom|struct|packed|final|chandle|alias|tagged|extern|throughout|timeprecision|timeunit|priority|type|union|uwire|wait_order|triggered|randsequence|import|export|context|pure|intersect|wildcard|within|new|typedef|enum|this|super|begin|fork|forkjoin|unique|unique0|priority)\\b", + "captures": { + "1": { + "name": "keyword.control.systemverilog" + } + } + }, + { + "match": "\\s*\\b(end|endtask|endmodule|endfunction|endprimitive|endclass|endpackage|endsequence|endprogram|endclocking|endproperty|endgroup|endinterface|join|join_any|join_none)\\b(\\s*(:)\\s*(\\w+))?", + "captures": { + "1": { + "name": "keyword.control.systemverilog" + }, + "3": { + "name": "keyword.operator.systemverilog" + }, + "4": { + "name": "entity.label.systemverilog" + } + }, + "name": "meta.object.end.systemverilog" + }, + { + "match": "\\b(std)\\b::", + "name": "support.class.systemverilog" + }, + { + "captures": { + "1": { + "name": "constant.other.define.systemverilog" + }, + "2": { + "name": "entity.name.type.define.systemverilog" + } + }, + "match": "^\\s*(`define)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", + "name": "meta.define.systemverilog" + }, + { + "captures": { + "1": { + "name": "constant.other.undef.systemverilog" + }, + "2": { + "name": "entity.name.type.undef.systemverilog" + } + }, + "match": "^\\s*(`undef)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", + "name": "meta.undef.systemverilog" + }, + { + "include": "#comments" + }, + { + "captures": { + "1": { + "name": "keyword.control.systemverilog" + }, + "2": { + "name": "entity.name.type.class.systemverilog" + } + }, + "match": "\\s*(primitive|package|constraint|interface|covergroup|program)\\s+\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", + "name": "meta.definition.systemverilog" + }, + { + "captures": { + "2": { + "name": "entity.name.type.class.systemverilog" + }, + "3": { + "name": "keyword.operator.other.systemverilog" + }, + "4": { + "name": "keyword.control.systemverilog" + } + }, + "match": "(([a-zA-Z_][a-zA-Z0-9_]*)\\s*(:))?\\s*(coverpoint|cross)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", + "name": "meta.definition.systemverilog" + }, + { + "captures": { + "1": { + "name": "keyword.control.systemverilog" + }, + "2": { + "name": "keyword.control.systemverilog" + }, + "3": { + "name": "entity.name.type.class.systemverilog" + } + }, + "match": "\\b(virtual\\s+)?(class)\\s+\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", + "name": "meta.definition.class.systemverilog" + }, + { + "captures": { + "1": { + "name": "keyword.control.systemverilog" + }, + "2": { + "name": "entity.other.inherited-class.systemverilog" + } + }, + "match": "\\b(extends)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b", + "name": "meta.definition.systemverilog" + }, + { + "include": "#all-types" + }, + { + "include": "#operators" + }, + { + "include": "#port-dir" + }, + { + "match": "\\b(and|nand|nor|or|xor|xnor|buf|not|bufif[01]|notif[01]|r?[npc]mos|tran|r?tranif[01]|pullup|pulldown)\\b", + "name": "support.type.systemverilog" + }, + { + "include": "#strings" + }, + { + "match": "\\$\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", + "name": "support.function.systemverilog" + }, + { + "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(')(?=\\()", + "name": "meta.cast.systemverilog", + "captures": { + "1": { + "name": "storage.type.systemverilog" + }, + "2": { + "name": "keyword.operator.cast.systemverilog" + } + } + }, + { + "match": "^\\s*(localparam|parameter)\\s+([A-Z_][A-Z0-9_]*)\\b\\s*(?=(=))", + "name": "meta.param.systemverilog", + "captures": { + "1": { + "name": "keyword.other.systemverilog" + }, + "2": { + "name": "constant.other.systemverilog" + } + } + }, + { + "match": "^\\s*(localparam|parameter)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b\\s*(?=(=))", + "name": "meta.param.systemverilog", + "captures": { + "1": { + "name": "keyword.other.systemverilog" + } + } + }, + { + "match": "^\\s*(local\\s+|protected\\s+|localparam\\s+|parameter\\s+)?(const\\s+|virtual\\s+)?(rand\\s+|randc\\s+)?(([a-zA-Z_][a-zA-Z0-9_]*)(::))?([a-zA-Z_][a-zA-Z0-9_]*)\\b\\s*(?=(#\\s*\\([\\w,]+\\)\\s*)?([a-zA-Z][a-zA-Z0-9_\\s\\[\\]']*)(;|,|=|'\\{))", + "name": "meta.userdefined.systemverilog", + "captures": { + "1": { + "name": "keyword.other.systemverilog" + }, + "2": { + "name": "keyword.other.systemverilog" + }, + "3": { + "name": "storage.type.rand.systemverilog" + }, + "5": { + "name": "support.type.scope.systemverilog" + }, + "6": { + "name": "keyword.operator.scope.systemverilog" + }, + "7": { + "name": "storage.type.userdefined.systemverilog" + } + } + }, + { + "match": "\\s*\\b(option)\\.", + "captures": { + "1": { + "name": "keyword.cover.systemverilog" + } + } + }, + { + "match": "\\s*\\b(local|const|protected|virtual|localparam|parameter)\\b", + "captures": { + "1": { + "name": "keyword.other.systemverilog" + } + } + }, + { + "match": "\\s*\\b(rand|randc)\\b", + "name": "storage.type.rand.systemverilog" + }, + { + "begin": "^(\\s*(bind)\\s+([a-zA-Z_][\\w\\.]*))?\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*(?=#[^#])", + "beginCaptures": { + "2": { + "name": "keyword.control.systemverilog" + }, + "4": { + "name": "storage.module.systemverilog" + } + }, + "end": "(?=;|=|:)", + "patterns": [ + { + "include": "#module-binding" + }, + { + "include": "#module-param" + }, + { + "include": "#comments" + }, + { + "include": "#operators" + }, + { + "include": "#constants" + }, + { + "include": "#strings" + }, + { + "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*(\\(|$))", + "name": "entity.name.type.module.systemverilog" + } + ], + "name": "meta.module.inst.param.systemverilog" + }, + { + "begin": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\s+(?!intersect|and|or|throughout|within)([a-zA-Z_][a-zA-Z0-9_]*)\\s*(\\[(\\d+)(\\:(\\d+))?\\])?\\s*(\\(|$)", + "beginCaptures": { + "1": { + "name": "storage.module.systemverilog" + }, + "2": { + "name": "entity.name.type.module.systemverilog" + }, + "4": { + "name": "constant.numeric.systemverilog" + }, + "6": { + "name": "constant.numeric.systemverilog" + } + }, + "end": ";", + "patterns": [ + { + "include": "#module-binding" + }, + { + "include": "#comments" + }, + { + "include": "#strings" + }, + { + "include": "#operators" + }, + { + "include": "#constants" + } + ], + "name": "meta.module.inst.systemverilog" + }, + { + "name": "meta.struct.assign.systemverilog", + "begin": "\\b\\s+(<?=)\\s*(\\'{)", + "beginCaptures": { + "1": { + "name": "keyword.operator.other.systemverilog" + }, + "2": { + "name": "keyword.operator.other.systemverilog" + }, + "3": { + "name": "keyword.operator.other.systemverilog" + } + }, + "end": ";", + "patterns": [ + { + "match": "\\b(\\w+)\\s*(:)(?!:)", + "captures": { + "1": { + "name": "support.function.field.systemverilog" + }, + "2": { + "name": "keyword.operator.other.systemverilog" + } + } + }, + { + "include": "#comments" + }, + { + "include": "#strings" + }, + { + "include": "#operators" + }, + { + "include": "#constants" + }, + { + "include": "#storage-scope-systemverilog" + } + ] + }, + { + "include": "#storage-scope-systemverilog" + }, + { + "include": "#functions" + }, + { + "include": "#constants" + } + ], + "repository": { + "functions": { + "match": "\\b(\\w+)(?=\\s*\\()", + "name": "support.function.generic.systemverilog" + }, + "all-types": { + "patterns": [ + { + "include": "#storage-type-systemverilog" + }, + { + "include": "#storage-modifier-systemverilog" + } + ] + }, + "constants": { + "patterns": [ + { + "match": "(\\b\\d+)?'(s?[bB]\\s*[0-1xXzZ?][0-1_xXzZ?]*|s?[oO]\\s*[0-7xXzZ?][0-7_xXzZ?]*|s?[dD]\\s*[0-9xXzZ?][0-9_xXzZ?]*|s?[hH]\\s*[0-9a-fA-FxXzZ?][0-9a-fA-F_xXzZ?]*)((e|E)(\\+|-)?[0-9]+)?(?!'|\\w)", + "name": "constant.numeric.systemverilog" + }, + { + "match": "'[01xXzZ]", + "name": "constant.numeric.bit.systemverilog" + }, + { + "match": "\\b((\\d[\\d_]*)(e|E)(\\+|-)?[0-9]+)\\b", + "name": "constant.numeric.exp.systemverilog" + }, + { + "match": "\\b(\\d[\\d_]*)\\b", + "name": "constant.numeric.decimal.systemverilog" + }, + { + "match": "\\b(\\d+(fs|ps|ns|us|ms|s)?)\\b", + "name": "constant.numeric.time.systemverilog" + }, + { + "match": "\\b([A-Z][A-Z0-9_]*)\\b", + "name": "constant.other.net.systemverilog" + }, + { + "match": "(`ifdef|`ifndef|`default_nettype)\\s+(\\w+)", + "captures": { + "1": { + "name": "constant.other.preprocessor.systemverilog" + }, + "2": { + "name": "support.variable.systemverilog" + } + } + }, + { + "match": "`(celldefine|else|elsif|endcelldefine|endif|include|line|nounconnected_drive|resetall|timescale|unconnected_drive|undef|begin_\\w+|end_\\w+|remove_\\w+|restore_\\w+)\\b", + "name": "constant.other.preprocessor.systemverilog" + }, + { + "match": "`\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", + "name": "constant.other.define.systemverilog" + }, + { + "match": "\\b(null)\\b", + "name": "support.constant.systemverilog" + } + ] + }, + "operators": { + "patterns": [ + { + "match": "(=|==|===|!=|!==|<=|>=|<|>)", + "name": "keyword.operator.comparison.systemverilog" + }, + { + "match": "(\\-|\\+|\\*|\\/|%)", + "name": "keyword.operator.arithmetic.systemverilog" + }, + { + "match": "(!|&&|\\|\\||\\bor\\b)", + "name": "keyword.operator.logical.systemverilog" + }, + { + "match": "(&|\\||\\^|~|{|'{|}|<<|>>|\\?|:)", + "name": "keyword.operator.bitwise.systemverilog" + }, + { + "match": "(#|@)", + "name": "keyword.operator.other.systemverilog" + } + ] + }, + "comments": { + "patterns": [ + { + "begin": "/\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.systemverilog" + } + }, + "end": "\\*/", + "name": "comment.block.systemverilog" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.comment.systemverilog" + } + }, + "match": "(//).*$\\n?", + "name": "comment.line.double-slash.systemverilog" + } + ] + }, + "port-dir": { + "patterns": [ + { + "match": "\\s*\\b(output|input|inout|ref)\\s+(([a-zA-Z_][a-zA-Z0-9_]*)(::))?([a-zA-Z_][a-zA-Z0-9_]*)?\\s+(?=\\[[a-zA-Z0-9_\\-\\+]*:[a-zA-Z0-9_\\-\\+]*\\]\\s+[a-zA-Z_][a-zA-Z0-9_\\s]*)", + "captures": { + "1": { + "name": "support.type.systemverilog" + }, + "3": { + "name": "support.type.scope.systemverilog" + }, + "4": { + "name": "keyword.operator.scope.systemverilog" + }, + "5": { + "name": "storage.type.interface.systemverilog" + } + } + }, + { + "match": "\\s*\\b(output|input|inout|ref)\\s+(([a-zA-Z_][a-zA-Z0-9_]*)(::))?([a-zA-Z_][a-zA-Z0-9_]*)?\\s+(?=[a-zA-Z_][a-zA-Z0-9_\\s]*)", + "captures": { + "1": { + "name": "support.type.systemverilog" + }, + "3": { + "name": "support.type.scope.systemverilog" + }, + "4": { + "name": "keyword.operator.scope.systemverilog" + }, + "5": { + "name": "storage.type.interface.systemverilog" + } + } + }, + { + "match": "\\s*\\b(output|input|inout|ref)\\b", + "name": "support.type.systemverilog" + } + ] + }, + "base-grammar": { + "patterns": [ + { + "include": "#all-types" + }, + { + "include": "#comments" + }, + { + "include": "#operators" + }, + { + "include": "#constants" + }, + { + "include": "#strings" + }, + { + "match": "^\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s+[a-zA-Z_][a-zA-Z0-9_,=\\s]*", + "captures": { + "1": { + "name": "storage.type.interface.systemverilog" + } + } + }, + { + "include": "#storage-scope-systemverilog" + } + ] + }, + "storage-type-systemverilog": { + "patterns": [ + { + "match": "\\s*\\b(var|wire|tri|tri[01]|supply[01]|wand|triand|wor|trior|trireg|reg|integer|int|longint|shortint|logic|bit|byte|shortreal|string|time|realtime|real|process|void)\\b", + "name": "storage.type.systemverilog" + }, + { + "match": "\\s*\\b(uvm_transaction|uvm_component|uvm_monitor|uvm_driver|uvm_test|uvm_env|uvm_object|uvm_agent|uvm_sequence_base|uvm_sequence|uvm_sequence_item|uvm_sequence_state|uvm_sequencer|uvm_sequencer_base|uvm_component_registry|uvm_analysis_imp|uvm_analysis_port|uvm_analysis_export|uvm_config_db|uvm_active_passive_enum|uvm_phase|uvm_verbosity|uvm_tlm_analysis_fifo|uvm_tlm_fifo|uvm_report_server|uvm_objection|uvm_recorder|uvm_domain|uvm_reg_field|uvm_reg|uvm_reg_block|uvm_bitstream_t|uvm_radix_enum|uvm_printer|uvm_packer|uvm_comparer|uvm_scope_stack)\\b", + "name": "storage.type.uvm.systemverilog" + } + ] + }, + "storage-scope-systemverilog": { + "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(::)", + "captures": { + "1": { + "name": "support.type.systemverilog" + }, + "2": { + "name": "keyword.operator.scope.systemverilog" + } + }, + "name": "meta.scope.systemverilog" + }, + "storage-modifier-systemverilog": { + "match": "\\b(signed|unsigned|small|medium|large|supply[01]|strong[01]|pull[01]|weak[01]|highz[01])\\b", + "name": "storage.modifier.systemverilog" + }, + "ifmodport": { + "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b", + "captures": { + "1": { + "name": "storage.type.interface.systemverilog" + }, + "2": { + "name": "support.modport.systemverilog" + } + } + }, + "strings": { + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.systemverilog" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.systemverilog" + } + }, + "name": "string.quoted.double.systemverilog", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.systemverilog" + }, + { + "match": "(?x)%\n (\\d+\\$)? # field (argument #)\n [#0\\- +']* # flags\n [,;:_]? # separator character (AltiVec)\n ((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n (\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n (hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n [bdiouxXhHDOUeEfFgGaACcSspnmt%] # conversion type\n ", + "name": "constant.other.placeholder.systemverilog" + }, + { + "match": "%", + "name": "invalid.illegal.placeholder.systemverilog" + } + ] + } + ] + }, + "module-binding": { + "begin": "\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\(", + "beginCaptures": { + "1": { + "name": "support.function.port.systemverilog" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#constants" + }, + { + "include": "#comments" + }, + { + "include": "#operators" + }, + { + "include": "#strings" + }, + { + "include": "#constants" + }, + { + "match": "\\b([a-zA-Z_]\\w*)(::)", + "captures": { + "1": { + "name": "support.type.scope.systemverilog" + }, + "2": { + "name": "keyword.operator.scope.systemverilog" + } + } + }, + { + "match": "\\b([a-zA-Z_]\\w*)(')", + "captures": { + "1": { + "name": "storage.type.interface.systemverilog" + }, + "2": { + "name": "keyword.operator.cast.systemverilog" + } + } + }, + { + "match": "\\$\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", + "name": "support.function.systemverilog" + }, + { + "match": "\\b(virtual)\\b", + "name": "keyword.control.systemverilog" + } + ], + "match": "\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s*", + "captures": { + "1": { + "name": "support.function.port.implicit.systemverilog" + } + } + }, + "module-param": { + "name": "meta.module-param.systemverilog", + "begin": "(#)\\s*\\(", + "beginCaptures": { + "1": { + "name": "keyword.operator.param.systemverilog" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#constants" + }, + { + "include": "#operators" + }, + { + "include": "#strings" + }, + { + "include": "#module-binding" + }, + { + "match": "\\b(virtual)\\b", + "name": "keyword.control.systemverilog" + } + ] + }, + "struct-anonymous": { + "begin": "\\s*\\b(struct|union)\\s*(packed)?\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.systemverilog" + }, + "2": { + "name": "keyword.control.systemverilog" + } + }, + "end": "(})\\s*([a-zA-Z_]\\w*)\\s*;", + "endCaptures": { + "1": { + "name": "keyword.operator.other.systemverilog" + } + }, + "patterns": [ + { + "include": "#base-grammar" + } + ], + "name": "meta.struct.anonymous.systemverilog" + } + }, + "scopeName": "source.systemverilog", + "uuid": "789be04c-8b74-352e-8f37-63d336001277" +} diff --git a/src/lib/shiki/languages/tasl.tmLanguage.json b/src/lib/shiki/languages/tasl.tmLanguage.json new file mode 100644 index 0000000..6ca4a89 --- /dev/null +++ b/src/lib/shiki/languages/tasl.tmLanguage.json @@ -0,0 +1,290 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "scopeName": "source.tasl", + "name": "tasl", + "fileTypes": ["tasl"], + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#namespace" + }, + { + "include": "#type" + }, + { + "include": "#class" + }, + { + "include": "#edge" + } + ], + "repository": { + "comment": { + "match": "(#).*$", + "name": "comment.line.number-sign.tasl", + "captures": { + "1": { + "name": "punctuation.definition.comment.tasl" + } + } + }, + "namespace": { + "match": "(?:^\\s*)(namespace)\\b(.*)", + "captures": { + "1": { + "name": "keyword.control.tasl.namespace" + }, + "2": { + "patterns": [ + { + "include": "#namespaceURI" + }, + { + "match": "[a-zA-Z][a-zA-Z0-9]*\\b", + "name": "entity.name" + } + ] + } + } + }, + "type": { + "begin": "(?:^\\s*)(type)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.tasl.type" + } + }, + "end": "$", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "class": { + "begin": "(?:^\\s*)(class)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.tasl.class" + } + }, + "end": "$", + "patterns": [ + { + "include": "#key" + }, + { + "include": "#export" + }, + { + "include": "#expression" + } + ] + }, + "edge": { + "begin": "(?:^\\s*)(edge)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.tasl.edge" + } + }, + "end": "$", + "patterns": [ + { + "include": "#key" + }, + { + "include": "#export" + }, + { + "match": "=/", + "name": "punctuation.separator.tasl.edge.source" + }, + { + "match": "/=>", + "name": "punctuation.separator.tasl.edge.target" + }, + { + "match": "=>", + "name": "punctuation.separator.tasl.edge" + }, + { + "include": "#expression" + } + ] + }, + "export": { + "match": "::", + "name": "keyword.operator.tasl.export" + }, + "expression": { + "patterns": [ + { + "include": "#literal" + }, + { + "include": "#uri" + }, + { + "include": "#product" + }, + { + "include": "#coproduct" + }, + { + "include": "#reference" + }, + { + "include": "#optional" + }, + { + "include": "#identifier" + } + ] + }, + "literal": { + "patterns": [ + { + "include": "#datatype" + } + ] + }, + "uri": { + "match": "<>", + "name": "variable.other.constant" + }, + "product": { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.tasl.product" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.tasl.product" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#term" + }, + { + "include": "#component" + } + ] + }, + "component": { + "begin": "->", + "end": "$", + "beginCaptures": { + "0": { + "name": "punctuation.separator.tasl.component" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "coproduct": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.tasl.coproduct" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.tasl.coproduct" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#term" + }, + { + "include": "#option" + } + ] + }, + "option": { + "begin": "<-", + "end": "$", + "beginCaptures": { + "0": { + "name": "punctuation.separator.tasl.option" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "reference": { + "match": "(\\*)\\s*(.*)", + "captures": { + "1": { + "name": "markup.bold keyword.operator" + }, + "2": { + "patterns": [ + { + "include": "#key" + } + ] + } + } + }, + "identifier": { + "match": "([a-zA-Z][a-zA-Z0-9]*)\\b", + "captures": { + "1": { + "name": "variable" + } + } + }, + "optional": { + "begin": "\\?", + "beginCaptures": { + "0": { + "name": "keyword.operator" + } + }, + "end": "$", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "namespaceURI": { + "match": "[a-z]+:[a-zA-Z0-9-._~:\\/?#\\[\\]@!$&'()*+,;%=]+", + "name": "markup.underline.link" + }, + "key": { + "match": "[a-zA-Z][a-zA-Z0-9]*:(?:[A-Za-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})+", + "name": "markup.bold entity.name.class" + }, + "datatype": { + "match": "[a-zA-Z][a-zA-Z0-9]*:(?:[A-Za-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})+", + "name": "string.regexp" + }, + "term": { + "match": "[a-zA-Z][a-zA-Z0-9]*:(?:[A-Za-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})+", + "name": "entity.other.tasl.key" + } + } +} diff --git a/src/lib/shiki/languages/tcl.tmLanguage.json b/src/lib/shiki/languages/tcl.tmLanguage.json new file mode 100644 index 0000000..6203b36 --- /dev/null +++ b/src/lib/shiki/languages/tcl.tmLanguage.json @@ -0,0 +1,290 @@ +{ + "fileTypes": ["tcl"], + "foldingStartMarker": "\\{\\s*$", + "foldingStopMarker": "^\\s*\\}", + "keyEquivalent": "^~T", + "name": "tcl", + "patterns": [ + { + "begin": "(?<=^|;)\\s*((#))", + "beginCaptures": { + "1": { + "name": "comment.line.number-sign.tcl" + }, + "2": { + "name": "punctuation.definition.comment.tcl" + } + }, + "contentName": "comment.line.number-sign.tcl", + "end": "\\n", + "patterns": [ + { + "match": "(\\\\\\\\|\\\\\\n)" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.control.tcl" + } + }, + "match": "(?<=^|[\\[{;])\\s*(if|while|for|catch|default|return|break|continue|switch|exit|foreach|try|throw)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.control.tcl" + } + }, + "match": "(?<=^|})\\s*(then|elseif|else)\\b" + }, + { + "captures": { + "1": { + "name": "keyword.other.tcl" + }, + "2": { + "name": "entity.name.function.tcl" + } + }, + "match": "(?<=^|{)\\s*(proc)\\s+([^\\s]+)" + }, + { + "captures": { + "1": { + "name": "keyword.other.tcl" + } + }, + "match": "(?<=^|[\\[{;])\\s*(after|append|array|auto_execok|auto_import|auto_load|auto_mkindex|auto_mkindex_old|auto_qualify|auto_reset|bgerror|binary|cd|clock|close|concat|dde|encoding|eof|error|eval|exec|expr|fblocked|fconfigure|fcopy|file|fileevent|filename|flush|format|gets|glob|global|history|http|incr|info|interp|join|lappend|library|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort|memory|msgcat|namespace|open|package|parray|pid|pkg::create|pkg_mkIndex|proc|puts|pwd|re_syntax|read|registry|rename|resource|scan|seek|set|socket|SafeBase|source|split|string|subst|Tcl|tcl_endOfWord|tcl_findLibrary|tcl_startOfNextWord|tcl_startOfPreviousWord|tcl_wordBreakAfter|tcl_wordBreakBefore|tcltest|tclvars|tell|time|trace|unknown|unset|update|uplevel|upvar|variable|vwait)\\b" + }, + { + "begin": "(?<=^|[\\[{;])\\s*(regexp|regsub)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.other.tcl" + } + }, + "comment": "special-case regexp/regsub keyword in order to handle the expression", + "end": "[\\n;\\]]", + "patterns": [ + { + "match": "\\\\(?:.|\\n)", + "name": "constant.character.escape.tcl" + }, + { + "comment": "switch for regexp", + "match": "-\\w+\\s*" + }, + { + "applyEndPatternLast": 1, + "begin": "--\\s*", + "comment": "end of switches", + "end": "", + "patterns": [ + { + "include": "#regexp" + } + ] + }, + { + "include": "#regexp" + } + ] + }, + { + "include": "#escape" + }, + { + "include": "#variable" + }, + { + "include": "#operator" + }, + { + "include": "#numeric" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.tcl" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.tcl" + } + }, + "name": "string.quoted.double.tcl", + "patterns": [ + { + "include": "#escape" + }, + { + "include": "#variable" + }, + { + "include": "#embedded" + } + ] + } + ], + "repository": { + "bare-string": { + "begin": "(?:^|(?<=\\s))\"", + "comment": "matches a single quote-enclosed word without scoping", + "end": "\"([^\\s\\]]*)", + "endCaptures": { + "1": { + "name": "invalid.illegal.tcl" + } + }, + "patterns": [ + { + "include": "#escape" + }, + { + "include": "#variable" + } + ] + }, + "braces": { + "begin": "(?:^|(?<=\\s))\\{", + "comment": "matches a single brace-enclosed word", + "end": "\\}([^\\s\\]]*)", + "endCaptures": { + "1": { + "name": "invalid.illegal.tcl" + } + }, + "patterns": [ + { + "match": "\\\\[{}\\n]", + "name": "constant.character.escape.tcl" + }, + { + "include": "#inner-braces" + } + ] + }, + "embedded": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.tcl" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.tcl" + } + }, + "name": "source.tcl.embedded", + "patterns": [ + { + "include": "source.tcl" + } + ] + }, + "escape": { + "match": "\\\\(\\d{1,3}|x[a-fA-F0-9]+|u[a-fA-F0-9]{1,4}|.|\\n)", + "name": "constant.character.escape.tcl" + }, + "inner-braces": { + "begin": "\\{", + "comment": "matches a nested brace in a brace-enclosed word", + "end": "\\}", + "patterns": [ + { + "match": "\\\\[{}\\n]", + "name": "constant.character.escape.tcl" + }, + { + "include": "#inner-braces" + } + ] + }, + "regexp": { + "begin": "(?=\\S)(?![\\n;\\]])", + "comment": "matches a single word, named as a regexp, then swallows the rest of the command", + "end": "(?=[\\n;\\]])", + "patterns": [ + { + "begin": "(?=[^ \\t\\n;])", + "end": "(?=[ \\t\\n;])", + "name": "string.regexp.tcl", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#bare-string" + }, + { + "include": "#escape" + }, + { + "include": "#variable" + } + ] + }, + { + "begin": "[ \\t]", + "comment": "swallow the rest of the command", + "end": "(?=[\\n;\\]])", + "patterns": [ + { + "include": "#variable" + }, + { + "include": "#embedded" + }, + { + "include": "#escape" + }, + { + "include": "#braces" + }, + { + "include": "#string" + } + ] + } + ] + }, + "string": { + "applyEndPatternLast": 1, + "begin": "(?:^|(?<=\\s))(?=\")", + "comment": "matches a single quote-enclosed word with scoping", + "end": "", + "name": "string.quoted.double.tcl", + "patterns": [ + { + "include": "#bare-string" + } + ] + }, + "variable": { + "captures": { + "1": { + "name": "punctuation.definition.variable.tcl" + } + }, + "match": "(\\$)((?:[a-zA-Z0-9_]|::)+(\\([^\\)]+\\))?|\\{[^\\}]*\\})", + "name": "support.function.tcl" + }, + "numeric": { + "match": "(?<![a-zA-Z])([+-]?([0-9]*[.])?[0-9]+f?)(?![\\.a-zA-Z])", + "name": "constant.numeric.tcl" + }, + "operator": { + "match": "(?<= |\\d)(-|\\+|~|&{1,2}|\\|{1,2}|<{1,2}|>{1,2}|\\*{1,2}|!|%|\\/|<=|>=|={1,2}|!=|\\^)(?= |\\d)", + "name": "keyword.operator.tcl" + } + }, + "scopeName": "source.tcl", + "uuid": "62E11136-D9E5-461C-BE98-54E3A2A9E5E3" +} diff --git a/src/lib/shiki/languages/tex.tmLanguage.json b/src/lib/shiki/languages/tex.tmLanguage.json new file mode 100644 index 0000000..29f4ebe --- /dev/null +++ b/src/lib/shiki/languages/tex.tmLanguage.json @@ -0,0 +1,280 @@ +{ + "name": "tex", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.keyword.tex" + } + }, + "match": "(\\\\)(backmatter|csname|else|endcsname|fi|frontmatter|mainmatter|unless|if(case|cat|csname|defined|dim|eof|false|fontchar|hbox|hmode|inner|mmode|num|odd|true|vbox|vmode|void|x)?)(?![a-zA-Z@])", + "name": "keyword.control.tex" + }, + { + "captures": { + "1": { + "name": "keyword.control.catcode.tex" + }, + "2": { + "name": "punctuation.definition.keyword.tex" + }, + "3": { + "name": "punctuation.separator.key-value.tex" + }, + "4": { + "name": "constant.numeric.category.tex" + } + }, + "match": "((\\\\)catcode)`(?:\\\\)?.(=)(\\d+)", + "name": "meta.catcode.tex" + }, + { + "begin": "(^[ \\t]+)?(?=%)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.tex" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "%:?", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.tex" + } + }, + "end": "$\\n?", + "name": "comment.line.percentage.tex" + }, + { + "begin": "^(%!TEX) (\\S*) =", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.tex" + } + }, + "end": "$\\n?", + "name": "comment.line.percentage.directive.tex" + } + ] + }, + { + "match": "[\\[\\]]", + "name": "punctuation.definition.brackets.tex" + }, + { + "begin": "(\\$\\$|\\$)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.tex" + } + }, + "end": "(\\1)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.tex" + } + }, + "name": "meta.math.block.tex support.class.math.block.tex", + "patterns": [ + { + "match": "\\\\\\$", + "name": "constant.character.escape.tex" + }, + { + "include": "#math" + }, + { + "include": "$self" + } + ] + }, + { + "match": "\\\\\\\\", + "name": "keyword.control.newline.tex" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.function.tex" + } + }, + "match": "(\\\\)(?:[\\p{Alphabetic}@]+|[,;])", + "name": "support.function.general.tex" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.keyword.tex" + } + }, + "match": "(\\\\)[^a-zA-Z@]", + "name": "constant.character.escape.tex" + } + ], + "repository": { + "math": { + "patterns": [ + { + "begin": "((\\\\)(?:text|mbox))(\\{)", + "beginCaptures": { + "1": { + "name": "constant.other.math.tex" + }, + "2": { + "name": "punctuation.definition.function.tex" + }, + "3": { + "name": "punctuation.definition.arguments.begin.tex meta.text.normal.tex" + } + }, + "contentName": "meta.text.normal.tex", + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.tex meta.text.normal.tex" + } + }, + "patterns": [ + { + "include": "#math" + }, + { + "include": "$base" + } + ] + }, + { + "match": "\\\\{|\\\\}", + "name": "punctuation.math.bracket.pair.tex" + }, + { + "match": "\\\\(left|right|((big|bigg|Big|Bigg)[lr]?))([\\(\\[\\<\\>\\]\\)\\.\\|]|\\\\[{}|]|\\\\[lr]?[Vv]ert|\\\\[lr]angle)", + "name": "punctuation.math.bracket.pair.big.tex" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.math.tex" + } + }, + "match": "(\\\\)(s(s(earrow|warrow|lash)|h(ort(downarrow|uparrow|parallel|leftarrow|rightarrow|mid)|arp)|tar|i(gma|m(eq)?)|u(cc(sim|n(sim|approx)|curlyeq|eq|approx)?|pset(neq(q)?|plus(eq)?|eq(q)?)?|rd|m|bset(neq(q)?|plus(eq)?|eq(q)?)?)|p(hericalangle|adesuit)|e(tminus|arrow)|q(su(pset(eq)?|bset(eq)?)|c(up|ap)|uare)|warrow|m(ile|all(s(etminus|mile)|frown)))|h(slash|ook(leftarrow|rightarrow)|eartsuit|bar)|R(sh|ightarrow|e|bag)|Gam(e|ma)|n(s(hort(parallel|mid)|im|u(cc(eq)?|pseteq(q)?|bseteq))|Rightarrow|n(earrow|warrow)|cong|triangle(left(eq(slant)?)?|right(eq(slant)?)?)|i(plus)?|u|p(lus|arallel|rec(eq)?)|e(q|arrow|g|xists)|v(dash|Dash)|warrow|le(ss|q(slant|q)?|ft(arrow|rightarrow))|a(tural|bla)|VDash|rightarrow|g(tr|eq(slant|q)?)|mid|Left(arrow|rightarrow))|c(hi|irc(eq|le(d(circ|S|dash|ast)|arrow(left|right)))?|o(ng|prod|lon|mplement)|dot(s|p)?|u(p|r(vearrow(left|right)|ly(eq(succ|prec)|vee(downarrow|uparrow)?|wedge(downarrow|uparrow)?)))|enterdot|lubsuit|ap)|Xi|Maps(to(char)?|from(char)?)|B(ox|umpeq|bbk)|t(h(ick(sim|approx)|e(ta|refore))|imes|op|wohead(leftarrow|rightarrow)|a(u|lloblong)|riangle(down|q|left(eq(slant)?)?|right(eq(slant)?)?)?)|i(n(t(er(cal|leave))?|plus|fty)?|ota|math)|S(igma|u(pset|bset))|zeta|o(slash|times|int|dot|plus|vee|wedge|lessthan|greaterthan|m(inus|ega)|b(slash|long|ar))|d(i(v(ideontimes)?|a(g(down|up)|mond(suit)?)|gamma)|o(t(plus|eq(dot)?)|ublebarwedge|wn(harpoon(left|right)|downarrows|arrow))|d(ots|agger)|elta|a(sh(v|leftarrow|rightarrow)|leth|gger))|Y(down|up|left|right)|C(up|ap)|u(n(lhd|rhd)|p(silon|harpoon(left|right)|downarrow|uparrows|lus|arrow)|lcorner|rcorner)|jmath|Theta|Im|p(si|hi|i(tchfork)?|erp|ar(tial|allel)|r(ime|o(d|pto)|ec(sim|n(sim|approx)|curlyeq|eq|approx)?)|m)|e(t(h|a)|psilon|q(slant(less|gtr)|circ|uiv)|ll|xists|mptyset)|Omega|D(iamond|ownarrow|elta)|v(d(ots|ash)|ee(bar)?|Dash|ar(s(igma|u(psetneq(q)?|bsetneq(q)?))|nothing|curly(vee|wedge)|t(heta|imes|riangle(left|right)?)|o(slash|circle|times|dot|plus|vee|wedge|lessthan|ast|greaterthan|minus|b(slash|ar))|p(hi|i|ropto)|epsilon|kappa|rho|bigcirc))|kappa|Up(silon|downarrow|arrow)|Join|f(orall|lat|a(t(s(emi|lash)|bslash)|llingdotseq)|rown)|P(si|hi|i)|w(p|edge|r)|l(hd|n(sim|eq(q)?|approx)|ceil|times|ightning|o(ng(left(arrow|rightarrow)|rightarrow|maps(to|from))|zenge|oparrow(left|right))|dot(s|p)|e(ss(sim|dot|eq(qgtr|gtr)|approx|gtr)|q(slant|q)?|ft(slice|harpoon(down|up)|threetimes|leftarrows|arrow(t(ail|riangle))?|right(squigarrow|harpoons|arrow(s|triangle|eq)?))|adsto)|vertneqq|floor|l(c(orner|eil)|floor|l|bracket)?|a(ngle|mbda)|rcorner|bag)|a(s(ymp|t)|ngle|pprox(eq)?|l(pha|eph)|rrownot|malg)|V(dash|vdash)|r(h(o|d)|ceil|times|i(singdotseq|ght(s(quigarrow|lice)|harpoon(down|up)|threetimes|left(harpoons|arrows)|arrow(t(ail|riangle))?|rightarrows))|floor|angle|r(ceil|parenthesis|floor|bracket)|bag)|g(n(sim|eq(q)?|approx)|tr(sim|dot|eq(qless|less)|less|approx)|imel|eq(slant|q)?|vertneqq|amma|g(g)?)|Finv|xi|m(ho|i(nuso|d)|o(o|dels)|u(ltimap)?|p|e(asuredangle|rge)|aps(to|from(char)?))|b(i(n(dnasrepma|ampersand)|g(s(tar|qc(up|ap))|nplus|c(irc|u(p|rly(vee|wedge))|ap)|triangle(down|up)|interleave|o(times|dot|plus)|uplus|parallel|vee|wedge|box))|o(t|wtie|x(slash|circle|times|dot|plus|empty|ast|minus|b(slash|ox|ar)))|u(llet|mpeq)|e(cause|t(h|ween|a))|lack(square|triangle(down|left|right)?|lozenge)|a(ck(s(im(eq)?|lash)|prime|epsilon)|r(o|wedge))|bslash)|L(sh|ong(left(arrow|rightarrow)|rightarrow|maps(to|from))|eft(arrow|rightarrow)|leftarrow|ambda|bag)|Arrownot)(?![a-zA-Z])", + "name": "constant.character.math.tex" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.math.tex" + } + }, + "match": "(\\\\)(sum|prod|coprod|int|oint|bigcap|bigcup|bigsqcup|bigvee|bigwedge|bigodot|bigotimes|bogoplus|biguplus)\\b", + "name": "constant.character.math.tex" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.math.tex" + } + }, + "match": "(\\\\)(arccos|arcsin|arctan|arg|cos|cosh|cot|coth|csc|deg|det|dim|exp|gcd|hom|inf|ker|lg|lim|liminf|limsup|ln|log|max|min|pr|sec|sin|sinh|sup|tan|tanh)\\b", + "name": "constant.other.math.tex" + }, + { + "begin": "((\\\\)Sexpr(\\{))", + "beginCaptures": { + "1": { + "name": "support.function.sexpr.math.tex" + }, + "2": { + "name": "punctuation.definition.function.math.tex" + }, + "3": { + "name": "punctuation.section.embedded.begin.math.tex" + } + }, + "contentName": "support.function.sexpr.math.tex", + "end": "(((\\})))", + "endCaptures": { + "1": { + "name": "support.function.sexpr.math.tex" + }, + "2": { + "name": "punctuation.section.embedded.end.math.tex" + }, + "3": { + "name": "source.r" + } + }, + "name": "meta.embedded.line.r", + "patterns": [ + { + "begin": "\\G(?!\\})", + "end": "(?=\\})", + "name": "source.r", + "patterns": [ + { + "include": "source.r" + } + ] + } + ] + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.math.tex" + } + }, + "match": "(\\\\)(?!begin\\{|verb)([A-Za-z]+)", + "name": "constant.other.general.math.tex" + }, + { + "match": "(?<!\\\\)\\{", + "name": "punctuation.math.begin.bracket.curly.tex" + }, + { + "match": "(?<!\\\\)\\}", + "name": "punctuation.math.end.bracket.curly.tex" + }, + { + "match": "(?<!\\\\)\\(", + "name": "punctuation.math.begin.bracket.round.tex" + }, + { + "match": "(?<!\\\\)\\)", + "name": "punctuation.math.end.bracket.round.tex" + }, + { + "match": "(([0-9]*[\\.][0-9]+)|[0-9]+)", + "name": "constant.numeric.math.tex" + }, + { + "match": "[\\+\\*/_\\^-]", + "name": "punctuation.math.operator.tex" + } + ] + }, + "braces": { + "begin": "(?<!\\\\)\\{", + "beginCaptures": { + "0": { + "name": "punctuation.group.begin.tex" + } + }, + "end": "(?<!\\\\)\\}", + "endCaptures": { + "0": { + "name": "punctuation.group.end.tex" + } + }, + "name": "meta.group.braces.tex", + "patterns": [ + { + "include": "#braces" + } + ] + } + }, + "scopeName": "text.tex" +} diff --git a/src/lib/shiki/languages/toml.tmLanguage.json b/src/lib/shiki/languages/toml.tmLanguage.json new file mode 100644 index 0000000..6386b52 --- /dev/null +++ b/src/lib/shiki/languages/toml.tmLanguage.json @@ -0,0 +1,430 @@ +{ + "fileTypes": ["toml"], + "keyEquivalent": "^~T", + "name": "toml", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#groups" + }, + { + "include": "#key_pair" + }, + { + "include": "#invalid" + } + ], + "repository": { + "comments": { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.toml" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.toml" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.toml" + } + ] + }, + "groups": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.section.begin.toml" + }, + "2": { + "patterns": [ + { + "match": "[^\\s.]+", + "name": "entity.name.section.toml" + } + ] + }, + "3": { + "name": "punctuation.definition.section.begin.toml" + } + }, + "match": "^\\s*(\\[)([^\\[\\]]*)(\\])", + "name": "meta.group.toml" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.section.begin.toml" + }, + "2": { + "patterns": [ + { + "match": "[^\\s.]+", + "name": "entity.name.section.toml" + } + ] + }, + "3": { + "name": "punctuation.definition.section.begin.toml" + } + }, + "match": "^\\s*(\\[\\[)([^\\[\\]]*)(\\]\\])", + "name": "meta.group.double.toml" + } + ] + }, + "invalid": { + "match": "\\S+(\\s*(?=\\S))?", + "name": "invalid.illegal.not-allowed-here.toml" + }, + "key_pair": { + "patterns": [ + { + "begin": "([A-Za-z0-9_-]+)\\s*(=)\\s*", + "captures": { + "1": { + "name": "variable.other.key.toml" + }, + "2": { + "name": "punctuation.separator.key-value.toml" + } + }, + "end": "(?<=\\S)(?<!=)|$", + "patterns": [ + { + "include": "#primatives" + } + ] + }, + { + "begin": "((\")(.*?)(\"))\\s*(=)\\s*", + "captures": { + "1": { + "name": "variable.other.key.toml" + }, + "2": { + "name": "punctuation.definition.variable.begin.toml" + }, + "3": { + "patterns": [ + { + "match": "\\\\([btnfr\"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})", + "name": "constant.character.escape.toml" + }, + { + "match": "\\\\[^btnfr\"\\\\]", + "name": "invalid.illegal.escape.toml" + }, + { + "match": "\"", + "name": "invalid.illegal.not-allowed-here.toml" + } + ] + }, + "4": { + "name": "punctuation.definition.variable.end.toml" + }, + "5": { + "name": "punctuation.separator.key-value.toml" + } + }, + "end": "(?<=\\S)(?<!=)|$", + "patterns": [ + { + "include": "#primatives" + } + ] + }, + { + "begin": "((')([^']*)('))\\s*(=)\\s*", + "captures": { + "1": { + "name": "variable.other.key.toml" + }, + "2": { + "name": "punctuation.definition.variable.begin.toml" + }, + "4": { + "name": "punctuation.definition.variable.end.toml" + }, + "5": { + "name": "punctuation.separator.key-value.toml" + } + }, + "end": "(?<=\\S)(?<!=)|$", + "patterns": [ + { + "include": "#primatives" + } + ] + }, + { + "begin": "(?x)\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\t[A-Za-z0-9_-]+\t\t\t\t# Bare key\n\t\t\t\t\t\t\t\t | \" (?:[^\"\\\\]|\\\\.)* \"\t\t# Double quoted key\n\t\t\t\t\t\t\t\t | ' [^']* '\t\t# Sindle quoted key\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\t\\s* \\. \\s*\t\t\t\t\t# Dot\n\t\t\t\t\t\t\t\t | (?= \\s* =)\t\t\t\t\t# or look-ahead for equals\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t){2,}\t\t\t\t\t\t\t\t# Ensure at least one dot\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\\s*(=)\\s*\n\t\t\t\t\t", + "captures": { + "1": { + "name": "variable.other.key.toml", + "patterns": [ + { + "match": "\\.", + "name": "punctuation.separator.variable.toml" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.begin.toml" + }, + "2": { + "patterns": [ + { + "match": "\\\\([btnfr\"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})", + "name": "constant.character.escape.toml" + }, + { + "match": "\\\\[^btnfr\"\\\\]", + "name": "invalid.illegal.escape.toml" + } + ] + }, + "3": { + "name": "punctuation.definition.variable.end.toml" + } + }, + "match": "(\")((?:[^\"\\\\]|\\\\.)*)(\")" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.begin.toml" + }, + "2": { + "name": "punctuation.definition.variable.end.toml" + } + }, + "match": "(')[^']*(')" + } + ] + }, + "3": { + "name": "punctuation.separator.key-value.toml" + } + }, + "comment": "Dotted key", + "end": "(?<=\\S)(?<!=)|$", + "patterns": [ + { + "include": "#primatives" + } + ] + } + ] + }, + "primatives": { + "patterns": [ + { + "begin": "\\G\"\"\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.toml" + } + }, + "end": "\"{3,5}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.toml" + } + }, + "name": "string.quoted.triple.double.toml", + "patterns": [ + { + "match": "\\\\([btnfr\"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})", + "name": "constant.character.escape.toml" + }, + { + "match": "\\\\[^btnfr\"\\\\\\n]", + "name": "invalid.illegal.escape.toml" + } + ] + }, + { + "begin": "\\G\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.toml" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.toml" + } + }, + "name": "string.quoted.double.toml", + "patterns": [ + { + "match": "\\\\([btnfr\"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})", + "name": "constant.character.escape.toml" + }, + { + "match": "\\\\[^btnfr\"\\\\]", + "name": "invalid.illegal.escape.toml" + } + ] + }, + { + "begin": "\\G'''", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.toml" + } + }, + "end": "'{3,5}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.toml" + } + }, + "name": "string.quoted.triple.single.toml" + }, + { + "begin": "\\G'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.toml" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.toml" + } + }, + "name": "string.quoted.single.toml" + }, + { + "match": "\\G(?x)\n\t\t\t\t\t\t[0-9]{4}\n\t\t\t\t\t\t-\n\t\t\t\t\t\t(0[1-9]|1[012])\n\t\t\t\t\t\t-\n\t\t\t\t\t\t(?!00|3[2-9])[0-3][0-9]\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t[Tt ]\n\t\t\t\t\t\t\t(?!2[5-9])[0-2][0-9]\n\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t[0-5][0-9]\n\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t(?!6[1-9])[0-6][0-9]\n\t\t\t\t\t\t\t(\\.[0-9]+)?\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tZ\n\t\t\t\t\t\t\t | [+-](?!2[5-9])[0-2][0-9]:[0-5][0-9]\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t)?\n\t\t\t\t\t", + "name": "constant.other.date.toml" + }, + { + "match": "\\G(?x)\n\t\t\t\t\t\t(?!2[5-9])[0-2][0-9]\n\t\t\t\t\t\t:\n\t\t\t\t\t\t[0-5][0-9]\n\t\t\t\t\t\t:\n\t\t\t\t\t\t(?!6[1-9])[0-6][0-9]\n\t\t\t\t\t\t(\\.[0-9]+)?\n\t\t\t\t\t", + "name": "constant.other.time.toml" + }, + { + "match": "\\G(true|false)", + "name": "constant.language.boolean.toml" + }, + { + "match": "\\G0x\\h(\\h|_\\h)*", + "name": "constant.numeric.hex.toml" + }, + { + "match": "\\G0o[0-7]([0-7]|_[0-7])*", + "name": "constant.numeric.octal.toml" + }, + { + "match": "\\G0b[01]([01]|_[01])*", + "name": "constant.numeric.binary.toml" + }, + { + "match": "\\G[+-]?(inf|nan)", + "name": "constant.numeric.toml" + }, + { + "match": "(?x)\n\t\t\t\t\t\t\\G\n\t\t\t\t\t\t(\n\t\t\t\t\t\t [+-]?\n\t\t\t\t\t\t (\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t | ([1-9](([0-9]|_[0-9])+)?)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?=[.eE])\n\t\t\t\t\t\t(\n\t\t\t\t\t\t \\.\n\t\t\t\t\t\t ([0-9](([0-9]|_[0-9])+)?)\n\t\t\t\t\t\t)?\n\t\t\t\t\t\t(\n\t\t\t\t\t\t [eE]\n\t\t\t\t\t\t ([+-]?[0-9](([0-9]|_[0-9])+)?)\n\t\t\t\t\t\t)?\n\t\t\t\t\t", + "name": "constant.numeric.float.toml" + }, + { + "match": "(?x)\n\t\t\t\t\t\t\\G\n\t\t\t\t\t\t(\n\t\t\t\t\t\t [+-]?\n\t\t\t\t\t\t (\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t | ([1-9](([0-9]|_[0-9])+)?)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t", + "name": "constant.numeric.integer.toml" + }, + { + "begin": "\\G\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.array.begin.toml" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.array.end.toml" + } + }, + "name": "meta.array.toml", + "patterns": [ + { + "begin": "(?=[\"'']|[+-]?[0-9]|[+-]?(inf|nan)|true|false|\\[|\\{)", + "end": ",|(?=])", + "endCaptures": { + "0": { + "name": "punctuation.separator.array.toml" + } + }, + "patterns": [ + { + "include": "#primatives" + }, + { + "include": "#comments" + }, + { + "include": "#invalid" + } + ] + }, + { + "include": "#comments" + }, + { + "include": "#invalid" + } + ] + }, + { + "begin": "\\G\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.inline-table.begin.toml" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.inline-table.end.toml" + } + }, + "name": "meta.inline-table.toml", + "patterns": [ + { + "begin": "(?=\\S)", + "end": ",|(?=})", + "endCaptures": { + "0": { + "name": "punctuation.separator.inline-table.toml" + } + }, + "patterns": [ + { + "include": "#key_pair" + } + ] + }, + { + "include": "#comments" + } + ] + } + ] + } + }, + "scopeName": "source.toml", + "uuid": "7DEF2EDB-5BB7-4DD2-9E78-3541A26B7923" +} diff --git a/src/lib/shiki/languages/tsx.tmLanguage.json b/src/lib/shiki/languages/tsx.tmLanguage.json new file mode 100644 index 0000000..06dd400 --- /dev/null +++ b/src/lib/shiki/languages/tsx.tmLanguage.json @@ -0,0 +1,5989 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/8c7482b94b548eab56da64dbfb30b82589b3f747", + "name": "tsx", + "scopeName": "source.tsx", + "patterns": [ + { + "include": "#directives" + }, + { + "include": "#statements" + }, + { + "include": "#shebang" + } + ], + "repository": { + "shebang": { + "name": "comment.line.shebang.tsx", + "match": "\\A(#!).*(?=$)", + "captures": { + "1": { + "name": "punctuation.definition.comment.tsx" + } + } + }, + "statements": { + "patterns": [ + { + "include": "#declaration" + }, + { + "include": "#control-statement" + }, + { + "include": "#after-operator-block-as-object-literal" + }, + { + "include": "#decl-block" + }, + { + "include": "#label" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-semicolon" + }, + { + "include": "#string" + }, + { + "include": "#comment" + } + ] + }, + "declaration": { + "patterns": [ + { + "include": "#decorator" + }, + { + "include": "#var-expr" + }, + { + "include": "#function-declaration" + }, + { + "include": "#class-declaration" + }, + { + "include": "#interface-declaration" + }, + { + "include": "#enum-declaration" + }, + { + "include": "#namespace-declaration" + }, + { + "include": "#type-alias-declaration" + }, + { + "include": "#import-equals-declaration" + }, + { + "include": "#import-declaration" + }, + { + "include": "#export-declaration" + }, + { + "name": "storage.modifier.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(declare|export)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + } + ] + }, + "control-statement": { + "patterns": [ + { + "include": "#switch-statement" + }, + { + "include": "#for-loop" + }, + { + "name": "keyword.control.trycatch.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(catch|finally|throw|try)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|goto)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "captures": { + "1": { + "name": "keyword.control.loop.tsx" + }, + "2": { + "name": "entity.name.label.tsx" + } + } + }, + { + "name": "keyword.control.loop.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(return)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "0": { + "name": "keyword.control.flow.tsx" + } + }, + "end": "(?=[;}]|$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "keyword.control.switch.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "include": "#if-statement" + }, + { + "name": "keyword.control.conditional.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(else|if)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.control.with.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(with)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.control.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(package)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.other.debugger.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(debugger)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + } + ] + }, + "label": { + "patterns": [ + { + "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*\\{)", + "beginCaptures": { + "1": { + "name": "entity.name.label.tsx" + }, + "2": { + "name": "punctuation.separator.label.tsx" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#decl-block" + } + ] + }, + { + "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)", + "captures": { + "1": { + "name": "entity.name.label.tsx" + }, + "2": { + "name": "punctuation.separator.label.tsx" + } + } + } + ] + }, + "expression": { + "patterns": [ + { + "include": "#expressionWithoutIdentifiers" + }, + { + "include": "#identifiers" + }, + { + "include": "#expressionPunctuations" + } + ] + }, + "expressionWithoutIdentifiers": { + "patterns": [ + { + "include": "#jsx" + }, + { + "include": "#string" + }, + { + "include": "#regex" + }, + { + "include": "#comment" + }, + { + "include": "#function-expression" + }, + { + "include": "#class-expression" + }, + { + "include": "#arrow-function" + }, + { + "include": "#paren-expression-possibly-arrow" + }, + { + "include": "#cast" + }, + { + "include": "#ternary-expression" + }, + { + "include": "#new-expr" + }, + { + "include": "#instanceof-expr" + }, + { + "include": "#object-literal" + }, + { + "include": "#expression-operators" + }, + { + "include": "#function-call" + }, + { + "include": "#literal" + }, + { + "include": "#support-objects" + }, + { + "include": "#paren-expression" + } + ] + }, + "expressionPunctuations": { + "patterns": [ + { + "include": "#punctuation-comma" + }, + { + "include": "#punctuation-accessor" + } + ] + }, + "decorator": { + "name": "meta.decorator.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\@", + "beginCaptures": { + "0": { + "name": "punctuation.decorator.tsx" + } + }, + "end": "(?=\\s)", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "var-expr": { + "patterns": [ + { + "name": "meta.var.expr.tsx", + "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))", + "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=^|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|((?<!^let|[^\\._$[:alnum:]]let|^var|[^\\._$[:alnum:]]var)(?=\\s*$)))", + "patterns": [ + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "storage.type.tsx" + } + }, + "end": "(?=\\S)" + }, + { + "include": "#destructuring-variable" + }, + { + "include": "#var-single-variable" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#comment" + }, + { + "begin": "(,)\\s*(?=$|\\/\\/)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.comma.tsx" + } + }, + "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))", + "patterns": [ + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#comment" + }, + { + "include": "#destructuring-variable" + }, + { + "include": "#var-single-variable" + }, + { + "include": "#punctuation-comma" + } + ] + }, + { + "include": "#punctuation-comma" + } + ] + }, + { + "name": "meta.var.expr.tsx", + "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))", + "beginCaptures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "storage.type.tsx" + } + }, + "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=^|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|((?<!^const|[^\\._$[:alnum:]]const)(?=\\s*$)))", + "patterns": [ + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "storage.type.tsx" + } + }, + "end": "(?=\\S)" + }, + { + "include": "#destructuring-const" + }, + { + "include": "#var-single-const" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#comment" + }, + { + "begin": "(,)\\s*(?=$|\\/\\/)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.comma.tsx" + } + }, + "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))", + "patterns": [ + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#comment" + }, + { + "include": "#destructuring-const" + }, + { + "include": "#var-single-const" + }, + { + "include": "#punctuation-comma" + } + ] + }, + { + "include": "#punctuation-comma" + } + ] + }, + { + "name": "meta.var.expr.tsx", + "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b((?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))", + "beginCaptures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "storage.type.tsx" + } + }, + "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b((?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|((?<!^using|[^\\._$[:alnum:]]using|^await\\s+using|[^\\._$[:alnum:]]await\\s+using)(?=\\s*$)))", + "patterns": [ + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b((?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "storage.type.tsx" + } + }, + "end": "(?=\\S)" + }, + { + "include": "#var-single-const" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#comment" + }, + { + "begin": "(,)\\s*((?!\\S)|(?=\\/\\/))", + "beginCaptures": { + "1": { + "name": "punctuation.separator.comma.tsx" + } + }, + "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))", + "patterns": [ + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#comment" + }, + { + "include": "#var-single-const" + }, + { + "include": "#punctuation-comma" + } + ] + }, + { + "include": "#punctuation-comma" + } + ] + } + ] + }, + "var-single-variable": { + "patterns": [ + { + "name": "meta.var-single-variable.expr.tsx", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "beginCaptures": { + "1": { + "name": "meta.definition.variable.tsx entity.name.function.tsx" + }, + "2": { + "name": "keyword.operator.definiteassignment.tsx" + } + }, + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", + "patterns": [ + { + "include": "#var-single-variable-type-annotation" + } + ] + }, + { + "name": "meta.var-single-variable.expr.tsx", + "begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\\!)?", + "beginCaptures": { + "1": { + "name": "meta.definition.variable.tsx variable.other.constant.tsx" + }, + "2": { + "name": "keyword.operator.definiteassignment.tsx" + } + }, + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", + "patterns": [ + { + "include": "#var-single-variable-type-annotation" + } + ] + }, + { + "name": "meta.var-single-variable.expr.tsx", + "begin": "([_$[:alpha:]][_$[:alnum:]]*)(\\!)?", + "beginCaptures": { + "1": { + "name": "meta.definition.variable.tsx variable.other.readwrite.tsx" + }, + "2": { + "name": "keyword.operator.definiteassignment.tsx" + } + }, + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", + "patterns": [ + { + "include": "#var-single-variable-type-annotation" + } + ] + } + ] + }, + "var-single-const": { + "patterns": [ + { + "name": "meta.var-single-variable.expr.tsx", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "beginCaptures": { + "1": { + "name": "meta.definition.variable.tsx variable.other.constant.tsx entity.name.function.tsx" + } + }, + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", + "patterns": [ + { + "include": "#var-single-variable-type-annotation" + } + ] + }, + { + "name": "meta.var-single-variable.expr.tsx", + "begin": "([_$[:alpha:]][_$[:alnum:]]*)", + "beginCaptures": { + "1": { + "name": "meta.definition.variable.tsx variable.other.constant.tsx" + } + }, + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", + "patterns": [ + { + "include": "#var-single-variable-type-annotation" + } + ] + } + ] + }, + "var-single-variable-type-annotation": { + "patterns": [ + { + "include": "#type-annotation" + }, + { + "include": "#string" + }, + { + "include": "#comment" + } + ] + }, + "destructuring-variable": { + "patterns": [ + { + "name": "meta.object-binding-pattern-variable.tsx", + "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)", + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", + "patterns": [ + { + "include": "#object-binding-pattern" + }, + { + "include": "#type-annotation" + }, + { + "include": "#comment" + } + ] + }, + { + "name": "meta.array-binding-pattern-variable.tsx", + "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)", + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", + "patterns": [ + { + "include": "#array-binding-pattern" + }, + { + "include": "#type-annotation" + }, + { + "include": "#comment" + } + ] + } + ] + }, + "destructuring-const": { + "patterns": [ + { + "name": "meta.object-binding-pattern-variable.tsx", + "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)", + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", + "patterns": [ + { + "include": "#object-binding-pattern-const" + }, + { + "include": "#type-annotation" + }, + { + "include": "#comment" + } + ] + }, + { + "name": "meta.array-binding-pattern-variable.tsx", + "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)", + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", + "patterns": [ + { + "include": "#array-binding-pattern-const" + }, + { + "include": "#type-annotation" + }, + { + "include": "#comment" + } + ] + } + ] + }, + "object-binding-element": { + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", + "end": "(?=,|\\})", + "patterns": [ + { + "include": "#object-binding-element-propertyName" + }, + { + "include": "#binding-element" + } + ] + }, + { + "include": "#object-binding-pattern" + }, + { + "include": "#destructuring-variable-rest" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "object-binding-element-const": { + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", + "end": "(?=,|\\})", + "patterns": [ + { + "include": "#object-binding-element-propertyName" + }, + { + "include": "#binding-element-const" + } + ] + }, + { + "include": "#object-binding-pattern-const" + }, + { + "include": "#destructuring-variable-rest-const" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "object-binding-element-propertyName": { + "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", + "end": "(:)", + "endCaptures": { + "0": { + "name": "punctuation.destructuring.tsx" + } + }, + "patterns": [ + { + "include": "#string" + }, + { + "include": "#array-literal" + }, + { + "include": "#numeric-literal" + }, + { + "name": "variable.object.property.tsx", + "match": "([_$[:alpha:]][_$[:alnum:]]*)" + } + ] + }, + "binding-element": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "include": "#numeric-literal" + }, + { + "include": "#regex" + }, + { + "include": "#object-binding-pattern" + }, + { + "include": "#array-binding-pattern" + }, + { + "include": "#destructuring-variable-rest" + }, + { + "include": "#variable-initializer" + } + ] + }, + "binding-element-const": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "include": "#numeric-literal" + }, + { + "include": "#regex" + }, + { + "include": "#object-binding-pattern-const" + }, + { + "include": "#array-binding-pattern-const" + }, + { + "include": "#destructuring-variable-rest-const" + }, + { + "include": "#variable-initializer" + } + ] + }, + "destructuring-variable-rest": { + "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "keyword.operator.rest.tsx" + }, + "2": { + "name": "meta.definition.variable.tsx variable.other.readwrite.tsx" + } + } + }, + "destructuring-variable-rest-const": { + "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "keyword.operator.rest.tsx" + }, + "2": { + "name": "meta.definition.variable.tsx variable.other.constant.tsx" + } + } + }, + "object-binding-pattern": { + "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", + "beginCaptures": { + "1": { + "name": "keyword.operator.rest.tsx" + }, + "2": { + "name": "punctuation.definition.binding-pattern.object.tsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.binding-pattern.object.tsx" + } + }, + "patterns": [ + { + "include": "#object-binding-element" + } + ] + }, + "object-binding-pattern-const": { + "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", + "beginCaptures": { + "1": { + "name": "keyword.operator.rest.tsx" + }, + "2": { + "name": "punctuation.definition.binding-pattern.object.tsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.binding-pattern.object.tsx" + } + }, + "patterns": [ + { + "include": "#object-binding-element-const" + } + ] + }, + "array-binding-pattern": { + "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", + "beginCaptures": { + "1": { + "name": "keyword.operator.rest.tsx" + }, + "2": { + "name": "punctuation.definition.binding-pattern.array.tsx" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.binding-pattern.array.tsx" + } + }, + "patterns": [ + { + "include": "#binding-element" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "array-binding-pattern-const": { + "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", + "beginCaptures": { + "1": { + "name": "keyword.operator.rest.tsx" + }, + "2": { + "name": "punctuation.definition.binding-pattern.array.tsx" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.binding-pattern.array.tsx" + } + }, + "patterns": [ + { + "include": "#binding-element-const" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "parameter-name": { + "patterns": [ + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)", + "captures": { + "1": { + "name": "storage.modifier.tsx" + } + } + }, + { + "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "1": { + "name": "storage.modifier.tsx" + }, + "2": { + "name": "keyword.operator.rest.tsx" + }, + "3": { + "name": "entity.name.function.tsx variable.language.this.tsx" + }, + "4": { + "name": "entity.name.function.tsx" + }, + "5": { + "name": "keyword.operator.optional.tsx" + } + } + }, + { + "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)", + "captures": { + "1": { + "name": "storage.modifier.tsx" + }, + "2": { + "name": "keyword.operator.rest.tsx" + }, + "3": { + "name": "variable.parameter.tsx variable.language.this.tsx" + }, + "4": { + "name": "variable.parameter.tsx" + }, + "5": { + "name": "keyword.operator.optional.tsx" + } + } + } + ] + }, + "destructuring-parameter": { + "patterns": [ + { + "name": "meta.parameter.object-binding-pattern.tsx", + "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\{)", + "beginCaptures": { + "1": { + "name": "keyword.operator.rest.tsx" + }, + "2": { + "name": "punctuation.definition.binding-pattern.object.tsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.binding-pattern.object.tsx" + } + }, + "patterns": [ + { + "include": "#parameter-object-binding-element" + } + ] + }, + { + "name": "meta.paramter.array-binding-pattern.tsx", + "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\[)", + "beginCaptures": { + "1": { + "name": "keyword.operator.rest.tsx" + }, + "2": { + "name": "punctuation.definition.binding-pattern.array.tsx" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.binding-pattern.array.tsx" + } + }, + "patterns": [ + { + "include": "#parameter-binding-element" + }, + { + "include": "#punctuation-comma" + } + ] + } + ] + }, + "parameter-object-binding-element": { + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", + "end": "(?=,|\\})", + "patterns": [ + { + "include": "#object-binding-element-propertyName" + }, + { + "include": "#parameter-binding-element" + }, + { + "include": "#paren-expression" + } + ] + }, + { + "include": "#parameter-object-binding-pattern" + }, + { + "include": "#destructuring-parameter-rest" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "parameter-binding-element": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "include": "#numeric-literal" + }, + { + "include": "#regex" + }, + { + "include": "#parameter-object-binding-pattern" + }, + { + "include": "#parameter-array-binding-pattern" + }, + { + "include": "#destructuring-parameter-rest" + }, + { + "include": "#variable-initializer" + } + ] + }, + "destructuring-parameter-rest": { + "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "keyword.operator.rest.tsx" + }, + "2": { + "name": "variable.parameter.tsx" + } + } + }, + "parameter-object-binding-pattern": { + "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", + "beginCaptures": { + "1": { + "name": "keyword.operator.rest.tsx" + }, + "2": { + "name": "punctuation.definition.binding-pattern.object.tsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.binding-pattern.object.tsx" + } + }, + "patterns": [ + { + "include": "#parameter-object-binding-element" + } + ] + }, + "parameter-array-binding-pattern": { + "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", + "beginCaptures": { + "1": { + "name": "keyword.operator.rest.tsx" + }, + "2": { + "name": "punctuation.definition.binding-pattern.array.tsx" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.binding-pattern.array.tsx" + } + }, + "patterns": [ + { + "include": "#parameter-binding-element" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "field-declaration": { + "name": "meta.field.declaration.tsx", + "begin": "(?x)(?<!\\()(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s+)?(?=\\s*((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|(\\#?[_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|\\}|$))", + "beginCaptures": { + "1": { + "name": "storage.modifier.tsx" + } + }, + "end": "(?x)(?=\\}|;|,|$|(^(?!\\s*((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|(\\#?[_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|$))))|(?<=\\})", + "patterns": [ + { + "include": "#variable-initializer" + }, + { + "include": "#type-annotation" + }, + { + "include": "#string" + }, + { + "include": "#array-literal" + }, + { + "include": "#numeric-literal" + }, + { + "include": "#comment" + }, + { + "match": "(?x)(\\#?[_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "1": { + "name": "meta.definition.property.tsx entity.name.function.tsx" + }, + "2": { + "name": "keyword.operator.optional.tsx" + }, + "3": { + "name": "keyword.operator.definiteassignment.tsx" + } + } + }, + { + "name": "meta.definition.property.tsx variable.object.property.tsx", + "match": "\\#?[_$[:alpha:]][_$[:alnum:]]*" + }, + { + "name": "keyword.operator.optional.tsx", + "match": "\\?" + }, + { + "name": "keyword.operator.definiteassignment.tsx", + "match": "\\!" + } + ] + }, + "variable-initializer": { + "patterns": [ + { + "begin": "(?<!=|!)(=)(?!=)(?=\\s*\\S)(?!\\s*.*=>\\s*$)", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.tsx" + } + }, + "end": "(?=$|^|[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "begin": "(?<!=|!)(=)(?!=)", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.tsx" + } + }, + "end": "(?=[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))|(?=^\\s*$)|(?<![\\|\\&\\+\\-\\*\\/])(?<=\\S)(?<!=)(?=\\s*$)", + "patterns": [ + { + "include": "#expression" + } + ] + } + ] + }, + "function-declaration": { + "name": "meta.function.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "storage.modifier.async.tsx" + }, + "4": { + "name": "storage.type.function.tsx" + }, + "5": { + "name": "keyword.generator.asterisk.tsx" + }, + "6": { + "name": "meta.definition.function.tsx entity.name.function.tsx" + } + }, + "end": "(?=;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|(?<=\\})", + "patterns": [ + { + "include": "#function-name" + }, + { + "include": "#function-body" + } + ] + }, + "function-expression": { + "name": "meta.function.expression.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.tsx" + }, + "2": { + "name": "storage.type.function.tsx" + }, + "3": { + "name": "keyword.generator.asterisk.tsx" + }, + "4": { + "name": "meta.definition.function.tsx entity.name.function.tsx" + } + }, + "end": "(?=;)|(?<=\\})", + "patterns": [ + { + "include": "#function-name" + }, + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#function-body" + } + ] + }, + "function-name": { + "name": "meta.definition.function.tsx entity.name.function.tsx", + "match": "[_$[:alpha:]][_$[:alnum:]]*" + }, + "function-body": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-parameters" + }, + { + "include": "#function-parameters" + }, + { + "include": "#return-type" + }, + { + "include": "#type-function-return-type" + }, + { + "include": "#decl-block" + }, + { + "name": "keyword.generator.asterisk.tsx", + "match": "\\*" + } + ] + }, + "method-declaration": { + "patterns": [ + { + "name": "meta.method.declaration.tsx", + "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?\\s*\\b(constructor)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "1": { + "name": "storage.modifier.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "storage.modifier.tsx" + }, + "4": { + "name": "storage.modifier.async.tsx" + }, + "5": { + "name": "storage.type.tsx" + } + }, + "end": "(?=\\}|;|,|$)|(?<=\\})", + "patterns": [ + { + "include": "#method-declaration-name" + }, + { + "include": "#function-body" + } + ] + }, + { + "name": "meta.method.declaration.tsx", + "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\s*\\b(new)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(?:(\\*)\\s*)?)(?=\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", + "beginCaptures": { + "1": { + "name": "storage.modifier.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "storage.modifier.tsx" + }, + "4": { + "name": "storage.modifier.async.tsx" + }, + "5": { + "name": "keyword.operator.new.tsx" + }, + "6": { + "name": "keyword.generator.asterisk.tsx" + } + }, + "end": "(?=\\}|;|,|$)|(?<=\\})", + "patterns": [ + { + "include": "#method-declaration-name" + }, + { + "include": "#function-body" + } + ] + }, + { + "name": "meta.method.declaration.tsx", + "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", + "beginCaptures": { + "1": { + "name": "storage.modifier.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "storage.modifier.tsx" + }, + "4": { + "name": "storage.modifier.async.tsx" + }, + "5": { + "name": "storage.type.property.tsx" + }, + "6": { + "name": "keyword.generator.asterisk.tsx" + } + }, + "end": "(?=\\}|;|,|$)|(?<=\\})", + "patterns": [ + { + "include": "#method-declaration-name" + }, + { + "include": "#function-body" + } + ] + } + ] + }, + "object-literal-method-declaration": { + "name": "meta.method.declaration.tsx", + "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.tsx" + }, + "2": { + "name": "storage.type.property.tsx" + }, + "3": { + "name": "keyword.generator.asterisk.tsx" + } + }, + "end": "(?=\\}|;|,)|(?<=\\})", + "patterns": [ + { + "include": "#method-declaration-name" + }, + { + "include": "#function-body" + }, + { + "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.tsx" + }, + "2": { + "name": "storage.type.property.tsx" + }, + "3": { + "name": "keyword.generator.asterisk.tsx" + } + }, + "end": "(?=\\(|\\<)", + "patterns": [ + { + "include": "#method-declaration-name" + } + ] + } + ] + }, + "method-declaration-name": { + "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])", + "end": "(?=\\(|\\<)", + "patterns": [ + { + "include": "#string" + }, + { + "include": "#array-literal" + }, + { + "include": "#numeric-literal" + }, + { + "name": "meta.definition.method.tsx entity.name.function.tsx", + "match": "[_$[:alpha:]][_$[:alnum:]]*" + }, + { + "name": "keyword.operator.optional.tsx", + "match": "\\?" + } + ] + }, + "arrow-function": { + "patterns": [ + { + "name": "meta.arrow.tsx", + "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)", + "captures": { + "1": { + "name": "storage.modifier.async.tsx" + }, + "2": { + "name": "variable.parameter.tsx" + } + } + }, + { + "name": "meta.arrow.tsx", + "begin": "(?x) (?:\n (?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.tsx" + } + }, + "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-parameters" + }, + { + "include": "#function-parameters" + }, + { + "include": "#arrow-return-type" + }, + { + "include": "#possibly-arrow-return-type" + } + ] + }, + { + "name": "meta.arrow.tsx", + "begin": "=>", + "beginCaptures": { + "0": { + "name": "storage.type.function.arrow.tsx" + } + }, + "end": "((?<=\\}|\\S)(?<!=>)|((?!\\{)(?=\\S)))(?!\\/[\\/\\*])", + "patterns": [ + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#decl-block" + }, + { + "include": "#expression" + } + ] + } + ] + }, + "indexer-declaration": { + "name": "meta.indexer.declaration.tsx", + "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)", + "beginCaptures": { + "1": { + "name": "storage.modifier.tsx" + }, + "2": { + "name": "meta.brace.square.tsx" + }, + "3": { + "name": "variable.parameter.tsx" + } + }, + "end": "(\\])\\s*(\\?\\s*)?|$", + "endCaptures": { + "1": { + "name": "meta.brace.square.tsx" + }, + "2": { + "name": "keyword.operator.optional.tsx" + } + }, + "patterns": [ + { + "include": "#type-annotation" + } + ] + }, + "indexer-mapped-type-declaration": { + "name": "meta.indexer.mappedtype.declaration.tsx", + "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([+-])?(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.modifier.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "meta.brace.square.tsx" + }, + "4": { + "name": "entity.name.type.tsx" + }, + "5": { + "name": "keyword.operator.expression.in.tsx" + } + }, + "end": "(\\])([+-])?\\s*(\\?\\s*)?|$", + "endCaptures": { + "1": { + "name": "meta.brace.square.tsx" + }, + "2": { + "name": "keyword.operator.type.modifier.tsx" + }, + "3": { + "name": "keyword.operator.optional.tsx" + } + }, + "patterns": [ + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+", + "captures": { + "1": { + "name": "keyword.control.as.tsx" + } + } + }, + { + "include": "#type" + } + ] + }, + "function-parameters": { + "name": "meta.parameters.tsx", + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.parameters.begin.tsx" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.tsx" + } + }, + "patterns": [ + { + "include": "#function-parameters-body" + } + ] + }, + "function-parameters-body": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "include": "#decorator" + }, + { + "include": "#destructuring-parameter" + }, + { + "include": "#parameter-name" + }, + { + "include": "#parameter-type-annotation" + }, + { + "include": "#variable-initializer" + }, + { + "name": "punctuation.separator.parameter.tsx", + "match": "," + } + ] + }, + "class-declaration": { + "name": "meta.class.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[/*])", + "beginCaptures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "storage.modifier.tsx" + }, + "4": { + "name": "storage.type.class.tsx" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#class-declaration-or-expression-patterns" + } + ] + }, + "class-expression": { + "name": "meta.class.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(class)\\b(?=\\s+|[<{]|\\/[\\/*])", + "beginCaptures": { + "1": { + "name": "storage.modifier.tsx" + }, + "2": { + "name": "storage.type.class.tsx" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#class-declaration-or-expression-patterns" + } + ] + }, + "class-declaration-or-expression-patterns": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#class-or-interface-heritage" + }, + { + "match": "[_$[:alpha:]][_$[:alnum:]]*", + "captures": { + "0": { + "name": "entity.name.type.class.tsx" + } + } + }, + { + "include": "#type-parameters" + }, + { + "include": "#class-or-interface-body" + } + ] + }, + "interface-declaration": { + "name": "meta.interface.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])", + "beginCaptures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "storage.modifier.tsx" + }, + "4": { + "name": "storage.type.interface.tsx" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#class-or-interface-heritage" + }, + { + "match": "[_$[:alpha:]][_$[:alnum:]]*", + "captures": { + "0": { + "name": "entity.name.type.interface.tsx" + } + } + }, + { + "include": "#type-parameters" + }, + { + "include": "#class-or-interface-body" + } + ] + }, + "class-or-interface-heritage": { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(extends|implements)\\b)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "1": { + "name": "storage.modifier.tsx" + } + }, + "end": "(?=\\{)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#class-or-interface-heritage" + }, + { + "include": "#type-parameters" + }, + { + "include": "#expressionWithoutIdentifiers" + }, + { + "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\??\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*)", + "captures": { + "1": { + "name": "entity.name.type.module.tsx" + }, + "2": { + "name": "punctuation.accessor.tsx" + }, + "3": { + "name": "punctuation.accessor.optional.tsx" + } + } + }, + { + "match": "([_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "entity.other.inherited-class.tsx" + } + } + }, + { + "include": "#expressionPunctuations" + } + ] + }, + "class-or-interface-body": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.tsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.tsx" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#decorator" + }, + { + "begin": "(?<=:)\\s*", + "end": "(?=\\s|[;),}\\]:\\-\\+]|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "include": "#method-declaration" + }, + { + "include": "#indexer-declaration" + }, + { + "include": "#field-declaration" + }, + { + "include": "#string" + }, + { + "include": "#type-annotation" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#access-modifier" + }, + { + "include": "#property-accessor" + }, + { + "include": "#async-modifier" + }, + { + "include": "#after-operator-block-as-object-literal" + }, + { + "include": "#decl-block" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "access-modifier": { + "name": "storage.modifier.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|declare|override|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + "property-accessor": { + "name": "storage.type.property.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(accessor|get|set)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + "async-modifier": { + "name": "storage.modifier.async.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(async)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + "enum-declaration": { + "name": "meta.enum.declaration.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)", + "beginCaptures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "storage.modifier.tsx" + }, + "4": { + "name": "storage.type.enum.tsx" + }, + "5": { + "name": "entity.name.type.enum.tsx" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.tsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.tsx" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "([_$[:alpha:]][_$[:alnum:]]*)", + "beginCaptures": { + "0": { + "name": "variable.other.enummember.tsx" + } + }, + "end": "(?=,|\\}|$)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + } + ] + }, + { + "begin": "(?=((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))", + "end": "(?=,|\\}|$)", + "patterns": [ + { + "include": "#string" + }, + { + "include": "#array-literal" + }, + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + } + ] + }, + { + "include": "#punctuation-comma" + } + ] + } + ] + }, + "namespace-declaration": { + "name": "meta.namespace.declaration.tsx", + "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`]))", + "beginCaptures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "storage.type.namespace.tsx" + } + }, + "end": "(?<=\\})|(?=;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "name": "entity.name.type.module.tsx", + "match": "([_$[:alpha:]][_$[:alnum:]]*)" + }, + { + "include": "#punctuation-accessor" + }, + { + "include": "#decl-block" + } + ] + }, + "type-alias-declaration": { + "name": "meta.type.declaration.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "storage.type.type.tsx" + }, + "4": { + "name": "entity.name.type.alias.tsx" + } + }, + "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-parameters" + }, + { + "begin": "(=)\\s*(intrinsic)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.tsx" + }, + "2": { + "name": "keyword.control.intrinsic.tsx" + } + }, + "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "begin": "(=)\\s*", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.tsx" + } + }, + "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#type" + } + ] + } + ] + }, + "import-equals-declaration": { + "patterns": [ + { + "name": "meta.import-equals.external.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "keyword.control.import.tsx" + }, + "4": { + "name": "keyword.control.type.tsx" + }, + "5": { + "name": "variable.other.readwrite.alias.tsx" + }, + "6": { + "name": "keyword.operator.assignment.tsx" + }, + "7": { + "name": "keyword.control.require.tsx" + }, + "8": { + "name": "meta.brace.round.tsx" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.tsx" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + } + ] + }, + { + "name": "meta.import-equals.internal.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)", + "beginCaptures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "keyword.control.import.tsx" + }, + "4": { + "name": "keyword.control.type.tsx" + }, + "5": { + "name": "variable.other.readwrite.alias.tsx" + }, + "6": { + "name": "keyword.operator.assignment.tsx" + } + }, + "end": "(?=;|$|^)", + "patterns": [ + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#comment" + }, + { + "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", + "captures": { + "1": { + "name": "entity.name.type.module.tsx" + }, + "2": { + "name": "punctuation.accessor.tsx" + }, + "3": { + "name": "punctuation.accessor.optional.tsx" + } + } + }, + { + "name": "variable.other.readwrite.tsx", + "match": "([_$[:alpha:]][_$[:alnum:]]*)" + } + ] + } + ] + }, + "import-declaration": { + "name": "meta.import.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type)(?!\\s+from))?(?!\\s*[:\\(])(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + }, + "3": { + "name": "keyword.control.import.tsx" + }, + "4": { + "name": "keyword.control.type.tsx" + } + }, + "end": "(?<!^import|[^\\._$[:alnum:]]import)(?=;|$|^)", + "patterns": [ + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "begin": "(?<=^import|[^\\._$[:alnum:]]import)(?!\\s*[\"'])", + "end": "\\bfrom\\b", + "endCaptures": { + "0": { + "name": "keyword.control.from.tsx" + } + }, + "patterns": [ + { + "include": "#import-export-declaration" + } + ] + }, + { + "include": "#import-export-declaration" + } + ] + }, + "export-declaration": { + "patterns": [ + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "keyword.control.as.tsx" + }, + "3": { + "name": "storage.type.namespace.tsx" + }, + "4": { + "name": "entity.name.type.module.tsx" + } + } + }, + { + "name": "meta.export.default.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))", + "beginCaptures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "keyword.control.type.tsx" + }, + "3": { + "name": "keyword.operator.assignment.tsx" + }, + "4": { + "name": "keyword.control.default.tsx" + } + }, + "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#interface-declaration" + }, + { + "include": "#expression" + } + ] + }, + { + "name": "meta.export.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?\\b(?!(\\$)|(\\s*:))((?=\\s*[\\{*])|((?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s|,))(?!\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", + "beginCaptures": { + "1": { + "name": "keyword.control.export.tsx" + }, + "2": { + "name": "keyword.control.type.tsx" + } + }, + "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#import-export-declaration" + } + ] + } + ] + }, + "import-export-declaration": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "include": "#import-export-block" + }, + { + "name": "keyword.control.from.tsx", + "match": "\\bfrom\\b" + }, + { + "include": "#import-export-assert-clause" + }, + { + "include": "#import-export-clause" + } + ] + }, + "import-export-assert-clause": { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(assert)\\s*(\\{)", + "beginCaptures": { + "1": { + "name": "keyword.control.assert.tsx" + }, + "2": { + "name": "punctuation.definition.block.tsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.tsx" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "name": "meta.object-literal.key.tsx", + "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)" + }, + { + "name": "punctuation.separator.key-value.tsx", + "match": ":" + } + ] + }, + "import-export-block": { + "name": "meta.block.tsx", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.tsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.tsx" + } + }, + "patterns": [ + { + "include": "#import-export-clause" + } + ] + }, + "import-export-clause": { + "patterns": [ + { + "include": "#comment" + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*))", + "captures": { + "1": { + "name": "keyword.control.type.tsx" + }, + "2": { + "name": "keyword.control.default.tsx" + }, + "3": { + "name": "constant.language.import-export-all.tsx" + }, + "4": { + "name": "variable.other.readwrite.tsx" + }, + "5": { + "name": "keyword.control.as.tsx" + }, + "6": { + "name": "keyword.control.default.tsx" + }, + "7": { + "name": "variable.other.readwrite.alias.tsx" + } + } + }, + { + "include": "#punctuation-comma" + }, + { + "name": "constant.language.import-export-all.tsx", + "match": "\\*" + }, + { + "name": "keyword.control.default.tsx", + "match": "\\b(default)\\b" + }, + { + "match": "(?:(\\btype)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "keyword.control.type.tsx" + }, + "2": { + "name": "variable.other.readwrite.alias.tsx" + } + } + } + ] + }, + "switch-statement": { + "name": "switch-statement.expr.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bswitch\\s*\\()", + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.tsx" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "name": "switch-expression.expr.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(switch)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.control.switch.tsx" + }, + "2": { + "name": "meta.brace.round.tsx" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.tsx" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "switch-block.expr.tsx", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.tsx" + } + }, + "end": "(?=\\})", + "patterns": [ + { + "name": "case-clause.expr.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default(?=:))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "1": { + "name": "keyword.control.switch.tsx" + } + }, + "end": "(?=:)", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "begin": "(:)\\s*(\\{)", + "beginCaptures": { + "1": { + "name": "case-clause.expr.tsx punctuation.definition.section.case-statement.tsx" + }, + "2": { + "name": "meta.block.tsx punctuation.definition.block.tsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "meta.block.tsx punctuation.definition.block.tsx" + } + }, + "contentName": "meta.block.tsx", + "patterns": [ + { + "include": "#statements" + } + ] + }, + { + "match": "(:)", + "captures": { + "0": { + "name": "case-clause.expr.tsx punctuation.definition.section.case-statement.tsx" + } + } + }, + { + "include": "#statements" + } + ] + } + ] + }, + "for-loop": { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))for(?=((\\s+|(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*))await)?\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)?(\\())", + "beginCaptures": { + "0": { + "name": "keyword.control.loop.tsx" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#comment" + }, + { + "name": "keyword.control.loop.tsx", + "match": "await" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.tsx" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.tsx" + } + }, + "patterns": [ + { + "include": "#var-expr" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-semicolon" + } + ] + } + ] + }, + "if-statement": { + "patterns": [ + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bif\\s*(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))\\s*(?!\\{))", + "end": "(?=;|$|\\})", + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(if)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.control.conditional.tsx" + }, + "2": { + "name": "meta.brace.round.tsx" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.tsx" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "string.regexp.tsx", + "begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.tsx" + } + }, + "end": "(/)([dgimsuy]*)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.tsx" + }, + "2": { + "name": "keyword.other.tsx" + } + }, + "patterns": [ + { + "include": "#regexp" + } + ] + }, + { + "include": "#statements" + } + ] + } + ] + }, + "decl-block": { + "name": "meta.block.tsx", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.tsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.tsx" + } + }, + "patterns": [ + { + "include": "#statements" + } + ] + }, + "after-operator-block-as-object-literal": { + "name": "meta.objectliteral.tsx", + "begin": "(?<!\\+\\+|--)(?<=[:=(,\\[?+!>]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.block.tsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.tsx" + } + }, + "patterns": [ + { + "include": "#object-member" + } + ] + }, + "object-literal": { + "name": "meta.objectliteral.tsx", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.tsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.tsx" + } + }, + "patterns": [ + { + "include": "#object-member" + } + ] + }, + "object-member": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#object-literal-method-declaration" + }, + { + "name": "meta.object.member.tsx meta.object-literal.key.tsx", + "begin": "(?=\\[)", + "end": "(?=:)|((?<=[\\]])(?=\\s*[\\(\\<]))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#array-literal" + } + ] + }, + { + "name": "meta.object.member.tsx meta.object-literal.key.tsx", + "begin": "(?=[\\'\\\"\\`])", + "end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\s+(as|satisifies)\\s+))))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + } + ] + }, + { + "name": "meta.object.member.tsx meta.object-literal.key.tsx", + "begin": "(?x)(?=(\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)))", + "end": "(?=:)|(?=\\s*([\\(\\<,}])|(\\s+as|satisifies\\s+))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#numeric-literal" + } + ] + }, + { + "name": "meta.method.declaration.tsx", + "begin": "(?<=[\\]\\'\\\"\\`])(?=\\s*[\\(\\<])", + "end": "(?=\\}|;|,)|(?<=\\})", + "patterns": [ + { + "include": "#function-body" + } + ] + }, + { + "name": "meta.object.member.tsx", + "match": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)", + "captures": { + "0": { + "name": "meta.object-literal.key.tsx" + }, + "1": { + "name": "constant.numeric.decimal.tsx" + } + } + }, + { + "name": "meta.object.member.tsx", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "0": { + "name": "meta.object-literal.key.tsx" + }, + "1": { + "name": "entity.name.function.tsx" + } + } + }, + { + "name": "meta.object.member.tsx", + "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)", + "captures": { + "0": { + "name": "meta.object-literal.key.tsx" + } + } + }, + { + "name": "meta.object.member.tsx", + "begin": "\\.\\.\\.", + "beginCaptures": { + "0": { + "name": "keyword.operator.spread.tsx" + } + }, + "end": "(?=,|\\})", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "meta.object.member.tsx", + "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$|\\/\\/|\\/\\*)", + "captures": { + "1": { + "name": "variable.other.readwrite.tsx" + } + } + }, + { + "name": "meta.object.member.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))", + "captures": { + "1": { + "name": "keyword.control.as.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + } + } + }, + { + "name": "meta.object.member.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+", + "beginCaptures": { + "1": { + "name": "keyword.control.as.tsx" + }, + "2": { + "name": "keyword.control.satisfies.tsx" + } + }, + "end": "(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|^|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisifies)\\s+))", + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "name": "meta.object.member.tsx", + "begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)", + "end": "(?=,|\\}|$|\\/\\/|\\/\\*)", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "meta.object.member.tsx", + "begin": ":", + "beginCaptures": { + "0": { + "name": "meta.object-literal.key.tsx punctuation.separator.key-value.tsx" + } + }, + "end": "(?=,|\\})", + "patterns": [ + { + "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.tsx" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#type-parameters" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.tsx" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.tsx" + } + }, + "patterns": [ + { + "include": "#expression-inside-possibly-arrow-parens" + } + ] + } + ] + }, + { + "begin": "(?<=:)\\s*(async)?\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.tsx" + }, + "2": { + "name": "meta.brace.round.tsx" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.tsx" + } + }, + "patterns": [ + { + "include": "#expression-inside-possibly-arrow-parens" + } + ] + }, + { + "begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.tsx" + } + }, + "end": "(?<=\\>)", + "patterns": [ + { + "include": "#type-parameters" + } + ] + }, + { + "begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", + "beginCaptures": { + "1": { + "name": "meta.brace.round.tsx" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.tsx" + } + }, + "patterns": [ + { + "include": "#expression-inside-possibly-arrow-parens" + } + ] + }, + { + "include": "#possibly-arrow-return-type" + }, + { + "include": "#expression" + } + ] + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#decl-block" + } + ] + }, + "ternary-expression": { + "begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)(?!\\?)", + "beginCaptures": { + "1": { + "name": "keyword.operator.ternary.tsx" + } + }, + "end": "\\s*(:)", + "endCaptures": { + "1": { + "name": "keyword.operator.ternary.tsx" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "function-call": { + "patterns": [ + { + "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())", + "end": "(?<=\\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())", + "patterns": [ + { + "name": "meta.function-call.tsx", + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))", + "end": "(?=\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())", + "patterns": [ + { + "include": "#function-call-target" + } + ] + }, + { + "include": "#comment" + }, + { + "include": "#function-call-optionals" + }, + { + "include": "#type-arguments" + }, + { + "include": "#paren-expression" + } + ] + }, + { + "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))", + "end": "(?<=\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))", + "patterns": [ + { + "name": "meta.function-call.tsx", + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))", + "end": "(?=(<\\s*[\\{\\[\\(]\\s*$))", + "patterns": [ + { + "include": "#function-call-target" + } + ] + }, + { + "include": "#comment" + }, + { + "include": "#function-call-optionals" + }, + { + "include": "#type-arguments" + } + ] + } + ] + }, + "function-call-target": { + "patterns": [ + { + "include": "#support-function-call-identifiers" + }, + { + "name": "entity.name.function.tsx", + "match": "(\\#?[_$[:alpha:]][_$[:alnum:]]*)" + } + ] + }, + "function-call-optionals": { + "patterns": [ + { + "name": "meta.function-call.tsx punctuation.accessor.optional.tsx", + "match": "\\?\\." + }, + { + "name": "meta.function-call.tsx keyword.operator.definiteassignment.tsx", + "match": "\\!" + } + ] + }, + "support-function-call-identifiers": { + "patterns": [ + { + "include": "#literal" + }, + { + "include": "#support-objects" + }, + { + "include": "#object-identifiers" + }, + { + "include": "#punctuation-accessor" + }, + { + "name": "keyword.operator.expression.import.tsx", + "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*[\\(]\\s*[\\\"\\'\\`]))" + } + ] + }, + "new-expr": { + "name": "new.expr.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "1": { + "name": "keyword.operator.new.tsx" + } + }, + "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "instanceof-expr": { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(instanceof)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "1": { + "name": "keyword.operator.expression.instanceof.tsx" + } + }, + "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|(===|!==|==|!=)|(([\\&\\~\\^\\|]\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s+instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))", + "patterns": [ + { + "include": "#type" + } + ] + }, + "paren-expression-possibly-arrow": { + "patterns": [ + { + "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.tsx" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#paren-expression-possibly-arrow-with-typeparameters" + } + ] + }, + { + "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\()|(<)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)))\\s*$)", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.tsx" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#paren-expression-possibly-arrow-with-typeparameters" + } + ] + }, + { + "include": "#possibly-arrow-return-type" + } + ] + }, + "paren-expression-possibly-arrow-with-typeparameters": { + "patterns": [ + { + "include": "#type-parameters" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.tsx" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.tsx" + } + }, + "patterns": [ + { + "include": "#expression-inside-possibly-arrow-parens" + } + ] + } + ] + }, + "expression-inside-possibly-arrow-parens": { + "patterns": [ + { + "include": "#expressionWithoutIdentifiers" + }, + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "include": "#decorator" + }, + { + "include": "#destructuring-parameter" + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)", + "captures": { + "1": { + "name": "storage.modifier.tsx" + } + } + }, + { + "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "1": { + "name": "storage.modifier.tsx" + }, + "2": { + "name": "keyword.operator.rest.tsx" + }, + "3": { + "name": "entity.name.function.tsx variable.language.this.tsx" + }, + "4": { + "name": "entity.name.function.tsx" + }, + "5": { + "name": "keyword.operator.optional.tsx" + } + } + }, + { + "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*[:,]|$)", + "captures": { + "1": { + "name": "storage.modifier.tsx" + }, + "2": { + "name": "keyword.operator.rest.tsx" + }, + "3": { + "name": "variable.parameter.tsx variable.language.this.tsx" + }, + "4": { + "name": "variable.parameter.tsx" + }, + "5": { + "name": "keyword.operator.optional.tsx" + } + } + }, + { + "include": "#type-annotation" + }, + { + "include": "#variable-initializer" + }, + { + "name": "punctuation.separator.parameter.tsx", + "match": "," + }, + { + "include": "#identifiers" + }, + { + "include": "#expressionPunctuations" + } + ] + }, + "paren-expression": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.tsx" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.tsx" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "cast": { + "patterns": [ + { + "include": "#jsx" + } + ] + }, + "expression-operators": { + "patterns": [ + { + "name": "keyword.control.flow.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(await)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?=\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*\\*)", + "beginCaptures": { + "1": { + "name": "keyword.control.flow.tsx" + } + }, + "end": "\\*", + "endCaptures": { + "0": { + "name": "keyword.generator.asterisk.tsx" + } + }, + "patterns": [ + { + "include": "#comment" + } + ] + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s*(\\*))?", + "captures": { + "1": { + "name": "keyword.control.flow.tsx" + }, + "2": { + "name": "keyword.generator.asterisk.tsx" + } + } + }, + { + "name": "keyword.operator.expression.delete.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))delete(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.operator.expression.in.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))in(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()" + }, + { + "name": "keyword.operator.expression.of.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))of(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()" + }, + { + "name": "keyword.operator.expression.instanceof.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.operator.new.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "include": "#typeof-operator" + }, + { + "name": "keyword.operator.expression.void.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[;,:})\\]]))", + "captures": { + "1": { + "name": "keyword.control.as.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + } + } + }, + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+", + "beginCaptures": { + "1": { + "name": "keyword.control.as.tsx" + }, + "2": { + "name": "keyword.control.satisfies.tsx" + } + }, + "end": "(?=^|[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisfies)\\s+)|(\\s+\\<))", + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "name": "keyword.operator.spread.tsx", + "match": "\\.\\.\\." + }, + { + "name": "keyword.operator.assignment.compound.tsx", + "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-=" + }, + { + "name": "keyword.operator.assignment.compound.bitwise.tsx", + "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|=" + }, + { + "name": "keyword.operator.bitwise.shift.tsx", + "match": "<<|>>>|>>" + }, + { + "name": "keyword.operator.comparison.tsx", + "match": "===|!==|==|!=" + }, + { + "name": "keyword.operator.relational.tsx", + "match": "<=|>=|<>|<|>" + }, + { + "match": "(?<=[_$[:alnum:]])(\\!)\\s*(?:(/=)|(?:(/)(?![/*])))", + "captures": { + "1": { + "name": "keyword.operator.logical.tsx" + }, + "2": { + "name": "keyword.operator.assignment.compound.tsx" + }, + "3": { + "name": "keyword.operator.arithmetic.tsx" + } + } + }, + { + "name": "keyword.operator.logical.tsx", + "match": "\\!|&&|\\|\\||\\?\\?" + }, + { + "name": "keyword.operator.bitwise.tsx", + "match": "\\&|~|\\^|\\|" + }, + { + "name": "keyword.operator.assignment.tsx", + "match": "\\=" + }, + { + "name": "keyword.operator.decrement.tsx", + "match": "--" + }, + { + "name": "keyword.operator.increment.tsx", + "match": "\\+\\+" + }, + { + "name": "keyword.operator.arithmetic.tsx", + "match": "%|\\*|/|-|\\+" + }, + { + "begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(?:(/=)|(?:(/)(?![/*]))))", + "end": "(?:(/=)|(?:(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)))", + "endCaptures": { + "1": { + "name": "keyword.operator.assignment.compound.tsx" + }, + "2": { + "name": "keyword.operator.arithmetic.tsx" + } + }, + "patterns": [ + { + "include": "#comment" + } + ] + }, + { + "match": "(?<=[_$[:alnum:])\\]])\\s*(?:(/=)|(?:(/)(?![/*])))", + "captures": { + "1": { + "name": "keyword.operator.assignment.compound.tsx" + }, + "2": { + "name": "keyword.operator.arithmetic.tsx" + } + } + } + ] + }, + "typeof-operator": { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))typeof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "0": { + "name": "keyword.operator.expression.typeof.tsx" + } + }, + "end": "(?=[,);}\\]=>:&|{\\?]|(extends\\s+)|$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#type-arguments" + }, + { + "include": "#expression" + } + ] + }, + "literal": { + "patterns": [ + { + "include": "#numeric-literal" + }, + { + "include": "#boolean-literal" + }, + { + "include": "#null-literal" + }, + { + "include": "#undefined-literal" + }, + { + "include": "#numericConstant-literal" + }, + { + "include": "#array-literal" + }, + { + "include": "#this-literal" + }, + { + "include": "#super-literal" + } + ] + }, + "array-literal": { + "name": "meta.array.literal.tsx", + "begin": "\\s*(\\[)", + "beginCaptures": { + "1": { + "name": "meta.brace.square.tsx" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "meta.brace.square.tsx" + } + }, + "patterns": [ + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "numeric-literal": { + "patterns": [ + { + "name": "constant.numeric.hex.tsx", + "match": "\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$)", + "captures": { + "1": { + "name": "storage.type.numeric.bigint.tsx" + } + } + }, + { + "name": "constant.numeric.binary.tsx", + "match": "\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$)", + "captures": { + "1": { + "name": "storage.type.numeric.bigint.tsx" + } + } + }, + { + "name": "constant.numeric.octal.tsx", + "match": "\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$)", + "captures": { + "1": { + "name": "storage.type.numeric.bigint.tsx" + } + } + }, + { + "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)", + "captures": { + "0": { + "name": "constant.numeric.decimal.tsx" + }, + "1": { + "name": "meta.delimiter.decimal.period.tsx" + }, + "2": { + "name": "storage.type.numeric.bigint.tsx" + }, + "3": { + "name": "meta.delimiter.decimal.period.tsx" + }, + "4": { + "name": "storage.type.numeric.bigint.tsx" + }, + "5": { + "name": "meta.delimiter.decimal.period.tsx" + }, + "6": { + "name": "storage.type.numeric.bigint.tsx" + }, + "7": { + "name": "storage.type.numeric.bigint.tsx" + }, + "8": { + "name": "meta.delimiter.decimal.period.tsx" + }, + "9": { + "name": "storage.type.numeric.bigint.tsx" + }, + "10": { + "name": "meta.delimiter.decimal.period.tsx" + }, + "11": { + "name": "storage.type.numeric.bigint.tsx" + }, + "12": { + "name": "meta.delimiter.decimal.period.tsx" + }, + "13": { + "name": "storage.type.numeric.bigint.tsx" + }, + "14": { + "name": "storage.type.numeric.bigint.tsx" + } + } + } + ] + }, + "boolean-literal": { + "patterns": [ + { + "name": "constant.language.boolean.true.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))true(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "constant.language.boolean.false.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))false(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + } + ] + }, + "null-literal": { + "name": "constant.language.null.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))null(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + "this-literal": { + "name": "variable.language.this.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))this\\b(?!\\$)" + }, + "super-literal": { + "name": "variable.language.super.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))super\\b(?!\\$)" + }, + "undefined-literal": { + "name": "constant.language.undefined.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))undefined(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + "numericConstant-literal": { + "patterns": [ + { + "name": "constant.language.nan.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))NaN(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "constant.language.infinity.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Infinity(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + } + ] + }, + "support-objects": { + "patterns": [ + { + "name": "variable.language.arguments.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)" + }, + { + "name": "support.class.promise.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Promise)\\b(?!\\$)" + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(meta)\\b(?!\\$)", + "captures": { + "1": { + "name": "keyword.control.import.tsx" + }, + "2": { + "name": "punctuation.accessor.tsx" + }, + "3": { + "name": "punctuation.accessor.optional.tsx" + }, + "4": { + "name": "support.variable.property.importmeta.tsx" + } + } + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(target)\\b(?!\\$)", + "captures": { + "1": { + "name": "keyword.operator.new.tsx" + }, + "2": { + "name": "punctuation.accessor.tsx" + }, + "3": { + "name": "punctuation.accessor.optional.tsx" + }, + "4": { + "name": "support.variable.property.target.tsx" + } + } + }, + { + "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))", + "captures": { + "1": { + "name": "punctuation.accessor.tsx" + }, + "2": { + "name": "punctuation.accessor.optional.tsx" + }, + "3": { + "name": "support.variable.property.tsx" + }, + "4": { + "name": "support.constant.tsx" + } + } + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(exports)|(module)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)", + "captures": { + "1": { + "name": "support.type.object.module.tsx" + }, + "2": { + "name": "support.type.object.module.tsx" + }, + "3": { + "name": "punctuation.accessor.tsx" + }, + "4": { + "name": "punctuation.accessor.optional.tsx" + }, + "5": { + "name": "support.type.object.module.tsx" + } + } + } + ] + }, + "identifiers": { + "patterns": [ + { + "include": "#object-identifiers" + }, + { + "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "captures": { + "1": { + "name": "punctuation.accessor.tsx" + }, + "2": { + "name": "punctuation.accessor.optional.tsx" + }, + "3": { + "name": "entity.name.function.tsx" + } + } + }, + { + "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])", + "captures": { + "1": { + "name": "punctuation.accessor.tsx" + }, + "2": { + "name": "punctuation.accessor.optional.tsx" + }, + "3": { + "name": "variable.other.constant.property.tsx" + } + } + }, + { + "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "punctuation.accessor.tsx" + }, + "2": { + "name": "punctuation.accessor.optional.tsx" + }, + "3": { + "name": "variable.other.property.tsx" + } + } + }, + { + "name": "variable.other.constant.tsx", + "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])" + }, + { + "name": "variable.other.readwrite.tsx", + "match": "[_$[:alpha:]][_$[:alnum:]]*" + } + ] + }, + "object-identifiers": { + "patterns": [ + { + "name": "support.class.tsx", + "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))" + }, + { + "match": "(?x)(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n (\\#?[[:upper:]][_$[:digit:][:upper:]]*) |\n (\\#?[_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "punctuation.accessor.tsx" + }, + "2": { + "name": "punctuation.accessor.optional.tsx" + }, + "3": { + "name": "variable.other.constant.object.property.tsx" + }, + "4": { + "name": "variable.other.object.property.tsx" + } + } + }, + { + "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "variable.other.constant.object.tsx" + }, + "2": { + "name": "variable.other.object.tsx" + } + } + } + ] + }, + "type-annotation": { + "patterns": [ + { + "name": "meta.type.annotation.tsx", + "begin": "(:)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.tsx" + } + }, + "end": "(?<![:|&])(?!\\s*[|&]\\s+)((?=^|[,);\\}\\]]|//)|(?==[^>])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "name": "meta.type.annotation.tsx", + "begin": "(:)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.tsx" + } + }, + "end": "(?<![:|&])((?=[,);\\}\\]]|\\/\\/)|(?==[^>])|(?=^\\s*$)|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", + "patterns": [ + { + "include": "#type" + } + ] + } + ] + }, + "parameter-type-annotation": { + "patterns": [ + { + "name": "meta.type.annotation.tsx", + "begin": "(:)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.tsx" + } + }, + "end": "(?=[,)])|(?==[^>])", + "patterns": [ + { + "include": "#type" + } + ] + } + ] + }, + "return-type": { + "patterns": [ + { + "name": "meta.return.type.tsx", + "begin": "(?<=\\))\\s*(:)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.tsx" + } + }, + "end": "(?<![:|&])(?=$|^|[{};,]|//)", + "patterns": [ + { + "include": "#return-type-core" + } + ] + }, + { + "name": "meta.return.type.tsx", + "begin": "(?<=\\))\\s*(:)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.tsx" + } + }, + "end": "(?<![:|&])((?=[{};,]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))", + "patterns": [ + { + "include": "#return-type-core" + } + ] + } + ] + }, + "return-type-core": { + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?<=[:|&])(?=\\s*\\{)", + "end": "(?<=\\})", + "patterns": [ + { + "include": "#type-object" + } + ] + }, + { + "include": "#type-predicate-operator" + }, + { + "include": "#type" + } + ] + }, + "arrow-return-type": { + "name": "meta.return.type.arrow.tsx", + "begin": "(?<=\\))\\s*(:)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.tsx" + } + }, + "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))", + "patterns": [ + { + "include": "#arrow-return-type-body" + } + ] + }, + "possibly-arrow-return-type": { + "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)", + "beginCaptures": { + "1": { + "name": "meta.arrow.tsx meta.return.type.arrow.tsx keyword.operator.type.annotation.tsx" + } + }, + "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))", + "contentName": "meta.arrow.tsx meta.return.type.arrow.tsx", + "patterns": [ + { + "include": "#arrow-return-type-body" + } + ] + }, + "arrow-return-type-body": { + "patterns": [ + { + "begin": "(?<=[:])(?=\\s*\\{)", + "end": "(?<=\\})", + "patterns": [ + { + "include": "#type-object" + } + ] + }, + { + "include": "#type-predicate-operator" + }, + { + "include": "#type" + } + ] + }, + "type-parameters": { + "name": "meta.type.parameters.tsx", + "begin": "(<)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.typeparameters.begin.tsx" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.typeparameters.end.tsx" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "name": "storage.modifier.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out|const)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "include": "#type" + }, + { + "include": "#punctuation-comma" + }, + { + "name": "keyword.operator.assignment.tsx", + "match": "(=)(?!>)" + } + ] + }, + "type-arguments": { + "name": "meta.type.parameters.tsx", + "begin": "\\<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.begin.tsx" + } + }, + "end": "\\>", + "endCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.end.tsx" + } + }, + "patterns": [ + { + "include": "#type-arguments-body" + } + ] + }, + "type-arguments-body": { + "patterns": [ + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(_)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "captures": { + "0": { + "name": "keyword.operator.type.tsx" + } + } + }, + { + "include": "#type" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "type": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-string" + }, + { + "include": "#numeric-literal" + }, + { + "include": "#type-primitive" + }, + { + "include": "#type-builtin-literals" + }, + { + "include": "#type-parameters" + }, + { + "include": "#type-tuple" + }, + { + "include": "#type-object" + }, + { + "include": "#type-operators" + }, + { + "include": "#type-conditional" + }, + { + "include": "#type-fn-type-parameters" + }, + { + "include": "#type-paren-or-function-parameters" + }, + { + "include": "#type-function-return-type" + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*", + "captures": { + "1": { + "name": "storage.modifier.tsx" + } + } + }, + { + "include": "#type-name" + } + ] + }, + "type-primitive": { + "name": "support.type.primitive.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + "type-builtin-literals": { + "name": "support.type.builtin.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + "type-tuple": { + "name": "meta.type.tuple.tsx", + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "meta.brace.square.tsx" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "meta.brace.square.tsx" + } + }, + "patterns": [ + { + "name": "keyword.operator.rest.tsx", + "match": "\\.\\.\\." + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?)?\\s*(:)", + "captures": { + "1": { + "name": "entity.name.label.tsx" + }, + "2": { + "name": "keyword.operator.optional.tsx" + }, + "3": { + "name": "punctuation.separator.label.tsx" + } + } + }, + { + "include": "#type" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "type-object": { + "name": "meta.object.type.tsx", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.tsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.tsx" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#method-declaration" + }, + { + "include": "#indexer-declaration" + }, + { + "include": "#indexer-mapped-type-declaration" + }, + { + "include": "#field-declaration" + }, + { + "include": "#type-annotation" + }, + { + "begin": "\\.\\.\\.", + "beginCaptures": { + "0": { + "name": "keyword.operator.spread.tsx" + } + }, + "end": "(?=\\}|;|,|$)|(?<=\\})", + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#punctuation-semicolon" + }, + { + "include": "#type" + } + ] + }, + "type-conditional": { + "patterns": [ + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)\\s+", + "beginCaptures": { + "1": { + "name": "storage.modifier.tsx" + } + }, + "end": "(?<=:)", + "patterns": [ + { + "begin": "\\?", + "beginCaptures": { + "0": { + "name": "keyword.operator.ternary.tsx" + } + }, + "end": ":", + "endCaptures": { + "0": { + "name": "keyword.operator.ternary.tsx" + } + }, + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "include": "#type" + } + ] + } + ] + }, + "type-paren-or-function-parameters": { + "name": "meta.type.paren.cover.tsx", + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.tsx" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.tsx" + } + }, + "patterns": [ + { + "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=\\s*(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))))", + "captures": { + "1": { + "name": "storage.modifier.tsx" + }, + "2": { + "name": "keyword.operator.rest.tsx" + }, + "3": { + "name": "entity.name.function.tsx variable.language.this.tsx" + }, + "4": { + "name": "entity.name.function.tsx" + }, + "5": { + "name": "keyword.operator.optional.tsx" + } + } + }, + { + "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=:)", + "captures": { + "1": { + "name": "storage.modifier.tsx" + }, + "2": { + "name": "keyword.operator.rest.tsx" + }, + "3": { + "name": "variable.parameter.tsx variable.language.this.tsx" + }, + "4": { + "name": "variable.parameter.tsx" + }, + "5": { + "name": "keyword.operator.optional.tsx" + } + } + }, + { + "include": "#type-annotation" + }, + { + "name": "punctuation.separator.parameter.tsx", + "match": "," + }, + { + "include": "#type" + } + ] + }, + "type-fn-type-parameters": { + "patterns": [ + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b(?=\\s*\\<)", + "beginCaptures": { + "1": { + "name": "meta.type.constructor.tsx storage.modifier.tsx" + }, + "2": { + "name": "meta.type.constructor.tsx keyword.control.new.tsx" + } + }, + "end": "(?<=>)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-parameters" + } + ] + }, + { + "name": "meta.type.constructor.tsx", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "name": "storage.modifier.tsx" + }, + "2": { + "name": "keyword.control.new.tsx" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#function-parameters" + } + ] + }, + { + "name": "meta.type.function.tsx", + "begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)", + "end": "(?<=\\))", + "patterns": [ + { + "include": "#function-parameters" + } + ] + } + ] + }, + "type-function-return-type": { + "patterns": [ + { + "name": "meta.type.function.return.tsx", + "begin": "(=>)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "storage.type.function.arrow.tsx" + } + }, + "end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>:\\?]|//|$)", + "patterns": [ + { + "include": "#type-function-return-type-core" + } + ] + }, + { + "name": "meta.type.function.return.tsx", + "begin": "=>", + "beginCaptures": { + "0": { + "name": "storage.type.function.arrow.tsx" + } + }, + "end": "(?<!=>)(?<![|&])((?=[,\\]\\)\\{\\}=;:\\?>]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))", + "patterns": [ + { + "include": "#type-function-return-type-core" + } + ] + } + ] + }, + "type-function-return-type-core": { + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?<==>)(?=\\s*\\{)", + "end": "(?<=\\})", + "patterns": [ + { + "include": "#type-object" + } + ] + }, + { + "include": "#type-predicate-operator" + }, + { + "include": "#type" + } + ] + }, + "type-operators": { + "patterns": [ + { + "include": "#typeof-operator" + }, + { + "include": "#type-infer" + }, + { + "begin": "([&|])(?=\\s*\\{)", + "beginCaptures": { + "0": { + "name": "keyword.operator.type.tsx" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#type-object" + } + ] + }, + { + "begin": "[&|]", + "beginCaptures": { + "0": { + "name": "keyword.operator.type.tsx" + } + }, + "end": "(?=\\S)" + }, + { + "name": "keyword.operator.expression.keyof.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.operator.ternary.tsx", + "match": "(\\?|\\:)" + }, + { + "name": "keyword.operator.expression.import.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\()" + } + ] + }, + "type-infer": { + "patterns": [ + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(infer)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s+(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))?", + "name": "meta.type.infer.tsx", + "captures": { + "1": { + "name": "keyword.operator.expression.infer.tsx" + }, + "2": { + "name": "entity.name.type.tsx" + }, + "3": { + "name": "keyword.operator.expression.extends.tsx" + } + } + } + ] + }, + "type-predicate-operator": { + "patterns": [ + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(asserts)\\s+)?(?!asserts)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s(is)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "captures": { + "1": { + "name": "keyword.operator.type.asserts.tsx" + }, + "2": { + "name": "variable.parameter.tsx variable.language.this.tsx" + }, + "3": { + "name": "variable.parameter.tsx" + }, + "4": { + "name": "keyword.operator.expression.is.tsx" + } + } + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(asserts)\\s+(?!is)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "captures": { + "1": { + "name": "keyword.operator.type.asserts.tsx" + }, + "2": { + "name": "variable.parameter.tsx variable.language.this.tsx" + }, + "3": { + "name": "variable.parameter.tsx" + } + } + }, + { + "name": "keyword.operator.type.asserts.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))asserts(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.operator.expression.is.tsx", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))is(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + } + ] + }, + "type-name": { + "patterns": [ + { + "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(<)", + "captures": { + "1": { + "name": "entity.name.type.module.tsx" + }, + "2": { + "name": "punctuation.accessor.tsx" + }, + "3": { + "name": "punctuation.accessor.optional.tsx" + }, + "4": { + "name": "meta.type.parameters.tsx punctuation.definition.typeparameters.begin.tsx" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "meta.type.parameters.tsx punctuation.definition.typeparameters.end.tsx" + } + }, + "contentName": "meta.type.parameters.tsx", + "patterns": [ + { + "include": "#type-arguments-body" + } + ] + }, + { + "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(<)", + "beginCaptures": { + "1": { + "name": "entity.name.type.tsx" + }, + "2": { + "name": "meta.type.parameters.tsx punctuation.definition.typeparameters.begin.tsx" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "meta.type.parameters.tsx punctuation.definition.typeparameters.end.tsx" + } + }, + "contentName": "meta.type.parameters.tsx", + "patterns": [ + { + "include": "#type-arguments-body" + } + ] + }, + { + "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", + "captures": { + "1": { + "name": "entity.name.type.module.tsx" + }, + "2": { + "name": "punctuation.accessor.tsx" + }, + "3": { + "name": "punctuation.accessor.optional.tsx" + } + } + }, + { + "name": "entity.name.type.tsx", + "match": "[_$[:alpha:]][_$[:alnum:]]*" + } + ] + }, + "punctuation-comma": { + "name": "punctuation.separator.comma.tsx", + "match": "," + }, + "punctuation-semicolon": { + "name": "punctuation.terminator.statement.tsx", + "match": ";" + }, + "punctuation-accessor": { + "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", + "captures": { + "1": { + "name": "punctuation.accessor.tsx" + }, + "2": { + "name": "punctuation.accessor.optional.tsx" + } + } + }, + "string": { + "patterns": [ + { + "include": "#qstring-single" + }, + { + "include": "#qstring-double" + }, + { + "include": "#template" + } + ] + }, + "qstring-double": { + "name": "string.quoted.double.tsx", + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.tsx" + } + }, + "end": "(\")|((?:[^\\\\\\n])$)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.tsx" + }, + "2": { + "name": "invalid.illegal.newline.tsx" + } + }, + "patterns": [ + { + "include": "#string-character-escape" + } + ] + }, + "qstring-single": { + "name": "string.quoted.single.tsx", + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.tsx" + } + }, + "end": "(\\')|((?:[^\\\\\\n])$)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.tsx" + }, + "2": { + "name": "invalid.illegal.newline.tsx" + } + }, + "patterns": [ + { + "include": "#string-character-escape" + } + ] + }, + "string-character-escape": { + "name": "constant.character.escape.tsx", + "match": "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\\{[0-9A-Fa-f]+\\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)" + }, + "template": { + "patterns": [ + { + "include": "#template-call" + }, + { + "contentName": "string.template.tsx", + "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)", + "beginCaptures": { + "1": { + "name": "entity.name.function.tagged-template.tsx" + }, + "2": { + "name": "string.template.tsx punctuation.definition.string.template.begin.tsx" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "string.template.tsx punctuation.definition.string.template.end.tsx" + } + }, + "patterns": [ + { + "include": "#template-substitution-element" + }, + { + "include": "#string-character-escape" + } + ] + } + ] + }, + "template-call": { + "patterns": [ + { + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?`)", + "end": "(?=`)", + "patterns": [ + { + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))", + "end": "(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?`)", + "patterns": [ + { + "include": "#support-function-call-identifiers" + }, + { + "name": "entity.name.function.tagged-template.tsx", + "match": "([_$[:alpha:]][_$[:alnum:]]*)" + } + ] + }, + { + "include": "#type-arguments" + } + ] + }, + { + "begin": "([_$[:alpha:]][_$[:alnum:]]*)?\\s*(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)`)", + "beginCaptures": { + "1": { + "name": "entity.name.function.tagged-template.tsx" + } + }, + "end": "(?=`)", + "patterns": [ + { + "include": "#type-arguments" + } + ] + } + ] + }, + "template-substitution-element": { + "name": "meta.template.expression.tsx", + "begin": "\\$\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.template-expression.begin.tsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.template-expression.end.tsx" + } + }, + "patterns": [ + { + "include": "#expression" + } + ], + "contentName": "meta.embedded.line.tsx" + }, + "type-string": { + "patterns": [ + { + "include": "#qstring-single" + }, + { + "include": "#qstring-double" + }, + { + "include": "#template-type" + } + ] + }, + "template-type": { + "patterns": [ + { + "include": "#template-call" + }, + { + "contentName": "string.template.tsx", + "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)", + "beginCaptures": { + "1": { + "name": "entity.name.function.tagged-template.tsx" + }, + "2": { + "name": "string.template.tsx punctuation.definition.string.template.begin.tsx" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "string.template.tsx punctuation.definition.string.template.end.tsx" + } + }, + "patterns": [ + { + "include": "#template-type-substitution-element" + }, + { + "include": "#string-character-escape" + } + ] + } + ] + }, + "template-type-substitution-element": { + "name": "meta.template.expression.tsx", + "begin": "\\$\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.template-expression.begin.tsx" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.template-expression.end.tsx" + } + }, + "patterns": [ + { + "include": "#type" + } + ], + "contentName": "meta.embedded.line.tsx" + }, + "regex": { + "patterns": [ + { + "name": "string.regexp.tsx", + "begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.tsx" + } + }, + "end": "(/)([dgimsuy]*)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.tsx" + }, + "2": { + "name": "keyword.other.tsx" + } + }, + "patterns": [ + { + "include": "#regexp" + } + ] + }, + { + "name": "string.regexp.tsx", + "begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.tsx" + } + }, + "end": "(/)([dgimsuy]*)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.tsx" + }, + "2": { + "name": "keyword.other.tsx" + } + }, + "patterns": [ + { + "include": "#regexp" + } + ] + } + ] + }, + "regexp": { + "patterns": [ + { + "name": "keyword.control.anchor.regexp", + "match": "\\\\[bB]|\\^|\\$" + }, + { + "match": "\\\\[1-9]\\d*|\\\\k<([a-zA-Z_$][\\w$]*)>", + "captures": { + "0": { + "name": "keyword.other.back-reference.regexp" + }, + "1": { + "name": "variable.other.regexp" + } + } + }, + { + "name": "keyword.operator.quantifier.regexp", + "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??" + }, + { + "name": "keyword.operator.or.regexp", + "match": "\\|" + }, + { + "name": "meta.group.assertion.regexp", + "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.group.regexp" + }, + "2": { + "name": "punctuation.definition.group.assertion.regexp" + }, + "3": { + "name": "meta.assertion.look-ahead.regexp" + }, + "4": { + "name": "meta.assertion.negative-look-ahead.regexp" + }, + "5": { + "name": "meta.assertion.look-behind.regexp" + }, + "6": { + "name": "meta.assertion.negative-look-behind.regexp" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.group.regexp" + } + }, + "patterns": [ + { + "include": "#regexp" + } + ] + }, + { + "name": "meta.group.regexp", + "begin": "\\((?:(\\?:)|(?:\\?<([a-zA-Z_$][\\w$]*)>))?", + "beginCaptures": { + "0": { + "name": "punctuation.definition.group.regexp" + }, + "1": { + "name": "punctuation.definition.group.no-capture.regexp" + }, + "2": { + "name": "variable.other.regexp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.group.regexp" + } + }, + "patterns": [ + { + "include": "#regexp" + } + ] + }, + { + "name": "constant.other.character-class.set.regexp", + "begin": "(\\[)(\\^)?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.character-class.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + } + }, + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.definition.character-class.regexp" + } + }, + "patterns": [ + { + "name": "constant.other.character-class.range.regexp", + "match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))", + "captures": { + "1": { + "name": "constant.character.numeric.regexp" + }, + "2": { + "name": "constant.character.control.regexp" + }, + "3": { + "name": "constant.character.escape.backslash.regexp" + }, + "4": { + "name": "constant.character.numeric.regexp" + }, + "5": { + "name": "constant.character.control.regexp" + }, + "6": { + "name": "constant.character.escape.backslash.regexp" + } + } + }, + { + "include": "#regex-character-class" + } + ] + }, + { + "include": "#regex-character-class" + } + ] + }, + "regex-character-class": { + "patterns": [ + { + "name": "constant.other.character-class.regexp", + "match": "\\\\[wWsSdDtrnvf]|\\." + }, + { + "name": "constant.character.numeric.regexp", + "match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})" + }, + { + "name": "constant.character.control.regexp", + "match": "\\\\c[A-Z]" + }, + { + "name": "constant.character.escape.backslash.regexp", + "match": "\\\\." + } + ] + }, + "comment": { + "patterns": [ + { + "name": "comment.block.documentation.tsx", + "begin": "/\\*\\*(?!/)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.tsx" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.tsx" + } + }, + "patterns": [ + { + "include": "#docblock" + } + ] + }, + { + "name": "comment.block.tsx", + "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.tsx" + }, + "2": { + "name": "storage.type.internaldeclaration.tsx" + }, + "3": { + "name": "punctuation.decorator.internaldeclaration.tsx" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.tsx" + } + } + }, + { + "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.tsx" + }, + "2": { + "name": "comment.line.double-slash.tsx" + }, + "3": { + "name": "punctuation.definition.comment.tsx" + }, + "4": { + "name": "storage.type.internaldeclaration.tsx" + }, + "5": { + "name": "punctuation.decorator.internaldeclaration.tsx" + } + }, + "end": "(?=$)", + "contentName": "comment.line.double-slash.tsx" + } + ] + }, + "single-line-comment-consuming-line-ending": { + "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.tsx" + }, + "2": { + "name": "comment.line.double-slash.tsx" + }, + "3": { + "name": "punctuation.definition.comment.tsx" + }, + "4": { + "name": "storage.type.internaldeclaration.tsx" + }, + "5": { + "name": "punctuation.decorator.internaldeclaration.tsx" + } + }, + "end": "(?=^)", + "contentName": "comment.line.double-slash.tsx" + }, + "directives": { + "name": "comment.line.triple-slash.directive.tsx", + "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.tsx" + } + }, + "end": "(?=$)", + "patterns": [ + { + "name": "meta.tag.tsx", + "begin": "(<)(reference|amd-dependency|amd-module)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.directive.tsx" + }, + "2": { + "name": "entity.name.tag.directive.tsx" + } + }, + "end": "/>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.directive.tsx" + } + }, + "patterns": [ + { + "name": "entity.other.attribute-name.directive.tsx", + "match": "path|types|no-default-lib|lib|name|resolution-mode" + }, + { + "name": "keyword.operator.assignment.tsx", + "match": "=" + }, + { + "include": "#string" + } + ] + } + ] + }, + "docblock": { + "patterns": [ + { + "match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "constant.language.access-type.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "entity.name.type.instance.jsdoc" + }, + "4": { + "name": "punctuation.definition.bracket.angle.begin.jsdoc" + }, + "5": { + "name": "constant.other.email.link.underline.jsdoc" + }, + "6": { + "name": "punctuation.definition.bracket.angle.end.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # <that namepath>\n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # <this namepath>", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "entity.name.type.instance.jsdoc" + }, + "4": { + "name": "keyword.operator.control.jsdoc" + }, + "5": { + "name": "entity.name.type.instance.jsdoc" + } + } + }, + { + "name": "meta.example.jsdoc", + "begin": "((@)example)\\s+", + "end": "(?=@|\\*/)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "patterns": [ + { + "match": "^\\s\\*\\s+" + }, + { + "contentName": "constant.other.description.jsdoc", + "begin": "\\G(<)caption(>)", + "beginCaptures": { + "0": { + "name": "entity.name.tag.inline.jsdoc" + }, + "1": { + "name": "punctuation.definition.bracket.angle.begin.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.angle.end.jsdoc" + } + }, + "end": "(</)caption(>)|(?=\\*/)", + "endCaptures": { + "0": { + "name": "entity.name.tag.inline.jsdoc" + }, + "1": { + "name": "punctuation.definition.bracket.angle.begin.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.angle.end.jsdoc" + } + } + }, + { + "match": "[^\\s@*](?:[^*]|\\*[^/])*", + "captures": { + "0": { + "name": "source.embedded.tsx" + } + } + } + ] + }, + { + "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "constant.language.symbol-type.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!\n # Avoid matching bare URIs (also acceptable as links)\n https?://\n |\n # Avoid matching {@inline tags}; we match those below\n (?:\\[[^\\[\\]]*\\])? # Possible description [preceding]{@tag}\n {@(?:link|linkcode|linkplain|tutorial)\\b\n )\n # Matched namepath\n (?:[^@\\s*/]|\\*[^/])+\n )\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.link.underline.jsdoc" + }, + "4": { + "name": "entity.name.type.instance.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)template)\n\\s+\n# One or more valid identifiers\n(\n [A-Za-z_$] # First character: non-numeric word character\n [\\w$.\\[\\]]* # Rest of identifier\n (?: # Possible list of additional identifiers\n \\s* , \\s*\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n )*\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + } + } + }, + { + "begin": "(?x)((@)template)\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + }, + { + "name": "variable.other.jsdoc", + "match": "([A-Za-z_$][\\w$.\\[\\]]*)" + } + ] + }, + { + "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + } + } + }, + { + "begin": "((@)typedef)\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + }, + { + "name": "entity.name.type.instance.jsdoc", + "match": "(?:[^@\\s*/]|\\*[^/])+" + } + ] + }, + { + "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + }, + { + "name": "variable.other.jsdoc", + "match": "([A-Za-z_$][\\w$.\\[\\]]*)" + }, + { + "name": "variable.other.jsdoc", + "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[ ].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?>\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])* # Everything else\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))", + "captures": { + "1": { + "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc" + }, + "2": { + "name": "keyword.operator.assignment.jsdoc" + }, + "3": { + "name": "source.embedded.tsx" + }, + "4": { + "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc" + }, + "5": { + "name": "invalid.illegal.syntax.jsdoc" + } + } + } + ] + }, + { + "begin": "(?x)\n(\n (@)\n (?:define|enum|exception|export|extends|lends|implements|modifies\n |namespace|private|protected|returns?|satisfies|suppress|this|throws|type\n |yields?)\n)\n\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + } + ] + }, + { + "match": "(?x)\n(\n (@)\n (?:alias|augments|callback|constructs|emits|event|fires|exports?\n |extends|external|function|func|host|lends|listens|interface|memberof!?\n |method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "entity.name.type.instance.jsdoc" + } + } + }, + { + "contentName": "variable.other.jsdoc", + "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + }, + "4": { + "name": "punctuation.definition.string.begin.jsdoc" + } + }, + "end": "(\\3)|(?=$|\\*/)", + "endCaptures": { + "0": { + "name": "variable.other.jsdoc" + }, + "1": { + "name": "punctuation.definition.string.end.jsdoc" + } + } + }, + { + "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + } + } + }, + { + "name": "storage.type.class.jsdoc", + "match": "(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \\b", + "captures": { + "1": { + "name": "punctuation.definition.block.tag.jsdoc" + } + } + }, + { + "include": "#inline-tags" + }, + { + "match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\s+)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + } + } + ] + }, + "brackets": { + "patterns": [ + { + "begin": "{", + "end": "}|(?=\\*/)", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\[", + "end": "\\]|(?=\\*/)", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "inline-tags": { + "patterns": [ + { + "name": "constant.other.description.jsdoc", + "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))", + "captures": { + "1": { + "name": "punctuation.definition.bracket.square.begin.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.square.end.jsdoc" + } + } + }, + { + "name": "entity.name.type.instance.jsdoc", + "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*", + "beginCaptures": { + "1": { + "name": "punctuation.definition.bracket.curly.begin.jsdoc" + }, + "2": { + "name": "storage.type.class.jsdoc" + }, + "3": { + "name": "punctuation.definition.inline.tag.jsdoc" + } + }, + "end": "}|(?=\\*/)", + "endCaptures": { + "0": { + "name": "punctuation.definition.bracket.curly.end.jsdoc" + } + }, + "patterns": [ + { + "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?", + "captures": { + "1": { + "name": "variable.other.link.underline.jsdoc" + }, + "2": { + "name": "punctuation.separator.pipe.jsdoc" + } + } + }, + { + "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?", + "captures": { + "1": { + "name": "variable.other.description.jsdoc" + }, + "2": { + "name": "punctuation.separator.pipe.jsdoc" + } + } + } + ] + } + ] + }, + "jsdoctype": { + "patterns": [ + { + "contentName": "entity.name.type.instance.jsdoc", + "begin": "\\G({)", + "beginCaptures": { + "0": { + "name": "entity.name.type.instance.jsdoc" + }, + "1": { + "name": "punctuation.definition.bracket.curly.begin.jsdoc" + } + }, + "end": "((}))\\s*|(?=\\*/)", + "endCaptures": { + "1": { + "name": "entity.name.type.instance.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.curly.end.jsdoc" + } + }, + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "jsx": { + "patterns": [ + { + "include": "#jsx-tag-without-attributes-in-expression" + }, + { + "include": "#jsx-tag-in-expression" + } + ] + }, + "jsx-tag-without-attributes-in-expression": { + "begin": "(?<!\\+\\+|--)(?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))", + "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))", + "patterns": [ + { + "include": "#jsx-tag-without-attributes" + } + ] + }, + "jsx-tag-without-attributes": { + "name": "meta.tag.without-attributes.tsx", + "begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>)", + "end": "(</)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.tsx" + }, + "2": { + "name": "entity.name.tag.namespace.tsx" + }, + "3": { + "name": "punctuation.separator.namespace.tsx" + }, + "4": { + "name": "entity.name.tag.tsx" + }, + "5": { + "name": "support.class.component.tsx" + }, + "6": { + "name": "punctuation.definition.tag.end.tsx" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.tsx" + }, + "2": { + "name": "entity.name.tag.namespace.tsx" + }, + "3": { + "name": "punctuation.separator.namespace.tsx" + }, + "4": { + "name": "entity.name.tag.tsx" + }, + "5": { + "name": "support.class.component.tsx" + }, + "6": { + "name": "punctuation.definition.tag.end.tsx" + } + }, + "contentName": "meta.jsx.children.tsx", + "patterns": [ + { + "include": "#jsx-children" + } + ] + }, + "jsx-tag-in-expression": { + "begin": "(?x)\n (?<!\\+\\+|--)(?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))", + "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))", + "patterns": [ + { + "include": "#jsx-tag" + } + ] + }, + "jsx-tag": { + "name": "meta.tag.tsx", + "begin": "(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))", + "end": "(/>)|(?:(</)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.tsx" + }, + "2": { + "name": "punctuation.definition.tag.begin.tsx" + }, + "3": { + "name": "entity.name.tag.namespace.tsx" + }, + "4": { + "name": "punctuation.separator.namespace.tsx" + }, + "5": { + "name": "entity.name.tag.tsx" + }, + "6": { + "name": "support.class.component.tsx" + }, + "7": { + "name": "punctuation.definition.tag.end.tsx" + } + }, + "patterns": [ + { + "begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.tsx" + }, + "2": { + "name": "entity.name.tag.namespace.tsx" + }, + "3": { + "name": "punctuation.separator.namespace.tsx" + }, + "4": { + "name": "entity.name.tag.tsx" + }, + "5": { + "name": "support.class.component.tsx" + } + }, + "end": "(?=[/]?>)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-arguments" + }, + { + "include": "#jsx-tag-attributes" + } + ] + }, + { + "begin": "(>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.end.tsx" + } + }, + "end": "(?=</)", + "contentName": "meta.jsx.children.tsx", + "patterns": [ + { + "include": "#jsx-children" + } + ] + } + ] + }, + "jsx-children": { + "patterns": [ + { + "include": "#jsx-tag-without-attributes" + }, + { + "include": "#jsx-tag" + }, + { + "include": "#jsx-evaluated-code" + }, + { + "include": "#jsx-entities" + } + ] + }, + "jsx-evaluated-code": { + "contentName": "meta.embedded.expression.tsx", + "begin": "\\{", + "end": "\\}", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.tsx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.tsx" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "jsx-entities": { + "patterns": [ + { + "name": "constant.character.entity.tsx", + "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", + "captures": { + "1": { + "name": "punctuation.definition.entity.tsx" + }, + "3": { + "name": "punctuation.definition.entity.tsx" + } + } + } + ] + }, + "jsx-tag-attributes": { + "name": "meta.tag.attributes.tsx", + "begin": "\\s+", + "end": "(?=[/]?>)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#jsx-tag-attribute-name" + }, + { + "include": "#jsx-tag-attribute-assignment" + }, + { + "include": "#jsx-string-double-quoted" + }, + { + "include": "#jsx-string-single-quoted" + }, + { + "include": "#jsx-evaluated-code" + }, + { + "include": "#jsx-tag-attributes-illegal" + } + ] + }, + "jsx-tag-attribute-name": { + "match": "(?x)\n \\s*\n (?:([_$[:alpha:]][-_$[:alnum:].]*)(:))?\n ([_$[:alpha:]][-_$[:alnum:]]*)\n (?=\\s|=|/?>|/\\*|//)", + "captures": { + "1": { + "name": "entity.other.attribute-name.namespace.tsx" + }, + "2": { + "name": "punctuation.separator.namespace.tsx" + }, + "3": { + "name": "entity.other.attribute-name.tsx" + } + } + }, + "jsx-tag-attribute-assignment": { + "name": "keyword.operator.assignment.tsx", + "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))" + }, + "jsx-string-double-quoted": { + "name": "string.quoted.double.tsx", + "begin": "\"", + "end": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.tsx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.tsx" + } + }, + "patterns": [ + { + "include": "#jsx-entities" + } + ] + }, + "jsx-string-single-quoted": { + "name": "string.quoted.single.tsx", + "begin": "'", + "end": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.tsx" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.tsx" + } + }, + "patterns": [ + { + "include": "#jsx-entities" + } + ] + }, + "jsx-tag-attributes-illegal": { + "name": "invalid.illegal.attribute.tsx", + "match": "\\S+" + } + } +} diff --git a/src/lib/shiki/languages/turtle.tmLanguage.json b/src/lib/shiki/languages/turtle.tmLanguage.json new file mode 100644 index 0000000..9abdbf3 --- /dev/null +++ b/src/lib/shiki/languages/turtle.tmLanguage.json @@ -0,0 +1,257 @@ +{ + "name": "turtle", + "scopeName": "source.turtle", + "fileTypes": ["turtle", "ttl", "acl"], + "patterns": [ + { + "include": "#rule-constraint" + }, + { + "include": "#iriref" + }, + { + "include": "#prefix" + }, + { + "include": "#prefixed-name" + }, + { + "include": "#comment" + }, + { + "include": "#special-predicate" + }, + { + "include": "#literals" + }, + { + "include": "#language-tag" + } + ], + "uuid": "230498230498sdfkj8909-34df-23dfs", + "repository": { + "prefix": { + "name": "keyword.operator.turtle", + "match": "(?i:@?base|@?prefix)\\s" + }, + "iriref": { + "name": "entity.name.type.iriref.turtle", + "match": "<[^\\x20-\\x20<>\"{}|^`\\\\]*>" + }, + "prefixed-name": { + "name": "constant.complex.turtle", + "match": "(\\w*:)(\\w*)", + "captures": { + "1": { + "name": "storage.type.PNAME_NS.turtle" + }, + "2": { + "name": "support.variable.PN_LOCAL.turtle" + } + } + }, + "comment": { + "name": "comment.line.number-sign.turtle", + "match": "#.*$" + }, + "special-predicate": { + "name": "meta.specialPredicate.turtle", + "match": "\\s(a)\\s", + "captures": { + "1": { + "name": "keyword.control.turtle" + } + } + }, + "literals": { + "patterns": [ + { + "include": "#string" + }, + { + "include": "#numeric" + }, + { + "include": "#boolean" + } + ] + }, + "string": { + "patterns": [ + { + "include": "#triple-squote-string-literal" + }, + { + "include": "#triple-dquote-string-literal" + }, + { + "include": "#single-squote-string-literal" + }, + { + "include": "#single-dquote-string-literal" + }, + { + "include": "#triple-tick-string-literal" + } + ] + }, + "single-squote-string-literal": { + "name": "string.quoted.single.turtle", + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.turtle" + } + }, + "end": "'", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.turtle" + }, + "2": { + "name": "invalid.illegal.newline.turtle" + } + }, + "patterns": [ + { + "include": "#string-character-escape" + } + ] + }, + "single-dquote-string-literal": { + "name": "string.quoted.double.turtle", + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.turtle" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.turtle" + } + }, + "patterns": [ + { + "include": "#string-character-escape" + } + ] + }, + "triple-squote-string-literal": { + "name": "string.quoted.triple.turtle", + "begin": "'''", + "end": "'''", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.turtle" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.turtle" + } + }, + "patterns": [ + { + "include": "#string-character-escape" + } + ] + }, + "triple-dquote-string-literal": { + "name": "string.quoted.triple.turtle", + "begin": "\"\"\"", + "end": "\"\"\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.turtle" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.turtle" + } + }, + "patterns": [ + { + "include": "#string-character-escape" + } + ] + }, + "triple-tick-string-literal": { + "name": "string.quoted.triple.turtle", + "begin": "```", + "end": "```", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.turtle" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.turtle" + } + }, + "patterns": [ + { + "include": "#string-character-escape" + } + ] + }, + "string-character-escape": { + "name": "constant.character.escape.turtle", + "match": "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)" + }, + "numeric": { + "patterns": [ + { + "include": "#integer" + } + ] + }, + "integer": { + "name": "constant.numeric.turtle", + "match": "[+-]?(?:\\d+|[0-9]+\\.[0-9]*|\\.[0-9]+(?:[eE][+-]?\\d+)?)" + }, + "boolean": { + "name": "constant.language.sparql", + "match": "\\b(?i:true|false)\\b" + }, + "language-tag": { + "name": "meta.string-literal-language-tag.turtle", + "match": "@(\\w+)", + "captures": { + "1": { + "name": "entity.name.class.turtle" + } + } + }, + "rule-constraint": { + "name": "meta.rule-constraint.turtle", + "begin": "(rule:content) (\"\"\")", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#prefixed-name" + } + ] + }, + "2": { + "name": "string.quoted.triple.turtle" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "string.quoted.triple.turtle" + } + }, + "patterns": [ + { + "include": "source.srs" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/twig.tmLanguage.json b/src/lib/shiki/languages/twig.tmLanguage.json new file mode 100644 index 0000000..501020e --- /dev/null +++ b/src/lib/shiki/languages/twig.tmLanguage.json @@ -0,0 +1,1372 @@ +{ + "fileTypes": ["twig", "html.twig"], + "firstLineMatch": "<!(?i:DOCTYPE)|<(?i:html)|<\\?(?i:php)|\\{\\{|\\{%|\\{#", + "foldingStartMarker": "(?x)\n (<(?i:body|div|dl|fieldset|form|head|li|ol|script|select|style|table|tbody|tfoot|thead|tr|ul)\\b.*?>\n |<!--(?!.*--\\s*>)\n |^<!--\\ \\#tminclude\\ (?>.*?-->)$\n |\\{%\\s+(autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)\n )", + "foldingStopMarker": "(?x)\n (</(?i:body|div|dl|fieldset|form|head|li|ol|script|select|style|table|tbody|tfoot|thead|tr|ul)>\n |^(?!.*?<!--).*?--\\s*>\n |^<!--\\ end\\ tminclude\\ -->$\n |\\{%\\s+end(autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)\n )", + "keyEquivalent": "^~T", + "name": "twig", + "patterns": [ + { + "begin": "(<)([a-zA-Z0-9:]++)(?=[^>]*></\\2>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": "(>(<)/)(\\2)(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "meta.scope.between-tag-pair.html" + }, + "3": { + "name": "entity.name.tag.html" + }, + "4": { + "name": "punctuation.definition.tag.html" + } + }, + "name": "meta.tag.any.html", + "patterns": [ + { + "include": "#tag-stuff" + } + ] + }, + { + "begin": "(<\\?)(xml)", + "captures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "entity.name.tag.xml.html" + } + }, + "end": "(\\?>)", + "name": "meta.tag.preprocessor.xml.html", + "patterns": [ + { + "include": "#tag-generic-attribute" + }, + { + "include": "#string-double-quoted" + }, + { + "include": "#string-single-quoted" + } + ] + }, + { + "begin": "<!--", + "captures": { + "0": { + "name": "punctuation.definition.comment.html" + } + }, + "end": "--\\s*>", + "name": "comment.block.html", + "patterns": [ + { + "match": "--", + "name": "invalid.illegal.bad-comments-or-CDATA.html" + }, + { + "include": "#embedded-code" + } + ] + }, + { + "begin": "<!", + "captures": { + "0": { + "name": "punctuation.definition.tag.html" + } + }, + "end": ">", + "name": "meta.tag.sgml.html", + "patterns": [ + { + "begin": "(?i:DOCTYPE)", + "captures": { + "1": { + "name": "entity.name.tag.doctype.html" + } + }, + "end": "(?=>)", + "name": "meta.tag.sgml.doctype.html", + "patterns": [ + { + "match": "\"[^\">]*\"", + "name": "string.quoted.double.doctype.identifiers-and-DTDs.html" + } + ] + }, + { + "begin": "\\[CDATA\\[", + "end": "]](?=>)", + "name": "constant.other.inline-data.html" + }, + { + "match": "(\\s*)(?!--|>)\\S(\\s*)", + "name": "invalid.illegal.bad-comments-or-CDATA.html" + } + ] + }, + { + "include": "#embedded-code" + }, + { + "begin": "(?:^\\s+)?(<)((?i:style))\\b(?![^>]*/>)", + "captures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "entity.name.tag.style.html" + }, + "3": { + "name": "punctuation.definition.tag.html" + } + }, + "end": "(</)((?i:style))(>)(?:\\s*\\n)?", + "name": "source.css.embedded.html", + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.html" + } + }, + "end": "(?=</(?i:style))", + "patterns": [ + { + "include": "#embedded-code" + }, + { + "include": "source.css" + } + ] + } + ] + }, + { + "begin": "(?:^\\s+)?(<)((?i:script))\\b(?![^>]*/>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "entity.name.tag.script.html" + } + }, + "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?", + "endCaptures": { + "2": { + "name": "punctuation.definition.tag.html" + } + }, + "name": "source.js.embedded.html", + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<!</(?:script|SCRIPT))(>)", + "captures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "entity.name.tag.script.html" + } + }, + "end": "(</)((?i:script))", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.comment.js" + } + }, + "match": "(//).*?((?=</script)|$\\n?)", + "name": "comment.line.double-slash.js" + }, + { + "begin": "/\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.js" + } + }, + "end": "\\*/|(?=</script)", + "name": "comment.block.js" + }, + { + "include": "#php" + }, + { + "include": "#twig-print-tag" + }, + { + "include": "#twig-statement-tag" + }, + { + "include": "#twig-comment-tag" + }, + { + "include": "source.js" + } + ] + } + ] + }, + { + "begin": "(?ix) # Enable free spacing mode, case insensitive\n # Make sure our opening js tag has word boundaries\n (?<=\\{\\%\\sjs\\s\\%\\}|\\{\\%\\sincludejs\\s\\%\\})\n ", + "comment": "Add JS support to set tags that use the pattern \"css\" in their name", + "end": "(?ix)(?=\\{\\%\\sendjs\\s\\%\\}|\\{\\%\\sendincludejs\\s\\%\\})", + "name": "source.js.embedded.twig", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "begin": "(?ix) # Enable free spacing mode, case insensitive\n (?<=\\{\\%\\scss\\s\\%\\}|\\{\\%\\sincludecss\\s\\%\\}|\\{\\%\\sincludehirescss\\s\\%\\})\n ", + "comment": "Add CSS support to set tags that use the pattern \"css\" in their name", + "end": "(?ix)(?=\\{\\%\\sendcss\\s\\%\\}|\\{\\%\\sendincludecss\\s\\%\\}|\\{\\%\\sendincludehirescss\\s\\%\\})", + "name": "source.css.embedded.twig", + "patterns": [ + { + "include": "source.css" + } + ] + }, + { + "begin": "(</?)((?i:body|head|html)\\b)", + "captures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "entity.name.tag.structure.any.html" + } + }, + "end": "(>)", + "name": "meta.tag.structure.any.html", + "patterns": [ + { + "include": "#tag-stuff" + } + ] + }, + { + "begin": "(</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\\b)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.block.any.html" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.block.any.html", + "patterns": [ + { + "include": "#tag-stuff" + } + ] + }, + { + "begin": "(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\\b)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.inline.any.html" + } + }, + "end": "((?: ?/)?>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.inline.any.html", + "patterns": [ + { + "include": "#tag-stuff" + } + ] + }, + { + "begin": "(</?)([a-zA-Z0-9:]+)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.other.html" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.other.html", + "patterns": [ + { + "include": "#tag-stuff" + } + ] + }, + { + "include": "#entities" + }, + { + "match": "<>", + "name": "invalid.illegal.incomplete.html" + }, + { + "match": "<", + "name": "invalid.illegal.bad-angle-bracket.html" + }, + { + "include": "#twig-print-tag" + }, + { + "include": "#twig-statement-tag" + }, + { + "include": "#twig-comment-tag" + } + ], + "repository": { + "embedded-code": { + "patterns": [ + { + "include": "#ruby" + }, + { + "include": "#php" + }, + { + "include": "#twig-print-tag" + }, + { + "include": "#twig-statement-tag" + }, + { + "include": "#twig-comment-tag" + }, + { + "include": "#python" + } + ] + }, + "entities": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.entity.html" + }, + "3": { + "name": "punctuation.definition.entity.html" + } + }, + "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", + "name": "constant.character.entity.html" + }, + { + "match": "&", + "name": "invalid.illegal.bad-ampersand.html" + } + ] + }, + "twig-print-tag": { + "begin": "\\{\\{-?", + "beginCaptures": { + "0": { + "name": "punctuation.section.tag.twig" + } + }, + "end": "-?\\}\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.tag.twig" + } + }, + "name": "meta.tag.template.value.twig", + "patterns": [ + { + "include": "#twig-constants" + }, + { + "include": "#twig-operators" + }, + { + "include": "#twig-functions-warg" + }, + { + "include": "#twig-functions" + }, + { + "include": "#twig-macros" + }, + { + "include": "#twig-objects" + }, + { + "include": "#twig-properties" + }, + { + "include": "#twig-filters-warg" + }, + { + "include": "#twig-filters" + }, + { + "include": "#twig-filters-warg-ud" + }, + { + "include": "#twig-filters-ud" + }, + { + "include": "#twig-strings" + }, + { + "include": "#twig-arrays" + }, + { + "include": "#twig-hashes" + } + ] + }, + "twig-statement-tag": { + "begin": "\\{%-?", + "beginCaptures": { + "0": { + "name": "punctuation.section.tag.twig" + } + }, + "end": "-?%\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.tag.twig" + } + }, + "name": "meta.tag.template.block.twig", + "patterns": [ + { + "include": "#twig-constants" + }, + { + "include": "#twig-keywords" + }, + { + "include": "#twig-operators" + }, + { + "include": "#twig-functions-warg" + }, + { + "include": "#twig-functions" + }, + { + "include": "#twig-macros" + }, + { + "include": "#twig-filters-warg" + }, + { + "include": "#twig-filters" + }, + { + "include": "#twig-filters-warg-ud" + }, + { + "include": "#twig-filters-ud" + }, + { + "include": "#twig-objects" + }, + { + "include": "#twig-properties" + }, + { + "include": "#twig-strings" + }, + { + "include": "#twig-arrays" + }, + { + "include": "#twig-hashes" + } + ] + }, + "twig-comment-tag": { + "begin": "\\{#-?", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.twig" + } + }, + "end": "-?#\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.twig" + } + }, + "name": "comment.block.twig" + }, + "twig-constants": { + "patterns": [ + { + "match": "(?i)(?<=[\\s\\[\\(\\{:,])(?:true|false|null|none)(?=[\\s\\)\\]\\}\\,])", + "name": "constant.language.twig" + }, + { + "match": "(?<=[\\s\\[\\(\\{:,]|\\.\\.|\\*\\*)[0-9]+(?:\\.[0-9]+)?(?=[\\s\\)\\]\\}\\,]|\\.\\.|\\*\\*)", + "name": "constant.numeric.twig" + } + ] + }, + "twig-operators": { + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.operator.arithmetic.twig" + } + }, + "match": "(?<=\\s)(\\+|-|//?|%|\\*\\*?)(?=\\s)" + }, + { + "captures": { + "1": { + "name": "keyword.operator.assignment.twig" + } + }, + "match": "(?<=\\s)(=|~)(?=\\s)" + }, + { + "captures": { + "1": { + "name": "keyword.operator.bitwise.twig" + } + }, + "match": "(?<=\\s)(b-(?:and|or|xor))(?=\\s)" + }, + { + "captures": { + "1": { + "name": "keyword.operator.comparison.twig" + } + }, + "match": "(?<=\\s)((?:!|=)=|<=?|>=?|(?:not )?in|is(?: not)?|(?:ends|starts) with|matches)(?=\\s)" + }, + { + "captures": { + "1": { + "name": "keyword.operator.logical.twig" + } + }, + "match": "(?<=\\s)(\\?|:|and|not|or)(?=\\s)" + }, + { + "captures": { + "0": { + "name": "keyword.operator.other.twig" + } + }, + "match": "(?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)'\"])\\.\\.(?=[a-zA-Z0-9_\\x{7f}-\\x{ff}'\"])" + }, + { + "captures": { + "0": { + "name": "keyword.operator.other.twig" + } + }, + "match": "(?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\}\\)'\"])\\|(?=[a-zA-Z_\\x{7f}-\\x{ff}])" + } + ] + }, + "twig-objects": { + "captures": { + "1": { + "name": "variable.other.twig" + } + }, + "match": "(?<=[\\s\\{\\[\\(:,])([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(?=[\\s\\}\\[\\]\\(\\)\\.\\|,:])" + }, + "twig-properties": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.separator.property.twig" + }, + "2": { + "name": "variable.other.property.twig" + } + }, + "match": "(?x)\n (?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}])\n (\\.)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n (?=[\\.\\s\\|\\[\\)\\]\\}:,])\n " + }, + { + "begin": "(?x)\n (?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}])\n (\\.)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n (\\()\n ", + "beginCaptures": { + "1": { + "name": "punctuation.separator.property.twig" + }, + "2": { + "name": "variable.other.property.twig" + }, + "3": { + "name": "punctuation.definition.parameters.begin.twig" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.twig" + } + }, + "patterns": [ + { + "include": "#twig-constants" + }, + { + "include": "#twig-functions-warg" + }, + { + "include": "#twig-functions" + }, + { + "include": "#twig-macros" + }, + { + "include": "#twig-objects" + }, + { + "include": "#twig-properties" + }, + { + "include": "#twig-filters-warg" + }, + { + "include": "#twig-filters" + }, + { + "include": "#twig-filters-warg-ud" + }, + { + "include": "#twig-filters-ud" + }, + { + "include": "#twig-strings" + }, + { + "include": "#twig-arrays" + } + ], + "contentName": "meta.function.arguments.twig" + }, + { + "captures": { + "1": { + "name": "punctuation.section.array.begin.twig" + }, + "2": { + "name": "variable.other.property.twig" + }, + "3": { + "name": "punctuation.section.array.end.twig" + }, + "4": { + "name": "punctuation.section.array.begin.twig" + }, + "5": { + "name": "variable.other.property.twig" + }, + "6": { + "name": "punctuation.section.array.end.twig" + }, + "7": { + "name": "punctuation.section.array.begin.twig" + }, + "8": { + "name": "variable.other.property.twig" + }, + "9": { + "name": "punctuation.section.array.end.twig" + } + }, + "match": "(?x)\n (?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]])\n (?:\n (\\[)('[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*')(\\])\n |(\\[)(\"[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*\")(\\])\n |(\\[)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(\\])\n )\n " + } + ] + }, + "twig-strings": { + "patterns": [ + { + "begin": "(?:(?<!\\\\)|(?<=\\\\\\\\))'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.twig" + } + }, + "end": "(?:(?<!\\\\)|(?<=\\\\\\\\))'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.twig" + } + }, + "name": "string.quoted.single.twig" + }, + { + "begin": "(?:(?<!\\\\)|(?<=\\\\\\\\))\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.twig" + } + }, + "end": "(?:(?<!\\\\)|(?<=\\\\\\\\))\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.twig" + } + }, + "name": "string.quoted.double.twig" + } + ] + }, + "twig-arrays": { + "begin": "(?<=[\\s\\(\\{\\[:,])\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.twig" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.twig" + } + }, + "patterns": [ + { + "include": "#twig-arrays" + }, + { + "include": "#twig-hashes" + }, + { + "include": "#twig-constants" + }, + { + "include": "#twig-strings" + }, + { + "include": "#twig-functions-warg" + }, + { + "include": "#twig-functions" + }, + { + "include": "#twig-macros" + }, + { + "include": "#twig-objects" + }, + { + "include": "#twig-properties" + }, + { + "include": "#twig-filters-warg" + }, + { + "include": "#twig-filters" + }, + { + "include": "#twig-filters-warg-ud" + }, + { + "include": "#twig-filters-ud" + }, + { + "match": ",", + "name": "punctuation.separator.object.twig" + } + ], + "name": "meta.array.twig" + }, + "twig-hashes": { + "begin": "(?<=[\\s\\(\\{\\[:,])\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.hash.begin.twig" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.hash.end.twig" + } + }, + "patterns": [ + { + "include": "#twig-hashes" + }, + { + "include": "#twig-arrays" + }, + { + "include": "#twig-constants" + }, + { + "include": "#twig-strings" + }, + { + "include": "#twig-functions-warg" + }, + { + "include": "#twig-functions" + }, + { + "include": "#twig-macros" + }, + { + "include": "#twig-objects" + }, + { + "include": "#twig-properties" + }, + { + "include": "#twig-filters-warg" + }, + { + "include": "#twig-filters" + }, + { + "include": "#twig-filters-warg-ud" + }, + { + "include": "#twig-filters-ud" + }, + { + "match": ":", + "name": "punctuation.separator.key-value.twig" + }, + { + "match": ",", + "name": "punctuation.separator.object.twig" + } + ], + "name": "meta.hash.twig" + }, + "twig-keywords": { + "match": "(?<=\\s)((?:end)?(?:autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)|as|do|else|elseif|extends|flush|from|ignore missing|import|include|only|use|with)(?=\\s)", + "name": "keyword.control.twig" + }, + "twig-functions-warg": { + "begin": "(?<=[\\s\\(\\[\\{:,])(attribute|block|constant|cycle|date|divisible by|dump|include|max|min|parent|random|range|same as|source|template_from_string)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.twig" + }, + "2": { + "name": "punctuation.definition.parameters.begin.twig" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.twig" + } + }, + "patterns": [ + { + "include": "#twig-constants" + }, + { + "include": "#twig-functions-warg" + }, + { + "include": "#twig-functions" + }, + { + "include": "#twig-macros" + }, + { + "include": "#twig-objects" + }, + { + "include": "#twig-properties" + }, + { + "include": "#twig-filters-warg" + }, + { + "include": "#twig-filters" + }, + { + "include": "#twig-filters-warg-ud" + }, + { + "include": "#twig-filters-ud" + }, + { + "include": "#twig-strings" + }, + { + "include": "#twig-arrays" + } + ], + "contentName": "meta.function.arguments.twig" + }, + "twig-functions": { + "captures": { + "1": { + "name": "support.function.twig" + } + }, + "match": "(?<=is\\s)(defined|empty|even|iterable|odd)" + }, + "twig-macros": { + "begin": "(?x)\n (?<=[\\s\\(\\[\\{:,])\n ([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n (?:\n (\\.)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n )?\n (\\()\n ", + "beginCaptures": { + "1": { + "name": "meta.function-call.twig" + }, + "2": { + "name": "punctuation.separator.property.twig" + }, + "3": { + "name": "variable.other.property.twig" + }, + "4": { + "name": "punctuation.definition.parameters.begin.twig" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.twig" + } + }, + "patterns": [ + { + "include": "#twig-constants" + }, + { + "include": "#twig-operators" + }, + { + "include": "#twig-functions-warg" + }, + { + "include": "#twig-functions" + }, + { + "include": "#twig-macros" + }, + { + "include": "#twig-objects" + }, + { + "include": "#twig-properties" + }, + { + "include": "#twig-filters-warg" + }, + { + "include": "#twig-filters" + }, + { + "include": "#twig-filters-warg-ud" + }, + { + "include": "#twig-filters-ud" + }, + { + "include": "#twig-strings" + }, + { + "include": "#twig-arrays" + }, + { + "include": "#twig-hashes" + } + ], + "contentName": "meta.function.arguments.twig" + }, + "twig-filters-warg": { + "begin": "(?<=(?:[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\\'\\\"]\\|)|\\{%\\sfilter\\s)(batch|convert_encoding|date|date_modify|default|e(?:scape)?|format|join|merge|number_format|replace|round|slice|split|trim)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.twig" + }, + "2": { + "name": "punctuation.definition.parameters.begin.twig" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.twig" + } + }, + "patterns": [ + { + "include": "#twig-constants" + }, + { + "include": "#twig-functions-warg" + }, + { + "include": "#twig-functions" + }, + { + "include": "#twig-macros" + }, + { + "include": "#twig-objects" + }, + { + "include": "#twig-properties" + }, + { + "include": "#twig-filters-warg" + }, + { + "include": "#twig-filters" + }, + { + "include": "#twig-filters-warg-ud" + }, + { + "include": "#twig-filters-ud" + }, + { + "include": "#twig-strings" + }, + { + "include": "#twig-arrays" + }, + { + "include": "#twig-hashes" + } + ], + "contentName": "meta.function.arguments.twig" + }, + "twig-filters": { + "captures": { + "1": { + "name": "support.function.twig" + } + }, + "match": "(?<=(?:[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\\'\\\"]\\|)|\\{%\\sfilter\\s)(abs|capitalize|e(?:scape)?|first|join|(?:json|url)_encode|keys|last|length|lower|nl2br|number_format|raw|reverse|round|sort|striptags|title|trim|upper)(?=[\\s\\|\\]\\}\\):,]|\\.\\.|\\*\\*)" + }, + "twig-filters-warg-ud": { + "begin": "(?<=(?:[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\\'\\\"]\\|)|\\{%\\sfilter\\s)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(\\()", + "beginCaptures": { + "1": { + "name": "meta.function-call.other.twig" + }, + "2": { + "name": "punctuation.definition.parameters.begin.twig" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.twig" + } + }, + "patterns": [ + { + "include": "#twig-constants" + }, + { + "include": "#twig-functions-warg" + }, + { + "include": "#twig-functions" + }, + { + "include": "#twig-macros" + }, + { + "include": "#twig-objects" + }, + { + "include": "#twig-properties" + }, + { + "include": "#twig-filters-warg" + }, + { + "include": "#twig-filters" + }, + { + "include": "#twig-filters-warg-ud" + }, + { + "include": "#twig-filters-ud" + }, + { + "include": "#twig-strings" + }, + { + "include": "#twig-arrays" + }, + { + "include": "#twig-hashes" + } + ], + "contentName": "meta.function.arguments.twig" + }, + "twig-filters-ud": { + "captures": { + "1": { + "name": "meta.function-call.other.twig" + } + }, + "match": "(?<=(?:[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\\'\\\"]\\|)|\\{%\\sfilter\\s)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)" + }, + "php": { + "begin": "(?=(^\\s*)?<\\?)", + "end": "(?!(^\\s*)?<\\?)", + "patterns": [ + { + "include": "source.php" + } + ] + }, + "python": { + "begin": "(?:^\\s*)<\\?python(?!.*\\?>)", + "end": "\\?>(?:\\s*$\\n)?", + "name": "source.python.embedded.html", + "patterns": [ + { + "include": "source.python" + } + ] + }, + "ruby": { + "patterns": [ + { + "begin": "<%+#", + "captures": { + "0": { + "name": "punctuation.definition.comment.erb" + } + }, + "end": "%>", + "name": "comment.block.erb" + }, + { + "begin": "<%+(?!>)=?", + "captures": { + "0": { + "name": "punctuation.section.embedded.ruby" + } + }, + "end": "-?%>", + "name": "source.ruby.embedded.html", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.comment.ruby" + } + }, + "match": "(#).*?(?=-?%>)", + "name": "comment.line.number-sign.ruby" + }, + { + "include": "source.ruby" + } + ] + }, + { + "begin": "<\\?r(?!>)=?", + "captures": { + "0": { + "name": "punctuation.section.embedded.ruby.nitro" + } + }, + "end": "-?\\?>", + "name": "source.ruby.nitro.embedded.html", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.comment.ruby.nitro" + } + }, + "match": "(#).*?(?=-?\\?>)", + "name": "comment.line.number-sign.ruby.nitro" + }, + { + "include": "source.ruby" + } + ] + } + ] + }, + "string-double-quoted": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.html" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.html" + } + }, + "name": "string.quoted.double.html", + "patterns": [ + { + "include": "#embedded-code" + }, + { + "include": "#entities" + } + ] + }, + "string-single-quoted": { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.html" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.html" + } + }, + "name": "string.quoted.single.html", + "patterns": [ + { + "include": "#embedded-code" + }, + { + "include": "#entities" + } + ] + }, + "tag-generic-attribute": { + "match": "\\b([a-zA-Z\\-:]+)", + "name": "entity.other.attribute-name.html" + }, + "tag-id-attribute": { + "begin": "\\b(id)\\b\\s*(=)", + "captures": { + "1": { + "name": "entity.other.attribute-name.id.html" + }, + "2": { + "name": "punctuation.separator.key-value.html" + } + }, + "end": "(?<='|\")", + "name": "meta.attribute-with-value.id.html", + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.html" + } + }, + "contentName": "meta.toc-list.id.html", + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.html" + } + }, + "name": "string.quoted.double.html", + "patterns": [ + { + "include": "#embedded-code" + }, + { + "include": "#entities" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.html" + } + }, + "contentName": "meta.toc-list.id.html", + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.html" + } + }, + "name": "string.quoted.single.html", + "patterns": [ + { + "include": "#embedded-code" + }, + { + "include": "#entities" + } + ] + } + ] + }, + "tag-stuff": { + "patterns": [ + { + "include": "#tag-id-attribute" + }, + { + "include": "#tag-generic-attribute" + }, + { + "include": "#string-double-quoted" + }, + { + "include": "#string-single-quoted" + }, + { + "include": "#embedded-code" + } + ] + } + }, + "scopeName": "text.html.twig", + "uuid": "C220B028-86FF-44CB-8A59-27937FC83730" +} diff --git a/src/lib/shiki/languages/typescript.tmLanguage.json b/src/lib/shiki/languages/typescript.tmLanguage.json new file mode 100644 index 0000000..06fede7 --- /dev/null +++ b/src/lib/shiki/languages/typescript.tmLanguage.json @@ -0,0 +1,5740 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/microsoft/TypeScript-TmLanguage/blob/master/TypeScript.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/8c7482b94b548eab56da64dbfb30b82589b3f747", + "name": "typescript", + "scopeName": "source.ts", + "patterns": [ + { + "include": "#directives" + }, + { + "include": "#statements" + }, + { + "include": "#shebang" + } + ], + "repository": { + "shebang": { + "name": "comment.line.shebang.ts", + "match": "\\A(#!).*(?=$)", + "captures": { + "1": { + "name": "punctuation.definition.comment.ts" + } + } + }, + "statements": { + "patterns": [ + { + "include": "#declaration" + }, + { + "include": "#control-statement" + }, + { + "include": "#after-operator-block-as-object-literal" + }, + { + "include": "#decl-block" + }, + { + "include": "#label" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-semicolon" + }, + { + "include": "#string" + }, + { + "include": "#comment" + } + ] + }, + "declaration": { + "patterns": [ + { + "include": "#decorator" + }, + { + "include": "#var-expr" + }, + { + "include": "#function-declaration" + }, + { + "include": "#class-declaration" + }, + { + "include": "#interface-declaration" + }, + { + "include": "#enum-declaration" + }, + { + "include": "#namespace-declaration" + }, + { + "include": "#type-alias-declaration" + }, + { + "include": "#import-equals-declaration" + }, + { + "include": "#import-declaration" + }, + { + "include": "#export-declaration" + }, + { + "name": "storage.modifier.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(declare|export)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + } + ] + }, + "control-statement": { + "patterns": [ + { + "include": "#switch-statement" + }, + { + "include": "#for-loop" + }, + { + "name": "keyword.control.trycatch.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(catch|finally|throw|try)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|goto)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "captures": { + "1": { + "name": "keyword.control.loop.ts" + }, + "2": { + "name": "entity.name.label.ts" + } + } + }, + { + "name": "keyword.control.loop.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(return)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "0": { + "name": "keyword.control.flow.ts" + } + }, + "end": "(?=[;}]|$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "keyword.control.switch.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "include": "#if-statement" + }, + { + "name": "keyword.control.conditional.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(else|if)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.control.with.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(with)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.control.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(package)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.other.debugger.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(debugger)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + } + ] + }, + "label": { + "patterns": [ + { + "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*\\{)", + "beginCaptures": { + "1": { + "name": "entity.name.label.ts" + }, + "2": { + "name": "punctuation.separator.label.ts" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#decl-block" + } + ] + }, + { + "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)", + "captures": { + "1": { + "name": "entity.name.label.ts" + }, + "2": { + "name": "punctuation.separator.label.ts" + } + } + } + ] + }, + "expression": { + "patterns": [ + { + "include": "#expressionWithoutIdentifiers" + }, + { + "include": "#identifiers" + }, + { + "include": "#expressionPunctuations" + } + ] + }, + "expressionWithoutIdentifiers": { + "patterns": [ + { + "include": "#string" + }, + { + "include": "#regex" + }, + { + "include": "#comment" + }, + { + "include": "#function-expression" + }, + { + "include": "#class-expression" + }, + { + "include": "#arrow-function" + }, + { + "include": "#paren-expression-possibly-arrow" + }, + { + "include": "#cast" + }, + { + "include": "#ternary-expression" + }, + { + "include": "#new-expr" + }, + { + "include": "#instanceof-expr" + }, + { + "include": "#object-literal" + }, + { + "include": "#expression-operators" + }, + { + "include": "#function-call" + }, + { + "include": "#literal" + }, + { + "include": "#support-objects" + }, + { + "include": "#paren-expression" + } + ] + }, + "expressionPunctuations": { + "patterns": [ + { + "include": "#punctuation-comma" + }, + { + "include": "#punctuation-accessor" + } + ] + }, + "decorator": { + "name": "meta.decorator.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\@", + "beginCaptures": { + "0": { + "name": "punctuation.decorator.ts" + } + }, + "end": "(?=\\s)", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "var-expr": { + "patterns": [ + { + "name": "meta.var.expr.ts", + "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))", + "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=^|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|((?<!^let|[^\\._$[:alnum:]]let|^var|[^\\._$[:alnum:]]var)(?=\\s*$)))", + "patterns": [ + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "storage.type.ts" + } + }, + "end": "(?=\\S)" + }, + { + "include": "#destructuring-variable" + }, + { + "include": "#var-single-variable" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#comment" + }, + { + "begin": "(,)\\s*(?=$|\\/\\/)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.comma.ts" + } + }, + "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))", + "patterns": [ + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#comment" + }, + { + "include": "#destructuring-variable" + }, + { + "include": "#var-single-variable" + }, + { + "include": "#punctuation-comma" + } + ] + }, + { + "include": "#punctuation-comma" + } + ] + }, + { + "name": "meta.var.expr.ts", + "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))", + "beginCaptures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "storage.type.ts" + } + }, + "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=^|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|((?<!^const|[^\\._$[:alnum:]]const)(?=\\s*$)))", + "patterns": [ + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "storage.type.ts" + } + }, + "end": "(?=\\S)" + }, + { + "include": "#destructuring-const" + }, + { + "include": "#var-single-const" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#comment" + }, + { + "begin": "(,)\\s*(?=$|\\/\\/)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.comma.ts" + } + }, + "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))", + "patterns": [ + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#comment" + }, + { + "include": "#destructuring-const" + }, + { + "include": "#var-single-const" + }, + { + "include": "#punctuation-comma" + } + ] + }, + { + "include": "#punctuation-comma" + } + ] + }, + { + "name": "meta.var.expr.ts", + "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b((?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))", + "beginCaptures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "storage.type.ts" + } + }, + "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b((?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|((?<!^using|[^\\._$[:alnum:]]using|^await\\s+using|[^\\._$[:alnum:]]await\\s+using)(?=\\s*$)))", + "patterns": [ + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b((?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "storage.type.ts" + } + }, + "end": "(?=\\S)" + }, + { + "include": "#var-single-const" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#comment" + }, + { + "begin": "(,)\\s*((?!\\S)|(?=\\/\\/))", + "beginCaptures": { + "1": { + "name": "punctuation.separator.comma.ts" + } + }, + "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))", + "patterns": [ + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#comment" + }, + { + "include": "#var-single-const" + }, + { + "include": "#punctuation-comma" + } + ] + }, + { + "include": "#punctuation-comma" + } + ] + } + ] + }, + "var-single-variable": { + "patterns": [ + { + "name": "meta.var-single-variable.expr.ts", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "beginCaptures": { + "1": { + "name": "meta.definition.variable.ts entity.name.function.ts" + }, + "2": { + "name": "keyword.operator.definiteassignment.ts" + } + }, + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", + "patterns": [ + { + "include": "#var-single-variable-type-annotation" + } + ] + }, + { + "name": "meta.var-single-variable.expr.ts", + "begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\\!)?", + "beginCaptures": { + "1": { + "name": "meta.definition.variable.ts variable.other.constant.ts" + }, + "2": { + "name": "keyword.operator.definiteassignment.ts" + } + }, + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", + "patterns": [ + { + "include": "#var-single-variable-type-annotation" + } + ] + }, + { + "name": "meta.var-single-variable.expr.ts", + "begin": "([_$[:alpha:]][_$[:alnum:]]*)(\\!)?", + "beginCaptures": { + "1": { + "name": "meta.definition.variable.ts variable.other.readwrite.ts" + }, + "2": { + "name": "keyword.operator.definiteassignment.ts" + } + }, + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", + "patterns": [ + { + "include": "#var-single-variable-type-annotation" + } + ] + } + ] + }, + "var-single-const": { + "patterns": [ + { + "name": "meta.var-single-variable.expr.ts", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "beginCaptures": { + "1": { + "name": "meta.definition.variable.ts variable.other.constant.ts entity.name.function.ts" + } + }, + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", + "patterns": [ + { + "include": "#var-single-variable-type-annotation" + } + ] + }, + { + "name": "meta.var-single-variable.expr.ts", + "begin": "([_$[:alpha:]][_$[:alnum:]]*)", + "beginCaptures": { + "1": { + "name": "meta.definition.variable.ts variable.other.constant.ts" + } + }, + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", + "patterns": [ + { + "include": "#var-single-variable-type-annotation" + } + ] + } + ] + }, + "var-single-variable-type-annotation": { + "patterns": [ + { + "include": "#type-annotation" + }, + { + "include": "#string" + }, + { + "include": "#comment" + } + ] + }, + "destructuring-variable": { + "patterns": [ + { + "name": "meta.object-binding-pattern-variable.ts", + "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)", + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", + "patterns": [ + { + "include": "#object-binding-pattern" + }, + { + "include": "#type-annotation" + }, + { + "include": "#comment" + } + ] + }, + { + "name": "meta.array-binding-pattern-variable.ts", + "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)", + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", + "patterns": [ + { + "include": "#array-binding-pattern" + }, + { + "include": "#type-annotation" + }, + { + "include": "#comment" + } + ] + } + ] + }, + "destructuring-const": { + "patterns": [ + { + "name": "meta.object-binding-pattern-variable.ts", + "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)", + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", + "patterns": [ + { + "include": "#object-binding-pattern-const" + }, + { + "include": "#type-annotation" + }, + { + "include": "#comment" + } + ] + }, + { + "name": "meta.array-binding-pattern-variable.ts", + "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)", + "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", + "patterns": [ + { + "include": "#array-binding-pattern-const" + }, + { + "include": "#type-annotation" + }, + { + "include": "#comment" + } + ] + } + ] + }, + "object-binding-element": { + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", + "end": "(?=,|\\})", + "patterns": [ + { + "include": "#object-binding-element-propertyName" + }, + { + "include": "#binding-element" + } + ] + }, + { + "include": "#object-binding-pattern" + }, + { + "include": "#destructuring-variable-rest" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "object-binding-element-const": { + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", + "end": "(?=,|\\})", + "patterns": [ + { + "include": "#object-binding-element-propertyName" + }, + { + "include": "#binding-element-const" + } + ] + }, + { + "include": "#object-binding-pattern-const" + }, + { + "include": "#destructuring-variable-rest-const" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "object-binding-element-propertyName": { + "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", + "end": "(:)", + "endCaptures": { + "0": { + "name": "punctuation.destructuring.ts" + } + }, + "patterns": [ + { + "include": "#string" + }, + { + "include": "#array-literal" + }, + { + "include": "#numeric-literal" + }, + { + "name": "variable.object.property.ts", + "match": "([_$[:alpha:]][_$[:alnum:]]*)" + } + ] + }, + "binding-element": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "include": "#numeric-literal" + }, + { + "include": "#regex" + }, + { + "include": "#object-binding-pattern" + }, + { + "include": "#array-binding-pattern" + }, + { + "include": "#destructuring-variable-rest" + }, + { + "include": "#variable-initializer" + } + ] + }, + "binding-element-const": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "include": "#numeric-literal" + }, + { + "include": "#regex" + }, + { + "include": "#object-binding-pattern-const" + }, + { + "include": "#array-binding-pattern-const" + }, + { + "include": "#destructuring-variable-rest-const" + }, + { + "include": "#variable-initializer" + } + ] + }, + "destructuring-variable-rest": { + "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "keyword.operator.rest.ts" + }, + "2": { + "name": "meta.definition.variable.ts variable.other.readwrite.ts" + } + } + }, + "destructuring-variable-rest-const": { + "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "keyword.operator.rest.ts" + }, + "2": { + "name": "meta.definition.variable.ts variable.other.constant.ts" + } + } + }, + "object-binding-pattern": { + "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", + "beginCaptures": { + "1": { + "name": "keyword.operator.rest.ts" + }, + "2": { + "name": "punctuation.definition.binding-pattern.object.ts" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.binding-pattern.object.ts" + } + }, + "patterns": [ + { + "include": "#object-binding-element" + } + ] + }, + "object-binding-pattern-const": { + "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", + "beginCaptures": { + "1": { + "name": "keyword.operator.rest.ts" + }, + "2": { + "name": "punctuation.definition.binding-pattern.object.ts" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.binding-pattern.object.ts" + } + }, + "patterns": [ + { + "include": "#object-binding-element-const" + } + ] + }, + "array-binding-pattern": { + "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", + "beginCaptures": { + "1": { + "name": "keyword.operator.rest.ts" + }, + "2": { + "name": "punctuation.definition.binding-pattern.array.ts" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.binding-pattern.array.ts" + } + }, + "patterns": [ + { + "include": "#binding-element" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "array-binding-pattern-const": { + "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", + "beginCaptures": { + "1": { + "name": "keyword.operator.rest.ts" + }, + "2": { + "name": "punctuation.definition.binding-pattern.array.ts" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.binding-pattern.array.ts" + } + }, + "patterns": [ + { + "include": "#binding-element-const" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "parameter-name": { + "patterns": [ + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)", + "captures": { + "1": { + "name": "storage.modifier.ts" + } + } + }, + { + "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "1": { + "name": "storage.modifier.ts" + }, + "2": { + "name": "keyword.operator.rest.ts" + }, + "3": { + "name": "entity.name.function.ts variable.language.this.ts" + }, + "4": { + "name": "entity.name.function.ts" + }, + "5": { + "name": "keyword.operator.optional.ts" + } + } + }, + { + "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)", + "captures": { + "1": { + "name": "storage.modifier.ts" + }, + "2": { + "name": "keyword.operator.rest.ts" + }, + "3": { + "name": "variable.parameter.ts variable.language.this.ts" + }, + "4": { + "name": "variable.parameter.ts" + }, + "5": { + "name": "keyword.operator.optional.ts" + } + } + } + ] + }, + "destructuring-parameter": { + "patterns": [ + { + "name": "meta.parameter.object-binding-pattern.ts", + "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\{)", + "beginCaptures": { + "1": { + "name": "keyword.operator.rest.ts" + }, + "2": { + "name": "punctuation.definition.binding-pattern.object.ts" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.binding-pattern.object.ts" + } + }, + "patterns": [ + { + "include": "#parameter-object-binding-element" + } + ] + }, + { + "name": "meta.paramter.array-binding-pattern.ts", + "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\[)", + "beginCaptures": { + "1": { + "name": "keyword.operator.rest.ts" + }, + "2": { + "name": "punctuation.definition.binding-pattern.array.ts" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.binding-pattern.array.ts" + } + }, + "patterns": [ + { + "include": "#parameter-binding-element" + }, + { + "include": "#punctuation-comma" + } + ] + } + ] + }, + "parameter-object-binding-element": { + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", + "end": "(?=,|\\})", + "patterns": [ + { + "include": "#object-binding-element-propertyName" + }, + { + "include": "#parameter-binding-element" + }, + { + "include": "#paren-expression" + } + ] + }, + { + "include": "#parameter-object-binding-pattern" + }, + { + "include": "#destructuring-parameter-rest" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "parameter-binding-element": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "include": "#numeric-literal" + }, + { + "include": "#regex" + }, + { + "include": "#parameter-object-binding-pattern" + }, + { + "include": "#parameter-array-binding-pattern" + }, + { + "include": "#destructuring-parameter-rest" + }, + { + "include": "#variable-initializer" + } + ] + }, + "destructuring-parameter-rest": { + "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "keyword.operator.rest.ts" + }, + "2": { + "name": "variable.parameter.ts" + } + } + }, + "parameter-object-binding-pattern": { + "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", + "beginCaptures": { + "1": { + "name": "keyword.operator.rest.ts" + }, + "2": { + "name": "punctuation.definition.binding-pattern.object.ts" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.binding-pattern.object.ts" + } + }, + "patterns": [ + { + "include": "#parameter-object-binding-element" + } + ] + }, + "parameter-array-binding-pattern": { + "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", + "beginCaptures": { + "1": { + "name": "keyword.operator.rest.ts" + }, + "2": { + "name": "punctuation.definition.binding-pattern.array.ts" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.binding-pattern.array.ts" + } + }, + "patterns": [ + { + "include": "#parameter-binding-element" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "field-declaration": { + "name": "meta.field.declaration.ts", + "begin": "(?x)(?<!\\()(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s+)?(?=\\s*((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|(\\#?[_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|\\}|$))", + "beginCaptures": { + "1": { + "name": "storage.modifier.ts" + } + }, + "end": "(?x)(?=\\}|;|,|$|(^(?!\\s*((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|(\\#?[_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|$))))|(?<=\\})", + "patterns": [ + { + "include": "#variable-initializer" + }, + { + "include": "#type-annotation" + }, + { + "include": "#string" + }, + { + "include": "#array-literal" + }, + { + "include": "#numeric-literal" + }, + { + "include": "#comment" + }, + { + "match": "(?x)(\\#?[_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "1": { + "name": "meta.definition.property.ts entity.name.function.ts" + }, + "2": { + "name": "keyword.operator.optional.ts" + }, + "3": { + "name": "keyword.operator.definiteassignment.ts" + } + } + }, + { + "name": "meta.definition.property.ts variable.object.property.ts", + "match": "\\#?[_$[:alpha:]][_$[:alnum:]]*" + }, + { + "name": "keyword.operator.optional.ts", + "match": "\\?" + }, + { + "name": "keyword.operator.definiteassignment.ts", + "match": "\\!" + } + ] + }, + "variable-initializer": { + "patterns": [ + { + "begin": "(?<!=|!)(=)(?!=)(?=\\s*\\S)(?!\\s*.*=>\\s*$)", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.ts" + } + }, + "end": "(?=$|^|[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "begin": "(?<!=|!)(=)(?!=)", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.ts" + } + }, + "end": "(?=[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))|(?=^\\s*$)|(?<![\\|\\&\\+\\-\\*\\/])(?<=\\S)(?<!=)(?=\\s*$)", + "patterns": [ + { + "include": "#expression" + } + ] + } + ] + }, + "function-declaration": { + "name": "meta.function.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "storage.modifier.async.ts" + }, + "4": { + "name": "storage.type.function.ts" + }, + "5": { + "name": "keyword.generator.asterisk.ts" + }, + "6": { + "name": "meta.definition.function.ts entity.name.function.ts" + } + }, + "end": "(?=;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|(?<=\\})", + "patterns": [ + { + "include": "#function-name" + }, + { + "include": "#function-body" + } + ] + }, + "function-expression": { + "name": "meta.function.expression.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.ts" + }, + "2": { + "name": "storage.type.function.ts" + }, + "3": { + "name": "keyword.generator.asterisk.ts" + }, + "4": { + "name": "meta.definition.function.ts entity.name.function.ts" + } + }, + "end": "(?=;)|(?<=\\})", + "patterns": [ + { + "include": "#function-name" + }, + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#function-body" + } + ] + }, + "function-name": { + "name": "meta.definition.function.ts entity.name.function.ts", + "match": "[_$[:alpha:]][_$[:alnum:]]*" + }, + "function-body": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-parameters" + }, + { + "include": "#function-parameters" + }, + { + "include": "#return-type" + }, + { + "include": "#type-function-return-type" + }, + { + "include": "#decl-block" + }, + { + "name": "keyword.generator.asterisk.ts", + "match": "\\*" + } + ] + }, + "method-declaration": { + "patterns": [ + { + "name": "meta.method.declaration.ts", + "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?\\s*\\b(constructor)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "1": { + "name": "storage.modifier.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "storage.modifier.ts" + }, + "4": { + "name": "storage.modifier.async.ts" + }, + "5": { + "name": "storage.type.ts" + } + }, + "end": "(?=\\}|;|,|$)|(?<=\\})", + "patterns": [ + { + "include": "#method-declaration-name" + }, + { + "include": "#function-body" + } + ] + }, + { + "name": "meta.method.declaration.ts", + "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\s*\\b(new)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(?:(\\*)\\s*)?)(?=\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", + "beginCaptures": { + "1": { + "name": "storage.modifier.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "storage.modifier.ts" + }, + "4": { + "name": "storage.modifier.async.ts" + }, + "5": { + "name": "keyword.operator.new.ts" + }, + "6": { + "name": "keyword.generator.asterisk.ts" + } + }, + "end": "(?=\\}|;|,|$)|(?<=\\})", + "patterns": [ + { + "include": "#method-declaration-name" + }, + { + "include": "#function-body" + } + ] + }, + { + "name": "meta.method.declaration.ts", + "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", + "beginCaptures": { + "1": { + "name": "storage.modifier.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "storage.modifier.ts" + }, + "4": { + "name": "storage.modifier.async.ts" + }, + "5": { + "name": "storage.type.property.ts" + }, + "6": { + "name": "keyword.generator.asterisk.ts" + } + }, + "end": "(?=\\}|;|,|$)|(?<=\\})", + "patterns": [ + { + "include": "#method-declaration-name" + }, + { + "include": "#function-body" + } + ] + } + ] + }, + "object-literal-method-declaration": { + "name": "meta.method.declaration.ts", + "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.ts" + }, + "2": { + "name": "storage.type.property.ts" + }, + "3": { + "name": "keyword.generator.asterisk.ts" + } + }, + "end": "(?=\\}|;|,)|(?<=\\})", + "patterns": [ + { + "include": "#method-declaration-name" + }, + { + "include": "#function-body" + }, + { + "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.ts" + }, + "2": { + "name": "storage.type.property.ts" + }, + "3": { + "name": "keyword.generator.asterisk.ts" + } + }, + "end": "(?=\\(|\\<)", + "patterns": [ + { + "include": "#method-declaration-name" + } + ] + } + ] + }, + "method-declaration-name": { + "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])", + "end": "(?=\\(|\\<)", + "patterns": [ + { + "include": "#string" + }, + { + "include": "#array-literal" + }, + { + "include": "#numeric-literal" + }, + { + "name": "meta.definition.method.ts entity.name.function.ts", + "match": "[_$[:alpha:]][_$[:alnum:]]*" + }, + { + "name": "keyword.operator.optional.ts", + "match": "\\?" + } + ] + }, + "arrow-function": { + "patterns": [ + { + "name": "meta.arrow.ts", + "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)", + "captures": { + "1": { + "name": "storage.modifier.async.ts" + }, + "2": { + "name": "variable.parameter.ts" + } + } + }, + { + "name": "meta.arrow.ts", + "begin": "(?x) (?:\n (?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.ts" + } + }, + "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-parameters" + }, + { + "include": "#function-parameters" + }, + { + "include": "#arrow-return-type" + }, + { + "include": "#possibly-arrow-return-type" + } + ] + }, + { + "name": "meta.arrow.ts", + "begin": "=>", + "beginCaptures": { + "0": { + "name": "storage.type.function.arrow.ts" + } + }, + "end": "((?<=\\}|\\S)(?<!=>)|((?!\\{)(?=\\S)))(?!\\/[\\/\\*])", + "patterns": [ + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#decl-block" + }, + { + "include": "#expression" + } + ] + } + ] + }, + "indexer-declaration": { + "name": "meta.indexer.declaration.ts", + "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)", + "beginCaptures": { + "1": { + "name": "storage.modifier.ts" + }, + "2": { + "name": "meta.brace.square.ts" + }, + "3": { + "name": "variable.parameter.ts" + } + }, + "end": "(\\])\\s*(\\?\\s*)?|$", + "endCaptures": { + "1": { + "name": "meta.brace.square.ts" + }, + "2": { + "name": "keyword.operator.optional.ts" + } + }, + "patterns": [ + { + "include": "#type-annotation" + } + ] + }, + "indexer-mapped-type-declaration": { + "name": "meta.indexer.mappedtype.declaration.ts", + "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([+-])?(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.modifier.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "meta.brace.square.ts" + }, + "4": { + "name": "entity.name.type.ts" + }, + "5": { + "name": "keyword.operator.expression.in.ts" + } + }, + "end": "(\\])([+-])?\\s*(\\?\\s*)?|$", + "endCaptures": { + "1": { + "name": "meta.brace.square.ts" + }, + "2": { + "name": "keyword.operator.type.modifier.ts" + }, + "3": { + "name": "keyword.operator.optional.ts" + } + }, + "patterns": [ + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+", + "captures": { + "1": { + "name": "keyword.control.as.ts" + } + } + }, + { + "include": "#type" + } + ] + }, + "function-parameters": { + "name": "meta.parameters.ts", + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.parameters.begin.ts" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.ts" + } + }, + "patterns": [ + { + "include": "#function-parameters-body" + } + ] + }, + "function-parameters-body": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "include": "#decorator" + }, + { + "include": "#destructuring-parameter" + }, + { + "include": "#parameter-name" + }, + { + "include": "#parameter-type-annotation" + }, + { + "include": "#variable-initializer" + }, + { + "name": "punctuation.separator.parameter.ts", + "match": "," + } + ] + }, + "class-declaration": { + "name": "meta.class.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[/*])", + "beginCaptures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "storage.modifier.ts" + }, + "4": { + "name": "storage.type.class.ts" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#class-declaration-or-expression-patterns" + } + ] + }, + "class-expression": { + "name": "meta.class.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(class)\\b(?=\\s+|[<{]|\\/[\\/*])", + "beginCaptures": { + "1": { + "name": "storage.modifier.ts" + }, + "2": { + "name": "storage.type.class.ts" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#class-declaration-or-expression-patterns" + } + ] + }, + "class-declaration-or-expression-patterns": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#class-or-interface-heritage" + }, + { + "match": "[_$[:alpha:]][_$[:alnum:]]*", + "captures": { + "0": { + "name": "entity.name.type.class.ts" + } + } + }, + { + "include": "#type-parameters" + }, + { + "include": "#class-or-interface-body" + } + ] + }, + "interface-declaration": { + "name": "meta.interface.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])", + "beginCaptures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "storage.modifier.ts" + }, + "4": { + "name": "storage.type.interface.ts" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#class-or-interface-heritage" + }, + { + "match": "[_$[:alpha:]][_$[:alnum:]]*", + "captures": { + "0": { + "name": "entity.name.type.interface.ts" + } + } + }, + { + "include": "#type-parameters" + }, + { + "include": "#class-or-interface-body" + } + ] + }, + "class-or-interface-heritage": { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(extends|implements)\\b)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "1": { + "name": "storage.modifier.ts" + } + }, + "end": "(?=\\{)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#class-or-interface-heritage" + }, + { + "include": "#type-parameters" + }, + { + "include": "#expressionWithoutIdentifiers" + }, + { + "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\??\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*)", + "captures": { + "1": { + "name": "entity.name.type.module.ts" + }, + "2": { + "name": "punctuation.accessor.ts" + }, + "3": { + "name": "punctuation.accessor.optional.ts" + } + } + }, + { + "match": "([_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "entity.other.inherited-class.ts" + } + } + }, + { + "include": "#expressionPunctuations" + } + ] + }, + "class-or-interface-body": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.ts" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ts" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#decorator" + }, + { + "begin": "(?<=:)\\s*", + "end": "(?=\\s|[;),}\\]:\\-\\+]|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "include": "#method-declaration" + }, + { + "include": "#indexer-declaration" + }, + { + "include": "#field-declaration" + }, + { + "include": "#string" + }, + { + "include": "#type-annotation" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#access-modifier" + }, + { + "include": "#property-accessor" + }, + { + "include": "#async-modifier" + }, + { + "include": "#after-operator-block-as-object-literal" + }, + { + "include": "#decl-block" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "access-modifier": { + "name": "storage.modifier.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|declare|override|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + "property-accessor": { + "name": "storage.type.property.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(accessor|get|set)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + "async-modifier": { + "name": "storage.modifier.async.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(async)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + "enum-declaration": { + "name": "meta.enum.declaration.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)", + "beginCaptures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "storage.modifier.ts" + }, + "4": { + "name": "storage.type.enum.ts" + }, + "5": { + "name": "entity.name.type.enum.ts" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.ts" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ts" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "([_$[:alpha:]][_$[:alnum:]]*)", + "beginCaptures": { + "0": { + "name": "variable.other.enummember.ts" + } + }, + "end": "(?=,|\\}|$)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + } + ] + }, + { + "begin": "(?=((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))", + "end": "(?=,|\\}|$)", + "patterns": [ + { + "include": "#string" + }, + { + "include": "#array-literal" + }, + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + } + ] + }, + { + "include": "#punctuation-comma" + } + ] + } + ] + }, + "namespace-declaration": { + "name": "meta.namespace.declaration.ts", + "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`]))", + "beginCaptures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "storage.type.namespace.ts" + } + }, + "end": "(?<=\\})|(?=;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "name": "entity.name.type.module.ts", + "match": "([_$[:alpha:]][_$[:alnum:]]*)" + }, + { + "include": "#punctuation-accessor" + }, + { + "include": "#decl-block" + } + ] + }, + "type-alias-declaration": { + "name": "meta.type.declaration.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*", + "beginCaptures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "storage.type.type.ts" + }, + "4": { + "name": "entity.name.type.alias.ts" + } + }, + "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-parameters" + }, + { + "begin": "(=)\\s*(intrinsic)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.ts" + }, + "2": { + "name": "keyword.control.intrinsic.ts" + } + }, + "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "begin": "(=)\\s*", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.ts" + } + }, + "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#type" + } + ] + } + ] + }, + "import-equals-declaration": { + "patterns": [ + { + "name": "meta.import-equals.external.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "keyword.control.import.ts" + }, + "4": { + "name": "keyword.control.type.ts" + }, + "5": { + "name": "variable.other.readwrite.alias.ts" + }, + "6": { + "name": "keyword.operator.assignment.ts" + }, + "7": { + "name": "keyword.control.require.ts" + }, + "8": { + "name": "meta.brace.round.ts" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.ts" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + } + ] + }, + { + "name": "meta.import-equals.internal.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)", + "beginCaptures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "keyword.control.import.ts" + }, + "4": { + "name": "keyword.control.type.ts" + }, + "5": { + "name": "variable.other.readwrite.alias.ts" + }, + "6": { + "name": "keyword.operator.assignment.ts" + } + }, + "end": "(?=;|$|^)", + "patterns": [ + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#comment" + }, + { + "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", + "captures": { + "1": { + "name": "entity.name.type.module.ts" + }, + "2": { + "name": "punctuation.accessor.ts" + }, + "3": { + "name": "punctuation.accessor.optional.ts" + } + } + }, + { + "name": "variable.other.readwrite.ts", + "match": "([_$[:alpha:]][_$[:alnum:]]*)" + } + ] + } + ] + }, + "import-declaration": { + "name": "meta.import.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type)(?!\\s+from))?(?!\\s*[:\\(])(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "keyword.control.import.ts" + }, + "4": { + "name": "keyword.control.type.ts" + } + }, + "end": "(?<!^import|[^\\._$[:alnum:]]import)(?=;|$|^)", + "patterns": [ + { + "include": "#single-line-comment-consuming-line-ending" + }, + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "begin": "(?<=^import|[^\\._$[:alnum:]]import)(?!\\s*[\"'])", + "end": "\\bfrom\\b", + "endCaptures": { + "0": { + "name": "keyword.control.from.ts" + } + }, + "patterns": [ + { + "include": "#import-export-declaration" + } + ] + }, + { + "include": "#import-export-declaration" + } + ] + }, + "export-declaration": { + "patterns": [ + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "keyword.control.as.ts" + }, + "3": { + "name": "storage.type.namespace.ts" + }, + "4": { + "name": "entity.name.type.module.ts" + } + } + }, + { + "name": "meta.export.default.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))", + "beginCaptures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "keyword.control.type.ts" + }, + "3": { + "name": "keyword.operator.assignment.ts" + }, + "4": { + "name": "keyword.control.default.ts" + } + }, + "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#interface-declaration" + }, + { + "include": "#expression" + } + ] + }, + { + "name": "meta.export.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?\\b(?!(\\$)|(\\s*:))((?=\\s*[\\{*])|((?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s|,))(?!\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", + "beginCaptures": { + "1": { + "name": "keyword.control.export.ts" + }, + "2": { + "name": "keyword.control.type.ts" + } + }, + "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#import-export-declaration" + } + ] + } + ] + }, + "import-export-declaration": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "include": "#import-export-block" + }, + { + "name": "keyword.control.from.ts", + "match": "\\bfrom\\b" + }, + { + "include": "#import-export-assert-clause" + }, + { + "include": "#import-export-clause" + } + ] + }, + "import-export-assert-clause": { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(assert)\\s*(\\{)", + "beginCaptures": { + "1": { + "name": "keyword.control.assert.ts" + }, + "2": { + "name": "punctuation.definition.block.ts" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ts" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "name": "meta.object-literal.key.ts", + "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)" + }, + { + "name": "punctuation.separator.key-value.ts", + "match": ":" + } + ] + }, + "import-export-block": { + "name": "meta.block.ts", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.ts" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ts" + } + }, + "patterns": [ + { + "include": "#import-export-clause" + } + ] + }, + "import-export-clause": { + "patterns": [ + { + "include": "#comment" + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*))", + "captures": { + "1": { + "name": "keyword.control.type.ts" + }, + "2": { + "name": "keyword.control.default.ts" + }, + "3": { + "name": "constant.language.import-export-all.ts" + }, + "4": { + "name": "variable.other.readwrite.ts" + }, + "5": { + "name": "keyword.control.as.ts" + }, + "6": { + "name": "keyword.control.default.ts" + }, + "7": { + "name": "variable.other.readwrite.alias.ts" + } + } + }, + { + "include": "#punctuation-comma" + }, + { + "name": "constant.language.import-export-all.ts", + "match": "\\*" + }, + { + "name": "keyword.control.default.ts", + "match": "\\b(default)\\b" + }, + { + "match": "(?:(\\btype)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "keyword.control.type.ts" + }, + "2": { + "name": "variable.other.readwrite.alias.ts" + } + } + } + ] + }, + "switch-statement": { + "name": "switch-statement.expr.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bswitch\\s*\\()", + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ts" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "name": "switch-expression.expr.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(switch)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.control.switch.ts" + }, + "2": { + "name": "meta.brace.round.ts" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.ts" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "switch-block.expr.ts", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.ts" + } + }, + "end": "(?=\\})", + "patterns": [ + { + "name": "case-clause.expr.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default(?=:))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "1": { + "name": "keyword.control.switch.ts" + } + }, + "end": "(?=:)", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "begin": "(:)\\s*(\\{)", + "beginCaptures": { + "1": { + "name": "case-clause.expr.ts punctuation.definition.section.case-statement.ts" + }, + "2": { + "name": "meta.block.ts punctuation.definition.block.ts" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "meta.block.ts punctuation.definition.block.ts" + } + }, + "contentName": "meta.block.ts", + "patterns": [ + { + "include": "#statements" + } + ] + }, + { + "match": "(:)", + "captures": { + "0": { + "name": "case-clause.expr.ts punctuation.definition.section.case-statement.ts" + } + } + }, + { + "include": "#statements" + } + ] + } + ] + }, + "for-loop": { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))for(?=((\\s+|(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*))await)?\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)?(\\())", + "beginCaptures": { + "0": { + "name": "keyword.control.loop.ts" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#comment" + }, + { + "name": "keyword.control.loop.ts", + "match": "await" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.ts" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.ts" + } + }, + "patterns": [ + { + "include": "#var-expr" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-semicolon" + } + ] + } + ] + }, + "if-statement": { + "patterns": [ + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bif\\s*(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))\\s*(?!\\{))", + "end": "(?=;|$|\\})", + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(if)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.control.conditional.ts" + }, + "2": { + "name": "meta.brace.round.ts" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.ts" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "string.regexp.ts", + "begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ts" + } + }, + "end": "(/)([dgimsuy]*)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.ts" + }, + "2": { + "name": "keyword.other.ts" + } + }, + "patterns": [ + { + "include": "#regexp" + } + ] + }, + { + "include": "#statements" + } + ] + } + ] + }, + "decl-block": { + "name": "meta.block.ts", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.ts" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ts" + } + }, + "patterns": [ + { + "include": "#statements" + } + ] + }, + "after-operator-block-as-object-literal": { + "name": "meta.objectliteral.ts", + "begin": "(?<!\\+\\+|--)(?<=[:=(,\\[?+!>]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.block.ts" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ts" + } + }, + "patterns": [ + { + "include": "#object-member" + } + ] + }, + "object-literal": { + "name": "meta.objectliteral.ts", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.ts" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ts" + } + }, + "patterns": [ + { + "include": "#object-member" + } + ] + }, + "object-member": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#object-literal-method-declaration" + }, + { + "name": "meta.object.member.ts meta.object-literal.key.ts", + "begin": "(?=\\[)", + "end": "(?=:)|((?<=[\\]])(?=\\s*[\\(\\<]))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#array-literal" + } + ] + }, + { + "name": "meta.object.member.ts meta.object-literal.key.ts", + "begin": "(?=[\\'\\\"\\`])", + "end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\s+(as|satisifies)\\s+))))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string" + } + ] + }, + { + "name": "meta.object.member.ts meta.object-literal.key.ts", + "begin": "(?x)(?=(\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)))", + "end": "(?=:)|(?=\\s*([\\(\\<,}])|(\\s+as|satisifies\\s+))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#numeric-literal" + } + ] + }, + { + "name": "meta.method.declaration.ts", + "begin": "(?<=[\\]\\'\\\"\\`])(?=\\s*[\\(\\<])", + "end": "(?=\\}|;|,)|(?<=\\})", + "patterns": [ + { + "include": "#function-body" + } + ] + }, + { + "name": "meta.object.member.ts", + "match": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)", + "captures": { + "0": { + "name": "meta.object-literal.key.ts" + }, + "1": { + "name": "constant.numeric.decimal.ts" + } + } + }, + { + "name": "meta.object.member.ts", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "0": { + "name": "meta.object-literal.key.ts" + }, + "1": { + "name": "entity.name.function.ts" + } + } + }, + { + "name": "meta.object.member.ts", + "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)", + "captures": { + "0": { + "name": "meta.object-literal.key.ts" + } + } + }, + { + "name": "meta.object.member.ts", + "begin": "\\.\\.\\.", + "beginCaptures": { + "0": { + "name": "keyword.operator.spread.ts" + } + }, + "end": "(?=,|\\})", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "meta.object.member.ts", + "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$|\\/\\/|\\/\\*)", + "captures": { + "1": { + "name": "variable.other.readwrite.ts" + } + } + }, + { + "name": "meta.object.member.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))", + "captures": { + "1": { + "name": "keyword.control.as.ts" + }, + "2": { + "name": "storage.modifier.ts" + } + } + }, + { + "name": "meta.object.member.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+", + "beginCaptures": { + "1": { + "name": "keyword.control.as.ts" + }, + "2": { + "name": "keyword.control.satisfies.ts" + } + }, + "end": "(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|^|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisifies)\\s+))", + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "name": "meta.object.member.ts", + "begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)", + "end": "(?=,|\\}|$|\\/\\/|\\/\\*)", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "name": "meta.object.member.ts", + "begin": ":", + "beginCaptures": { + "0": { + "name": "meta.object-literal.key.ts punctuation.separator.key-value.ts" + } + }, + "end": "(?=,|\\})", + "patterns": [ + { + "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.ts" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#type-parameters" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.ts" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.ts" + } + }, + "patterns": [ + { + "include": "#expression-inside-possibly-arrow-parens" + } + ] + } + ] + }, + { + "begin": "(?<=:)\\s*(async)?\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.ts" + }, + "2": { + "name": "meta.brace.round.ts" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.ts" + } + }, + "patterns": [ + { + "include": "#expression-inside-possibly-arrow-parens" + } + ] + }, + { + "begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.ts" + } + }, + "end": "(?<=\\>)", + "patterns": [ + { + "include": "#type-parameters" + } + ] + }, + { + "begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", + "beginCaptures": { + "1": { + "name": "meta.brace.round.ts" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.ts" + } + }, + "patterns": [ + { + "include": "#expression-inside-possibly-arrow-parens" + } + ] + }, + { + "include": "#possibly-arrow-return-type" + }, + { + "include": "#expression" + } + ] + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#decl-block" + } + ] + }, + "ternary-expression": { + "begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)(?!\\?)", + "beginCaptures": { + "1": { + "name": "keyword.operator.ternary.ts" + } + }, + "end": "\\s*(:)", + "endCaptures": { + "1": { + "name": "keyword.operator.ternary.ts" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "function-call": { + "patterns": [ + { + "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())", + "end": "(?<=\\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())", + "patterns": [ + { + "name": "meta.function-call.ts", + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))", + "end": "(?=\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())", + "patterns": [ + { + "include": "#function-call-target" + } + ] + }, + { + "include": "#comment" + }, + { + "include": "#function-call-optionals" + }, + { + "include": "#type-arguments" + }, + { + "include": "#paren-expression" + } + ] + }, + { + "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))", + "end": "(?<=\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))", + "patterns": [ + { + "name": "meta.function-call.ts", + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))", + "end": "(?=(<\\s*[\\{\\[\\(]\\s*$))", + "patterns": [ + { + "include": "#function-call-target" + } + ] + }, + { + "include": "#comment" + }, + { + "include": "#function-call-optionals" + }, + { + "include": "#type-arguments" + } + ] + } + ] + }, + "function-call-target": { + "patterns": [ + { + "include": "#support-function-call-identifiers" + }, + { + "name": "entity.name.function.ts", + "match": "(\\#?[_$[:alpha:]][_$[:alnum:]]*)" + } + ] + }, + "function-call-optionals": { + "patterns": [ + { + "name": "meta.function-call.ts punctuation.accessor.optional.ts", + "match": "\\?\\." + }, + { + "name": "meta.function-call.ts keyword.operator.definiteassignment.ts", + "match": "\\!" + } + ] + }, + "support-function-call-identifiers": { + "patterns": [ + { + "include": "#literal" + }, + { + "include": "#support-objects" + }, + { + "include": "#object-identifiers" + }, + { + "include": "#punctuation-accessor" + }, + { + "name": "keyword.operator.expression.import.ts", + "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*[\\(]\\s*[\\\"\\'\\`]))" + } + ] + }, + "new-expr": { + "name": "new.expr.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "1": { + "name": "keyword.operator.new.ts" + } + }, + "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "instanceof-expr": { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(instanceof)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "1": { + "name": "keyword.operator.expression.instanceof.ts" + } + }, + "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|(===|!==|==|!=)|(([\\&\\~\\^\\|]\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s+instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))", + "patterns": [ + { + "include": "#type" + } + ] + }, + "paren-expression-possibly-arrow": { + "patterns": [ + { + "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.ts" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#paren-expression-possibly-arrow-with-typeparameters" + } + ] + }, + { + "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\()|(<)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)))\\s*$)", + "beginCaptures": { + "1": { + "name": "storage.modifier.async.ts" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#paren-expression-possibly-arrow-with-typeparameters" + } + ] + }, + { + "include": "#possibly-arrow-return-type" + } + ] + }, + "paren-expression-possibly-arrow-with-typeparameters": { + "patterns": [ + { + "include": "#type-parameters" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.ts" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.ts" + } + }, + "patterns": [ + { + "include": "#expression-inside-possibly-arrow-parens" + } + ] + } + ] + }, + "expression-inside-possibly-arrow-parens": { + "patterns": [ + { + "include": "#expressionWithoutIdentifiers" + }, + { + "include": "#comment" + }, + { + "include": "#string" + }, + { + "include": "#decorator" + }, + { + "include": "#destructuring-parameter" + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)", + "captures": { + "1": { + "name": "storage.modifier.ts" + } + } + }, + { + "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "captures": { + "1": { + "name": "storage.modifier.ts" + }, + "2": { + "name": "keyword.operator.rest.ts" + }, + "3": { + "name": "entity.name.function.ts variable.language.this.ts" + }, + "4": { + "name": "entity.name.function.ts" + }, + "5": { + "name": "keyword.operator.optional.ts" + } + } + }, + { + "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*[:,]|$)", + "captures": { + "1": { + "name": "storage.modifier.ts" + }, + "2": { + "name": "keyword.operator.rest.ts" + }, + "3": { + "name": "variable.parameter.ts variable.language.this.ts" + }, + "4": { + "name": "variable.parameter.ts" + }, + "5": { + "name": "keyword.operator.optional.ts" + } + } + }, + { + "include": "#type-annotation" + }, + { + "include": "#variable-initializer" + }, + { + "name": "punctuation.separator.parameter.ts", + "match": "," + }, + { + "include": "#identifiers" + }, + { + "include": "#expressionPunctuations" + } + ] + }, + "paren-expression": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.ts" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.ts" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "cast": { + "patterns": [ + { + "name": "cast.expr.ts", + "match": "\\s*(<)\\s*(const)\\s*(>)", + "captures": { + "1": { + "name": "meta.brace.angle.ts" + }, + "2": { + "name": "storage.modifier.ts" + }, + "3": { + "name": "meta.brace.angle.ts" + } + } + }, + { + "name": "cast.expr.ts", + "begin": "(?:(?<!\\+\\+|--)(?<=^return|[^\\._$[:alnum:]]return|^throw|[^\\._$[:alnum:]]throw|^yield|[^\\._$[:alnum:]]yield|^await|[^\\._$[:alnum:]]await|^default|[^\\._$[:alnum:]]default|[=(,:>*?\\&\\|\\^]|[^_$[:alnum:]](?:\\+\\+|\\-\\-)|[^\\+]\\+|[^\\-]\\-))\\s*(<)(?!<?\\=)(?!\\s*$)", + "beginCaptures": { + "1": { + "name": "meta.brace.angle.ts" + } + }, + "end": "(\\>)", + "endCaptures": { + "1": { + "name": "meta.brace.angle.ts" + } + }, + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "name": "cast.expr.ts", + "begin": "(?:(?<=^))\\s*(<)(?=[_$[:alpha:]][_$[:alnum:]]*\\s*>)", + "beginCaptures": { + "1": { + "name": "meta.brace.angle.ts" + } + }, + "end": "(\\>)", + "endCaptures": { + "1": { + "name": "meta.brace.angle.ts" + } + }, + "patterns": [ + { + "include": "#type" + } + ] + } + ] + }, + "expression-operators": { + "patterns": [ + { + "name": "keyword.control.flow.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(await)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?=\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*\\*)", + "beginCaptures": { + "1": { + "name": "keyword.control.flow.ts" + } + }, + "end": "\\*", + "endCaptures": { + "0": { + "name": "keyword.generator.asterisk.ts" + } + }, + "patterns": [ + { + "include": "#comment" + } + ] + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s*(\\*))?", + "captures": { + "1": { + "name": "keyword.control.flow.ts" + }, + "2": { + "name": "keyword.generator.asterisk.ts" + } + } + }, + { + "name": "keyword.operator.expression.delete.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))delete(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.operator.expression.in.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))in(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()" + }, + { + "name": "keyword.operator.expression.of.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))of(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()" + }, + { + "name": "keyword.operator.expression.instanceof.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.operator.new.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "include": "#typeof-operator" + }, + { + "name": "keyword.operator.expression.void.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[;,:})\\]]))", + "captures": { + "1": { + "name": "keyword.control.as.ts" + }, + "2": { + "name": "storage.modifier.ts" + } + } + }, + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+", + "beginCaptures": { + "1": { + "name": "keyword.control.as.ts" + }, + "2": { + "name": "keyword.control.satisfies.ts" + } + }, + "end": "(?=^|[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisfies)\\s+)|(\\s+\\<))", + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "name": "keyword.operator.spread.ts", + "match": "\\.\\.\\." + }, + { + "name": "keyword.operator.assignment.compound.ts", + "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-=" + }, + { + "name": "keyword.operator.assignment.compound.bitwise.ts", + "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|=" + }, + { + "name": "keyword.operator.bitwise.shift.ts", + "match": "<<|>>>|>>" + }, + { + "name": "keyword.operator.comparison.ts", + "match": "===|!==|==|!=" + }, + { + "name": "keyword.operator.relational.ts", + "match": "<=|>=|<>|<|>" + }, + { + "match": "(?<=[_$[:alnum:]])(\\!)\\s*(?:(/=)|(?:(/)(?![/*])))", + "captures": { + "1": { + "name": "keyword.operator.logical.ts" + }, + "2": { + "name": "keyword.operator.assignment.compound.ts" + }, + "3": { + "name": "keyword.operator.arithmetic.ts" + } + } + }, + { + "name": "keyword.operator.logical.ts", + "match": "\\!|&&|\\|\\||\\?\\?" + }, + { + "name": "keyword.operator.bitwise.ts", + "match": "\\&|~|\\^|\\|" + }, + { + "name": "keyword.operator.assignment.ts", + "match": "\\=" + }, + { + "name": "keyword.operator.decrement.ts", + "match": "--" + }, + { + "name": "keyword.operator.increment.ts", + "match": "\\+\\+" + }, + { + "name": "keyword.operator.arithmetic.ts", + "match": "%|\\*|/|-|\\+" + }, + { + "begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(?:(/=)|(?:(/)(?![/*]))))", + "end": "(?:(/=)|(?:(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)))", + "endCaptures": { + "1": { + "name": "keyword.operator.assignment.compound.ts" + }, + "2": { + "name": "keyword.operator.arithmetic.ts" + } + }, + "patterns": [ + { + "include": "#comment" + } + ] + }, + { + "match": "(?<=[_$[:alnum:])\\]])\\s*(?:(/=)|(?:(/)(?![/*])))", + "captures": { + "1": { + "name": "keyword.operator.assignment.compound.ts" + }, + "2": { + "name": "keyword.operator.arithmetic.ts" + } + } + } + ] + }, + "typeof-operator": { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))typeof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "beginCaptures": { + "0": { + "name": "keyword.operator.expression.typeof.ts" + } + }, + "end": "(?=[,);}\\]=>:&|{\\?]|(extends\\s+)|$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", + "patterns": [ + { + "include": "#type-arguments" + }, + { + "include": "#expression" + } + ] + }, + "literal": { + "patterns": [ + { + "include": "#numeric-literal" + }, + { + "include": "#boolean-literal" + }, + { + "include": "#null-literal" + }, + { + "include": "#undefined-literal" + }, + { + "include": "#numericConstant-literal" + }, + { + "include": "#array-literal" + }, + { + "include": "#this-literal" + }, + { + "include": "#super-literal" + } + ] + }, + "array-literal": { + "name": "meta.array.literal.ts", + "begin": "\\s*(\\[)", + "beginCaptures": { + "1": { + "name": "meta.brace.square.ts" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "meta.brace.square.ts" + } + }, + "patterns": [ + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "numeric-literal": { + "patterns": [ + { + "name": "constant.numeric.hex.ts", + "match": "\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$)", + "captures": { + "1": { + "name": "storage.type.numeric.bigint.ts" + } + } + }, + { + "name": "constant.numeric.binary.ts", + "match": "\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$)", + "captures": { + "1": { + "name": "storage.type.numeric.bigint.ts" + } + } + }, + { + "name": "constant.numeric.octal.ts", + "match": "\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$)", + "captures": { + "1": { + "name": "storage.type.numeric.bigint.ts" + } + } + }, + { + "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)", + "captures": { + "0": { + "name": "constant.numeric.decimal.ts" + }, + "1": { + "name": "meta.delimiter.decimal.period.ts" + }, + "2": { + "name": "storage.type.numeric.bigint.ts" + }, + "3": { + "name": "meta.delimiter.decimal.period.ts" + }, + "4": { + "name": "storage.type.numeric.bigint.ts" + }, + "5": { + "name": "meta.delimiter.decimal.period.ts" + }, + "6": { + "name": "storage.type.numeric.bigint.ts" + }, + "7": { + "name": "storage.type.numeric.bigint.ts" + }, + "8": { + "name": "meta.delimiter.decimal.period.ts" + }, + "9": { + "name": "storage.type.numeric.bigint.ts" + }, + "10": { + "name": "meta.delimiter.decimal.period.ts" + }, + "11": { + "name": "storage.type.numeric.bigint.ts" + }, + "12": { + "name": "meta.delimiter.decimal.period.ts" + }, + "13": { + "name": "storage.type.numeric.bigint.ts" + }, + "14": { + "name": "storage.type.numeric.bigint.ts" + } + } + } + ] + }, + "boolean-literal": { + "patterns": [ + { + "name": "constant.language.boolean.true.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))true(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "constant.language.boolean.false.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))false(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + } + ] + }, + "null-literal": { + "name": "constant.language.null.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))null(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + "this-literal": { + "name": "variable.language.this.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))this\\b(?!\\$)" + }, + "super-literal": { + "name": "variable.language.super.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))super\\b(?!\\$)" + }, + "undefined-literal": { + "name": "constant.language.undefined.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))undefined(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + "numericConstant-literal": { + "patterns": [ + { + "name": "constant.language.nan.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))NaN(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "constant.language.infinity.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Infinity(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + } + ] + }, + "support-objects": { + "patterns": [ + { + "name": "variable.language.arguments.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)" + }, + { + "name": "support.class.promise.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Promise)\\b(?!\\$)" + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(meta)\\b(?!\\$)", + "captures": { + "1": { + "name": "keyword.control.import.ts" + }, + "2": { + "name": "punctuation.accessor.ts" + }, + "3": { + "name": "punctuation.accessor.optional.ts" + }, + "4": { + "name": "support.variable.property.importmeta.ts" + } + } + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(target)\\b(?!\\$)", + "captures": { + "1": { + "name": "keyword.operator.new.ts" + }, + "2": { + "name": "punctuation.accessor.ts" + }, + "3": { + "name": "punctuation.accessor.optional.ts" + }, + "4": { + "name": "support.variable.property.target.ts" + } + } + }, + { + "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))", + "captures": { + "1": { + "name": "punctuation.accessor.ts" + }, + "2": { + "name": "punctuation.accessor.optional.ts" + }, + "3": { + "name": "support.variable.property.ts" + }, + "4": { + "name": "support.constant.ts" + } + } + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(exports)|(module)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)", + "captures": { + "1": { + "name": "support.type.object.module.ts" + }, + "2": { + "name": "support.type.object.module.ts" + }, + "3": { + "name": "punctuation.accessor.ts" + }, + "4": { + "name": "punctuation.accessor.optional.ts" + }, + "5": { + "name": "support.type.object.module.ts" + } + } + } + ] + }, + "identifiers": { + "patterns": [ + { + "include": "#object-identifiers" + }, + { + "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "captures": { + "1": { + "name": "punctuation.accessor.ts" + }, + "2": { + "name": "punctuation.accessor.optional.ts" + }, + "3": { + "name": "entity.name.function.ts" + } + } + }, + { + "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])", + "captures": { + "1": { + "name": "punctuation.accessor.ts" + }, + "2": { + "name": "punctuation.accessor.optional.ts" + }, + "3": { + "name": "variable.other.constant.property.ts" + } + } + }, + { + "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "punctuation.accessor.ts" + }, + "2": { + "name": "punctuation.accessor.optional.ts" + }, + "3": { + "name": "variable.other.property.ts" + } + } + }, + { + "name": "variable.other.constant.ts", + "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])" + }, + { + "name": "variable.other.readwrite.ts", + "match": "[_$[:alpha:]][_$[:alnum:]]*" + } + ] + }, + "object-identifiers": { + "patterns": [ + { + "name": "support.class.ts", + "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))" + }, + { + "match": "(?x)(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n (\\#?[[:upper:]][_$[:digit:][:upper:]]*) |\n (\\#?[_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "punctuation.accessor.ts" + }, + "2": { + "name": "punctuation.accessor.optional.ts" + }, + "3": { + "name": "variable.other.constant.object.property.ts" + }, + "4": { + "name": "variable.other.object.property.ts" + } + } + }, + { + "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)", + "captures": { + "1": { + "name": "variable.other.constant.object.ts" + }, + "2": { + "name": "variable.other.object.ts" + } + } + } + ] + }, + "type-annotation": { + "patterns": [ + { + "name": "meta.type.annotation.ts", + "begin": "(:)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.ts" + } + }, + "end": "(?<![:|&])(?!\\s*[|&]\\s+)((?=^|[,);\\}\\]]|//)|(?==[^>])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "name": "meta.type.annotation.ts", + "begin": "(:)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.ts" + } + }, + "end": "(?<![:|&])((?=[,);\\}\\]]|\\/\\/)|(?==[^>])|(?=^\\s*$)|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", + "patterns": [ + { + "include": "#type" + } + ] + } + ] + }, + "parameter-type-annotation": { + "patterns": [ + { + "name": "meta.type.annotation.ts", + "begin": "(:)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.ts" + } + }, + "end": "(?=[,)])|(?==[^>])", + "patterns": [ + { + "include": "#type" + } + ] + } + ] + }, + "return-type": { + "patterns": [ + { + "name": "meta.return.type.ts", + "begin": "(?<=\\))\\s*(:)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.ts" + } + }, + "end": "(?<![:|&])(?=$|^|[{};,]|//)", + "patterns": [ + { + "include": "#return-type-core" + } + ] + }, + { + "name": "meta.return.type.ts", + "begin": "(?<=\\))\\s*(:)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.ts" + } + }, + "end": "(?<![:|&])((?=[{};,]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))", + "patterns": [ + { + "include": "#return-type-core" + } + ] + } + ] + }, + "return-type-core": { + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?<=[:|&])(?=\\s*\\{)", + "end": "(?<=\\})", + "patterns": [ + { + "include": "#type-object" + } + ] + }, + { + "include": "#type-predicate-operator" + }, + { + "include": "#type" + } + ] + }, + "arrow-return-type": { + "name": "meta.return.type.arrow.ts", + "begin": "(?<=\\))\\s*(:)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.ts" + } + }, + "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))", + "patterns": [ + { + "include": "#arrow-return-type-body" + } + ] + }, + "possibly-arrow-return-type": { + "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)", + "beginCaptures": { + "1": { + "name": "meta.arrow.ts meta.return.type.arrow.ts keyword.operator.type.annotation.ts" + } + }, + "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))", + "contentName": "meta.arrow.ts meta.return.type.arrow.ts", + "patterns": [ + { + "include": "#arrow-return-type-body" + } + ] + }, + "arrow-return-type-body": { + "patterns": [ + { + "begin": "(?<=[:])(?=\\s*\\{)", + "end": "(?<=\\})", + "patterns": [ + { + "include": "#type-object" + } + ] + }, + { + "include": "#type-predicate-operator" + }, + { + "include": "#type" + } + ] + }, + "type-parameters": { + "name": "meta.type.parameters.ts", + "begin": "(<)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.typeparameters.begin.ts" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.typeparameters.end.ts" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "name": "storage.modifier.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out|const)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "include": "#type" + }, + { + "include": "#punctuation-comma" + }, + { + "name": "keyword.operator.assignment.ts", + "match": "(=)(?!>)" + } + ] + }, + "type-arguments": { + "name": "meta.type.parameters.ts", + "begin": "\\<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.begin.ts" + } + }, + "end": "\\>", + "endCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.end.ts" + } + }, + "patterns": [ + { + "include": "#type-arguments-body" + } + ] + }, + "type-arguments-body": { + "patterns": [ + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(_)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "captures": { + "0": { + "name": "keyword.operator.type.ts" + } + } + }, + { + "include": "#type" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "type": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-string" + }, + { + "include": "#numeric-literal" + }, + { + "include": "#type-primitive" + }, + { + "include": "#type-builtin-literals" + }, + { + "include": "#type-parameters" + }, + { + "include": "#type-tuple" + }, + { + "include": "#type-object" + }, + { + "include": "#type-operators" + }, + { + "include": "#type-conditional" + }, + { + "include": "#type-fn-type-parameters" + }, + { + "include": "#type-paren-or-function-parameters" + }, + { + "include": "#type-function-return-type" + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*", + "captures": { + "1": { + "name": "storage.modifier.ts" + } + } + }, + { + "include": "#type-name" + } + ] + }, + "type-primitive": { + "name": "support.type.primitive.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + "type-builtin-literals": { + "name": "support.type.builtin.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + "type-tuple": { + "name": "meta.type.tuple.ts", + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "meta.brace.square.ts" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "meta.brace.square.ts" + } + }, + "patterns": [ + { + "name": "keyword.operator.rest.ts", + "match": "\\.\\.\\." + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?)?\\s*(:)", + "captures": { + "1": { + "name": "entity.name.label.ts" + }, + "2": { + "name": "keyword.operator.optional.ts" + }, + "3": { + "name": "punctuation.separator.label.ts" + } + } + }, + { + "include": "#type" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "type-object": { + "name": "meta.object.type.ts", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.block.ts" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.block.ts" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#method-declaration" + }, + { + "include": "#indexer-declaration" + }, + { + "include": "#indexer-mapped-type-declaration" + }, + { + "include": "#field-declaration" + }, + { + "include": "#type-annotation" + }, + { + "begin": "\\.\\.\\.", + "beginCaptures": { + "0": { + "name": "keyword.operator.spread.ts" + } + }, + "end": "(?=\\}|;|,|$)|(?<=\\})", + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#punctuation-semicolon" + }, + { + "include": "#type" + } + ] + }, + "type-conditional": { + "patterns": [ + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)\\s+", + "beginCaptures": { + "1": { + "name": "storage.modifier.ts" + } + }, + "end": "(?<=:)", + "patterns": [ + { + "begin": "\\?", + "beginCaptures": { + "0": { + "name": "keyword.operator.ternary.ts" + } + }, + "end": ":", + "endCaptures": { + "0": { + "name": "keyword.operator.ternary.ts" + } + }, + "patterns": [ + { + "include": "#type" + } + ] + }, + { + "include": "#type" + } + ] + } + ] + }, + "type-paren-or-function-parameters": { + "name": "meta.type.paren.cover.ts", + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "meta.brace.round.ts" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "meta.brace.round.ts" + } + }, + "patterns": [ + { + "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=\\s*(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))))", + "captures": { + "1": { + "name": "storage.modifier.ts" + }, + "2": { + "name": "keyword.operator.rest.ts" + }, + "3": { + "name": "entity.name.function.ts variable.language.this.ts" + }, + "4": { + "name": "entity.name.function.ts" + }, + "5": { + "name": "keyword.operator.optional.ts" + } + } + }, + { + "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=:)", + "captures": { + "1": { + "name": "storage.modifier.ts" + }, + "2": { + "name": "keyword.operator.rest.ts" + }, + "3": { + "name": "variable.parameter.ts variable.language.this.ts" + }, + "4": { + "name": "variable.parameter.ts" + }, + "5": { + "name": "keyword.operator.optional.ts" + } + } + }, + { + "include": "#type-annotation" + }, + { + "name": "punctuation.separator.parameter.ts", + "match": "," + }, + { + "include": "#type" + } + ] + }, + "type-fn-type-parameters": { + "patterns": [ + { + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b(?=\\s*\\<)", + "beginCaptures": { + "1": { + "name": "meta.type.constructor.ts storage.modifier.ts" + }, + "2": { + "name": "meta.type.constructor.ts keyword.control.new.ts" + } + }, + "end": "(?<=>)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type-parameters" + } + ] + }, + { + "name": "meta.type.constructor.ts", + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b\\s*(?=\\()", + "beginCaptures": { + "1": { + "name": "storage.modifier.ts" + }, + "2": { + "name": "keyword.control.new.ts" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#function-parameters" + } + ] + }, + { + "name": "meta.type.function.ts", + "begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)", + "end": "(?<=\\))", + "patterns": [ + { + "include": "#function-parameters" + } + ] + } + ] + }, + "type-function-return-type": { + "patterns": [ + { + "name": "meta.type.function.return.ts", + "begin": "(=>)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "storage.type.function.arrow.ts" + } + }, + "end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>:\\?]|//|$)", + "patterns": [ + { + "include": "#type-function-return-type-core" + } + ] + }, + { + "name": "meta.type.function.return.ts", + "begin": "=>", + "beginCaptures": { + "0": { + "name": "storage.type.function.arrow.ts" + } + }, + "end": "(?<!=>)(?<![|&])((?=[,\\]\\)\\{\\}=;:\\?>]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))", + "patterns": [ + { + "include": "#type-function-return-type-core" + } + ] + } + ] + }, + "type-function-return-type-core": { + "patterns": [ + { + "include": "#comment" + }, + { + "begin": "(?<==>)(?=\\s*\\{)", + "end": "(?<=\\})", + "patterns": [ + { + "include": "#type-object" + } + ] + }, + { + "include": "#type-predicate-operator" + }, + { + "include": "#type" + } + ] + }, + "type-operators": { + "patterns": [ + { + "include": "#typeof-operator" + }, + { + "include": "#type-infer" + }, + { + "begin": "([&|])(?=\\s*\\{)", + "beginCaptures": { + "0": { + "name": "keyword.operator.type.ts" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#type-object" + } + ] + }, + { + "begin": "[&|]", + "beginCaptures": { + "0": { + "name": "keyword.operator.type.ts" + } + }, + "end": "(?=\\S)" + }, + { + "name": "keyword.operator.expression.keyof.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.operator.ternary.ts", + "match": "(\\?|\\:)" + }, + { + "name": "keyword.operator.expression.import.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\()" + } + ] + }, + "type-infer": { + "patterns": [ + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(infer)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s+(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))?", + "name": "meta.type.infer.ts", + "captures": { + "1": { + "name": "keyword.operator.expression.infer.ts" + }, + "2": { + "name": "entity.name.type.ts" + }, + "3": { + "name": "keyword.operator.expression.extends.ts" + } + } + } + ] + }, + "type-predicate-operator": { + "patterns": [ + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(asserts)\\s+)?(?!asserts)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s(is)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "captures": { + "1": { + "name": "keyword.operator.type.asserts.ts" + }, + "2": { + "name": "variable.parameter.ts variable.language.this.ts" + }, + "3": { + "name": "variable.parameter.ts" + }, + "4": { + "name": "keyword.operator.expression.is.ts" + } + } + }, + { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(asserts)\\s+(?!is)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", + "captures": { + "1": { + "name": "keyword.operator.type.asserts.ts" + }, + "2": { + "name": "variable.parameter.ts variable.language.this.ts" + }, + "3": { + "name": "variable.parameter.ts" + } + } + }, + { + "name": "keyword.operator.type.asserts.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))asserts(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.operator.expression.is.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))is(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + } + ] + }, + "type-name": { + "patterns": [ + { + "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(<)", + "captures": { + "1": { + "name": "entity.name.type.module.ts" + }, + "2": { + "name": "punctuation.accessor.ts" + }, + "3": { + "name": "punctuation.accessor.optional.ts" + }, + "4": { + "name": "meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "meta.type.parameters.ts punctuation.definition.typeparameters.end.ts" + } + }, + "contentName": "meta.type.parameters.ts", + "patterns": [ + { + "include": "#type-arguments-body" + } + ] + }, + { + "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(<)", + "beginCaptures": { + "1": { + "name": "entity.name.type.ts" + }, + "2": { + "name": "meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "meta.type.parameters.ts punctuation.definition.typeparameters.end.ts" + } + }, + "contentName": "meta.type.parameters.ts", + "patterns": [ + { + "include": "#type-arguments-body" + } + ] + }, + { + "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", + "captures": { + "1": { + "name": "entity.name.type.module.ts" + }, + "2": { + "name": "punctuation.accessor.ts" + }, + "3": { + "name": "punctuation.accessor.optional.ts" + } + } + }, + { + "name": "entity.name.type.ts", + "match": "[_$[:alpha:]][_$[:alnum:]]*" + } + ] + }, + "punctuation-comma": { + "name": "punctuation.separator.comma.ts", + "match": "," + }, + "punctuation-semicolon": { + "name": "punctuation.terminator.statement.ts", + "match": ";" + }, + "punctuation-accessor": { + "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", + "captures": { + "1": { + "name": "punctuation.accessor.ts" + }, + "2": { + "name": "punctuation.accessor.optional.ts" + } + } + }, + "string": { + "patterns": [ + { + "include": "#qstring-single" + }, + { + "include": "#qstring-double" + }, + { + "include": "#template" + } + ] + }, + "qstring-double": { + "name": "string.quoted.double.ts", + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ts" + } + }, + "end": "(\")|((?:[^\\\\\\n])$)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.ts" + }, + "2": { + "name": "invalid.illegal.newline.ts" + } + }, + "patterns": [ + { + "include": "#string-character-escape" + } + ] + }, + "qstring-single": { + "name": "string.quoted.single.ts", + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ts" + } + }, + "end": "(\\')|((?:[^\\\\\\n])$)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.ts" + }, + "2": { + "name": "invalid.illegal.newline.ts" + } + }, + "patterns": [ + { + "include": "#string-character-escape" + } + ] + }, + "string-character-escape": { + "name": "constant.character.escape.ts", + "match": "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\\{[0-9A-Fa-f]+\\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)" + }, + "template": { + "patterns": [ + { + "include": "#template-call" + }, + { + "contentName": "string.template.ts", + "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)", + "beginCaptures": { + "1": { + "name": "entity.name.function.tagged-template.ts" + }, + "2": { + "name": "string.template.ts punctuation.definition.string.template.begin.ts" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "string.template.ts punctuation.definition.string.template.end.ts" + } + }, + "patterns": [ + { + "include": "#template-substitution-element" + }, + { + "include": "#string-character-escape" + } + ] + } + ] + }, + "template-call": { + "patterns": [ + { + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?`)", + "end": "(?=`)", + "patterns": [ + { + "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))", + "end": "(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?`)", + "patterns": [ + { + "include": "#support-function-call-identifiers" + }, + { + "name": "entity.name.function.tagged-template.ts", + "match": "([_$[:alpha:]][_$[:alnum:]]*)" + } + ] + }, + { + "include": "#type-arguments" + } + ] + }, + { + "begin": "([_$[:alpha:]][_$[:alnum:]]*)?\\s*(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)`)", + "beginCaptures": { + "1": { + "name": "entity.name.function.tagged-template.ts" + } + }, + "end": "(?=`)", + "patterns": [ + { + "include": "#type-arguments" + } + ] + } + ] + }, + "template-substitution-element": { + "name": "meta.template.expression.ts", + "begin": "\\$\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.template-expression.begin.ts" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.template-expression.end.ts" + } + }, + "patterns": [ + { + "include": "#expression" + } + ], + "contentName": "meta.embedded.line.ts" + }, + "type-string": { + "patterns": [ + { + "include": "#qstring-single" + }, + { + "include": "#qstring-double" + }, + { + "include": "#template-type" + } + ] + }, + "template-type": { + "patterns": [ + { + "include": "#template-call" + }, + { + "contentName": "string.template.ts", + "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)", + "beginCaptures": { + "1": { + "name": "entity.name.function.tagged-template.ts" + }, + "2": { + "name": "string.template.ts punctuation.definition.string.template.begin.ts" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "string.template.ts punctuation.definition.string.template.end.ts" + } + }, + "patterns": [ + { + "include": "#template-type-substitution-element" + }, + { + "include": "#string-character-escape" + } + ] + } + ] + }, + "template-type-substitution-element": { + "name": "meta.template.expression.ts", + "begin": "\\$\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.template-expression.begin.ts" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.template-expression.end.ts" + } + }, + "patterns": [ + { + "include": "#type" + } + ], + "contentName": "meta.embedded.line.ts" + }, + "regex": { + "patterns": [ + { + "name": "string.regexp.ts", + "begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.ts" + } + }, + "end": "(/)([dgimsuy]*)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.ts" + }, + "2": { + "name": "keyword.other.ts" + } + }, + "patterns": [ + { + "include": "#regexp" + } + ] + }, + { + "name": "string.regexp.ts", + "begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ts" + } + }, + "end": "(/)([dgimsuy]*)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.ts" + }, + "2": { + "name": "keyword.other.ts" + } + }, + "patterns": [ + { + "include": "#regexp" + } + ] + } + ] + }, + "regexp": { + "patterns": [ + { + "name": "keyword.control.anchor.regexp", + "match": "\\\\[bB]|\\^|\\$" + }, + { + "match": "\\\\[1-9]\\d*|\\\\k<([a-zA-Z_$][\\w$]*)>", + "captures": { + "0": { + "name": "keyword.other.back-reference.regexp" + }, + "1": { + "name": "variable.other.regexp" + } + } + }, + { + "name": "keyword.operator.quantifier.regexp", + "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??" + }, + { + "name": "keyword.operator.or.regexp", + "match": "\\|" + }, + { + "name": "meta.group.assertion.regexp", + "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.group.regexp" + }, + "2": { + "name": "punctuation.definition.group.assertion.regexp" + }, + "3": { + "name": "meta.assertion.look-ahead.regexp" + }, + "4": { + "name": "meta.assertion.negative-look-ahead.regexp" + }, + "5": { + "name": "meta.assertion.look-behind.regexp" + }, + "6": { + "name": "meta.assertion.negative-look-behind.regexp" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.group.regexp" + } + }, + "patterns": [ + { + "include": "#regexp" + } + ] + }, + { + "name": "meta.group.regexp", + "begin": "\\((?:(\\?:)|(?:\\?<([a-zA-Z_$][\\w$]*)>))?", + "beginCaptures": { + "0": { + "name": "punctuation.definition.group.regexp" + }, + "1": { + "name": "punctuation.definition.group.no-capture.regexp" + }, + "2": { + "name": "variable.other.regexp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.group.regexp" + } + }, + "patterns": [ + { + "include": "#regexp" + } + ] + }, + { + "name": "constant.other.character-class.set.regexp", + "begin": "(\\[)(\\^)?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.character-class.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + } + }, + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.definition.character-class.regexp" + } + }, + "patterns": [ + { + "name": "constant.other.character-class.range.regexp", + "match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))", + "captures": { + "1": { + "name": "constant.character.numeric.regexp" + }, + "2": { + "name": "constant.character.control.regexp" + }, + "3": { + "name": "constant.character.escape.backslash.regexp" + }, + "4": { + "name": "constant.character.numeric.regexp" + }, + "5": { + "name": "constant.character.control.regexp" + }, + "6": { + "name": "constant.character.escape.backslash.regexp" + } + } + }, + { + "include": "#regex-character-class" + } + ] + }, + { + "include": "#regex-character-class" + } + ] + }, + "regex-character-class": { + "patterns": [ + { + "name": "constant.other.character-class.regexp", + "match": "\\\\[wWsSdDtrnvf]|\\." + }, + { + "name": "constant.character.numeric.regexp", + "match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})" + }, + { + "name": "constant.character.control.regexp", + "match": "\\\\c[A-Z]" + }, + { + "name": "constant.character.escape.backslash.regexp", + "match": "\\\\." + } + ] + }, + "comment": { + "patterns": [ + { + "name": "comment.block.documentation.ts", + "begin": "/\\*\\*(?!/)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.ts" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.ts" + } + }, + "patterns": [ + { + "include": "#docblock" + } + ] + }, + { + "name": "comment.block.ts", + "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.ts" + }, + "2": { + "name": "storage.type.internaldeclaration.ts" + }, + "3": { + "name": "punctuation.decorator.internaldeclaration.ts" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.ts" + } + } + }, + { + "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.ts" + }, + "2": { + "name": "comment.line.double-slash.ts" + }, + "3": { + "name": "punctuation.definition.comment.ts" + }, + "4": { + "name": "storage.type.internaldeclaration.ts" + }, + "5": { + "name": "punctuation.decorator.internaldeclaration.ts" + } + }, + "end": "(?=$)", + "contentName": "comment.line.double-slash.ts" + } + ] + }, + "single-line-comment-consuming-line-ending": { + "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.ts" + }, + "2": { + "name": "comment.line.double-slash.ts" + }, + "3": { + "name": "punctuation.definition.comment.ts" + }, + "4": { + "name": "storage.type.internaldeclaration.ts" + }, + "5": { + "name": "punctuation.decorator.internaldeclaration.ts" + } + }, + "end": "(?=^)", + "contentName": "comment.line.double-slash.ts" + }, + "directives": { + "name": "comment.line.triple-slash.directive.ts", + "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.ts" + } + }, + "end": "(?=$)", + "patterns": [ + { + "name": "meta.tag.ts", + "begin": "(<)(reference|amd-dependency|amd-module)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.directive.ts" + }, + "2": { + "name": "entity.name.tag.directive.ts" + } + }, + "end": "/>", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.directive.ts" + } + }, + "patterns": [ + { + "name": "entity.other.attribute-name.directive.ts", + "match": "path|types|no-default-lib|lib|name|resolution-mode" + }, + { + "name": "keyword.operator.assignment.ts", + "match": "=" + }, + { + "include": "#string" + } + ] + } + ] + }, + "docblock": { + "patterns": [ + { + "match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "constant.language.access-type.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "entity.name.type.instance.jsdoc" + }, + "4": { + "name": "punctuation.definition.bracket.angle.begin.jsdoc" + }, + "5": { + "name": "constant.other.email.link.underline.jsdoc" + }, + "6": { + "name": "punctuation.definition.bracket.angle.end.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # <that namepath>\n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # <this namepath>", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "entity.name.type.instance.jsdoc" + }, + "4": { + "name": "keyword.operator.control.jsdoc" + }, + "5": { + "name": "entity.name.type.instance.jsdoc" + } + } + }, + { + "name": "meta.example.jsdoc", + "begin": "((@)example)\\s+", + "end": "(?=@|\\*/)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "patterns": [ + { + "match": "^\\s\\*\\s+" + }, + { + "contentName": "constant.other.description.jsdoc", + "begin": "\\G(<)caption(>)", + "beginCaptures": { + "0": { + "name": "entity.name.tag.inline.jsdoc" + }, + "1": { + "name": "punctuation.definition.bracket.angle.begin.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.angle.end.jsdoc" + } + }, + "end": "(</)caption(>)|(?=\\*/)", + "endCaptures": { + "0": { + "name": "entity.name.tag.inline.jsdoc" + }, + "1": { + "name": "punctuation.definition.bracket.angle.begin.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.angle.end.jsdoc" + } + } + }, + { + "match": "[^\\s@*](?:[^*]|\\*[^/])*", + "captures": { + "0": { + "name": "source.embedded.ts" + } + } + } + ] + }, + { + "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "constant.language.symbol-type.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!\n # Avoid matching bare URIs (also acceptable as links)\n https?://\n |\n # Avoid matching {@inline tags}; we match those below\n (?:\\[[^\\[\\]]*\\])? # Possible description [preceding]{@tag}\n {@(?:link|linkcode|linkplain|tutorial)\\b\n )\n # Matched namepath\n (?:[^@\\s*/]|\\*[^/])+\n )\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.link.underline.jsdoc" + }, + "4": { + "name": "entity.name.type.instance.jsdoc" + } + } + }, + { + "match": "(?x)\n((@)template)\n\\s+\n# One or more valid identifiers\n(\n [A-Za-z_$] # First character: non-numeric word character\n [\\w$.\\[\\]]* # Rest of identifier\n (?: # Possible list of additional identifiers\n \\s* , \\s*\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n )*\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + } + } + }, + { + "begin": "(?x)((@)template)\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + }, + { + "name": "variable.other.jsdoc", + "match": "([A-Za-z_$][\\w$.\\[\\]]*)" + } + ] + }, + { + "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + } + } + }, + { + "begin": "((@)typedef)\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + }, + { + "name": "entity.name.type.instance.jsdoc", + "match": "(?:[^@\\s*/]|\\*[^/])+" + } + ] + }, + { + "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + }, + { + "name": "variable.other.jsdoc", + "match": "([A-Za-z_$][\\w$.\\[\\]]*)" + }, + { + "name": "variable.other.jsdoc", + "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[ ].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?>\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])* # Everything else\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))", + "captures": { + "1": { + "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc" + }, + "2": { + "name": "keyword.operator.assignment.jsdoc" + }, + "3": { + "name": "source.embedded.ts" + }, + "4": { + "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc" + }, + "5": { + "name": "invalid.illegal.syntax.jsdoc" + } + } + } + ] + }, + { + "begin": "(?x)\n(\n (@)\n (?:define|enum|exception|export|extends|lends|implements|modifies\n |namespace|private|protected|returns?|satisfies|suppress|this|throws|type\n |yields?)\n)\n\\s+(?={)", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + }, + "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", + "patterns": [ + { + "include": "#jsdoctype" + } + ] + }, + { + "match": "(?x)\n(\n (@)\n (?:alias|augments|callback|constructs|emits|event|fires|exports?\n |extends|external|function|func|host|lends|listens|interface|memberof!?\n |method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "entity.name.type.instance.jsdoc" + } + } + }, + { + "contentName": "variable.other.jsdoc", + "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))", + "beginCaptures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + }, + "4": { + "name": "punctuation.definition.string.begin.jsdoc" + } + }, + "end": "(\\3)|(?=$|\\*/)", + "endCaptures": { + "0": { + "name": "variable.other.jsdoc" + }, + "1": { + "name": "punctuation.definition.string.end.jsdoc" + } + } + }, + { + "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + }, + "3": { + "name": "variable.other.jsdoc" + } + } + }, + { + "name": "storage.type.class.jsdoc", + "match": "(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \\b", + "captures": { + "1": { + "name": "punctuation.definition.block.tag.jsdoc" + } + } + }, + { + "include": "#inline-tags" + }, + { + "match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\s+)", + "captures": { + "1": { + "name": "storage.type.class.jsdoc" + }, + "2": { + "name": "punctuation.definition.block.tag.jsdoc" + } + } + } + ] + }, + "brackets": { + "patterns": [ + { + "begin": "{", + "end": "}|(?=\\*/)", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\[", + "end": "\\]|(?=\\*/)", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "inline-tags": { + "patterns": [ + { + "name": "constant.other.description.jsdoc", + "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))", + "captures": { + "1": { + "name": "punctuation.definition.bracket.square.begin.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.square.end.jsdoc" + } + } + }, + { + "name": "entity.name.type.instance.jsdoc", + "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*", + "beginCaptures": { + "1": { + "name": "punctuation.definition.bracket.curly.begin.jsdoc" + }, + "2": { + "name": "storage.type.class.jsdoc" + }, + "3": { + "name": "punctuation.definition.inline.tag.jsdoc" + } + }, + "end": "}|(?=\\*/)", + "endCaptures": { + "0": { + "name": "punctuation.definition.bracket.curly.end.jsdoc" + } + }, + "patterns": [ + { + "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?", + "captures": { + "1": { + "name": "variable.other.link.underline.jsdoc" + }, + "2": { + "name": "punctuation.separator.pipe.jsdoc" + } + } + }, + { + "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?", + "captures": { + "1": { + "name": "variable.other.description.jsdoc" + }, + "2": { + "name": "punctuation.separator.pipe.jsdoc" + } + } + } + ] + } + ] + }, + "jsdoctype": { + "patterns": [ + { + "contentName": "entity.name.type.instance.jsdoc", + "begin": "\\G({)", + "beginCaptures": { + "0": { + "name": "entity.name.type.instance.jsdoc" + }, + "1": { + "name": "punctuation.definition.bracket.curly.begin.jsdoc" + } + }, + "end": "((}))\\s*|(?=\\*/)", + "endCaptures": { + "1": { + "name": "entity.name.type.instance.jsdoc" + }, + "2": { + "name": "punctuation.definition.bracket.curly.end.jsdoc" + } + }, + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + } + } +} diff --git a/src/lib/shiki/languages/v.tmLanguage.json b/src/lib/shiki/languages/v.tmLanguage.json new file mode 100644 index 0000000..5b99506 --- /dev/null +++ b/src/lib/shiki/languages/v.tmLanguage.json @@ -0,0 +1,994 @@ +{ + "name": "v", + "scopeName": "source.v", + "fileTypes": [".v", ".vh", ".vsh", ".vv", "v.mod"], + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#function-decl" + }, + { + "include": "#as-is" + }, + { + "include": "#attributes" + }, + { + "include": "#assignment" + }, + { + "include": "#module-decl" + }, + { + "include": "#import-decl" + }, + { + "include": "#hash-decl" + }, + { + "include": "#brackets" + }, + { + "include": "#builtin-fix" + }, + { + "include": "#escaped-fix" + }, + { + "include": "#operators" + }, + { + "include": "#function-limited-overload-decl" + }, + { + "include": "#function-extend-decl" + }, + { + "include": "#function-exist" + }, + { + "include": "#generic" + }, + { + "include": "#constants" + }, + { + "include": "#type" + }, + { + "include": "#enum" + }, + { + "include": "#interface" + }, + { + "include": "#struct" + }, + { + "include": "#keywords" + }, + { + "include": "#storage" + }, + { + "include": "#numbers" + }, + { + "include": "#strings" + }, + { + "include": "#types" + }, + { + "include": "#punctuations" + }, + { + "include": "#variable-assign" + }, + { + "include": "#function-decl" + } + ], + "repository": { + "as-is": { + "begin": "\\s+(as|is)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.$1.v" + } + }, + "end": "([\\w.]*)", + "endCaptures": { + "1": { + "name": "entity.name.alias.v" + } + } + }, + "assignment": { + "name": "meta.definition.variable.v", + "match": "\\s+((?:\\:|\\+|\\-|\\*|/|\\%|\\&|\\||\\^)?=)\\s+", + "captures": { + "1": { + "patterns": [ + { + "include": "#operators" + } + ] + } + } + }, + "attributes": { + "name": "meta.definition.attribute.v", + "match": "^\\s*((\\[)(deprecated|unsafe|console|heap|manualfree|typedef|live|inline|flag|ref_only|direct_array_access|callconv)(\\]))", + "captures": { + "1": { + "name": "meta.function.attribute.v" + }, + "2": { + "name": "punctuation.definition.begin.bracket.square.v" + }, + "3": { + "name": "storage.modifier.attribute.v" + }, + "4": { + "name": "punctuation.definition.end.bracket.square.v" + } + } + }, + "variable-assign": { + "match": "[a-zA-Z_]\\w*(?:,\\s*[a-zA-Z_]\\w*)*(?=\\s*(?:=|:=))", + "captures": { + "0": { + "patterns": [ + { + "match": "[a-zA-Z_]\\w*", + "name": "variable.other.assignment.v" + }, + { + "include": "#punctuation" + } + ] + } + } + }, + "module-decl": { + "name": "meta.module.v", + "begin": "^\\s*(module)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.module.v" + } + }, + "end": "([\\w.]+)", + "endCaptures": { + "1": { + "name": "entity.name.module.v" + } + } + }, + "import-decl": { + "name": "meta.import.v", + "begin": "^\\s*(import)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.import.v" + } + }, + "end": "([\\w.]+)", + "endCaptures": { + "1": { + "name": "entity.name.import.v" + } + } + }, + "hash-decl": { + "name": "markup.bold.v", + "begin": "^\\s*(#)", + "end": "$" + }, + "brackets": { + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.bracket.curly.begin.v" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.bracket.curly.end.v" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.bracket.round.begin.v" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.bracket.round.end.v" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.bracket.square.begin.v" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.bracket.square.end.v" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + "builtin-fix": { + "patterns": [ + { + "patterns": [ + { + "name": "storage.modifier.v", + "match": "(const)(?=\\s*\\()" + }, + { + "name": "keyword.$1.v", + "match": "\\b(fn|type|enum|struct|union|interface|map|assert|sizeof|typeof|__offsetof)\\b(?=\\s*\\()" + } + ] + }, + { + "patterns": [ + { + "name": "keyword.control.v", + "match": "(\\$if|\\$else)(?=\\s*\\()" + }, + { + "name": "keyword.control.v", + "match": "\\b(as|in|is|or|break|continue|default|unsafe|match|if|else|for|go|spawn|goto|defer|return|shared|select|rlock|lock|atomic|asm)\\b(?=\\s*\\()" + } + ] + }, + { + "patterns": [ + { + "match": "(?<!.)(i?(?:8|16|nt|64|128)|u?(?:16|32|64|128)|f?(?:32|64))(?=\\s*\\()", + "captures": { + "1": { + "name": "storage.type.numeric.v" + } + }, + "name": "meta.expr.numeric.cast.v" + }, + { + "match": "(bool|byte|byteptr|charptr|voidptr|string|rune|size_t|[ui]size)(?=\\s*\\()", + "captures": { + "1": { + "name": "storage.type.$1.v" + } + }, + "name": "meta.expr.bool.cast.v" + } + ] + } + ] + }, + "comments": { + "patterns": [ + { + "name": "comment.block.documentation.v", + "begin": "/\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.v" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.v" + } + }, + "patterns": [ + { + "include": "#comments" + } + ] + }, + { + "name": "comment.line.double-slash.v", + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.v" + } + }, + "end": "$" + } + ] + }, + "constants": { + "name": "constant.language.v", + "match": "\\b(true|false|none)\\b" + }, + "generic": { + "patterns": [ + { + "name": "meta.definition.generic.v", + "match": "(?<=[\\w\\s+])(\\<)(\\w+)(\\>)", + "captures": { + "1": { + "name": "punctuation.definition.bracket.angle.begin.v" + }, + "2": { + "patterns": [ + { + "include": "#illegal-name" + }, + { + "match": "\\w+", + "name": "entity.name.generic.v" + } + ] + }, + "3": { + "name": "punctuation.definition.bracket.angle.end.v" + } + } + } + ] + }, + "function-decl": { + "name": "meta.definition.function.v", + "match": "^(\\bpub\\b\\s+)?(\\bfn\\b)\\s+(?:\\([^\\)]+\\)\\s+)?(?:(?:C\\.)?)(\\w+)\\s*((?<=[\\w\\s+])(\\<)(\\w+)(\\>))?", + "captures": { + "1": { + "name": "storage.modifier.v" + }, + "2": { + "name": "keyword.fn.v" + }, + "3": { + "name": "entity.name.function.v" + }, + "4": { + "patterns": [ + { + "include": "#generic" + } + ] + } + } + }, + "function-extend-decl": { + "name": "meta.definition.function.v", + "match": "^\\s*(pub)?\\s*(fn)\\s*(\\()([^\\)]*)(\\))\\s*(?:(?:C\\.)?)(\\w+)\\s*((?<=[\\w\\s+])(\\<)(\\w+)(\\>))?", + "captures": { + "1": { + "name": "storage.modifier.v" + }, + "2": { + "name": "keyword.fn.v" + }, + "3": { + "name": "punctuation.definition.bracket.round.begin.v" + }, + "4": { + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#storage" + }, + { + "include": "#generic" + }, + { + "include": "#types" + }, + { + "include": "#punctuation" + } + ] + }, + "5": { + "name": "punctuation.definition.bracket.round.end.v" + }, + "6": { + "patterns": [ + { + "include": "#illegal-name" + }, + { + "match": "\\w+", + "name": "entity.name.function.v" + } + ] + }, + "7": { + "patterns": [ + { + "include": "#generic" + } + ] + } + } + }, + "function-limited-overload-decl": { + "name": "meta.definition.function.v", + "match": "^\\s*(pub)?\\s*(fn)\\s*(\\()([^\\)]*)(\\))\\s*([\\+\\-\\*\\/])?\\s*(\\()([^\\)]*)(\\))\\s*(?:(?:C\\.)?)(\\w+)", + "captures": { + "1": { + "name": "storage.modifier.v" + }, + "2": { + "name": "keyword.fn.v" + }, + "3": { + "name": "punctuation.definition.bracket.round.begin.v" + }, + "4": { + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#storage" + }, + { + "include": "#generic" + }, + { + "include": "#types" + }, + { + "include": "#punctuation" + } + ] + }, + "5": { + "name": "punctuation.definition.bracket.round.end.v" + }, + "6": { + "patterns": [ + { + "include": "#operators" + } + ] + }, + "7": { + "name": "punctuation.definition.bracket.round.begin.v" + }, + "8": { + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#storage" + }, + { + "include": "#generic" + }, + { + "include": "#types" + }, + { + "include": "#punctuation" + } + ] + }, + "9": { + "name": "punctuation.definition.bracket.round.end.v" + }, + "10": { + "patterns": [ + { + "include": "#illegal-name" + }, + { + "match": "\\w+", + "name": "entity.name.function.v" + } + ] + } + } + }, + "function-exist": { + "name": "meta.support.function.v", + "match": "(\\w+)((?<=[\\w\\s+])(\\<)(\\w+)(\\>))?(?=\\s*\\()", + "captures": { + "0": { + "name": "meta.function.call.v" + }, + "1": { + "patterns": [ + { + "include": "#illegal-name" + }, + { + "match": "\\w+", + "name": "entity.name.function.v" + } + ] + }, + "2": { + "patterns": [ + { + "include": "#generic" + } + ] + } + } + }, + "type": { + "name": "meta.definition.type.v", + "match": "^\\s*(?:(pub)?\\s+)?(type)\\s+(\\w*)\\s+(?:\\w+\\.+)?(\\w*)", + "captures": { + "1": { + "name": "storage.modifier.$1.v" + }, + "2": { + "name": "storage.type.type.v" + }, + "3": { + "patterns": [ + { + "include": "#illegal-name" + }, + { + "include": "#types" + }, + { + "name": "entity.name.type.v", + "match": "\\w+" + } + ] + }, + "4": { + "patterns": [ + { + "include": "#illegal-name" + }, + { + "include": "#types" + }, + { + "name": "entity.name.type.v", + "match": "\\w+" + } + ] + } + } + }, + "enum": { + "name": "meta.definition.enum.v", + "match": "^\\s*(?:(pub)?\\s+)?(enum)\\s+(?:\\w+\\.)?(\\w*)", + "captures": { + "1": { + "name": "storage.modifier.$1.v" + }, + "2": { + "name": "storage.type.enum.v" + }, + "3": { + "name": "entity.name.enum.v" + } + } + }, + "interface": { + "name": "meta.definition.interface.v", + "match": "^\\s*(?:(pub)?\\s+)?(interface)\\s+(\\w*)", + "captures": { + "1": { + "name": "storage.modifier.$1.v" + }, + "2": { + "name": "keyword.interface.v" + }, + "3": { + "patterns": [ + { + "include": "#illegal-name" + }, + { + "name": "entity.name.interface.v", + "match": "\\w+" + } + ] + } + } + }, + "struct": { + "patterns": [ + { + "name": "meta.definition.struct.v", + "begin": "^\\s*(?:(mut|pub(?:\\s+mut)?|__global)\\s+)?(struct|union)\\s+([\\w.]+)\\s*|({)", + "beginCaptures": { + "1": { + "name": "storage.modifier.$1.v" + }, + "2": { + "name": "storage.type.struct.v" + }, + "3": { + "name": "entity.name.type.v" + }, + "4": { + "name": "punctuation.definition.bracket.curly.begin.v" + } + }, + "end": "\\s*|(})", + "endCaptures": { + "1": { + "name": "punctuation.definition.bracket.curly.end.v" + } + }, + "patterns": [ + { + "include": "#struct-access-modifier" + }, + { + "match": "\\b(\\w+)\\s+([\\w\\[\\]\\*&.]+)(?:\\s*(=)\\s*((?:.(?=$|//|/\\*))*+))?", + "captures": { + "1": { + "name": "variable.other.property.v" + }, + "2": { + "patterns": [ + { + "include": "#numbers" + }, + { + "include": "#brackets" + }, + { + "include": "#types" + }, + { + "match": "\\w+", + "name": "storage.type.other.v" + } + ] + }, + "3": { + "name": "keyword.operator.assignment.v" + }, + "4": { + "patterns": [ + { + "include": "$self" + } + ] + } + } + }, + { + "include": "#types" + }, + { + "include": "$self" + } + ] + }, + { + "name": "meta.definition.struct.v", + "match": "^\\s*(?:(mut|pub(?:\\s+mut)?|__global))\\s+?(struct)\\s+(?:\\s+([\\w.]+))?", + "captures": { + "1": { + "name": "storage.modifier.$1.v" + }, + "2": { + "name": "storage.type.struct.v" + }, + "3": { + "name": "entity.name.struct.v" + } + } + } + ] + }, + "struct-access-modifier": { + "match": "(?<=\\s|^)(mut|pub(?:\\s+mut)?|__global)(:|\\b)", + "captures": { + "1": { + "name": "storage.modifier.$1.v" + }, + "2": { + "name": "punctuation.separator.struct.key-value.v" + } + } + }, + "punctuation": { + "patterns": [ + { + "name": "punctuation.delimiter.period.dot.v", + "match": "\\." + }, + { + "name": "punctuation.delimiter.comma.v", + "match": "," + }, + { + "name": "punctuation.separator.key-value.colon.v", + "match": ":" + }, + { + "name": "punctuation.definition.other.semicolon.v", + "match": ";" + }, + { + "name": "punctuation.definition.other.questionmark.v", + "match": "\\?" + }, + { + "name": "punctuation.hash.v", + "match": "#" + } + ] + }, + "keywords": { + "patterns": [ + { + "name": "keyword.control.v", + "match": "(\\$if|\\$else)" + }, + { + "name": "keyword.control.v", + "match": "(?<!@)\\b(as|it|is|in|or|break|continue|default|unsafe|match|if|else|for|go|spawn|goto|defer|return|shared|select|rlock|lock|atomic|asm)\\b" + }, + { + "name": "keyword.$1.v", + "match": "(?<!@)\\b(fn|type|typeof|enum|struct|interface|map|assert|sizeof|__offsetof)\\b" + } + ] + }, + "storage": { + "name": "storage.modifier.v", + "match": "\\b(const|mut|pub)\\b" + }, + "types": { + "patterns": [ + { + "name": "storage.type.numeric.v", + "match": "(?<!\\.)\\b(i(8|16|nt|64|128)|u(8|16|32|64|128)|f(32|64))\\b" + }, + { + "name": "storage.type.$1.v", + "match": "(?<!\\.)\\b(bool|byte|byteptr|charptr|voidptr|string|ustring|rune)\\b" + } + ] + }, + "operators": { + "patterns": [ + { + "name": "keyword.operator.arithmetic.v", + "match": "(\\+|\\-|\\*|\\/|\\%|\\+\\+|\\-\\-|\\>\\>|\\<\\<)" + }, + { + "name": "keyword.operator.relation.v", + "match": "(\\=\\=|\\!\\=|\\>|\\<|\\>\\=|\\<\\=)" + }, + { + "name": "keyword.operator.assignment.v", + "match": "(\\:\\=|\\=|\\+\\=|\\-\\=|\\*\\=|\\/\\=|\\%\\=|\\&\\=|\\|\\=|\\^\\=|\\~\\=|\\&\\&\\=|\\|\\|\\=|\\>\\>\\=|\\<\\<\\=)" + }, + { + "name": "keyword.operator.bitwise.v", + "match": "(\\&|\\||\\^|\\~|<(?!<)|>(?!>))" + }, + { + "name": "keyword.operator.logical.v", + "match": "(\\&\\&|\\|\\||\\!)" + }, + { + "name": "keyword.operator.optional.v", + "match": "\\?" + } + ] + }, + "numbers": { + "patterns": [ + { + "name": "constant.numeric.exponential.v", + "match": "([0-9]+(_?))+(\\.)([0-9]+[eE][-+]?[0-9]+)" + }, + { + "name": "constant.numeric.float.v", + "match": "([0-9]+(_?))+(\\.)([0-9]+)" + }, + { + "name": "constant.numeric.binary.v", + "match": "(?:0b)(?:(?:[0-1]+)(?:_?))+" + }, + { + "name": "constant.numeric.octal.v", + "match": "(?:0o)(?:(?:[0-7]+)(?:_?))+" + }, + { + "name": "constant.numeric.hex.v", + "match": "(?:0x)(?:(?:[0-9a-fA-F]+)(?:_?))+" + }, + { + "name": "constant.numeric.integer.v", + "match": "(?:(?:[0-9]+)(?:[_]?))+" + } + ] + }, + "punctuations": { + "patterns": [ + { + "name": "punctuation.accessor.v", + "match": "(?:\\.)" + }, + { + "name": "punctuation.separator.comma.v", + "match": "(?:,)" + } + ] + }, + "strings": { + "patterns": [ + { + "begin": "`", + "end": "`", + "name": "string.quoted.rune.v", + "patterns": [ + { + "include": "#string-escaped-char" + }, + { + "include": "#string-interpolation" + }, + { + "include": "#string-placeholder" + } + ] + }, + { + "begin": "(r)'", + "beginCaptures": { + "1": { + "name": "storage.type.string.v" + } + }, + "end": "'", + "name": "string.quoted.raw.v", + "patterns": [ + { + "include": "#string-interpolation" + }, + { + "include": "#string-placeholder" + } + ] + }, + { + "begin": "(r)\"", + "beginCaptures": { + "1": { + "name": "storage.type.string.v" + } + }, + "end": "\"", + "name": "string.quoted.raw.v", + "patterns": [ + { + "include": "#string-interpolation" + }, + { + "include": "#string-placeholder" + } + ] + }, + { + "begin": "(c?)'", + "beginCaptures": { + "1": { + "name": "storage.type.string.v" + } + }, + "end": "'", + "name": "string.quoted.v", + "patterns": [ + { + "include": "#string-escaped-char" + }, + { + "include": "#string-interpolation" + }, + { + "include": "#string-placeholder" + } + ] + }, + { + "begin": "(c?)\"", + "beginCaptures": { + "1": { + "name": "storage.type.string.v" + } + }, + "end": "\"", + "name": "string.quoted.v", + "patterns": [ + { + "include": "#string-escaped-char" + }, + { + "include": "#string-interpolation" + }, + { + "include": "#string-placeholder" + } + ] + } + ] + }, + "string-escaped-char": { + "patterns": [ + { + "name": "constant.character.escape.v", + "match": "\\\\([0-7]{3}|[\\$abfnrtv\\\\'\"]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})" + }, + { + "name": "invalid.illegal.unknown-escape.v", + "match": "\\\\[^0-7\\$xuUabfnrtv\\'\"]" + } + ] + }, + "string-interpolation": { + "name": "meta.string.interpolation.v", + "match": "(\\$([\\w.]+|\\{.*?\\}))", + "captures": { + "1": { + "patterns": [ + { + "name": "invalid.illegal.v", + "match": "\\$\\d[\\.\\w]+" + }, + { + "name": "variable.other.interpolated.v", + "match": "\\$([\\.\\w]+|\\{.*?\\})" + } + ] + } + } + }, + "string-placeholder": { + "match": "%(\\[\\d+\\])?([\\+#\\-0\\x20]{,2}((\\d+|\\*)?(\\.?(\\d+|\\*|(\\[\\d+\\])\\*?)?(\\[\\d+\\])?)?))?[vT%tbcdoqxXUbeEfFgGsp]", + "name": "constant.other.placeholder.v" + }, + "illegal-name": { + "match": "\\d\\w+", + "name": "invalid.illegal.v" + } + } +} diff --git a/src/lib/shiki/languages/vb.tmLanguage.json b/src/lib/shiki/languages/vb.tmLanguage.json new file mode 100644 index 0000000..096d7da --- /dev/null +++ b/src/lib/shiki/languages/vb.tmLanguage.json @@ -0,0 +1,238 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/asp.vb.net.tmbundle/blob/master/Syntaxes/ASP%20VB.net.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/textmate/asp.vb.net.tmbundle/commit/72d44550b3286d0382d7be0624140cf97857ff69", + "name": "vb", + "scopeName": "source.asp.vb.net", + "comment": "Modified from the original ASP bundle. Originally modified by Thomas Aylott subtleGradient.com", + "patterns": [ + { + "match": "\\n", + "name": "meta.ending-space" + }, + { + "include": "#round-brackets" + }, + { + "begin": "^(?=\\t)", + "end": "(?=[^\\t])", + "name": "meta.leading-space", + "patterns": [ + { + "captures": { + "1": { + "name": "meta.odd-tab.tabs" + }, + "2": { + "name": "meta.even-tab.tabs" + } + }, + "match": "(\\t)(\\t)?" + } + ] + }, + { + "begin": "^(?= )", + "end": "(?=[^ ])", + "name": "meta.leading-space", + "patterns": [ + { + "captures": { + "1": { + "name": "meta.odd-tab.spaces" + }, + "2": { + "name": "meta.even-tab.spaces" + } + }, + "match": "( )( )?" + } + ] + }, + { + "captures": { + "1": { + "name": "storage.type.function.asp" + }, + "2": { + "name": "entity.name.function.asp" + }, + "3": { + "name": "punctuation.definition.parameters.asp" + }, + "4": { + "name": "variable.parameter.function.asp" + }, + "5": { + "name": "punctuation.definition.parameters.asp" + } + }, + "match": "^\\s*((?i:function|sub))\\s*([a-zA-Z_]\\w*)\\s*(\\()([^)]*)(\\)).*\\n?", + "name": "meta.function.asp" + }, + { + "begin": "(^[ \\t]+)?(?=')", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.asp" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.asp" + } + }, + "end": "\\n", + "name": "comment.line.apostrophe.asp" + } + ] + }, + { + "match": "(?i:\\b(If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\\b)", + "name": "keyword.control.asp" + }, + { + "match": "(?i:\\b(Mod|And|Not|Or|Xor|as)\\b)", + "name": "keyword.operator.asp" + }, + { + "captures": { + "1": { + "name": "storage.type.asp" + }, + "2": { + "name": "variable.other.bfeac.asp" + }, + "3": { + "name": "meta.separator.comma.asp" + } + }, + "match": "(?i:(dim)\\s*(?:(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b)\\s*(,?)))", + "name": "variable.other.dim.asp" + }, + { + "match": "(?i:\\s*\\b(Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End Sub|End Function|End Class|End Property|Public Property|Private Property|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo)\\b\\s*)", + "name": "storage.type.asp" + }, + { + "match": "(?i:\\b(Private|Public|Default)\\b)", + "name": "storage.modifier.asp" + }, + { + "match": "(?i:\\s*\\b(Empty|False|Nothing|Null|True)\\b)", + "name": "constant.language.asp" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.asp" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.asp" + } + }, + "name": "string.quoted.double.asp", + "patterns": [ + { + "match": "\"\"", + "name": "constant.character.escape.apostrophe.asp" + } + ] + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.asp" + } + }, + "match": "(\\$)[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b\\s*", + "name": "variable.other.asp" + }, + { + "match": "(?i:\\b(Application|ObjectContext|Request|Response|Server|Session)\\b)", + "name": "support.class.asp" + }, + { + "match": "(?i:\\b(Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\\b)", + "name": "support.class.collection.asp" + }, + { + "match": "(?i:\\b(TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\\b)", + "name": "support.constant.asp" + }, + { + "match": "(?i:\\b(Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b)", + "name": "support.function.asp" + }, + { + "match": "(?i:\\b(Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\\b)", + "name": "support.function.event.asp" + }, + { + "match": "(?i:(?<=as )(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b))", + "name": "support.type.vb.asp" + }, + { + "match": "(?i:\\b(Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\\b)", + "name": "support.function.vb.asp" + }, + { + "match": "-?\\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)?\\b", + "name": "constant.numeric.asp" + }, + { + "match": "(?i:\\b(vbtrue|vbfalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\\b)", + "name": "support.type.vb.asp" + }, + { + "captures": { + "1": { + "name": "entity.name.function.asp" + } + }, + "match": "(?i:(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b)(?=\\(\\)?))", + "name": "support.function.asp" + }, + { + "match": "(?i:((?<=(\\+|=|-|\\&|\\\\|/|<|>|\\(|,))\\s*\\b([a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?)\\b(?!(\\(|\\.))|\\b([a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?)\\b(?=\\s*(\\+|=|-|\\&|\\\\|/|<|>|\\(|\\)))))", + "name": "variable.other.asp" + }, + { + "match": "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=|\\b(in|instanceof|new|delete|typeof|void)\\b", + "name": "keyword.operator.js" + } + ], + "repository": { + "round-brackets": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.round-brackets.begin.asp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.round-brackets.end.asp" + } + }, + "name": "meta.round-brackets", + "patterns": [ + { + "include": "source.asp.vb.net" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/verilog.tmLanguage.json b/src/lib/shiki/languages/verilog.tmLanguage.json new file mode 100644 index 0000000..2d895d7 --- /dev/null +++ b/src/lib/shiki/languages/verilog.tmLanguage.json @@ -0,0 +1,303 @@ +{ + "fileTypes": ["v", "vh"], + "keyEquivalent": "^~V", + "name": "verilog", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#module_pattern" + }, + { + "include": "#keywords" + }, + { + "include": "#constants" + }, + { + "include": "#strings" + }, + { + "include": "#operators" + } + ], + "repository": { + "comments": { + "patterns": [ + { + "begin": "(^[ \\t]+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.verilog" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.verilog" + } + }, + "end": "\\n", + "name": "comment.line.double-slash.verilog" + } + ] + }, + { + "begin": "/\\*", + "end": "\\*/", + "name": "comment.block.c-style.verilog" + } + ] + }, + "constants": { + "patterns": [ + { + "match": "`(?!(celldefine|endcelldefine|default_nettype|define|undef|ifdef|ifndef|else|endif|include|resetall|timescale|unconnected_drive|nounconnected_drive))[a-z_A-Z][a-zA-Z0-9_$]*", + "name": "variable.other.constant.verilog" + }, + { + "match": "[0-9]*'[bBoOdDhH][a-fA-F0-9_xXzZ]+\\b", + "name": "constant.numeric.sized_integer.verilog" + }, + { + "captures": { + "1": { + "name": "constant.numeric.integer.verilog" + }, + "2": { + "name": "punctuation.separator.range.verilog" + }, + "3": { + "name": "constant.numeric.integer.verilog" + } + }, + "match": "\\b(\\d+)(:)(\\d+)\\b", + "name": "meta.block.numeric.range.verilog" + }, + { + "match": "\\b\\d[\\d_]*(?i:e\\d+)?\\b", + "name": "constant.numeric.integer.verilog" + }, + { + "match": "\\b\\d+\\.\\d+(?i:e\\d+)?\\b", + "name": "constant.numeric.real.verilog" + }, + { + "match": "#\\d+", + "name": "constant.numeric.delay.verilog" + }, + { + "match": "\\b[01xXzZ]+\\b", + "name": "constant.numeric.logic.verilog" + } + ] + }, + "instantiation_patterns": { + "patterns": [ + { + "include": "#keywords" + }, + { + "begin": "^\\s*([a-zA-Z][a-zA-Z0-9_]*)\\s+([a-zA-Z][a-zA-Z0-9_]*)(?<!begin|if)\\s*(?=\\(|$)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.module.reference.verilog" + }, + "2": { + "name": "entity.name.tag.module.identifier.verilog" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.terminator.expression.verilog" + } + }, + "name": "meta.block.instantiation.parameterless.verilog", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#constants" + }, + { + "include": "#strings" + } + ] + }, + { + "begin": "^\\s*([a-zA-Z][a-zA-Z0-9_]*)\\s*(#)(?=\\s*\\()", + "beginCaptures": { + "1": { + "name": "entity.name.tag.module.reference.verilog" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.terminator.expression.verilog" + } + }, + "name": "meta.block.instantiation.with.parameters.verilog", + "patterns": [ + { + "include": "#parenthetical_list" + }, + { + "match": "[a-zA-Z][a-zA-Z0-9_]*", + "name": "entity.name.tag.module.identifier.verilog" + } + ] + } + ] + }, + "keywords": { + "patterns": [ + { + "match": "\\b(always|and|assign|attribute|begin|buf|bufif0|bufif1|case[xz]?|cmos|deassign|default|defparam|disable|edge|else|end(attribute|case|function|generate|module|primitive|specify|table|task)?|event|for|force|forever|fork|function|generate|genvar|highz(01)|if(none)?|initial|inout|input|integer|join|localparam|medium|module|large|macromodule|nand|negedge|nmos|nor|not|notif(01)|or|output|parameter|pmos|posedge|primitive|pull0|pull1|pulldown|pullup|rcmos|real|realtime|reg|release|repeat|rnmos|rpmos|rtran|rtranif(01)|scalared|signed|small|specify|specparam|strength|strong0|strong1|supply0|supply1|table|task|time|tran|tranif(01)|tri(01)?|tri(and|or|reg)|unsigned|vectored|wait|wand|weak(01)|while|wire|wor|xnor|xor)\\b", + "name": "keyword.other.verilog" + }, + { + "match": "^\\s*`((cell)?define|default_(decay_time|nettype|trireg_strength)|delay_mode_(path|unit|zero)|ifdef|ifndef|include|end(if|celldefine)|else|(no)?unconnected_drive|resetall|timescale|undef)\\b", + "name": "keyword.other.compiler.directive.verilog" + }, + { + "match": "\\$(f(open|close)|readmem(b|h)|timeformat|printtimescale|stop|finish|(s|real)?time|realtobits|bitstoreal|rtoi|itor|(f)?(display|write(h|b)))\\b", + "name": "support.function.system.console.tasks.verilog" + }, + { + "match": "\\$(random|dist_(chi_square|erlang|exponential|normal|poisson|t|uniform))\\b", + "name": "support.function.system.random_number.tasks.verilog" + }, + { + "match": "\\$((a)?sync\\$((n)?and|(n)or)\\$(array|plane))\\b", + "name": "support.function.system.pld_modeling.tasks.verilog" + }, + { + "match": "\\$(q_(initialize|add|remove|full|exam))\\b", + "name": "support.function.system.stochastic.tasks.verilog" + }, + { + "match": "\\$(hold|nochange|period|recovery|setup(hold)?|skew|width)\\b", + "name": "support.function.system.timing.tasks.verilog" + }, + { + "match": "\\$(dump(file|vars|off|on|all|limit|flush))\\b", + "name": "support.function.system.vcd.tasks.verilog" + }, + { + "match": "\\$(countdrivers|list|input|scope|showscopes|(no)?(key|log)|reset(_count|_value)?|(inc)?save|restart|showvars|getpattern|sreadmem(b|h)|scale)", + "name": "support.function.non-standard.tasks.verilog" + } + ] + }, + "module_pattern": { + "patterns": [ + { + "begin": "\\b(module)\\s+([a-zA-Z][a-zA-Z0-9_]*)", + "beginCaptures": { + "1": { + "name": "storage.type.module.verilog" + }, + "2": { + "name": "entity.name.type.module.verilog" + } + }, + "end": "\\bendmodule\\b", + "endCaptures": { + "0": { + "name": "storage.type.module.verilog" + } + }, + "name": "meta.block.module.verilog", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#keywords" + }, + { + "include": "#constants" + }, + { + "include": "#strings" + }, + { + "include": "#instantiation_patterns" + }, + { + "include": "#operators" + } + ] + } + ] + }, + "operators": { + "patterns": [ + { + "match": "\\+|-|\\*|/|%|(<|>)=?|(!|=)?==?|!|&&?|\\|\\|?|\\^?~|~\\^?", + "name": "keyword.operator.verilog" + } + ] + }, + "parenthetical_list": { + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.list.verilog" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.list.verilog" + } + }, + "name": "meta.block.parenthetical_list.verilog", + "patterns": [ + { + "include": "#parenthetical_list" + }, + { + "include": "#comments" + }, + { + "include": "#keywords" + }, + { + "include": "#constants" + }, + { + "include": "#strings" + } + ] + } + ] + }, + "strings": { + "patterns": [ + { + "begin": "\"", + "end": "\"", + "name": "string.quoted.double.verilog", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.verilog" + } + ] + } + ] + } + }, + "scopeName": "source.verilog", + "uuid": "7F4396B3-A33E-44F0-8502-98CA6C25971F" +} diff --git a/src/lib/shiki/languages/vhdl.tmLanguage.json b/src/lib/shiki/languages/vhdl.tmLanguage.json new file mode 100644 index 0000000..4323a49 --- /dev/null +++ b/src/lib/shiki/languages/vhdl.tmLanguage.json @@ -0,0 +1,1436 @@ +{ + "fileTypes": ["vhd", "vhdl", "vho", "vht"], + "name": "vhdl", + "patterns": [ + { + "include": "#block_processing" + }, + { + "include": "#cleanup" + } + ], + "repository": { + "architecture_pattern": { + "patterns": [ + { + "begin": "(?x)\n\n\t\t\t\t\t\t# The word architecture $1\n\t\t\t\t\t\t\\b((?i:architecture))\\s+\n\t\t\t\t\t\t\n\t\t\t\t\t\t# Followed up by a valid $3 or invalid identifier $4\n\t\t\t\t\t\t(([a-zA-z][a-zA-z0-9_]*)|(.+))(?=\\s)\\s+\n\n\t\t\t\t\t\t# The word of $5\n\t\t\t\t\t\t((?i:of))\\s+\n\n\t\t\t\t\t\t# Followed by a valid $7 or invalid identifier $8\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z0-9_]*)|(.+?))(?=\\s*(?i:is))\\b\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "entity.name.type.architecture.begin.vhdl" + }, + "4": { + "name": "invalid.illegal.invalid.identifier.vhdl" + }, + "5": { + "name": "keyword.language.vhdl" + }, + "7": { + "name": "entity.name.type.entity.reference.vhdl" + }, + "8": { + "name": "invalid.illegal.invalid.identifier.vhdl" + } + }, + "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end))\n\n\t\t\t\t\t\t# Optional word architecture $3\n\t\t\t\t\t\t(\\s+((?i:architecture)))?\n\n\t\t\t\t\t\t# Optional same identifier $6 or illegal identifier $7\n\t\t\t\t\t\t(\\s+((\\3)|(.+?)))?\n\n\t\t\t\t\t\t# This will cause the previous to capture until just before the ; or $\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", + "endCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "keyword.language.vhdl" + }, + "6": { + "name": "entity.name.type.architecture.end.vhdl" + }, + "7": { + "name": "invalid.illegal.mismatched.identifier.vhdl" + } + }, + "name": "support.block.architecture", + "patterns": [ + { + "include": "#function_definition_pattern" + }, + { + "include": "#procedure_definition_pattern" + }, + { + "include": "#component_pattern" + }, + { + "include": "#if_pattern" + }, + { + "include": "#process_pattern" + }, + { + "include": "#type_pattern" + }, + { + "include": "#record_pattern" + }, + { + "include": "#for_pattern" + }, + { + "include": "#entity_instantiation_pattern" + }, + { + "include": "#component_instantiation_pattern" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "attribute_list": { + "patterns": [ + { + "begin": "\\'\\(", + "beginCaptures": { + "0": { + "name": "punctuation.vhdl" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.vhdl" + } + }, + "patterns": [ + { + "include": "#parenthetical_list" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "block_processing": { + "patterns": [ + { + "include": "#package_pattern" + }, + { + "include": "#package_body_pattern" + }, + { + "include": "#entity_pattern" + }, + { + "include": "#architecture_pattern" + } + ] + }, + "case_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t# Beginning of line ...\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# Optional identifier ... $3 or invalid identifier $4\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t ([a-zA-Z][a-zA-Z0-9_]*)\n\t\t\t\t\t\t\t\t|(.+?)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\\s*:\\s*\n\t\t\t\t\t\t)?\n\n\t\t\t\t\t\t# The word case $5\n\t\t\t\t\t\t\\b((?i:case))\\b\n\t\t\t\t\t", + "beginCaptures": { + "3": { + "name": "entity.name.tag.case.begin.vhdl" + }, + "4": { + "name": "invalid.illegal.invalid.identifier.vhdl" + }, + "5": { + "name": "keyword.language.vhdl" + } + }, + "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end))\\s*\n\n\t\t\t\t\t\t# The word case $4 or invalid word $5\n\t\t\t\t\t\t(\\s+(((?i:case))|(.*?)))\n\n\t\t\t\t\t\t# Optional identifier from before $8 or illegal $9\n\t\t\t\t\t\t(\\s+((\\2)|(.*?)))?\n\n\t\t\t\t\t\t# Ending with a semicolon\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", + "endCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "4": { + "name": "keyword.language.vhdl" + }, + "5": { + "name": "invalid.illegal.case.required.vhdl" + }, + "8": { + "name": "entity.name.tag.case.end.vhdl" + }, + "9": { + "name": "invalid.illegal.mismatched.identifier.vhdl" + } + }, + "patterns": [ + { + "include": "#control_patterns" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "cleanup": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#constants_numeric" + }, + { + "include": "#strings" + }, + { + "include": "#attribute_list" + }, + { + "include": "#syntax_highlighting" + } + ] + }, + "comments": { + "patterns": [ + { + "match": "--.*$\\n?", + "name": "comment.line.double-dash.vhdl" + } + ] + }, + "component_instantiation_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line ...\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# Match a valid identifier $1\n\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*)\n\n\t\t\t\t\t\t# Colon! $2\n\t\t\t\t\t\t\\s*(:)\\s*\n\n\t\t\t\t\t\t# Another valid identifier $3\n\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*)\\b\n\n\t\t\t\t\t\t# Make sure we are just the other word, or the beginning of\n\t\t\t\t\t\t# a generic or port mapping\n\t\t\t\t\t\t(?=\\s*($|generic|port))\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "entity.name.section.component_instantiation.vhdl" + }, + "2": { + "name": "punctuation.vhdl" + }, + "3": { + "name": "entity.name.tag.component.reference.vhdl" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.vhdl" + } + }, + "patterns": [ + { + "include": "#parenthetical_list" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "component_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line ...\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# The word component $1\n\t\t\t\t\t\t\\b((?i:component))\\s+\n\n\t\t\t\t\t\t# A valid identifier $3 or invalid identifier $4\n\t\t\t\t\t\t(([a-zA-Z_][a-zA-Z0-9_]*)\\s*|(.+?))(?=\\b(?i:is|port)\\b|$|--)\n\n\t\t\t\t\t\t# Optional word is $6\n\t\t\t\t\t\t(\\b((?i:is\\b)))?\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "entity.name.type.component.begin.vhdl" + }, + "4": { + "name": "invalid.illegal.invalid.identifier.vhdl" + }, + "6": { + "name": "keyword.language.vhdl" + } + }, + "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end))\\s+\n\n\t\t\t\t\t\t# The word component $3 or illegal word $4\n\t\t\t\t\t\t(((?i:component\\b))|(.+?))(?=\\s*|;)\n\t\t\t\t\t\t\n\t\t\t\t\t\t# Optional identifier $7 or illegal mismatched $8\n\t\t\t\t\t\t(\\s+((\\3)|(.+?)))?(?=\\s*;)\n\t\t\t\t\t", + "endCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "keyword.language.vhdl" + }, + "4": { + "name": "invalid.illegal.component.keyword.required.vhdl" + }, + "7": { + "name": "entity.name.type.component.end.vhdl" + }, + "8": { + "name": "invalid.illegal.mismatched.identifier.vhdl" + } + }, + "patterns": [ + { + "include": "#generic_list_pattern" + }, + { + "include": "#port_list_pattern" + }, + { + "include": "#comments" + } + ] + } + ] + }, + "constants_numeric": { + "patterns": [ + { + "match": "\\b([+\\-]?[\\d_]+\\.[\\d_]+([eE][+\\-]?[\\d_]+)?)\\b", + "name": "constant.numeric.floating_point.vhdl" + }, + { + "match": "\\b\\d+#[\\h_]+#\\b", + "name": "constant.numeric.base_pound_number_pound.vhdl" + }, + { + "match": "\\b[\\d_]+([eE][\\d_]+)?\\b", + "name": "constant.numeric.integer.vhdl" + }, + { + "match": "[xX]\"[0-9a-fA-F_uUxXzZwWlLhH\\-]+\"", + "name": "constant.numeric.quoted.double.string.hex.vhdl" + }, + { + "match": "[oO]\"[0-7_uUxXzZwWlLhH\\-]+\"", + "name": "constant.numeric.quoted.double.string.octal.vhdl" + }, + { + "match": "[bB]?\"[01_uUxXzZwWlLhH\\-]+\"", + "name": "constant.numeric.quoted.double.string.binary.vhdl" + }, + { + "captures": { + "1": { + "name": "invalid.illegal.quoted.double.string.vhdl" + } + }, + "match": "([bBoOxX]\".+?\")", + "name": "constant.numeric.quoted.double.string.illegal.vhdl" + }, + { + "match": "'[01uUxXzZwWlLhH\\-]'", + "name": "constant.numeric.quoted.single.std_logic" + } + ] + }, + "control_patterns": { + "patterns": [ + { + "include": "#case_pattern" + }, + { + "include": "#if_pattern" + }, + { + "include": "#for_pattern" + }, + { + "include": "#while_pattern" + } + ] + }, + "entity_instantiation_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# Component identifier or illegal identifier $1\n\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*)\n\n\t\t\t\t\t\t# Colon! $2\n\t\t\t\t\t\t\\s*(:)\\s*\n\n\t\t\t\t\t\t# Optional word use $4\n\t\t\t\t\t\t(((?i:use))\\s+)?\n\n\t\t\t\t\t\t# Required word entity $5\n\t\t\t\t\t\t((?i:entity))\\s+\n\n\t\t\t\t\t\t# Optional library unit identifier $8 for invalid identifier $9 followed by a dot $10\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(([a-zA-Z][a-zA-Z0-9_]*)|(.+?))\n\t\t\t\t\t\t\t(\\.)\n\t\t\t\t\t\t)?\n\n\t\t\t\t\t\t# Entity name reference $12 or illegal identifier $13\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z0-9_]*)|(.+?))\n\n\t\t\t\t\t\t# Check to see if we are being followed by either open paren, end of line, or port or generic words\n\t\t\t\t\t\t(?=\\s*(\\(|$|(?i:port|generic)))\n\n\t\t\t\t\t\t# Optional architecture elaboration\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# Open paren $16\n\t\t\t\t\t\t\t\\s*(\\()\\s*\n\n\t\t\t\t\t\t\t# Arch identifier $18 or invalid identifier $19\n\t\t\t\t\t\t\t(([a-zA-Z][a-zA-Z0-9_]*)|(.+?))(?=\\s*\\))\n\n\t\t\t\t\t\t\t# Close paren $21\n\t\t\t\t\t\t\t\\s*(\\))\n\t\t\t\t\t\t)?\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "entity.name.section.entity_instantiation.vhdl" + }, + "2": { + "name": "punctuation.vhdl" + }, + "4": { + "name": "keyword.language.vhdl" + }, + "5": { + "name": "keyword.language.vhdl" + }, + "8": { + "name": "entity.name.tag.library.reference.vhdl" + }, + "9": { + "name": "invalid.illegal.invalid.identifier.vhdl" + }, + "10": { + "name": "punctuation.vhdl" + }, + "12": { + "name": "entity.name.tag.entity.reference.vhdl" + }, + "13": { + "name": "invalid.illegal.invalid.identifier.vhdl" + }, + "16": { + "name": "punctuation.vhdl" + }, + "18": { + "name": "entity.name.tag.architecture.reference.vhdl" + }, + "19": { + "name": "invalid.illegal.invalid.identifier.vhdl" + }, + "21": { + "name": "punctuation.vhdl" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.vhdl" + } + }, + "patterns": [ + { + "include": "#parenthetical_list" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "entity_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line ...\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# The word entity $1\n\t\t\t\t\t\t((?i:entity\\b))\\s+\n\n\t\t\t\t\t\t# The identifier $3 or an invalid identifier $4\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z\\d_]*)|(.+?))(?=\\s)\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "entity.name.type.entity.begin.vhdl" + }, + "4": { + "name": "invalid.illegal.invalid.identifier.vhdl" + } + }, + "end": "(?x)\n\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end\\b))\n\n\t\t\t\t\t\t# Optional word entity $3\n\t\t\t\t\t\t(\\s+((?i:entity)))?\n\n\t\t\t\t\t\t# Optional identifier match $6 or indentifier mismatch $7\n\t\t\t\t\t\t(\\s+((\\3)|(.+?)))?\n\t\t\t\t\t\t\n\t\t\t\t\t\t# Make sure there is a semicolon following\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", + "endCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "keyword.language.vhdl" + }, + "6": { + "name": "entity.name.type.entity.end.vhdl" + }, + "7": { + "name": "invalid.illegal.mismatched.identifier.vhdl" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#generic_list_pattern" + }, + { + "include": "#port_list_pattern" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "for_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# Check for an identifier $2\n\t\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*)\n\n\t\t\t\t\t\t\t# Followed by a colon $3\n\t\t\t\t\t\t\t\\s*(:)\\s*\n\t\t\t\t\t\t)?\n\n\t\t\t\t\t\t# Make sure the next word is not wait\n\t\t\t\t\t\t(?!(?i:wait\\s*))\n\n\t\t\t\t\t\t# The for keyword $4\n\t\t\t\t\t\t\\b((?i:for))\\b\n\n\t\t\t\t\t\t# Make sure the next word is not all\n\t\t\t\t\t\t(?!\\s*(?i:all))\n\n\t\t\t\t\t", + "beginCaptures": { + "2": { + "name": "entity.name.tag.for.generate.begin.vhdl" + }, + "3": { + "name": "punctuation.vhdl" + }, + "4": { + "name": "keyword.language.vhdl" + } + }, + "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end))\\s+\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# Followed by generate or loop $3\n\t\t\t\t\t\t\t ((?i:generate|loop))\n\n\t\t\t\t\t\t\t# But it really is required $4\n\t\t\t\t\t\t\t|(\\S+)\n\t\t\t\t\t\t)\\b\n\n\t\t\t\t\t\t# The matching identifier $7 or an invalid identifier $8\n\t\t\t\t\t\t(\\s+((\\2)|(.+?)))?\n\n\t\t\t\t\t\t# Only space and a semicolon left\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", + "endCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "keyword.language.vhdl" + }, + "4": { + "name": "invalid.illegal.loop.or.generate.required.vhdl" + }, + "7": { + "name": "entity.name.tag.for.generate.end.vhdl" + }, + "8": { + "name": "invalid.illegal.mismatched.identifier.vhdl" + } + }, + "patterns": [ + { + "include": "#control_patterns" + }, + { + "include": "#entity_instantiation_pattern" + }, + { + "include": "#component_pattern" + }, + { + "include": "#component_instantiation_pattern" + }, + { + "include": "#process_pattern" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "function_definition_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# The word function $1\n\t\t\t\t\t\t((?i:impure)?\\s*(?i:function))\\s+\n\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# A valid normal identifier $3\n\t\t\t\t\t\t\t ([a-zA-Z][a-zA-Z\\d_]*)\n\t\t\t\t\t\t\t# A valid string quoted identifier $4\n\t\t\t\t\t\t\t|(\"\\S+\")\n\t\t\t\t\t\t\t# A valid backslash escaped identifier $5\n\t\t\t\t\t\t\t|(\\\\.+\\\\)\n\t\t\t\t\t\t\t# An invalid identifier $5\n\t\t\t\t\t\t\t|(.+?)\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\t# Check to make sure we have a list or we return\n\t\t\t\t\t\t(?=\\s*\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t \\(\n\t\t\t\t\t\t\t\t|(?i:\\breturn\\b)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "entity.name.function.function.begin.vhdl" + }, + "4": { + "name": "entity.name.function.function.begin.vhdl" + }, + "5": { + "name": "entity.name.function.function.begin.vhdl" + }, + "6": { + "name": "invalid.illegal.invalid.identifier.vhdl" + } + }, + "end": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t((?i:end))\n\n\t\t\t\t\t\t# Optional word function $3\n\t\t\t\t\t\t(\\s+((?i:function)))?\n\n\t\t\t\t\t\t# Optional matched identifier $6 or mismatched identifier $7\n\t\t\t\t\t\t(\\s+((\\3|\\4|\\5)|(.+?)))?\n\n\t\t\t\t\t\t# Ending with whitespace and semicolon\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", + "endCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "keyword.language.vhdl" + }, + "6": { + "name": "entity.name.function.function.end.vhdl" + }, + "7": { + "name": "invalid.illegal.mismatched.identifier.vhdl" + } + }, + "patterns": [ + { + "include": "#control_patterns" + }, + { + "include": "#parenthetical_list" + }, + { + "include": "#type_pattern" + }, + { + "include": "#record_pattern" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "function_prototype_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# The word function $1\n\t\t\t\t\t\t((?i:impure)?\\s*(?i:function))\\s+\n\t\t\t\t\t\t\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# A valid normal identifier $3\n\t\t\t\t\t\t\t ([a-zA-Z][a-zA-Z\\d_]*)\n\t\t\t\t\t\t\t# A valid quoted identifier $4\n\t\t\t\t\t\t\t|(\"\\S+\")\n\t\t\t\t\t\t\t# A valid backslash escaped identifier $5\n\t\t\t\t\t\t\t|(\\\\.+\\\\)\n\t\t\t\t\t\t\t# An invalid identifier $6\n\t\t\t\t\t\t\t|(.+?)\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\t# Check to make sure we have a list or we return\n\t\t\t\t\t\t(?=\\s*\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t \\(\n\t\t\t\t\t\t\t\t|(?i:\\breturn\\b)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "entity.name.function.function.prototype.vhdl" + }, + "4": { + "name": "entity.name.function.function.prototype.vhdl" + }, + "5": { + "name": "entity.name.function.function.prototype.vhdl" + }, + "6": { + "name": "invalid.illegal.function.name.vhdl" + } + }, + "end": "(?<=;)", + "patterns": [ + { + "begin": "\\b(?i:return)(?=\\s+[^;]+\\s*;)", + "beginCaptures": { + "0": { + "name": "keyword.language.vhdl" + } + }, + "end": "\\;", + "endCaptures": { + "0": { + "name": "punctuation.terminator.function_prototype.vhdl" + } + }, + "patterns": [ + { + "include": "#parenthetical_list" + }, + { + "include": "#cleanup" + } + ] + }, + { + "include": "#parenthetical_list" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "generic_list_pattern": { + "patterns": [ + { + "begin": "\\b(?i:generic)\\b", + "beginCaptures": { + "0": { + "name": "keyword.language.vhdl" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.vhdl" + } + }, + "patterns": [ + { + "include": "#parenthetical_list" + } + ] + } + ] + }, + "if_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# Optional identifier $2\n\t\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*)\n\n\t\t\t\t\t\t\t# Followed by a colon $3\n\t\t\t\t\t\t\t\\s*(:)\\s*\n\t\t\t\t\t\t)?\n\n\t\t\t\t\t\t# Keyword if $4\n\t\t\t\t\t\t\\b((?i:if))\\b\n\t\t\t\t\t", + "beginCaptures": { + "2": { + "name": "entity.name.tag.if.generate.begin.vhdl" + }, + "3": { + "name": "punctuation.vhdl" + }, + "4": { + "name": "keyword.language.vhdl" + } + }, + "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end))\\s+\n\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t# Optional generate or if keyword $4\n\t\t\t\t\t\t\t\t ((?i:generate|if))\n\n\t\t\t\t\t\t\t\t# Keyword if or generate required $5\n\t\t\t\t\t\t\t\t|(\\S+)\n\t\t\t\t\t\t\t)\\b\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t# Optional matching identifier $8\n\t\t\t\t\t\t\t\t\t (\\2)\n\n\t\t\t\t\t\t\t\t\t# Mismatched identifier $9\n\t\t\t\t\t\t\t\t\t|(.+?)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t)?\n\n\t\t\t\t\t\t# Followed by a semicolon\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", + "endCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "4": { + "name": "keyword.language.vhdl" + }, + "5": { + "name": "invalid.illegal.if.or.generate.required.vhdl" + }, + "8": { + "name": "entity.name.tag.if.generate.end.vhdl" + }, + "9": { + "name": "invalid.illegal.mismatched.identifier.vhdl" + } + }, + "patterns": [ + { + "include": "#control_patterns" + }, + { + "include": "#process_pattern" + }, + { + "include": "#entity_instantiation_pattern" + }, + { + "include": "#component_pattern" + }, + { + "include": "#component_instantiation_pattern" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "keywords": { + "patterns": [ + { + "match": "'(?i:active|ascending|base|delayed|driving|event|high|image|instance|instance_name|last|last_value|left|leftof|length|low|path|path_name|pos|pred|quiet|range|reverse|reverse_range|right|rightof|simple|simple_name|stable|succ|transaction|val|value)\\b", + "name": "keyword.attributes.vhdl" + }, + { + "match": "\\b(?i:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|context|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|protected|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)\\b", + "name": "keyword.language.vhdl" + }, + { + "match": "\\b(?i:std|ieee|work|standard|textio|std_logic_1164|std_logic_arith|std_logic_misc|std_logic_signed|std_logic_textio|std_logic_unsigned|numeric_bit|numeric_std|math_complex|math_real|vital_primitives|vital_timing)\\b", + "name": "standard.library.language.vhdl" + }, + { + "match": "(\\+|\\-|<=|=|=>|:=|>=|>|<|/|\\||&|(\\*{1,2}))", + "name": "keyword.operator.vhdl" + } + ] + }, + "package_body_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t# The word package $1\n\t\t\t\t\t\t\\b((?i:package))\\s+\n\n\t\t\t\t\t\t# ... but we want to be a package body $2\n\t\t\t\t\t\t((?i:body))\\s+\n\n\t\t\t\t\t\t# The valid identifier $4 or the invalid one $5\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z\\d_]*)|(.+?))\\s+\n\n\t\t\t\t\t\t# ... and we end it with an is $6\n\t\t\t\t\t\t((?i:is))\\b\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "2": { + "name": "keyword.language.vhdl" + }, + "4": { + "name": "entity.name.section.package_body.begin.vhdl" + }, + "5": { + "name": "invalid.illegal.invalid.identifier.vhdl" + }, + "6": { + "name": "keyword.language.vhdl" + } + }, + "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end\\b))\n\n\t\t\t\t\t\t# Optional word package $3 body $4\n\t\t\t\t\t\t(\\s+((?i:package))\\s+((?i:body)))?\n\n\t\t\t\t\t\t# Optional identifier $7 or mismatched identifier $8\n\t\t\t\t\t\t(\\s+((\\4)|(.+?)))?(?=\\s*;)", + "endCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "keyword.language.vhdl" + }, + "4": { + "name": "keyword.language.vhdl" + }, + "7": { + "name": "entity.name.section.package_body.end.vhdl" + }, + "8": { + "name": "invalid.illegal.mismatched.identifier.vhdl" + } + }, + "patterns": [ + { + "include": "#protected_body_pattern" + }, + { + "include": "#function_definition_pattern" + }, + { + "include": "#procedure_definition_pattern" + }, + { + "include": "#type_pattern" + }, + { + "include": "#subtype_pattern" + }, + { + "include": "#record_pattern" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "package_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t# The word package $1\n\t\t\t\t\t\t\\b((?i:package))\\s+\n\n\t\t\t\t\t\t# ... but we do not want to be a package body\n\t\t\t\t\t\t(?!(?i:body))\n\n\t\t\t\t\t\t# The valid identifier $3 or the invalid one $4\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z\\d_]*)|(.+?))\\s+\n\n\t\t\t\t\t\t# ... and we end it with an is $5\n\t\t\t\t\t\t((?i:is))\\b\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "entity.name.section.package.begin.vhdl" + }, + "4": { + "name": "invalid.illegal.invalid.identifier.vhdl" + }, + "5": { + "name": "keyword.language.vhdl" + } + }, + "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end\\b))\n\n\t\t\t\t\t\t# Optional word package $3\n\t\t\t\t\t\t(\\s+((?i:package)))?\n\n\t\t\t\t\t\t# Optional identifier $6 or mismatched identifier $7\n\t\t\t\t\t\t(\\s+((\\2)|(.+?)))?(?=\\s*;)", + "endCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "keyword.language.vhdl" + }, + "6": { + "name": "entity.name.section.package.end.vhdl" + }, + "7": { + "name": "invalid.illegal.mismatched.identifier.vhdl" + } + }, + "patterns": [ + { + "include": "#protected_pattern" + }, + { + "include": "#function_prototype_pattern" + }, + { + "include": "#procedure_prototype_pattern" + }, + { + "include": "#type_pattern" + }, + { + "include": "#subtype_pattern" + }, + { + "include": "#record_pattern" + }, + { + "include": "#component_pattern" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "protected_body_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t\\b((?i:type))\\s+\n\n\t\t\t\t\t\t# The valid identifier $2 or the invalid one $3\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z\\d_]*)|(.+?))\\s+\n\n\t\t\t\t\t\t\\b((?i:is\\s+protected\\s+body))\\s+\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "entity.name.section.protected_body.begin.vhdl" + }, + "4": { + "name": "invalid.illegal.invalid.identifier.vhdl" + }, + "5": { + "name": "keyword.language.vhdl" + } + }, + "end": "(?x)\n\t\t\t\t\t\t\\b((?i:end\\s+protected\\s+body))\n\n\t\t\t\t\t\t# Optional identifier\n\t\t\t\t\t\t(\\s+((\\3)|(.+?)))?\n\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t\t", + "endCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "4": { + "name": "entity.name.section.protected_body.end.vhdl" + }, + "5": { + "name": "invalid.illegal.mismatched.identifier.vhdl" + } + }, + "patterns": [ + { + "include": "#function_definition_pattern" + }, + { + "include": "#procedure_definition_pattern" + }, + { + "include": "#type_pattern" + }, + { + "include": "#subtype_pattern" + }, + { + "include": "#record_pattern" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "protected_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t\\b((?i:type))\\s+\n\n\t\t\t\t\t\t# The valid identifier $2 or the invalid one $3\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z\\d_]*)|(.+?))\\s+\n\n\t\t\t\t\t\t\\b((?i:is\\s+protected))\\s+\n\n\t\t\t\t\t\t# Not body\n\t\t\t\t\t\t(?!(?i:body))\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.language.vhdls" + }, + "3": { + "name": "entity.name.section.protected.begin.vhdl" + }, + "4": { + "name": "invalid.illegal.invalid.identifier.vhdl" + }, + "5": { + "name": "keyword.language.vhdl" + } + }, + "end": "(?x)\n\t\t\t\t\t\t\\b((?i:end\\s+protected))\n\n\t\t\t\t\t\t# Optional identifier\n\t\t\t\t\t\t(\\s+((\\3)|(.+?)))?\n\n\t\t\t\t\t\t# Not body\n\t\t\t\t\t\t(?!(?i:body))\n\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", + "endCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "4": { + "name": "entity.name.section.protected.end.vhdl" + }, + "5": { + "name": "invalid.illegal.mismatched.identifier.vhdl" + } + }, + "patterns": [ + { + "include": "#function_prototype_pattern" + }, + { + "include": "#procedure_prototype_pattern" + }, + { + "include": "#type_pattern" + }, + { + "include": "#subtype_pattern" + }, + { + "include": "#record_pattern" + }, + { + "include": "#component_pattern" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "parenthetical_list": { + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.vhdl" + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "begin": "(?=['\"a-zA-Z0-9])", + "end": "(;|\\)|,)", + "endCaptures": { + "0": { + "name": "punctuation.vhdl" + } + }, + "name": "source.vhdl", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#parenthetical_pair" + }, + { + "include": "#cleanup" + } + ] + }, + { + "match": "\\)", + "name": "invalid.illegal.unexpected.parenthesis.vhdl" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "parenthetical_pair": { + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.vhdl" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.vhdl" + } + }, + "patterns": [ + { + "include": "#parenthetical_pair" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "port_list_pattern": { + "patterns": [ + { + "begin": "\\b(?i:port)\\b", + "beginCaptures": { + "0": { + "name": "keyword.language.vhdl" + } + }, + "end": "(?<=\\))\\s*;", + "endCaptures": { + "0": { + "name": "punctuation.vhdl" + } + }, + "patterns": [ + { + "include": "#parenthetical_list" + } + ] + } + ] + }, + "procedure_definition_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# The word function $1\n\t\t\t\t\t\t((?i:procedure))\\s+\n\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# A valid normal identifier $3\n\t\t\t\t\t\t\t ([a-zA-Z][a-zA-Z\\d_]*)\n\t\t\t\t\t\t\t# A valid quoted identifier $4\n\t\t\t\t\t\t\t|(\"\\S+\")\n\t\t\t\t\t\t\t# An invalid identifier $5\n\t\t\t\t\t\t\t|(.+?)\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\t# Check to make sure we have a list is\n\t\t\t\t\t\t(?=\\s*(\\(|(?i:is)))\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "entity.name.function.procedure.begin.vhdl" + }, + "4": { + "name": "entity.name.function.procedure.begin.vhdl" + }, + "5": { + "name": "invalid.illegal.invalid.identifier.vhdl" + } + }, + "end": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t((?i:end))\n\n\t\t\t\t\t\t# Optional word function $3\n\t\t\t\t\t\t(\\s+((?i:procedure)))?\n\n\t\t\t\t\t\t# Optional matched identifier $6 or mismatched identifier $7\n\t\t\t\t\t\t(\\s+((\\3|\\4)|(.+?)))?\n\n\t\t\t\t\t\t# Ending with whitespace and semicolon\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", + "endCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "keyword.language.vhdl" + }, + "6": { + "name": "entity.name.function.procedure.end.vhdl" + }, + "7": { + "name": "invalid.illegal.mismatched.identifier.vhdl" + } + }, + "patterns": [ + { + "include": "#parenthetical_list" + }, + { + "include": "#control_patterns" + }, + { + "include": "#type_pattern" + }, + { + "include": "#record_pattern" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "procedure_prototype_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t\\b((?i:procedure))\\s+\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z0-9_]*)|(.+?))\n\t\t\t\t\t\t(?=\\s*(\\(|;))\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "entity.name.function.procedure.begin.vhdl" + }, + "4": { + "name": "invalid.illegal.invalid.identifier.vhdl" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctual.vhdl" + } + }, + "patterns": [ + { + "include": "#parenthetical_list" + } + ] + } + ] + }, + "process_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# Optional identifier $2\n\t\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*)\n\n\t\t\t\t\t\t\t# Colon $3\n\t\t\t\t\t\t\t\\s*(:)\\s*\n\t\t\t\t\t\t)?\n\n\t\t\t\t\t\t# The word process #4\n\t\t\t\t\t\t((?i:process\\b))\n\t\t\t\t\t", + "beginCaptures": { + "2": { + "name": "entity.name.section.process.begin.vhdl" + }, + "3": { + "name": "punctuation.vhdl" + }, + "4": { + "name": "keyword.language.vhdl" + } + }, + "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t((?i:end))\n\n\t\t\t\t\t\t# Optional word process $3\n\t\t\t\t\t\t(\\s+((?i:process)))\n\n\t\t\t\t\t\t# Optional identifier $6 or invalid identifier $7\n\t\t\t\t\t\t(\\s+((\\2)|(.+?)))?\n\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", + "endCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "keyword.language.vhdl" + }, + "6": { + "name": "entity.name.section.process.end.vhdl" + }, + "7": { + "name": "invalid.illegal.invalid.identifier.vhdl" + } + }, + "patterns": [ + { + "include": "#control_patterns" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "punctuation": { + "patterns": [ + { + "match": "(\\.|,|:|;|\\(|\\))", + "name": "punctuation.vhdl" + } + ] + }, + "record_pattern": { + "patterns": [ + { + "begin": "\\b(?i:record)\\b", + "beginCaptures": { + "0": { + "name": "keyword.language.vhdl" + } + }, + "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end))\n\n\t\t\t\t\t\t# The word record $2\n\t\t\t\t\t\t\\s+((?i:record))\n\n\t\t\t\t\t\t# Optional identifier $5 or invalid identifier $6\n\t\t\t\t\t\t(\\s+(([a-zA-Z][a-zA-Z\\d_]*)|(.*?)))?\n\n\t\t\t\t\t\t# Only whitespace and semicolons can be left\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", + "endCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "2": { + "name": "keyword.language.vhdl" + }, + "5": { + "name": "entity.name.type.record.vhdl" + }, + "6": { + "name": "invalid.illegal.invalid.identifier.vhdl" + } + }, + "patterns": [ + { + "include": "#cleanup" + } + ] + }, + { + "include": "#cleanup" + } + ] + }, + "strings": { + "patterns": [ + { + "match": "'.'", + "name": "string.quoted.single.vhdl" + }, + { + "begin": "\"", + "end": "\"", + "name": "string.quoted.double.vhdl", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.vhdl" + } + ] + }, + { + "begin": "\\\\", + "end": "\\\\", + "name": "string.other.backslash.vhdl" + } + ] + }, + "subtype_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t# The word subtype $1\n\t\t\t\t\t\t\\b((?i:subtype))\\s+\n\n\t\t\t\t\t\t# Valid identifier $3 or invalid identifier $4\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z0-9_]*)|(.+?))\\s+\n\n\t\t\t\t\t\t# The word is $5\n\t\t\t\t\t\t((?i:is))\\b\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "entity.name.type.subtype.vhdl" + }, + "4": { + "name": "invalid.illegal.invalid.identifier.vhdl" + }, + "5": { + "name": "keyword.language.vhdl" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.vhdl" + } + }, + "patterns": [ + { + "include": "#cleanup" + } + ] + } + ] + }, + "support_constants": { + "patterns": [ + { + "match": "\\b(?i:math_1_over_e|math_1_over_pi|math_1_over_sqrt_2|math_2_pi|math_3_pi_over_2|math_deg_to_rad|math_e|math_log10_of_e|math_log2_of_e|math_log_of_10|math_log_of_2|math_pi|math_pi_over_2|math_pi_over_3|math_pi_over_4|math_rad_to_deg|math_sqrt_2|math_sqrt_pi)\\b", + "name": "support.constant.ieee.math_real.vhdl" + }, + { + "match": "\\b(?i:math_cbase_1|math_cbase_j|math_czero|positive_real|principal_value)\\b", + "name": "support.constant.ieee.math_complex.vhdl" + }, + { + "match": "\\b(?i:true|false)\\b", + "name": "support.constant.std.standard.vhdl" + } + ] + }, + "support_functions": { + "patterns": [ + { + "match": "\\b(?i:finish|stop|resolution_limit)\\b", + "name": "support.function.std.env.vhdl" + }, + { + "match": "\\b(?i:readline|read|writeline|write|endfile|endline)\\b", + "name": "support.function.std.textio.vhdl" + }, + { + "match": "\\b(?i:rising_edge|falling_edge|to_bit|to_bitvector|to_stdulogic|to_stdlogicvector|to_stdulogicvector|is_x)\\b", + "name": "support.function.ieee.std_logic_1164.vhdl" + }, + { + "match": "\\b(?i:shift_left|shift_right|rotate_left|rotate_right|resize|to_integer|to_unsigned|to_signed)\\b", + "name": "support.function.ieee.numeric_std.vhdl" + }, + { + "match": "\\b(?i:arccos(h?)|arcsin(h?)|arctan|arctanh|cbrt|ceil|cos|cosh|exp|floor|log10|log2|log|realmax|realmin|round|sign|sin|sinh|sqrt|tan|tanh|trunc)\\b", + "name": "support.function.ieee.math_real.vhdl" + }, + { + "match": "\\b(?i:arg|cmplx|complex_to_polar|conj|get_principal_value|polar_to_complex)\\b", + "name": "support.function.ieee.math_complex.vhdl" + } + ] + }, + "support_types": { + "patterns": [ + { + "match": "\\b(?i:boolean|bit|character|severity_level|integer|real|time|delay_length|now|natural|positive|string|bit_vector|file_open_kind|file_open_status|fs|ps|ns|us|ms|sec|min|hr|severity_level|note|warning|error|failure)\\b", + "name": "support.type.std.standard.vhdl" + }, + { + "match": "\\b(?i:line|text|side|width|input|output)\\b", + "name": "support.type.std.textio.vhdl" + }, + { + "match": "\\b(?i:std_logic|std_ulogic|std_logic_vector|std_ulogic_vector)\\b", + "name": "support.type.ieee.std_logic_1164.vhdl" + }, + { + "match": "\\b(?i:signed|unsigned)\\b", + "name": "support.type.ieee.numeric_std.vhdl" + }, + { + "match": "\\b(?i:complex|complex_polar)\\b", + "name": "support.type.ieee.math_complex.vhdl" + } + ] + }, + "syntax_highlighting": { + "patterns": [ + { + "include": "#keywords" + }, + { + "include": "#punctuation" + }, + { + "include": "#support_constants" + }, + { + "include": "#support_types" + }, + { + "include": "#support_functions" + } + ] + }, + "type_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t# The word type $1\n\t\t\t\t\t\t\\b((?i:type))\\s+\n\n\t\t\t\t\t\t# Valid identifier $3 or invalid identifier $4\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z0-9_]*)|(.+?))\n\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# A semicolon is coming up if we are incomplete\n\t\t\t\t\t\t\t (?=\\s*;)\n\n\t\t\t\t\t\t\t# Or the word is comes up $7\n\t\t\t\t\t\t\t|(\\s+((?i:is)))\n\t\t\t\t\t\t)\\b\n\t\t\t\t\t", + "beginCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "entity.name.type.type.vhdl" + }, + "4": { + "name": "invalid.illegal.invalid.identifier.vhdl" + }, + "7": { + "name": "keyword.language.vhdl" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.vhdl" + } + }, + "patterns": [ + { + "include": "#record_pattern" + }, + { + "include": "#cleanup" + } + ] + } + ] + }, + "while_pattern": { + "patterns": [ + { + "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# Check for an identifier $2\n\t\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*)\n\n\t\t\t\t\t\t\t# Followed by a colon $3\n\t\t\t\t\t\t\t\\s*(:)\\s*\n\t\t\t\t\t\t)?\n\n\t\t\t\t\t\t# The for keyword $4\n\t\t\t\t\t\t\\b((?i:while))\\b\n\t\t\t\t\t", + "beginCaptures": { + "2": { + "name": "" + }, + "3": { + "name": "punctuation.vhdl" + }, + "4": { + "name": "keyword.language.vhdl" + } + }, + "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end))\\s+\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# Followed by keyword loop $3\n\t\t\t\t\t\t\t ((?i:loop))\n\n\t\t\t\t\t\t\t# But it really is required $4\n\t\t\t\t\t\t\t|(\\S+)\n\t\t\t\t\t\t)\\b\n\n\t\t\t\t\t\t# The matching identifier $7 or an invalid identifier $8\n\t\t\t\t\t\t(\\s+((\\2)|(.+?)))?\n\n\t\t\t\t\t\t# Only space and a semicolon left\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", + "endCaptures": { + "1": { + "name": "keyword.language.vhdl" + }, + "3": { + "name": "keyword.language.vhdl" + }, + "4": { + "name": "invalid.illegal.loop.keyword.required.vhdl" + }, + "7": { + "name": "entity.name.tag.while.loop.vhdl" + }, + "8": { + "name": "invalid.illegal.mismatched.identifier" + } + }, + "patterns": [ + { + "include": "#control_patterns" + }, + { + "include": "#cleanup" + } + ] + } + ] + } + }, + "scopeName": "source.vhdl" +} diff --git a/src/lib/shiki/languages/viml.tmLanguage.json b/src/lib/shiki/languages/viml.tmLanguage.json new file mode 100644 index 0000000..99b7fcc --- /dev/null +++ b/src/lib/shiki/languages/viml.tmLanguage.json @@ -0,0 +1,441 @@ +{ + "repository": { + "commands": { + "patterns": [ + { + "name": "storage.other.command.viml", + "match": "\\bcom(\\s|\\!)" + }, + { + "name": "storage.other.command.viml", + "match": "\\bau(\\s|\\!)" + }, + { + "name": "storage.other.command.bang.viml", + "match": "-bang" + }, + { + "name": "storage.other.command.args.viml", + "match": "-nargs=[*+0-9]+" + }, + { + "name": "storage.other.command.completion.viml", + "match": "-complete=\\S+" + }, + { + "begin": "(aug(roup)?)", + "end": "(augroup\\sEND|$)", + "name": "support.function.augroup.viml" + } + ] + }, + "comment": { + "patterns": [ + { + "begin": "((\\s+)?\"\"\")", + "end": "^(?!\")", + "name": "comment.block.documentation.viml" + }, + { + "match": "^\"\\svim:.*", + "name": "comment.block.modeline.viml" + }, + { + "name": "comment.line.viml", + "begin": "(\\s+\"\\s+)(?!\")", + "end": "$", + "patterns": [ + { + "match": "\\{\\{\\{\\d?$", + "name": "comment.line.foldmarker.viml" + }, + { + "match": "\\}\\}\\}\\d?", + "name": "comment.line.foldmarker.viml" + } + ] + }, + { + "name": "comment.line.viml", + "begin": "^(\\s+)?\"", + "end": "$", + "patterns": [ + { + "match": "\\{\\{\\{\\d?$", + "name": "comment.line.foldmarker.viml" + }, + { + "match": "\\}\\}\\}\\d?", + "name": "comment.line.foldmarker.viml" + } + ] + } + ] + }, + "entity": { + "patterns": [ + { + "name": "entity.name.function.viml", + "match": "(([absg]\\:)?[a-zA-Z0-9_#.]{2,})\\b(?=\\()" + } + ] + }, + "map": { + "patterns": [ + { + "begin": "(\\<)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.map.viml" + } + }, + "end": "(\\>|\\s)", + "endCaptures": { + "1": { + "name": "punctuation.definition.map.viml" + } + }, + "patterns": [ + { + "name": "constant.character.map.rhs.viml", + "match": "(?<=:\\s)(.+)" + }, + { + "name": "constant.character.map.special.viml", + "match": "(?i:(bang|buffer|expr|nop|plug|sid|silent))" + }, + { + "name": "constant.character.map.key.viml", + "match": "(?i:([adcms]-\\w))" + }, + { + "name": "constant.character.map.key.fn.viml", + "match": "(?i:(F[0-9]+))" + }, + { + "name": "constant.character.map.viml", + "match": "(?i:(bs|bar|cr|del|down|esc|left|right|space|tab|up|leader))" + } + ] + }, + { + "name": "storage.type.map.viml", + "match": "(\\b([cinostvx]?(nore)?map)\\b)" + } + ] + }, + "operators": { + "patterns": [ + { + "name": "keyword.operator.viml", + "match": "([#+?!=~\\\\])" + }, + { + "name": "keyword.operator.viml", + "match": " ([:\\-.]|[&|]{2})( |$)" + }, + { + "name": "keyword.operator.viml", + "match": "([.]{3})" + }, + { + "name": "keyword.operator.viml", + "match": "( [<>] )" + }, + { + "name": "keyword.operator.viml", + "match": "(>=)" + } + ] + }, + "option": { + "patterns": [ + { + "name": "support.type.option.viml", + "match": "&?\\b(al|aleph|anti|antialias|arab|arabic|arshape|arabicshape|ari|allowrevins|akm|altkeymap|ambw|ambiwidth|acd|autochdir|ai|autoindent|ar|autoread|aw|autowrite|awa|autowriteall|bg|background|bs|backspace|bk|backup|bkc|backupcopy|bdir|backupdir|bex|backupext|bsk|backupskip|bdlay|balloondelay|beval|ballooneval|bevalterm|balloonevalterm|bexpr|balloonexpr|bo|belloff|bin|binary|bomb|brk|breakat|bri|breakindent|briopt|breakindentopt|bsdir|browsedir|bh|bufhidden|bl|buflisted|bt|buftype|cmp|casemap|cd|cdpath|cedit|ccv|charconvert|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|cb|clipboard|ch|cmdheight|cwh|cmdwinheight|cc|colorcolumn|co|columns|com|comments|cms|commentstring|cp|compatible|cpt|complete|cocu|concealcursor|cole|conceallevel|cfu|completefunc|cot|completeopt|cf|confirm|ci|copyindent|cpo|cpoptions|cm|cryptmethod|cspc|cscopepathcomp|csprg|cscopeprg|csqf|cscopequickfix|csre|cscoperelative|cst|cscopetag|csto|cscopetagorder|csverb|cscopeverbose|crb|cursorbind|cuc|cursorcolumn|cul|cursorline|debug|def|define|deco|delcombine|dict|dictionary|diff|dex|diffexpr|dip|diffopt|dg|digraph|dir|directory|dy|display|ead|eadirection|ed|edcompatible|emo|emoji|enc|encoding|eol|endofline|ea|equalalways|ep|equalprg|eb|errorbells|ef|errorfile|efm|errorformat|ek|esckeys|ei|eventignore|et|expandtab|ex|exrc|fenc|fileencoding|fencs|fileencodings|ff|fileformat|ffs|fileformats|fic|fileignorecase|ft|filetype|fcs|fillchars|fixeol|fixendofline|fk|fkmap|fcl|foldclose|fdc|foldcolumn|fen|foldenable|fde|foldexpr|fdi|foldignore|fdl|foldlevel|fdls|foldlevelstart|fmr|foldmarker|fdm|foldmethod|fml|foldminlines|fdn|foldnestmax|fdo|foldopen|fdt|foldtext|fex|formatexpr|fo|formatoptions|flp|formatlistpat|fp|formatprg|fs|fsync|gd|gdefault|gfm|grepformat|gp|grepprg|gcr|guicursor|gfn|guifont|gfs|guifontset|gfw|guifontwide|ghr|guiheadroom|go|guioptions|guipty|gtl|guitablabel|gtt|guitabtooltip|hf|helpfile|hh|helpheight|hlg|helplang|hid|hidden|hl|highlight|hi|history|hk|hkmap|hkp|hkmapp|hls|hlsearch|icon|iconstring|ic|ignorecase|imaf|imactivatefunc|imak|imactivatekey|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|imsf|imstatusfunc|imst|imstyle|inc|include|inex|includeexpr|is|incsearch|inde|indentexpr|indk|indentkeys|inf|infercase|im|insertmode|isf|isfname|isi|isident|isk|iskeyword|isp|isprint|js|joinspaces|key|kmp|keymap|km|keymodel|kp|keywordprg|lmap|langmap|lm|langmenu|lnr|langnoremap|lrm|langremap|ls|laststatus|lz|lazyredraw|lbr|linebreak|lines|lsp|linespace|lisp|lw|lispwords|list|lcs|listchars|lpl|loadplugins|luadll|macatsui|magic|mef|makeef|menc|makeencoding|mp|makeprg|mps|matchpairs|mat|matchtime|mco|maxcombine|mfd|maxfuncdepth|mmd|maxmapdepth|mm|maxmem|mmp|maxmempattern|mmt|maxmemtot|mis|menuitems|msm|mkspellmem|ml|modeline|mls|modelines|ma|modifiable|mod|modified|more|mouse|mousef|mousefocus|mh|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mzschemedll|mzschemegcdll|mzq|mzquantum|nf|nrformats|nu|number|nuw|numberwidth|ofu|omnifunc|odev|opendevice|opfunc|operatorfunc|pp|packpath|para|paragraphs|paste|pt|pastetoggle|pex|patchexpr|pm|patchmode|pa|path|perldll|pi|preserveindent|pvh|previewheight|pvw|previewwindow|pdev|printdevice|penc|printencoding|pexpr|printexpr|pfn|printfont|pheader|printheader|pmbcs|printmbcharset|pmbfn|printmbfont|popt|printoptions|prompt|ph|pumheight|pythonthreedll|pythondll|pyx|pyxversion|qe|quoteescape|ro|readonly|rdt|redrawtime|re|regexpengine|rnu|relativenumber|remap|rop|renderoptions|report|rs|restorescreen|ri|revins|rl|rightleft|rlc|rightleftcmd|rubydll|ru|ruler|ruf|rulerformat|rtp|runtimepath|scr|scroll|scb|scrollbind|sj|scrolljump|so|scrolloff|sbo|scrollopt|sect|sections|secure|sel|selection|slm|selectmode|ssop|sessionoptions|sh|shell|shcf|shellcmdflag|sp|shellpipe|shq|shellquote|srr|shellredir|ssl|shellslash|stmp|shelltemp|st|shelltype|sxq|shellxquote|sxe|shellxescape|sr|shiftround|sw|shiftwidth|shm|shortmess|sn|shortname|sbr|showbreak|sc|showcmd|sft|showfulltag|sm|showmatch|smd|showmode|stal|showtabline|ss|sidescroll|siso|sidescrolloff|scl|signcolumn|scs|smartcase|si|smartindent|sta|smarttab|sts|softtabstop|spell|spc|spellcapcheck|spf|spellfile|spl|spelllang|sps|spellsuggest|sb|splitbelow|spr|splitright|sol|startofline|stl|statusline|su|suffixes|sua|suffixesadd|swf|swapfile|sws|swapsync|swb|switchbuf|smc|synmaxcol|syn|syntax|tal|tabline|tpm|tabpagemax|ts|tabstop|tbs|tagbsearch|tc|tagcase|tl|taglength|tr|tagrelative|tag|tags|tgst|tagstack|tcldll|term|tbidi|termbidi|tenc|termencoding|tgc|termguicolors|tk|termkey|tms|termsize|terse|ta|textauto|tx|textmode|tw|textwidth|tsr|thesaurus|top|tildeop|to|timeout|tm|timeoutlen|title|titlelen|titleold|titlestring|tb|toolbar|tbis|toolbariconsize|ttimeout|ttm|ttimeoutlen|tbi|ttybuiltin|tf|ttyfast|ttym|ttymouse|tsl|ttyscroll|tty|ttytype|udir|undodir|udf|undofile|ul|undolevels|ur|undoreload|uc|updatecount|ut|updatetime|vbs|verbose|vfile|verbosefile|vdir|viewdir|vop|viewoptions|vi|viminfo|vif|viminfofile|ve|virtualedit|vb|visualbell|warn|wiv|weirdinvert|ww|whichwrap|wc|wildchar|wcm|wildcharm|wig|wildignore|wic|wildignorecase|wmnu|wildmenu|wim|wildmode|wop|wildoptions|wak|winaltkeys|wi|window|wh|winheight|wfh|winfixheight|wfw|winfixwidth|wmh|winminheight|wmw|winminwidth|winptydll|wiw|winwidth|wrap|wm|wrapmargin|ws|wrapscan|write|wa|writeany|wb|writebackup|wd|writedelay)\\b" + }, + { + "name": "support.type.option.viml", + "match": "&?\\b(aleph|allowrevins|altkeymap|ambiwidth|autochdir|arabic|arabicshape|autoindent|autoread|autowrite|autowriteall|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|belloff|binary|bomb|breakat|breakindent|breakindentopt|browsedir|bufhidden|buflisted|buftype|casemap|cdpath|cedit|charconvert|cindent|cinkeys|cinoptions|cinwords|clipboard|cmdheight|cmdwinheight|colorcolumn|columns|comments|commentstring|complete|completefunc|completeopt|concealcursor|conceallevel|confirm|copyindent|cpoptions|cscopepathcomp|cscopeprg|cscopequickfix|cscoperelative|cscopetag|cscopetagorder|cscopeverbose|cursorbind|cursorcolumn|cursorline|debug|define|delcombine|dictionary|diff|diffexpr|diffopt|digraph|directory|display|eadirection|encoding|endofline|equalalways|equalprg|errorbells|errorfile|errorformat|eventignore|expandtab|exrc|fileencoding|fileencodings|fileformat|fileformats|fileignorecase|filetype|fillchars|fixendofline|fkmap|foldclose|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldopen|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fsync|gdefault|grepformat|grepprg|guicursor|guifont|guifontset|guifontwide|guioptions|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hidden|hlsearch|history|hkmap|hkmapp|icon|iconstring|ignorecase|imcmdline|imdisable|iminsert|imsearch|include|includeexpr|incsearch|indentexpr|indentkeys|infercase|insertmode|isfname|isident|iskeyword|isprint|joinspaces|keymap|keymodel|keywordprg|langmap|langmenu|langremap|laststatus|lazyredraw|linebreak|lines|linespace|lisp|lispwords|list|listchars|loadplugins|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|menuitems|mkspellmem|modeline|modelines|modifiable|modified|more|mouse|mousefocus|mousehide|mousemodel|mouseshape|mousetime|nrformats|number|numberwidth|omnifunc|opendevice|operatorfunc|packpath|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|perldll|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pumheight|pythondll|pythonthreedll|quoteescape|readonly|redrawtime|regexpengine|relativenumber|remap|report|revins|rightleft|rightleftcmd|rubydll|ruler|rulerformat|runtimepath|scroll|scrollbind|scrolljump|scrolloff|scrollopt|sections|secure|selection|selectmode|sessionoptions|shada|shell|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shellxescape|shellxquote|shiftround|shiftwidth|shortmess|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|sidescroll|sidescrolloff|signcolumn|smartcase|smartindent|smarttab|softtabstop|spell|spellcapcheck|spellfile|spelllang|spellsuggest|splitbelow|splitright|startofline|statusline|suffixes|suffixesadd|swapfile|switchbuf|synmaxcol|syntax|tabline|tabpagemax|tabstop|tagbsearch|tagcase|taglength|tagrelative|tags|tagstack|term|termbidi|terse|textwidth|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|ttimeout|ttimeoutlen|ttytype|undodir|undofile|undolevels|undoreload|updatecount|updatetime|verbose|verbosefile|viewdir|viewoptions|virtualedit|visualbell|warn|whichwrap|wildchar|wildcharm|wildignore|wildignorecase|wildmenu|wildmode|wildoptions|winaltkeys|window|winheight|winfixheight|winfixwidth|winminheight|winminwidth|winwidth|wrap|wrapmargin|wrapscan|write|writeany|writebackup|writedelay)\\b" + }, + { + "name": "support.type.option.shortname.viml", + "match": "&?\\b(al|ari|akm|ambw|acd|arab|arshape|ai|ar|aw|awa|bg|bs|bk|bkc|bdir|bex|bsk|bdlay|beval|bexpr|bo|bin|bomb|brk|bri|briopt|bsdir|bh|bl|bt|cmp|cd|cedit|ccv|cin|cink|cino|cinw|cb|ch|cwh|cc|co|com|cms|cpt|cfu|cot|cocu|cole|cf|ci|cpo|cspc|csprg|csqf|csre|cst|csto|cpo|crb|cuc|cul|debug|def|deco|dict|diff|dex|dip|dg|dir|dy|ead|enc|eol|ea|ep|eb|ef|efm|ei|et|ex|fenc|fencs|ff|ffs|fic|ft|fcs|fixeol|fk|fcl|fdc|fen|fde|fdi|fdl|fdls|fmr|fdm|fml|fdn|fdo|fdt|fex|flp|fo|fp|fs|gd|gfm|gp|gcr|gfn|gfs|gfw|go|gtl|gtt|hf|hh|hlg|hid|hls|hi|hk|hkp|icon|iconstring|ic|imc|imd|imi|ims|inc|inex|is|inde|indk|inf|im|isf|isi|isk|isp|js|kmp|km|kp|lmap|lm|lrm|ls|lz|lbr|lines|lsp|lisp|lw|list|lcs|lpl|magic|mef|mp|mps|mat|mco|mfd|mmd|mm|mmp|mmt|mis|msm|ml|mls|ma|mod|more|mouse|mousef|mh|mousem|mouses|mouset|nf|nu|nuw|ofu|odev|opfunc|pp|para|paste|pt|pex|pm|pa|perldll|pi|pvh|pvw|pdev|penc|pexpr|pfn|pheader|pmbcs|pmbfn|popt|prompt|ph|pythondll|pythonthreedlll|qe|ro|rdt|re|rnu|remap|report|ri|rl|rlc|rubydll|ru|ruf|rtp|scr|scb|sj|so|sbo|sect|secure|sel|slm|ssop|sd|sh|shcf|sp|shq|srr|ssl|stmp|sxe|sxq|sr|sw|shm|sbr|sc|sft|sm|smd|stal|ss|siso|scl|scs|si|sta|sts|spell|spc|spf|spl|sps|sb|spr|sol|stl|su|sua|swf|swb|smc|syn|tal|tpm|ts|tbs|tc|tl|tr|tag|tgst|term|tbidi|terse|tw|tsr|top|to|tm|title|titlelen|titleold|titlestring|ttimeout|ttm|tty|udir|udf|ul|ur|uc|ut|vbs|vfile|vdir|vop|ve|vb|warn|ww|wc|wcm|wig|wic|wmnu|wim|wop|wak|wi|wh|wfh|wfw|wmh|wmw|wiw|wrap|wm|ws|write|wa|wb|wd)\\b" + }, + { + "name": "support.type.option.off.viml", + "match": "\\b(noanti|noantialias|noarab|noarabic|noarshape|noarabicshape|noari|noallowrevins|noakm|noaltkeymap|noacd|noautochdir|noai|noautoindent|noar|noautoread|noaw|noautowrite|noawa|noautowriteall|nobk|nobackup|nobeval|noballooneval|nobevalterm|noballoonevalterm|nobin|nobinary|nobomb|nobri|nobreakindent|nobl|nobuflisted|nocin|nocindent|nocp|nocompatible|nocf|noconfirm|noci|nocopyindent|nocsre|nocscoperelative|nocst|nocscopetag|nocsverb|nocscopeverbose|nocrb|nocursorbind|nocuc|nocursorcolumn|nocul|nocursorline|nodeco|nodelcombine|nodiff|nodg|nodigraph|noed|noedcompatible|noemo|noemoji|noeol|noendofline|noea|noequalalways|noeb|noerrorbells|noek|noesckeys|noet|noexpandtab|noex|noexrc|nofic|nofileignorecase|nofixeol|nofixendofline|nofk|nofkmap|nofen|nofoldenable|nofs|nofsync|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkp|nohkmapp|nohls|nohlsearch|noicon|noic|noignorecase|noimc|noimcmdline|noimd|noimdisable|nois|noincsearch|noinf|noinfercase|noim|noinsertmode|nojs|nojoinspaces|nolnr|nolangnoremap|nolrm|nolangremap|nolz|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|nolpl|noloadplugins|nomacatsui|nomagic|noml|nomodeline|noma|nomodifiable|nomod|nomodified|nomore|nomousef|nomousefocus|nomh|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopvw|nopreviewwindow|noprompt|noro|noreadonly|nornu|norelativenumber|nors|norestorescreen|nori|norevins|norl|norightleft|noru|noruler|noscb|noscrollbind|nosecure|nossl|noshellslash|nostmp|noshelltemp|nosr|noshiftround|nosn|noshortname|nosc|noshowcmd|nosft|noshowfulltag|nosm|noshowmatch|nosmd|noshowmode|noscs|nosmartcase|nosi|nosmartindent|nosta|nosmarttab|nospell|nosb|nosplitbelow|nospr|nosplitright|nosol|nostartofline|noswf|noswapfile|notbs|notagbsearch|notr|notagrelative|notgst|notagstack|notbidi|notermbidi|notgc|notermguicolors|noterse|nota|notextauto|notx|notextmode|notop|notildeop|noto|notimeout|notitle|nottimeout|notbi|nottybuiltin|notf|nottyfast|noudf|noundofile|novb|novisualbell|nowarn|nowiv|noweirdinvert|nowic|nowildignorecase|nowmnu|nowildmenu|nowfh|nowinfixheight|nowfw|nowinfixwidth|nowrapscan|nowrap|nows|nowrite|nowa|nowriteany|nowb|nowritebackup)\\b" + } + ] + }, + "punctuation": { + "patterns": [ + { + "name": "punctuation.parens.viml", + "match": "([()])" + }, + { + "name": "punctuation.comma.viml", + "match": "([,])" + } + ] + }, + "strings": { + "patterns": [ + { + "name": "string.quoted.double.viml", + "begin": "\"", + "end": "(\"|$)", + "patterns": [] + }, + { + "name": "string.quoted.single.viml", + "begin": "'", + "end": "('|$)", + "patterns": [] + }, + { + "match": "/(\\\\\\\\|\\\\/|[^\\n/])*/", + "name": "string.regexp.viml" + } + ] + }, + "support": { + "patterns": [ + { + "name": "support.function.viml", + "match": "(add|call|delete|empty|extend|get|has|isdirectory|join|printf)(?=\\()" + }, + { + "name": "support.function.viml", + "match": "\\b(echo(m|hl)?|exe(cute)?|redir|redraw|sleep|so(urce)?|wincmd|setf)\\b" + }, + { + "name": "support.type.builtin.vim-variable.viml", + "match": "(v\\:(beval_col|beval_bufnr|beval_lnum|beval_text|beval_winnr|char|charconvert_from|charconvert_to|cmdarg|cmdbang|count|count1|ctype|dying|errmsg|exception|fcs_reason|fcs_choice|fname_in|fname_out|fname_new|fname_diff|folddashes|foldlevel|foldend|foldstart|insertmode|key|lang|lc_time|lnum|mouse_win|mouse_lnum|mouse_col|oldfiles|operator|prevcount|profiling|progname|register|scrollstart|servername|searchforward|shell_error|statusmsg|swapname|swapchoice|swapcommand|termresponse|this_session|throwpoint|val|version|warningmsg|windowid))" + }, + { + "name": "support.type.builtin.viml", + "match": "(&(cpo|isk|omnifunc|paste|previewwindow|rtp|tags|term|wrap))" + }, + { + "name": "support.type.builtin.viml", + "match": "(&(shell(cmdflag|redir)?))" + }, + { + "name": "support.variable.args.viml", + "match": "\\<args\\>" + }, + { + "name": "support.type.syntax.viml", + "match": "\\b(None|ErrorMsg|WarningMsg)\\b" + }, + { + "name": "support.type.event.viml", + "match": "\\b(BufNewFile|BufReadPre|BufRead|BufReadPost|BufReadCmd|FileReadPre|FileReadPost|FileReadCmd|FilterReadPre|FilterReadPost|StdinReadPre|StdinReadPost|BufWrite|BufWritePre|BufWritePost|BufWriteCmd|FileWritePre|FileWritePost|FileWriteCmd|FileAppendPre|FileAppendPost|FileAppendCmd|FilterWritePre|FilterWritePost|BufAdd|BufCreate|BufDelete|BufWipeout|BufFilePre|BufFilePost|BufEnter|BufLeave|BufWinEnter|BufWinLeave|BufUnload|BufHidden|BufNew|SwapExists|TermOpen|TermClose|FileType|Syntax|OptionSet|VimEnter|GUIEnter|GUIFailed|TermResponse|QuitPre|VimLeavePre|VimLeave|DirChanged|FileChangedShell|FileChangedShellPost|FileChangedRO|ShellCmdPost|ShellFilterPost|CmdUndefined|FuncUndefined|SpellFileMissing|SourcePre|SourceCmd|VimResized|FocusGained|FocusLost|CursorHold|CursorHoldI|CursorMoved|CursorMovedI|WinNew|WinEnter|WinLeave|TabEnter|TabLeave|TabNew|TabNewEntered|TabClosed|CmdlineEnter|CmdlineLeave|CmdwinEnter|CmdwinLeave|InsertEnter|InsertChange|InsertLeave|InsertCharPre|TextYankPost|TextChanged|TextChangedI|ColorScheme|RemoteReply|QuickFixCmdPre|QuickFixCmdPost|SessionLoadPost|MenuPopup|CompleteDone|User)\\b" + }, + { + "name": "support.type.syntax-group.viml", + "match": "\\b(Comment|Constant|String|Character|Number|Boolean|Float|Identifier|Function|Statement|Conditional|Repeat|Label|Operator|Keyword|Exception|PreProc|Include|Define|Macro|PreCondit|Type|StorageClass|Structure|Typedef|Special|SpecialChar|Tag|Delimiter|SpecialComment|Debug|Underlined|Ignore|Error|Todo)\\b" + } + ] + }, + "syntax": { + "patterns": [ + { + "name": "keyword.control.syntax.viml", + "match": "syn(tax)? case (ignore|match)" + }, + { + "name": "keyword.control.syntax.viml", + "match": "syn(tax)? (clear|enable|include|off|on|manual|sync)" + }, + { + "name": "keyword.other.syntax.viml", + "match": "\\b(contained|display|excludenl|fold|keepend|oneline|skipnl|skipwhite|transparent)\\b" + }, + { + "name": "keyword.other.syntax.viml", + "match": "\\b(add|containedin|contains|matchgroup|nextgroup)\\=" + }, + { + "captures": { + "1": { + "name": "keyword.other.syntax-range.viml" + }, + "3": { + "name": "string.regexp.viml" + } + }, + "match": "((start|skip|end)\\=)(\\+\\S+\\+\\s)?" + }, + { + "captures": { + "0": { + "name": "support.type.syntax.viml" + }, + "1": { + "name": "storage.syntax.viml" + }, + "3": { + "name": "variable.other.syntax-scope.viml" + }, + "4": { + "name": "storage.modifier.syntax.viml" + } + }, + "match": "(syn|syntax)\\s+(cluster|keyword|match|region)(\\s+\\w+\\s+)(contained)?", + "patterns": [] + }, + { + "captures": { + "1": { + "name": "storage.highlight.viml" + }, + "2": { + "name": "storage.modifier.syntax.viml" + }, + "3": { + "name": "support.function.highlight.viml" + }, + "4": { + "name": "variable.other.viml" + }, + "5": { + "name": "variable.other.viml" + } + }, + "match": "(hi|highlight)(?:\\s+)(def|default)(?:\\s+)(link)(?:\\s+)(\\w+)(?:\\s+)(\\w+)", + "patterns": [] + } + ] + }, + "keyword": { + "patterns": [ + { + "name": "keyword.control.viml", + "match": "\\b(if|while|for|return|au(g|group)|else(if|)?|do|in)\\b" + }, + { + "name": "keyword.control.viml", + "match": "\\b(end|endif|endfor|endwhile)\\s|$" + }, + { + "name": "keyword.control.viml", + "match": "\\b(break|continue|try|catch|endtry|finally|finish|throw|range)\\b" + }, + { + "name": "keyword.function.viml", + "match": "\\b(fun|func|function|endfunction|endfunc)\\b" + }, + { + "name": "keyword.other.viml", + "match": "\\b(normal|silent)\\b" + }, + { + "include": "#operators" + } + ] + }, + "storage": { + "patterns": [ + { + "match": "\\b(call|let|unlet)\\b", + "name": "storage.viml" + }, + { + "match": "\\b(abort|autocmd)\\b", + "name": "storage.viml" + }, + { + "match": "\\b(set(l|local)?)\\b", + "name": "storage.viml" + }, + { + "match": "\\b(com(mand)?)\\b", + "name": "storage.viml" + }, + { + "match": "\\b(color(scheme)?)\\b", + "name": "storage.viml" + }, + { + "match": "\\b(Plug|Plugin)\\b", + "name": "storage.plugin.viml" + } + ] + }, + "variable": { + "patterns": [ + { + "name": "variable.other.link.viml", + "match": "https?://\\S+" + }, + { + "name": "variable.parameter.viml", + "match": "(?<=\\()([a-zA-Z]+)(?=\\))" + }, + { + "name": "variable.other.viml", + "match": "\\b([absgl]:[a-zA-Z0-9_.#]+)\\b(?!\\()" + } + ] + }, + "constant": { + "patterns": [ + { + "name": "constant.language.boolean.viml", + "match": "\\b(true|false)\\b" + }, + { + "name": "constant.numeric.viml", + "match": "\\b([0-9]+)\\b" + } + ] + } + }, + "$schema": "https://raw.githubusercontent.com/dunstontc/textmate/master/schema/tmLanguage.schema.json", + "name": "viml", + "scopeName": "source.viml", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#constant" + }, + { + "include": "#entity" + }, + { + "include": "#keyword" + }, + { + "include": "#punctuation" + }, + { + "include": "#storage" + }, + { + "include": "#strings" + }, + { + "include": "#support" + }, + { + "include": "#variable" + }, + { + "include": "#syntax" + }, + { + "include": "#commands" + }, + { + "include": "#option" + }, + { + "include": "#map" + } + ] +} diff --git a/src/lib/shiki/languages/vue-html.tmLanguage.json b/src/lib/shiki/languages/vue-html.tmLanguage.json new file mode 100644 index 0000000..c1d8e11 --- /dev/null +++ b/src/lib/shiki/languages/vue-html.tmLanguage.json @@ -0,0 +1,558 @@ +{ + "name": "vue-html", + "scopeName": "text.html.vue-html", + "fileTypes": [], + "uuid": "ca2e4260-5d62-45bf-8cf1-d8b5cc19c8f8", + "patterns": [ + { + "include": "source.vue#vue-interpolations" + }, + { + "name": "meta.tag.any.html", + "begin": "(<)([A-Z][a-zA-Z0-9:-]*)(?=[^>]*></\\2>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "support.class.component.html" + } + }, + "end": "(>)(<)(/)(\\2)(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html" + }, + "2": { + "name": "punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html" + }, + "3": { + "name": "punctuation.definition.tag.begin.html" + }, + "4": { + "name": "support.class.component.html" + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + } + ] + }, + { + "name": "meta.tag.any.html", + "begin": "(<)([a-z][a-zA-Z0-9:-]*)(?=[^>]*></\\2>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.html" + } + }, + "end": "(>)(<)(/)(\\2)(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html" + }, + "2": { + "name": "punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html" + }, + "3": { + "name": "punctuation.definition.tag.begin.html" + }, + "4": { + "name": "entity.name.tag.html" + }, + "5": { + "name": "punctuation.definition.tag.end.html" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + } + ] + }, + { + "name": "meta.tag.preprocessor.xml.html", + "begin": "(<\\?)(xml)", + "end": "(\\?>)", + "captures": { + "1": { + "name": "punctuation.definition.tag.html" + }, + "2": { + "name": "entity.name.tag.xml.html" + } + }, + "patterns": [ + { + "include": "#tag-generic-attribute" + }, + { + "include": "#string-double-quoted" + }, + { + "include": "#string-single-quoted" + } + ] + }, + { + "name": "comment.block.html", + "begin": "<!--", + "end": "-->", + "captures": { + "0": { + "name": "punctuation.definition.comment.html" + } + } + }, + { + "name": "meta.tag.sgml.html", + "begin": "<!", + "end": ">", + "captures": { + "0": { + "name": "punctuation.definition.tag.html" + } + }, + "patterns": [ + { + "name": "meta.tag.sgml.doctype.html", + "begin": "(?i:DOCTYPE)", + "end": "(?=>)", + "captures": { + "1": { + "name": "entity.name.tag.doctype.html" + } + }, + "patterns": [ + { + "name": "string.quoted.double.doctype.identifiers-and-DTDs.html", + "match": "\"[^\">]*\"" + } + ] + }, + { + "name": "constant.other.inline-data.html", + "begin": "\\[CDATA\\[", + "end": "]](?=>)" + }, + { + "name": "invalid.illegal.bad-comments-or-CDATA.html", + "match": "(\\s*)(?!--|>)\\S(\\s*)" + } + ] + }, + { + "name": "meta.tag.block.any.html", + "begin": "(</?)([A-Z][a-zA-Z0-9:-]*\\b)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "support.class.component.html" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + } + ] + }, + { + "name": "meta.tag.block.any.html", + "begin": "(</?)([a-z][a-zA-Z0-9:-]*\\b)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.block.any.html" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + } + ] + }, + { + "name": "meta.tag.structure.any.html", + "begin": "(</?)((?i:body|head|html)\\b)", + "end": "(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html" + } + }, + "captures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.structure.any.html" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + } + ] + }, + { + "name": "meta.tag.block.any.html", + "begin": "(</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)(?!-)\\b)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.block.any.html" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + } + ] + }, + { + "name": "meta.tag.inline.any.html", + "begin": "(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)(?!-)\\b)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.inline.any.html" + } + }, + "end": "(/?>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + } + ] + }, + { + "name": "meta.tag.other.html", + "begin": "(</?)([a-zA-Z0-9:-]+)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "entity.name.tag.other.html" + } + }, + "end": "(/?>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + } + ] + }, + { + "include": "#entities" + }, + { + "name": "invalid.illegal.incomplete.html", + "match": "<>" + }, + { + "name": "invalid.illegal.bad-angle-bracket.html", + "match": "<" + } + ], + "repository": { + "entities": { + "patterns": [ + { + "name": "constant.character.entity.html", + "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", + "captures": { + "1": { + "name": "punctuation.definition.entity.html" + }, + "3": { + "name": "punctuation.definition.entity.html" + } + } + }, + { + "name": "invalid.illegal.bad-ampersand.html", + "match": "&" + } + ] + }, + "string-double-quoted": { + "name": "string.quoted.double.html", + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.html" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.html" + } + }, + "patterns": [ + { + "include": "source.vue#vue-interpolations" + }, + { + "include": "#entities" + } + ] + }, + "string-single-quoted": { + "name": "string.quoted.single.html", + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.html" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.html" + } + }, + "patterns": [ + { + "include": "source.vue#vue-interpolations" + }, + { + "include": "#entities" + } + ] + }, + "tag-generic-attribute": { + "name": "entity.other.attribute-name.html", + "match": "(?<=[^=])\\b([a-zA-Z0-9:\\-_]+)" + }, + "tag-id-attribute": { + "name": "meta.attribute-with-value.id.html", + "begin": "\\b(id)\\b\\s*(=)", + "end": "(?!\\G)(?<='|\"|[^\\s<>/])", + "captures": { + "1": { + "name": "entity.other.attribute-name.id.html" + }, + "2": { + "name": "punctuation.separator.key-value.html" + } + }, + "patterns": [ + { + "name": "string.quoted.double.html", + "contentName": "meta.toc-list.id.html", + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.html" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.html" + } + }, + "patterns": [ + { + "include": "source.vue#vue-interpolations" + }, + { + "include": "#entities" + } + ] + }, + { + "name": "string.quoted.single.html", + "contentName": "meta.toc-list.id.html", + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.html" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.html" + } + }, + "patterns": [ + { + "include": "source.vue#vue-interpolations" + }, + { + "include": "#entities" + } + ] + }, + { + "name": "string.unquoted.html", + "match": "(?<==)(?:[^\\s<>/'\"]|/(?!>))+", + "captures": { + "0": { + "name": "meta.toc-list.id.html" + } + } + } + ] + }, + "tag-stuff": { + "patterns": [ + { + "include": "#vue-directives" + }, + { + "include": "#tag-id-attribute" + }, + { + "include": "#tag-generic-attribute" + }, + { + "include": "#string-double-quoted" + }, + { + "include": "#string-single-quoted" + }, + { + "include": "#unquoted-attribute" + } + ] + }, + "unquoted-attribute": { + "name": "string.unquoted.html", + "match": "(?<==)(?:[^\\s<>/'\"]|/(?!>))+" + }, + "vue-directives": { + "name": "meta.directive.vue", + "begin": "(?:\\b(v-)|(:|@|#))([a-zA-Z0-9\\-_]+)(?:\\:([a-zA-Z\\-_]+))?(?:\\.([a-zA-Z\\-_]+))*\\s*(=)", + "end": "(?<='|\")|(?=[\\s<>`])", + "captures": { + "1": { + "name": "entity.other.attribute-name.html" + }, + "2": { + "name": "punctuation.separator.key-value.html" + }, + "3": { + "name": "entity.other.attribute-name.html" + }, + "4": { + "name": "entity.other.attribute-name.html" + }, + "5": { + "name": "entity.other.attribute-name.html" + }, + "6": { + "name": "punctuation.separator.key-value.html" + } + }, + "patterns": [ + { + "name": "source.directive.vue", + "begin": "`", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.html" + } + }, + "end": "`", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.html" + } + }, + "patterns": [ + { + "include": "source.js#expression" + } + ] + }, + { + "name": "source.directive.vue", + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.html" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.html" + } + }, + "patterns": [ + { + "include": "source.js#expression" + } + ] + }, + { + "name": "source.directive.vue", + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.html" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.html" + } + }, + "patterns": [ + { + "include": "source.js#expression" + } + ] + } + ] + } + } +} diff --git a/src/lib/shiki/languages/vue.tmLanguage.json b/src/lib/shiki/languages/vue.tmLanguage.json new file mode 100644 index 0000000..16d976f --- /dev/null +++ b/src/lib/shiki/languages/vue.tmLanguage.json @@ -0,0 +1,1237 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "vue", + "scopeName": "source.vue", + "patterns": [ + { + "include": "text.html.basic#comment" + }, + { + "include": "#self-closing-tag" + }, + { + "begin": "(<)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + } + }, + "end": "(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html.vue" + } + }, + "patterns": [ + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)md\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "text.html.markdown", + "patterns": [ + { + "include": "text.html.markdown" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)html\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "text.html.derivative", + "patterns": [ + { + "include": "#html-stuff" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)pug\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "text.pug", + "patterns": [ + { + "include": "text.pug" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)stylus\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.stylus", + "patterns": [ + { + "include": "source.stylus" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)postcss\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.postcss", + "patterns": [ + { + "include": "source.postcss" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)sass\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.sass", + "patterns": [ + { + "include": "source.sass" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)css\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.css", + "patterns": [ + { + "include": "source.css" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)scss\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.css.scss", + "patterns": [ + { + "include": "source.css.scss" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)less\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.css.less", + "patterns": [ + { + "include": "source.css.less" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)js\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.js", + "patterns": [ + { + "include": "source.js" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)ts\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.ts", + "patterns": [ + { + "include": "source.ts" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)jsx\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.js.jsx", + "patterns": [ + { + "include": "source.js.jsx" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)tsx\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.tsx", + "patterns": [ + { + "include": "source.tsx" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)json\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.json", + "patterns": [ + { + "include": "source.json" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)jsonc\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.json.comments", + "patterns": [ + { + "include": "source.json.comments" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)json5\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.json5", + "patterns": [ + { + "include": "source.json5" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)yaml\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.yaml", + "patterns": [ + { + "include": "source.yaml" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)toml\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.toml", + "patterns": [ + { + "include": "source.toml" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)(gql|graphql)\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.graphql", + "patterns": [ + { + "include": "source.graphql" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)vue\\b\\2)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "source.vue", + "patterns": [ + { + "include": "source.vue" + } + ] + } + ] + }, + { + "begin": "(template)\\b", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/template\\b)", + "name": "text.html.derivative", + "patterns": [ + { + "include": "#html-stuff" + } + ] + } + ] + }, + { + "begin": "(script)\\b", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/script\\b)", + "name": "source.js", + "patterns": [ + { + "include": "source.js" + } + ] + } + ] + }, + { + "begin": "(style)\\b", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/style\\b)", + "name": "source.css", + "patterns": [ + { + "include": "source.css" + } + ] + } + ] + }, + { + "begin": "([a-zA-Z0-9:-]+)", + "beginCaptures": { + "1": { + "name": "entity.name.tag.$1.html.vue" + } + }, + "end": "(</)(\\1)\\s*(?=>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "begin": "(?<=>)", + "end": "(?=<\\/)", + "name": "text" + } + ] + } + ] + } + ], + "repository": { + "self-closing-tag": { + "begin": "(<)([a-zA-Z0-9:-]+)(?=([^>]+/>))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "end": "(/>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html.vue" + } + }, + "name": "self-closing-tag", + "patterns": [ + { + "include": "#tag-stuff" + } + ] + }, + "template-tag": { + "patterns": [ + { + "include": "#template-tag-1" + }, + { + "include": "#template-tag-2" + } + ] + }, + "template-tag-1": { + "begin": "(<)(template)\\b(>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + }, + "3": { + "name": "punctuation.definition.tag.end.html.vue" + } + }, + "end": "(/?>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html.vue" + } + }, + "name": "meta.template-tag.start", + "patterns": [ + { + "begin": "\\G", + "end": "(?=/>)|((</)(template)\\b)", + "endCaptures": { + "2": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "3": { + "name": "entity.name.tag.$3.html.vue" + } + }, + "name": "meta.template-tag.end", + "patterns": [ + { + "include": "#html-stuff" + } + ] + } + ] + }, + "template-tag-2": { + "begin": "(<)(template)\\b", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "2": { + "name": "entity.name.tag.$2.html.vue" + } + }, + "end": "(/?>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html.vue" + } + }, + "name": "meta.template-tag.start", + "patterns": [ + { + "begin": "\\G", + "end": "(?=/>)|((</)(template)\\b)", + "endCaptures": { + "2": { + "name": "punctuation.definition.tag.begin.html.vue" + }, + "3": { + "name": "entity.name.tag.$3.html.vue" + } + }, + "name": "meta.template-tag.end", + "patterns": [ + { + "include": "#tag-stuff" + }, + { + "include": "#html-stuff" + } + ] + } + ] + }, + "html-stuff": { + "patterns": [ + { + "include": "#template-tag" + }, + { + "include": "text.html.derivative" + }, + { + "include": "text.html.basic" + } + ] + }, + "tag-stuff": { + "begin": "\\G", + "end": "(?=/>)|(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html.vue" + } + }, + "name": "meta.tag-stuff", + "patterns": [ + { + "include": "#vue-directives" + }, + { + "include": "text.html.basic#attribute" + } + ] + }, + "vue-directives": { + "patterns": [ + { + "include": "#vue-directives-control" + }, + { + "include": "#vue-directives-style-attr" + }, + { + "include": "#vue-directives-original" + }, + { + "include": "#vue-directives-generic-attr" + } + ] + }, + "vue-directives-original": { + "begin": "(?:\\b(v-)|(:)|(@)|(#))(\\[?)([\\w\\-]*)(\\]?)(?:\\.([\\w\\-]*))*", + "beginCaptures": { + "1": { + "name": "entity.other.attribute-name.html.vue" + }, + "2": { + "name": "punctuation.attribute-shorthand.bind.html.vue" + }, + "3": { + "name": "punctuation.attribute-shorthand.event.html.vue" + }, + "4": { + "name": "punctuation.attribute-shorthand.slot.html.vue" + }, + "5": { + "name": "punctuation.separator.key-value.html.vue" + }, + "6": { + "name": "entity.other.attribute-name.html.vue" + }, + "7": { + "name": "punctuation.separator.key-value.html.vue" + }, + "8": { + "name": "entity.other.attribute-name.html.vue" + }, + "9": { + "name": "punctuation.separator.key-value.html.vue" + } + }, + "end": "(?=\\s*+[^=\\s])", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.html.vue" + } + }, + "name": "meta.attribute.directive.vue", + "patterns": [ + { + "include": "#vue-directives-expression" + } + ] + }, + "vue-directives-control": { + "begin": "(v-for)|(v-if|v-else-if|v-else)", + "captures": { + "1": { + "name": "keyword.control.loop.vue" + }, + "2": { + "name": "keyword.control.conditional.vue" + } + }, + "end": "(?=\\s*+[^=\\s])", + "name": "meta.attribute.directive.control.vue", + "patterns": [ + { + "include": "#vue-directives-expression" + } + ] + }, + "vue-directives-expression": { + "patterns": [ + { + "begin": "(=)\\s*('|\"|`)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.key-value.html.vue" + }, + "2": { + "name": "punctuation.definition.string.begin.html.vue" + } + }, + "end": "(\\2)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.html.vue" + } + }, + "patterns": [ + { + "begin": "(?<=('|\"|`))", + "end": "(?=\\1)", + "name": "source.ts.embedded.html.vue", + "patterns": [ + { + "include": "source.ts" + } + ] + } + ] + }, + { + "begin": "(=)\\s*(?=[^'\"`])", + "beginCaptures": { + "1": { + "name": "punctuation.separator.key-value.html.vue" + } + }, + "end": "(?=(\\s|>|\\/>))", + "patterns": [ + { + "begin": "(?=[^'\"`])", + "end": "(?=(\\s|>|\\/>))", + "name": "source.ts.embedded.html.vue", + "patterns": [ + { + "include": "source.ts" + } + ] + } + ] + } + ] + }, + "vue-directives-style-attr": { + "begin": "\\b(style)\\s*(=)", + "captures": { + "1": { + "name": "entity.other.attribute-name.html.vue" + }, + "2": { + "name": "punctuation.separator.key-value.html.vue" + } + }, + "end": "(?<='|\")", + "name": "meta.attribute.style.vue", + "patterns": [ + { + "comment": "Copy from source.css#rule-list-innards", + "begin": "('|\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.html.vue" + } + }, + "end": "(\\1)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.html.vue" + } + }, + "name": "source.css.embedded.html.vue", + "patterns": [ + { + "include": "source.css#comment-block" + }, + { + "include": "source.css#escapes" + }, + { + "include": "source.css#font-features" + }, + { + "match": "(?x) (?<![\\w-])\n--\n(?:[-a-zA-Z_] | [^\\x00-\\x7F]) # First letter\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F] # Remainder of identifier\n |\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*", + "name": "variable.css" + }, + { + "begin": "(?<![-a-zA-Z])(?=[-a-zA-Z])", + "end": "$|(?![-a-zA-Z])", + "name": "meta.property-name.css", + "patterns": [ + { + "include": "source.css#property-names" + } + ] + }, + { + "comment": "Modify end to fix #199. TODO: handle ' character.", + "begin": "(:)\\s*", + "beginCaptures": { + "1": { + "name": "punctuation.separator.key-value.css" + } + }, + "end": "\\s*(;)|\\s*(?='|\")", + "endCaptures": { + "1": { + "name": "punctuation.terminator.rule.css" + } + }, + "contentName": "meta.property-value.css", + "patterns": [ + { + "include": "source.css#comment-block" + }, + { + "include": "source.css#property-values" + } + ] + }, + { + "match": ";", + "name": "punctuation.terminator.rule.css" + } + ] + } + ] + }, + "vue-directives-generic-attr": { + "begin": "\\b(generic)\\s*(=)", + "captures": { + "1": { + "name": "entity.other.attribute-name.html.vue" + }, + "2": { + "name": "punctuation.separator.key-value.html.vue" + } + }, + "end": "(?<='|\")", + "name": "meta.attribute.generic.vue", + "patterns": [ + { + "begin": "('|\")", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.html.vue" + } + }, + "end": "(\\1)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.html.vue" + } + }, + "name": "meta.type.parameters.vue", + "comment": "https://github.com/microsoft/vscode/blob/fd4346210f59135fad81a8b8c4cea7bf5a9ca6b4/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json#L4002-L4020", + "patterns": [ + { + "include": "source.ts#comment" + }, + { + "name": "storage.modifier.ts", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "include": "source.ts#type" + }, + { + "include": "source.ts#punctuation-comma" + }, + { + "name": "keyword.operator.assignment.ts", + "match": "(=)(?!>)" + } + ] + } + ] + }, + "vue-interpolations": { + "patterns": [ + { + "begin": "(\\{\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.interpolation.begin.html.vue" + } + }, + "end": "(\\}\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.interpolation.end.html.vue" + } + }, + "name": "expression.embedded.vue", + "patterns": [ + { + "begin": "\\G", + "end": "(?=\\}\\})", + "name": "source.ts.embedded.html.vue", + "patterns": [ + { + "include": "source.ts" + } + ] + } + ] + } + ] + } + } +} diff --git a/src/lib/shiki/languages/vyper.tmLanguage.json b/src/lib/shiki/languages/vyper.tmLanguage.json new file mode 100644 index 0000000..995927a --- /dev/null +++ b/src/lib/shiki/languages/vyper.tmLanguage.json @@ -0,0 +1,5420 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/MagicStack/MagicPython/blob/master/grammars/MagicPython.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/MagicStack/MagicPython/commit/b2b4f4ae7b4e6284e80bda8080106b93bd588f9e", + "name": "vyper", + "scopeName": "source.vyper", + "patterns": [ + { + "include": "#statement" + }, + { + "include": "#expression" + }, + { + "include": "#reserved-names-vyper" + } + ], + "repository": { + "impossible": { + "comment": "This is a special rule that should be used where no match is desired. It is not a good idea to match something like '1{0}' because in some cases that can result in infinite loops in token generation. So the rule instead matches and impossible expression to allow a match to fail and move to the next token.", + "match": "$.^" + }, + "statement": { + "patterns": [ + { + "include": "#import" + }, + { + "include": "#class-declaration" + }, + { + "include": "#function-declaration" + }, + { + "include": "#generator" + }, + { + "include": "#statement-keyword" + }, + { + "include": "#assignment-operator" + }, + { + "include": "#decorator" + }, + { + "include": "#docstring-statement" + }, + { + "include": "#semicolon" + } + ] + }, + "semicolon": { + "patterns": [ + { + "name": "invalid.deprecated.semicolon.python", + "match": "\\;$" + } + ] + }, + "comments": { + "patterns": [ + { + "name": "comment.line.number-sign.python", + "contentName": "meta.typehint.comment.python", + "begin": "(?x)\n (?:\n \\# \\s* (type:)\n \\s*+ (?# we want `\\s*+` which is possessive quantifier since\n we do not actually want to backtrack when matching\n whitespace here)\n (?! $ | \\#)\n )\n", + "end": "(?:$|(?=\\#))", + "beginCaptures": { + "0": { + "name": "meta.typehint.comment.python" + }, + "1": { + "name": "comment.typehint.directive.notation.python" + } + }, + "patterns": [ + { + "name": "comment.typehint.ignore.notation.python", + "match": "(?x)\n \\G ignore\n (?= \\s* (?: $ | \\#))\n" + }, + { + "name": "comment.typehint.type.notation.python", + "match": "(?x)\n (?<!\\.)\\b(\n bool | bytes | float | int | object | str\n | List | Dict | Iterable | Sequence | Set\n | FrozenSet | Callable | Union | Tuple\n | Any | None\n )\\b\n" + }, + { + "name": "comment.typehint.punctuation.notation.python", + "match": "([\\[\\]\\(\\),\\.\\=\\*]|(->))" + }, + { + "name": "comment.typehint.variable.notation.python", + "match": "([[:alpha:]_]\\w*)" + } + ] + }, + { + "include": "#comments-base" + } + ] + }, + "docstring-statement": { + "begin": "^(?=\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))", + "comment": "the string either terminates correctly or by the beginning of a new line (this is for single line docstrings that aren't terminated) AND it's not followed by another docstring", + "end": "((?<=\\1)|^)(?!\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))", + "patterns": [ + { + "include": "#docstring" + } + ] + }, + "docstring": { + "patterns": [ + { + "name": "string.quoted.docstring.multi.python", + "begin": "(\\'\\'\\'|\\\"\\\"\\\")", + "end": "(\\1)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + } + }, + "patterns": [ + { + "include": "#docstring-prompt" + }, + { + "include": "#codetags" + }, + { + "include": "#docstring-guts-unicode" + } + ] + }, + { + "name": "string.quoted.docstring.raw.multi.python", + "begin": "([rR])(\\'\\'\\'|\\\"\\\"\\\")", + "end": "(\\2)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + } + }, + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#docstring-prompt" + }, + { + "include": "#codetags" + } + ] + }, + { + "name": "string.quoted.docstring.single.python", + "begin": "(\\'|\\\")", + "end": "(\\1)|(\\n)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#codetags" + }, + { + "include": "#docstring-guts-unicode" + } + ] + }, + { + "name": "string.quoted.docstring.raw.single.python", + "begin": "([rR])(\\'|\\\")", + "end": "(\\2)|(\\n)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#codetags" + } + ] + } + ] + }, + "docstring-guts-unicode": { + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#escape-sequence" + }, + { + "include": "#string-line-continuation" + } + ] + }, + "docstring-prompt": { + "match": "(?x)\n (?:\n (?:^|\\G) \\s* (?# '\\G' is necessary for ST)\n ((?:>>>|\\.\\.\\.) \\s) (?=\\s*\\S)\n )\n", + "captures": { + "1": { + "name": "keyword.control.flow.python" + } + } + }, + "statement-keyword": { + "patterns": [ + { + "name": "storage.type.function.python", + "match": "\\b((async\\s+)?\\s*def)\\b" + }, + { + "name": "keyword.control.flow.python", + "comment": "if `as` is eventually followed by `:` or line continuation\nit's probably control flow like:\n with foo as bar, \\\n Foo as Bar:\n try:\n do_stuff()\n except Exception as e:\n pass\n", + "match": "\\b(?<!\\.)as\\b(?=.*[:\\\\])" + }, + { + "name": "keyword.control.import.python", + "comment": "other legal use of `as` is in an import", + "match": "\\b(?<!\\.)as\\b" + }, + { + "name": "keyword.control.flow.python", + "match": "(?x)\n \\b(?<!\\.)(\n async | continue | del | assert | break | finally | for\n | from | elif | else | if | except | pass | raise\n | return | try | while | with\n )\\b\n" + }, + { + "name": "storage.modifier.declaration.python", + "match": "(?x)\n \\b(?<!\\.)(\n global | nonlocal\n )\\b\n" + }, + { + "name": "storage.type.class.python", + "match": "\\b(?<!\\.)(class)\\b" + } + ] + }, + "expression-bare": { + "comment": "valid Python expressions w/o comments and line continuation", + "patterns": [ + { + "include": "#backticks" + }, + { + "include": "#illegal-anno" + }, + { + "include": "#literal" + }, + { + "include": "#regexp" + }, + { + "include": "#string" + }, + { + "include": "#lambda" + }, + { + "include": "#generator" + }, + { + "include": "#illegal-operator" + }, + { + "include": "#operator" + }, + { + "include": "#curly-braces" + }, + { + "include": "#item-access" + }, + { + "include": "#list" + }, + { + "include": "#odd-function-call" + }, + { + "include": "#round-braces" + }, + { + "include": "#function-call" + }, + { + "include": "#builtin-functions" + }, + { + "include": "#builtin-types" + }, + { + "include": "#builtin-exceptions" + }, + { + "include": "#magic-names" + }, + { + "include": "#special-names" + }, + { + "include": "#illegal-names" + }, + { + "include": "#special-variables" + }, + { + "include": "#ellipsis" + }, + { + "include": "#punctuation" + }, + { + "include": "#line-continuation" + }, + { + "include": "#special-variables-types" + } + ] + }, + "expression-base": { + "comment": "valid Python expressions with comments and line continuation", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#expression-bare" + }, + { + "include": "#line-continuation" + } + ] + }, + "expression": { + "comment": "All valid Python expressions", + "patterns": [ + { + "include": "#expression-base" + }, + { + "include": "#member-access" + }, + { + "comment": "Tokenize identifiers to help linters", + "match": "(?x) \\b ([[:alpha:]_]\\w*) \\b" + } + ] + }, + "member-access": { + "name": "meta.member.access.python", + "begin": "(\\.)\\s*(?!\\.)", + "end": "(?x)\n # stop when you've just read non-whitespace followed by non-word\n # i.e. when finished reading an identifier or function call\n (?<=\\S)(?=\\W) |\n # stop when seeing the start of something that's not a word,\n # i.e. when seeing a non-identifier\n (^|(?<=\\s))(?=[^\\\\\\w\\s]) |\n $\n", + "beginCaptures": { + "1": { + "name": "punctuation.separator.period.python" + } + }, + "patterns": [ + { + "include": "#function-call" + }, + { + "include": "#member-access-base" + }, + { + "include": "#member-access-attribute" + } + ] + }, + "member-access-base": { + "patterns": [ + { + "include": "#magic-names" + }, + { + "include": "#illegal-names" + }, + { + "include": "#illegal-object-name" + }, + { + "include": "#special-names" + }, + { + "include": "#line-continuation" + }, + { + "include": "#item-access" + }, + { + "include": "#special-variables-types" + } + ] + }, + "member-access-attribute": { + "comment": "Highlight attribute access in otherwise non-specialized cases.", + "name": "meta.attribute.python", + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" + }, + "special-names": { + "name": "constant.other.caps.python", + "match": "(?x)\n \\b\n # we want to see \"enough\", meaning 2 or more upper-case\n # letters in the beginning of the constant\n #\n # for more details refer to:\n # https://github.com/MagicStack/MagicPython/issues/42\n (\n _* [[:upper:]] [_\\d]* [[:upper:]]\n )\n [[:upper:]\\d]* (_\\w*)?\n \\b\n" + }, + "curly-braces": { + "begin": "\\{", + "end": "\\}", + "beginCaptures": { + "0": { + "name": "punctuation.definition.dict.begin.python" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.dict.end.python" + } + }, + "patterns": [ + { + "name": "punctuation.separator.dict.python", + "match": ":" + }, + { + "include": "#expression" + } + ] + }, + "list": { + "begin": "\\[", + "end": "\\]", + "beginCaptures": { + "0": { + "name": "punctuation.definition.list.begin.python" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.list.end.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "odd-function-call": { + "comment": "A bit obscured function call where there may have been an\narbitrary number of other operations to get the function.\nE.g. \"arr[idx](args)\"\n", + "begin": "(?x)\n (?<= \\] | \\) ) \\s*\n (?=\\()\n", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + } + }, + "patterns": [ + { + "include": "#function-arguments" + } + ] + }, + "round-braces": { + "begin": "\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.begin.python" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.end.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "line-continuation": { + "patterns": [ + { + "match": "(\\\\)\\s*(\\S.*$\\n?)", + "captures": { + "1": { + "name": "punctuation.separator.continuation.line.python" + }, + "2": { + "name": "invalid.illegal.line.continuation.python" + } + } + }, + { + "begin": "(\\\\)\\s*$\\n?", + "end": "(?x)\n (?=^\\s*$)\n |\n (?! (\\s* [rR]? (\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))\n |\n (\\G $) (?# '\\G' is necessary for ST)\n )\n", + "beginCaptures": { + "1": { + "name": "punctuation.separator.continuation.line.python" + } + }, + "patterns": [ + { + "include": "#regexp" + }, + { + "include": "#string" + } + ] + } + ] + }, + "assignment-operator": { + "name": "keyword.operator.assignment.python", + "match": "(?x)\n <<= | >>= | //= | \\*\\*=\n | \\+= | -= | /= | @=\n | \\*= | %= | ~= | \\^= | &= | \\|=\n | =(?!=)\n" + }, + "operator": { + "match": "(?x)\n \\b(?<!\\.)\n (?:\n (and | or | not | in | is) (?# 1)\n |\n (for | if | else | await | (?:yield(?:\\s+from)?)) (?# 2)\n )\n (?!\\s*:)\\b\n\n | (<< | >> | & | \\| | \\^ | ~) (?# 3)\n\n | (\\*\\* | \\* | \\+ | - | % | // | / | @) (?# 4)\n\n | (!= | == | >= | <= | < | >) (?# 5)\n", + "captures": { + "1": { + "name": "keyword.operator.logical.python" + }, + "2": { + "name": "keyword.control.flow.python" + }, + "3": { + "name": "keyword.operator.bitwise.python" + }, + "4": { + "name": "keyword.operator.arithmetic.python" + }, + "5": { + "name": "keyword.operator.comparison.python" + } + } + }, + "punctuation": { + "patterns": [ + { + "name": "punctuation.separator.colon.python", + "match": ":" + }, + { + "name": "punctuation.separator.element.python", + "match": "," + } + ] + }, + "literal": { + "patterns": [ + { + "name": "constant.language.python", + "match": "\\b(True|False|None|NotImplemented|Ellipsis)\\b" + }, + { + "include": "#number" + } + ] + }, + "number": { + "name": "constant.numeric.python", + "patterns": [ + { + "include": "#number-float" + }, + { + "include": "#number-dec" + }, + { + "include": "#number-hex" + }, + { + "include": "#number-oct" + }, + { + "include": "#number-bin" + }, + { + "include": "#number-long" + }, + { + "name": "invalid.illegal.name.python", + "match": "\\b[0-9]+\\w+" + } + ] + }, + "number-float": { + "name": "constant.numeric.float.python", + "match": "(?x)\n (?<! \\w)(?:\n (?:\n \\.[0-9](?: _?[0-9] )*\n |\n [0-9](?: _?[0-9] )* \\. [0-9](?: _?[0-9] )*\n |\n [0-9](?: _?[0-9] )* \\.\n ) (?: [eE][+-]?[0-9](?: _?[0-9] )* )?\n |\n [0-9](?: _?[0-9] )* (?: [eE][+-]?[0-9](?: _?[0-9] )* )\n )([jJ])?\\b\n", + "captures": { + "1": { + "name": "storage.type.imaginary.number.python" + } + } + }, + "number-dec": { + "name": "constant.numeric.dec.python", + "match": "(?x)\n (?<![\\w\\.])(?:\n [1-9](?: _?[0-9] )*\n |\n 0+\n |\n [0-9](?: _?[0-9] )* ([jJ])\n |\n 0 ([0-9]+)(?![eE\\.])\n )\\b\n", + "captures": { + "1": { + "name": "storage.type.imaginary.number.python" + }, + "2": { + "name": "invalid.illegal.dec.python" + } + } + }, + "number-hex": { + "name": "constant.numeric.hex.python", + "match": "(?x)\n (?<![\\w\\.])\n (0[xX]) (_?[0-9a-fA-F])+\n \\b\n", + "captures": { + "1": { + "name": "storage.type.number.python" + } + } + }, + "number-oct": { + "name": "constant.numeric.oct.python", + "match": "(?x)\n (?<![\\w\\.])\n (0[oO]) (_?[0-7])+\n \\b\n", + "captures": { + "1": { + "name": "storage.type.number.python" + } + } + }, + "number-bin": { + "name": "constant.numeric.bin.python", + "match": "(?x)\n (?<![\\w\\.])\n (0[bB]) (_?[01])+\n \\b\n", + "captures": { + "1": { + "name": "storage.type.number.python" + } + } + }, + "number-long": { + "name": "constant.numeric.bin.python", + "comment": "this is to support python2 syntax for long ints", + "match": "(?x)\n (?<![\\w\\.])\n ([1-9][0-9]* | 0) ([lL])\n \\b\n", + "captures": { + "2": { + "name": "storage.type.number.python" + } + } + }, + "regexp": { + "patterns": [ + { + "include": "#regexp-single-three-line" + }, + { + "include": "#regexp-double-three-line" + }, + { + "include": "#regexp-single-one-line" + }, + { + "include": "#regexp-double-one-line" + }, + { + "include": "#fregexp-single-three-line" + }, + { + "include": "#fregexp-double-three-line" + }, + { + "include": "#fregexp-single-one-line" + }, + { + "include": "#fregexp-double-one-line" + } + ] + }, + "string": { + "patterns": [ + { + "include": "#string-quoted-multi-line" + }, + { + "include": "#string-quoted-single-line" + }, + { + "include": "#string-bin-quoted-multi-line" + }, + { + "include": "#string-bin-quoted-single-line" + }, + { + "include": "#string-raw-quoted-multi-line" + }, + { + "include": "#string-raw-quoted-single-line" + }, + { + "include": "#string-raw-bin-quoted-multi-line" + }, + { + "include": "#string-raw-bin-quoted-single-line" + }, + { + "include": "#fstring-fnorm-quoted-multi-line" + }, + { + "include": "#fstring-fnorm-quoted-single-line" + }, + { + "include": "#fstring-normf-quoted-multi-line" + }, + { + "include": "#fstring-normf-quoted-single-line" + }, + { + "include": "#fstring-raw-quoted-multi-line" + }, + { + "include": "#fstring-raw-quoted-single-line" + } + ] + }, + "string-unicode-guts": { + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#string-entity" + }, + { + "include": "#string-brace-formatting" + } + ] + }, + "string-consume-escape": { + "match": "\\\\['\"\\n\\\\]" + }, + "string-raw-guts": { + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#string-formatting" + }, + { + "include": "#string-brace-formatting" + } + ] + }, + "string-raw-bin-guts": { + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#string-formatting" + } + ] + }, + "string-entity": { + "patterns": [ + { + "include": "#escape-sequence" + }, + { + "include": "#string-line-continuation" + }, + { + "include": "#string-formatting" + } + ] + }, + "fstring-guts": { + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#escape-sequence" + }, + { + "include": "#string-line-continuation" + }, + { + "include": "#fstring-formatting" + } + ] + }, + "fstring-raw-guts": { + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#fstring-formatting" + } + ] + }, + "fstring-illegal-single-brace": { + "comment": "it is illegal to have a multiline brace inside a single-line string", + "begin": "(\\{)(?=[^\\n}]*$\\n?)", + "end": "(\\})|(?=\\n)", + "beginCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "endCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "patterns": [ + { + "include": "#fstring-terminator-single" + }, + { + "include": "#f-expression" + } + ] + }, + "fstring-illegal-multi-brace": { + "patterns": [ + { + "include": "#impossible" + } + ] + }, + "f-expression": { + "comment": "All valid Python expressions, except comments and line continuation", + "patterns": [ + { + "include": "#expression-bare" + }, + { + "include": "#member-access" + }, + { + "comment": "Tokenize identifiers to help linters", + "match": "(?x) \\b ([[:alpha:]_]\\w*) \\b" + } + ] + }, + "escape-sequence-unicode": { + "patterns": [ + { + "name": "constant.character.escape.python", + "match": "(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n | N\\{[\\w\\s]+?\\}\n )\n" + } + ] + }, + "escape-sequence": { + "name": "constant.character.escape.python", + "match": "(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | [0-7]{1,3}\n | [\\\\\"'abfnrtv]\n )\n" + }, + "string-line-continuation": { + "name": "constant.language.python", + "match": "\\\\$" + }, + "string-formatting": { + "name": "meta.format.percent.python", + "match": "(?x)\n (\n % (\\([\\w\\s]*\\))?\n [-+#0 ]*\n (\\d+|\\*)? (\\.(\\d+|\\*))?\n ([hlL])?\n [diouxXeEfFgGcrsab%]\n )\n", + "captures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + } + }, + "string-brace-formatting": { + "patterns": [ + { + "name": "meta.format.brace.python", + "match": "(?x)\n (\n {{ | }}\n | (?:\n {\n \\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'\"]+\\])*\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?\n })\n )\n", + "captures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + }, + "3": { + "name": "storage.type.format.python" + }, + "4": { + "name": "storage.type.format.python" + } + } + }, + { + "name": "meta.format.brace.python", + "match": "(?x)\n (\n {\n \\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'\"]+\\])*\n (![rsa])?\n (:)\n [^'\"{}\\n]* (?:\n \\{ [^'\"}\\n]*? \\} [^'\"{}\\n]*\n )*\n }\n )\n", + "captures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + }, + "3": { + "name": "storage.type.format.python" + }, + "4": { + "name": "storage.type.format.python" + } + } + } + ] + }, + "fstring-formatting": { + "patterns": [ + { + "include": "#fstring-formatting-braces" + }, + { + "include": "#fstring-formatting-singe-brace" + } + ] + }, + "fstring-formatting-singe-brace": { + "name": "invalid.illegal.brace.python", + "match": "(}(?!}))" + }, + "import": { + "comment": "Import statements used to correctly mark `from`, `import`, and `as`\n", + "patterns": [ + { + "begin": "\\b(?<!\\.)(from)\\b(?=.+import)", + "end": "$|(?=import)", + "beginCaptures": { + "1": { + "name": "keyword.control.import.python" + } + }, + "patterns": [ + { + "name": "punctuation.separator.period.python", + "match": "\\.+" + }, + { + "include": "#expression" + } + ] + }, + { + "begin": "\\b(?<!\\.)(import)\\b", + "end": "$", + "beginCaptures": { + "1": { + "name": "keyword.control.import.python" + } + }, + "patterns": [ + { + "name": "keyword.control.import.python", + "match": "\\b(?<!\\.)as\\b" + }, + { + "include": "#expression" + } + ] + } + ] + }, + "class-declaration": { + "patterns": [ + { + "name": "meta.class.python", + "begin": "(?x)\n \\s*(class)\\s+\n (?=\n [[:alpha:]_]\\w* \\s* (:|\\()\n )\n", + "end": "(:)", + "beginCaptures": { + "1": { + "name": "storage.type.class.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.section.class.begin.python" + } + }, + "patterns": [ + { + "include": "#class-name" + }, + { + "include": "#class-inheritance" + } + ] + } + ] + }, + "class-name": { + "patterns": [ + { + "include": "#illegal-object-name" + }, + { + "include": "#builtin-possible-callables" + }, + { + "name": "entity.name.type.class.python", + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" + } + ] + }, + "class-inheritance": { + "name": "meta.class.inheritance.python", + "begin": "(\\()", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.inheritance.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.inheritance.end.python" + } + }, + "patterns": [ + { + "name": "keyword.operator.unpacking.arguments.python", + "match": "(\\*\\*|\\*)" + }, + { + "name": "punctuation.separator.inheritance.python", + "match": "," + }, + { + "name": "keyword.operator.assignment.python", + "match": "=(?!=)" + }, + { + "name": "support.type.metaclass.python", + "match": "\\bmetaclass\\b" + }, + { + "include": "#illegal-names" + }, + { + "include": "#class-kwarg" + }, + { + "include": "#call-wrapper-inheritance" + }, + { + "include": "#expression-base" + }, + { + "include": "#member-access-class" + }, + { + "include": "#inheritance-identifier" + } + ] + }, + "class-kwarg": { + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\s*(=)(?!=)\n", + "captures": { + "1": { + "name": "entity.other.inherited-class.python variable.parameter.class.python" + }, + "2": { + "name": "keyword.operator.assignment.python" + } + } + }, + "inheritance-identifier": { + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n", + "captures": { + "1": { + "name": "entity.other.inherited-class.python" + } + } + }, + "member-access-class": { + "name": "meta.member.access.python", + "begin": "(\\.)\\s*(?!\\.)", + "end": "(?<=\\S)(?=\\W)|$", + "beginCaptures": { + "1": { + "name": "punctuation.separator.period.python" + } + }, + "patterns": [ + { + "include": "#call-wrapper-inheritance" + }, + { + "include": "#member-access-base" + }, + { + "include": "#inheritance-identifier" + } + ] + }, + "lambda": { + "patterns": [ + { + "match": "((?<=\\.)lambda|lambda(?=\\s*[\\.=]))", + "captures": { + "1": { + "name": "keyword.control.flow.python" + } + } + }, + { + "match": "\\b(lambda)\\s*?(?=[,\\n]|$)", + "captures": { + "1": { + "name": "storage.type.function.lambda.python" + } + } + }, + { + "name": "meta.lambda-function.python", + "begin": "(?x)\n \\b (lambda) \\b\n", + "end": "(:)|(\\n)", + "beginCaptures": { + "1": { + "name": "storage.type.function.lambda.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.section.function.lambda.begin.python" + } + }, + "contentName": "meta.function.lambda.parameters.python", + "patterns": [ + { + "name": "keyword.operator.unpacking.parameter.python", + "match": "(\\*\\*|\\*)" + }, + { + "include": "#lambda-nested-incomplete" + }, + { + "include": "#illegal-names" + }, + { + "match": "([[:alpha:]_]\\w*)\\s*(?:(,)|(?=:|$))", + "captures": { + "1": { + "name": "variable.parameter.function.language.python" + }, + "2": { + "name": "punctuation.separator.parameters.python" + } + } + }, + { + "include": "#comments" + }, + { + "include": "#backticks" + }, + { + "include": "#illegal-anno" + }, + { + "include": "#lambda-parameter-with-default" + }, + { + "include": "#line-continuation" + }, + { + "include": "#illegal-operator" + } + ] + } + ] + }, + "lambda-incomplete": { + "name": "storage.type.function.lambda.python", + "match": "\\blambda(?=\\s*[,)])" + }, + "lambda-nested-incomplete": { + "name": "storage.type.function.lambda.python", + "match": "\\blambda(?=\\s*[:,)])" + }, + "lambda-parameter-with-default": { + "begin": "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (=)\n", + "end": "(,)|(?=:|$)", + "beginCaptures": { + "1": { + "name": "variable.parameter.function.language.python" + }, + "2": { + "name": "keyword.operator.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.separator.parameters.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "generator": { + "comment": "Match \"for ... in\" construct used in generators and for loops to\ncorrectly identify the \"in\" as a control flow keyword.\n", + "begin": "\\bfor\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.flow.python" + } + }, + "end": "\\bin\\b", + "endCaptures": { + "0": { + "name": "keyword.control.flow.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "function-declaration": { + "name": "meta.function.python", + "begin": "(?x)\n \\s*\n (?:\\b(async) \\s+)? \\b(def)\\s+\n (?=\n [[:alpha:]_][[:word:]]* \\s* \\(\n )\n", + "end": "(:|(?=[#'\"\\n]))", + "beginCaptures": { + "1": { + "name": "storage.type.function.async.python" + }, + "2": { + "name": "storage.type.function.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.section.function.begin.python" + } + }, + "patterns": [ + { + "include": "#function-def-name" + }, + { + "include": "#parameters" + }, + { + "include": "#line-continuation" + }, + { + "include": "#return-annotation" + } + ] + }, + "function-def-name": { + "patterns": [ + { + "name": "entity.name.function.fallback.vyper", + "match": "(?x)\n \\b (__default__) \\b\n" + }, + { + "name": "entity.name.function.constructor.vyper", + "match": "(?x)\n \\b (__init__) \\b\n" + }, + { + "include": "#illegal-object-name" + }, + { + "include": "#builtin-possible-callables" + }, + { + "name": "entity.name.function.python", + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" + } + ] + }, + "parameters": { + "name": "meta.function.parameters.python", + "begin": "(\\()", + "end": "(\\))", + "beginCaptures": { + "1": { + "name": "punctuation.definition.parameters.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.parameters.end.python" + } + }, + "patterns": [ + { + "name": "keyword.operator.unpacking.parameter.python", + "match": "(\\*\\*|\\*)" + }, + { + "include": "#lambda-incomplete" + }, + { + "include": "#illegal-names" + }, + { + "include": "#illegal-object-name" + }, + { + "include": "#parameter-special" + }, + { + "match": "(?x)\n ([[:alpha:]_]\\w*)\n \\s* (?: (,) | (?=[)#\\n=]))\n", + "captures": { + "1": { + "name": "variable.parameter.function.language.python" + }, + "2": { + "name": "punctuation.separator.parameters.python" + } + } + }, + { + "include": "#comments" + }, + { + "include": "#loose-default" + }, + { + "include": "#annotated-parameter" + } + ] + }, + "parameter-special": { + "match": "(?x)\n \\b ((self)|(cls)) \\b \\s*(?:(,)|(?=\\)))\n", + "captures": { + "1": { + "name": "variable.parameter.function.language.python" + }, + "2": { + "name": "variable.parameter.function.language.special.self.python" + }, + "3": { + "name": "variable.parameter.function.language.special.cls.python" + }, + "4": { + "name": "punctuation.separator.parameters.python" + } + } + }, + "loose-default": { + "begin": "(=)", + "end": "(,)|(?=\\))", + "beginCaptures": { + "1": { + "name": "keyword.operator.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.separator.parameters.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "annotated-parameter": { + "begin": "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (:)\n", + "end": "(,)|(?=\\))", + "beginCaptures": { + "1": { + "name": "variable.parameter.function.language.python" + }, + "2": { + "name": "punctuation.separator.annotation.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.separator.parameters.python" + } + }, + "patterns": [ + { + "include": "#expression" + }, + { + "name": "keyword.operator.assignment.python", + "match": "=(?!=)" + } + ] + }, + "return-annotation": { + "begin": "(->)", + "end": "(?=:)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.annotation.result.python" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "item-access": { + "patterns": [ + { + "name": "meta.item-access.python", + "begin": "(?x)\n \\b(?=\n [[:alpha:]_]\\w* \\s* \\[\n )\n", + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + } + }, + "patterns": [ + { + "include": "#item-name" + }, + { + "include": "#item-index" + }, + { + "include": "#expression" + } + ] + } + ] + }, + "item-name": { + "patterns": [ + { + "include": "#special-variables" + }, + { + "include": "#builtin-functions" + }, + { + "include": "#special-names" + }, + { + "name": "meta.indexed-name.python", + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" + }, + { + "include": "#special-variables-types" + } + ] + }, + "item-index": { + "begin": "(\\[)", + "end": "(?=\\])", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.python" + } + }, + "contentName": "meta.item-access.arguments.python", + "patterns": [ + { + "name": "punctuation.separator.slice.python", + "match": ":" + }, + { + "include": "#expression" + } + ] + }, + "decorator": { + "name": "meta.function.decorator.python", + "begin": "(?x)\n ^\\s*\n ((@)) \\s* (?=[[:alpha:]_]\\w*)\n", + "end": "(?x)\n ( \\) )\n # trailing whitespace and comments are legal\n (?: (.*?) (?=\\s*(?:\\#|$)) )\n | (?=\\n|\\#)\n", + "beginCaptures": { + "1": { + "name": "entity.name.function.decorator.python" + }, + "2": { + "name": "punctuation.definition.decorator.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + }, + "2": { + "name": "invalid.illegal.decorator.python" + } + }, + "patterns": [ + { + "include": "#decorator-name" + }, + { + "include": "#function-arguments" + } + ] + }, + "decorator-name": { + "patterns": [ + { + "include": "#builtin-callables" + }, + { + "include": "#illegal-object-name" + }, + { + "name": "entity.name.function.decorator.python", + "match": "(?x)\n ([[:alpha:]_]\\w*) | (\\.)\n", + "captures": { + "2": { + "name": "punctuation.separator.period.python" + } + } + }, + { + "include": "#line-continuation" + }, + { + "name": "invalid.illegal.decorator.python", + "match": "(?x)\n \\s* ([^([:alpha:]\\s_\\.#\\\\] .*?) (?=\\#|$)\n", + "captures": { + "1": { + "name": "invalid.illegal.decorator.python" + } + } + } + ] + }, + "call-wrapper-inheritance": { + "comment": "same as a function call, but in inheritance context", + "name": "meta.function-call.python", + "begin": "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + } + }, + "patterns": [ + { + "include": "#inheritance-name" + }, + { + "include": "#function-arguments" + } + ] + }, + "inheritance-name": { + "patterns": [ + { + "include": "#lambda-incomplete" + }, + { + "include": "#builtin-possible-callables" + }, + { + "include": "#inheritance-identifier" + } + ] + }, + "function-call": { + "name": "meta.function-call.python", + "comment": "Regular function call of the type \"name(args)\"", + "begin": "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n", + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + } + }, + "patterns": [ + { + "include": "#special-variables" + }, + { + "include": "#function-name" + }, + { + "include": "#function-arguments" + } + ] + }, + "function-name": { + "patterns": [ + { + "include": "#builtin-possible-callables" + }, + { + "comment": "Some color schemas support meta.function-call.generic scope", + "name": "meta.function-call.generic.python", + "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" + } + ] + }, + "function-arguments": { + "begin": "(\\()", + "end": "(?=\\))(?!\\)\\s*\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.python" + } + }, + "contentName": "meta.function-call.arguments.python", + "patterns": [ + { + "name": "punctuation.separator.arguments.python", + "match": "(,)" + }, + { + "match": "(?x)\n (?:(?<=[,(])|^) \\s* (\\*{1,2})\n", + "captures": { + "1": { + "name": "keyword.operator.unpacking.arguments.python" + } + } + }, + { + "include": "#lambda-incomplete" + }, + { + "include": "#illegal-names" + }, + { + "match": "\\b([[:alpha:]_]\\w*)\\s*(=)(?!=)", + "captures": { + "1": { + "name": "variable.parameter.function-call.python" + }, + "2": { + "name": "keyword.operator.assignment.python" + } + } + }, + { + "name": "keyword.operator.assignment.python", + "match": "=(?!=)" + }, + { + "include": "#expression" + }, + { + "match": "\\s*(\\))\\s*(\\()", + "captures": { + "1": { + "name": "punctuation.definition.arguments.end.python" + }, + "2": { + "name": "punctuation.definition.arguments.begin.python" + } + } + } + ] + }, + "builtin-callables": { + "patterns": [ + { + "include": "#illegal-names" + }, + { + "include": "#illegal-object-name" + }, + { + "include": "#builtin-exceptions" + }, + { + "include": "#builtin-functions" + }, + { + "include": "#builtin-types" + } + ] + }, + "builtin-possible-callables": { + "patterns": [ + { + "include": "#builtin-callables" + }, + { + "include": "#magic-names" + } + ] + }, + "builtin-exceptions": { + "name": "support.type.exception.python", + "match": "(?x) (?<!\\.) \\b(\n (\n Arithmetic | Assertion | Attribute | Buffer | BlockingIO\n | BrokenPipe | ChildProcess\n | (Connection (Aborted | Refused | Reset)?)\n | EOF | Environment | FileExists | FileNotFound\n | FloatingPoint | IO | Import | Indentation | Index | Interrupted\n | IsADirectory | NotADirectory | Permission | ProcessLookup\n | Timeout\n | Key | Lookup | Memory | Name | NotImplemented | OS | Overflow\n | Reference | Runtime | Recursion | Syntax | System\n | Tab | Type | UnboundLocal | Unicode(Encode|Decode|Translate)?\n | Value | Windows | ZeroDivision | ModuleNotFound\n ) Error\n|\n ((Pending)?Deprecation | Runtime | Syntax | User | Future | Import\n | Unicode | Bytes | Resource\n )? Warning\n|\n SystemExit | Stop(Async)?Iteration\n | KeyboardInterrupt\n | GeneratorExit | (Base)?Exception\n)\\b\n" + }, + "builtin-functions": { + "patterns": [ + { + "name": "support.function.builtin.python", + "match": "(?x)\n (?<!\\.) \\b(\n __import__ | abs | all | any | ascii | bin | breakpoint | callable\n | chr | compile | copyright | credits | delattr | dir | divmod\n | enumerate | eval | exec | exit | filter | format | getattr\n | globals | hasattr | hash | help | hex | id | input\n | isinstance | issubclass | iter | len | license | locals | map\n | max | memoryview | min | next | oct | open | ord | pow | print\n | quit | range | reload | repr | reversed | round\n | setattr | sorted | sum | vars | zip\n )\\b\n" + }, + { + "name": "variable.legacy.builtin.python", + "match": "(?x)\n (?<!\\.) \\b(\n file | reduce | intern | raw_input | unicode | cmp | basestring\n | execfile | long | xrange\n )\\b\n" + }, + { + "name": "support.function.builtin.vyper", + "match": "(?x)\n (?<!\\.) \\b(\n _abi_encode | floor | ceil | convert | slice | len | concat | sha256 | method_id | keccak256 | ecrecover | ecadd | ecmul | extract32 | as_wei_value | raw_call | blockhash | bitwise_and | bitwise_or | bitwise_xor | bitwise_not | uint256_addmod | uint256_mulmod | pow_mod256 | sqrt | shift | create_forwarder_to | min | max | empty | abs )\\b\n" + }, + { + "name": "support.function.builtin.lowlevel.vyper", + "match": "(?x)\n (?<!\\.) \\b(\n send | selfdestruct | raw_call | raw_log | create_forwarder_to )\\b\n" + }, + { + "name": "support.type.event.vyper", + "match": "(?x)\n (?<!\\.) \\b(\n event )\\b\n" + }, + { + "name": "support.type.reference.vyper", + "match": "(?x)\n (?<!\\.) \\b(\n map | struct | HashMap )\\b\n" + }, + { + "name": "support.function.builtin.modifiers.safe.vyper", + "match": "(?x)\n (?<!\\.) \\b(\n private | nonreentrant | constant | event | internal | view | pure )\\b\n" + }, + { + "name": "support.function.builtin.modifiers.unsafe.vyper", + "match": "(?x)\n (?<!\\.) \\b(\n public | payable | modifying | external )\\b\n" + } + ] + }, + "builtin-types": { + "patterns": [ + { + "name": "support.type.python", + "match": "(?x)\n (?<!\\.) \\b(\n bool | bytearray | bytes | classmethod | complex | dict\n | float | frozenset | int | list | object | property\n | set | slice | staticmethod | str | tuple | type\n\n (?# Although 'super' is not a type, it's related to types,\n and is special enough to be highlighted differently from\n other built-ins)\n | super\n )\\b\n" + }, + { + "name": "support.type.basetype.vyper", + "match": "(?x)\n (?<!\\.) \\b(\n bytes32 | bytearray | wei_value | timestamp | int256 | uint8 | uint256 | decimal | timedelta | string | int128 | address | bool | bytes )\\b\n" + }, + { + "name": "support.type.keywords.vyper", + "match": "(?x)\n (?<!\\.) \\b(\n finney | gwei | range | def | ____init____ | timedelta | babbage | zero_address | raise | external | empty_bytes32 | assert | continue | wei | ada | min_int256 | min_int128 | chainid | max_decimal | default | indexed | selfdestruct | lovelace | immutable | throw | kwei | max_int128 | while | constant | ___default___ | balance | twei | codesize | false | max_int256 | _default_ | init | mwei | if | ____default____ | true | payable | internal | until | this | nonpayable | pass | public | nonreentrant | blockhash | max_uint256 | shannon | none | units | _init_ | ___init___ | is_contract | for | zero_wei | min_decimal | szabo | timestamp | ether | pwei | send )\\b\n" + }, + { + "name": "support.type.unit.vyper", + "match": "(?x)\n (?<!\\.) \\b(\n shannon | finney | gwei | twei | kwei | wei | lovelace | ether | szabo | pwei | babbage | mwei | ada \n\n (?# Although 'super' is not a type, it's related to types,\n and is special enough to be highlighted differently from\n other built-ins)\n | super\n )\\b\n" + }, + { + "name": "support.type.constant.vyper", + "match": "(?x)\n (?<!\\.) \\b(\n ZERO_ADDRESS | EMPTY_BYTES32 | MAX_INT128 | MIN_INT128 | MAX_DECIMAL | MIN_DECIMAL | MAX_UINT256 \n\n (?# Although 'super' is not a type, it's related to types,\n and is special enough to be highlighted differently from\n other built-ins)\n | super\n )\\b\n" + }, + { + "name": "entity.other.inherited-class.interface.vyper", + "match": "(?x)\n (?<!\\.) \\b(\n implements )\\b\n" + } + ] + }, + "magic-function-names": { + "comment": "these methods have magic interpretation by python and are generally called\nindirectly through syntactic constructs\n", + "match": "(?x)\n \\b(\n __(?:\n abs | add | aenter | aexit | aiter | and | anext | await\n | bool | call | ceil | cmp | coerce | complex | contains\n | copy | deepcopy | del | delattr | delete | delitem\n | delslice | dir | div | divmod | enter | eq | exit | float\n | floor | floordiv | format | ge | get | getattr\n | getattribute | getinitargs | getitem | getnewargs\n | getslice | getstate | gt | hash | hex | iadd | iand | idiv\n | ifloordiv | ilshift | imod | imul | index | init\n | instancecheck | int | invert | ior | ipow | irshift | isub\n | iter | itruediv | ixor | le | len | long | lshift | lt\n | missing | mod | mul | ne | neg | new | next | nonzero | oct | or\n | pos | pow | radd | rand | rdiv | rdivmod | reduce\n | reduce_ex | repr | reversed | rfloordiv | rlshift | rmod\n | rmul | ror | round | rpow | rrshift | rshift | rsub\n | rtruediv | rxor | set | setattr | setitem | setslice\n | setstate | sizeof | str | sub | subclasscheck | truediv\n | trunc | unicode | xor | matmul | rmatmul | imatmul\n | init_subclass | set_name | fspath | bytes | prepare\n )__\n )\\b\n", + "captures": { + "1": { + "name": "support.function.magic.python" + } + } + }, + "magic-variable-names": { + "comment": "magic variables which a class/module may have.", + "match": "(?x)\n \\b(\n __(?:\n all | bases | builtins | class | class_getitem | code | debug\n | defaults | dict | doc | file | func | kwdefaults | members\n | metaclass | methods | module | mro | mro_entries | name\n | qualname | post_init | self | signature | slots | subclasses\n | version | weakref | wrapped | annotations | classcell\n | spec | path | package | future | traceback\n )__\n )\\b\n", + "captures": { + "1": { + "name": "support.variable.magic.python" + } + } + }, + "magic-names": { + "patterns": [ + { + "include": "#magic-function-names" + }, + { + "include": "#magic-variable-names" + } + ] + }, + "illegal-names": { + "match": "(?x)\n \\b(?:\n (\n and | assert | async | await | break | class | continue | def\n | del | elif | else | except | finally | for | from | global\n | if | in | is | (?<=\\.)lambda | lambda(?=\\s*[\\.=])\n | nonlocal | not | or | pass | raise | return | try | while | with\n | yield\n ) | (\n as | import\n )\n )\\b\n", + "captures": { + "1": { + "name": "keyword.control.flow.python" + }, + "2": { + "name": "keyword.control.import.python" + } + } + }, + "special-variables": { + "match": "(?x)\n \\b (?<!\\.) (?:\n (self) | (cls)\n )\\b\n", + "captures": { + "1": { + "name": "variable.language.special.self.python" + }, + "2": { + "name": "variable.language.special.cls.python" + } + } + }, + "ellipsis": { + "name": "constant.other.ellipsis.python", + "match": "\\.\\.\\." + }, + "backticks": { + "name": "invalid.deprecated.backtick.python", + "begin": "\\`", + "end": "(?:\\`|(?<!\\\\)(\\n))", + "patterns": [ + { + "include": "#expression" + } + ] + }, + "illegal-operator": { + "patterns": [ + { + "name": "invalid.illegal.operator.python", + "match": "&&|\\|\\||--|\\+\\+" + }, + { + "name": "invalid.illegal.operator.python", + "match": "[?$]" + }, + { + "name": "invalid.illegal.operator.python", + "comment": "We don't want `!` to flash when we're typing `!=`", + "match": "!\\b" + } + ] + }, + "illegal-object-name": { + "comment": "It's illegal to name class or function \"True\"", + "name": "keyword.illegal.name.python", + "match": "\\b(True|False|None)\\b" + }, + "illegal-anno": { + "name": "invalid.illegal.annotation.python", + "match": "->" + }, + "regexp-base-expression": { + "patterns": [ + { + "include": "#regexp-quantifier" + }, + { + "include": "#regexp-base-common" + } + ] + }, + "fregexp-base-expression": { + "patterns": [ + { + "include": "#fregexp-quantifier" + }, + { + "include": "#fstring-formatting-braces" + }, + { + "match": "\\{.*?\\}" + }, + { + "include": "#regexp-base-common" + } + ] + }, + "fstring-formatting-braces": { + "patterns": [ + { + "comment": "empty braces are illegal", + "match": "({)(\\s*?)(})", + "captures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + }, + "2": { + "name": "invalid.illegal.brace.python" + }, + "3": { + "name": "constant.character.format.placeholder.other.python" + } + } + }, + { + "name": "constant.character.escape.python", + "match": "({{|}})" + } + ] + }, + "regexp-base-common": { + "patterns": [ + { + "name": "support.other.match.any.regexp", + "match": "\\." + }, + { + "name": "support.other.match.begin.regexp", + "match": "\\^" + }, + { + "name": "support.other.match.end.regexp", + "match": "\\$" + }, + { + "name": "keyword.operator.quantifier.regexp", + "match": "[+*?]\\??" + }, + { + "name": "keyword.operator.disjunction.regexp", + "match": "\\|" + }, + { + "include": "#regexp-escape-sequence" + } + ] + }, + "regexp-quantifier": { + "name": "keyword.operator.quantifier.regexp", + "match": "(?x)\n \\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\n" + }, + "fregexp-quantifier": { + "name": "keyword.operator.quantifier.regexp", + "match": "(?x)\n \\{\\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\\}\n" + }, + "regexp-backreference-number": { + "name": "meta.backreference.regexp", + "match": "(\\\\[1-9]\\d?)", + "captures": { + "1": { + "name": "entity.name.tag.backreference.regexp" + } + } + }, + "regexp-backreference": { + "name": "meta.backreference.named.regexp", + "match": "(?x)\n (\\() (\\?P= \\w+(?:\\s+[[:alnum:]]+)?) (\\))\n", + "captures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.backreference.regexp" + }, + "3": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.end.regexp" + } + } + }, + "regexp-flags": { + "name": "storage.modifier.flag.regexp", + "match": "\\(\\?[aiLmsux]+\\)" + }, + "regexp-escape-special": { + "name": "support.other.escape.special.regexp", + "match": "\\\\([AbBdDsSwWZ])" + }, + "regexp-escape-character": { + "name": "constant.character.escape.regexp", + "match": "(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | 0[0-7]{1,2}\n | [0-7]{3}\n )\n" + }, + "regexp-escape-unicode": { + "name": "constant.character.unicode.regexp", + "match": "(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n )\n" + }, + "regexp-escape-catchall": { + "name": "constant.character.escape.regexp", + "match": "\\\\(.|\\n)" + }, + "regexp-escape-sequence": { + "patterns": [ + { + "include": "#regexp-escape-special" + }, + { + "include": "#regexp-escape-character" + }, + { + "include": "#regexp-escape-unicode" + }, + { + "include": "#regexp-backreference-number" + }, + { + "include": "#regexp-escape-catchall" + } + ] + }, + "regexp-charecter-set-escapes": { + "patterns": [ + { + "name": "constant.character.escape.regexp", + "match": "\\\\[abfnrtv\\\\]" + }, + { + "include": "#regexp-escape-special" + }, + { + "name": "constant.character.escape.regexp", + "match": "\\\\([0-7]{1,3})" + }, + { + "include": "#regexp-escape-character" + }, + { + "include": "#regexp-escape-unicode" + }, + { + "include": "#regexp-escape-catchall" + } + ] + }, + "codetags": { + "match": "(?:\\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\\b)", + "captures": { + "1": { + "name": "keyword.codetag.notation.python" + } + } + }, + "comments-base": { + "name": "comment.line.number-sign.python", + "begin": "(\\#)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.python" + } + }, + "end": "($)", + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "comments-string-single-three": { + "name": "comment.line.number-sign.python", + "begin": "(\\#)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.python" + } + }, + "end": "($|(?='''))", + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "comments-string-double-three": { + "name": "comment.line.number-sign.python", + "begin": "(\\#)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.python" + } + }, + "end": "($|(?=\"\"\"))", + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "single-one-regexp-expression": { + "patterns": [ + { + "include": "#regexp-base-expression" + }, + { + "include": "#single-one-regexp-character-set" + }, + { + "include": "#single-one-regexp-comments" + }, + { + "include": "#regexp-flags" + }, + { + "include": "#single-one-regexp-named-group" + }, + { + "include": "#regexp-backreference" + }, + { + "include": "#single-one-regexp-lookahead" + }, + { + "include": "#single-one-regexp-lookahead-negative" + }, + { + "include": "#single-one-regexp-lookbehind" + }, + { + "include": "#single-one-regexp-lookbehind-negative" + }, + { + "include": "#single-one-regexp-conditional" + }, + { + "include": "#single-one-regexp-parentheses-non-capturing" + }, + { + "include": "#single-one-regexp-parentheses" + } + ] + }, + "single-one-regexp-character-set": { + "patterns": [ + { + "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" + }, + { + "name": "meta.character.set.regexp", + "begin": "(\\[)(\\^)?(\\])?", + "end": "(\\]|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "1": { + "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + }, + "3": { + "name": "constant.character.set.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.character.set.end.regexp constant.other.set.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#regexp-charecter-set-escapes" + }, + { + "name": "constant.character.set.regexp", + "match": "[^\\n]" + } + ] + } + ] + }, + "single-one-regexp-named-group": { + "name": "meta.named.regexp", + "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.group.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-comments": { + "name": "comment.regexp", + "begin": "\\(\\?#", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "punctuation.comment.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.comment.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "single-one-regexp-lookahead": { + "begin": "(\\()\\?=", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-lookahead-negative": { + "begin": "(\\()\\?!", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-lookbehind": { + "begin": "(\\()\\?<=", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-lookbehind-negative": { + "begin": "(\\()\\?<!", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-conditional": { + "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.conditional.regexp" + }, + "1": { + "name": "punctuation.parenthesis.conditional.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-parentheses-non-capturing": { + "begin": "\\(\\?:", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-one-regexp-parentheses": { + "begin": "\\(", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "single-three-regexp-expression": { + "patterns": [ + { + "include": "#regexp-base-expression" + }, + { + "include": "#single-three-regexp-character-set" + }, + { + "include": "#single-three-regexp-comments" + }, + { + "include": "#regexp-flags" + }, + { + "include": "#single-three-regexp-named-group" + }, + { + "include": "#regexp-backreference" + }, + { + "include": "#single-three-regexp-lookahead" + }, + { + "include": "#single-three-regexp-lookahead-negative" + }, + { + "include": "#single-three-regexp-lookbehind" + }, + { + "include": "#single-three-regexp-lookbehind-negative" + }, + { + "include": "#single-three-regexp-conditional" + }, + { + "include": "#single-three-regexp-parentheses-non-capturing" + }, + { + "include": "#single-three-regexp-parentheses" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-character-set": { + "patterns": [ + { + "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" + }, + { + "name": "meta.character.set.regexp", + "begin": "(\\[)(\\^)?(\\])?", + "end": "(\\]|(?=\\'\\'\\'))", + "beginCaptures": { + "1": { + "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + }, + "3": { + "name": "constant.character.set.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.character.set.end.regexp constant.other.set.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#regexp-charecter-set-escapes" + }, + { + "name": "constant.character.set.regexp", + "match": "[^\\n]" + } + ] + } + ] + }, + "single-three-regexp-named-group": { + "name": "meta.named.regexp", + "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.group.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-comments": { + "name": "comment.regexp", + "begin": "\\(\\?#", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "punctuation.comment.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.comment.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "single-three-regexp-lookahead": { + "begin": "(\\()\\?=", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-lookahead-negative": { + "begin": "(\\()\\?!", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-lookbehind": { + "begin": "(\\()\\?<=", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-lookbehind-negative": { + "begin": "(\\()\\?<!", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-conditional": { + "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.conditional.regexp" + }, + "1": { + "name": "punctuation.parenthesis.conditional.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-parentheses-non-capturing": { + "begin": "\\(\\?:", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-regexp-parentheses": { + "begin": "\\(", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "double-one-regexp-expression": { + "patterns": [ + { + "include": "#regexp-base-expression" + }, + { + "include": "#double-one-regexp-character-set" + }, + { + "include": "#double-one-regexp-comments" + }, + { + "include": "#regexp-flags" + }, + { + "include": "#double-one-regexp-named-group" + }, + { + "include": "#regexp-backreference" + }, + { + "include": "#double-one-regexp-lookahead" + }, + { + "include": "#double-one-regexp-lookahead-negative" + }, + { + "include": "#double-one-regexp-lookbehind" + }, + { + "include": "#double-one-regexp-lookbehind-negative" + }, + { + "include": "#double-one-regexp-conditional" + }, + { + "include": "#double-one-regexp-parentheses-non-capturing" + }, + { + "include": "#double-one-regexp-parentheses" + } + ] + }, + "double-one-regexp-character-set": { + "patterns": [ + { + "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" + }, + { + "name": "meta.character.set.regexp", + "begin": "(\\[)(\\^)?(\\])?", + "end": "(\\]|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "1": { + "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + }, + "3": { + "name": "constant.character.set.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.character.set.end.regexp constant.other.set.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#regexp-charecter-set-escapes" + }, + { + "name": "constant.character.set.regexp", + "match": "[^\\n]" + } + ] + } + ] + }, + "double-one-regexp-named-group": { + "name": "meta.named.regexp", + "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.group.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-comments": { + "name": "comment.regexp", + "begin": "\\(\\?#", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "punctuation.comment.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.comment.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "double-one-regexp-lookahead": { + "begin": "(\\()\\?=", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-lookahead-negative": { + "begin": "(\\()\\?!", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-lookbehind": { + "begin": "(\\()\\?<=", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-lookbehind-negative": { + "begin": "(\\()\\?<!", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-conditional": { + "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.conditional.regexp" + }, + "1": { + "name": "punctuation.parenthesis.conditional.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-parentheses-non-capturing": { + "begin": "\\(\\?:", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-one-regexp-parentheses": { + "begin": "\\(", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "double-three-regexp-expression": { + "patterns": [ + { + "include": "#regexp-base-expression" + }, + { + "include": "#double-three-regexp-character-set" + }, + { + "include": "#double-three-regexp-comments" + }, + { + "include": "#regexp-flags" + }, + { + "include": "#double-three-regexp-named-group" + }, + { + "include": "#regexp-backreference" + }, + { + "include": "#double-three-regexp-lookahead" + }, + { + "include": "#double-three-regexp-lookahead-negative" + }, + { + "include": "#double-three-regexp-lookbehind" + }, + { + "include": "#double-three-regexp-lookbehind-negative" + }, + { + "include": "#double-three-regexp-conditional" + }, + { + "include": "#double-three-regexp-parentheses-non-capturing" + }, + { + "include": "#double-three-regexp-parentheses" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-character-set": { + "patterns": [ + { + "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" + }, + { + "name": "meta.character.set.regexp", + "begin": "(\\[)(\\^)?(\\])?", + "end": "(\\]|(?=\"\"\"))", + "beginCaptures": { + "1": { + "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" + }, + "2": { + "name": "keyword.operator.negation.regexp" + }, + "3": { + "name": "constant.character.set.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.character.set.end.regexp constant.other.set.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#regexp-charecter-set-escapes" + }, + { + "name": "constant.character.set.regexp", + "match": "[^\\n]" + } + ] + } + ] + }, + "double-three-regexp-named-group": { + "name": "meta.named.regexp", + "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.group.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-comments": { + "name": "comment.regexp", + "begin": "\\(\\?#", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "punctuation.comment.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.comment.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#codetags" + } + ] + }, + "double-three-regexp-lookahead": { + "begin": "(\\()\\?=", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-lookahead-negative": { + "begin": "(\\()\\?!", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-lookbehind": { + "begin": "(\\()\\?<=", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-lookbehind-negative": { + "begin": "(\\()\\?<!", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-conditional": { + "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.conditional.regexp" + }, + "1": { + "name": "punctuation.parenthesis.conditional.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-parentheses-non-capturing": { + "begin": "\\(\\?:", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-regexp-parentheses": { + "begin": "\\(", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "regexp-single-one-line": { + "name": "string.regexp.quoted.single.python", + "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\\')", + "end": "(\\')|(?<!\\\\)(\\n)", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "storage.type.string.python" + }, + "5": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-regexp-expression" + } + ] + }, + "regexp-single-three-line": { + "name": "string.regexp.quoted.multi.python", + "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\\'\\'\\')", + "end": "(\\'\\'\\')", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "storage.type.string.python" + }, + "5": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-regexp-expression" + } + ] + }, + "regexp-double-one-line": { + "name": "string.regexp.quoted.single.python", + "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\")", + "end": "(\")|(?<!\\\\)(\\n)", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "storage.type.string.python" + }, + "5": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-regexp-expression" + } + ] + }, + "regexp-double-three-line": { + "name": "string.regexp.quoted.multi.python", + "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\"\"\")", + "end": "(\"\"\")", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "storage.type.string.python" + }, + "5": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-regexp-expression" + } + ] + }, + "single-one-fregexp-expression": { + "patterns": [ + { + "include": "#fregexp-base-expression" + }, + { + "include": "#single-one-regexp-character-set" + }, + { + "include": "#single-one-regexp-comments" + }, + { + "include": "#regexp-flags" + }, + { + "include": "#single-one-regexp-named-group" + }, + { + "include": "#regexp-backreference" + }, + { + "include": "#single-one-fregexp-lookahead" + }, + { + "include": "#single-one-fregexp-lookahead-negative" + }, + { + "include": "#single-one-fregexp-lookbehind" + }, + { + "include": "#single-one-fregexp-lookbehind-negative" + }, + { + "include": "#single-one-fregexp-conditional" + }, + { + "include": "#single-one-fregexp-parentheses-non-capturing" + }, + { + "include": "#single-one-fregexp-parentheses" + } + ] + }, + "single-one-fregexp-named-group": { + "name": "meta.named.regexp", + "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.group.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-fregexp-expression" + } + ] + }, + "single-one-fregexp-lookahead": { + "begin": "(\\()\\?=", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-fregexp-expression" + } + ] + }, + "single-one-fregexp-lookahead-negative": { + "begin": "(\\()\\?!", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-fregexp-expression" + } + ] + }, + "single-one-fregexp-lookbehind": { + "begin": "(\\()\\?<=", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-fregexp-expression" + } + ] + }, + "single-one-fregexp-lookbehind-negative": { + "begin": "(\\()\\?<!", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-fregexp-expression" + } + ] + }, + "single-one-fregexp-conditional": { + "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.conditional.regexp" + }, + "1": { + "name": "punctuation.parenthesis.conditional.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-fregexp-expression" + } + ] + }, + "single-one-fregexp-parentheses-non-capturing": { + "begin": "\\(\\?:", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-fregexp-expression" + } + ] + }, + "single-one-fregexp-parentheses": { + "begin": "\\(", + "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-fregexp-expression" + } + ] + }, + "single-three-fregexp-expression": { + "patterns": [ + { + "include": "#fregexp-base-expression" + }, + { + "include": "#single-three-regexp-character-set" + }, + { + "include": "#single-three-regexp-comments" + }, + { + "include": "#regexp-flags" + }, + { + "include": "#single-three-regexp-named-group" + }, + { + "include": "#regexp-backreference" + }, + { + "include": "#single-three-fregexp-lookahead" + }, + { + "include": "#single-three-fregexp-lookahead-negative" + }, + { + "include": "#single-three-fregexp-lookbehind" + }, + { + "include": "#single-three-fregexp-lookbehind-negative" + }, + { + "include": "#single-three-fregexp-conditional" + }, + { + "include": "#single-three-fregexp-parentheses-non-capturing" + }, + { + "include": "#single-three-fregexp-parentheses" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-fregexp-named-group": { + "name": "meta.named.regexp", + "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.group.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-fregexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-fregexp-lookahead": { + "begin": "(\\()\\?=", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-fregexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-fregexp-lookahead-negative": { + "begin": "(\\()\\?!", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-fregexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-fregexp-lookbehind": { + "begin": "(\\()\\?<=", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-fregexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-fregexp-lookbehind-negative": { + "begin": "(\\()\\?<!", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-fregexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-fregexp-conditional": { + "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "keyword.operator.conditional.regexp" + }, + "1": { + "name": "punctuation.parenthesis.conditional.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-fregexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-fregexp-parentheses-non-capturing": { + "begin": "\\(\\?:", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-fregexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "single-three-fregexp-parentheses": { + "begin": "\\(", + "end": "(\\)|(?=\\'\\'\\'))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-fregexp-expression" + }, + { + "include": "#comments-string-single-three" + } + ] + }, + "double-one-fregexp-expression": { + "patterns": [ + { + "include": "#fregexp-base-expression" + }, + { + "include": "#double-one-regexp-character-set" + }, + { + "include": "#double-one-regexp-comments" + }, + { + "include": "#regexp-flags" + }, + { + "include": "#double-one-regexp-named-group" + }, + { + "include": "#regexp-backreference" + }, + { + "include": "#double-one-fregexp-lookahead" + }, + { + "include": "#double-one-fregexp-lookahead-negative" + }, + { + "include": "#double-one-fregexp-lookbehind" + }, + { + "include": "#double-one-fregexp-lookbehind-negative" + }, + { + "include": "#double-one-fregexp-conditional" + }, + { + "include": "#double-one-fregexp-parentheses-non-capturing" + }, + { + "include": "#double-one-fregexp-parentheses" + } + ] + }, + "double-one-fregexp-named-group": { + "name": "meta.named.regexp", + "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.group.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-fregexp-expression" + } + ] + }, + "double-one-fregexp-lookahead": { + "begin": "(\\()\\?=", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-fregexp-expression" + } + ] + }, + "double-one-fregexp-lookahead-negative": { + "begin": "(\\()\\?!", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-fregexp-expression" + } + ] + }, + "double-one-fregexp-lookbehind": { + "begin": "(\\()\\?<=", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-fregexp-expression" + } + ] + }, + "double-one-fregexp-lookbehind-negative": { + "begin": "(\\()\\?<!", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-fregexp-expression" + } + ] + }, + "double-one-fregexp-conditional": { + "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "keyword.operator.conditional.regexp" + }, + "1": { + "name": "punctuation.parenthesis.conditional.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-fregexp-expression" + } + ] + }, + "double-one-fregexp-parentheses-non-capturing": { + "begin": "\\(\\?:", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-fregexp-expression" + } + ] + }, + "double-one-fregexp-parentheses": { + "begin": "\\(", + "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-fregexp-expression" + } + ] + }, + "double-three-fregexp-expression": { + "patterns": [ + { + "include": "#fregexp-base-expression" + }, + { + "include": "#double-three-regexp-character-set" + }, + { + "include": "#double-three-regexp-comments" + }, + { + "include": "#regexp-flags" + }, + { + "include": "#double-three-regexp-named-group" + }, + { + "include": "#regexp-backreference" + }, + { + "include": "#double-three-fregexp-lookahead" + }, + { + "include": "#double-three-fregexp-lookahead-negative" + }, + { + "include": "#double-three-fregexp-lookbehind" + }, + { + "include": "#double-three-fregexp-lookbehind-negative" + }, + { + "include": "#double-three-fregexp-conditional" + }, + { + "include": "#double-three-fregexp-parentheses-non-capturing" + }, + { + "include": "#double-three-fregexp-parentheses" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-fregexp-named-group": { + "name": "meta.named.regexp", + "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" + }, + "2": { + "name": "entity.name.tag.named.group.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-fregexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-fregexp-lookahead": { + "begin": "(\\()\\?=", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-fregexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-fregexp-lookahead-negative": { + "begin": "(\\()\\?!", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookahead.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookahead.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-fregexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-fregexp-lookbehind": { + "begin": "(\\()\\?<=", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-fregexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-fregexp-lookbehind-negative": { + "begin": "(\\()\\?<!", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.lookbehind.negative.regexp" + }, + "1": { + "name": "punctuation.parenthesis.lookbehind.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-fregexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-fregexp-conditional": { + "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "keyword.operator.conditional.regexp" + }, + "1": { + "name": "punctuation.parenthesis.conditional.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-fregexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-fregexp-parentheses-non-capturing": { + "begin": "\\(\\?:", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-fregexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "double-three-fregexp-parentheses": { + "begin": "\\(", + "end": "(\\)|(?=\"\"\"))", + "beginCaptures": { + "0": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" + } + }, + "endCaptures": { + "1": { + "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-fregexp-expression" + }, + { + "include": "#comments-string-double-three" + } + ] + }, + "fregexp-single-one-line": { + "name": "string.interpolated.python string.regexp.quoted.single.python", + "begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\\')", + "end": "(\\')|(?<!\\\\)(\\n)", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "storage.type.string.python" + }, + "5": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-one-fregexp-expression" + } + ] + }, + "fregexp-single-three-line": { + "name": "string.interpolated.python string.regexp.quoted.multi.python", + "begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\\'\\'\\')", + "end": "(\\'\\'\\')", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "storage.type.string.python" + }, + "5": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#single-three-fregexp-expression" + } + ] + }, + "fregexp-double-one-line": { + "name": "string.interpolated.python string.regexp.quoted.single.python", + "begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\")", + "end": "(\")|(?<!\\\\)(\\n)", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "storage.type.string.python" + }, + "5": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-one-fregexp-expression" + } + ] + }, + "fregexp-double-three-line": { + "name": "string.interpolated.python string.regexp.quoted.multi.python", + "begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\"\"\")", + "end": "(\"\"\")", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "storage.type.string.python" + }, + "5": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#double-three-fregexp-expression" + } + ] + }, + "string-raw-quoted-single-line": { + "name": "string.quoted.raw.single.python", + "begin": "\\b(([uU]R)|(R))((['\"]))", + "end": "(\\4)|((?<!\\\\)\\n)", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-single-bad-brace1-formatting-raw" + }, + { + "include": "#string-single-bad-brace2-formatting-raw" + }, + { + "include": "#string-raw-guts" + } + ] + }, + "string-bin-quoted-single-line": { + "name": "string.quoted.binary.single.python", + "begin": "(\\b[bB])((['\"]))", + "end": "(\\2)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-entity" + } + ] + }, + "string-raw-bin-quoted-single-line": { + "name": "string.quoted.raw.binary.single.python", + "begin": "(\\b(?:R[bB]|[bB]R))((['\"]))", + "end": "(\\2)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-raw-bin-guts" + } + ] + }, + "string-quoted-single-line": { + "name": "string.quoted.single.python", + "begin": "(?:\\b([rR])(?=[uU]))?([uU])?((['\"]))", + "end": "(\\3)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "invalid.illegal.prefix.python" + }, + "2": { + "name": "storage.type.string.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-single-bad-brace1-formatting-unicode" + }, + { + "include": "#string-single-bad-brace2-formatting-unicode" + }, + { + "include": "#string-unicode-guts" + } + ] + }, + "string-single-bad-brace1-formatting-unicode": { + "comment": "template using {% ... %}", + "begin": "(?x)\n (?= \\{%\n ( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n %\\}\n )\n", + "end": "(?=(['\"])|((?<!\\\\)\\n))", + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#escape-sequence" + }, + { + "include": "#string-line-continuation" + } + ] + }, + "string-single-bad-brace1-formatting-raw": { + "comment": "template using {% ... %}", + "begin": "(?x)\n (?= \\{%\n ( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n %\\}\n )\n", + "end": "(?=(['\"])|((?<!\\\\)\\n))", + "patterns": [ + { + "include": "#string-consume-escape" + } + ] + }, + "string-single-bad-brace2-formatting-unicode": { + "comment": "odd format or format-like syntax", + "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n )\n .*?(?!(['\"])|((?<!\\\\)\\n))\n \\}\n )\n", + "end": "(?=(['\"])|((?<!\\\\)\\n))", + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#string-entity" + } + ] + }, + "string-single-bad-brace2-formatting-raw": { + "comment": "odd format or format-like syntax", + "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n )\n .*?(?!(['\"])|((?<!\\\\)\\n))\n \\}\n )\n", + "end": "(?=(['\"])|((?<!\\\\)\\n))", + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#string-formatting" + } + ] + }, + "string-raw-quoted-multi-line": { + "name": "string.quoted.raw.multi.python", + "begin": "\\b(([uU]R)|(R))('''|\"\"\")", + "end": "(\\4)", + "beginCaptures": { + "2": { + "name": "invalid.deprecated.prefix.python" + }, + "3": { + "name": "storage.type.string.python" + }, + "4": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-multi-bad-brace1-formatting-raw" + }, + { + "include": "#string-multi-bad-brace2-formatting-raw" + }, + { + "include": "#string-raw-guts" + } + ] + }, + "string-bin-quoted-multi-line": { + "name": "string.quoted.binary.multi.python", + "begin": "(\\b[bB])('''|\"\"\")", + "end": "(\\2)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-entity" + } + ] + }, + "string-raw-bin-quoted-multi-line": { + "name": "string.quoted.raw.binary.multi.python", + "begin": "(\\b(?:R[bB]|[bB]R))('''|\"\"\")", + "end": "(\\2)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-raw-bin-guts" + } + ] + }, + "string-quoted-multi-line": { + "name": "string.quoted.multi.python", + "begin": "(?:\\b([rR])(?=[uU]))?([uU])?('''|\"\"\")", + "end": "(\\3)", + "beginCaptures": { + "1": { + "name": "invalid.illegal.prefix.python" + }, + "2": { + "name": "storage.type.string.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#string-multi-bad-brace1-formatting-unicode" + }, + { + "include": "#string-multi-bad-brace2-formatting-unicode" + }, + { + "include": "#string-unicode-guts" + } + ] + }, + "string-multi-bad-brace1-formatting-unicode": { + "comment": "template using {% ... %}", + "begin": "(?x)\n (?= \\{%\n ( .*? (?!'''|\"\"\") )\n %\\}\n )\n", + "end": "(?='''|\"\"\")", + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#escape-sequence" + }, + { + "include": "#string-line-continuation" + } + ] + }, + "string-multi-bad-brace1-formatting-raw": { + "comment": "template using {% ... %}", + "begin": "(?x)\n (?= \\{%\n ( .*? (?!'''|\"\"\") )\n %\\}\n )\n", + "end": "(?='''|\"\"\")", + "patterns": [ + { + "include": "#string-consume-escape" + } + ] + }, + "string-multi-bad-brace2-formatting-unicode": { + "comment": "odd format or format-like syntax", + "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n )\n .*?(?!'''|\"\"\")\n \\}\n )\n", + "end": "(?='''|\"\"\")", + "patterns": [ + { + "include": "#escape-sequence-unicode" + }, + { + "include": "#string-entity" + } + ] + }, + "string-multi-bad-brace2-formatting-raw": { + "comment": "odd format or format-like syntax", + "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n )\n .*?(?!'''|\"\"\")\n \\}\n )\n", + "end": "(?='''|\"\"\")", + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#string-formatting" + } + ] + }, + "fstring-fnorm-quoted-single-line": { + "name": "meta.fstring.python", + "begin": "(\\b[fF])([bBuU])?((['\"]))", + "end": "(\\3)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "string.interpolated.python string.quoted.single.python storage.type.string.python" + }, + "2": { + "name": "invalid.illegal.prefix.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python string.interpolated.python string.quoted.single.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-guts" + }, + { + "include": "#fstring-illegal-single-brace" + }, + { + "include": "#fstring-single-brace" + }, + { + "include": "#fstring-single-core" + } + ] + }, + "fstring-normf-quoted-single-line": { + "name": "meta.fstring.python", + "begin": "(\\b[bBuU])([fF])((['\"]))", + "end": "(\\3)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "invalid.illegal.prefix.python" + }, + "2": { + "name": "string.interpolated.python string.quoted.single.python storage.type.string.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python string.quoted.single.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-guts" + }, + { + "include": "#fstring-illegal-single-brace" + }, + { + "include": "#fstring-single-brace" + }, + { + "include": "#fstring-single-core" + } + ] + }, + "fstring-raw-quoted-single-line": { + "name": "meta.fstring.python", + "begin": "(\\b(?:[R][fF]|[fF][R]))((['\"]))", + "end": "(\\2)|((?<!\\\\)\\n)", + "beginCaptures": { + "1": { + "name": "string.interpolated.python string.quoted.raw.single.python storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python string.quoted.raw.single.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.single.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-raw-guts" + }, + { + "include": "#fstring-illegal-single-brace" + }, + { + "include": "#fstring-single-brace" + }, + { + "include": "#fstring-raw-single-core" + } + ] + }, + "fstring-single-core": { + "name": "string.interpolated.python string.quoted.single.python", + "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n))\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n" + }, + "fstring-raw-single-core": { + "name": "string.interpolated.python string.quoted.raw.single.python", + "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n))\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n" + }, + "fstring-single-brace": { + "comment": "value interpolation using { ... }", + "begin": "(\\{)", + "end": "(?x)\n (\\})|(?=\\n)\n", + "beginCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "endCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "patterns": [ + { + "include": "#fstring-terminator-single" + }, + { + "include": "#f-expression" + } + ] + }, + "fstring-terminator-single": { + "patterns": [ + { + "name": "storage.type.format.python", + "match": "(![rsa])(?=})" + }, + { + "match": "(?x)\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n", + "captures": { + "1": { + "name": "storage.type.format.python" + }, + "2": { + "name": "storage.type.format.python" + } + } + }, + { + "include": "#fstring-terminator-single-tail" + } + ] + }, + "fstring-terminator-single-tail": { + "begin": "(![rsa])?(:)(?=.*?{)", + "end": "(?=})|(?=\\n)", + "beginCaptures": { + "1": { + "name": "storage.type.format.python" + }, + "2": { + "name": "storage.type.format.python" + } + }, + "patterns": [ + { + "include": "#fstring-illegal-single-brace" + }, + { + "include": "#fstring-single-brace" + }, + { + "name": "storage.type.format.python", + "match": "([bcdeEfFgGnosxX%])(?=})" + }, + { + "name": "storage.type.format.python", + "match": "(\\.\\d+)" + }, + { + "name": "storage.type.format.python", + "match": "(,)" + }, + { + "name": "storage.type.format.python", + "match": "(\\d+)" + }, + { + "name": "storage.type.format.python", + "match": "(\\#)" + }, + { + "name": "storage.type.format.python", + "match": "([-+ ])" + }, + { + "name": "storage.type.format.python", + "match": "([<>=^])" + }, + { + "name": "storage.type.format.python", + "match": "(\\w)" + } + ] + }, + "fstring-fnorm-quoted-multi-line": { + "name": "meta.fstring.python", + "begin": "(\\b[fF])([bBuU])?('''|\"\"\")", + "end": "(\\3)", + "beginCaptures": { + "1": { + "name": "string.interpolated.python string.quoted.multi.python storage.type.string.python" + }, + "2": { + "name": "invalid.illegal.prefix.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python string.interpolated.python string.quoted.multi.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-guts" + }, + { + "include": "#fstring-illegal-multi-brace" + }, + { + "include": "#fstring-multi-brace" + }, + { + "include": "#fstring-multi-core" + } + ] + }, + "fstring-normf-quoted-multi-line": { + "name": "meta.fstring.python", + "begin": "(\\b[bBuU])([fF])('''|\"\"\")", + "end": "(\\3)", + "beginCaptures": { + "1": { + "name": "invalid.illegal.prefix.python" + }, + "2": { + "name": "string.interpolated.python string.quoted.multi.python storage.type.string.python" + }, + "3": { + "name": "punctuation.definition.string.begin.python string.quoted.multi.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-guts" + }, + { + "include": "#fstring-illegal-multi-brace" + }, + { + "include": "#fstring-multi-brace" + }, + { + "include": "#fstring-multi-core" + } + ] + }, + "fstring-raw-quoted-multi-line": { + "name": "meta.fstring.python", + "begin": "(\\b(?:[R][fF]|[fF][R]))('''|\"\"\")", + "end": "(\\2)", + "beginCaptures": { + "1": { + "name": "string.interpolated.python string.quoted.raw.multi.python storage.type.string.python" + }, + "2": { + "name": "punctuation.definition.string.begin.python string.quoted.raw.multi.python" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.multi.python" + }, + "2": { + "name": "invalid.illegal.newline.python" + } + }, + "patterns": [ + { + "include": "#fstring-raw-guts" + }, + { + "include": "#fstring-illegal-multi-brace" + }, + { + "include": "#fstring-multi-brace" + }, + { + "include": "#fstring-raw-multi-core" + } + ] + }, + "fstring-multi-core": { + "name": "string.interpolated.python string.quoted.multi.python", + "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|'''|\"\"\")\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n" + }, + "fstring-raw-multi-core": { + "name": "string.interpolated.python string.quoted.raw.multi.python", + "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|'''|\"\"\")\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n" + }, + "fstring-multi-brace": { + "comment": "value interpolation using { ... }", + "begin": "(\\{)", + "end": "(?x)\n (\\})\n", + "beginCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "endCaptures": { + "1": { + "name": "constant.character.format.placeholder.other.python" + } + }, + "patterns": [ + { + "include": "#fstring-terminator-multi" + }, + { + "include": "#f-expression" + } + ] + }, + "fstring-terminator-multi": { + "patterns": [ + { + "name": "storage.type.format.python", + "match": "(![rsa])(?=})" + }, + { + "match": "(?x)\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n", + "captures": { + "1": { + "name": "storage.type.format.python" + }, + "2": { + "name": "storage.type.format.python" + } + } + }, + { + "include": "#fstring-terminator-multi-tail" + } + ] + }, + "fstring-terminator-multi-tail": { + "begin": "(![rsa])?(:)(?=.*?{)", + "end": "(?=})", + "beginCaptures": { + "1": { + "name": "storage.type.format.python" + }, + "2": { + "name": "storage.type.format.python" + } + }, + "patterns": [ + { + "include": "#fstring-illegal-multi-brace" + }, + { + "include": "#fstring-multi-brace" + }, + { + "name": "storage.type.format.python", + "match": "([bcdeEfFgGnosxX%])(?=})" + }, + { + "name": "storage.type.format.python", + "match": "(\\.\\d+)" + }, + { + "name": "storage.type.format.python", + "match": "(,)" + }, + { + "name": "storage.type.format.python", + "match": "(\\d+)" + }, + { + "name": "storage.type.format.python", + "match": "(\\#)" + }, + { + "name": "storage.type.format.python", + "match": "([-+ ])" + }, + { + "name": "storage.type.format.python", + "match": "([<>=^])" + }, + { + "name": "storage.type.format.python", + "match": "(\\w)" + } + ] + }, + "special-variables-types": { + "patterns": [ + { + "name": "variable.language.special.log.vyper", + "match": "(?x)\n (?<!\\.) \\b(\n log )\\b\n" + }, + { + "name": "variable.language.special.msg.vyper", + "match": "(?x)\n (?<!\\.) \\b(\n msg )\\b\n" + }, + { + "name": "variable.language.special.block.vyper", + "match": "(?x)\n (?<!\\.) \\b(\n block )\\b\n" + } + ] + }, + "reserved-names-vyper": { + "name": "name.reserved.vyper", + "match": "(?x)\n \\b (finney | gwei | range | def | ____init____ | timedelta | babbage | zero_address | raise | external | empty_bytes32 | assert | continue | wei | ada | min_int256 | min_int128 | chainid | max_decimal | default | indexed | selfdestruct | lovelace | immutable | throw | kwei | max_int128 | while | constant | ___default___ | balance | twei | codesize | false | max_int256 | _default_ | init | mwei | if | ____default____ | true | payable | internal | until | this | nonpayable | pass | public | nonreentrant | blockhash | max_uint256 | shannon | none | units | _init_ | ___init___ | is_contract | for | zero_wei | min_decimal | szabo | timestamp | ether | pwei | send) \\b\n" + } + } +} diff --git a/src/lib/shiki/languages/wasm.tmLanguage.json b/src/lib/shiki/languages/wasm.tmLanguage.json new file mode 100644 index 0000000..882bdb7 --- /dev/null +++ b/src/lib/shiki/languages/wasm.tmLanguage.json @@ -0,0 +1,830 @@ +{ + "name": "wasm", + "scopeName": "source.wat", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#strings" + }, + { + "include": "#instructions" + }, + { + "include": "#types" + }, + { + "include": "#modules" + }, + { + "include": "#constants" + }, + { + "include": "#invalid" + } + ], + "repository": { + "comments": { + "patterns": [ + { + "comment": "Line comment", + "name": "comment.line.wat", + "match": "(;;).*$", + "captures": { + "1": { + "name": "punctuation.definition.comment.wat" + } + } + }, + { + "comment": "Block comment", + "name": "comment.block.wat", + "begin": "\\(;", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.wat" + } + }, + "end": ";\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.wat" + } + } + } + ] + }, + "strings": { + "comment": "String literal", + "name": "string.quoted.double.wat", + "begin": "\"", + "end": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end" + } + }, + "patterns": [ + { + "name": "constant.character.escape.wat", + "match": "\\\\(n|t|\\\\|'|\"|[0-9a-fA-F]{2})" + } + ] + }, + "instructions": { + "patterns": [ + { + "comment": "Non-trapping float-to-int conversions", + "patterns": [ + { + "comment": "Conversion instruction [nontrapping-float-to-int-conversions]", + "name": "keyword.operator.word.wat", + "match": "\\b(i32|i64)\\.trunc_sat_f(?:32|64)_[su]\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + } + ] + }, + { + "comment": "Sign-extension operators", + "patterns": [ + { + "comment": "Numeric instruction (i32) [sign-extension-ops]", + "name": "keyword.operator.word.wat", + "match": "\\b(i32)\\.(?:extend(?:8|16)_s)\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Numeric instruction (i64) [sign-extension-ops]", + "name": "keyword.operator.word.wat", + "match": "\\b(i64)\\.(?:extend(?:8|16|32)_s)\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + } + ] + }, + { + "comment": "Bulk memory operations", + "patterns": [ + { + "comment": "Memory instruction [bulk-memory-operations]", + "name": "keyword.operator.word.wat", + "match": "\\b(memory)\\.(?:copy|fill|init|drop)\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + } + ] + }, + { + "comment": "Fixed-width SIMD", + "patterns": [ + { + "comment": "Vector instruction (v128) [simd]", + "name": "keyword.operator.word.wat", + "match": "\\b(v128)\\.(?:const|and|or|xor|not|andnot|bitselect|load|store)\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Vector instruction (i8x16) [simd]", + "name": "keyword.operator.word.wat", + "match": "\\b(i8x16)\\.(?:splat|replace_lane|add|sub|mul|neg|shl|shr_[su]|eq|ne|lt_[su]|le_[su]|gt_[su]|ge_[su]|min_[su]|max_[su]|any_true|all_true|extract_lane_[su]|add_saturate_[su]|sub_saturate_[su]|avgr_u|narrow_i16x8_[su])\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Vector instruction (i16x8) [simd]", + "name": "keyword.operator.word.wat", + "match": "\\b(i16x8)\\.(?:splat|replace_lane|add|sub|mul|neg|shl|shr_[su]|eq|ne|lt_[su]|le_[su]|gt_[su]|ge_[su]|min_[su]|max_[su]|any_true|all_true|extract_lane_[su]|add_saturate_[su]|sub_saturate_[su]|avgr_u|load8x8_[su]|narrow_i32x4_[su]|widen_(low|high)_i8x16_[su])\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Vector instruction (i32x4) [simd]", + "name": "keyword.operator.word.wat", + "match": "\\b(i32x4)\\.(?:splat|replace_lane|add|sub|mul|neg|shl|shr_[su]|eq|ne|lt_[su]|le_[su]|gt_[su]|ge_[su]|min_[su]|max_[su]|any_true|all_true|extract_lane|load16x4_[su]|trunc_sat_f32x4_[su]|widen_(low|high)_i16x8_[su])\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Vector instruction (i64x2) [simd]", + "name": "keyword.operator.word.wat", + "match": "\\b(i64x2)\\.(?:splat|replace_lane|add|sub|mul|neg|shl|shr_[su]|extract_lane|load32x2_[su])\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Vector instruction (f32x4) [simd]", + "name": "keyword.operator.word.wat", + "match": "\\b(f32x4)\\.(?:splat|replace_lane|add|sub|mul|neg|extract_lane|eq|ne|lt|le|gt|ge|abs|min|max|div|sqrt|convert_i32x4_[su])\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Vector instruction (f64x2) [simd]", + "name": "keyword.operator.word.wat", + "match": "\\b(f64x2)\\.(?:splat|replace_lane|add|sub|mul|neg|extract_lane|eq|ne|lt|le|gt|ge|abs|min|max|div|sqrt)\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Vector instruction (v8x16) [simd]", + "name": "keyword.operator.word.wat", + "match": "\\b(v8x16)\\.(?:load_splat|shuffle|swizzle)\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Vector instruction (v16x8) [simd]", + "name": "keyword.operator.word.wat", + "match": "\\b(v16x8)\\.load_splat\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Vector instruction (v32x4) [simd]", + "name": "keyword.operator.word.wat", + "match": "\\b(v32x4)\\.load_splat\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Vector instruction (v64x2) [simd]", + "name": "keyword.operator.word.wat", + "match": "\\b(v64x2)\\.load_splat\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + } + ] + }, + { + "comment": "Threads", + "patterns": [ + { + "comment": "Atomic instruction (i32) [threads]", + "name": "keyword.operator.word.wat", + "match": "\\b(i32)\\.(atomic)\\.(?:load(?:8_u|16_u)?|store(?:8|16)?|wait|(rmw)\\.(?:add|sub|and|or|xor|xchg|cmpxchg)|(rmw8|rmw16)\\.(?:add_u|sub_u|and_u|or_u|xor_u|xchg_u|cmpxchg_u))\\b", + "captures": { + "1": { + "name": "support.class.wat" + }, + "2": { + "name": "support.class.wat" + }, + "3": { + "name": "support.class.wat" + }, + "4": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Atomic instruction (i64) [threads]", + "name": "keyword.operator.word.wat", + "match": "\\b(i64)\\.(atomic)\\.(?:load(?:8_u|16_u|32_u)?|store(?:8|16|32)?|wait|(rmw)\\.(?:add|sub|and|or|xor|xchg|cmpxchg)|(rmw8|rmw16|rmw32)\\.(?:add_u|sub_u|and_u|or_u|xor_u|xchg_u|cmpxchg_u))\\b", + "captures": { + "1": { + "name": "support.class.wat" + }, + "2": { + "name": "support.class.wat" + }, + "3": { + "name": "support.class.wat" + }, + "4": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Atomic instruction [threads]", + "name": "keyword.operator.word.wat", + "match": "\\b(atomic)\\.(?:notify|fence)\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Shared modifier [threads]", + "name": "storage.modifier.wat", + "match": "\\bshared\\b" + } + ] + }, + { + "comment": "Reference types", + "patterns": [ + { + "comment": "Reference instruction [reference-types]", + "name": "keyword.operator.word.wat", + "match": "\\b(ref)\\.(?:null|is_null|func|extern)\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Table instruction [reference-types]", + "name": "keyword.operator.word.wat", + "match": "\\b(table)\\.(?:get|size|grow|fill|init|copy)\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Type name [reference-types]", + "name": "entity.name.type.wat", + "match": "\\b(?:externref|funcref|nullref)\\b" + } + ] + }, + { + "comment": "Tail Call", + "patterns": [ + { + "comment": "Control instruction [tail-call]", + "name": "keyword.control.wat", + "match": "\\breturn_call(?:_indirect)?\\b" + } + ] + }, + { + "comment": "Exception handling", + "patterns": [ + { + "comment": "Control instruction [exception-handling]", + "name": "keyword.control.wat", + "match": "\\b(?:try|catch|throw|rethrow|br_on_exn)\\b" + }, + { + "comment": "Module element [exception-handling]", + "name": "storage.type.wat", + "match": "(?<=\\()event\\b" + } + ] + }, + { + "comment": "Binaryen extensions", + "patterns": [ + { + "comment": "Pseudo stack instruction [binaryen]", + "name": "keyword.operator.word.wat", + "match": "\\b(i32|i64|f32|f64|externref|funcref|nullref|exnref)\\.(?:push|pop)\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + } + ] + }, + { + "comment": "MVP", + "patterns": [ + { + "comment": "Memory instruction (i32) [mvp]", + "name": "keyword.operator.word.wat", + "match": "\\b(i32)\\.(?:load|load(?:8|16)(?:_[su])?|store(?:8|16)?)\\b", + "captures": { + "1": { + "name": "support.class.type.wat" + } + } + }, + { + "comment": "Memory instruction (i64) [mvp]", + "name": "keyword.operator.word.wat", + "match": "\\b(i64)\\.(?:load|load(?:8|16|32)(?:_[su])?|store(?:8|16|32)?)\\b", + "captures": { + "1": { + "name": "support.class.type.wat" + } + } + }, + { + "comment": "Memory instruction (f32/f64) [mvp]", + "name": "keyword.operator.word.wat", + "match": "\\b(f32|f64)\\.(?:load|store)\\b", + "captures": { + "1": { + "name": "support.class.type.wat" + } + } + }, + { + "comment": "Memory instruction [mvp]", + "name": "keyword.operator.word.wat", + "match": "\\b(memory)\\.(?:size|grow)\\b", + "captures": { + "1": { + "name": "support.class.memory.wat" + } + } + }, + { + "comment": "Memory instruction attribute [mvp]", + "match": "\\b(offset|align)=\\b", + "captures": { + "1": { + "name": "entity.other.attribute-name.wat" + } + } + }, + { + "comment": "Variable instruction (local) [mvp]", + "name": "keyword.operator.word.wat", + "match": "\\b(local)\\.(?:get|set|tee)\\b", + "captures": { + "1": { + "name": "support.class.local.wat" + } + } + }, + { + "comment": "Variable instruction (global) [mvp]", + "name": "keyword.operator.word.wat", + "match": "\\b(global)\\.(?:get|set)\\b", + "captures": { + "1": { + "name": "support.class.global.wat" + } + } + }, + { + "comment": "Numeric instruction (i32/i64) [mvp]", + "name": "keyword.operator.word.wat", + "match": "\\b(i32|i64)\\.(const|eqz|eq|ne|lt_[su]|gt_[su]|le_[su]|ge_[su]|clz|ctz|popcnt|add|sub|mul|div_[su]|rem_[su]|and|or|xor|shl|shr_[su]|rotl|rotr)\\b", + "captures": { + "1": { + "name": "support.class.type.wat" + } + } + }, + { + "comment": "Numeric instruction (f32/f64) [mvp]", + "name": "keyword.operator.word.wat", + "match": "\\b(f32|f64)\\.(const|eq|ne|lt|gt|le|ge|abs|neg|ceil|floor|trunc|nearest|sqrt|add|sub|mul|div|min|max|copysign)\\b", + "captures": { + "1": { + "name": "support.class.type.wat" + } + } + }, + { + "comment": "Conversion instruction (i32) [mvp]", + "name": "keyword.operator.word.wat", + "match": "\\b(i32)\\.(wrap_i64|trunc_(f32|f64)_[su]|reinterpret_f32)\\b", + "captures": { + "1": { + "name": "support.class.type.wat" + } + } + }, + { + "comment": "Conversion instruction (i64) [mvp]", + "name": "keyword.operator.word.wat", + "match": "\\b(i64)\\.(extend_i32_[su]|trunc_f(32|64)_[su]|reinterpret_f64)\\b", + "captures": { + "1": { + "name": "support.class.type.wat" + } + } + }, + { + "comment": "Conversion instruction (f32) [mvp]", + "name": "keyword.operator.word.wat", + "match": "\\b(f32)\\.(convert_i(32|64)_[su]|demote_f64|reinterpret_i32)\\b", + "captures": { + "1": { + "name": "support.class.type.wat" + } + } + }, + { + "comment": "Conversion instruction (f64) [mvp]", + "name": "keyword.operator.word.wat", + "match": "\\b(f64)\\.(convert_i(32|64)_[su]|promote_f32|reinterpret_i64)\\b", + "captures": { + "1": { + "name": "support.class.type.wat" + } + } + }, + { + "comment": "Control instruction [mvp]", + "name": "keyword.control.wat", + "match": "\\b(?:unreachable|nop|block|loop|if|then|else|end|br|br_if|br_table|return|call|call_indirect)\\b" + }, + { + "comment": "Parametric instruction [mvp]", + "name": "keyword.operator.word.wat", + "match": "\\b(?:drop|select)\\b" + } + ] + }, + { + "comment": "GC Instructions", + "patterns": [ + { + "comment": "Reference Instructions [GC]", + "name": "keyword.operator.word.wat", + "match": "\\b(ref)\\.(?:eq|test|cast)\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Struct Instructions [GC]", + "name": "keyword.operator.word.wat", + "match": "\\b(struct)\\.(?:new_canon|new_canon_default|get|get_s|get_u|set)\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Array Instructions [GC]", + "name": "keyword.operator.word.wat", + "match": "\\b(array)\\.(?:new_canon|new_canon_default|get|get_s|get_u|set|len|new_canon_fixed|new_canon_data|new_canon_elem)\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "i31 Instructions [GC]", + "name": "keyword.operator.word.wat", + "match": "\\b(i31)\\.(?:new|get_s|get_u)\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Branch Instructions [GC]", + "name": "keyword.operator.word.wat", + "match": "\\b(?:br_on_non_null|br_on_cast|br_on_cast_fail)\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + }, + { + "comment": "Reference Instructions [GC]", + "name": "keyword.operator.word.wat", + "match": "\\b(extern)\\.(?:internalize|externalize)\\b", + "captures": { + "1": { + "name": "support.class.wat" + } + } + } + ] + } + ] + }, + "types": { + "patterns": [ + { + "comment": "Fixed-width SIMD", + "patterns": [ + { + "comment": "Type name [simd]", + "name": "entity.name.type.wat", + "match": "\\bv128\\b(?!\\.)" + } + ] + }, + { + "comment": "Reference types", + "patterns": [ + { + "comment": "Type name [reference-types]", + "name": "entity.name.type.wat", + "match": "\\b(?:externref|funcref|nullref)\\b(?!\\.)" + } + ] + }, + { + "comment": "Exception handling", + "patterns": [ + { + "comment": "Type name [exception-handling]", + "name": "entity.name.type.wat", + "match": "\\bexnref\\b(?!\\.)" + } + ] + }, + { + "comment": "MVP", + "patterns": [ + { + "comment": "Type name [mvp]", + "name": "entity.name.type.wat", + "match": "\\b(?:i32|i64|f32|f64)\\b(?!\\.)" + } + ] + }, + { + "comment": "GC Types", + "patterns": [ + { + "comment": "Type name [GC]", + "name": "entity.name.type.wat", + "match": "\\b(?:i8|i16|ref|funcref|externref|anyref|eqref|i31ref|nullfuncref|nullexternref|structref|arrayref|nullref)\\b(?!\\.)" + } + ] + }, + { + "comment": "GC Heap Types", + "patterns": [ + { + "comment": "Type name [GC]", + "name": "entity.name.type.wat", + "match": "\\b(?:type|func|extern|any|eq|nofunc|noextern|struct|array|none)\\b(?!\\.)" + } + ] + }, + { + "comment": "GC Structured and sub Types", + "patterns": [ + { + "comment": "Type name [GC]", + "name": "entity.name.type.wat", + "match": "\\b(?:struct|array|sub|final|rec|field|mut)\\b(?!\\.)" + } + ] + } + ] + }, + "modules": { + "patterns": [ + { + "comment": "Bulk memory operations", + "patterns": [ + { + "comment": "Passive modifier [bulk-memory-operations]", + "match": "(?<=\\(data)\\s+(passive)\\b", + "captures": { + "1": { + "name": "storage.modifier.wat" + } + } + } + ] + }, + { + "comment": "MVP", + "patterns": [ + { + "comment": "Module element [mvp]", + "name": "storage.type.wat", + "match": "(?<=\\()(?:module|import|export|memory|data|table|elem|start|func|type|param|result|global|local)\\b" + }, + { + "comment": "Mutable global modifier [mvp]", + "name": "storage.modifier.wat", + "match": "(?<=\\()\\s*(mut)\\b", + "captures": { + "1": { + "name": "storage.modifier.wat" + } + } + }, + { + "comment": "Function name [mvp]", + "match": "(?<=\\(func|\\(start|call|return_call|ref\\.func)\\s+(\\$[0-9A-Za-z!#$%&'*+\\-./:<=>?@\\\\^_`|~]*)", + "captures": { + "1": { + "name": "entity.name.function.wat" + } + } + }, + { + "comment": "Function name(s) (elem) [mvp]", + "begin": "\\)\\s+(\\$[0-9A-Za-z!#$%&'*+\\-./:<=>?@\\\\^_`|~]*)", + "beginCaptures": { + "1": { + "name": "entity.name.function.wat" + } + }, + "end": "\\)", + "patterns": [ + { + "name": "entity.name.function.wat", + "match": "(?<=\\s)\\$[0-9A-Za-z!#$%&'*+\\-./:<=>?@\\\\^_`|~]*" + } + ] + }, + { + "comment": "Function type [mvp]", + "match": "(?<=\\(type)\\s+(\\$[0-9A-Za-z!#$%&'*+\\-./:<=>?@\\\\^_`|~]*)", + "captures": { + "1": { + "name": "support.type.function.wat" + } + } + }, + { + "comment": "Variable name or branch label [mvp]", + "name": "variable.other.wat", + "match": "\\$[0-9A-Za-z!#$%&'*+\\-./:<=>?@\\\\^_`|~]*\\b" + } + ] + } + ] + }, + "constants": { + "patterns": [ + { + "comment": "Fixed-width SIMD", + "patterns": [ + { + "comment": "Vector literal (i8x16) [simd]", + "name": "constant.numeric.vector.wat", + "match": "\\b(i8x16)(?:\\s+0x[0-9a-fA-F]{1,2}){16}\\b", + "captures": { + "1": { + "name": "support.type.wat" + } + } + }, + { + "comment": "Vector literal (i16x8) [simd]", + "name": "constant.numeric.vector.wat", + "match": "\\b(i16x8)(?:\\s+0x[0-9a-fA-F]{1,4}){8}\\b", + "captures": { + "1": { + "name": "support.type.wat" + } + } + }, + { + "comment": "Vector literal (i32x4) [simd]", + "name": "constant.numeric.vector.wat", + "match": "\\b(i32x4)(?:\\s+0x[0-9a-fA-F]{1,8}){4}\\b", + "captures": { + "1": { + "name": "support.type.wat" + } + } + }, + { + "comment": "Vector literal (i64x2) [simd]", + "name": "constant.numeric.vector.wat", + "match": "\\b(i64x2)(?:\\s+0x[0-9a-fA-F]{1,16}){2}\\b", + "captures": { + "1": { + "name": "support.type.wat" + } + } + } + ] + }, + { + "comment": "MVP", + "patterns": [ + { + "comment": "Floating point literal", + "name": "constant.numeric.float.wat", + "match": "[+-]?\\b[0-9][0-9]*(?:\\.[0-9][0-9]*)?(?:[eE][+-]?[0-9]+)?\\b" + }, + { + "comment": "Floating point hexadecimal literal", + "name": "constant.numeric.float.wat", + "match": "[+-]?\\b0x([0-9a-fA-F]*\\.[0-9a-fA-F]+|[0-9a-fA-F]+\\.?)[Pp][+-]?[0-9]+\\b" + }, + { + "comment": "Floating point infinity", + "name": "constant.numeric.float.wat", + "match": "[+-]?\\binf\\b" + }, + { + "comment": "Floating point literal (NaN)", + "name": "constant.numeric.float.wat", + "match": "[+-]?\\bnan:0x[0-9a-fA-F][0-9a-fA-F]*\\b" + }, + { + "comment": "Integer literal", + "name": "constant.numeric.integer.wat", + "match": "[+-]?\\b(?:0x[0-9a-fA-F][0-9a-fA-F]*|\\d[\\d]*)\\b" + } + ] + } + ] + }, + "invalid": { + "patterns": [ + { + "name": "invalid.wat", + "match": "[^\\s()]+" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/wenyan.tmLanguage.json b/src/lib/shiki/languages/wenyan.tmLanguage.json new file mode 100644 index 0000000..d2142ae --- /dev/null +++ b/src/lib/shiki/languages/wenyan.tmLanguage.json @@ -0,0 +1,129 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "scopeName": "source.wenyan", + "name": "wenyan", + "patterns": [ + { + "include": "#keywords" + }, + { + "include": "#constants" + }, + { + "include": "#operators" + }, + { + "include": "#symbols" + }, + { + "include": "#expression" + }, + { + "include": "#comment-blocks" + }, + { + "include": "#comment-lines" + } + ], + "repository": { + "expression": { + "patterns": [ + { + "include": "#variables" + } + ] + }, + "keywords": { + "patterns": [ + { + "name": "storage.type", + "match": "數|列|言|術|爻|物|元" + }, + { + "name": "keyword.control", + "match": "乃行是術曰|若其不然者|乃歸空無|欲行是術|乃止是遍|若其然者|其物如是|乃得矣|之術也|必先得|是術曰|恆為是|之物也|乃得|是謂|云云|中之|為是|乃止|若非|或若|之長|其餘" + }, + { + "name": "keyword.control", + "match": "或云|蓋謂" + }, + { + "name": "keyword.operator", + "match": "中有陽乎|中無陰乎|所餘幾何|不等於|不大於|不小於|等於|大於|小於|加|減|乘|除|變|以|於" + }, + { + "name": "keyword.other", + "match": "不知何禍歟|不復存矣|姑妄行此|如事不諧|名之曰|吾嘗觀|之禍歟|乃作罷|吾有|今有|物之|書之|以施|昔之|是矣|之書|方悟|之義|嗚呼|之禍|有|施|曰|噫|取|今|夫|中|豈" + }, + { + "name": "keyword.control", + "match": "也|凡|遍|若|者|之|充|銜" + } + ] + }, + "comment-lines": { + "name": "comment.line", + "begin": "注曰|疏曰|批曰", + "end": "$", + "patterns": [ + { + "name": "constant.character", + "match": "\\\\." + } + ] + }, + "comment-blocks": { + "name": "comment.block", + "begin": "(注曰|疏曰|批曰)。?(「「|『)", + "end": "(」」|』)", + "patterns": [ + { + "name": "constant.character", + "match": "\\\\." + } + ] + }, + "constants": { + "patterns": [ + { + "name": "constant.numeric", + "match": "負|·|又|零|〇|一|二|三|四|五|六|七|八|九|十|百|千|萬|億|兆|京|垓|秭|穰|溝|澗|正|載|極|分|釐|毫|絲|忽|微|纖|沙|塵|埃|渺|漠" + }, + { + "name": "constant.language", + "match": "其|陰|陽" + }, + { + "name": "string.quoted", + "begin": "「「|『", + "end": "」」|』", + "patterns": [ + { + "name": "constant.character", + "match": "\\\\." + } + ] + } + ] + }, + "symbols": { + "patterns": [ + { + "name": "punctuation.separator", + "match": "。|、" + } + ] + }, + "variables": { + "name": "variable.other", + "begin": "「", + "end": "」", + "patterns": [ + { + "name": "constant.character", + "match": "\\\\." + } + ] + } + } +} diff --git a/src/lib/shiki/languages/wgsl.tmLanguage.json b/src/lib/shiki/languages/wgsl.tmLanguage.json new file mode 100644 index 0000000..6297ff7 --- /dev/null +++ b/src/lib/shiki/languages/wgsl.tmLanguage.json @@ -0,0 +1,390 @@ +{ + "name": "wgsl", + "scopeName": "source.wgsl", + "patterns": [ + { + "include": "#line_comments" + }, + { + "include": "#block_comments" + }, + { + "include": "#keywords" + }, + { + "include": "#attributes" + }, + { + "include": "#functions" + }, + { + "include": "#function_calls" + }, + { + "include": "#constants" + }, + { + "include": "#types" + }, + { + "include": "#variables" + }, + { + "include": "#punctuation" + } + ], + "repository": { + "line_comments": { + "comment": "single line comment", + "name": "comment.line.double-slash.wgsl", + "match": "\\s*//.*" + }, + "block_comments": { + "patterns": [ + { + "comment": "empty block comments", + "name": "comment.block.wgsl", + "match": "/\\*\\*/" + }, + { + "comment": "block documentation comments", + "name": "comment.block.documentation.wgsl", + "begin": "/\\*\\*", + "end": "\\*/", + "patterns": [ + { + "include": "#block_comments" + } + ] + }, + { + "comment": "block comments", + "name": "comment.block.wgsl", + "begin": "/\\*(?!\\*)", + "end": "\\*/", + "patterns": [ + { + "include": "#block_comments" + } + ] + } + ] + }, + "attributes": { + "patterns": [ + { + "comment": "attribute declaration", + "name": "meta.attribute.wgsl", + "match": "(@)([A-Za-z_]+)", + "captures": { + "1": { + "name": "keyword.operator.attribute.at" + }, + "2": { + "name": "entity.name.attribute.wgsl" + } + } + } + ] + }, + "functions": { + "patterns": [ + { + "comment": "function definition", + "name": "meta.function.definition.wgsl", + "begin": "\\b(fn)\\s+([A-Za-z0-9_]+)((\\()|(<))", + "beginCaptures": { + "1": { + "name": "keyword.other.fn.wgsl" + }, + "2": { + "name": "entity.name.function.wgsl" + }, + "4": { + "name": "punctuation.brackets.round.wgsl" + } + }, + "end": "\\{", + "endCaptures": { + "0": { + "name": "punctuation.brackets.curly.wgsl" + } + }, + "patterns": [ + { + "include": "#line_comments" + }, + { + "include": "#block_comments" + }, + { + "include": "#keywords" + }, + { + "include": "#attributes" + }, + { + "include": "#function_calls" + }, + { + "include": "#constants" + }, + { + "include": "#types" + }, + { + "include": "#variables" + }, + { + "include": "#punctuation" + } + ] + } + ] + }, + "function_calls": { + "patterns": [ + { + "comment": "function/method calls", + "name": "meta.function.call.wgsl", + "begin": "([A-Za-z0-9_]+)(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.wgsl" + }, + "2": { + "name": "punctuation.brackets.round.wgsl" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.brackets.round.wgsl" + } + }, + "patterns": [ + { + "include": "#line_comments" + }, + { + "include": "#block_comments" + }, + { + "include": "#keywords" + }, + { + "include": "#attributes" + }, + { + "include": "#function_calls" + }, + { + "include": "#constants" + }, + { + "include": "#types" + }, + { + "include": "#variables" + }, + { + "include": "#punctuation" + } + ] + } + ] + }, + "constants": { + "patterns": [ + { + "comment": "decimal float literal", + "name": "constant.numeric.float.wgsl", + "match": "(-?\\b[0-9][0-9]*\\.[0-9][0-9]*)([eE][+-]?[0-9]+)?\\b" + }, + { + "comment": "int literal", + "name": "constant.numeric.decimal.wgsl", + "match": "-?\\b0x[0-9a-fA-F]+\\b|\\b0\\b|-?\\b[1-9][0-9]*\\b" + }, + { + "comment": "uint literal", + "name": "constant.numeric.decimal.wgsl", + "match": "\\b0x[0-9a-fA-F]+u\\b|\\b0u\\b|\\b[1-9][0-9]*u\\b" + }, + { + "comment": "boolean constant", + "name": "constant.language.boolean.wgsl", + "match": "\\b(true|false)\\b" + } + ] + }, + "types": { + "comment": "types", + "name": "storage.type.wgsl", + "patterns": [ + { + "comment": "scalar Types", + "name": "storage.type.wgsl", + "match": "\\b(bool|i32|u32|f32)\\b" + }, + { + "comment": "reserved scalar Types", + "name": "storage.type.wgsl", + "match": "\\b(i64|u64|f64)\\b" + }, + { + "comment": "vector type aliasses", + "name": "storage.type.wgsl", + "match": "\\b(vec2i|vec3i|vec4i|vec2u|vec3u|vec4u|vec2f|vec3f|vec4f|vec2h|vec3h|vec4h)\\b" + }, + { + "comment": "matrix type aliasses", + "name": "storage.type.wgsl", + "match": "\\b(mat2x2f|mat2x3f|mat2x4f|mat3x2f|mat3x3f|mat3x4f|mat4x2f|mat4x3f|mat4x4f|mat2x2h|mat2x3h|mat2x4h|mat3x2h|mat3x3h|mat3x4h|mat4x2h|mat4x3h|mat4x4h)\\b" + }, + { + "comment": "vector/matrix types", + "name": "storage.type.wgsl", + "match": "\\b(vec[2-4]|mat[2-4]x[2-4])\\b" + }, + { + "comment": "atomic types", + "name": "storage.type.wgsl", + "match": "\\b(atomic)\\b" + }, + { + "comment": "array types", + "name": "storage.type.wgsl", + "match": "\\b(array)\\b" + }, + { + "comment": "Custom type", + "name": "entity.name.type.wgsl", + "match": "\\b([A-Z][A-Za-z0-9]*)\\b" + } + ] + }, + "variables": { + "patterns": [ + { + "comment": "variables", + "name": "variable.other.wgsl", + "match": "\\b(?<!(?<!\\.)\\.)(?:r#(?!(crate|[Ss]elf|super)))?[a-z0-9_]+\\b" + } + ] + }, + "punctuation": { + "patterns": [ + { + "comment": "comma", + "name": "punctuation.comma.wgsl", + "match": "," + }, + { + "comment": "curly braces", + "name": "punctuation.brackets.curly.wgsl", + "match": "[{}]" + }, + { + "comment": "parentheses, round brackets", + "name": "punctuation.brackets.round.wgsl", + "match": "[()]" + }, + { + "comment": "semicolon", + "name": "punctuation.semi.wgsl", + "match": ";" + }, + { + "comment": "square brackets", + "name": "punctuation.brackets.square.wgsl", + "match": "[\\[\\]]" + }, + { + "comment": "angle brackets", + "name": "punctuation.brackets.angle.wgsl", + "match": "(?<![=-])[<>]" + } + ] + }, + "keywords": { + "patterns": [ + { + "comment": "other keywords", + "name": "keyword.control.wgsl", + "match": "\\b(bitcast|block|break|case|continue|continuing|default|discard|else|elseif|enable|fallthrough|for|function|if|loop|private|read|read_write|return|storage|switch|uniform|while|workgroup|write)\\b" + }, + { + "comment": "reserved keywords", + "name": "keyword.control.wgsl", + "match": "\\b(asm|const|do|enum|handle|mat|premerge|regardless|typedef|unless|using|vec|void)\\b" + }, + { + "comment": "storage keywords", + "name": "keyword.other.wgsl storage.type.wgsl", + "match": "\\b(let|var)\\b" + }, + { + "comment": "type keyword", + "name": "keyword.declaration.type.wgsl storage.type.wgsl", + "match": "\\b(type)\\b" + }, + { + "comment": "enum keyword", + "name": "keyword.declaration.enum.wgsl storage.type.wgsl", + "match": "\\b(enum)\\b" + }, + { + "comment": "struct keyword", + "name": "keyword.declaration.struct.wgsl storage.type.wgsl", + "match": "\\b(struct)\\b" + }, + { + "comment": "fn", + "name": "keyword.other.fn.wgsl", + "match": "\\bfn\\b" + }, + { + "comment": "logical operators", + "name": "keyword.operator.logical.wgsl", + "match": "(\\^|\\||\\|\\||&&|<<|>>|!)(?!=)" + }, + { + "comment": "logical AND, borrow references", + "name": "keyword.operator.borrow.and.wgsl", + "match": "&(?![&=])" + }, + { + "comment": "assignment operators", + "name": "keyword.operator.assignment.wgsl", + "match": "(\\+=|-=|\\*=|/=|%=|\\^=|&=|\\|=|<<=|>>=)" + }, + { + "comment": "single equal", + "name": "keyword.operator.assignment.equal.wgsl", + "match": "(?<![<>])=(?!=|>)" + }, + { + "comment": "comparison operators", + "name": "keyword.operator.comparison.wgsl", + "match": "(=(=)?(?!>)|!=|<=|(?<!=)>=)" + }, + { + "comment": "math operators", + "name": "keyword.operator.math.wgsl", + "match": "(([+%]|(\\*(?!\\w)))(?!=))|(-(?!>))|(/(?!/))" + }, + { + "comment": "dot access", + "name": "keyword.operator.access.dot.wgsl", + "match": "\\.(?!\\.)" + }, + { + "comment": "dashrocket, skinny arrow", + "name": "keyword.operator.arrow.skinny.wgsl", + "match": "->" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/wolfram.tmLanguage.json b/src/lib/shiki/languages/wolfram.tmLanguage.json new file mode 100644 index 0000000..e5d05c9 --- /dev/null +++ b/src/lib/shiki/languages/wolfram.tmLanguage.json @@ -0,0 +1,2363 @@ +{ + "name": "wolfram", + "scopeName": "source.wolfram", + "fileTypes": ["wl", "m", "wls", "wlt", "mt"], + "patterns": [ + { + "include": "#main" + } + ], + "repository": { + "main": { + "patterns": [ + { + "include": "#shebang" + }, + { + "include": "#simple-toplevel-definitions" + }, + { + "include": "#expressions" + } + ] + }, + "shebang": { + "name": "comment.line.shebang.wolfram", + "match": "\\A(#!).*(?=$)", + "captures": { + "1": { + "name": "punctuation.definition.comment.wolfram" + } + } + }, + "simple-toplevel-definitions": { + "patterns": [ + { + "match": "^\\s*(Attributes|Format|Options)\\s*(\\[)(`?(?:(?:[$[:alpha:]][$[:alnum:]]*)`)*)((?:[$[:alpha:]][$[:alnum:]]*))(\\])\\s*(:=|=(?!!|=|\\.))", + "captures": { + "1": { + "name": "support.function.builtin.wolfram" + }, + "2": { + "name": "punctuation.section.brackets.begin.wolfram" + }, + "3": { + "name": "meta.function.wolfram entity.name.Context.wolfram" + }, + "4": { + "name": "meta.function.wolfram entity.name.function.wolfram" + }, + "5": { + "name": "punctuation.section.brackets.end.wolfram" + }, + "6": { + "name": "keyword.operator.assignment.wolfram" + } + } + }, + { + "match": "^\\s*(`?(?:(?:[$[:alpha:]][$[:alnum:]]*)`)*)((?:[$[:alpha:]][$[:alnum:]]*))(?=\\s*(\\[(?>[^\\[\\]]+|\\g<-1>)*\\])\\s*(?:/;.*)?(?::=|=(?!!|=|\\.)))", + "captures": { + "1": { + "name": "meta.function.wolfram entity.name.Context.wolfram" + }, + "2": { + "name": "meta.function.wolfram entity.name.function.wolfram" + } + } + }, + { + "match": "^\\s*(`?(?:(?:[$[:alpha:]][$[:alnum:]]*)`)*)((?:[$[:alpha:]][$[:alnum:]]*))(?=\\s*(?:/;.*)?(?::=|=(?!!|=|\\.)))", + "captures": { + "1": { + "name": "meta.function.wolfram entity.name.Context.wolfram" + }, + "2": { + "name": "meta.function.wolfram entity.name.constant.wolfram" + } + } + } + ] + }, + "expressions": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#escaped_character_symbols" + }, + { + "include": "#escaped_characters" + }, + { + "include": "#out" + }, + { + "include": "#slot" + }, + { + "include": "#literals" + }, + { + "include": "#groups" + }, + { + "include": "#stringifying-operators" + }, + { + "include": "#operators" + }, + { + "include": "#pattern-operators" + }, + { + "include": "#symbols" + }, + { + "match": "(?:!|&|'|\\*|\\+|,|-|\\.|/|:|;|<|=|>|\\?|@|\\\\|\\^|\\||~)", + "name": "invalid.illegal" + } + ] + }, + "comments": { + "patterns": [ + { + "name": "comment.block", + "begin": "\\(\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.wolfram" + } + }, + "end": "\\*\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.wolfram" + } + }, + "patterns": [ + { + "include": "#comments" + } + ] + }, + { + "match": "\\*\\)", + "name": "invalid.illegal.stray-comment-end.wolfram" + } + ] + }, + "escaped_character_symbols": { + "patterns": [ + { + "match": "System`\\\\\\[(?:F(?:ormalA|ormalAlpha|ormalB|ormalBeta|ormalC|ormalCapitalA|ormalCapitalAlpha|ormalCapitalB|ormalCapitalBeta|ormalCapitalC|ormalCapitalChi|ormalCapitalD|ormalCapitalDelta|ormalCapitalDigamma|ormalCapitalE|ormalCapitalEpsilon|ormalCapitalEta|ormalCapitalF|ormalCapitalG|ormalCapitalGamma|ormalCapitalH|ormalCapitalI|ormalCapitalIota|ormalCapitalJ|ormalCapitalK|ormalCapitalKappa|ormalCapitalKoppa|ormalCapitalL|ormalCapitalLambda|ormalCapitalM|ormalCapitalMu|ormalCapitalN|ormalCapitalNu|ormalCapitalO|ormalCapitalOmega|ormalCapitalOmicron|ormalCapitalP|ormalCapitalPhi|ormalCapitalPi|ormalCapitalPsi|ormalCapitalQ|ormalCapitalR|ormalCapitalRho|ormalCapitalS|ormalCapitalSampi|ormalCapitalSigma|ormalCapitalStigma|ormalCapitalT|ormalCapitalTau|ormalCapitalTheta|ormalCapitalU|ormalCapitalUpsilon|ormalCapitalV|ormalCapitalW|ormalCapitalX|ormalCapitalXi|ormalCapitalY|ormalCapitalZ|ormalCapitalZeta|ormalChi|ormalCurlyCapitalUpsilon|ormalCurlyEpsilon|ormalCurlyKappa|ormalCurlyPhi|ormalCurlyPi|ormalCurlyRho|ormalCurlyTheta|ormalD|ormalDelta|ormalDigamma|ormalE|ormalEpsilon|ormalEta|ormalF|ormalFinalSigma|ormalG|ormalGamma|ormalH|ormalI|ormalIota|ormalJ|ormalK|ormalKappa|ormalKoppa|ormalL|ormalLambda|ormalM|ormalMu|ormalN|ormalNu|ormalO|ormalOmega|ormalOmicron|ormalP|ormalPhi|ormalPi|ormalPsi|ormalQ|ormalR|ormalRho|ormalS|ormalSampi|ormalScriptA|ormalScriptB|ormalScriptC|ormalScriptCapitalA|ormalScriptCapitalB|ormalScriptCapitalC|ormalScriptCapitalD|ormalScriptCapitalE|ormalScriptCapitalF|ormalScriptCapitalG|ormalScriptCapitalH|ormalScriptCapitalI|ormalScriptCapitalJ|ormalScriptCapitalK|ormalScriptCapitalL|ormalScriptCapitalM|ormalScriptCapitalN|ormalScriptCapitalO|ormalScriptCapitalP|ormalScriptCapitalQ|ormalScriptCapitalR|ormalScriptCapitalS|ormalScriptCapitalT|ormalScriptCapitalU|ormalScriptCapitalV|ormalScriptCapitalW|ormalScriptCapitalX|ormalScriptCapitalY|ormalScriptCapitalZ|ormalScriptD|ormalScriptE|ormalScriptF|ormalScriptG|ormalScriptH|ormalScriptI|ormalScriptJ|ormalScriptK|ormalScriptL|ormalScriptM|ormalScriptN|ormalScriptO|ormalScriptP|ormalScriptQ|ormalScriptR|ormalScriptS|ormalScriptT|ormalScriptU|ormalScriptV|ormalScriptW|ormalScriptX|ormalScriptY|ormalScriptZ|ormalSigma|ormalStigma|ormalT|ormalTau|ormalTheta|ormalU|ormalUpsilon|ormalV|ormalW|ormalX|ormalXi|ormalY|ormalZ|ormalZeta))\\](?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`\\\\\\[(?:S(?:ystemsModelDelay))\\](?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "\\\\\\[(?:F(?:ormalA|ormalAlpha|ormalB|ormalBeta|ormalC|ormalCapitalA|ormalCapitalAlpha|ormalCapitalB|ormalCapitalBeta|ormalCapitalC|ormalCapitalChi|ormalCapitalD|ormalCapitalDelta|ormalCapitalDigamma|ormalCapitalE|ormalCapitalEpsilon|ormalCapitalEta|ormalCapitalF|ormalCapitalG|ormalCapitalGamma|ormalCapitalH|ormalCapitalI|ormalCapitalIota|ormalCapitalJ|ormalCapitalK|ormalCapitalKappa|ormalCapitalKoppa|ormalCapitalL|ormalCapitalLambda|ormalCapitalM|ormalCapitalMu|ormalCapitalN|ormalCapitalNu|ormalCapitalO|ormalCapitalOmega|ormalCapitalOmicron|ormalCapitalP|ormalCapitalPhi|ormalCapitalPi|ormalCapitalPsi|ormalCapitalQ|ormalCapitalR|ormalCapitalRho|ormalCapitalS|ormalCapitalSampi|ormalCapitalSigma|ormalCapitalStigma|ormalCapitalT|ormalCapitalTau|ormalCapitalTheta|ormalCapitalU|ormalCapitalUpsilon|ormalCapitalV|ormalCapitalW|ormalCapitalX|ormalCapitalXi|ormalCapitalY|ormalCapitalZ|ormalCapitalZeta|ormalChi|ormalCurlyCapitalUpsilon|ormalCurlyEpsilon|ormalCurlyKappa|ormalCurlyPhi|ormalCurlyPi|ormalCurlyRho|ormalCurlyTheta|ormalD|ormalDelta|ormalDigamma|ormalE|ormalEpsilon|ormalEta|ormalF|ormalFinalSigma|ormalG|ormalGamma|ormalH|ormalI|ormalIota|ormalJ|ormalK|ormalKappa|ormalKoppa|ormalL|ormalLambda|ormalM|ormalMu|ormalN|ormalNu|ormalO|ormalOmega|ormalOmicron|ormalP|ormalPhi|ormalPi|ormalPsi|ormalQ|ormalR|ormalRho|ormalS|ormalSampi|ormalScriptA|ormalScriptB|ormalScriptC|ormalScriptCapitalA|ormalScriptCapitalB|ormalScriptCapitalC|ormalScriptCapitalD|ormalScriptCapitalE|ormalScriptCapitalF|ormalScriptCapitalG|ormalScriptCapitalH|ormalScriptCapitalI|ormalScriptCapitalJ|ormalScriptCapitalK|ormalScriptCapitalL|ormalScriptCapitalM|ormalScriptCapitalN|ormalScriptCapitalO|ormalScriptCapitalP|ormalScriptCapitalQ|ormalScriptCapitalR|ormalScriptCapitalS|ormalScriptCapitalT|ormalScriptCapitalU|ormalScriptCapitalV|ormalScriptCapitalW|ormalScriptCapitalX|ormalScriptCapitalY|ormalScriptCapitalZ|ormalScriptD|ormalScriptE|ormalScriptF|ormalScriptG|ormalScriptH|ormalScriptI|ormalScriptJ|ormalScriptK|ormalScriptL|ormalScriptM|ormalScriptN|ormalScriptO|ormalScriptP|ormalScriptQ|ormalScriptR|ormalScriptS|ormalScriptT|ormalScriptU|ormalScriptV|ormalScriptW|ormalScriptX|ormalScriptY|ormalScriptZ|ormalSigma|ormalStigma|ormalT|ormalTau|ormalTheta|ormalU|ormalUpsilon|ormalV|ormalW|ormalX|ormalXi|ormalY|ormalZ|ormalZeta))\\](?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "\\\\\\[(?:S(?:ystemsModelDelay))\\](?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "\\\\\\[(?:D(?:egree))\\](?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "\\\\\\[(?:E(?:xponentialE))\\](?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "\\\\\\[(?:I(?:maginaryI|maginaryJ|nfinity))\\](?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "\\\\\\[(?:P(?:i))\\](?![`$[:alnum:]])", + "name": "constant.language.wolfram" + } + ] + }, + "escaped_characters": { + "patterns": [ + { + "match": "\\\\[!%&()*+/@^_` ]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:A(?:kuz|ndy))\\]", + "name": "donothighlight.constant.character.escape.undocumented" + }, + { + "match": "\\\\\\[(?:C(?:ontinuedFractionK|url))\\]", + "name": "donothighlight.constant.character.escape.undocumented" + }, + { + "match": "\\\\\\[(?:D(?:ivergence|ivisionSlash))\\]", + "name": "donothighlight.constant.character.escape.undocumented" + }, + { + "match": "\\\\\\[(?:E(?:xpectationE))\\]", + "name": "donothighlight.constant.character.escape.undocumented" + }, + { + "match": "\\\\\\[(?:F(?:reeformPrompt))\\]", + "name": "donothighlight.constant.character.escape.undocumented" + }, + { + "match": "\\\\\\[(?:G(?:radient))\\]", + "name": "donothighlight.constant.character.escape.undocumented" + }, + { + "match": "\\\\\\[(?:L(?:aplacian))\\]", + "name": "donothighlight.constant.character.escape.undocumented" + }, + { + "match": "\\\\\\[(?:M(?:inus|oon))\\]", + "name": "donothighlight.constant.character.escape.undocumented" + }, + { + "match": "\\\\\\[(?:N(?:umberComma))\\]", + "name": "donothighlight.constant.character.escape.undocumented" + }, + { + "match": "\\\\\\[(?:P(?:ageBreakAbove|ageBreakBelow|robabilityPr))\\]", + "name": "donothighlight.constant.character.escape.undocumented" + }, + { + "match": "\\\\\\[(?:S(?:pooky|tepperDown|tepperLeft|tepperRight|tepperUp|un))\\]", + "name": "donothighlight.constant.character.escape.undocumented" + }, + { + "match": "\\\\\\[(?:U(?:nknownGlyph))\\]", + "name": "donothighlight.constant.character.escape.undocumented" + }, + { + "match": "\\\\\\[(?:V(?:illa))\\]", + "name": "donothighlight.constant.character.escape.undocumented" + }, + { + "match": "\\\\\\[(?:W(?:olframAlphaPrompt))\\]", + "name": "donothighlight.constant.character.escape.undocumented" + }, + { + "match": "\\\\\\[(?:C(?:OMPATIBILITYKanjiSpace|OMPATIBILITYNoBreak))\\]", + "name": "invalid.illegal.unsupported" + }, + { + "match": "\\\\\\[(?:I(?:nlinePart))\\]", + "name": "invalid.illegal.unsupported" + }, + { + "match": "\\\\\\[(?:A(?:Acute|Bar|Cup|DoubleDot|E|Grave|Hat|Ring|Tilde|leph|liasDelimiter|liasIndicator|lignmentMarker|lpha|ltKey|nd|ngle|ngstrom|pplication|quariusSign|riesSign|scendingEllipsis|utoLeftMatch|utoOperand|utoPlaceholder|utoRightMatch|utoSpace))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:B(?:ackslash|eamedEighthNote|eamedSixteenthNote|ecause|et|eta|lackBishop|lackKing|lackKnight|lackPawn|lackQueen|lackRook|reve|ullet))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:C(?:Acute|Cedilla|Hacek|ancerSign|ap|apitalAAcute|apitalABar|apitalACup|apitalADoubleDot|apitalAE|apitalAGrave|apitalAHat|apitalARing|apitalATilde|apitalAlpha|apitalBeta|apitalCAcute|apitalCCedilla|apitalCHacek|apitalChi|apitalDHacek|apitalDelta|apitalDifferentialD|apitalDigamma|apitalEAcute|apitalEBar|apitalECup|apitalEDoubleDot|apitalEGrave|apitalEHacek|apitalEHat|apitalEpsilon|apitalEta|apitalEth|apitalGamma|apitalIAcute|apitalICup|apitalIDoubleDot|apitalIGrave|apitalIHat|apitalIota|apitalKappa|apitalKoppa|apitalLSlash|apitalLambda|apitalMu|apitalNHacek|apitalNTilde|apitalNu|apitalOAcute|apitalODoubleAcute|apitalODoubleDot|apitalOE|apitalOGrave|apitalOHat|apitalOSlash|apitalOTilde|apitalOmega|apitalOmicron|apitalPhi|apitalPi|apitalPsi|apitalRHacek|apitalRho|apitalSHacek|apitalSampi|apitalSigma|apitalStigma|apitalTHacek|apitalTau|apitalTheta|apitalThorn|apitalUAcute|apitalUDoubleAcute|apitalUDoubleDot|apitalUGrave|apitalUHat|apitalURing|apitalUpsilon|apitalXi|apitalYAcute|apitalZHacek|apitalZeta|apricornSign|edilla|ent|enterDot|enterEllipsis|heckedBox|heckmark|heckmarkedBox|hi|ircleDot|ircleMinus|irclePlus|ircleTimes|lockwiseContourIntegral|loseCurlyDoubleQuote|loseCurlyQuote|loverLeaf|lubSuit|olon|ommandKey|onditioned|ongruent|onjugate|onjugateTranspose|onstantC|ontinuation|ontourIntegral|ontrolKey|oproduct|opyright|ounterClockwiseContourIntegral|ross|ubeRoot|up|upCap|urlyCapitalUpsilon|urlyEpsilon|urlyKappa|urlyPhi|urlyPi|urlyRho|urlyTheta|urrency))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:D(?:Hacek|agger|alet|ash|egree|el|eleteKey|elta|escendingEllipsis|iameter|iamond|iamondSuit|ifferenceDelta|ifferentialD|igamma|irectedEdge|iscreteRatio|iscreteShift|iscretionaryHyphen|iscretionaryLineSeparator|iscretionaryPageBreakAbove|iscretionaryPageBreakBelow|iscretionaryParagraphSeparator|istributed|ivide|ivides|otEqual|otlessI|otlessJ|ottedSquare|oubleContourIntegral|oubleDagger|oubleDot|oubleDownArrow|oubleLeftArrow|oubleLeftRightArrow|oubleLeftTee|oubleLongLeftArrow|oubleLongLeftRightArrow|oubleLongRightArrow|oublePrime|oubleRightArrow|oubleRightTee|oubleStruckA|oubleStruckB|oubleStruckC|oubleStruckCapitalA|oubleStruckCapitalB|oubleStruckCapitalC|oubleStruckCapitalD|oubleStruckCapitalE|oubleStruckCapitalF|oubleStruckCapitalG|oubleStruckCapitalH|oubleStruckCapitalI|oubleStruckCapitalJ|oubleStruckCapitalK|oubleStruckCapitalL|oubleStruckCapitalM|oubleStruckCapitalN|oubleStruckCapitalO|oubleStruckCapitalP|oubleStruckCapitalQ|oubleStruckCapitalR|oubleStruckCapitalS|oubleStruckCapitalT|oubleStruckCapitalU|oubleStruckCapitalV|oubleStruckCapitalW|oubleStruckCapitalX|oubleStruckCapitalY|oubleStruckCapitalZ|oubleStruckD|oubleStruckE|oubleStruckEight|oubleStruckF|oubleStruckFive|oubleStruckFour|oubleStruckG|oubleStruckH|oubleStruckI|oubleStruckJ|oubleStruckK|oubleStruckL|oubleStruckM|oubleStruckN|oubleStruckNine|oubleStruckO|oubleStruckOne|oubleStruckP|oubleStruckQ|oubleStruckR|oubleStruckS|oubleStruckSeven|oubleStruckSix|oubleStruckT|oubleStruckThree|oubleStruckTwo|oubleStruckU|oubleStruckV|oubleStruckW|oubleStruckX|oubleStruckY|oubleStruckZ|oubleStruckZero|oubleUpArrow|oubleUpDownArrow|oubleVerticalBar|oubledGamma|oubledPi|ownArrow|ownArrowBar|ownArrowUpArrow|ownBreve|ownExclamation|ownLeftRightVector|ownLeftTeeVector|ownLeftVector|ownLeftVectorBar|ownPointer|ownQuestion|ownRightTeeVector|ownRightVector|ownRightVectorBar|ownTee|ownTeeArrow))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:E(?:Acute|Bar|Cup|DoubleDot|Grave|Hacek|Hat|arth|ighthNote|lement|llipsis|mptyCircle|mptyDiamond|mptyDownTriangle|mptyRectangle|mptySet|mptySmallCircle|mptySmallSquare|mptySquare|mptyUpTriangle|mptyVerySmallSquare|nterKey|ntityEnd|ntityStart|psilon|qual|qualTilde|quilibrium|quivalent|rrorIndicator|scapeKey|ta|th|uro|xists|xponentialE))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:F(?:iLigature|illedCircle|illedDiamond|illedDownTriangle|illedLeftTriangle|illedRectangle|illedRightTriangle|illedSmallCircle|illedSmallSquare|illedSquare|illedUpTriangle|illedVerySmallSquare|inalSigma|irstPage|ivePointedStar|lLigature|lat|lorin|orAll|ormalA|ormalAlpha|ormalB|ormalBeta|ormalC|ormalCapitalA|ormalCapitalAlpha|ormalCapitalB|ormalCapitalBeta|ormalCapitalC|ormalCapitalChi|ormalCapitalD|ormalCapitalDelta|ormalCapitalDigamma|ormalCapitalE|ormalCapitalEpsilon|ormalCapitalEta|ormalCapitalF|ormalCapitalG|ormalCapitalGamma|ormalCapitalH|ormalCapitalI|ormalCapitalIota|ormalCapitalJ|ormalCapitalK|ormalCapitalKappa|ormalCapitalKoppa|ormalCapitalL|ormalCapitalLambda|ormalCapitalM|ormalCapitalMu|ormalCapitalN|ormalCapitalNu|ormalCapitalO|ormalCapitalOmega|ormalCapitalOmicron|ormalCapitalP|ormalCapitalPhi|ormalCapitalPi|ormalCapitalPsi|ormalCapitalQ|ormalCapitalR|ormalCapitalRho|ormalCapitalS|ormalCapitalSampi|ormalCapitalSigma|ormalCapitalStigma|ormalCapitalT|ormalCapitalTau|ormalCapitalTheta|ormalCapitalU|ormalCapitalUpsilon|ormalCapitalV|ormalCapitalW|ormalCapitalX|ormalCapitalXi|ormalCapitalY|ormalCapitalZ|ormalCapitalZeta|ormalChi|ormalCurlyCapitalUpsilon|ormalCurlyEpsilon|ormalCurlyKappa|ormalCurlyPhi|ormalCurlyPi|ormalCurlyRho|ormalCurlyTheta|ormalD|ormalDelta|ormalDigamma|ormalE|ormalEpsilon|ormalEta|ormalF|ormalFinalSigma|ormalG|ormalGamma|ormalH|ormalI|ormalIota|ormalJ|ormalK|ormalKappa|ormalKoppa|ormalL|ormalLambda|ormalM|ormalMu|ormalN|ormalNu|ormalO|ormalOmega|ormalOmicron|ormalP|ormalPhi|ormalPi|ormalPsi|ormalQ|ormalR|ormalRho|ormalS|ormalSampi|ormalScriptA|ormalScriptB|ormalScriptC|ormalScriptCapitalA|ormalScriptCapitalB|ormalScriptCapitalC|ormalScriptCapitalD|ormalScriptCapitalE|ormalScriptCapitalF|ormalScriptCapitalG|ormalScriptCapitalH|ormalScriptCapitalI|ormalScriptCapitalJ|ormalScriptCapitalK|ormalScriptCapitalL|ormalScriptCapitalM|ormalScriptCapitalN|ormalScriptCapitalO|ormalScriptCapitalP|ormalScriptCapitalQ|ormalScriptCapitalR|ormalScriptCapitalS|ormalScriptCapitalT|ormalScriptCapitalU|ormalScriptCapitalV|ormalScriptCapitalW|ormalScriptCapitalX|ormalScriptCapitalY|ormalScriptCapitalZ|ormalScriptD|ormalScriptE|ormalScriptF|ormalScriptG|ormalScriptH|ormalScriptI|ormalScriptJ|ormalScriptK|ormalScriptL|ormalScriptM|ormalScriptN|ormalScriptO|ormalScriptP|ormalScriptQ|ormalScriptR|ormalScriptS|ormalScriptT|ormalScriptU|ormalScriptV|ormalScriptW|ormalScriptX|ormalScriptY|ormalScriptZ|ormalSigma|ormalStigma|ormalT|ormalTau|ormalTheta|ormalU|ormalUpsilon|ormalV|ormalW|ormalX|ormalXi|ormalY|ormalZ|ormalZeta|reakedSmiley|unction))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:G(?:amma|eminiSign|imel|othicA|othicB|othicC|othicCapitalA|othicCapitalB|othicCapitalC|othicCapitalD|othicCapitalE|othicCapitalF|othicCapitalG|othicCapitalH|othicCapitalI|othicCapitalJ|othicCapitalK|othicCapitalL|othicCapitalM|othicCapitalN|othicCapitalO|othicCapitalP|othicCapitalQ|othicCapitalR|othicCapitalS|othicCapitalT|othicCapitalU|othicCapitalV|othicCapitalW|othicCapitalX|othicCapitalY|othicCapitalZ|othicD|othicE|othicEight|othicF|othicFive|othicFour|othicG|othicH|othicI|othicJ|othicK|othicL|othicM|othicN|othicNine|othicO|othicOne|othicP|othicQ|othicR|othicS|othicSeven|othicSix|othicT|othicThree|othicTwo|othicU|othicV|othicW|othicX|othicY|othicZ|othicZero|rayCircle|raySquare|reaterEqual|reaterEqualLess|reaterFullEqual|reaterGreater|reaterLess|reaterSlantEqual|reaterTilde))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:H(?:Bar|acek|appySmiley|eartSuit|ermitianConjugate|orizontalLine|umpDownHump|umpEqual|yphen))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:I(?:Acute|Cup|DoubleDot|Grave|Hat|maginaryI|maginaryJ|mplicitPlus|mplies|ndentingNewLine|nfinity|ntegral|ntersection|nvisibleApplication|nvisibleComma|nvisiblePostfixScriptBase|nvisiblePrefixScriptBase|nvisibleSpace|nvisibleTimes|ota))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:J(?:upiter))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:K(?:appa|ernelIcon|eyBar|oppa))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:L(?:Slash|ambda|astPage|eftAngleBracket|eftArrow|eftArrowBar|eftArrowRightArrow|eftAssociation|eftBracketingBar|eftCeiling|eftDoubleBracket|eftDoubleBracketingBar|eftDownTeeVector|eftDownVector|eftDownVectorBar|eftFloor|eftGuillemet|eftModified|eftPointer|eftRightArrow|eftRightVector|eftSkeleton|eftTee|eftTeeArrow|eftTeeVector|eftTriangle|eftTriangleBar|eftTriangleEqual|eftUpDownVector|eftUpTeeVector|eftUpVector|eftUpVectorBar|eftVector|eftVectorBar|eoSign|essEqual|essEqualGreater|essFullEqual|essGreater|essLess|essSlantEqual|essTilde|etterSpace|ibraSign|ightBulb|imit|ineSeparator|ongDash|ongEqual|ongLeftArrow|ongLeftRightArrow|ongRightArrow|owerLeftArrow|owerRightArrow))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:M(?:ars|athematicaIcon|axLimit|easuredAngle|ediumSpace|ercury|ho|icro|inLimit|inusPlus|od1Key|od2Key|u))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:N(?:Hacek|Tilde|and|atural|egativeMediumSpace|egativeThickSpace|egativeThinSpace|egativeVeryThinSpace|eptune|estedGreaterGreater|estedLessLess|eutralSmiley|ewLine|oBreak|onBreakingSpace|or|ot|otCongruent|otCupCap|otDoubleVerticalBar|otElement|otEqual|otEqualTilde|otExists|otGreater|otGreaterEqual|otGreaterFullEqual|otGreaterGreater|otGreaterLess|otGreaterSlantEqual|otGreaterTilde|otHumpDownHump|otHumpEqual|otLeftTriangle|otLeftTriangleBar|otLeftTriangleEqual|otLess|otLessEqual|otLessFullEqual|otLessGreater|otLessLess|otLessSlantEqual|otLessTilde|otNestedGreaterGreater|otNestedLessLess|otPrecedes|otPrecedesEqual|otPrecedesSlantEqual|otPrecedesTilde|otReverseElement|otRightTriangle|otRightTriangleBar|otRightTriangleEqual|otSquareSubset|otSquareSubsetEqual|otSquareSuperset|otSquareSupersetEqual|otSubset|otSubsetEqual|otSucceeds|otSucceedsEqual|otSucceedsSlantEqual|otSucceedsTilde|otSuperset|otSupersetEqual|otTilde|otTildeEqual|otTildeFullEqual|otTildeTilde|otVerticalBar|u|ull|umberSign))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:O(?:Acute|DoubleAcute|DoubleDot|E|Grave|Hat|Slash|Tilde|mega|micron|penCurlyDoubleQuote|penCurlyQuote|ptionKey|r|verBrace|verBracket|verParenthesis))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:P(?:aragraph|aragraphSeparator|artialD|ermutationProduct|erpendicular|hi|i|iecewise|iscesSign|laceholder|lusMinus|luto|recedes|recedesEqual|recedesSlantEqual|recedesTilde|rime|roduct|roportion|roportional|si))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:Q(?:uarterNote))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:R(?:Hacek|awAmpersand|awAt|awBackquote|awBackslash|awColon|awComma|awDash|awDollar|awDot|awDoubleQuote|awEqual|awEscape|awExclamation|awGreater|awLeftBrace|awLeftBracket|awLeftParenthesis|awLess|awNumberSign|awPercent|awPlus|awQuestion|awQuote|awReturn|awRightBrace|awRightBracket|awRightParenthesis|awSemicolon|awSlash|awSpace|awStar|awTab|awTilde|awUnderscore|awVerticalBar|awWedge|egisteredTrademark|eturnIndicator|eturnKey|everseDoublePrime|everseElement|everseEquilibrium|eversePrime|everseUpEquilibrium|ho|ightAngle|ightAngleBracket|ightArrow|ightArrowBar|ightArrowLeftArrow|ightAssociation|ightBracketingBar|ightCeiling|ightDoubleBracket|ightDoubleBracketingBar|ightDownTeeVector|ightDownVector|ightDownVectorBar|ightFloor|ightGuillemet|ightModified|ightPointer|ightSkeleton|ightTee|ightTeeArrow|ightTeeVector|ightTriangle|ightTriangleBar|ightTriangleEqual|ightUpDownVector|ightUpTeeVector|ightUpVector|ightUpVectorBar|ightVector|ightVectorBar|oundImplies|oundSpaceIndicator|ule|uleDelayed|upee))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:S(?:Hacek|Z|adSmiley|agittariusSign|ampi|aturn|corpioSign|criptA|criptB|criptC|criptCapitalA|criptCapitalB|criptCapitalC|criptCapitalD|criptCapitalE|criptCapitalF|criptCapitalG|criptCapitalH|criptCapitalI|criptCapitalJ|criptCapitalK|criptCapitalL|criptCapitalM|criptCapitalN|criptCapitalO|criptCapitalP|criptCapitalQ|criptCapitalR|criptCapitalS|criptCapitalT|criptCapitalU|criptCapitalV|criptCapitalW|criptCapitalX|criptCapitalY|criptCapitalZ|criptD|criptDotlessI|criptDotlessJ|criptE|criptEight|criptF|criptFive|criptFour|criptG|criptH|criptI|criptJ|criptK|criptL|criptM|criptN|criptNine|criptO|criptOne|criptP|criptQ|criptR|criptS|criptSeven|criptSix|criptT|criptThree|criptTwo|criptU|criptV|criptW|criptX|criptY|criptZ|criptZero|ection|electionPlaceholder|hah|harp|hiftKey|hortDownArrow|hortLeftArrow|hortRightArrow|hortUpArrow|igma|ixPointedStar|keletonIndicator|mallCircle|paceIndicator|paceKey|padeSuit|panFromAbove|panFromBoth|panFromLeft|phericalAngle|qrt|quare|quareIntersection|quareSubset|quareSubsetEqual|quareSuperset|quareSupersetEqual|quareUnion|tar|terling|tigma|ubset|ubsetEqual|ucceeds|ucceedsEqual|ucceedsSlantEqual|ucceedsTilde|uchThat|um|uperset|upersetEqual|ystemEnterKey|ystemsModelDelay))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:T(?:Hacek|abKey|au|aurusSign|ensorProduct|ensorWedge|herefore|heta|hickSpace|hinSpace|horn|ilde|ildeEqual|ildeFullEqual|ildeTilde|imes|rademark|ranspose|ripleDot|woWayRule))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:U(?:Acute|DoubleAcute|DoubleDot|Grave|Hat|Ring|nderBrace|nderBracket|nderParenthesis|ndirectedEdge|nion|nionPlus|pArrow|pArrowBar|pArrowDownArrow|pDownArrow|pEquilibrium|pPointer|pTee|pTeeArrow|pperLeftArrow|pperRightArrow|psilon|ranus))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:V(?:ectorGreater|ectorGreaterEqual|ectorLess|ectorLessEqual|ee|enus|erticalBar|erticalEllipsis|erticalLine|erticalSeparator|erticalTilde|eryThinSpace|irgoSign))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:W(?:arningSign|atchIcon|edge|eierstrassP|hiteBishop|hiteKing|hiteKnight|hitePawn|hiteQueen|hiteRook|olf|olframLanguageLogo|olframLanguageLogoCircle))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:X(?:i|nor|or))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:Y(?:Acute|DoubleDot|en))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:Z(?:Hacek|eta))\\]", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\[(?:[$[:alpha:]][$[:alnum:]]*)?\\]?", + "name": "invalid.illegal.BadLongName" + }, + { + "match": "\\\\(?:[$[:alpha:]][$[:alnum:]]*)\\]", + "name": "invalid.illegal.BadLongName" + }, + { + "match": "\\\\:\\h{4}", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\:\\h{1,3}", + "name": "invalid.illegal" + }, + { + "match": "\\\\\\.\\h{2}", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\.\\h{1}", + "name": "invalid.illegal" + }, + { + "match": "\\\\\\|0\\h{5}", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\|10\\h{4}", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\\\|\\h{1,6}", + "name": "invalid.illegal" + }, + { + "match": "\\\\[0-7]{3}", + "name": "donothighlight.constant.character.escape" + }, + { + "match": "\\\\[0-7]{1,2}", + "name": "invalid.illegal" + }, + { + "match": "\\\\$", + "name": "donothighlight.constant.character.escape punctuation.separator.continuation" + }, + { + "match": "\\\\.", + "name": "invalid.illegal" + } + ] + }, + "string_escaped_characters": { + "patterns": [ + { + "match": "\\\\[bfnrt\\\"\\\\<>]", + "name": "donothighlight.constant.character.escape" + }, + { + "include": "#escaped_characters" + } + ] + }, + "literals": { + "patterns": [ + { + "include": "#numbers" + }, + { + "include": "#strings" + } + ] + }, + "numbers": { + "patterns": [ + { + "match": "2\\^\\^(?:(?:0|1)+(?:\\.(?!\\.)(?:0|1)*)?+|\\.(?!\\.)(?:0|1)+)(?:``(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)))(?:\\*\\^(?:-|\\+)?+\\d+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "2\\^\\^(?:(?:0|1)+(?:\\.(?!\\.)(?:0|1)*)?+|\\.(?!\\.)(?:0|1)+)(?:``(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)))\\*\\^", + "name": "invalid.illegal" + }, + { + "match": "2\\^\\^(?:(?:0|1)+(?:\\.(?!\\.)(?:0|1)*)?+|\\.(?!\\.)(?:0|1)+)(?:``(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)))", + "name": "constant.numeric.wolfram" + }, + { + "match": "2\\^\\^(?:(?:0|1)+(?:\\.(?!\\.)(?:0|1)*)?+|\\.(?!\\.)(?:0|1)+)``", + "name": "invalid.illegal" + }, + { + "match": "2\\^\\^(?:(?:0|1)+(?:\\.(?!\\.)(?:0|1)*)?+|\\.(?!\\.)(?:0|1)+)(?:`(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+))?+)(?:\\*\\^(?:-|\\+)?+\\d+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "2\\^\\^(?:(?:0|1)+(?:\\.(?!\\.)(?:0|1)*)?+|\\.(?!\\.)(?:0|1)+)(?:`(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+))?+)\\*\\^", + "name": "invalid.illegal" + }, + { + "match": "2\\^\\^(?:(?:0|1)+(?:\\.(?!\\.)(?:0|1)*)?+|\\.(?!\\.)(?:0|1)+)(?:`(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+))?+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "2\\^\\^(?:(?:0|1)+(?:\\.(?!\\.)(?:0|1)*)?+|\\.(?!\\.)(?:0|1)+)(?:\\*\\^(?:-|\\+)?+\\d+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "2\\^\\^(?:(?:0|1)+(?:\\.(?!\\.)(?:0|1)*)?+|\\.(?!\\.)(?:0|1)+)\\*\\^", + "name": "invalid.illegal" + }, + { + "match": "2\\^\\^(?:(?:0|1)+(?:\\.(?!\\.)(?:0|1)*)?+|\\.(?!\\.)(?:0|1)+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "2\\^\\^", + "name": "invalid.illegal" + }, + { + "match": "8\\^\\^(?:(?:0|1|2|3|4|5|6|7)+(?:\\.(?!\\.)(?:0|1|2|3|4|5|6|7)*)?+|\\.(?!\\.)(?:0|1|2|3|4|5|6|7)+)(?:``(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)))(?:\\*\\^(?:-|\\+)?+\\d+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "8\\^\\^(?:(?:0|1|2|3|4|5|6|7)+(?:\\.(?!\\.)(?:0|1|2|3|4|5|6|7)*)?+|\\.(?!\\.)(?:0|1|2|3|4|5|6|7)+)(?:``(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)))\\*\\^", + "name": "invalid.illegal" + }, + { + "match": "8\\^\\^(?:(?:0|1|2|3|4|5|6|7)+(?:\\.(?!\\.)(?:0|1|2|3|4|5|6|7)*)?+|\\.(?!\\.)(?:0|1|2|3|4|5|6|7)+)(?:``(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)))", + "name": "constant.numeric.wolfram" + }, + { + "match": "8\\^\\^(?:(?:0|1|2|3|4|5|6|7)+(?:\\.(?!\\.)(?:0|1|2|3|4|5|6|7)*)?+|\\.(?!\\.)(?:0|1|2|3|4|5|6|7)+)``", + "name": "invalid.illegal" + }, + { + "match": "8\\^\\^(?:(?:0|1|2|3|4|5|6|7)+(?:\\.(?!\\.)(?:0|1|2|3|4|5|6|7)*)?+|\\.(?!\\.)(?:0|1|2|3|4|5|6|7)+)(?:`(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+))?+)(?:\\*\\^(?:-|\\+)?+\\d+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "8\\^\\^(?:(?:0|1|2|3|4|5|6|7)+(?:\\.(?!\\.)(?:0|1|2|3|4|5|6|7)*)?+|\\.(?!\\.)(?:0|1|2|3|4|5|6|7)+)(?:`(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+))?+)\\*\\^", + "name": "invalid.illegal" + }, + { + "match": "8\\^\\^(?:(?:0|1|2|3|4|5|6|7)+(?:\\.(?!\\.)(?:0|1|2|3|4|5|6|7)*)?+|\\.(?!\\.)(?:0|1|2|3|4|5|6|7)+)(?:`(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+))?+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "8\\^\\^(?:(?:0|1|2|3|4|5|6|7)+(?:\\.(?!\\.)(?:0|1|2|3|4|5|6|7)*)?+|\\.(?!\\.)(?:0|1|2|3|4|5|6|7)+)(?:\\*\\^(?:-|\\+)?+\\d+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "8\\^\\^(?:(?:0|1|2|3|4|5|6|7)+(?:\\.(?!\\.)(?:0|1|2|3|4|5|6|7)*)?+|\\.(?!\\.)(?:0|1|2|3|4|5|6|7)+)\\*\\^", + "name": "invalid.illegal" + }, + { + "match": "8\\^\\^(?:(?:0|1|2|3|4|5|6|7)+(?:\\.(?!\\.)(?:0|1|2|3|4|5|6|7)*)?+|\\.(?!\\.)(?:0|1|2|3|4|5|6|7)+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "8\\^\\^", + "name": "invalid.illegal" + }, + { + "match": "16\\^\\^(?:\\h+(?:\\.(?!\\.)\\h*)?+|\\.(?!\\.)\\h+)(?:``(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)))(?:\\*\\^(?:-|\\+)?+\\d+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "16\\^\\^(?:\\h+(?:\\.(?!\\.)\\h*)?+|\\.(?!\\.)\\h+)(?:``(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)))\\*\\^", + "name": "invalid.illegal" + }, + { + "match": "16\\^\\^(?:\\h+(?:\\.(?!\\.)\\h*)?+|\\.(?!\\.)\\h+)(?:``(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)))", + "name": "constant.numeric.wolfram" + }, + { + "match": "16\\^\\^(?:\\h+(?:\\.(?!\\.)\\h*)?+|\\.(?!\\.)\\h+)``", + "name": "invalid.illegal" + }, + { + "match": "16\\^\\^(?:\\h+(?:\\.(?!\\.)\\h*)?+|\\.(?!\\.)\\h+)(?:`(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+))?+)(?:\\*\\^(?:-|\\+)?+\\d+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "16\\^\\^(?:\\h+(?:\\.(?!\\.)\\h*)?+|\\.(?!\\.)\\h+)(?:`(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+))?+)\\*\\^", + "name": "invalid.illegal" + }, + { + "match": "16\\^\\^(?:\\h+(?:\\.(?!\\.)\\h*)?+|\\.(?!\\.)\\h+)(?:`(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+))?+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "16\\^\\^(?:\\h+(?:\\.(?!\\.)\\h*)?+|\\.(?!\\.)\\h+)(?:\\*\\^(?:-|\\+)?+\\d+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "16\\^\\^(?:\\h+(?:\\.(?!\\.)\\h*)?+|\\.(?!\\.)\\h+)\\*\\^", + "name": "invalid.illegal" + }, + { + "match": "16\\^\\^(?:\\h+(?:\\.(?!\\.)\\h*)?+|\\.(?!\\.)\\h+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "16\\^\\^", + "name": "invalid.illegal" + }, + { + "match": "(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)(?:``(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)))(?:\\*\\^(?:-|\\+)?+\\d+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)(?:``(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)))\\*\\^", + "name": "invalid.illegal" + }, + { + "match": "(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)(?:``(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)))", + "name": "constant.numeric.wolfram" + }, + { + "match": "(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)``", + "name": "invalid.illegal" + }, + { + "match": "(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)(?:`(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+))?+)(?:\\*\\^(?:-|\\+)?+\\d+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)(?:`(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+))?+)\\*\\^", + "name": "invalid.illegal" + }, + { + "match": "(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)(?:`(?:(?:-|\\+)?+(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+))?+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)(?:\\*\\^(?:-|\\+)?+\\d+)", + "name": "constant.numeric.wolfram" + }, + { + "match": "(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)\\*\\^", + "name": "invalid.illegal" + }, + { + "match": "(?:\\d+(?:\\.(?!\\.)\\d*)?+|\\.(?!\\.)\\d+)", + "name": "constant.numeric.wolfram" + } + ] + }, + "strings": { + "patterns": [ + { + "name": "string.quoted.double", + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end" + } + }, + "patterns": [ + { + "include": "#string_escaped_characters" + } + ] + } + ] + }, + "stringifying-operators": { + "patterns": [ + { + "match": "(>>>)(?=\\s*\")", + "captures": { + "1": { + "name": "keyword.operator.PutAppend.wolfram" + } + } + }, + { + "match": "(>>>)\\s*(\\w+)", + "captures": { + "1": { + "name": "keyword.operator.PutAppend.wolfram" + }, + "2": { + "name": "string.unquoted.wolfram" + } + } + }, + { + "match": ">>>", + "name": "invalid.illegal" + }, + { + "match": "(::)(?=\\s*\")", + "captures": { + "1": { + "name": "keyword.operator.MessageName.wolfram" + } + } + }, + { + "match": "(::)([[:alpha:]][[:alnum:]]*)", + "captures": { + "1": { + "name": "keyword.operator.MessageName.wolfram" + }, + "2": { + "name": "string.unquoted.wolfram" + } + } + }, + { + "match": "::", + "name": "invalid.illegal" + }, + { + "match": "(<<)(?=\\s*\")", + "captures": { + "1": { + "name": "keyword.operator.Get.wolfram" + } + } + }, + { + "match": "(<<)\\s*([`[:alpha:]][`[:alnum:]]*)", + "captures": { + "1": { + "name": "keyword.operator.Get.wolfram" + }, + "2": { + "name": "string.unquoted.wolfram" + } + } + }, + { + "match": "<<", + "name": "invalid.illegal" + }, + { + "match": "(>>)(?=\\s*\")", + "captures": { + "1": { + "name": "keyword.operator.Put.wolfram" + } + } + }, + { + "match": "(>>)\\s*(\\w*)", + "captures": { + "1": { + "name": "keyword.operator.Put.wolfram" + }, + "2": { + "name": "string.unquoted.wolfram" + } + } + }, + { + "match": ">>", + "name": "invalid.illegal" + } + ] + }, + "operators": { + "patterns": [ + { + "match": "(?:\\^:=)", + "name": "keyword.operator.assignment.UpSetDelayed.wolfram" + }, + { + "match": "(?:\\^:)", + "name": "invalid.illegal" + }, + { + "match": "(?:===)", + "name": "keyword.operator.SameQ.wolfram" + }, + { + "match": "(?:=!=|\\.\\.\\.|//\\.|@@@|<->|//@)", + "name": "keyword.operator.wolfram" + }, + { + "match": "(?:\\|->)", + "name": "keyword.operator.Function.wolfram" + }, + { + "match": "(?://=)", + "name": "keyword.operator.assignment.ApplyTo.wolfram" + }, + { + "match": "(?:--|\\+\\+)", + "name": "keyword.operator.arithmetic.wolfram" + }, + { + "match": "(?:\\|\\||&&)", + "name": "keyword.operator.logical.wolfram" + }, + { + "match": "(?::=)", + "name": "keyword.operator.assignment.SetDelayed.wolfram" + }, + { + "match": "(?:\\^=)", + "name": "keyword.operator.assignment.UpSet.wolfram" + }, + { + "match": "(?:/=)", + "name": "keyword.operator.assignment.DivideBy.wolfram" + }, + { + "match": "(?:\\+=)", + "name": "keyword.operator.assignment.AddTo.wolfram" + }, + { + "match": "(?:=\\s+\\.(?![0-9]))", + "name": "invalid.whitespace.Unset.wolfram" + }, + { + "match": "(?:=\\.(?![0-9]))", + "name": "keyword.operator.assignment.Unset.wolfram" + }, + { + "match": "(?:\\*=)", + "name": "keyword.operator.assignment.TimesBy.wolfram" + }, + { + "match": "(?:-=)", + "name": "keyword.operator.assignment.SubtractFrom.wolfram" + }, + { + "match": "(?:/:)", + "name": "keyword.operator.assignment.Tag.wolfram" + }, + { + "match": "(?:;;)$", + "name": "invalid.endofline.Span.wolfram" + }, + { + "match": "(?:;;)", + "name": "keyword.operator.Span.wolfram" + }, + { + "match": "(?:!=)", + "name": "keyword.operator.Unequal.wolfram" + }, + { + "match": "(?:==)", + "name": "keyword.operator.Equal.wolfram" + }, + { + "match": "(?:!!)", + "name": "keyword.operator.BangBang.wolfram" + }, + { + "match": "(?:\\?\\?)", + "name": "invalid.illegal.Information.wolfram" + }, + { + "match": "(?:<=|>=|\\.\\.|:>|<>|->|/@|/;|/\\.|//|/\\*|@@|@\\*|~~|\\*\\*)", + "name": "keyword.operator.wolfram" + }, + { + "match": "(?:-|\\+|/|\\*)", + "name": "keyword.operator.arithmetic.wolfram" + }, + { + "match": "(?:=)", + "name": "keyword.operator.assignment.Set.wolfram" + }, + { + "match": "(?:<)", + "name": "keyword.operator.Less.wolfram" + }, + { + "match": "(?:\\|)", + "name": "keyword.operator.Alternatives.wolfram" + }, + { + "match": "(?:!)", + "name": "keyword.operator.Bang.wolfram" + }, + { + "match": "(?:;)", + "name": "keyword.operator.CompoundExpression.wolfram punctuation.terminator" + }, + { + "match": "(?:,)", + "name": "keyword.operator.Comma.wolfram punctuation.separator" + }, + { + "match": "^(?:\\?)", + "name": "invalid.startofline.Information.wolfram" + }, + { + "match": "(?:\\?)", + "name": "keyword.operator.PatternTest.wolfram" + }, + { + "match": "(?:')", + "name": "keyword.operator.Derivative.wolfram" + }, + { + "match": "(?:&)", + "name": "keyword.operator.Function.wolfram" + }, + { + "match": "(?:>|\\^|\\.|:|@|~)", + "name": "keyword.operator.wolfram" + } + ] + }, + "symbols": { + "patterns": [ + { + "match": "System`(?:A(?:ASTriangle|PIFunction|RCHProcess|RIMAProcess|RMAProcess|RProcess|SATriangle|belianGroup|bort|bortKernels|bortProtect|bs|bsArg|bsArgPlot|bsoluteCorrelation|bsoluteCorrelationFunction|bsoluteCurrentValue|bsoluteDashing|bsoluteFileName|bsoluteOptions|bsolutePointSize|bsoluteThickness|bsoluteTime|bsoluteTiming|ccountingForm|ccumulate|ccuracy|cousticAbsorbingValue|cousticImpedanceValue|cousticNormalVelocityValue|cousticPDEComponent|cousticPressureCondition|cousticRadiationValue|cousticSoundHardValue|cousticSoundSoftCondition|ctionMenu|ctivate|cyclicGraphQ|ddSides|ddTo|ddUsers|djacencyGraph|djacencyList|djacencyMatrix|djacentMeshCells|djugate|djustTimeSeriesForecast|djustmentBox|dministrativeDivisionData|ffineHalfSpace|ffineSpace|ffineStateSpaceModel|ffineTransform|irPressureData|irSoundAttenuation|irTemperatureData|ircraftData|irportData|iryAi|iryAiPrime|iryAiZero|iryBi|iryBiPrime|iryBiZero|lgebraicIntegerQ|lgebraicNumber|lgebraicNumberDenominator|lgebraicNumberNorm|lgebraicNumberPolynomial|lgebraicNumberTrace|lgebraicUnitQ|llTrue|lphaChannel|lphabet|lphabeticOrder|lphabeticSort|lternatingFactorial|lternatingGroup|lternatives|mbientLight|mbiguityList|natomyData|natomyPlot3D|natomyStyling|nd|ndersonDarlingTest|ngerJ|ngleBracket|nglePath|nglePath3D|ngleVector|ngularGauge|nimate|nimator|nnotate|nnotation|nnotationDelete|nnotationKeys|nnotationValue|nnuity|nnuityDue|nnulus|nomalyDetection|nomalyDetectorFunction|ntihermitian|ntihermitianMatrixQ|ntisymmetric|ntisymmetricMatrixQ|ntonyms|nyOrder|nySubset|nyTrue|part|partSquareFree|ppellF1|ppend|ppendTo|pply|pplySides|pplyTo|rcCos|rcCosh|rcCot|rcCoth|rcCsc|rcCsch|rcCurvature|rcLength|rcSec|rcSech|rcSin|rcSinDistribution|rcSinh|rcTan|rcTanh|rea|rg|rgMax|rgMin|rgumentsOptions|rithmeticGeometricMean|rray|rrayComponents|rrayDepth|rrayFilter|rrayFlatten|rrayMesh|rrayPad|rrayPlot|rrayPlot3D|rrayQ|rrayResample|rrayReshape|rrayRules|rrays|rrow|rrowheads|ssert|ssociateTo|ssociation|ssociationMap|ssociationQ|ssociationThread|ssuming|symptotic|symptoticDSolveValue|symptoticEqual|symptoticEquivalent|symptoticExpectation|symptoticGreater|symptoticGreaterEqual|symptoticIntegrate|symptoticLess|symptoticLessEqual|symptoticOutputTracker|symptoticProbability|symptoticProduct|symptoticRSolveValue|symptoticSolve|symptoticSum|tomQ|ttributes|udio|udioAmplify|udioBlockMap|udioCapture|udioChannelCombine|udioChannelMix|udioChannelSeparate|udioChannels|udioData|udioDelay|udioDelete|udioDistance|udioFade|udioFrequencyShift|udioGenerator|udioInsert|udioIntervals|udioJoin|udioLength|udioLocalMeasurements|udioLoudness|udioMeasurements|udioNormalize|udioOverlay|udioPad|udioPan|udioPartition|udioPitchShift|udioPlot|udioQ|udioReplace|udioResample|udioReverb|udioReverse|udioSampleRate|udioSpectralMap|udioSpectralTransformation|udioSplit|udioTimeStretch|udioTrim|udioType|ugmentedPolyhedron|ugmentedSymmetricPolynomial|uthenticationDialog|utoRefreshed|utoSubmitting|utocorrelationTest))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:B(?:SplineBasis|SplineCurve|SplineFunction|SplineSurface|abyMonsterGroupB|ackslash|all|and|andpassFilter|andstopFilter|arChart|arChart3D|arLegend|arabasiAlbertGraphDistribution|arcodeImage|arcodeRecognize|aringhausHenzeTest|arlowProschanImportance|arnesG|artlettHannWindow|artlettWindow|aseDecode|aseEncode|aseForm|atesDistribution|attleLemarieWavelet|ecause|eckmannDistribution|eep|egin|eginDialogPacket|eginPackage|ellB|ellY|enfordDistribution|eniniDistribution|enktanderGibratDistribution|enktanderWeibullDistribution|ernoulliB|ernoulliDistribution|ernoulliGraphDistribution|ernoulliProcess|ernsteinBasis|esselFilterModel|esselI|esselJ|esselJZero|esselK|esselY|esselYZero|eta|etaBinomialDistribution|etaDistribution|etaNegativeBinomialDistribution|etaPrimeDistribution|etaRegularized|etween|etweennessCentrality|eveledPolyhedron|ezierCurve|ezierFunction|ilateralFilter|ilateralLaplaceTransform|ilateralZTransform|inCounts|inLists|inarize|inaryDeserialize|inaryDistance|inaryImageQ|inaryRead|inaryReadList|inarySerialize|inaryWrite|inomial|inomialDistribution|inomialProcess|inormalDistribution|iorthogonalSplineWavelet|ipartiteGraphQ|iquadraticFilterModel|irnbaumImportance|irnbaumSaundersDistribution|itAnd|itClear|itGet|itLength|itNot|itOr|itSet|itShiftLeft|itShiftRight|itXor|iweightLocation|iweightMidvariance|lackmanHarrisWindow|lackmanNuttallWindow|lackmanWindow|lank|lankNullSequence|lankSequence|lend|lock|lockMap|lockRandom|lomqvistBeta|lomqvistBetaTest|lur|lurring|odePlot|ohmanWindow|oole|ooleanConsecutiveFunction|ooleanConvert|ooleanCountingFunction|ooleanFunction|ooleanGraph|ooleanMaxterms|ooleanMinimize|ooleanMinterms|ooleanQ|ooleanRegion|ooleanTable|ooleanVariables|orderDimensions|orelTannerDistribution|ottomHatTransform|oundaryDiscretizeGraphics|oundaryDiscretizeRegion|oundaryMesh|oundaryMeshRegion|oundaryMeshRegionQ|oundedRegionQ|oundingRegion|oxData|oxMatrix|oxObject|oxWhiskerChart|racketingBar|rayCurtisDistance|readthFirstScan|reak|ridgeData|rightnessEqualize|roadcastStationData|rownForsytheTest|rownianBridgeProcess|ubbleChart|ubbleChart3D|uckyballGraph|uildingData|ulletGauge|usinessDayQ|utterflyGraph|utterworthFilterModel|utton|uttonBar|uttonBox|uttonNotebook|yteArray|yteArrayFormat|yteArrayFormatQ|yteArrayQ|yteArrayToString|yteCount))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:C(?:|DF|DFDeploy|DFWavelet|Form|MYKColor|SGRegion|SGRegionQ|SGRegionTree|alendarConvert|alendarData|allPacket|allout|anberraDistance|ancel|ancelButton|andlestickChart|anonicalGraph|anonicalName|anonicalWarpingCorrespondence|anonicalWarpingDistance|anonicalizePolygon|anonicalizePolyhedron|anonicalizeRegion|antorMesh|antorStaircase|ap|apForm|apitalDifferentialD|apitalize|apsuleShape|aputoD|arlemanLinearize|arlsonRC|arlsonRD|arlsonRE|arlsonRF|arlsonRG|arlsonRJ|arlsonRK|arlsonRM|armichaelLambda|aseSensitive|ases|ashflow|asoratian|atalanNumber|atch|atenate|auchyDistribution|auchyMatrix|auchyWindow|ayleyGraph|eiling|ell|ellGroup|ellGroupData|ellObject|ellPrint|ells|ellularAutomaton|ensoredDistribution|ensoring|enterArray|enterDot|enteredInterval|entralFeature|entralMoment|entralMomentGeneratingFunction|epstrogram|epstrogramArray|epstrumArray|hampernowneNumber|hanVeseBinarize|haracterCounts|haracterName|haracterRange|haracteristicFunction|haracteristicPolynomial|haracters|hebyshev1FilterModel|hebyshev2FilterModel|hebyshevT|hebyshevU|heck|heckAbort|heckArguments|heckbox|heckboxBar|hemicalData|hessboardDistance|hiDistribution|hiSquareDistribution|hineseRemainder|hoiceButtons|hoiceDialog|holeskyDecomposition|hop|hromaticPolynomial|hromaticityPlot|hromaticityPlot3D|ircle|ircleDot|ircleMinus|irclePlus|irclePoints|ircleThrough|ircleTimes|irculantGraph|ircularArcThrough|ircularOrthogonalMatrixDistribution|ircularQuaternionMatrixDistribution|ircularRealMatrixDistribution|ircularSymplecticMatrixDistribution|ircularUnitaryMatrixDistribution|ircumsphere|ityData|lassifierFunction|lassifierMeasurements|lassifierMeasurementsObject|lassify|lear|learAll|learAttributes|learCookies|learPermissions|learSystemCache|lebschGordan|lickPane|lickToCopy|lip|lock|lockGauge|lose|loseKernels|losenessCentrality|losing|loudAccountData|loudConnect|loudDeploy|loudDirectory|loudDisconnect|loudEvaluate|loudExport|loudFunction|loudGet|loudImport|loudLoggingData|loudObject|loudObjects|loudPublish|loudPut|loudSave|loudShare|loudSubmit|loudSymbol|loudUnshare|lusterClassify|lusteringComponents|lusteringMeasurements|lusteringTree|oefficient|oefficientArrays|oefficientList|oefficientRules|oifletWavelet|ollect|ollinearPoints|olon|olorBalance|olorCombine|olorConvert|olorData|olorDataFunction|olorDetect|olorDistance|olorNegate|olorProfileData|olorQ|olorQuantize|olorReplace|olorSeparate|olorSetter|olorSlider|olorToneMapping|olorize|olorsNear|olumn|ometData|ommonName|ommonUnits|ommonest|ommonestFilter|ommunityGraphPlot|ompanyData|ompatibleUnitQ|ompile|ompiledFunction|omplement|ompleteGraph|ompleteGraphQ|ompleteIntegral|ompleteKaryTree|omplex|omplexArrayPlot|omplexContourPlot|omplexExpand|omplexListPlot|omplexPlot|omplexPlot3D|omplexRegionPlot|omplexStreamPlot|omplexVectorPlot|omponentMeasurements|omposeList|omposeSeries|ompositeQ|omposition|ompoundElement|ompoundExpression|ompoundPoissonDistribution|ompoundPoissonProcess|ompoundRenewalProcess|ompress|oncaveHullMesh|ondition|onditionalExpression|onditioned|one|onfirm|onfirmAssert|onfirmBy|onfirmMatch|onformAudio|onformImages|ongruent|onicGradientFilling|onicHullRegion|onicOptimization|onjugate|onjugateTranspose|onjunction|onnectLibraryCallbackFunction|onnectedComponents|onnectedGraphComponents|onnectedGraphQ|onnectedMeshComponents|onnesWindow|onoverTest|onservativeConvectionPDETerm|onstantArray|onstantImage|onstantRegionQ|onstellationData|onstruct|ontainsAll|ontainsAny|ontainsExactly|ontainsNone|ontainsOnly|ontext|ontextToFileName|ontexts|ontinue|ontinuedFraction|ontinuedFractionK|ontinuousMarkovProcess|ontinuousTask|ontinuousTimeModelQ|ontinuousWaveletData|ontinuousWaveletTransform|ontourDetect|ontourPlot|ontourPlot3D|ontraharmonicMean|ontrol|ontrolActive|ontrollabilityGramian|ontrollabilityMatrix|ontrollableDecomposition|ontrollableModelQ|ontrollerInformation|ontrollerManipulate|ontrollerState|onvectionPDETerm|onvergents|onvexHullMesh|onvexHullRegion|onvexOptimization|onvexPolygonQ|onvexPolyhedronQ|onvexRegionQ|onvolve|onwayGroupCo1|onwayGroupCo2|onwayGroupCo3|oordinateBoundingBox|oordinateBoundingBoxArray|oordinateBounds|oordinateBoundsArray|oordinateChartData|oordinateTransform|oordinateTransformData|oplanarPoints|oprimeQ|oproduct|opulaDistribution|opyDatabin|opyDirectory|opyFile|opyToClipboard|oreNilpotentDecomposition|ornerFilter|orrelation|orrelationDistance|orrelationFunction|orrelationTest|os|osIntegral|osh|oshIntegral|osineDistance|osineWindow|ot|oth|oulombF|oulombG|oulombH1|oulombH2|ount|ountDistinct|ountDistinctBy|ountRoots|ountryData|ounts|ountsBy|ovariance|ovarianceFunction|oxIngersollRossProcess|oxModel|oxModelFit|oxianDistribution|ramerVonMisesTest|reateArchive|reateDatabin|reateDialog|reateDirectory|reateDocument|reateFile|reateManagedLibraryExpression|reateNotebook|reatePacletArchive|reatePalette|reatePermissionsGroup|reateUUID|reateWindow|riticalSection|riticalityFailureImportance|riticalitySuccessImportance|ross|rossMatrix|rossingCount|rossingDetect|rossingPolygon|sc|sch|ube|ubeRoot|uboid|umulant|umulantGeneratingFunction|umulativeFeatureImpactPlot|up|upCap|url|urrencyConvert|urrentDate|urrentImage|urrentValue|urvatureFlowFilter|ycleGraph|ycleIndexPolynomial|ycles|yclicGroup|yclotomic|ylinder|ylindricalDecomposition|ylindricalDecompositionFunction))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:D(?:|Eigensystem|Eigenvalues|GaussianWavelet|MSList|MSString|Solve|SolveValue|agumDistribution|amData|amerauLevenshteinDistance|arker|ashing|ataDistribution|atabin|atabinAdd|atabinUpload|atabins|ataset|ateBounds|ateDifference|ateHistogram|ateList|ateListLogPlot|ateListPlot|ateListStepPlot|ateObject|ateObjectQ|ateOverlapsQ|atePattern|atePlus|ateRange|ateScale|ateSelect|ateString|ateValue|ateWithinQ|ated|atedUnit|aubechiesWavelet|avisDistribution|awsonF|ayCount|ayHemisphere|ayMatchQ|ayName|ayNightTerminator|ayPlus|ayRange|ayRound|aylightQ|eBruijnGraph|eBruijnSequence|ecapitalize|ecimalForm|eclarePackage|ecompose|ecrement|ecrypt|edekindEta|eepSpaceProbeData|efault|efaultButton|efaultValues|efer|efineInputStreamMethod|efineOutputStreamMethod|efineResourceFunction|efinition|egreeCentrality|egreeGraphDistribution|el|elaunayMesh|elayed|elete|eleteAdjacentDuplicates|eleteAnomalies|eleteBorderComponents|eleteCases|eleteDirectory|eleteDuplicates|eleteDuplicatesBy|eleteFile|eleteMissing|eleteObject|eletePermissionsKey|eleteSmallComponents|eleteStopwords|elimitedSequence|endrogram|enominator|ensityHistogram|ensityPlot|ensityPlot3D|eploy|epth|epthFirstScan|erivative|erivativeFilter|erivativePDETerm|esignMatrix|et|eviceClose|eviceConfigure|eviceExecute|eviceExecuteAsynchronous|eviceObject|eviceOpen|eviceRead|eviceReadBuffer|eviceReadLatest|eviceReadList|eviceReadTimeSeries|eviceStreams|eviceWrite|eviceWriteBuffer|evices|iagonal|iagonalMatrix|iagonalMatrixQ|iagonalizableMatrixQ|ialog|ialogInput|ialogNotebook|ialogReturn|iamond|iamondMatrix|iceDissimilarity|ictionaryLookup|ictionaryWordQ|ifferenceDelta|ifferenceQuotient|ifferenceRoot|ifferenceRootReduce|ifferences|ifferentialD|ifferentialRoot|ifferentialRootReduce|ifferentiatorFilter|iffusionPDETerm|igitCount|igitQ|ihedralAngle|ihedralGroup|ilation|imensionReduce|imensionReducerFunction|imensionReduction|imensionalCombinations|imensionalMeshComponents|imensions|iracComb|iracDelta|irectedEdge|irectedGraph|irectedGraphQ|irectedInfinity|irectionalLight|irective|irectory|irectoryName|irectoryQ|irectoryStack|irichletBeta|irichletCharacter|irichletCondition|irichletConvolve|irichletDistribution|irichletEta|irichletL|irichletLambda|irichletTransform|irichletWindow|iscreteAsymptotic|iscreteChirpZTransform|iscreteConvolve|iscreteDelta|iscreteHadamardTransform|iscreteIndicator|iscreteInputOutputModel|iscreteLQEstimatorGains|iscreteLQRegulatorGains|iscreteLimit|iscreteLyapunovSolve|iscreteMarkovProcess|iscreteMaxLimit|iscreteMinLimit|iscretePlot|iscretePlot3D|iscreteRatio|iscreteRiccatiSolve|iscreteShift|iscreteTimeModelQ|iscreteUniformDistribution|iscreteWaveletData|iscreteWaveletPacketTransform|iscreteWaveletTransform|iscretizeGraphics|iscretizeRegion|iscriminant|isjointQ|isjunction|isk|iskMatrix|iskSegment|ispatch|isplayEndPacket|isplayForm|isplayPacket|istanceMatrix|istanceTransform|istribute|istributeDefinitions|istributed|istributionChart|istributionFitTest|istributionParameterAssumptions|istributionParameterQ|iv|ivide|ivideBy|ivideSides|ivisible|ivisorSigma|ivisorSum|ivisors|o|ocumentGenerator|ocumentGeneratorInformation|ocumentGenerators|ocumentNotebook|odecahedron|ominantColors|ominatorTreeGraph|ominatorVertexList|ot|otEqual|oubleBracketingBar|oubleDownArrow|oubleLeftArrow|oubleLeftRightArrow|oubleLeftTee|oubleLongLeftArrow|oubleLongLeftRightArrow|oubleLongRightArrow|oubleRightArrow|oubleRightTee|oubleUpArrow|oubleUpDownArrow|oubleVerticalBar|ownArrow|ownArrowBar|ownArrowUpArrow|ownLeftRightVector|ownLeftTeeVector|ownLeftVector|ownLeftVectorBar|ownRightTeeVector|ownRightVector|ownRightVectorBar|ownTee|ownTeeArrow|ownValues|ownsample|razinInverse|rop|ropShadowing|t|ualPlanarGraph|ualPolyhedron|ualSystemsModel|umpSave|uplicateFreeQ|uration|ynamic|ynamicGeoGraphics|ynamicModule|ynamicSetting|ynamicWrapper))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:E(?:arthImpactData|arthquakeData|ccentricityCentrality|choEvaluation|choFunction|choLabel|dgeAdd|dgeBetweennessCentrality|dgeChromaticNumber|dgeConnectivity|dgeContract|dgeCount|dgeCoverQ|dgeCycleMatrix|dgeDelete|dgeDetect|dgeForm|dgeIndex|dgeList|dgeQ|dgeRules|dgeTaggedGraph|dgeTaggedGraphQ|dgeTags|dgeTransitiveGraphQ|dgeWeightedGraphQ|ditDistance|ffectiveInterest|igensystem|igenvalues|igenvectorCentrality|igenvectors|lement|lementData|liminate|llipsoid|llipticE|llipticExp|llipticExpPrime|llipticF|llipticFilterModel|llipticK|llipticLog|llipticNomeQ|llipticPi|llipticTheta|llipticThetaPrime|mbedCode|mbeddedHTML|mbeddedService|mitSound|mpiricalDistribution|mptyGraphQ|mptyRegion|nclose|ncode|ncrypt|ncryptedObject|nd|ndDialogPacket|ndPackage|ngineeringForm|nterExpressionPacket|nterTextPacket|ntity|ntityClass|ntityClassList|ntityCopies|ntityGroup|ntityInstance|ntityList|ntityPrefetch|ntityProperties|ntityProperty|ntityPropertyClass|ntityRegister|ntityStores|ntityTypeName|ntityUnregister|ntityValue|ntropy|ntropyFilter|nvironment|qual|qualTilde|qualTo|quilibrium|quirippleFilterKernel|quivalent|rf|rfc|rfi|rlangB|rlangC|rlangDistribution|rosion|rrorBox|stimatedBackground|stimatedDistribution|stimatedPointNormals|stimatedProcess|stimatorGains|stimatorRegulator|uclideanDistance|ulerAngles|ulerCharacteristic|ulerE|ulerMatrix|ulerPhi|ulerianGraphQ|valuate|valuatePacket|valuationBox|valuationCell|valuationData|valuationNotebook|valuationObject|venQ|ventData|ventHandler|ventSeries|xactBlackmanWindow|xactNumberQ|xampleData|xcept|xists|xoplanetData|xp|xpGammaDistribution|xpIntegralE|xpIntegralEi|xpToTrig|xpand|xpandAll|xpandDenominator|xpandFileName|xpandNumerator|xpectation|xponent|xponentialDistribution|xponentialGeneratingFunction|xponentialMovingAverage|xponentialPowerDistribution|xport|xportByteArray|xportForm|xportString|xpressionCell|xpressionGraph|xtendedGCD|xternalBundle|xtract|xtractArchive|xtractPacletArchive|xtremeValueDistribution))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:F(?:ARIMAProcess|RatioDistribution|aceAlign|aceForm|acialFeatures|actor|actorInteger|actorList|actorSquareFree|actorSquareFreeList|actorTerms|actorTermsList|actorial|actorial2|actorialMoment|actorialMomentGeneratingFunction|actorialPower|ailure|ailureDistribution|ailureQ|areySequence|eatureImpactPlot|eatureNearest|eatureSpacePlot|eatureSpacePlot3D|eatureValueDependencyPlot|eatureValueImpactPlot|eedbackLinearize|etalGrowthData|ibonacci|ibonorial|ile|ileBaseName|ileByteCount|ileDate|ileExistsQ|ileExtension|ileFormat|ileFormatQ|ileHash|ileNameDepth|ileNameDrop|ileNameJoin|ileNameSetter|ileNameSplit|ileNameTake|ileNames|ilePrint|ileSize|ileSystemMap|ileSystemScan|ileTemplate|ileTemplateApply|ileType|illedCurve|illedTorus|illingTransform|ilterRules|inancialBond|inancialData|inancialDerivative|inancialIndicator|ind|indAnomalies|indArgMax|indArgMin|indClique|indClusters|indCookies|indCurvePath|indCycle|indDevices|indDistribution|indDistributionParameters|indDivisions|indEdgeColoring|indEdgeCover|indEdgeCut|indEdgeIndependentPaths|indEulerianCycle|indFaces|indFile|indFit|indFormula|indFundamentalCycles|indGeneratingFunction|indGeoLocation|indGeometricTransform|indGraphCommunities|indGraphIsomorphism|indGraphPartition|indHamiltonianCycle|indHamiltonianPath|indHiddenMarkovStates|indIndependentEdgeSet|indIndependentVertexSet|indInstance|indIntegerNullVector|indIsomorphicSubgraph|indKClan|indKClique|indKClub|indKPlex|indLibrary|indLinearRecurrence|indList|indMatchingColor|indMaxValue|indMaximum|indMaximumCut|indMaximumFlow|indMeshDefects|indMinValue|indMinimum|indMinimumCostFlow|indMinimumCut|indPath|indPeaks|indPermutation|indPlanarColoring|indPostmanTour|indProcessParameters|indRegionTransform|indRepeat|indRoot|indSequenceFunction|indShortestPath|indShortestTour|indSpanningTree|indSubgraphIsomorphism|indThreshold|indTransientRepeat|indVertexColoring|indVertexCover|indVertexCut|indVertexIndependentPaths|inishDynamic|initeAbelianGroupCount|initeGroupCount|initeGroupData|irst|irstCase|irstPassageTimeDistribution|irstPosition|ischerGroupFi22|ischerGroupFi23|ischerGroupFi24Prime|isherHypergeometricDistribution|isherRatioTest|isherZDistribution|it|ittedModel|ixedOrder|ixedPoint|ixedPointList|latShading|latTopWindow|latten|lattenAt|lightData|lipView|loor|lowPolynomial|old|oldList|oldPair|oldPairList|oldWhile|oldWhileList|or|orAll|ormBox|ormFunction|ormObject|ormPage|ormat|ormulaData|ormulaLookup|ortranForm|ourier|ourierCoefficient|ourierCosCoefficient|ourierCosSeries|ourierCosTransform|ourierDCT|ourierDCTFilter|ourierDCTMatrix|ourierDST|ourierDSTMatrix|ourierMatrix|ourierSequenceTransform|ourierSeries|ourierSinCoefficient|ourierSinSeries|ourierSinTransform|ourierTransform|ourierTrigSeries|oxH|ractionBox|ractionalBrownianMotionProcess|ractionalD|ractionalGaussianNoiseProcess|ractionalPart|rameBox|ramed|rechetDistribution|reeQ|renetSerretSystem|requencySamplingFilterKernel|resnelC|resnelF|resnelG|resnelS|robeniusNumber|robeniusSolve|romAbsoluteTime|romCharacterCode|romCoefficientRules|romContinuedFraction|romDMS|romDateString|romDigits|romEntity|romJulianDate|romLetterNumber|romPolarCoordinates|romRomanNumeral|romSphericalCoordinates|romUnixTime|rontEndExecute|rontEndToken|rontEndTokenExecute|ullDefinition|ullForm|ullGraphics|ullInformationOutputRegulator|ullRegion|ullSimplify|unction|unctionAnalytic|unctionBijective|unctionContinuous|unctionConvexity|unctionDiscontinuities|unctionDomain|unctionExpand|unctionInjective|unctionInterpolation|unctionMeromorphic|unctionMonotonicity|unctionPeriod|unctionRange|unctionSign|unctionSingularities|unctionSurjective|ussellVeselyImportance))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:G(?:ARCHProcess|CD|aborFilter|aborMatrix|aborWavelet|ainMargins|ainPhaseMargins|alaxyData|amma|ammaDistribution|ammaRegularized|ather|atherBy|aussianFilter|aussianMatrix|aussianOrthogonalMatrixDistribution|aussianSymplecticMatrixDistribution|aussianUnitaryMatrixDistribution|aussianWindow|egenbauerC|eneralizedLinearModelFit|enerateAsymmetricKeyPair|enerateDocument|enerateHTTPResponse|enerateSymmetricKey|eneratingFunction|enericCylindricalDecomposition|enomeData|enomeLookup|eoAntipode|eoArea|eoBoundary|eoBoundingBox|eoBounds|eoBoundsRegion|eoBoundsRegionBoundary|eoBubbleChart|eoCircle|eoContourPlot|eoDensityPlot|eoDestination|eoDirection|eoDisk|eoDisplacement|eoDistance|eoDistanceList|eoElevationData|eoEntities|eoGraphPlot|eoGraphics|eoGridDirectionDifference|eoGridPosition|eoGridUnitArea|eoGridUnitDistance|eoGridVector|eoGroup|eoHemisphere|eoHemisphereBoundary|eoHistogram|eoIdentify|eoImage|eoLength|eoListPlot|eoMarker|eoNearest|eoPath|eoPolygon|eoPosition|eoPositionENU|eoPositionXYZ|eoProjectionData|eoRegionValuePlot|eoSmoothHistogram|eoStreamPlot|eoStyling|eoVariant|eoVector|eoVectorENU|eoVectorPlot|eoVectorXYZ|eoVisibleRegion|eoVisibleRegionBoundary|eoWithinQ|eodesicClosing|eodesicDilation|eodesicErosion|eodesicOpening|eodesicPolyhedron|eodesyData|eogravityModelData|eologicalPeriodData|eomagneticModelData|eometricBrownianMotionProcess|eometricDistribution|eometricMean|eometricMeanFilter|eometricOptimization|eometricTransformation|estureHandler|et|etEnvironment|lobalClusteringCoefficient|low|ompertzMakehamDistribution|oochShading|oodmanKruskalGamma|oodmanKruskalGammaTest|oto|ouraudShading|rad|radientFilter|radientFittedMesh|radientOrientationFilter|rammarApply|rammarRules|rammarToken|raph|raph3D|raphAssortativity|raphAutomorphismGroup|raphCenter|raphComplement|raphData|raphDensity|raphDiameter|raphDifference|raphDisjointUnion|raphDistance|raphDistanceMatrix|raphEmbedding|raphHub|raphIntersection|raphJoin|raphLinkEfficiency|raphPeriphery|raphPlot|raphPlot3D|raphPower|raphProduct|raphPropertyDistribution|raphQ|raphRadius|raphReciprocity|raphSum|raphUnion|raphics|raphics3D|raphicsColumn|raphicsComplex|raphicsGrid|raphicsGroup|raphicsRow|rayLevel|reater|reaterEqual|reaterEqualLess|reaterEqualThan|reaterFullEqual|reaterGreater|reaterLess|reaterSlantEqual|reaterThan|reaterTilde|reenFunction|rid|ridBox|ridGraph|roebnerBasis|roupBy|roupCentralizer|roupElementFromWord|roupElementPosition|roupElementQ|roupElementToWord|roupElements|roupGenerators|roupMultiplicationTable|roupOrbits|roupOrder|roupSetwiseStabilizer|roupStabilizer|roupStabilizerChain|roupings|rowCutComponents|udermannian|uidedFilter|umbelDistribution))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:H(?:ITSCentrality|TTPErrorResponse|TTPRedirect|TTPRequest|TTPRequestData|TTPResponse|aarWavelet|adamardMatrix|alfLine|alfNormalDistribution|alfPlane|alfSpace|alftoneShading|amiltonianGraphQ|ammingDistance|ammingWindow|ankelH1|ankelH2|ankelMatrix|ankelTransform|annPoissonWindow|annWindow|aradaNortonGroupHN|araryGraph|armonicMean|armonicMeanFilter|armonicNumber|ash|atchFilling|atchShading|aversine|azardFunction|ead|eatFluxValue|eatInsulationValue|eatOutflowValue|eatRadiationValue|eatSymmetryValue|eatTemperatureCondition|eatTransferPDEComponent|eatTransferValue|eavisideLambda|eavisidePi|eavisideTheta|eldGroupHe|elmholtzPDEComponent|ermiteDecomposition|ermiteH|ermitian|ermitianMatrixQ|essenbergDecomposition|eunB|eunBPrime|eunC|eunCPrime|eunD|eunDPrime|eunG|eunGPrime|eunT|eunTPrime|exahedron|iddenMarkovProcess|ighlightGraph|ighlightImage|ighlightMesh|ighlighted|ighpassFilter|igmanSimsGroupHS|ilbertCurve|ilbertFilter|ilbertMatrix|istogram|istogram3D|istogramDistribution|istogramList|istogramTransform|istogramTransformInterpolation|istoricalPeriodData|itMissTransform|jorthDistribution|odgeDual|oeffdingD|oeffdingDTest|old|oldComplete|oldForm|oldPattern|orizontalGauge|ornerForm|ostLookup|otellingTSquareDistribution|oytDistribution|ue|umanGrowthData|umpDownHump|umpEqual|urwitzLerchPhi|urwitzZeta|yperbolicDistribution|ypercubeGraph|yperexponentialDistribution|yperfactorial|ypergeometric0F1|ypergeometric0F1Regularized|ypergeometric1F1|ypergeometric1F1Regularized|ypergeometric2F1|ypergeometric2F1Regularized|ypergeometricDistribution|ypergeometricPFQ|ypergeometricPFQRegularized|ypergeometricU|yperlink|yperplane|ypoexponentialDistribution|ypothesisTestData))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:I(?:PAddress|conData|conize|cosahedron|dentity|dentityMatrix|f|fCompiled|gnoringInactive|m|mage|mage3D|mage3DProjection|mage3DSlices|mageAccumulate|mageAdd|mageAdjust|mageAlign|mageApply|mageApplyIndexed|mageAspectRatio|mageAssemble|mageCapture|mageChannels|mageClip|mageCollage|mageColorSpace|mageCompose|mageConvolve|mageCooccurrence|mageCorners|mageCorrelate|mageCorrespondingPoints|mageCrop|mageData|mageDeconvolve|mageDemosaic|mageDifference|mageDimensions|mageDisplacements|mageDistance|mageEffect|mageExposureCombine|mageFeatureTrack|mageFileApply|mageFileFilter|mageFileScan|mageFilter|mageFocusCombine|mageForestingComponents|mageForwardTransformation|mageHistogram|mageIdentify|mageInstanceQ|mageKeypoints|mageLevels|mageLines|mageMarker|mageMeasurements|mageMesh|mageMultiply|magePad|magePartition|magePeriodogram|magePerspectiveTransformation|mageQ|mageRecolor|mageReflect|mageResize|mageRestyle|mageRotate|mageSaliencyFilter|mageScaled|mageScan|mageSubtract|mageTake|mageTransformation|mageTrim|mageType|mageValue|mageValuePositions|mageVectorscopePlot|mageWaveformPlot|mplicitD|mplicitRegion|mplies|mport|mportByteArray|mportString|mprovementImportance|nactivate|nactive|ncidenceGraph|ncidenceList|ncidenceMatrix|ncrement|ndefiniteMatrixQ|ndependenceTest|ndependentEdgeSetQ|ndependentPhysicalQuantity|ndependentUnit|ndependentUnitDimension|ndependentVertexSetQ|ndexEdgeTaggedGraph|ndexGraph|ndexed|nexactNumberQ|nfiniteLine|nfiniteLineThrough|nfinitePlane|nfix|nflationAdjust|nformation|nhomogeneousPoissonProcess|nner|nnerPolygon|nnerPolyhedron|npaint|nput|nputField|nputForm|nputNamePacket|nputNotebook|nputPacket|nputStream|nputString|nputStringPacket|nsert|nsertLinebreaks|nset|nsphere|nstall|nstallService|ntegerDigits|ntegerExponent|ntegerLength|ntegerName|ntegerPart|ntegerPartitions|ntegerQ|ntegerReverse|ntegerString|ntegrate|nteractiveTradingChart|nternallyBalancedDecomposition|nterpolatingFunction|nterpolatingPolynomial|nterpolation|nterpretation|nterpretationBox|nterpreter|nterquartileRange|nterrupt|ntersectingQ|ntersection|nterval|ntervalIntersection|ntervalMemberQ|ntervalSlider|ntervalUnion|nverse|nverseBetaRegularized|nverseBilateralLaplaceTransform|nverseBilateralZTransform|nverseCDF|nverseChiSquareDistribution|nverseContinuousWaveletTransform|nverseDistanceTransform|nverseEllipticNomeQ|nverseErf|nverseErfc|nverseFourier|nverseFourierCosTransform|nverseFourierSequenceTransform|nverseFourierSinTransform|nverseFourierTransform|nverseFunction|nverseGammaDistribution|nverseGammaRegularized|nverseGaussianDistribution|nverseGudermannian|nverseHankelTransform|nverseHaversine|nverseJacobiCD|nverseJacobiCN|nverseJacobiCS|nverseJacobiDC|nverseJacobiDN|nverseJacobiDS|nverseJacobiNC|nverseJacobiND|nverseJacobiNS|nverseJacobiSC|nverseJacobiSD|nverseJacobiSN|nverseLaplaceTransform|nverseMellinTransform|nversePermutation|nverseRadon|nverseRadonTransform|nverseSeries|nverseShortTimeFourier|nverseSpectrogram|nverseSurvivalFunction|nverseTransformedRegion|nverseWaveletTransform|nverseWeierstrassP|nverseWishartMatrixDistribution|nverseZTransform|nvisible|rreduciblePolynomialQ|slandData|solatingInterval|somorphicGraphQ|somorphicSubgraphQ|sotopeData|tem|toProcess))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:J(?:accardDissimilarity|acobiAmplitude|acobiCD|acobiCN|acobiCS|acobiDC|acobiDN|acobiDS|acobiEpsilon|acobiNC|acobiND|acobiNS|acobiP|acobiSC|acobiSD|acobiSN|acobiSymbol|acobiZN|acobiZeta|ankoGroupJ1|ankoGroupJ2|ankoGroupJ3|ankoGroupJ4|arqueBeraALMTest|ohnsonDistribution|oin|oinAcross|oinForm|oinedCurve|ordanDecomposition|ordanModelDecomposition|uliaSetBoettcher|uliaSetIterationCount|uliaSetPlot|uliaSetPoints|ulianDate))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:K(?:CoreComponents|Distribution|EdgeConnectedComponents|EdgeConnectedGraphQ|VertexConnectedComponents|VertexConnectedGraphQ|agiChart|aiserBesselWindow|aiserWindow|almanEstimator|almanFilter|arhunenLoeveDecomposition|aryTree|atzCentrality|elvinBei|elvinBer|elvinKei|elvinKer|endallTau|endallTauTest|ernelMixtureDistribution|ernelObject|ernels|ey|eyComplement|eyDrop|eyDropFrom|eyExistsQ|eyFreeQ|eyIntersection|eyMap|eyMemberQ|eySelect|eySort|eySortBy|eyTake|eyUnion|eyValueMap|eyValuePattern|eys|illProcess|irchhoffGraph|irchhoffMatrix|leinInvariantJ|napsackSolve|nightTourGraph|notData|nownUnitQ|ochCurve|olmogorovSmirnovTest|roneckerDelta|roneckerModelDecomposition|roneckerProduct|roneckerSymbol|uiperTest|umaraswamyDistribution|urtosis|uwaharaFilter))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:L(?:ABColor|CHColor|CM|QEstimatorGains|QGRegulator|QOutputRegulatorGains|QRegulatorGains|UDecomposition|UVColor|abel|abeled|aguerreL|akeData|ambdaComponents|ameC|ameCPrime|ameEigenvalueA|ameEigenvalueB|ameS|ameSPrime|aminaData|anczosWindow|andauDistribution|anguageData|anguageIdentify|aplaceDistribution|aplaceTransform|aplacian|aplacianFilter|aplacianGaussianFilter|aplacianPDETerm|ast|atitude|atitudeLongitude|atticeData|atticeReduce|aunchKernels|ayeredGraphPlot|ayeredGraphPlot3D|eafCount|eapVariant|eapYearQ|earnDistribution|earnedDistribution|eastSquares|eastSquaresFilterKernel|eftArrow|eftArrowBar|eftArrowRightArrow|eftDownTeeVector|eftDownVector|eftDownVectorBar|eftRightArrow|eftRightVector|eftTee|eftTeeArrow|eftTeeVector|eftTriangle|eftTriangleBar|eftTriangleEqual|eftUpDownVector|eftUpTeeVector|eftUpVector|eftUpVectorBar|eftVector|eftVectorBar|egended|egendreP|egendreQ|ength|engthWhile|erchPhi|ess|essEqual|essEqualGreater|essEqualThan|essFullEqual|essGreater|essLess|essSlantEqual|essThan|essTilde|etterCounts|etterNumber|etterQ|evel|eveneTest|eviCivitaTensor|evyDistribution|exicographicOrder|exicographicSort|ibraryDataType|ibraryFunction|ibraryFunctionError|ibraryFunctionInformation|ibraryFunctionLoad|ibraryFunctionUnload|ibraryLoad|ibraryUnload|iftingFilterData|iftingWaveletTransform|ighter|ikelihood|imit|indleyDistribution|ine|ineBreakChart|ineGraph|ineIntegralConvolutionPlot|ineLegend|inearFractionalOptimization|inearFractionalTransform|inearGradientFilling|inearGradientImage|inearModelFit|inearOptimization|inearRecurrence|inearSolve|inearSolveFunction|inearizingTransformationData|inkActivate|inkClose|inkConnect|inkCreate|inkInterrupt|inkLaunch|inkObject|inkPatterns|inkRankCentrality|inkRead|inkReadyQ|inkWrite|inks|iouvilleLambda|ist|istAnimate|istContourPlot|istContourPlot3D|istConvolve|istCorrelate|istCurvePathPlot|istDeconvolve|istDensityPlot|istDensityPlot3D|istFourierSequenceTransform|istInterpolation|istLineIntegralConvolutionPlot|istLinePlot|istLinePlot3D|istLogLinearPlot|istLogLogPlot|istLogPlot|istPicker|istPickerBox|istPlay|istPlot|istPlot3D|istPointPlot3D|istPolarPlot|istQ|istSliceContourPlot3D|istSliceDensityPlot3D|istSliceVectorPlot3D|istStepPlot|istStreamDensityPlot|istStreamPlot|istStreamPlot3D|istSurfacePlot3D|istVectorDensityPlot|istVectorDisplacementPlot|istVectorDisplacementPlot3D|istVectorPlot|istVectorPlot3D|istZTransform|ocalAdaptiveBinarize|ocalCache|ocalClusteringCoefficient|ocalEvaluate|ocalObject|ocalObjects|ocalSubmit|ocalSymbol|ocalTime|ocalTimeZone|ocationEquivalenceTest|ocationTest|ocator|ocatorPane|og|og10|og2|ogBarnesG|ogGamma|ogGammaDistribution|ogIntegral|ogLikelihood|ogLinearPlot|ogLogPlot|ogLogisticDistribution|ogMultinormalDistribution|ogNormalDistribution|ogPlot|ogRankTest|ogSeriesDistribution|ogicalExpand|ogisticDistribution|ogisticSigmoid|ogitModelFit|ongLeftArrow|ongLeftRightArrow|ongRightArrow|ongest|ongestCommonSequence|ongestCommonSequencePositions|ongestCommonSubsequence|ongestCommonSubsequencePositions|ongestOrderedSequence|ongitude|ookup|oopFreeGraphQ|owerCaseQ|owerLeftArrow|owerRightArrow|owerTriangularMatrix|owerTriangularMatrixQ|owerTriangularize|owpassFilter|ucasL|uccioSamiComponents|unarEclipse|yapunovSolve|yonsGroupLy))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:M(?:AProcess|achineNumberQ|agnify|ailReceiverFunction|ajority|akeBoxes|akeExpression|anagedLibraryExpressionID|anagedLibraryExpressionQ|andelbrotSetBoettcher|andelbrotSetDistance|andelbrotSetIterationCount|andelbrotSetMemberQ|andelbrotSetPlot|angoldtLambda|anhattanDistance|anipulate|anipulator|annWhitneyTest|annedSpaceMissionData|antissaExponent|ap|apAll|apApply|apAt|apIndexed|apThread|archenkoPasturDistribution|arcumQ|ardiaCombinedTest|ardiaKurtosisTest|ardiaSkewnessTest|arginalDistribution|arkovProcessProperties|assConcentrationCondition|assFluxValue|assImpermeableBoundaryValue|assOutflowValue|assSymmetryValue|assTransferValue|assTransportPDEComponent|atchQ|atchingDissimilarity|aterialShading|athMLForm|athematicalFunctionData|athieuC|athieuCPrime|athieuCharacteristicA|athieuCharacteristicB|athieuCharacteristicExponent|athieuGroupM11|athieuGroupM12|athieuGroupM22|athieuGroupM23|athieuGroupM24|athieuS|athieuSPrime|atrices|atrixExp|atrixForm|atrixFunction|atrixLog|atrixNormalDistribution|atrixPlot|atrixPower|atrixPropertyDistribution|atrixQ|atrixRank|atrixTDistribution|ax|axDate|axDetect|axFilter|axLimit|axMemoryUsed|axStableDistribution|axValue|aximalBy|aximize|axwellDistribution|cLaughlinGroupMcL|ean|eanClusteringCoefficient|eanDegreeConnectivity|eanDeviation|eanFilter|eanGraphDistance|eanNeighborDegree|eanShift|eanShiftFilter|edian|edianDeviation|edianFilter|edicalTestData|eijerG|eijerGReduce|eixnerDistribution|ellinConvolve|ellinTransform|emberQ|emoryAvailable|emoryConstrained|emoryInUse|engerMesh|enuPacket|enuView|erge|ersennePrimeExponent|ersennePrimeExponentQ|eshCellCount|eshCellIndex|eshCells|eshConnectivityGraph|eshCoordinates|eshPrimitives|eshRegion|eshRegionQ|essage|essageDialog|essageList|essageName|essagePacket|essages|eteorShowerData|exicanHatWavelet|eyerWavelet|in|inDate|inDetect|inFilter|inLimit|inMax|inStableDistribution|inValue|ineralData|inimalBy|inimalPolynomial|inimalStateSpaceModel|inimize|inimumTimeIncrement|inkowskiQuestionMark|inorPlanetData|inors|inus|inusPlus|issing|issingQ|ittagLefflerE|ixedFractionParts|ixedGraphQ|ixedMagnitude|ixedRadix|ixedRadixQuantity|ixedUnit|ixtureDistribution|od|odelPredictiveController|odularInverse|odularLambda|odule|oebiusMu|oment|omentConvert|omentEvaluate|omentGeneratingFunction|omentOfInertia|onitor|onomialList|onsterGroupM|oonPhase|oonPosition|orletWavelet|orphologicalBinarize|orphologicalBranchPoints|orphologicalComponents|orphologicalEulerNumber|orphologicalGraph|orphologicalPerimeter|orphologicalTransform|ortalityData|ost|ountainData|ouseAnnotation|ouseAppearance|ousePosition|ouseover|ovieData|ovingAverage|ovingMap|ovingMedian|oyalDistribution|ulticolumn|ultigraphQ|ultinomial|ultinomialDistribution|ultinormalDistribution|ultiplicativeOrder|ultiplySides|ultivariateHypergeometricDistribution|ultivariatePoissonDistribution|ultivariateTDistribution))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:N(?:|ArgMax|ArgMin|Cache|CaputoD|DEigensystem|DEigenvalues|DSolve|DSolveValue|Expectation|FractionalD|Integrate|MaxValue|Maximize|MinValue|Minimize|Probability|Product|Roots|Solve|SolveValues|Sum|akagamiDistribution|ameQ|ames|and|earest|earestFunction|earestMeshCells|earestNeighborGraph|earestTo|ebulaData|eedlemanWunschSimilarity|eeds|egative|egativeBinomialDistribution|egativeDefiniteMatrixQ|egativeMultinomialDistribution|egativeSemidefiniteMatrixQ|egativelyOrientedPoints|eighborhoodData|eighborhoodGraph|est|estGraph|estList|estWhile|estWhileList|estedGreaterGreater|estedLessLess|eumannValue|evilleThetaC|evilleThetaD|evilleThetaN|evilleThetaS|extCell|extDate|extPrime|icholsPlot|ightHemisphere|onCommutativeMultiply|onNegative|onPositive|oncentralBetaDistribution|oncentralChiSquareDistribution|oncentralFRatioDistribution|oncentralStudentTDistribution|ondimensionalizationTransform|oneTrue|onlinearModelFit|onlinearStateSpaceModel|onlocalMeansFilter|or|orlundB|orm|ormal|ormalDistribution|ormalMatrixQ|ormalize|ormalizedSquaredEuclideanDistance|ot|otCongruent|otCupCap|otDoubleVerticalBar|otElement|otEqualTilde|otExists|otGreater|otGreaterEqual|otGreaterFullEqual|otGreaterGreater|otGreaterLess|otGreaterSlantEqual|otGreaterTilde|otHumpDownHump|otHumpEqual|otLeftTriangle|otLeftTriangleBar|otLeftTriangleEqual|otLess|otLessEqual|otLessFullEqual|otLessGreater|otLessLess|otLessSlantEqual|otLessTilde|otNestedGreaterGreater|otNestedLessLess|otPrecedes|otPrecedesEqual|otPrecedesSlantEqual|otPrecedesTilde|otReverseElement|otRightTriangle|otRightTriangleBar|otRightTriangleEqual|otSquareSubset|otSquareSubsetEqual|otSquareSuperset|otSquareSupersetEqual|otSubset|otSubsetEqual|otSucceeds|otSucceedsEqual|otSucceedsSlantEqual|otSucceedsTilde|otSuperset|otSupersetEqual|otTilde|otTildeEqual|otTildeFullEqual|otTildeTilde|otVerticalBar|otebook|otebookApply|otebookClose|otebookDelete|otebookDirectory|otebookEvaluate|otebookFileName|otebookFind|otebookGet|otebookImport|otebookInformation|otebookLocate|otebookObject|otebookOpen|otebookPrint|otebookPut|otebookRead|otebookSave|otebookSelection|otebookTemplate|otebookWrite|otebooks|othing|uclearExplosionData|uclearReactorData|ullSpace|umberCompose|umberDecompose|umberDigit|umberExpand|umberFieldClassNumber|umberFieldDiscriminant|umberFieldFundamentalUnits|umberFieldIntegralBasis|umberFieldNormRepresentatives|umberFieldRegulator|umberFieldRootsOfUnity|umberFieldSignature|umberForm|umberLinePlot|umberQ|umerator|umeratorDenominator|umericQ|umericalOrder|umericalSort|uttallWindow|yquistPlot))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:O(?:|NanGroupON|bservabilityGramian|bservabilityMatrix|bservableDecomposition|bservableModelQ|ceanData|ctahedron|ddQ|ff|ffset|n|nce|pacity|penAppend|penRead|penWrite|pener|penerView|pening|perate|ptimumFlowData|ptionValue|ptional|ptionalElement|ptions|ptionsPattern|r|rder|rderDistribution|rderedQ|rdering|rderingBy|rderlessPatternSequence|rnsteinUhlenbeckProcess|rthogonalMatrixQ|rthogonalize|uter|uterPolygon|uterPolyhedron|utputControllabilityMatrix|utputControllableModelQ|utputForm|utputNamePacket|utputResponse|utputStream|verBar|verDot|verHat|verTilde|verVector|verflow|verlay|verscript|verscriptBox|wenT|wnValues))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:P(?:DF|ERTDistribution|IDTune|acletDataRebuild|acletDirectoryLoad|acletDirectoryUnload|acletDisable|acletEnable|acletFind|acletFindRemote|acletInstall|acletInstallSubmit|acletNewerQ|acletObject|acletSiteObject|acletSiteRegister|acletSiteUnregister|acletSiteUpdate|acletSites|acletUninstall|adLeft|adRight|addedForm|adeApproximant|ageRankCentrality|airedBarChart|airedHistogram|airedSmoothHistogram|airedTTest|airedZTest|aletteNotebook|alindromeQ|ane|aneSelector|anel|arabolicCylinderD|arallelArray|arallelAxisPlot|arallelCombine|arallelDo|arallelEvaluate|arallelKernels|arallelMap|arallelNeeds|arallelProduct|arallelSubmit|arallelSum|arallelTable|arallelTry|arallelepiped|arallelize|arallelogram|arameterMixtureDistribution|arametricConvexOptimization|arametricFunction|arametricNDSolve|arametricNDSolveValue|arametricPlot|arametricPlot3D|arametricRegion|arentBox|arentCell|arentDirectory|arentNotebook|aretoDistribution|aretoPickandsDistribution|arkData|art|artOfSpeech|artialCorrelationFunction|articleAcceleratorData|articleData|artition|artitionsP|artitionsQ|arzenWindow|ascalDistribution|aste|asteButton|athGraph|athGraphQ|attern|atternSequence|atternTest|aulWavelet|auliMatrix|ause|eakDetect|eanoCurve|earsonChiSquareTest|earsonCorrelationTest|earsonDistribution|ercentForm|erfectNumber|erfectNumberQ|erimeter|eriodicBoundaryCondition|eriodogram|eriodogramArray|ermanent|ermissionsGroup|ermissionsGroupMemberQ|ermissionsGroups|ermissionsKey|ermissionsKeys|ermutationCycles|ermutationCyclesQ|ermutationGroup|ermutationLength|ermutationList|ermutationListQ|ermutationMatrix|ermutationMax|ermutationMin|ermutationOrder|ermutationPower|ermutationProduct|ermutationReplace|ermutationSupport|ermutations|ermute|eronaMalikFilter|ersonData|etersenGraph|haseMargins|hongShading|hysicalSystemData|ick|ieChart|ieChart3D|iecewise|iecewiseExpand|illaiTrace|illaiTraceTest|ingTime|ixelValue|ixelValuePositions|laced|laceholder|lanarAngle|lanarFaceList|lanarGraph|lanarGraphQ|lanckRadiationLaw|laneCurveData|lanetData|lanetaryMoonData|lantData|lay|lot|lot3D|luralize|lus|lusMinus|ochhammer|oint|ointFigureChart|ointLegend|ointLight|ointSize|oissonConsulDistribution|oissonDistribution|oissonPDEComponent|oissonProcess|oissonWindow|olarPlot|olyGamma|olyLog|olyaAeppliDistribution|olygon|olygonAngle|olygonCoordinates|olygonDecomposition|olygonalNumber|olyhedron|olyhedronAngle|olyhedronCoordinates|olyhedronData|olyhedronDecomposition|olyhedronGenus|olynomialExpressionQ|olynomialExtendedGCD|olynomialGCD|olynomialLCM|olynomialMod|olynomialQ|olynomialQuotient|olynomialQuotientRemainder|olynomialReduce|olynomialRemainder|olynomialSumOfSquaresList|opupMenu|opupView|opupWindow|osition|ositionIndex|ositionLargest|ositionSmallest|ositive|ositiveDefiniteMatrixQ|ositiveSemidefiniteMatrixQ|ositivelyOrientedPoints|ossibleZeroQ|ostfix|ower|owerDistribution|owerExpand|owerMod|owerModList|owerRange|owerSpectralDensity|owerSymmetricPolynomial|owersRepresentations|reDecrement|reIncrement|recedenceForm|recedes|recedesEqual|recedesSlantEqual|recedesTilde|recision|redict|redictorFunction|redictorMeasurements|redictorMeasurementsObject|reemptProtect|refix|repend|rependTo|reviousCell|reviousDate|riceGraphDistribution|rime|rimeNu|rimeOmega|rimePi|rimePowerQ|rimeQ|rimeZetaP|rimitivePolynomialQ|rimitiveRoot|rimitiveRootList|rincipalComponents|rintTemporary|rintableASCIIQ|rintout3D|rism|rivateKey|robability|robabilityDistribution|robabilityPlot|robabilityScalePlot|robitModelFit|rocessConnection|rocessInformation|rocessObject|rocessParameterAssumptions|rocessParameterQ|rocessStatus|rocesses|roduct|roductDistribution|roductLog|rogressIndicator|rojection|roportion|roportional|rotect|roteinData|runing|seudoInverse|sychrometricPropertyData|ublicKey|ulsarData|ut|utAppend|yramid))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:Q(?:Binomial|Factorial|Gamma|HypergeometricPFQ|Pochhammer|PolyGamma|RDecomposition|nDispersion|uadraticIrrationalQ|uadraticOptimization|uantile|uantilePlot|uantity|uantityArray|uantityDistribution|uantityForm|uantityMagnitude|uantityQ|uantityUnit|uantityVariable|uantityVariableCanonicalUnit|uantityVariableDimensions|uantityVariableIdentifier|uantityVariablePhysicalQuantity|uartileDeviation|uartileSkewness|uartiles|uery|ueueProperties|ueueingNetworkProcess|ueueingProcess|uiet|uietEcho|uotient|uotientRemainder))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:R(?:GBColor|Solve|SolveValue|adialAxisPlot|adialGradientFilling|adialGradientImage|adialityCentrality|adicalBox|adioButton|adioButtonBar|adon|adonTransform|amanujanTau|amanujanTauL|amanujanTauTheta|amanujanTauZ|amp|andomChoice|andomColor|andomComplex|andomDate|andomEntity|andomFunction|andomGeneratorState|andomGeoPosition|andomGraph|andomImage|andomInteger|andomPermutation|andomPoint|andomPolygon|andomPolyhedron|andomPrime|andomReal|andomSample|andomTime|andomVariate|andomWalkProcess|andomWord|ange|angeFilter|ankedMax|ankedMin|arerProbability|aster|aster3D|asterize|ational|ationalExpressionQ|ationalize|atios|awBoxes|awData|ayleighDistribution|e|eIm|eImPlot|eactionPDETerm|ead|eadByteArray|eadLine|eadList|eadString|ealAbs|ealDigits|ealExponent|ealSign|eap|econstructionMesh|ectangle|ectangleChart|ectangleChart3D|ectangularRepeatingElement|ecurrenceFilter|ecurrenceTable|educe|efine|eflectionMatrix|eflectionTransform|efresh|egion|egionBinarize|egionBoundary|egionBounds|egionCentroid|egionCongruent|egionConvert|egionDifference|egionDilation|egionDimension|egionDisjoint|egionDistance|egionDistanceFunction|egionEmbeddingDimension|egionEqual|egionErosion|egionFit|egionImage|egionIntersection|egionMeasure|egionMember|egionMemberFunction|egionMoment|egionNearest|egionNearestFunction|egionPlot|egionPlot3D|egionProduct|egionQ|egionResize|egionSimilar|egionSymmetricDifference|egionUnion|egionWithin|egularExpression|egularPolygon|egularlySampledQ|elationGraph|eleaseHold|eliabilityDistribution|eliefImage|eliefPlot|emove|emoveAlphaChannel|emoveBackground|emoveDiacritics|emoveInputStreamMethod|emoveOutputStreamMethod|emoveUsers|enameDirectory|enameFile|enewalProcess|enkoChart|epairMesh|epeated|epeatedNull|epeatedTiming|epeatingElement|eplace|eplaceAll|eplaceAt|eplaceImageValue|eplaceList|eplacePart|eplacePixelValue|eplaceRepeated|esamplingAlgorithmData|escale|escalingTransform|esetDirectory|esidue|esidueSum|esolve|esourceData|esourceObject|esourceSearch|esponseForm|est|estricted|esultant|eturn|eturnExpressionPacket|eturnPacket|eturnTextPacket|everse|everseBiorthogonalSplineWavelet|everseElement|everseEquilibrium|everseGraph|everseSort|everseSortBy|everseUpEquilibrium|evolutionPlot3D|iccatiSolve|iceDistribution|idgeFilter|iemannR|iemannSiegelTheta|iemannSiegelZ|iemannXi|iffle|ightArrow|ightArrowBar|ightArrowLeftArrow|ightComposition|ightCosetRepresentative|ightDownTeeVector|ightDownVector|ightDownVectorBar|ightTee|ightTeeArrow|ightTeeVector|ightTriangle|ightTriangleBar|ightTriangleEqual|ightUpDownVector|ightUpTeeVector|ightUpVector|ightUpVectorBar|ightVector|ightVectorBar|iskAchievementImportance|iskReductionImportance|obustConvexOptimization|ogersTanimotoDissimilarity|ollPitchYawAngles|ollPitchYawMatrix|omanNumeral|oot|ootApproximant|ootIntervals|ootLocusPlot|ootMeanSquare|ootOfUnityQ|ootReduce|ootSum|oots|otate|otateLeft|otateRight|otationMatrix|otationTransform|ound|ow|owBox|owReduce|udinShapiro|udvalisGroupRu|ule|uleDelayed|ulePlot|un|unProcess|unThrough|ussellRaoDissimilarity))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:S(?:ARIMAProcess|ARMAProcess|ASTriangle|SSTriangle|ameAs|ameQ|ampledSoundFunction|ampledSoundList|atelliteData|atisfiabilityCount|atisfiabilityInstances|atisfiableQ|ave|avitzkyGolayMatrix|awtoothWave|cale|caled|calingMatrix|calingTransform|can|cheduledTask|churDecomposition|cientificForm|corerGi|corerGiPrime|corerHi|corerHiPrime|ec|ech|echDistribution|econdOrderConeOptimization|ectorChart|ectorChart3D|eedRandom|elect|electComponents|electFirst|electedCells|electedNotebook|electionCreateCell|electionEvaluate|electionEvaluateCreateCell|electionMove|emanticImport|emanticImportString|emanticInterpretation|emialgebraicComponentInstances|emidefiniteOptimization|endMail|endMessage|equence|equenceAlignment|equenceCases|equenceCount|equenceFold|equenceFoldList|equencePosition|equenceReplace|equenceSplit|eries|eriesCoefficient|eriesData|erviceConnect|erviceDisconnect|erviceExecute|erviceObject|essionSubmit|essionTime|et|etAccuracy|etAlphaChannel|etAttributes|etCloudDirectory|etCookies|etDelayed|etDirectory|etEnvironment|etFileDate|etOptions|etPermissions|etPrecision|etSelectedNotebook|etSharedFunction|etSharedVariable|etStreamPosition|etSystemOptions|etUsers|etter|etterBar|etting|hallow|hannonWavelet|hapiroWilkTest|hare|harpen|hearingMatrix|hearingTransform|hellRegion|henCastanMatrix|hiftRegisterSequence|hiftedGompertzDistribution|hort|hortDownArrow|hortLeftArrow|hortRightArrow|hortTimeFourier|hortTimeFourierData|hortUpArrow|hortest|hortestPathFunction|how|iderealTime|iegelTheta|iegelTukeyTest|ierpinskiCurve|ierpinskiMesh|ign|ignTest|ignature|ignedRankTest|ignedRegionDistance|impleGraph|impleGraphQ|implePolygonQ|implePolyhedronQ|implex|implify|in|inIntegral|inc|inghMaddalaDistribution|ingularValueDecomposition|ingularValueList|ingularValuePlot|inh|inhIntegral|ixJSymbol|keleton|keletonTransform|kellamDistribution|kewNormalDistribution|kewness|kip|liceContourPlot3D|liceDensityPlot3D|liceDistribution|liceVectorPlot3D|lideView|lider|lider2D|liderBox|lot|lotSequence|mallCircle|mithDecomposition|mithDelayCompensator|mithWatermanSimilarity|moothDensityHistogram|moothHistogram|moothHistogram3D|moothKernelDistribution|nDispersion|ocketConnect|ocketListen|ocketListener|ocketObject|ocketOpen|ocketReadMessage|ocketReadyQ|ocketWaitAll|ocketWaitNext|ockets|okalSneathDissimilarity|olarEclipse|olarSystemFeatureData|olarTime|olidAngle|olidData|olidRegionQ|olve|olveAlways|olveValues|ort|ortBy|ound|oundNote|ourcePDETerm|ow|paceCurveData|pacer|pan|parseArray|parseArrayQ|patialGraphDistribution|patialMedian|peak|pearmanRankTest|pearmanRho|peciesData|pectralLineData|pectrogram|pectrogramArray|pecularity|peechSynthesize|pellingCorrectionList|phere|pherePoints|phericalBesselJ|phericalBesselY|phericalHankelH1|phericalHankelH2|phericalHarmonicY|phericalPlot3D|phericalShell|pheroidalEigenvalue|pheroidalJoiningFactor|pheroidalPS|pheroidalPSPrime|pheroidalQS|pheroidalQSPrime|pheroidalRadialFactor|pheroidalS1|pheroidalS1Prime|pheroidalS2|pheroidalS2Prime|plicedDistribution|plit|plitBy|pokenString|potLight|qrt|qrtBox|quare|quareFreeQ|quareIntersection|quareMatrixQ|quareRepeatingElement|quareSubset|quareSubsetEqual|quareSuperset|quareSupersetEqual|quareUnion|quareWave|quaredEuclideanDistance|quaresR|tableDistribution|tack|tackBegin|tackComplete|tackInhibit|tackedDateListPlot|tackedListPlot|tadiumShape|tandardAtmosphereData|tandardDeviation|tandardDeviationFilter|tandardForm|tandardOceanData|tandardize|tandbyDistribution|tar|tarClusterData|tarData|tarGraph|tartProcess|tateFeedbackGains|tateOutputEstimator|tateResponse|tateSpaceModel|tateSpaceTransform|tateTransformationLinearize|tationaryDistribution|tationaryWaveletPacketTransform|tationaryWaveletTransform|tatusArea|tatusCentrality|tieltjesGamma|tippleShading|tirlingS1|tirlingS2|toppingPowerData|tratonovichProcess|treamDensityPlot|treamPlot|treamPlot3D|treamPosition|treams|tringCases|tringContainsQ|tringCount|tringDelete|tringDrop|tringEndsQ|tringExpression|tringExtract|tringForm|tringFormat|tringFormatQ|tringFreeQ|tringInsert|tringJoin|tringLength|tringMatchQ|tringPadLeft|tringPadRight|tringPart|tringPartition|tringPosition|tringQ|tringRepeat|tringReplace|tringReplaceList|tringReplacePart|tringReverse|tringRiffle|tringRotateLeft|tringRotateRight|tringSkeleton|tringSplit|tringStartsQ|tringTake|tringTakeDrop|tringTemplate|tringToByteArray|tringToStream|tringTrim|tripBoxes|tructuralImportance|truveH|truveL|tudentTDistribution|tyle|tyleBox|tyleData|ubMinus|ubPlus|ubStar|ubValues|ubdivide|ubfactorial|ubgraph|ubresultantPolynomialRemainders|ubresultantPolynomials|ubresultants|ubscript|ubscriptBox|ubsequences|ubset|ubsetEqual|ubsetMap|ubsetQ|ubsets|ubstitutionSystem|ubsuperscript|ubsuperscriptBox|ubtract|ubtractFrom|ubtractSides|ucceeds|ucceedsEqual|ucceedsSlantEqual|ucceedsTilde|uccess|uchThat|um|umConvergence|unPosition|unrise|unset|uperDagger|uperMinus|uperPlus|uperStar|upernovaData|uperscript|uperscriptBox|uperset|upersetEqual|urd|urfaceArea|urfaceData|urvivalDistribution|urvivalFunction|urvivalModel|urvivalModelFit|uzukiDistribution|uzukiGroupSuz|watchLegend|witch|ymbol|ymbolName|ymletWavelet|ymmetric|ymmetricGroup|ymmetricKey|ymmetricMatrixQ|ymmetricPolynomial|ymmetricReduction|ymmetrize|ymmetrizedArray|ymmetrizedArrayRules|ymmetrizedDependentComponents|ymmetrizedIndependentComponents|ymmetrizedReplacePart|ynonyms|yntaxInformation|yntaxLength|yntaxPacket|yntaxQ|ystemDialogInput|ystemInformation|ystemOpen|ystemOptions|ystemProcessData|ystemProcesses|ystemsConnectionsModel|ystemsModelControllerData|ystemsModelDelay|ystemsModelDelayApproximate|ystemsModelDelete|ystemsModelDimensions|ystemsModelExtract|ystemsModelFeedbackConnect|ystemsModelLinearity|ystemsModelMerge|ystemsModelOrder|ystemsModelParallelConnect|ystemsModelSeriesConnect|ystemsModelStateFeedbackConnect|ystemsModelVectorRelativeOrders))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:T(?:Test|abView|able|ableForm|agBox|agSet|agSetDelayed|agUnset|ake|akeDrop|akeLargest|akeLargestBy|akeList|akeSmallest|akeSmallestBy|akeWhile|ally|an|anh|askAbort|askExecute|askObject|askRemove|askResume|askSuspend|askWait|asks|autologyQ|eXForm|elegraphProcess|emplateApply|emplateBox|emplateExpression|emplateIf|emplateObject|emplateSequence|emplateSlot|emplateWith|emporalData|ensorContract|ensorDimensions|ensorExpand|ensorProduct|ensorRank|ensorReduce|ensorSymmetry|ensorTranspose|ensorWedge|erminatedEvaluation|estReport|estReportObject|estResultObject|etrahedron|ext|extCell|extData|extGrid|extPacket|extRecognize|extSentences|extString|extTranslation|extWords|exture|herefore|hermodynamicData|hermometerGauge|hickness|hinning|hompsonGroupTh|hread|hreeJSymbol|hreshold|hrough|hrow|hueMorse|humbnail|ideData|ilde|ildeEqual|ildeFullEqual|ildeTilde|imeConstrained|imeObject|imeObjectQ|imeRemaining|imeSeries|imeSeriesAggregate|imeSeriesForecast|imeSeriesInsert|imeSeriesInvertibility|imeSeriesMap|imeSeriesMapThread|imeSeriesModel|imeSeriesModelFit|imeSeriesResample|imeSeriesRescale|imeSeriesShift|imeSeriesThread|imeSeriesWindow|imeSystemConvert|imeUsed|imeValue|imeZoneConvert|imeZoneOffset|imelinePlot|imes|imesBy|iming|itsGroupT|oBoxes|oCharacterCode|oContinuousTimeModel|oDiscreteTimeModel|oEntity|oExpression|oInvertibleTimeSeries|oLowerCase|oNumberField|oPolarCoordinates|oRadicals|oRules|oSphericalCoordinates|oString|oUpperCase|oeplitzMatrix|ogether|oggler|ogglerBar|ooltip|oonShading|opHatTransform|opologicalSort|orus|orusGraph|otal|otalVariationFilter|ouchPosition|r|race|raceDialog|racePrint|raceScan|racyWidomDistribution|radingChart|raditionalForm|ransferFunctionCancel|ransferFunctionExpand|ransferFunctionFactor|ransferFunctionModel|ransferFunctionPoles|ransferFunctionTransform|ransferFunctionZeros|ransformationFunction|ransformationMatrix|ransformedDistribution|ransformedField|ransformedProcess|ransformedRegion|ransitiveClosureGraph|ransitiveReductionGraph|ranslate|ranslationTransform|ransliterate|ranspose|ravelDirections|ravelDirectionsData|ravelDistance|ravelDistanceList|ravelTime|reeForm|reeGraph|reeGraphQ|reePlot|riangle|riangleWave|riangularDistribution|riangulateMesh|rigExpand|rigFactor|rigFactorList|rigReduce|rigToExp|rigger|rimmedMean|rimmedVariance|ropicalStormData|rueQ|runcatedDistribution|runcatedPolyhedron|sallisQExponentialDistribution|sallisQGaussianDistribution|ube|ukeyLambdaDistribution|ukeyWindow|unnelData|uples|uranGraph|uringMachine|uttePolynomial|woWayRule|ypeHint))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:U(?:RL|RLBuild|RLDecode|RLDispatcher|RLDownload|RLEncode|RLExecute|RLExpand|RLParse|RLQueryDecode|RLQueryEncode|RLRead|RLResponseTime|RLShorten|RLSubmit|nateQ|ncompress|nderBar|nderflow|nderoverscript|nderoverscriptBox|nderscript|nderscriptBox|nderseaFeatureData|ndirectedEdge|ndirectedGraph|ndirectedGraphQ|nequal|nequalTo|nevaluated|niformDistribution|niformGraphDistribution|niformPolyhedron|niformSumDistribution|ninstall|nion|nionPlus|nique|nitBox|nitConvert|nitDimensions|nitRootTest|nitSimplify|nitStep|nitTriangle|nitVector|nitaryMatrixQ|nitize|niverseModelData|niversityData|nixTime|nprotect|nsameQ|nset|nsetShared|ntil|pArrow|pArrowBar|pArrowDownArrow|pDownArrow|pEquilibrium|pSet|pSetDelayed|pTee|pTeeArrow|pTo|pValues|pdate|pperCaseQ|pperLeftArrow|pperRightArrow|pperTriangularMatrix|pperTriangularMatrixQ|pperTriangularize|psample|singFrontEnd))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:V(?:alueQ|alues|ariables|ariance|arianceEquivalenceTest|arianceGammaDistribution|arianceTest|ectorAngle|ectorDensityPlot|ectorDisplacementPlot|ectorDisplacementPlot3D|ectorGreater|ectorGreaterEqual|ectorLess|ectorLessEqual|ectorPlot|ectorPlot3D|ectorQ|ectors|ee|erbatim|erificationTest|ertexAdd|ertexChromaticNumber|ertexComponent|ertexConnectivity|ertexContract|ertexCorrelationSimilarity|ertexCosineSimilarity|ertexCount|ertexCoverQ|ertexDegree|ertexDelete|ertexDiceSimilarity|ertexEccentricity|ertexInComponent|ertexInComponentGraph|ertexInDegree|ertexIndex|ertexJaccardSimilarity|ertexList|ertexOutComponent|ertexOutComponentGraph|ertexOutDegree|ertexQ|ertexReplace|ertexTransitiveGraphQ|ertexWeightedGraphQ|erticalBar|erticalGauge|erticalSeparator|erticalSlider|erticalTilde|oiceStyleData|oigtDistribution|olcanoData|olume|onMisesDistribution|oronoiMesh))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:W(?:aitAll|aitNext|akebyDistribution|alleniusHypergeometricDistribution|aringYuleDistribution|arpingCorrespondence|arpingDistance|atershedComponents|atsonUSquareTest|attsStrogatzGraphDistribution|avePDEComponent|aveletBestBasis|aveletFilterCoefficients|aveletImagePlot|aveletListPlot|aveletMapIndexed|aveletMatrixPlot|aveletPhi|aveletPsi|aveletScalogram|aveletThreshold|eakStationarity|eaklyConnectedComponents|eaklyConnectedGraphComponents|eaklyConnectedGraphQ|eatherData|eatherForecastData|eberE|edge|eibullDistribution|eierstrassE1|eierstrassE2|eierstrassE3|eierstrassEta1|eierstrassEta2|eierstrassEta3|eierstrassHalfPeriodW1|eierstrassHalfPeriodW2|eierstrassHalfPeriodW3|eierstrassHalfPeriods|eierstrassInvariantG2|eierstrassInvariantG3|eierstrassInvariants|eierstrassP|eierstrassPPrime|eierstrassSigma|eierstrassZeta|eightedAdjacencyGraph|eightedAdjacencyMatrix|eightedData|eightedGraphQ|elchWindow|heelGraph|henEvent|hich|hile|hiteNoiseProcess|hittakerM|hittakerW|ienerFilter|ienerProcess|ignerD|ignerSemicircleDistribution|ikipediaData|ilksW|ilksWTest|indDirectionData|indSpeedData|indVectorData|indingCount|indingPolygon|insorizedMean|insorizedVariance|ishartMatrixDistribution|ith|olframAlpha|olframLanguageData|ordCloud|ordCount|ordCounts|ordData|ordDefinition|ordFrequency|ordFrequencyData|ordList|ordStem|ordTranslation|rite|riteLine|riteString|ronskian))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:X(?:MLElement|MLObject|MLTemplate|YZColor|nor|or))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:Y(?:uleDissimilarity))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:Z(?:IPCodeData|Test|Transform|ernikeR|eroSymmetric|eta|etaZero|ipfDistribution))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "System`(?:A(?:cceptanceThreshold|ccuracyGoal|ctiveStyle|ddOnHelpPath|djustmentBoxOptions|lignment|lignmentPoint|llowGroupClose|llowInlineCells|llowLooseGrammar|llowReverseGroupClose|llowScriptLevelChange|llowVersionUpdate|llowedCloudExtraParameters|llowedCloudParameterExtensions|llowedDimensions|llowedFrequencyRange|llowedHeads|lternativeHypothesis|ltitudeMethod|mbiguityFunction|natomySkinStyle|nchoredSearch|nimationDirection|nimationRate|nimationRepetitions|nimationRunTime|nimationRunning|nimationTimeIndex|nnotationRules|ntialiasing|ppearance|ppearanceElements|ppearanceRules|spectRatio|ssociationFormat|ssumptions|synchronous|ttachedCell|udioChannelAssignment|udioEncoding|udioInputDevice|udioLabel|udioOutputDevice|uthentication|utoAction|utoCopy|utoDelete|utoGeneratedPackage|utoIndent|utoItalicWords|utoMultiplicationSymbol|utoOpenNotebooks|utoOpenPalettes|utoOperatorRenderings|utoRemove|utoScroll|utoSpacing|utoloadPath|utorunSequencing|xes|xesEdge|xesLabel|xesOrigin|xesStyle))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:B(?:ackground|arOrigin|arSpacing|aseStyle|aselinePosition|inaryFormat|ookmarks|ooleanStrings|oundaryStyle|oxBaselineShift|oxFormFormatTypes|oxFrame|oxMargins|oxRatios|oxStyle|oxed|ubbleScale|ubbleSizes|uttonBoxOptions|uttonData|uttonFunction|uttonMinHeight|uttonSource|yteOrdering))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:C(?:alendarType|alloutMarker|alloutStyle|aptureRunning|aseOrdering|elestialSystem|ellAutoOverwrite|ellBaseline|ellBracketOptions|ellChangeTimes|ellContext|ellDingbat|ellDingbatMargin|ellDynamicExpression|ellEditDuplicate|ellEpilog|ellEvaluationDuplicate|ellEvaluationFunction|ellEventActions|ellFrame|ellFrameColor|ellFrameLabelMargins|ellFrameLabels|ellFrameMargins|ellGrouping|ellGroupingRules|ellHorizontalScrolling|ellID|ellLabel|ellLabelAutoDelete|ellLabelMargins|ellLabelPositioning|ellLabelStyle|ellLabelTemplate|ellMargins|ellOpen|ellProlog|ellSize|ellTags|haracterEncoding|haracterEncodingsPath|hartBaseStyle|hartElementFunction|hartElements|hartLabels|hartLayout|hartLegends|hartStyle|lassPriors|lickToCopyEnabled|lipPlanes|lipPlanesStyle|lipRange|lippingStyle|losingAutoSave|loudBase|loudObjectNameFormat|loudObjectURLType|lusterDissimilarityFunction|odeAssistOptions|olorCoverage|olorFunction|olorFunctionBinning|olorFunctionScaling|olorRules|olorSelectorSettings|olorSpace|olumnAlignments|olumnLines|olumnSpacings|olumnWidths|olumnsEqual|ombinerFunction|ommonDefaultFormatTypes|ommunityBoundaryStyle|ommunityLabels|ommunityRegionStyle|ompilationOptions|ompilationTarget|ompiled|omplexityFunction|ompressionLevel|onfidenceLevel|onfidenceRange|onfidenceTransform|onfigurationPath|onstants|ontentPadding|ontentSelectable|ontentSize|ontinuousAction|ontourLabels|ontourShading|ontourStyle|ontours|ontrolPlacement|ontrolType|ontrollerLinking|ontrollerMethod|ontrollerPath|ontrolsRendering|onversionRules|ookieFunction|oordinatesToolOptions|opyFunction|opyable|ornerNeighbors|ounterAssignments|ounterFunction|ounterIncrements|ounterStyleMenuListing|ovarianceEstimatorFunction|reateCellID|reateIntermediateDirectories|riterionFunction|ubics|urveClosed))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:D(?:ataRange|ataReversed|atasetTheme|ateFormat|ateFunction|ateGranularity|ateReduction|ateTicksFormat|ayCountConvention|efaultDuplicateCellStyle|efaultDuration|efaultElement|efaultFontProperties|efaultFormatType|efaultInlineFormatType|efaultNaturalLanguage|efaultNewCellStyle|efaultNewInlineCellStyle|efaultNotebook|efaultOptions|efaultPrintPrecision|efaultStyleDefinitions|einitialization|eletable|eleteContents|eletionWarning|elimiterAutoMatching|elimiterFlashTime|elimiterMatching|elimiters|eliveryFunction|ependentVariables|eployed|escriptorStateSpace|iacriticalPositioning|ialogProlog|ialogSymbols|igitBlock|irectedEdges|irection|iscreteVariables|ispersionEstimatorFunction|isplayAllSteps|isplayFunction|istanceFunction|istributedContexts|ithering|ividers|ockedCell|ockedCells|ynamicEvaluationTimeout|ynamicModuleValues|ynamicUpdating))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:E(?:clipseType|dgeCapacity|dgeCost|dgeLabelStyle|dgeLabels|dgeShapeFunction|dgeStyle|dgeValueRange|dgeValueSizes|dgeWeight|ditCellTagsSettings|ditable|lidedForms|nabled|pilog|pilogFunction|scapeRadius|valuatable|valuationCompletionAction|valuationElements|valuationMonitor|valuator|valuatorNames|ventLabels|xcludePods|xcludedContexts|xcludedForms|xcludedLines|xcludedPhysicalQuantities|xclusions|xclusionsStyle|xponentFunction|xponentPosition|xponentStep|xponentialFamily|xportAutoReplacements|xpressionUUID|xtension|xtentElementFunction|xtentMarkers|xtentSize|xternalDataCharacterEncoding|xternalOptions|xternalTypeSignature))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:F(?:aceGrids|aceGridsStyle|ailureAction|eatureNames|eatureTypes|eedbackSector|eedbackSectorStyle|eedbackType|ieldCompletionFunction|ieldHint|ieldHintStyle|ieldMasked|ieldSize|ileNameDialogSettings|ileNameForms|illing|illingStyle|indSettings|itRegularization|ollowRedirects|ontColor|ontFamily|ontSize|ontSlant|ontSubstitutions|ontTracking|ontVariations|ontWeight|orceVersionInstall|ormBoxOptions|ormLayoutFunction|ormProtectionMethod|ormatType|ormatTypeAutoConvert|ourierParameters|ractionBoxOptions|ractionLine|rame|rameBoxOptions|rameLabel|rameMargins|rameRate|rameStyle|rameTicks|rameTicksStyle|rontEndEventActions|unctionSpace))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:G(?:apPenalty|augeFaceElementFunction|augeFaceStyle|augeFrameElementFunction|augeFrameSize|augeFrameStyle|augeLabels|augeMarkers|augeStyle|aussianIntegers|enerateConditions|eneratedCell|eneratedDocumentBinding|eneratedParameters|eneratedQuantityMagnitudes|eneratorDescription|eneratorHistoryLength|eneratorOutputType|eoArraySize|eoBackground|eoCenter|eoGridLines|eoGridLinesStyle|eoGridRange|eoGridRangePadding|eoLabels|eoLocation|eoModel|eoProjection|eoRange|eoRangePadding|eoResolution|eoScaleBar|eoServer|eoStylingImageFunction|eoZoomLevel|radient|raphHighlight|raphHighlightStyle|raphLayerStyle|raphLayers|raphLayout|ridCreationSettings|ridDefaultElement|ridFrame|ridFrameMargins|ridLines|ridLinesStyle|roupActionBase|roupPageBreakWithin))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:H(?:eaderAlignment|eaderBackground|eaderDisplayFunction|eaderLines|eaderSize|eaderStyle|eads|elpBrowserSettings|iddenItems|olidayCalendar|yperlinkAction|yphenation))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:I(?:conRules|gnoreCase|gnoreDiacritics|gnorePunctuation|mageCaptureFunction|mageFormattingWidth|mageLabels|mageLegends|mageMargins|magePadding|magePreviewFunction|mageRegion|mageResolution|mageSize|mageSizeAction|mageSizeMultipliers|magingDevice|mportAutoReplacements|mportOptions|ncludeConstantBasis|ncludeDefinitions|ncludeDirectories|ncludeFileExtension|ncludeGeneratorTasks|ncludeInflections|ncludeMetaInformation|ncludePods|ncludeQuantities|ncludeSingularSolutions|ncludeWindowTimes|ncludedContexts|ndeterminateThreshold|nflationMethod|nheritScope|nitialSeeding|nitialization|nitializationCell|nitializationCellEvaluation|nitializationCellWarning|nputAliases|nputAssumptions|nputAutoReplacements|nsertResults|nsertionFunction|nteractive|nterleaving|nterpolationOrder|nterpolationPoints|nterpretationBoxOptions|nterpretationFunction|ntervalMarkers|ntervalMarkersStyle|nverseFunctions|temAspectRatio|temDisplayFunction|temSize|temStyle))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:J(?:oined))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:K(?:eepExistingVersion|eyCollisionFunction|eypointStrength))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:L(?:abelStyle|abelVisibility|abelingFunction|abelingSize|anguage|anguageCategory|ayerSizeFunction|eaderSize|earningRate|egendAppearance|egendFunction|egendLabel|egendLayout|egendMargins|egendMarkerSize|egendMarkers|ighting|ightingAngle|imitsPositioning|imitsPositioningTokens|ineBreakWithin|ineIndent|ineIndentMaxFraction|ineIntegralConvolutionScale|ineSpacing|inearOffsetFunction|inebreakAdjustments|inkFunction|inkProtocol|istFormat|istPickerBoxOptions|ocalizeVariables|ocatorAutoCreate|ocatorRegion|ooping))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:M(?:agnification|ailAddressValidation|ailResponseFunction|ailSettings|asking|atchLocalNames|axCellMeasure|axColorDistance|axDuration|axExtraBandwidths|axExtraConditions|axFeatureDisplacement|axFeatures|axItems|axIterations|axMixtureKernels|axOverlapFraction|axPlotPoints|axRecursion|axStepFraction|axStepSize|axSteps|emoryConstraint|enuCommandKey|enuSortingValue|enuStyle|esh|eshCellHighlight|eshCellLabel|eshCellMarker|eshCellShapeFunction|eshCellStyle|eshFunctions|eshQualityGoal|eshRefinementFunction|eshShading|eshStyle|etaInformation|ethod|inColorDistance|inIntervalSize|inPointSeparation|issingBehavior|issingDataMethod|issingDataRules|issingString|issingStyle|odal|odulus|ultiaxisArrangement|ultiedgeStyle|ultilaunchWarning|ultilineFunction|ultiselection))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:N(?:icholsGridLines|ominalVariables|onConstants|ormFunction|ormalized|ormalsFunction|otebookAutoSave|otebookBrowseDirectory|otebookConvertSettings|otebookDynamicExpression|otebookEventActions|otebookPath|otebooksMenu|otificationFunction|ullRecords|ullWords|umberFormat|umberMarks|umberMultiplier|umberPadding|umberPoint|umberSeparator|umberSigns|yquistGridLines))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:O(?:pacityFunction|pacityFunctionScaling|peratingSystem|ptionInspectorSettings|utputAutoOverwrite|utputSizeLimit|verlaps|verscriptBoxOptions|verwriteTarget))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:P(?:IDDerivativeFilter|IDFeedforward|acletSite|adding|addingSize|ageBreakAbove|ageBreakBelow|ageBreakWithin|ageFooterLines|ageFooters|ageHeaderLines|ageHeaders|ageTheme|ageWidth|alettePath|aneled|aragraphIndent|aragraphSpacing|arallelization|arameterEstimator|artBehavior|artitionGranularity|assEventsDown|assEventsUp|asteBoxFormInlineCells|ath|erformanceGoal|ermissions|haseRange|laceholderReplace|layRange|lotLabel|lotLabels|lotLayout|lotLegends|lotMarkers|lotPoints|lotRange|lotRangeClipping|lotRangePadding|lotRegion|lotStyle|lotTheme|odStates|odWidth|olarAxes|olarAxesOrigin|olarGridLines|olarTicks|oleZeroMarkers|recisionGoal|referencesPath|reprocessingRules|reserveColor|reserveImageOptions|rincipalValue|rintAction|rintPrecision|rintingCopies|rintingOptions|rintingPageRange|rintingStartingPageNumber|rintingStyleEnvironment|rintout3DPreviewer|rivateCellOptions|rivateEvaluationOptions|rivateFontOptions|rivateNotebookOptions|rivatePaths|rocessDirectory|rocessEnvironment|rocessEstimator|rogressReporting|rolog|ropagateAborts))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:Q(?:uartics))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:R(?:adicalBoxOptions|andomSeeding|asterSize|eImLabels|eImStyle|ealBlockDiagonalForm|ecognitionPrior|ecordLists|ecordSeparators|eferenceLineStyle|efreshRate|egionBoundaryStyle|egionFillingStyle|egionFunction|egionSize|egularization|enderingOptions|equiredPhysicalQuantities|esampling|esamplingMethod|esolveContextAliases|estartInterval|eturnReceiptFunction|evolutionAxis|otateLabel|otationAction|oundingRadius|owAlignments|owLines|owMinHeight|owSpacings|owsEqual|ulerUnits|untimeAttributes|untimeOptions))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:S(?:ameTest|ampleDepth|ampleRate|amplingPeriod|aveConnection|aveDefinitions|aveable|caleDivisions|caleOrigin|calePadding|caleRangeStyle|caleRanges|calingFunctions|cientificNotationThreshold|creenStyleEnvironment|criptBaselineShifts|criptLevel|criptMinSize|criptSizeMultipliers|crollPosition|crollbars|crollingOptions|ectorOrigin|ectorSpacing|electable|elfLoopStyle|eriesTermGoal|haringList|howAutoSpellCheck|howAutoStyles|howCellBracket|howCellLabel|howCellTags|howClosedCellArea|howContents|howCursorTracker|howGroupOpener|howPageBreaks|howSelection|howShortBoxForm|howSpecialCharacters|howStringCharacters|hrinkingDelay|ignPadding|ignificanceLevel|imilarityRules|ingleLetterItalics|liderBoxOptions|ortedBy|oundVolume|pacings|panAdjustments|panCharacterRounding|panLineThickness|panMaxSize|panMinSize|panSymmetric|pecificityGoal|pellingCorrection|pellingDictionaries|pellingDictionariesPath|pellingOptions|phericalRegion|plineClosed|plineDegree|plineKnots|plineWeights|qrtBoxOptions|tabilityMargins|tabilityMarginsStyle|tandardized|tartingStepSize|tateSpaceRealization|tepMonitor|trataVariables|treamColorFunction|treamColorFunctionScaling|treamMarkers|treamPoints|treamScale|treamStyle|trictInequalities|tripOnInput|tripWrapperBoxes|tructuredSelection|tyleBoxAutoDelete|tyleDefinitions|tyleHints|tyleMenuListing|tyleNameDialogSettings|tyleSheetPath|ubscriptBoxOptions|ubsuperscriptBoxOptions|ubtitleEncoding|uperscriptBoxOptions|urdForm|ynchronousInitialization|ynchronousUpdating|yntaxForm|ystemHelpPath|ystemsModelLabels))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:T(?:abFilling|abSpacings|ableAlignments|ableDepth|ableDirections|ableHeadings|ableSpacing|agBoxOptions|aggingRules|argetFunctions|argetUnits|emplateBoxOptions|emporalRegularity|estID|extAlignment|extClipboardType|extJustification|extureCoordinateFunction|extureCoordinateScaling|icks|icksStyle|imeConstraint|imeDirection|imeFormat|imeGoal|imeSystem|imeZone|okenWords|olerance|ooltipDelay|ooltipStyle|otalWidth|ouchscreenAutoZoom|ouchscreenControlPlacement|raceAbove|raceBackward|raceDepth|raceForward|raceOff|raceOn|raceOriginal|rackedSymbols|rackingFunction|raditionalFunctionNotation|ransformationClass|ransformationFunctions|ransitionDirection|ransitionDuration|ransitionEffect|ranslationOptions|ravelMethod|rendStyle|rig))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:U(?:nderoverscriptBoxOptions|nderscriptBoxOptions|ndoOptions|ndoTrackedVariables|nitSystem|nityDimensions|nsavedVariables|pdateInterval|pdatePacletSites|tilityFunction))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:V(?:alidationLength|alidationSet|alueDimensions|arianceEstimatorFunction|ectorAspectRatio|ectorColorFunction|ectorColorFunctionScaling|ectorMarkers|ectorPoints|ectorRange|ectorScaling|ectorSizes|ectorStyle|erifyConvergence|erifySecurityCertificates|erifySolutions|erifyTestAssumptions|ersionedPreferences|ertexCapacity|ertexColors|ertexCoordinates|ertexDataCoordinates|ertexLabelStyle|ertexLabels|ertexNormals|ertexShape|ertexShapeFunction|ertexSize|ertexStyle|ertexTextureCoordinates|ertexWeight|ideoEncoding|iewAngle|iewCenter|iewMatrix|iewPoint|iewProjection|iewRange|iewVector|iewVertical|isible))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:W(?:aveletScale|eights|hitePoint|indowClickSelect|indowElements|indowFloating|indowFrame|indowFrameElements|indowMargins|indowOpacity|indowSize|indowStatusArea|indowTitle|indowToolbars|ordOrientation|ordSearch|ordSelectionFunction|ordSeparators|ordSpacings|orkingPrecision|rapAround))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:Z(?:eroTest|eroWidthTimes))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:A(?:bove|fter|lgebraics|ll|nonymous|utomatic|xis))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:B(?:ack|ackward|aseline|efore|elow|lack|lue|old|ooleans|ottom|oxes|rown|yte))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:C(?:atalan|ellStyle|enter|haracter|omplexInfinity|omplexes|onstant|yan))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:D(?:ashed|efaultAxesStyle|efaultBaseStyle|efaultBoxStyle|efaultFaceGridsStyle|efaultFieldHintStyle|efaultFrameStyle|efaultFrameTicksStyle|efaultGridLinesStyle|efaultLabelStyle|efaultMenuStyle|efaultTicksStyle|efaultTooltipStyle|egree|elimiter|igitCharacter|otDashed|otted))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:E(?:|ndOfBuffer|ndOfFile|ndOfLine|ndOfString|ulerGamma|xpression))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:F(?:alse|lat|ontProperties|orward|orwardBackward|riday|ront|rontEndDynamicExpression|ull))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:G(?:eneral|laisher|oldenAngle|oldenRatio|ray|reen))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:H(?:ere|exadecimalCharacter|oldAll|oldAllComplete|oldFirst|oldRest))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:I(?:|ndeterminate|nfinity|nherited|nteger|ntegers|talic))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:K(?:hinchin))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:L(?:arge|arger|eft|etterCharacter|ightBlue|ightBrown|ightCyan|ightGray|ightGreen|ightMagenta|ightOrange|ightPink|ightPurple|ightRed|ightYellow|istable|ocked))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:M(?:achinePrecision|agenta|anual|edium|eshCellCentroid|eshCellMeasure|eshCellQuality|onday))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:N(?:HoldAll|HoldFirst|HoldRest|egativeIntegers|egativeRationals|egativeReals|oWhitespace|onNegativeIntegers|onNegativeRationals|onNegativeReals|onPositiveIntegers|onPositiveRationals|onPositiveReals|one|ow|ull|umber|umberString|umericFunction))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:O(?:neIdentity|range|rderless))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:P(?:i|ink|lain|ositiveIntegers|ositiveRationals|ositiveReals|rimes|rotected|unctuationCharacter|urple))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:R(?:ationals|eadProtected|eal|eals|ecord|ed|ight))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:S(?:aturday|equenceHold|mall|maller|panFromAbove|panFromBoth|panFromLeft|tartOfLine|tartOfString|tring|truckthrough|tub|unday))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:T(?:emporary|hick|hin|hursday|iny|oday|omorrow|op|ransparent|rue|uesday))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:U(?:ndefined|nderlined))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:W(?:ednesday|hite|hitespace|hitespaceCharacter|ord|ordBoundary|ordCharacter))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:Y(?:ellow|esterday))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:\\$(?:Aborted|ActivationKey|AllowDataUpdates|AllowInternet|AssertFunction|Assumptions|AudioInputDevices|AudioOutputDevices|BaseDirectory|BasePacletsDirectory|BatchInput|BatchOutput|ByteOrdering|CacheBaseDirectory|Canceled|CharacterEncoding|CharacterEncodings|CloudAccountName|CloudBase|CloudConnected|CloudCreditsAvailable|CloudEvaluation|CloudExpressionBase|CloudObjectNameFormat|CloudObjectURLType|CloudRootDirectory|CloudSymbolBase|CloudUserID|CloudUserUUID|CloudVersion|CommandLine|CompilationTarget|Context|ContextAliases|ContextPath|ControlActiveSetting|Cookies|CreationDate|CurrentLink|CurrentTask|DateStringFormat|DefaultAudioInputDevice|DefaultAudioOutputDevice|DefaultFrontEnd|DefaultImagingDevice|DefaultKernels|DefaultLocalBase|DefaultLocalKernel|Display|DisplayFunction|DistributedContexts|DynamicEvaluation|Echo|EmbedCodeEnvironments|EmbeddableServices|Epilog|EvaluationCloudBase|EvaluationCloudObject|EvaluationEnvironment|ExportFormats|Failed|FontFamilies|FrontEnd|FrontEndSession|GeoLocation|GeoLocationCity|GeoLocationCountry|GeoLocationSource|HomeDirectory|IgnoreEOF|ImageFormattingWidth|ImageResolution|ImagingDevice|ImagingDevices|ImportFormats|InitialDirectory|Input|InputFileName|InputStreamMethods|Inspector|InstallationDirectory|InterpreterTypes|IterationLimit|KernelCount|KernelID|Language|LibraryPath|LicenseExpirationDate|LicenseID|LicenseServer|Linked|LocalBase|LocalSymbolBase|MachineAddresses|MachineDomains|MachineEpsilon|MachineID|MachineName|MachinePrecision|MachineType|MaxExtraPrecision|MaxMachineNumber|MaxNumber|MaxPiecewiseCases|MaxPrecision|MaxRootDegree|MessageGroups|MessageList|MessagePrePrint|Messages|MinMachineNumber|MinNumber|MinPrecision|MobilePhone|ModuleNumber|NetworkConnected|NewMessage|NewSymbol|NotebookInlineStorageLimit|Notebooks|NumberMarks|OperatingSystem|Output|OutputSizeLimit|OutputStreamMethods|Packages|ParentLink|ParentProcessID|PasswordFile|Path|PathnameSeparator|PerformanceGoal|Permissions|PlotTheme|Printout3DPreviewer|ProcessID|ProcessorCount|ProcessorType|ProgressReporting|RandomGeneratorState|RecursionLimit|ReleaseNumber|RequesterAddress|RequesterCloudUserID|RequesterCloudUserUUID|RequesterWolframID|RequesterWolframUUID|RootDirectory|ScriptCommandLine|ScriptInputString|Services|SessionID|SharedFunctions|SharedVariables|SoundDisplayFunction|SynchronousEvaluation|System|SystemCharacterEncoding|SystemID|SystemShell|SystemTimeZone|SystemWordLength|TemplatePath|TemporaryDirectory|TimeUnit|TimeZone|TimeZoneEntity|TimedOut|UnitSystem|Urgent|UserAgentString|UserBaseDirectory|UserBasePacletsDirectory|UserDocumentsDirectory|UserURLBase|Username|Version|VersionNumber|WolframDocumentsDirectory|WolframID|WolframUUID))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "System`(?:A(?:bortScheduledTask|ctive|lgebraicRules|lternateImage|natomyForm|nimationCycleOffset|nimationCycleRepetitions|nimationDisplayTime|spectRatioFixed|stronomicalData|synchronousTaskObject|synchronousTasks|udioDevice|udioLooping))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:B(?:uttonEvaluator|uttonExpandable|uttonFrame|uttonMargins|uttonNote|uttonStyle))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:C(?:DFInformation|hebyshevDistance|lassifierInformation|lipFill|olorOutput|olumnForm|ompose|onstantArrayLayer|onstantPlusLayer|onstantTimesLayer|onstrainedMax|onstrainedMin|ontourGraphics|ontourLines|onversionOptions|reateScheduledTask|reateTemporary|urry))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:D(?:atabinRemove|ate|ebug|efaultColor|efaultFont|ensityGraphics|isplay|isplayString|otPlusLayer|ragAndDrop))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:E(?:dgeLabeling|dgeRenderingFunction|valuateScheduledTask|xpectedValue))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:F(?:actorComplete|ontForm|ormTheme|romDate|ullOptions))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:G(?:raphStyle|raphicsArray|raphicsSpacing|ridBaseline))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:H(?:TMLSave|eldPart|iddenSurface|omeDirectory))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:I(?:mageRotated|nstanceNormalizationLayer))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:L(?:UBackSubstitution|egendreType|ightSources|inearProgramming|inkOpen|iteral|ongestMatch))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:M(?:eshRange|oleculeEquivalentQ))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:N(?:etInformation|etSharedArray|extScheduledTaskTime|otebookCreate))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:O(?:penTemporary))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:P(?:IDData|ackingMethod|ersistentValue|ixelConstrained|lot3Matrix|lotDivision|lotJoined|olygonIntersections|redictorInformation|roperties|roperty|ropertyList|ropertyValue))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:R(?:andom|asterArray|ecognitionThreshold|elease|emoteKernelObject|emoveAsynchronousTask|emoveProperty|emoveScheduledTask|enderAll|eplaceHeldPart|esetScheduledTask|esumePacket|unScheduledTask))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:S(?:cheduledTaskActiveQ|cheduledTaskInformation|cheduledTaskObject|cheduledTasks|creenRectangle|electionAnimate|equenceAttentionLayer|equenceForm|etProperty|hading|hortestMatch|ingularValues|kinStyle|ocialMediaData|tartAsynchronousTask|tartScheduledTask|tateDimensions|topAsynchronousTask|topScheduledTask|tructuredArray|tyleForm|tylePrint|ubscripted|urfaceColor|urfaceGraphics|uspendPacket|ystemModelProgressReporting))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:T(?:eXSave|extStyle|imeWarpingCorrespondence|imeWarpingDistance|oDate|oFileName|oHeldExpression))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:U(?:RLFetch|RLFetchAsynchronous|RLSave|RLSaveAsynchronous))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:V(?:ectorScale|ertexCoordinateRules|ertexLabeling|ertexRenderingFunction))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:W(?:aitAsynchronousTask|indowMovable))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:\\$(?:AsynchronousTask|ConfiguredKernels|DefaultFont|EntityStores|FormatType|HTTPCookies|InstallationDate|MachineDomain|ProductInformation|ProgramName|RandomState|ScheduledTask|SummaryBoxDataSizeLimit|TemporaryPrefix|TextStyle|TopDirectory|UserAddOnsDirectory))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "System`(?:A(?:ctionDelay|ctionMenuBox|ctionMenuBoxOptions|ctiveItem|lgebraicRulesData|lignmentMarker|llowAdultContent|llowChatServices|llowIncomplete|nalytic|nimatorBox|nimatorBoxOptions|nimatorElements|ppendCheck|rgumentCountQ|rrow3DBox|rrowBox|uthenticate|utoEvaluateEvents|utoIndentSpacings|utoMatch|utoNumberFormatting|utoQuoteCharacters|utoScaling|utoStyleOptions|utoStyleWords|utomaticImageSize|xis3DBox|xis3DBoxOptions|xisBox|xisBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:B(?:SplineCurve3DBox|SplineCurve3DBoxOptions|SplineCurveBox|SplineCurveBoxOptions|SplineSurface3DBox|SplineSurface3DBoxOptions|ackFaceColor|ackFaceGlowColor|ackFaceOpacity|ackFaceSpecularColor|ackFaceSpecularExponent|ackFaceSurfaceAppearance|ackFaceTexture|ackgroundAppearance|ackgroundTasksSettings|acksubstitution|eveled|ezierCurve3DBox|ezierCurve3DBoxOptions|ezierCurveBox|ezierCurveBoxOptions|lankForm|ounds|ox|oxDimensions|oxForm|oxID|oxRotation|oxRotationPoint|ra|raKet|rowserCategory|uttonCell|uttonContents|uttonStyleMenuListing))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:C(?:acheGraphics|achedValue|ardinalBSplineBasis|ellBoundingBox|ellContents|ellElementSpacings|ellElementsBoundingBox|ellFrameStyle|ellInsertionPointCell|ellTrayPosition|ellTrayWidgets|hangeOptions|hannelDatabin|hannelListenerWait|hannelPreSendFunction|hartElementData|hartElementDataFunction|heckAll|heckboxBox|heckboxBoxOptions|ircleBox|lipboardNotebook|lockwiseContourIntegral|losed|losingEvent|loudConnections|loudObjectInformation|loudObjectInformationData|loudUserID|oarse|oefficientDomain|olonForm|olorSetterBox|olorSetterBoxOptions|olumnBackgrounds|ompilerEnvironmentAppend|ompletionsListPacket|omponentwiseContextMenu|ompressedData|oneBox|onicHullRegion3DBox|onicHullRegion3DBoxOptions|onicHullRegionBox|onicHullRegionBoxOptions|onnect|ontentsBoundingBox|ontextMenu|ontinuation|ontourIntegral|ontourSmoothing|ontrolAlignment|ontrollerDuration|ontrollerInformationData|onvertToPostScript|onvertToPostScriptPacket|ookies|opyTag|ounterBox|ounterBoxOptions|ounterClockwiseContourIntegral|ounterEvaluator|ounterStyle|uboidBox|uboidBoxOptions|urlyDoubleQuote|urlyQuote|ylinderBox|ylinderBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:D(?:OSTextFormat|ampingFactor|ataCompression|atasetDisplayPanel|ateDelimiters|ebugTag|ecimal|efault2DTool|efault3DTool|efaultAttachedCellStyle|efaultControlPlacement|efaultDockedCellStyle|efaultInputFormatType|efaultOutputFormatType|efaultStyle|efaultTextFormatType|efaultTextInlineFormatType|efaultValue|efineExternal|egreeLexicographic|egreeReverseLexicographic|eleteWithContents|elimitedArray|estroyAfterEvaluation|eviceOpenQ|ialogIndent|ialogLevel|ifferenceOrder|igitBlockMinimum|isableConsolePrintPacket|iskBox|iskBoxOptions|ispatchQ|isplayRules|isplayTemporary|istributionDomain|ivergence|ocumentGeneratorInformationData|omainRegistrationInformation|oubleContourIntegral|oublyInfinite|own|rawBackFaces|rawFrontFaces|rawHighlighted|ualLinearProgramming|umpGet|ynamicBox|ynamicBoxOptions|ynamicLocation|ynamicModuleBox|ynamicModuleBoxOptions|ynamicModuleParent|ynamicName|ynamicNamespace|ynamicReference|ynamicWrapperBox|ynamicWrapperBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:E(?:ditButtonSettings|liminationOrder|llipticReducedHalfPeriods|mbeddingObject|mphasizeSyntaxErrors|mpty|nableConsolePrintPacket|ndAdd|ngineEnvironment|nter|qualColumns|qualRows|quatedTo|rrorBoxOptions|rrorNorm|rrorPacket|rrorsDialogSettings|valuated|valuationMode|valuationOrder|valuationRateLimit|ventEvaluator|ventHandlerTag|xactRootIsolation|xitDialog|xpectationE|xportPacket|xpressionPacket|xternalCall|xternalFunctionName))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:F(?:EDisableConsolePrintPacket|EEnableConsolePrintPacket|ail|ileInformation|ileName|illForm|illedCurveBox|illedCurveBoxOptions|ine|itAll|lashSelection|ont|ontName|ontOpacity|ontPostScriptName|ontReencoding|ormatRules|ormatValues|rameInset|rameless|rontEndObject|rontEndResource|rontEndResourceString|rontEndStackSize|rontEndValueCache|rontEndVersion|rontFaceColor|rontFaceGlowColor|rontFaceOpacity|rontFaceSpecularColor|rontFaceSpecularExponent|rontFaceSurfaceAppearance|rontFaceTexture|ullAxes))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:G(?:eneratedCellStyles|eneric|eometricTransformation3DBox|eometricTransformation3DBoxOptions|eometricTransformationBox|eometricTransformationBoxOptions|estureHandlerTag|etContext|etFileName|etLinebreakInformationPacket|lobalPreferences|lobalSession|raphLayerLabels|raphRoot|raphics3DBox|raphics3DBoxOptions|raphicsBaseline|raphicsBox|raphicsBoxOptions|raphicsComplex3DBox|raphicsComplex3DBoxOptions|raphicsComplexBox|raphicsComplexBoxOptions|raphicsContents|raphicsData|raphicsGridBox|raphicsGroup3DBox|raphicsGroup3DBoxOptions|raphicsGroupBox|raphicsGroupBoxOptions|raphicsGrouping|raphicsStyle|reekStyle|ridBoxAlignment|ridBoxBackground|ridBoxDividers|ridBoxFrame|ridBoxItemSize|ridBoxItemStyle|ridBoxOptions|ridBoxSpacings|ridElementStyleOptions|roupOpenerColor|roupOpenerInsideFrame|roupTogetherGrouping|roupTogetherNestedGrouping))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:H(?:eadCompose|eaders|elpBrowserLookup|elpBrowserNotebook|elpViewerSettings|essian|exahedronBox|exahedronBoxOptions|ighlightString|omePage|orizontal|orizontalForm|orizontalScrollPosition|yperlinkCreationSettings|yphenationOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:I(?:conizedObject|gnoreSpellCheck|mageCache|mageCacheValid|mageEditMode|mageMarkers|mageOffset|mageRangeCache|mageSizeCache|mageSizeRaw|nactiveStyle|ncludeSingularTerm|ndent|ndentMaxFraction|ndentingNewlineSpacings|ndexCreationOptions|ndexTag|nequality|nexactNumbers|nformationData|nformationDataGrid|nlineCounterAssignments|nlineCounterIncrements|nlineRules|nputFieldBox|nputFieldBoxOptions|nputGrouping|nputSettings|nputToBoxFormPacket|nsertionPointObject|nset3DBox|nset3DBoxOptions|nsetBox|nsetBoxOptions|ntegral|nterlaced|nterpolationPrecision|nterpretTemplate|nterruptSettings|nto|nvisibleApplication|nvisibleTimes|temBox|temBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:J(?:acobian|oinedCurveBox|oinedCurveBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:K(?:|ernelExecute|et))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:L(?:abeledSlider|ambertW|anguageOptions|aunch|ayoutInformation|exicographic|icenseID|ine3DBox|ine3DBoxOptions|ineBox|ineBoxOptions|ineBreak|ineWrapParts|inearFilter|inebreakSemicolonWeighting|inkConnectedQ|inkError|inkFlush|inkHost|inkMode|inkOptions|inkReadHeld|inkService|inkWriteHeld|istPickerBoxBackground|isten|iteralSearch|ocalizeDefinitions|ocatorBox|ocatorBoxOptions|ocatorCentering|ocatorPaneBox|ocatorPaneBoxOptions|ongEqual|ongForm|oopback))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:M(?:achineID|achineName|acintoshSystemPageSetup|ainSolve|aintainDynamicCaches|akeRules|atchLocalNameQ|aterial|athMLText|athematicaNotation|axBend|axPoints|enu|enuAppearance|enuEvaluator|enuItem|enuList|ergeDifferences|essageObject|essageOptions|essagesNotebook|etaCharacters|ethodOptions|inRecursion|inSize|ode|odular|onomialOrder|ouseAppearanceTag|ouseButtons|ousePointerNote|ultiLetterItalics|ultiLetterStyle|ultiplicity|ultiscriptBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:N(?:BernoulliB|ProductFactors|SumTerms|Values|amespaceBox|amespaceBoxOptions|estedScriptRules|etworkPacketRecordingDuring|ext|onAssociative|ormalGrouping|otebookDefault|otebookInterfaceObject))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:O(?:LEData|bjectExistsQ|pen|penFunctionInspectorPacket|penSpecialOptions|penerBox|penerBoxOptions|ptionQ|ptionValueBox|ptionValueBoxOptions|ptionsPacket|utputFormData|utputGrouping|utputMathEditExpression|ver|verlayBox|verlayBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:P(?:ackPaclet|ackage|acletDirectoryAdd|acletDirectoryRemove|acletInformation|acletObjectQ|acletUpdate|ageHeight|alettesMenuSettings|aneBox|aneBoxOptions|aneSelectorBox|aneSelectorBoxOptions|anelBox|anelBoxOptions|aperWidth|arameter|arameterVariables|arentConnect|arentForm|arentList|arenthesize|artialD|asteAutoQuoteCharacters|ausedTime|eriodicInterpolation|erpendicular|ickMode|ickedElements|ivoting|lotRangeClipPlanesStyle|oint3DBox|oint3DBoxOptions|ointBox|ointBoxOptions|olygon3DBox|olygon3DBoxOptions|olygonBox|olygonBoxOptions|olygonHoleScale|olygonScale|olyhedronBox|olyhedronBoxOptions|olynomialForm|olynomials|opupMenuBox|opupMenuBoxOptions|ostScript|recedence|redictionRoot|referencesSettings|revious|rimaryPlaceholder|rintForm|rismBox|rismBoxOptions|rivateFrontEndOptions|robabilityPr|rocessStateDomain|rocessTimeDomain|rogressIndicatorBox|rogressIndicatorBoxOptions|romptForm|yramidBox|yramidBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:R(?:adioButtonBox|adioButtonBoxOptions|andomSeed|angeSpecification|aster3DBox|aster3DBoxOptions|asterBox|asterBoxOptions|ationalFunctions|awArray|awMedium|ebuildPacletData|ectangleBox|ecurringDigitsForm|eferenceMarkerStyle|eferenceMarkers|einstall|emoved|epeatedString|esourceAcquire|esourceSubmissionObject|eturnCreatesNewCell|eturnEntersInput|eturnInputFormPacket|otationBox|otationBoxOptions|oundImplies|owBackgrounds|owHeights|uleCondition|uleForm))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:S(?:aveAutoDelete|caledMousePosition|cheduledTaskInformationData|criptForm|criptRules|ectionGrouping|electWithContents|election|electionCell|electionCellCreateCell|electionCellDefaultStyle|electionCellParentStyle|electionPlaceholder|elfLoops|erviceResponse|etOptionsPacket|etSecuredAuthenticationKey|etbacks|etterBox|etterBoxOptions|howAutoConvert|howCodeAssist|howControls|howGroupOpenCloseIcon|howInvisibleCharacters|howPredictiveInterface|howSyntaxStyles|hrinkWrapBoundingBox|ingleEvaluation|ingleLetterStyle|lider2DBox|lider2DBoxOptions|ocket|olveDelayed|oundAndGraphics|pace|paceForm|panningCharacters|phereBox|phereBoxOptions|tartupSound|tringBreak|tringByteCount|tripStyleOnPaste|trokeForm|tructuredArrayHeadQ|tyleKeyMapping|tyleNames|urfaceAppearance|yntax|ystemException|ystemGet|ystemInformationData|ystemStub|ystemTest))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:T(?:ab|abViewBox|abViewBoxOptions|ableViewBox|ableViewBoxAlignment|ableViewBoxBackground|ableViewBoxHeaders|ableViewBoxItemSize|ableViewBoxItemStyle|ableViewBoxOptions|agBoxNote|agStyle|emplateEvaluate|emplateSlotSequence|emplateUnevaluated|emplateVerbatim|emporaryVariable|ensorQ|etrahedronBox|etrahedronBoxOptions|ext3DBox|ext3DBoxOptions|extBand|extBoundingBox|extBox|extForm|extLine|extParagraph|hisLink|itleGrouping|oColor|oggle|oggleFalse|ogglerBox|ogglerBoxOptions|ooBig|ooltipBox|ooltipBoxOptions|otalHeight|raceAction|raceInternal|raceLevel|rackCellChangeTimes|raditionalNotation|raditionalOrder|ransparentColor|rapEnterKey|rapSelection|ubeBSplineCurveBox|ubeBSplineCurveBoxOptions|ubeBezierCurveBox|ubeBezierCurveBoxOptions|ubeBox|ubeBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:U(?:ntrackedVariables|p|seGraphicsRange|serDefinedWavelet|sing))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:V(?:2Get|alueBox|alueBoxOptions|alueForm|aluesData|ectorGlyphData|erbose|ertical|erticalForm|iewPointSelectorSettings|iewPort|irtualGroupData|isibleCell))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:W(?:aitUntil|ebPageMetaInformation|holeCellGroupOpener|indowPersistentStyles|indowSelected|indowWidth|olframAlphaDate|olframAlphaQuantity|olframAlphaResult|olframCloudSettings))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:\\$(?:ActivationGroupID|ActivationUserRegistered|AddOnsDirectory|BoxForms|CloudConnection|CloudVersionNumber|CloudWolframEngineVersionNumber|ConditionHold|DefaultMailbox|DefaultPath|FinancialDataSource|GeoEntityTypes|GeoLocationPrecision|HTMLExportRules|HTTPRequest|LaunchDirectory|LicenseProcesses|LicenseSubprocesses|LicenseType|LinkSupported|LoadedFiles|MaxLicenseProcesses|MaxLicenseSubprocesses|MinorReleaseNumber|NetworkLicense|Off|OutputForms|PatchLevelID|PermissionsGroupBase|PipeSupported|PreferencesDirectory|PrintForms|PrintLiteral|RegisteredDeviceClasses|RegisteredUserName|SecuredAuthenticationKeyTokens|SetParentLink|SoundDisplay|SuppressInputFormHeads|SystemMemory|TraceOff|TraceOn|TracePattern|TracePostAction|TracePreAction|UserAgentLanguages|UserAgentMachine|UserAgentName|UserAgentOperatingSystem|UserAgentVersion|UserName))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "System`(?:A(?:ctiveClassification|ctiveClassificationObject|ctivePrediction|ctivePredictionObject|ddToSearchIndex|ggregatedEntityClass|ggregationLayer|ngleBisector|nimatedImage|nimationVideo|nomalyDetector|ppendLayer|pplication|pplyReaction|round|roundReplace|rrayReduce|sk|skAppend|skConfirm|skDisplay|skFunction|skState|skTemplateDisplay|skedQ|skedValue|ssessmentFunction|ssessmentResultObject|ssumeDeterministic|stroAngularSeparation|stroBackground|stroCenter|stroDistance|stroGraphics|stroGridLines|stroGridLinesStyle|stroPosition|stroProjection|stroRange|stroRangePadding|stroReferenceFrame|stroStyling|stroZoomLevel|tom|tomCoordinates|tomCount|tomDiagramCoordinates|tomLabelStyle|tomLabels|tomList|ttachCell|ttentionLayer|udioAnnotate|udioAnnotationLookup|udioIdentify|udioInstanceQ|udioPause|udioPlay|udioRecord|udioStop|udioStream|udioStreams|udioTrackApply|udioTrackSelection|utocomplete|utocompletionFunction|xiomaticTheory|xisLabel|xisObject|xisStyle))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:B(?:asicRecurrentLayer|atchNormalizationLayer|atchSize|ayesianMaximization|ayesianMaximizationObject|ayesianMinimization|ayesianMinimizationObject|esagL|innedVariogramList|inomialPointProcess|ioSequence|ioSequenceBackTranslateList|ioSequenceComplement|ioSequenceInstances|ioSequenceModify|ioSequencePlot|ioSequenceQ|ioSequenceReverseComplement|ioSequenceTranscribe|ioSequenceTranslate|itRate|lockDiagonalMatrix|lockLowerTriangularMatrix|lockUpperTriangularMatrix|lockchainAddressData|lockchainBase|lockchainBlockData|lockchainContractValue|lockchainData|lockchainGet|lockchainKeyEncode|lockchainPut|lockchainTokenData|lockchainTransaction|lockchainTransactionData|lockchainTransactionSign|lockchainTransactionSubmit|ond|ondCount|ondLabelStyle|ondLabels|ondList|ondQ|uildCompiledComponent))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:C(?:TCLossLayer|achePersistence|anvas|ast|ategoricalDistribution|atenateLayer|auchyPointProcess|hannelBase|hannelBrokerAction|hannelHistoryLength|hannelListen|hannelListener|hannelListeners|hannelObject|hannelReceiverFunction|hannelSend|hannelSubscribers|haracterNormalize|hemicalConvert|hemicalFormula|hemicalInstance|hemicalReaction|loudExpression|loudExpressions|loudRenderingMethod|ombinatorB|ombinatorC|ombinatorI|ombinatorK|ombinatorS|ombinatorW|ombinatorY|ombinedEntityClass|ompiledCodeFunction|ompiledComponent|ompiledExpressionDeclaration|ompiledLayer|ompilerCallback|ompilerEnvironment|ompilerEnvironmentAppendTo|ompilerEnvironmentObject|ompilerOptions|omplementedEntityClass|omputeUncertainty|onfirmQuiet|onformationMethod|onnectSystemModelComponents|onnectSystemModelController|onnectedMoleculeComponents|onnectedMoleculeQ|onnectionSettings|ontaining|ontentDetectorFunction|ontentFieldOptions|ontentLocationFunction|ontentObject|ontrastiveLossLayer|onvolutionLayer|reateChannel|reateCloudExpression|reateCompilerEnvironment|reateDataStructure|reateDataSystemModel|reateLicenseEntitlement|reateSearchIndex|reateSystemModel|reateTypeInstance|rossEntropyLossLayer|urrentNotebookImage|urrentScreenImage|urryApplied))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:D(?:SolveChangeVariables|ataStructure|ataStructureQ|atabaseConnect|atabaseDisconnect|atabaseReference|atabinSubmit|ateInterval|eclareCompiledComponent|econvolutionLayer|ecryptFile|eleteChannel|eleteCloudExpression|eleteElements|eleteSearchIndex|erivedKey|iggleGatesPointProcess|iggleGrattonPointProcess|igitalSignature|isableFormatting|ocumentWeightingRules|otLayer|ownValuesFunction|ropoutLayer|ynamicImage))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:E(?:choTiming|lementwiseLayer|mbeddedSQLEntityClass|mbeddedSQLExpression|mbeddingLayer|mptySpaceF|ncryptFile|ntityFunction|ntityStore|stimatedPointProcess|stimatedVariogramModel|valuationEnvironment|valuationPrivileges|xpirationDate|xpressionTree|xtendedEntityClass|xternalEvaluate|xternalFunction|xternalIdentifier|xternalObject|xternalSessionObject|xternalSessions|xternalStorageBase|xternalStorageDownload|xternalStorageGet|xternalStorageObject|xternalStoragePut|xternalStorageUpload|xternalValue|xtractLayer))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:F(?:aceRecognize|eatureDistance|eatureExtract|eatureExtraction|eatureExtractor|eatureExtractorFunction|ileConvert|ileFormatProperties|ileNameToFormatList|ileSystemTree|ilteredEntityClass|indChannels|indEquationalProof|indExternalEvaluators|indGeometricConjectures|indImageText|indIsomers|indMoleculeSubstructure|indPointProcessParameters|indSystemModelEquilibrium|indTextualAnswer|lattenLayer|orAllType|ormControl|orwardCloudCredentials|oxHReduce|rameListVideo|romRawPointer|unctionCompile|unctionCompileExport|unctionCompileExportByteArray|unctionCompileExportLibrary|unctionCompileExportString|unctionDeclaration|unctionLayer|unctionPoles))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:G(?:alleryView|atedRecurrentLayer|enerateDerivedKey|enerateDigitalSignature|enerateFileSignature|enerateSecuredAuthenticationKey|eneratedAssetFormat|eneratedAssetLocation|eoGraphValuePlot|eoOrientationData|eometricAssertion|eometricScene|eometricStep|eometricStylingRules|eometricTest|ibbsPointProcess|raphTree|ridVideo))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:H(?:andlerFunctions|andlerFunctionsKeys|ardcorePointProcess|istogramPointDensity))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:I(?:gnoreIsotopes|gnoreStereochemistry|mageAugmentationLayer|mageBoundingBoxes|mageCases|mageContainsQ|mageContents|mageGraphics|magePosition|magePyramid|magePyramidApply|mageStitch|mportedObject|ncludeAromaticBonds|ncludeHydrogens|ncludeRelatedTables|nertEvaluate|nertExpression|nfiniteFuture|nfinitePast|nhomogeneousPoissonPointProcess|nitialEvaluationHistory|nitializationObject|nitializationObjects|nitializationValue|nitialize|nputPorts|ntegrateChangeVariables|nterfaceSwitched|ntersectedEntityClass|nverseImagePyramid))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:K(?:ernelConfiguration|ernelFunction))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:L(?:earningRateMultipliers|ibraryFunctionDeclaration|icenseEntitlementObject|icenseEntitlements|icensingSettings|inearLayer|iteralType|oadCompiledComponent|ocalResponseNormalizationLayer|ongShortTermMemoryLayer|ossFunction))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:M(?:IMETypeToFormatList|ailExecute|ailFolder|ailItem|ailSearch|ailServerConnect|ailServerConnection|aternPointProcess|axDisplayedChildren|axTrainingRounds|axWordGap|eanAbsoluteLossLayer|eanAround|eanPointDensity|eanSquaredLossLayer|ergingFunction|idpoint|issingValuePattern|issingValueSynthesis|olecule|oleculeAlign|oleculeContainsQ|oleculeDraw|oleculeFreeQ|oleculeGraph|oleculeMatchQ|oleculeMaximumCommonSubstructure|oleculeModify|oleculeName|oleculePattern|oleculePlot|oleculePlot3D|oleculeProperty|oleculeQ|oleculeRecognize|oleculeSubstructureCount|oleculeValue))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:N(?:BodySimulation|BodySimulationData|earestNeighborG|estTree|etAppend|etArray|etArrayLayer|etBidirectionalOperator|etChain|etDecoder|etDelete|etDrop|etEncoder|etEvaluationMode|etExternalObject|etExtract|etFlatten|etFoldOperator|etGANOperator|etGraph|etInitialize|etInsert|etInsertSharedArrays|etJoin|etMapOperator|etMapThreadOperator|etMeasurements|etModel|etNestOperator|etPairEmbeddingOperator|etPort|etPortGradient|etPrepend|etRename|etReplace|etReplacePart|etStateObject|etTake|etTrain|etTrainResultsObject|etUnfold|etworkPacketCapture|etworkPacketRecording|etworkPacketTrace|eymanScottPointProcess|ominalScale|ormalizationLayer|umericArray|umericArrayQ|umericArrayType))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:O(?:peratorApplied|rderingLayer|rdinalScale|utputPorts|verlayVideo))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:P(?:acletSymbol|addingLayer|agination|airCorrelationG|arametricRampLayer|arentEdgeLabel|arentEdgeLabelFunction|arentEdgeLabelStyle|arentEdgeShapeFunction|arentEdgeStyle|arentEdgeStyleFunction|artLayer|artProtection|atternFilling|atternReaction|enttinenPointProcess|erpendicularBisector|ersistenceLocation|ersistenceTime|ersistentObject|ersistentObjects|ersistentSymbol|itchRecognize|laceholderLayer|laybackSettings|ointCountDistribution|ointDensity|ointDensityFunction|ointProcessEstimator|ointProcessFitTest|ointProcessParameterAssumptions|ointProcessParameterQ|ointStatisticFunction|ointValuePlot|oissonPointProcess|oolingLayer|rependLayer|roofObject|ublisherID))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:Q(?:uestionGenerator|uestionInterface|uestionObject|uestionSelector))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:R(?:andomArrayLayer|andomInstance|andomPointConfiguration|andomTree|eactionBalance|eactionBalancedQ|ecalibrationFunction|egisterExternalEvaluator|elationalDatabase|emoteAuthorizationCaching|emoteBatchJobAbort|emoteBatchJobObject|emoteBatchJobs|emoteBatchMapSubmit|emoteBatchSubmissionEnvironment|emoteBatchSubmit|emoteConnect|emoteConnectionObject|emoteEvaluate|emoteFile|emoteInputFiles|emoteProviderSettings|emoteRun|emoteRunProcess|emovalConditions|emoveAudioStream|emoveChannelListener|emoveChannelSubscribers|emoveVideoStream|eplicateLayer|eshapeLayer|esizeLayer|esourceFunction|esourceRegister|esourceRemove|esourceSubmit|esourceSystemBase|esourceSystemPath|esourceUpdate|esourceVersion|everseApplied|ipleyK|ipleyRassonRegion|ootTree|ulesTree))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:S(?:ameTestProperties|ampledEntityClass|earchAdjustment|earchIndexObject|earchIndices|earchQueryString|earchResultObject|ecuredAuthenticationKey|ecuredAuthenticationKeys|ecurityCertificate|equenceIndicesLayer|equenceLastLayer|equenceMostLayer|equencePredict|equencePredictorFunction|equenceRestLayer|equenceReverseLayer|erviceRequest|erviceSubmit|etFileFormatProperties|etSystemModel|lideShowVideo|moothPointDensity|nippet|nippetsVideo|nubPolyhedron|oftmaxLayer|olidBoundaryLoadValue|olidDisplacementCondition|olidFixedCondition|olidMechanicsPDEComponent|olidMechanicsStrain|olidMechanicsStress|ortedEntityClass|ourceLink|patialBinnedPointData|patialBoundaryCorrection|patialEstimate|patialEstimatorFunction|patialJ|patialNoiseLevel|patialObservationRegionQ|patialPointData|patialPointSelect|patialRandomnessTest|patialTransformationLayer|patialTrendFunction|peakerMatchQ|peechCases|peechInterpreter|peechRecognize|plice|tartExternalSession|tartWebSession|tereochemistryElements|traussHardcorePointProcess|traussPointProcess|ubsetCases|ubsetCount|ubsetPosition|ubsetReplace|ubtitleTrackSelection|ummationLayer|ymmetricDifference|ynthesizeMissingValues|ystemCredential|ystemCredentialData|ystemCredentialKey|ystemCredentialKeys|ystemCredentialStoreObject|ystemInstall|ystemModel|ystemModelExamples|ystemModelLinearize|ystemModelMeasurements|ystemModelParametricSimulate|ystemModelPlot|ystemModelReliability|ystemModelSimulate|ystemModelSimulateSensitivity|ystemModelSimulationData|ystemModeler|ystemModels))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:T(?:ableView|argetDevice|argetSystem|ernaryListPlot|ernaryPlotCorners|extCases|extContents|extElement|extPosition|extSearch|extSearchReport|extStructure|homasPointProcess|hreaded|hreadingLayer|ickDirection|ickLabelOrientation|ickLabelPositioning|ickLabels|ickLengths|ickPositions|oRawPointer|otalLayer|ourVideo|rainImageContentDetector|rainTextContentDetector|rainingProgressCheckpointing|rainingProgressFunction|rainingProgressMeasurements|rainingProgressReporting|rainingStoppingCriterion|rainingUpdateSchedule|ransposeLayer|ree|reeCases|reeChildren|reeCount|reeData|reeDelete|reeDepth|reeElementCoordinates|reeElementLabel|reeElementLabelFunction|reeElementLabelStyle|reeElementShape|reeElementShapeFunction|reeElementSize|reeElementSizeFunction|reeElementStyle|reeElementStyleFunction|reeExpression|reeExtract|reeFold|reeInsert|reeLayout|reeLeafCount|reeLeafQ|reeLeaves|reeLevel|reeMap|reeMapAt|reeOutline|reePosition|reeQ|reeReplacePart|reeRules|reeScan|reeSelect|reeSize|reeTraversalOrder|riangleCenter|riangleConstruct|riangleMeasurement|ypeDeclaration|ypeEvaluate|ypeOf|ypeSpecifier|yped))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:U(?:RLDownloadSubmit|nconstrainedParameters|nionedEntityClass|niqueElements|nitVectorLayer|nlabeledTree|nmanageObject|nregisterExternalEvaluator|pdateSearchIndex|seEmbeddedLibrary))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:V(?:alenceErrorHandling|alenceFilling|aluePreprocessingFunction|andermondeMatrix|arianceGammaPointProcess|ariogramFunction|ariogramModel|ectorAround|erifyDerivedKey|erifyDigitalSignature|erifyFileSignature|erifyInterpretation|ideo|ideoCapture|ideoCombine|ideoDelete|ideoExtractFrames|ideoFrameList|ideoFrameMap|ideoGenerator|ideoInsert|ideoIntervals|ideoJoin|ideoMap|ideoMapList|ideoMapTimeSeries|ideoPadding|ideoPause|ideoPlay|ideoQ|ideoRecord|ideoReplace|ideoScreenCapture|ideoSplit|ideoStop|ideoStream|ideoStreams|ideoTimeStretch|ideoTrackSelection|ideoTranscode|ideoTransparency|ideoTrim))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:W(?:ebAudioSearch|ebColumn|ebElementObject|ebExecute|ebImage|ebImageSearch|ebItem|ebRow|ebSearch|ebSessionObject|ebSessions|ebWindowObject|ikidataData|ikidataSearch|ikipediaSearch|ithCleanup|ithLock))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:Z(?:oomCenter|oomFactor))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:\\$(?:AllowExternalChannelFunctions|AudioDecoders|AudioEncoders|BlockchainBase|ChannelBase|CompilerEnvironment|CookieStore|CryptographicEllipticCurveNames|CurrentWebSession|DataStructures|DefaultNetworkInterface|DefaultProxyRules|DefaultRemoteBatchSubmissionEnvironment|DefaultRemoteKernel|DefaultSystemCredentialStore|ExternalIdentifierTypes|ExternalStorageBase|GeneratedAssetLocation|IncomingMailSettings|Initialization|InitializationContexts|MaxDisplayedChildren|NetworkInterfaces|NoValue|PersistenceBase|PersistencePath|PreInitialization|PublisherID|ResourceSystemBase|ResourceSystemPath|SSHAuthentication|ServiceCreditsAvailable|SourceLink|SubtitleDecoders|SubtitleEncoders|SystemCredentialStore|TargetSystems|TestFileName|VideoDecoders|VideoEncoders|VoiceStyles))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "System`(?:E(?:cho|xit))(?![`$[:alnum:]])", + "name": "invalid.session.wolfram" + }, + { + "match": "System`(?:I(?:n|nString))(?![`$[:alnum:]])", + "name": "invalid.session.wolfram" + }, + { + "match": "System`(?:O(?:ut))(?![`$[:alnum:]])", + "name": "invalid.session.wolfram" + }, + { + "match": "System`(?:P(?:rint))(?![`$[:alnum:]])", + "name": "invalid.session.wolfram" + }, + { + "match": "System`(?:Q(?:uit))(?![`$[:alnum:]])", + "name": "invalid.session.wolfram" + }, + { + "match": "System`(?:\\$(?:HistoryLength|Line|Post|Pre|PrePrint|PreRead|SyntaxHandler))(?![`$[:alnum:]])", + "name": "invalid.session.wolfram" + }, + { + "match": "System`(?:[$[:alpha:]][$[:alnum:]]*)(?![`$[:alnum:]])", + "name": "invalid.illegal.system.wolfram" + }, + { + "match": "(?:[$[:alpha:]][$[:alnum:]]*)(?:`(?:[$[:alpha:]][$[:alnum:]]*))+(?=\\s*(\\[(?!\\s*\\[)|@(?!@)))", + "name": "variable.function.wolfram" + }, + { + "match": "(?:[$[:alpha:]][$[:alnum:]]*)(?:`(?:[$[:alpha:]][$[:alnum:]]*))+", + "name": "symbol.unrecognized.wolfram" + }, + { + "match": "(?:[$[:alpha:]][$[:alnum:]]*)`", + "name": "invalid.illegal.wolfram" + }, + { + "match": "(?:`(?:[$[:alpha:]][$[:alnum:]]*))+(?=\\s*(\\[(?!\\s*\\[)|@(?!@)))", + "name": "variable.function.wolfram" + }, + { + "match": "(?:`(?:[$[:alpha:]][$[:alnum:]]*))+", + "name": "symbol.unrecognized.wolfram" + }, + { + "match": "`", + "name": "invalid.illegal.wolfram" + }, + { + "match": "(?:A(?:ASTriangle|PIFunction|RCHProcess|RIMAProcess|RMAProcess|RProcess|SATriangle|belianGroup|bort|bortKernels|bortProtect|bs|bsArg|bsArgPlot|bsoluteCorrelation|bsoluteCorrelationFunction|bsoluteCurrentValue|bsoluteDashing|bsoluteFileName|bsoluteOptions|bsolutePointSize|bsoluteThickness|bsoluteTime|bsoluteTiming|ccountingForm|ccumulate|ccuracy|cousticAbsorbingValue|cousticImpedanceValue|cousticNormalVelocityValue|cousticPDEComponent|cousticPressureCondition|cousticRadiationValue|cousticSoundHardValue|cousticSoundSoftCondition|ctionMenu|ctivate|cyclicGraphQ|ddSides|ddTo|ddUsers|djacencyGraph|djacencyList|djacencyMatrix|djacentMeshCells|djugate|djustTimeSeriesForecast|djustmentBox|dministrativeDivisionData|ffineHalfSpace|ffineSpace|ffineStateSpaceModel|ffineTransform|irPressureData|irSoundAttenuation|irTemperatureData|ircraftData|irportData|iryAi|iryAiPrime|iryAiZero|iryBi|iryBiPrime|iryBiZero|lgebraicIntegerQ|lgebraicNumber|lgebraicNumberDenominator|lgebraicNumberNorm|lgebraicNumberPolynomial|lgebraicNumberTrace|lgebraicUnitQ|llTrue|lphaChannel|lphabet|lphabeticOrder|lphabeticSort|lternatingFactorial|lternatingGroup|lternatives|mbientLight|mbiguityList|natomyData|natomyPlot3D|natomyStyling|nd|ndersonDarlingTest|ngerJ|ngleBracket|nglePath|nglePath3D|ngleVector|ngularGauge|nimate|nimator|nnotate|nnotation|nnotationDelete|nnotationKeys|nnotationValue|nnuity|nnuityDue|nnulus|nomalyDetection|nomalyDetectorFunction|ntihermitian|ntihermitianMatrixQ|ntisymmetric|ntisymmetricMatrixQ|ntonyms|nyOrder|nySubset|nyTrue|part|partSquareFree|ppellF1|ppend|ppendTo|pply|pplySides|pplyTo|rcCos|rcCosh|rcCot|rcCoth|rcCsc|rcCsch|rcCurvature|rcLength|rcSec|rcSech|rcSin|rcSinDistribution|rcSinh|rcTan|rcTanh|rea|rg|rgMax|rgMin|rgumentsOptions|rithmeticGeometricMean|rray|rrayComponents|rrayDepth|rrayFilter|rrayFlatten|rrayMesh|rrayPad|rrayPlot|rrayPlot3D|rrayQ|rrayResample|rrayReshape|rrayRules|rrays|rrow|rrowheads|ssert|ssociateTo|ssociation|ssociationMap|ssociationQ|ssociationThread|ssuming|symptotic|symptoticDSolveValue|symptoticEqual|symptoticEquivalent|symptoticExpectation|symptoticGreater|symptoticGreaterEqual|symptoticIntegrate|symptoticLess|symptoticLessEqual|symptoticOutputTracker|symptoticProbability|symptoticProduct|symptoticRSolveValue|symptoticSolve|symptoticSum|tomQ|ttributes|udio|udioAmplify|udioBlockMap|udioCapture|udioChannelCombine|udioChannelMix|udioChannelSeparate|udioChannels|udioData|udioDelay|udioDelete|udioDistance|udioFade|udioFrequencyShift|udioGenerator|udioInsert|udioIntervals|udioJoin|udioLength|udioLocalMeasurements|udioLoudness|udioMeasurements|udioNormalize|udioOverlay|udioPad|udioPan|udioPartition|udioPitchShift|udioPlot|udioQ|udioReplace|udioResample|udioReverb|udioReverse|udioSampleRate|udioSpectralMap|udioSpectralTransformation|udioSplit|udioTimeStretch|udioTrim|udioType|ugmentedPolyhedron|ugmentedSymmetricPolynomial|uthenticationDialog|utoRefreshed|utoSubmitting|utocorrelationTest))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:B(?:SplineBasis|SplineCurve|SplineFunction|SplineSurface|abyMonsterGroupB|ackslash|all|and|andpassFilter|andstopFilter|arChart|arChart3D|arLegend|arabasiAlbertGraphDistribution|arcodeImage|arcodeRecognize|aringhausHenzeTest|arlowProschanImportance|arnesG|artlettHannWindow|artlettWindow|aseDecode|aseEncode|aseForm|atesDistribution|attleLemarieWavelet|ecause|eckmannDistribution|eep|egin|eginDialogPacket|eginPackage|ellB|ellY|enfordDistribution|eniniDistribution|enktanderGibratDistribution|enktanderWeibullDistribution|ernoulliB|ernoulliDistribution|ernoulliGraphDistribution|ernoulliProcess|ernsteinBasis|esselFilterModel|esselI|esselJ|esselJZero|esselK|esselY|esselYZero|eta|etaBinomialDistribution|etaDistribution|etaNegativeBinomialDistribution|etaPrimeDistribution|etaRegularized|etween|etweennessCentrality|eveledPolyhedron|ezierCurve|ezierFunction|ilateralFilter|ilateralLaplaceTransform|ilateralZTransform|inCounts|inLists|inarize|inaryDeserialize|inaryDistance|inaryImageQ|inaryRead|inaryReadList|inarySerialize|inaryWrite|inomial|inomialDistribution|inomialProcess|inormalDistribution|iorthogonalSplineWavelet|ipartiteGraphQ|iquadraticFilterModel|irnbaumImportance|irnbaumSaundersDistribution|itAnd|itClear|itGet|itLength|itNot|itOr|itSet|itShiftLeft|itShiftRight|itXor|iweightLocation|iweightMidvariance|lackmanHarrisWindow|lackmanNuttallWindow|lackmanWindow|lank|lankNullSequence|lankSequence|lend|lock|lockMap|lockRandom|lomqvistBeta|lomqvistBetaTest|lur|lurring|odePlot|ohmanWindow|oole|ooleanConsecutiveFunction|ooleanConvert|ooleanCountingFunction|ooleanFunction|ooleanGraph|ooleanMaxterms|ooleanMinimize|ooleanMinterms|ooleanQ|ooleanRegion|ooleanTable|ooleanVariables|orderDimensions|orelTannerDistribution|ottomHatTransform|oundaryDiscretizeGraphics|oundaryDiscretizeRegion|oundaryMesh|oundaryMeshRegion|oundaryMeshRegionQ|oundedRegionQ|oundingRegion|oxData|oxMatrix|oxObject|oxWhiskerChart|racketingBar|rayCurtisDistance|readthFirstScan|reak|ridgeData|rightnessEqualize|roadcastStationData|rownForsytheTest|rownianBridgeProcess|ubbleChart|ubbleChart3D|uckyballGraph|uildingData|ulletGauge|usinessDayQ|utterflyGraph|utterworthFilterModel|utton|uttonBar|uttonBox|uttonNotebook|yteArray|yteArrayFormat|yteArrayFormatQ|yteArrayQ|yteArrayToString|yteCount))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:C(?:|DF|DFDeploy|DFWavelet|Form|MYKColor|SGRegion|SGRegionQ|SGRegionTree|alendarConvert|alendarData|allPacket|allout|anberraDistance|ancel|ancelButton|andlestickChart|anonicalGraph|anonicalName|anonicalWarpingCorrespondence|anonicalWarpingDistance|anonicalizePolygon|anonicalizePolyhedron|anonicalizeRegion|antorMesh|antorStaircase|ap|apForm|apitalDifferentialD|apitalize|apsuleShape|aputoD|arlemanLinearize|arlsonRC|arlsonRD|arlsonRE|arlsonRF|arlsonRG|arlsonRJ|arlsonRK|arlsonRM|armichaelLambda|aseSensitive|ases|ashflow|asoratian|atalanNumber|atch|atenate|auchyDistribution|auchyMatrix|auchyWindow|ayleyGraph|eiling|ell|ellGroup|ellGroupData|ellObject|ellPrint|ells|ellularAutomaton|ensoredDistribution|ensoring|enterArray|enterDot|enteredInterval|entralFeature|entralMoment|entralMomentGeneratingFunction|epstrogram|epstrogramArray|epstrumArray|hampernowneNumber|hanVeseBinarize|haracterCounts|haracterName|haracterRange|haracteristicFunction|haracteristicPolynomial|haracters|hebyshev1FilterModel|hebyshev2FilterModel|hebyshevT|hebyshevU|heck|heckAbort|heckArguments|heckbox|heckboxBar|hemicalData|hessboardDistance|hiDistribution|hiSquareDistribution|hineseRemainder|hoiceButtons|hoiceDialog|holeskyDecomposition|hop|hromaticPolynomial|hromaticityPlot|hromaticityPlot3D|ircle|ircleDot|ircleMinus|irclePlus|irclePoints|ircleThrough|ircleTimes|irculantGraph|ircularArcThrough|ircularOrthogonalMatrixDistribution|ircularQuaternionMatrixDistribution|ircularRealMatrixDistribution|ircularSymplecticMatrixDistribution|ircularUnitaryMatrixDistribution|ircumsphere|ityData|lassifierFunction|lassifierMeasurements|lassifierMeasurementsObject|lassify|lear|learAll|learAttributes|learCookies|learPermissions|learSystemCache|lebschGordan|lickPane|lickToCopy|lip|lock|lockGauge|lose|loseKernels|losenessCentrality|losing|loudAccountData|loudConnect|loudDeploy|loudDirectory|loudDisconnect|loudEvaluate|loudExport|loudFunction|loudGet|loudImport|loudLoggingData|loudObject|loudObjects|loudPublish|loudPut|loudSave|loudShare|loudSubmit|loudSymbol|loudUnshare|lusterClassify|lusteringComponents|lusteringMeasurements|lusteringTree|oefficient|oefficientArrays|oefficientList|oefficientRules|oifletWavelet|ollect|ollinearPoints|olon|olorBalance|olorCombine|olorConvert|olorData|olorDataFunction|olorDetect|olorDistance|olorNegate|olorProfileData|olorQ|olorQuantize|olorReplace|olorSeparate|olorSetter|olorSlider|olorToneMapping|olorize|olorsNear|olumn|ometData|ommonName|ommonUnits|ommonest|ommonestFilter|ommunityGraphPlot|ompanyData|ompatibleUnitQ|ompile|ompiledFunction|omplement|ompleteGraph|ompleteGraphQ|ompleteIntegral|ompleteKaryTree|omplex|omplexArrayPlot|omplexContourPlot|omplexExpand|omplexListPlot|omplexPlot|omplexPlot3D|omplexRegionPlot|omplexStreamPlot|omplexVectorPlot|omponentMeasurements|omposeList|omposeSeries|ompositeQ|omposition|ompoundElement|ompoundExpression|ompoundPoissonDistribution|ompoundPoissonProcess|ompoundRenewalProcess|ompress|oncaveHullMesh|ondition|onditionalExpression|onditioned|one|onfirm|onfirmAssert|onfirmBy|onfirmMatch|onformAudio|onformImages|ongruent|onicGradientFilling|onicHullRegion|onicOptimization|onjugate|onjugateTranspose|onjunction|onnectLibraryCallbackFunction|onnectedComponents|onnectedGraphComponents|onnectedGraphQ|onnectedMeshComponents|onnesWindow|onoverTest|onservativeConvectionPDETerm|onstantArray|onstantImage|onstantRegionQ|onstellationData|onstruct|ontainsAll|ontainsAny|ontainsExactly|ontainsNone|ontainsOnly|ontext|ontextToFileName|ontexts|ontinue|ontinuedFraction|ontinuedFractionK|ontinuousMarkovProcess|ontinuousTask|ontinuousTimeModelQ|ontinuousWaveletData|ontinuousWaveletTransform|ontourDetect|ontourPlot|ontourPlot3D|ontraharmonicMean|ontrol|ontrolActive|ontrollabilityGramian|ontrollabilityMatrix|ontrollableDecomposition|ontrollableModelQ|ontrollerInformation|ontrollerManipulate|ontrollerState|onvectionPDETerm|onvergents|onvexHullMesh|onvexHullRegion|onvexOptimization|onvexPolygonQ|onvexPolyhedronQ|onvexRegionQ|onvolve|onwayGroupCo1|onwayGroupCo2|onwayGroupCo3|oordinateBoundingBox|oordinateBoundingBoxArray|oordinateBounds|oordinateBoundsArray|oordinateChartData|oordinateTransform|oordinateTransformData|oplanarPoints|oprimeQ|oproduct|opulaDistribution|opyDatabin|opyDirectory|opyFile|opyToClipboard|oreNilpotentDecomposition|ornerFilter|orrelation|orrelationDistance|orrelationFunction|orrelationTest|os|osIntegral|osh|oshIntegral|osineDistance|osineWindow|ot|oth|oulombF|oulombG|oulombH1|oulombH2|ount|ountDistinct|ountDistinctBy|ountRoots|ountryData|ounts|ountsBy|ovariance|ovarianceFunction|oxIngersollRossProcess|oxModel|oxModelFit|oxianDistribution|ramerVonMisesTest|reateArchive|reateDatabin|reateDialog|reateDirectory|reateDocument|reateFile|reateManagedLibraryExpression|reateNotebook|reatePacletArchive|reatePalette|reatePermissionsGroup|reateUUID|reateWindow|riticalSection|riticalityFailureImportance|riticalitySuccessImportance|ross|rossMatrix|rossingCount|rossingDetect|rossingPolygon|sc|sch|ube|ubeRoot|uboid|umulant|umulantGeneratingFunction|umulativeFeatureImpactPlot|up|upCap|url|urrencyConvert|urrentDate|urrentImage|urrentValue|urvatureFlowFilter|ycleGraph|ycleIndexPolynomial|ycles|yclicGroup|yclotomic|ylinder|ylindricalDecomposition|ylindricalDecompositionFunction))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:D(?:|Eigensystem|Eigenvalues|GaussianWavelet|MSList|MSString|Solve|SolveValue|agumDistribution|amData|amerauLevenshteinDistance|arker|ashing|ataDistribution|atabin|atabinAdd|atabinUpload|atabins|ataset|ateBounds|ateDifference|ateHistogram|ateList|ateListLogPlot|ateListPlot|ateListStepPlot|ateObject|ateObjectQ|ateOverlapsQ|atePattern|atePlus|ateRange|ateScale|ateSelect|ateString|ateValue|ateWithinQ|ated|atedUnit|aubechiesWavelet|avisDistribution|awsonF|ayCount|ayHemisphere|ayMatchQ|ayName|ayNightTerminator|ayPlus|ayRange|ayRound|aylightQ|eBruijnGraph|eBruijnSequence|ecapitalize|ecimalForm|eclarePackage|ecompose|ecrement|ecrypt|edekindEta|eepSpaceProbeData|efault|efaultButton|efaultValues|efer|efineInputStreamMethod|efineOutputStreamMethod|efineResourceFunction|efinition|egreeCentrality|egreeGraphDistribution|el|elaunayMesh|elayed|elete|eleteAdjacentDuplicates|eleteAnomalies|eleteBorderComponents|eleteCases|eleteDirectory|eleteDuplicates|eleteDuplicatesBy|eleteFile|eleteMissing|eleteObject|eletePermissionsKey|eleteSmallComponents|eleteStopwords|elimitedSequence|endrogram|enominator|ensityHistogram|ensityPlot|ensityPlot3D|eploy|epth|epthFirstScan|erivative|erivativeFilter|erivativePDETerm|esignMatrix|et|eviceClose|eviceConfigure|eviceExecute|eviceExecuteAsynchronous|eviceObject|eviceOpen|eviceRead|eviceReadBuffer|eviceReadLatest|eviceReadList|eviceReadTimeSeries|eviceStreams|eviceWrite|eviceWriteBuffer|evices|iagonal|iagonalMatrix|iagonalMatrixQ|iagonalizableMatrixQ|ialog|ialogInput|ialogNotebook|ialogReturn|iamond|iamondMatrix|iceDissimilarity|ictionaryLookup|ictionaryWordQ|ifferenceDelta|ifferenceQuotient|ifferenceRoot|ifferenceRootReduce|ifferences|ifferentialD|ifferentialRoot|ifferentialRootReduce|ifferentiatorFilter|iffusionPDETerm|igitCount|igitQ|ihedralAngle|ihedralGroup|ilation|imensionReduce|imensionReducerFunction|imensionReduction|imensionalCombinations|imensionalMeshComponents|imensions|iracComb|iracDelta|irectedEdge|irectedGraph|irectedGraphQ|irectedInfinity|irectionalLight|irective|irectory|irectoryName|irectoryQ|irectoryStack|irichletBeta|irichletCharacter|irichletCondition|irichletConvolve|irichletDistribution|irichletEta|irichletL|irichletLambda|irichletTransform|irichletWindow|iscreteAsymptotic|iscreteChirpZTransform|iscreteConvolve|iscreteDelta|iscreteHadamardTransform|iscreteIndicator|iscreteInputOutputModel|iscreteLQEstimatorGains|iscreteLQRegulatorGains|iscreteLimit|iscreteLyapunovSolve|iscreteMarkovProcess|iscreteMaxLimit|iscreteMinLimit|iscretePlot|iscretePlot3D|iscreteRatio|iscreteRiccatiSolve|iscreteShift|iscreteTimeModelQ|iscreteUniformDistribution|iscreteWaveletData|iscreteWaveletPacketTransform|iscreteWaveletTransform|iscretizeGraphics|iscretizeRegion|iscriminant|isjointQ|isjunction|isk|iskMatrix|iskSegment|ispatch|isplayEndPacket|isplayForm|isplayPacket|istanceMatrix|istanceTransform|istribute|istributeDefinitions|istributed|istributionChart|istributionFitTest|istributionParameterAssumptions|istributionParameterQ|iv|ivide|ivideBy|ivideSides|ivisible|ivisorSigma|ivisorSum|ivisors|o|ocumentGenerator|ocumentGeneratorInformation|ocumentGenerators|ocumentNotebook|odecahedron|ominantColors|ominatorTreeGraph|ominatorVertexList|ot|otEqual|oubleBracketingBar|oubleDownArrow|oubleLeftArrow|oubleLeftRightArrow|oubleLeftTee|oubleLongLeftArrow|oubleLongLeftRightArrow|oubleLongRightArrow|oubleRightArrow|oubleRightTee|oubleUpArrow|oubleUpDownArrow|oubleVerticalBar|ownArrow|ownArrowBar|ownArrowUpArrow|ownLeftRightVector|ownLeftTeeVector|ownLeftVector|ownLeftVectorBar|ownRightTeeVector|ownRightVector|ownRightVectorBar|ownTee|ownTeeArrow|ownValues|ownsample|razinInverse|rop|ropShadowing|t|ualPlanarGraph|ualPolyhedron|ualSystemsModel|umpSave|uplicateFreeQ|uration|ynamic|ynamicGeoGraphics|ynamicModule|ynamicSetting|ynamicWrapper))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:E(?:arthImpactData|arthquakeData|ccentricityCentrality|choEvaluation|choFunction|choLabel|dgeAdd|dgeBetweennessCentrality|dgeChromaticNumber|dgeConnectivity|dgeContract|dgeCount|dgeCoverQ|dgeCycleMatrix|dgeDelete|dgeDetect|dgeForm|dgeIndex|dgeList|dgeQ|dgeRules|dgeTaggedGraph|dgeTaggedGraphQ|dgeTags|dgeTransitiveGraphQ|dgeWeightedGraphQ|ditDistance|ffectiveInterest|igensystem|igenvalues|igenvectorCentrality|igenvectors|lement|lementData|liminate|llipsoid|llipticE|llipticExp|llipticExpPrime|llipticF|llipticFilterModel|llipticK|llipticLog|llipticNomeQ|llipticPi|llipticTheta|llipticThetaPrime|mbedCode|mbeddedHTML|mbeddedService|mitSound|mpiricalDistribution|mptyGraphQ|mptyRegion|nclose|ncode|ncrypt|ncryptedObject|nd|ndDialogPacket|ndPackage|ngineeringForm|nterExpressionPacket|nterTextPacket|ntity|ntityClass|ntityClassList|ntityCopies|ntityGroup|ntityInstance|ntityList|ntityPrefetch|ntityProperties|ntityProperty|ntityPropertyClass|ntityRegister|ntityStores|ntityTypeName|ntityUnregister|ntityValue|ntropy|ntropyFilter|nvironment|qual|qualTilde|qualTo|quilibrium|quirippleFilterKernel|quivalent|rf|rfc|rfi|rlangB|rlangC|rlangDistribution|rosion|rrorBox|stimatedBackground|stimatedDistribution|stimatedPointNormals|stimatedProcess|stimatorGains|stimatorRegulator|uclideanDistance|ulerAngles|ulerCharacteristic|ulerE|ulerMatrix|ulerPhi|ulerianGraphQ|valuate|valuatePacket|valuationBox|valuationCell|valuationData|valuationNotebook|valuationObject|venQ|ventData|ventHandler|ventSeries|xactBlackmanWindow|xactNumberQ|xampleData|xcept|xists|xoplanetData|xp|xpGammaDistribution|xpIntegralE|xpIntegralEi|xpToTrig|xpand|xpandAll|xpandDenominator|xpandFileName|xpandNumerator|xpectation|xponent|xponentialDistribution|xponentialGeneratingFunction|xponentialMovingAverage|xponentialPowerDistribution|xport|xportByteArray|xportForm|xportString|xpressionCell|xpressionGraph|xtendedGCD|xternalBundle|xtract|xtractArchive|xtractPacletArchive|xtremeValueDistribution))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:F(?:ARIMAProcess|RatioDistribution|aceAlign|aceForm|acialFeatures|actor|actorInteger|actorList|actorSquareFree|actorSquareFreeList|actorTerms|actorTermsList|actorial|actorial2|actorialMoment|actorialMomentGeneratingFunction|actorialPower|ailure|ailureDistribution|ailureQ|areySequence|eatureImpactPlot|eatureNearest|eatureSpacePlot|eatureSpacePlot3D|eatureValueDependencyPlot|eatureValueImpactPlot|eedbackLinearize|etalGrowthData|ibonacci|ibonorial|ile|ileBaseName|ileByteCount|ileDate|ileExistsQ|ileExtension|ileFormat|ileFormatQ|ileHash|ileNameDepth|ileNameDrop|ileNameJoin|ileNameSetter|ileNameSplit|ileNameTake|ileNames|ilePrint|ileSize|ileSystemMap|ileSystemScan|ileTemplate|ileTemplateApply|ileType|illedCurve|illedTorus|illingTransform|ilterRules|inancialBond|inancialData|inancialDerivative|inancialIndicator|ind|indAnomalies|indArgMax|indArgMin|indClique|indClusters|indCookies|indCurvePath|indCycle|indDevices|indDistribution|indDistributionParameters|indDivisions|indEdgeColoring|indEdgeCover|indEdgeCut|indEdgeIndependentPaths|indEulerianCycle|indFaces|indFile|indFit|indFormula|indFundamentalCycles|indGeneratingFunction|indGeoLocation|indGeometricTransform|indGraphCommunities|indGraphIsomorphism|indGraphPartition|indHamiltonianCycle|indHamiltonianPath|indHiddenMarkovStates|indIndependentEdgeSet|indIndependentVertexSet|indInstance|indIntegerNullVector|indIsomorphicSubgraph|indKClan|indKClique|indKClub|indKPlex|indLibrary|indLinearRecurrence|indList|indMatchingColor|indMaxValue|indMaximum|indMaximumCut|indMaximumFlow|indMeshDefects|indMinValue|indMinimum|indMinimumCostFlow|indMinimumCut|indPath|indPeaks|indPermutation|indPlanarColoring|indPostmanTour|indProcessParameters|indRegionTransform|indRepeat|indRoot|indSequenceFunction|indShortestPath|indShortestTour|indSpanningTree|indSubgraphIsomorphism|indThreshold|indTransientRepeat|indVertexColoring|indVertexCover|indVertexCut|indVertexIndependentPaths|inishDynamic|initeAbelianGroupCount|initeGroupCount|initeGroupData|irst|irstCase|irstPassageTimeDistribution|irstPosition|ischerGroupFi22|ischerGroupFi23|ischerGroupFi24Prime|isherHypergeometricDistribution|isherRatioTest|isherZDistribution|it|ittedModel|ixedOrder|ixedPoint|ixedPointList|latShading|latTopWindow|latten|lattenAt|lightData|lipView|loor|lowPolynomial|old|oldList|oldPair|oldPairList|oldWhile|oldWhileList|or|orAll|ormBox|ormFunction|ormObject|ormPage|ormat|ormulaData|ormulaLookup|ortranForm|ourier|ourierCoefficient|ourierCosCoefficient|ourierCosSeries|ourierCosTransform|ourierDCT|ourierDCTFilter|ourierDCTMatrix|ourierDST|ourierDSTMatrix|ourierMatrix|ourierSequenceTransform|ourierSeries|ourierSinCoefficient|ourierSinSeries|ourierSinTransform|ourierTransform|ourierTrigSeries|oxH|ractionBox|ractionalBrownianMotionProcess|ractionalD|ractionalGaussianNoiseProcess|ractionalPart|rameBox|ramed|rechetDistribution|reeQ|renetSerretSystem|requencySamplingFilterKernel|resnelC|resnelF|resnelG|resnelS|robeniusNumber|robeniusSolve|romAbsoluteTime|romCharacterCode|romCoefficientRules|romContinuedFraction|romDMS|romDateString|romDigits|romEntity|romJulianDate|romLetterNumber|romPolarCoordinates|romRomanNumeral|romSphericalCoordinates|romUnixTime|rontEndExecute|rontEndToken|rontEndTokenExecute|ullDefinition|ullForm|ullGraphics|ullInformationOutputRegulator|ullRegion|ullSimplify|unction|unctionAnalytic|unctionBijective|unctionContinuous|unctionConvexity|unctionDiscontinuities|unctionDomain|unctionExpand|unctionInjective|unctionInterpolation|unctionMeromorphic|unctionMonotonicity|unctionPeriod|unctionRange|unctionSign|unctionSingularities|unctionSurjective|ussellVeselyImportance))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:G(?:ARCHProcess|CD|aborFilter|aborMatrix|aborWavelet|ainMargins|ainPhaseMargins|alaxyData|amma|ammaDistribution|ammaRegularized|ather|atherBy|aussianFilter|aussianMatrix|aussianOrthogonalMatrixDistribution|aussianSymplecticMatrixDistribution|aussianUnitaryMatrixDistribution|aussianWindow|egenbauerC|eneralizedLinearModelFit|enerateAsymmetricKeyPair|enerateDocument|enerateHTTPResponse|enerateSymmetricKey|eneratingFunction|enericCylindricalDecomposition|enomeData|enomeLookup|eoAntipode|eoArea|eoBoundary|eoBoundingBox|eoBounds|eoBoundsRegion|eoBoundsRegionBoundary|eoBubbleChart|eoCircle|eoContourPlot|eoDensityPlot|eoDestination|eoDirection|eoDisk|eoDisplacement|eoDistance|eoDistanceList|eoElevationData|eoEntities|eoGraphPlot|eoGraphics|eoGridDirectionDifference|eoGridPosition|eoGridUnitArea|eoGridUnitDistance|eoGridVector|eoGroup|eoHemisphere|eoHemisphereBoundary|eoHistogram|eoIdentify|eoImage|eoLength|eoListPlot|eoMarker|eoNearest|eoPath|eoPolygon|eoPosition|eoPositionENU|eoPositionXYZ|eoProjectionData|eoRegionValuePlot|eoSmoothHistogram|eoStreamPlot|eoStyling|eoVariant|eoVector|eoVectorENU|eoVectorPlot|eoVectorXYZ|eoVisibleRegion|eoVisibleRegionBoundary|eoWithinQ|eodesicClosing|eodesicDilation|eodesicErosion|eodesicOpening|eodesicPolyhedron|eodesyData|eogravityModelData|eologicalPeriodData|eomagneticModelData|eometricBrownianMotionProcess|eometricDistribution|eometricMean|eometricMeanFilter|eometricOptimization|eometricTransformation|estureHandler|et|etEnvironment|lobalClusteringCoefficient|low|ompertzMakehamDistribution|oochShading|oodmanKruskalGamma|oodmanKruskalGammaTest|oto|ouraudShading|rad|radientFilter|radientFittedMesh|radientOrientationFilter|rammarApply|rammarRules|rammarToken|raph|raph3D|raphAssortativity|raphAutomorphismGroup|raphCenter|raphComplement|raphData|raphDensity|raphDiameter|raphDifference|raphDisjointUnion|raphDistance|raphDistanceMatrix|raphEmbedding|raphHub|raphIntersection|raphJoin|raphLinkEfficiency|raphPeriphery|raphPlot|raphPlot3D|raphPower|raphProduct|raphPropertyDistribution|raphQ|raphRadius|raphReciprocity|raphSum|raphUnion|raphics|raphics3D|raphicsColumn|raphicsComplex|raphicsGrid|raphicsGroup|raphicsRow|rayLevel|reater|reaterEqual|reaterEqualLess|reaterEqualThan|reaterFullEqual|reaterGreater|reaterLess|reaterSlantEqual|reaterThan|reaterTilde|reenFunction|rid|ridBox|ridGraph|roebnerBasis|roupBy|roupCentralizer|roupElementFromWord|roupElementPosition|roupElementQ|roupElementToWord|roupElements|roupGenerators|roupMultiplicationTable|roupOrbits|roupOrder|roupSetwiseStabilizer|roupStabilizer|roupStabilizerChain|roupings|rowCutComponents|udermannian|uidedFilter|umbelDistribution))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:H(?:ITSCentrality|TTPErrorResponse|TTPRedirect|TTPRequest|TTPRequestData|TTPResponse|aarWavelet|adamardMatrix|alfLine|alfNormalDistribution|alfPlane|alfSpace|alftoneShading|amiltonianGraphQ|ammingDistance|ammingWindow|ankelH1|ankelH2|ankelMatrix|ankelTransform|annPoissonWindow|annWindow|aradaNortonGroupHN|araryGraph|armonicMean|armonicMeanFilter|armonicNumber|ash|atchFilling|atchShading|aversine|azardFunction|ead|eatFluxValue|eatInsulationValue|eatOutflowValue|eatRadiationValue|eatSymmetryValue|eatTemperatureCondition|eatTransferPDEComponent|eatTransferValue|eavisideLambda|eavisidePi|eavisideTheta|eldGroupHe|elmholtzPDEComponent|ermiteDecomposition|ermiteH|ermitian|ermitianMatrixQ|essenbergDecomposition|eunB|eunBPrime|eunC|eunCPrime|eunD|eunDPrime|eunG|eunGPrime|eunT|eunTPrime|exahedron|iddenMarkovProcess|ighlightGraph|ighlightImage|ighlightMesh|ighlighted|ighpassFilter|igmanSimsGroupHS|ilbertCurve|ilbertFilter|ilbertMatrix|istogram|istogram3D|istogramDistribution|istogramList|istogramTransform|istogramTransformInterpolation|istoricalPeriodData|itMissTransform|jorthDistribution|odgeDual|oeffdingD|oeffdingDTest|old|oldComplete|oldForm|oldPattern|orizontalGauge|ornerForm|ostLookup|otellingTSquareDistribution|oytDistribution|ue|umanGrowthData|umpDownHump|umpEqual|urwitzLerchPhi|urwitzZeta|yperbolicDistribution|ypercubeGraph|yperexponentialDistribution|yperfactorial|ypergeometric0F1|ypergeometric0F1Regularized|ypergeometric1F1|ypergeometric1F1Regularized|ypergeometric2F1|ypergeometric2F1Regularized|ypergeometricDistribution|ypergeometricPFQ|ypergeometricPFQRegularized|ypergeometricU|yperlink|yperplane|ypoexponentialDistribution|ypothesisTestData))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:I(?:PAddress|conData|conize|cosahedron|dentity|dentityMatrix|f|fCompiled|gnoringInactive|m|mage|mage3D|mage3DProjection|mage3DSlices|mageAccumulate|mageAdd|mageAdjust|mageAlign|mageApply|mageApplyIndexed|mageAspectRatio|mageAssemble|mageCapture|mageChannels|mageClip|mageCollage|mageColorSpace|mageCompose|mageConvolve|mageCooccurrence|mageCorners|mageCorrelate|mageCorrespondingPoints|mageCrop|mageData|mageDeconvolve|mageDemosaic|mageDifference|mageDimensions|mageDisplacements|mageDistance|mageEffect|mageExposureCombine|mageFeatureTrack|mageFileApply|mageFileFilter|mageFileScan|mageFilter|mageFocusCombine|mageForestingComponents|mageForwardTransformation|mageHistogram|mageIdentify|mageInstanceQ|mageKeypoints|mageLevels|mageLines|mageMarker|mageMeasurements|mageMesh|mageMultiply|magePad|magePartition|magePeriodogram|magePerspectiveTransformation|mageQ|mageRecolor|mageReflect|mageResize|mageRestyle|mageRotate|mageSaliencyFilter|mageScaled|mageScan|mageSubtract|mageTake|mageTransformation|mageTrim|mageType|mageValue|mageValuePositions|mageVectorscopePlot|mageWaveformPlot|mplicitD|mplicitRegion|mplies|mport|mportByteArray|mportString|mprovementImportance|nactivate|nactive|ncidenceGraph|ncidenceList|ncidenceMatrix|ncrement|ndefiniteMatrixQ|ndependenceTest|ndependentEdgeSetQ|ndependentPhysicalQuantity|ndependentUnit|ndependentUnitDimension|ndependentVertexSetQ|ndexEdgeTaggedGraph|ndexGraph|ndexed|nexactNumberQ|nfiniteLine|nfiniteLineThrough|nfinitePlane|nfix|nflationAdjust|nformation|nhomogeneousPoissonProcess|nner|nnerPolygon|nnerPolyhedron|npaint|nput|nputField|nputForm|nputNamePacket|nputNotebook|nputPacket|nputStream|nputString|nputStringPacket|nsert|nsertLinebreaks|nset|nsphere|nstall|nstallService|ntegerDigits|ntegerExponent|ntegerLength|ntegerName|ntegerPart|ntegerPartitions|ntegerQ|ntegerReverse|ntegerString|ntegrate|nteractiveTradingChart|nternallyBalancedDecomposition|nterpolatingFunction|nterpolatingPolynomial|nterpolation|nterpretation|nterpretationBox|nterpreter|nterquartileRange|nterrupt|ntersectingQ|ntersection|nterval|ntervalIntersection|ntervalMemberQ|ntervalSlider|ntervalUnion|nverse|nverseBetaRegularized|nverseBilateralLaplaceTransform|nverseBilateralZTransform|nverseCDF|nverseChiSquareDistribution|nverseContinuousWaveletTransform|nverseDistanceTransform|nverseEllipticNomeQ|nverseErf|nverseErfc|nverseFourier|nverseFourierCosTransform|nverseFourierSequenceTransform|nverseFourierSinTransform|nverseFourierTransform|nverseFunction|nverseGammaDistribution|nverseGammaRegularized|nverseGaussianDistribution|nverseGudermannian|nverseHankelTransform|nverseHaversine|nverseJacobiCD|nverseJacobiCN|nverseJacobiCS|nverseJacobiDC|nverseJacobiDN|nverseJacobiDS|nverseJacobiNC|nverseJacobiND|nverseJacobiNS|nverseJacobiSC|nverseJacobiSD|nverseJacobiSN|nverseLaplaceTransform|nverseMellinTransform|nversePermutation|nverseRadon|nverseRadonTransform|nverseSeries|nverseShortTimeFourier|nverseSpectrogram|nverseSurvivalFunction|nverseTransformedRegion|nverseWaveletTransform|nverseWeierstrassP|nverseWishartMatrixDistribution|nverseZTransform|nvisible|rreduciblePolynomialQ|slandData|solatingInterval|somorphicGraphQ|somorphicSubgraphQ|sotopeData|tem|toProcess))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:J(?:accardDissimilarity|acobiAmplitude|acobiCD|acobiCN|acobiCS|acobiDC|acobiDN|acobiDS|acobiEpsilon|acobiNC|acobiND|acobiNS|acobiP|acobiSC|acobiSD|acobiSN|acobiSymbol|acobiZN|acobiZeta|ankoGroupJ1|ankoGroupJ2|ankoGroupJ3|ankoGroupJ4|arqueBeraALMTest|ohnsonDistribution|oin|oinAcross|oinForm|oinedCurve|ordanDecomposition|ordanModelDecomposition|uliaSetBoettcher|uliaSetIterationCount|uliaSetPlot|uliaSetPoints|ulianDate))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:K(?:CoreComponents|Distribution|EdgeConnectedComponents|EdgeConnectedGraphQ|VertexConnectedComponents|VertexConnectedGraphQ|agiChart|aiserBesselWindow|aiserWindow|almanEstimator|almanFilter|arhunenLoeveDecomposition|aryTree|atzCentrality|elvinBei|elvinBer|elvinKei|elvinKer|endallTau|endallTauTest|ernelMixtureDistribution|ernelObject|ernels|ey|eyComplement|eyDrop|eyDropFrom|eyExistsQ|eyFreeQ|eyIntersection|eyMap|eyMemberQ|eySelect|eySort|eySortBy|eyTake|eyUnion|eyValueMap|eyValuePattern|eys|illProcess|irchhoffGraph|irchhoffMatrix|leinInvariantJ|napsackSolve|nightTourGraph|notData|nownUnitQ|ochCurve|olmogorovSmirnovTest|roneckerDelta|roneckerModelDecomposition|roneckerProduct|roneckerSymbol|uiperTest|umaraswamyDistribution|urtosis|uwaharaFilter))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:L(?:ABColor|CHColor|CM|QEstimatorGains|QGRegulator|QOutputRegulatorGains|QRegulatorGains|UDecomposition|UVColor|abel|abeled|aguerreL|akeData|ambdaComponents|ameC|ameCPrime|ameEigenvalueA|ameEigenvalueB|ameS|ameSPrime|aminaData|anczosWindow|andauDistribution|anguageData|anguageIdentify|aplaceDistribution|aplaceTransform|aplacian|aplacianFilter|aplacianGaussianFilter|aplacianPDETerm|ast|atitude|atitudeLongitude|atticeData|atticeReduce|aunchKernels|ayeredGraphPlot|ayeredGraphPlot3D|eafCount|eapVariant|eapYearQ|earnDistribution|earnedDistribution|eastSquares|eastSquaresFilterKernel|eftArrow|eftArrowBar|eftArrowRightArrow|eftDownTeeVector|eftDownVector|eftDownVectorBar|eftRightArrow|eftRightVector|eftTee|eftTeeArrow|eftTeeVector|eftTriangle|eftTriangleBar|eftTriangleEqual|eftUpDownVector|eftUpTeeVector|eftUpVector|eftUpVectorBar|eftVector|eftVectorBar|egended|egendreP|egendreQ|ength|engthWhile|erchPhi|ess|essEqual|essEqualGreater|essEqualThan|essFullEqual|essGreater|essLess|essSlantEqual|essThan|essTilde|etterCounts|etterNumber|etterQ|evel|eveneTest|eviCivitaTensor|evyDistribution|exicographicOrder|exicographicSort|ibraryDataType|ibraryFunction|ibraryFunctionError|ibraryFunctionInformation|ibraryFunctionLoad|ibraryFunctionUnload|ibraryLoad|ibraryUnload|iftingFilterData|iftingWaveletTransform|ighter|ikelihood|imit|indleyDistribution|ine|ineBreakChart|ineGraph|ineIntegralConvolutionPlot|ineLegend|inearFractionalOptimization|inearFractionalTransform|inearGradientFilling|inearGradientImage|inearModelFit|inearOptimization|inearRecurrence|inearSolve|inearSolveFunction|inearizingTransformationData|inkActivate|inkClose|inkConnect|inkCreate|inkInterrupt|inkLaunch|inkObject|inkPatterns|inkRankCentrality|inkRead|inkReadyQ|inkWrite|inks|iouvilleLambda|ist|istAnimate|istContourPlot|istContourPlot3D|istConvolve|istCorrelate|istCurvePathPlot|istDeconvolve|istDensityPlot|istDensityPlot3D|istFourierSequenceTransform|istInterpolation|istLineIntegralConvolutionPlot|istLinePlot|istLinePlot3D|istLogLinearPlot|istLogLogPlot|istLogPlot|istPicker|istPickerBox|istPlay|istPlot|istPlot3D|istPointPlot3D|istPolarPlot|istQ|istSliceContourPlot3D|istSliceDensityPlot3D|istSliceVectorPlot3D|istStepPlot|istStreamDensityPlot|istStreamPlot|istStreamPlot3D|istSurfacePlot3D|istVectorDensityPlot|istVectorDisplacementPlot|istVectorDisplacementPlot3D|istVectorPlot|istVectorPlot3D|istZTransform|ocalAdaptiveBinarize|ocalCache|ocalClusteringCoefficient|ocalEvaluate|ocalObject|ocalObjects|ocalSubmit|ocalSymbol|ocalTime|ocalTimeZone|ocationEquivalenceTest|ocationTest|ocator|ocatorPane|og|og10|og2|ogBarnesG|ogGamma|ogGammaDistribution|ogIntegral|ogLikelihood|ogLinearPlot|ogLogPlot|ogLogisticDistribution|ogMultinormalDistribution|ogNormalDistribution|ogPlot|ogRankTest|ogSeriesDistribution|ogicalExpand|ogisticDistribution|ogisticSigmoid|ogitModelFit|ongLeftArrow|ongLeftRightArrow|ongRightArrow|ongest|ongestCommonSequence|ongestCommonSequencePositions|ongestCommonSubsequence|ongestCommonSubsequencePositions|ongestOrderedSequence|ongitude|ookup|oopFreeGraphQ|owerCaseQ|owerLeftArrow|owerRightArrow|owerTriangularMatrix|owerTriangularMatrixQ|owerTriangularize|owpassFilter|ucasL|uccioSamiComponents|unarEclipse|yapunovSolve|yonsGroupLy))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:M(?:AProcess|achineNumberQ|agnify|ailReceiverFunction|ajority|akeBoxes|akeExpression|anagedLibraryExpressionID|anagedLibraryExpressionQ|andelbrotSetBoettcher|andelbrotSetDistance|andelbrotSetIterationCount|andelbrotSetMemberQ|andelbrotSetPlot|angoldtLambda|anhattanDistance|anipulate|anipulator|annWhitneyTest|annedSpaceMissionData|antissaExponent|ap|apAll|apApply|apAt|apIndexed|apThread|archenkoPasturDistribution|arcumQ|ardiaCombinedTest|ardiaKurtosisTest|ardiaSkewnessTest|arginalDistribution|arkovProcessProperties|assConcentrationCondition|assFluxValue|assImpermeableBoundaryValue|assOutflowValue|assSymmetryValue|assTransferValue|assTransportPDEComponent|atchQ|atchingDissimilarity|aterialShading|athMLForm|athematicalFunctionData|athieuC|athieuCPrime|athieuCharacteristicA|athieuCharacteristicB|athieuCharacteristicExponent|athieuGroupM11|athieuGroupM12|athieuGroupM22|athieuGroupM23|athieuGroupM24|athieuS|athieuSPrime|atrices|atrixExp|atrixForm|atrixFunction|atrixLog|atrixNormalDistribution|atrixPlot|atrixPower|atrixPropertyDistribution|atrixQ|atrixRank|atrixTDistribution|ax|axDate|axDetect|axFilter|axLimit|axMemoryUsed|axStableDistribution|axValue|aximalBy|aximize|axwellDistribution|cLaughlinGroupMcL|ean|eanClusteringCoefficient|eanDegreeConnectivity|eanDeviation|eanFilter|eanGraphDistance|eanNeighborDegree|eanShift|eanShiftFilter|edian|edianDeviation|edianFilter|edicalTestData|eijerG|eijerGReduce|eixnerDistribution|ellinConvolve|ellinTransform|emberQ|emoryAvailable|emoryConstrained|emoryInUse|engerMesh|enuPacket|enuView|erge|ersennePrimeExponent|ersennePrimeExponentQ|eshCellCount|eshCellIndex|eshCells|eshConnectivityGraph|eshCoordinates|eshPrimitives|eshRegion|eshRegionQ|essage|essageDialog|essageList|essageName|essagePacket|essages|eteorShowerData|exicanHatWavelet|eyerWavelet|in|inDate|inDetect|inFilter|inLimit|inMax|inStableDistribution|inValue|ineralData|inimalBy|inimalPolynomial|inimalStateSpaceModel|inimize|inimumTimeIncrement|inkowskiQuestionMark|inorPlanetData|inors|inus|inusPlus|issing|issingQ|ittagLefflerE|ixedFractionParts|ixedGraphQ|ixedMagnitude|ixedRadix|ixedRadixQuantity|ixedUnit|ixtureDistribution|od|odelPredictiveController|odularInverse|odularLambda|odule|oebiusMu|oment|omentConvert|omentEvaluate|omentGeneratingFunction|omentOfInertia|onitor|onomialList|onsterGroupM|oonPhase|oonPosition|orletWavelet|orphologicalBinarize|orphologicalBranchPoints|orphologicalComponents|orphologicalEulerNumber|orphologicalGraph|orphologicalPerimeter|orphologicalTransform|ortalityData|ost|ountainData|ouseAnnotation|ouseAppearance|ousePosition|ouseover|ovieData|ovingAverage|ovingMap|ovingMedian|oyalDistribution|ulticolumn|ultigraphQ|ultinomial|ultinomialDistribution|ultinormalDistribution|ultiplicativeOrder|ultiplySides|ultivariateHypergeometricDistribution|ultivariatePoissonDistribution|ultivariateTDistribution))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:N(?:|ArgMax|ArgMin|Cache|CaputoD|DEigensystem|DEigenvalues|DSolve|DSolveValue|Expectation|FractionalD|Integrate|MaxValue|Maximize|MinValue|Minimize|Probability|Product|Roots|Solve|SolveValues|Sum|akagamiDistribution|ameQ|ames|and|earest|earestFunction|earestMeshCells|earestNeighborGraph|earestTo|ebulaData|eedlemanWunschSimilarity|eeds|egative|egativeBinomialDistribution|egativeDefiniteMatrixQ|egativeMultinomialDistribution|egativeSemidefiniteMatrixQ|egativelyOrientedPoints|eighborhoodData|eighborhoodGraph|est|estGraph|estList|estWhile|estWhileList|estedGreaterGreater|estedLessLess|eumannValue|evilleThetaC|evilleThetaD|evilleThetaN|evilleThetaS|extCell|extDate|extPrime|icholsPlot|ightHemisphere|onCommutativeMultiply|onNegative|onPositive|oncentralBetaDistribution|oncentralChiSquareDistribution|oncentralFRatioDistribution|oncentralStudentTDistribution|ondimensionalizationTransform|oneTrue|onlinearModelFit|onlinearStateSpaceModel|onlocalMeansFilter|or|orlundB|orm|ormal|ormalDistribution|ormalMatrixQ|ormalize|ormalizedSquaredEuclideanDistance|ot|otCongruent|otCupCap|otDoubleVerticalBar|otElement|otEqualTilde|otExists|otGreater|otGreaterEqual|otGreaterFullEqual|otGreaterGreater|otGreaterLess|otGreaterSlantEqual|otGreaterTilde|otHumpDownHump|otHumpEqual|otLeftTriangle|otLeftTriangleBar|otLeftTriangleEqual|otLess|otLessEqual|otLessFullEqual|otLessGreater|otLessLess|otLessSlantEqual|otLessTilde|otNestedGreaterGreater|otNestedLessLess|otPrecedes|otPrecedesEqual|otPrecedesSlantEqual|otPrecedesTilde|otReverseElement|otRightTriangle|otRightTriangleBar|otRightTriangleEqual|otSquareSubset|otSquareSubsetEqual|otSquareSuperset|otSquareSupersetEqual|otSubset|otSubsetEqual|otSucceeds|otSucceedsEqual|otSucceedsSlantEqual|otSucceedsTilde|otSuperset|otSupersetEqual|otTilde|otTildeEqual|otTildeFullEqual|otTildeTilde|otVerticalBar|otebook|otebookApply|otebookClose|otebookDelete|otebookDirectory|otebookEvaluate|otebookFileName|otebookFind|otebookGet|otebookImport|otebookInformation|otebookLocate|otebookObject|otebookOpen|otebookPrint|otebookPut|otebookRead|otebookSave|otebookSelection|otebookTemplate|otebookWrite|otebooks|othing|uclearExplosionData|uclearReactorData|ullSpace|umberCompose|umberDecompose|umberDigit|umberExpand|umberFieldClassNumber|umberFieldDiscriminant|umberFieldFundamentalUnits|umberFieldIntegralBasis|umberFieldNormRepresentatives|umberFieldRegulator|umberFieldRootsOfUnity|umberFieldSignature|umberForm|umberLinePlot|umberQ|umerator|umeratorDenominator|umericQ|umericalOrder|umericalSort|uttallWindow|yquistPlot))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:O(?:|NanGroupON|bservabilityGramian|bservabilityMatrix|bservableDecomposition|bservableModelQ|ceanData|ctahedron|ddQ|ff|ffset|n|nce|pacity|penAppend|penRead|penWrite|pener|penerView|pening|perate|ptimumFlowData|ptionValue|ptional|ptionalElement|ptions|ptionsPattern|r|rder|rderDistribution|rderedQ|rdering|rderingBy|rderlessPatternSequence|rnsteinUhlenbeckProcess|rthogonalMatrixQ|rthogonalize|uter|uterPolygon|uterPolyhedron|utputControllabilityMatrix|utputControllableModelQ|utputForm|utputNamePacket|utputResponse|utputStream|verBar|verDot|verHat|verTilde|verVector|verflow|verlay|verscript|verscriptBox|wenT|wnValues))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:P(?:DF|ERTDistribution|IDTune|acletDataRebuild|acletDirectoryLoad|acletDirectoryUnload|acletDisable|acletEnable|acletFind|acletFindRemote|acletInstall|acletInstallSubmit|acletNewerQ|acletObject|acletSiteObject|acletSiteRegister|acletSiteUnregister|acletSiteUpdate|acletSites|acletUninstall|adLeft|adRight|addedForm|adeApproximant|ageRankCentrality|airedBarChart|airedHistogram|airedSmoothHistogram|airedTTest|airedZTest|aletteNotebook|alindromeQ|ane|aneSelector|anel|arabolicCylinderD|arallelArray|arallelAxisPlot|arallelCombine|arallelDo|arallelEvaluate|arallelKernels|arallelMap|arallelNeeds|arallelProduct|arallelSubmit|arallelSum|arallelTable|arallelTry|arallelepiped|arallelize|arallelogram|arameterMixtureDistribution|arametricConvexOptimization|arametricFunction|arametricNDSolve|arametricNDSolveValue|arametricPlot|arametricPlot3D|arametricRegion|arentBox|arentCell|arentDirectory|arentNotebook|aretoDistribution|aretoPickandsDistribution|arkData|art|artOfSpeech|artialCorrelationFunction|articleAcceleratorData|articleData|artition|artitionsP|artitionsQ|arzenWindow|ascalDistribution|aste|asteButton|athGraph|athGraphQ|attern|atternSequence|atternTest|aulWavelet|auliMatrix|ause|eakDetect|eanoCurve|earsonChiSquareTest|earsonCorrelationTest|earsonDistribution|ercentForm|erfectNumber|erfectNumberQ|erimeter|eriodicBoundaryCondition|eriodogram|eriodogramArray|ermanent|ermissionsGroup|ermissionsGroupMemberQ|ermissionsGroups|ermissionsKey|ermissionsKeys|ermutationCycles|ermutationCyclesQ|ermutationGroup|ermutationLength|ermutationList|ermutationListQ|ermutationMatrix|ermutationMax|ermutationMin|ermutationOrder|ermutationPower|ermutationProduct|ermutationReplace|ermutationSupport|ermutations|ermute|eronaMalikFilter|ersonData|etersenGraph|haseMargins|hongShading|hysicalSystemData|ick|ieChart|ieChart3D|iecewise|iecewiseExpand|illaiTrace|illaiTraceTest|ingTime|ixelValue|ixelValuePositions|laced|laceholder|lanarAngle|lanarFaceList|lanarGraph|lanarGraphQ|lanckRadiationLaw|laneCurveData|lanetData|lanetaryMoonData|lantData|lay|lot|lot3D|luralize|lus|lusMinus|ochhammer|oint|ointFigureChart|ointLegend|ointLight|ointSize|oissonConsulDistribution|oissonDistribution|oissonPDEComponent|oissonProcess|oissonWindow|olarPlot|olyGamma|olyLog|olyaAeppliDistribution|olygon|olygonAngle|olygonCoordinates|olygonDecomposition|olygonalNumber|olyhedron|olyhedronAngle|olyhedronCoordinates|olyhedronData|olyhedronDecomposition|olyhedronGenus|olynomialExpressionQ|olynomialExtendedGCD|olynomialGCD|olynomialLCM|olynomialMod|olynomialQ|olynomialQuotient|olynomialQuotientRemainder|olynomialReduce|olynomialRemainder|olynomialSumOfSquaresList|opupMenu|opupView|opupWindow|osition|ositionIndex|ositionLargest|ositionSmallest|ositive|ositiveDefiniteMatrixQ|ositiveSemidefiniteMatrixQ|ositivelyOrientedPoints|ossibleZeroQ|ostfix|ower|owerDistribution|owerExpand|owerMod|owerModList|owerRange|owerSpectralDensity|owerSymmetricPolynomial|owersRepresentations|reDecrement|reIncrement|recedenceForm|recedes|recedesEqual|recedesSlantEqual|recedesTilde|recision|redict|redictorFunction|redictorMeasurements|redictorMeasurementsObject|reemptProtect|refix|repend|rependTo|reviousCell|reviousDate|riceGraphDistribution|rime|rimeNu|rimeOmega|rimePi|rimePowerQ|rimeQ|rimeZetaP|rimitivePolynomialQ|rimitiveRoot|rimitiveRootList|rincipalComponents|rintTemporary|rintableASCIIQ|rintout3D|rism|rivateKey|robability|robabilityDistribution|robabilityPlot|robabilityScalePlot|robitModelFit|rocessConnection|rocessInformation|rocessObject|rocessParameterAssumptions|rocessParameterQ|rocessStatus|rocesses|roduct|roductDistribution|roductLog|rogressIndicator|rojection|roportion|roportional|rotect|roteinData|runing|seudoInverse|sychrometricPropertyData|ublicKey|ulsarData|ut|utAppend|yramid))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:Q(?:Binomial|Factorial|Gamma|HypergeometricPFQ|Pochhammer|PolyGamma|RDecomposition|nDispersion|uadraticIrrationalQ|uadraticOptimization|uantile|uantilePlot|uantity|uantityArray|uantityDistribution|uantityForm|uantityMagnitude|uantityQ|uantityUnit|uantityVariable|uantityVariableCanonicalUnit|uantityVariableDimensions|uantityVariableIdentifier|uantityVariablePhysicalQuantity|uartileDeviation|uartileSkewness|uartiles|uery|ueueProperties|ueueingNetworkProcess|ueueingProcess|uiet|uietEcho|uotient|uotientRemainder))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:R(?:GBColor|Solve|SolveValue|adialAxisPlot|adialGradientFilling|adialGradientImage|adialityCentrality|adicalBox|adioButton|adioButtonBar|adon|adonTransform|amanujanTau|amanujanTauL|amanujanTauTheta|amanujanTauZ|amp|andomChoice|andomColor|andomComplex|andomDate|andomEntity|andomFunction|andomGeneratorState|andomGeoPosition|andomGraph|andomImage|andomInteger|andomPermutation|andomPoint|andomPolygon|andomPolyhedron|andomPrime|andomReal|andomSample|andomTime|andomVariate|andomWalkProcess|andomWord|ange|angeFilter|ankedMax|ankedMin|arerProbability|aster|aster3D|asterize|ational|ationalExpressionQ|ationalize|atios|awBoxes|awData|ayleighDistribution|e|eIm|eImPlot|eactionPDETerm|ead|eadByteArray|eadLine|eadList|eadString|ealAbs|ealDigits|ealExponent|ealSign|eap|econstructionMesh|ectangle|ectangleChart|ectangleChart3D|ectangularRepeatingElement|ecurrenceFilter|ecurrenceTable|educe|efine|eflectionMatrix|eflectionTransform|efresh|egion|egionBinarize|egionBoundary|egionBounds|egionCentroid|egionCongruent|egionConvert|egionDifference|egionDilation|egionDimension|egionDisjoint|egionDistance|egionDistanceFunction|egionEmbeddingDimension|egionEqual|egionErosion|egionFit|egionImage|egionIntersection|egionMeasure|egionMember|egionMemberFunction|egionMoment|egionNearest|egionNearestFunction|egionPlot|egionPlot3D|egionProduct|egionQ|egionResize|egionSimilar|egionSymmetricDifference|egionUnion|egionWithin|egularExpression|egularPolygon|egularlySampledQ|elationGraph|eleaseHold|eliabilityDistribution|eliefImage|eliefPlot|emove|emoveAlphaChannel|emoveBackground|emoveDiacritics|emoveInputStreamMethod|emoveOutputStreamMethod|emoveUsers|enameDirectory|enameFile|enewalProcess|enkoChart|epairMesh|epeated|epeatedNull|epeatedTiming|epeatingElement|eplace|eplaceAll|eplaceAt|eplaceImageValue|eplaceList|eplacePart|eplacePixelValue|eplaceRepeated|esamplingAlgorithmData|escale|escalingTransform|esetDirectory|esidue|esidueSum|esolve|esourceData|esourceObject|esourceSearch|esponseForm|est|estricted|esultant|eturn|eturnExpressionPacket|eturnPacket|eturnTextPacket|everse|everseBiorthogonalSplineWavelet|everseElement|everseEquilibrium|everseGraph|everseSort|everseSortBy|everseUpEquilibrium|evolutionPlot3D|iccatiSolve|iceDistribution|idgeFilter|iemannR|iemannSiegelTheta|iemannSiegelZ|iemannXi|iffle|ightArrow|ightArrowBar|ightArrowLeftArrow|ightComposition|ightCosetRepresentative|ightDownTeeVector|ightDownVector|ightDownVectorBar|ightTee|ightTeeArrow|ightTeeVector|ightTriangle|ightTriangleBar|ightTriangleEqual|ightUpDownVector|ightUpTeeVector|ightUpVector|ightUpVectorBar|ightVector|ightVectorBar|iskAchievementImportance|iskReductionImportance|obustConvexOptimization|ogersTanimotoDissimilarity|ollPitchYawAngles|ollPitchYawMatrix|omanNumeral|oot|ootApproximant|ootIntervals|ootLocusPlot|ootMeanSquare|ootOfUnityQ|ootReduce|ootSum|oots|otate|otateLeft|otateRight|otationMatrix|otationTransform|ound|ow|owBox|owReduce|udinShapiro|udvalisGroupRu|ule|uleDelayed|ulePlot|un|unProcess|unThrough|ussellRaoDissimilarity))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:S(?:ARIMAProcess|ARMAProcess|ASTriangle|SSTriangle|ameAs|ameQ|ampledSoundFunction|ampledSoundList|atelliteData|atisfiabilityCount|atisfiabilityInstances|atisfiableQ|ave|avitzkyGolayMatrix|awtoothWave|cale|caled|calingMatrix|calingTransform|can|cheduledTask|churDecomposition|cientificForm|corerGi|corerGiPrime|corerHi|corerHiPrime|ec|ech|echDistribution|econdOrderConeOptimization|ectorChart|ectorChart3D|eedRandom|elect|electComponents|electFirst|electedCells|electedNotebook|electionCreateCell|electionEvaluate|electionEvaluateCreateCell|electionMove|emanticImport|emanticImportString|emanticInterpretation|emialgebraicComponentInstances|emidefiniteOptimization|endMail|endMessage|equence|equenceAlignment|equenceCases|equenceCount|equenceFold|equenceFoldList|equencePosition|equenceReplace|equenceSplit|eries|eriesCoefficient|eriesData|erviceConnect|erviceDisconnect|erviceExecute|erviceObject|essionSubmit|essionTime|et|etAccuracy|etAlphaChannel|etAttributes|etCloudDirectory|etCookies|etDelayed|etDirectory|etEnvironment|etFileDate|etOptions|etPermissions|etPrecision|etSelectedNotebook|etSharedFunction|etSharedVariable|etStreamPosition|etSystemOptions|etUsers|etter|etterBar|etting|hallow|hannonWavelet|hapiroWilkTest|hare|harpen|hearingMatrix|hearingTransform|hellRegion|henCastanMatrix|hiftRegisterSequence|hiftedGompertzDistribution|hort|hortDownArrow|hortLeftArrow|hortRightArrow|hortTimeFourier|hortTimeFourierData|hortUpArrow|hortest|hortestPathFunction|how|iderealTime|iegelTheta|iegelTukeyTest|ierpinskiCurve|ierpinskiMesh|ign|ignTest|ignature|ignedRankTest|ignedRegionDistance|impleGraph|impleGraphQ|implePolygonQ|implePolyhedronQ|implex|implify|in|inIntegral|inc|inghMaddalaDistribution|ingularValueDecomposition|ingularValueList|ingularValuePlot|inh|inhIntegral|ixJSymbol|keleton|keletonTransform|kellamDistribution|kewNormalDistribution|kewness|kip|liceContourPlot3D|liceDensityPlot3D|liceDistribution|liceVectorPlot3D|lideView|lider|lider2D|liderBox|lot|lotSequence|mallCircle|mithDecomposition|mithDelayCompensator|mithWatermanSimilarity|moothDensityHistogram|moothHistogram|moothHistogram3D|moothKernelDistribution|nDispersion|ocketConnect|ocketListen|ocketListener|ocketObject|ocketOpen|ocketReadMessage|ocketReadyQ|ocketWaitAll|ocketWaitNext|ockets|okalSneathDissimilarity|olarEclipse|olarSystemFeatureData|olarTime|olidAngle|olidData|olidRegionQ|olve|olveAlways|olveValues|ort|ortBy|ound|oundNote|ourcePDETerm|ow|paceCurveData|pacer|pan|parseArray|parseArrayQ|patialGraphDistribution|patialMedian|peak|pearmanRankTest|pearmanRho|peciesData|pectralLineData|pectrogram|pectrogramArray|pecularity|peechSynthesize|pellingCorrectionList|phere|pherePoints|phericalBesselJ|phericalBesselY|phericalHankelH1|phericalHankelH2|phericalHarmonicY|phericalPlot3D|phericalShell|pheroidalEigenvalue|pheroidalJoiningFactor|pheroidalPS|pheroidalPSPrime|pheroidalQS|pheroidalQSPrime|pheroidalRadialFactor|pheroidalS1|pheroidalS1Prime|pheroidalS2|pheroidalS2Prime|plicedDistribution|plit|plitBy|pokenString|potLight|qrt|qrtBox|quare|quareFreeQ|quareIntersection|quareMatrixQ|quareRepeatingElement|quareSubset|quareSubsetEqual|quareSuperset|quareSupersetEqual|quareUnion|quareWave|quaredEuclideanDistance|quaresR|tableDistribution|tack|tackBegin|tackComplete|tackInhibit|tackedDateListPlot|tackedListPlot|tadiumShape|tandardAtmosphereData|tandardDeviation|tandardDeviationFilter|tandardForm|tandardOceanData|tandardize|tandbyDistribution|tar|tarClusterData|tarData|tarGraph|tartProcess|tateFeedbackGains|tateOutputEstimator|tateResponse|tateSpaceModel|tateSpaceTransform|tateTransformationLinearize|tationaryDistribution|tationaryWaveletPacketTransform|tationaryWaveletTransform|tatusArea|tatusCentrality|tieltjesGamma|tippleShading|tirlingS1|tirlingS2|toppingPowerData|tratonovichProcess|treamDensityPlot|treamPlot|treamPlot3D|treamPosition|treams|tringCases|tringContainsQ|tringCount|tringDelete|tringDrop|tringEndsQ|tringExpression|tringExtract|tringForm|tringFormat|tringFormatQ|tringFreeQ|tringInsert|tringJoin|tringLength|tringMatchQ|tringPadLeft|tringPadRight|tringPart|tringPartition|tringPosition|tringQ|tringRepeat|tringReplace|tringReplaceList|tringReplacePart|tringReverse|tringRiffle|tringRotateLeft|tringRotateRight|tringSkeleton|tringSplit|tringStartsQ|tringTake|tringTakeDrop|tringTemplate|tringToByteArray|tringToStream|tringTrim|tripBoxes|tructuralImportance|truveH|truveL|tudentTDistribution|tyle|tyleBox|tyleData|ubMinus|ubPlus|ubStar|ubValues|ubdivide|ubfactorial|ubgraph|ubresultantPolynomialRemainders|ubresultantPolynomials|ubresultants|ubscript|ubscriptBox|ubsequences|ubset|ubsetEqual|ubsetMap|ubsetQ|ubsets|ubstitutionSystem|ubsuperscript|ubsuperscriptBox|ubtract|ubtractFrom|ubtractSides|ucceeds|ucceedsEqual|ucceedsSlantEqual|ucceedsTilde|uccess|uchThat|um|umConvergence|unPosition|unrise|unset|uperDagger|uperMinus|uperPlus|uperStar|upernovaData|uperscript|uperscriptBox|uperset|upersetEqual|urd|urfaceArea|urfaceData|urvivalDistribution|urvivalFunction|urvivalModel|urvivalModelFit|uzukiDistribution|uzukiGroupSuz|watchLegend|witch|ymbol|ymbolName|ymletWavelet|ymmetric|ymmetricGroup|ymmetricKey|ymmetricMatrixQ|ymmetricPolynomial|ymmetricReduction|ymmetrize|ymmetrizedArray|ymmetrizedArrayRules|ymmetrizedDependentComponents|ymmetrizedIndependentComponents|ymmetrizedReplacePart|ynonyms|yntaxInformation|yntaxLength|yntaxPacket|yntaxQ|ystemDialogInput|ystemInformation|ystemOpen|ystemOptions|ystemProcessData|ystemProcesses|ystemsConnectionsModel|ystemsModelControllerData|ystemsModelDelay|ystemsModelDelayApproximate|ystemsModelDelete|ystemsModelDimensions|ystemsModelExtract|ystemsModelFeedbackConnect|ystemsModelLinearity|ystemsModelMerge|ystemsModelOrder|ystemsModelParallelConnect|ystemsModelSeriesConnect|ystemsModelStateFeedbackConnect|ystemsModelVectorRelativeOrders))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:T(?:Test|abView|able|ableForm|agBox|agSet|agSetDelayed|agUnset|ake|akeDrop|akeLargest|akeLargestBy|akeList|akeSmallest|akeSmallestBy|akeWhile|ally|an|anh|askAbort|askExecute|askObject|askRemove|askResume|askSuspend|askWait|asks|autologyQ|eXForm|elegraphProcess|emplateApply|emplateBox|emplateExpression|emplateIf|emplateObject|emplateSequence|emplateSlot|emplateWith|emporalData|ensorContract|ensorDimensions|ensorExpand|ensorProduct|ensorRank|ensorReduce|ensorSymmetry|ensorTranspose|ensorWedge|erminatedEvaluation|estReport|estReportObject|estResultObject|etrahedron|ext|extCell|extData|extGrid|extPacket|extRecognize|extSentences|extString|extTranslation|extWords|exture|herefore|hermodynamicData|hermometerGauge|hickness|hinning|hompsonGroupTh|hread|hreeJSymbol|hreshold|hrough|hrow|hueMorse|humbnail|ideData|ilde|ildeEqual|ildeFullEqual|ildeTilde|imeConstrained|imeObject|imeObjectQ|imeRemaining|imeSeries|imeSeriesAggregate|imeSeriesForecast|imeSeriesInsert|imeSeriesInvertibility|imeSeriesMap|imeSeriesMapThread|imeSeriesModel|imeSeriesModelFit|imeSeriesResample|imeSeriesRescale|imeSeriesShift|imeSeriesThread|imeSeriesWindow|imeSystemConvert|imeUsed|imeValue|imeZoneConvert|imeZoneOffset|imelinePlot|imes|imesBy|iming|itsGroupT|oBoxes|oCharacterCode|oContinuousTimeModel|oDiscreteTimeModel|oEntity|oExpression|oInvertibleTimeSeries|oLowerCase|oNumberField|oPolarCoordinates|oRadicals|oRules|oSphericalCoordinates|oString|oUpperCase|oeplitzMatrix|ogether|oggler|ogglerBar|ooltip|oonShading|opHatTransform|opologicalSort|orus|orusGraph|otal|otalVariationFilter|ouchPosition|r|race|raceDialog|racePrint|raceScan|racyWidomDistribution|radingChart|raditionalForm|ransferFunctionCancel|ransferFunctionExpand|ransferFunctionFactor|ransferFunctionModel|ransferFunctionPoles|ransferFunctionTransform|ransferFunctionZeros|ransformationFunction|ransformationMatrix|ransformedDistribution|ransformedField|ransformedProcess|ransformedRegion|ransitiveClosureGraph|ransitiveReductionGraph|ranslate|ranslationTransform|ransliterate|ranspose|ravelDirections|ravelDirectionsData|ravelDistance|ravelDistanceList|ravelTime|reeForm|reeGraph|reeGraphQ|reePlot|riangle|riangleWave|riangularDistribution|riangulateMesh|rigExpand|rigFactor|rigFactorList|rigReduce|rigToExp|rigger|rimmedMean|rimmedVariance|ropicalStormData|rueQ|runcatedDistribution|runcatedPolyhedron|sallisQExponentialDistribution|sallisQGaussianDistribution|ube|ukeyLambdaDistribution|ukeyWindow|unnelData|uples|uranGraph|uringMachine|uttePolynomial|woWayRule|ypeHint))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:U(?:RL|RLBuild|RLDecode|RLDispatcher|RLDownload|RLEncode|RLExecute|RLExpand|RLParse|RLQueryDecode|RLQueryEncode|RLRead|RLResponseTime|RLShorten|RLSubmit|nateQ|ncompress|nderBar|nderflow|nderoverscript|nderoverscriptBox|nderscript|nderscriptBox|nderseaFeatureData|ndirectedEdge|ndirectedGraph|ndirectedGraphQ|nequal|nequalTo|nevaluated|niformDistribution|niformGraphDistribution|niformPolyhedron|niformSumDistribution|ninstall|nion|nionPlus|nique|nitBox|nitConvert|nitDimensions|nitRootTest|nitSimplify|nitStep|nitTriangle|nitVector|nitaryMatrixQ|nitize|niverseModelData|niversityData|nixTime|nprotect|nsameQ|nset|nsetShared|ntil|pArrow|pArrowBar|pArrowDownArrow|pDownArrow|pEquilibrium|pSet|pSetDelayed|pTee|pTeeArrow|pTo|pValues|pdate|pperCaseQ|pperLeftArrow|pperRightArrow|pperTriangularMatrix|pperTriangularMatrixQ|pperTriangularize|psample|singFrontEnd))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:V(?:alueQ|alues|ariables|ariance|arianceEquivalenceTest|arianceGammaDistribution|arianceTest|ectorAngle|ectorDensityPlot|ectorDisplacementPlot|ectorDisplacementPlot3D|ectorGreater|ectorGreaterEqual|ectorLess|ectorLessEqual|ectorPlot|ectorPlot3D|ectorQ|ectors|ee|erbatim|erificationTest|ertexAdd|ertexChromaticNumber|ertexComponent|ertexConnectivity|ertexContract|ertexCorrelationSimilarity|ertexCosineSimilarity|ertexCount|ertexCoverQ|ertexDegree|ertexDelete|ertexDiceSimilarity|ertexEccentricity|ertexInComponent|ertexInComponentGraph|ertexInDegree|ertexIndex|ertexJaccardSimilarity|ertexList|ertexOutComponent|ertexOutComponentGraph|ertexOutDegree|ertexQ|ertexReplace|ertexTransitiveGraphQ|ertexWeightedGraphQ|erticalBar|erticalGauge|erticalSeparator|erticalSlider|erticalTilde|oiceStyleData|oigtDistribution|olcanoData|olume|onMisesDistribution|oronoiMesh))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:W(?:aitAll|aitNext|akebyDistribution|alleniusHypergeometricDistribution|aringYuleDistribution|arpingCorrespondence|arpingDistance|atershedComponents|atsonUSquareTest|attsStrogatzGraphDistribution|avePDEComponent|aveletBestBasis|aveletFilterCoefficients|aveletImagePlot|aveletListPlot|aveletMapIndexed|aveletMatrixPlot|aveletPhi|aveletPsi|aveletScalogram|aveletThreshold|eakStationarity|eaklyConnectedComponents|eaklyConnectedGraphComponents|eaklyConnectedGraphQ|eatherData|eatherForecastData|eberE|edge|eibullDistribution|eierstrassE1|eierstrassE2|eierstrassE3|eierstrassEta1|eierstrassEta2|eierstrassEta3|eierstrassHalfPeriodW1|eierstrassHalfPeriodW2|eierstrassHalfPeriodW3|eierstrassHalfPeriods|eierstrassInvariantG2|eierstrassInvariantG3|eierstrassInvariants|eierstrassP|eierstrassPPrime|eierstrassSigma|eierstrassZeta|eightedAdjacencyGraph|eightedAdjacencyMatrix|eightedData|eightedGraphQ|elchWindow|heelGraph|henEvent|hich|hile|hiteNoiseProcess|hittakerM|hittakerW|ienerFilter|ienerProcess|ignerD|ignerSemicircleDistribution|ikipediaData|ilksW|ilksWTest|indDirectionData|indSpeedData|indVectorData|indingCount|indingPolygon|insorizedMean|insorizedVariance|ishartMatrixDistribution|ith|olframAlpha|olframLanguageData|ordCloud|ordCount|ordCounts|ordData|ordDefinition|ordFrequency|ordFrequencyData|ordList|ordStem|ordTranslation|rite|riteLine|riteString|ronskian))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:X(?:MLElement|MLObject|MLTemplate|YZColor|nor|or))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:Y(?:uleDissimilarity))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:Z(?:IPCodeData|Test|Transform|ernikeR|eroSymmetric|eta|etaZero|ipfDistribution))(?![`$[:alnum:]])", + "name": "support.function.builtin.wolfram" + }, + { + "match": "(?:A(?:cceptanceThreshold|ccuracyGoal|ctiveStyle|ddOnHelpPath|djustmentBoxOptions|lignment|lignmentPoint|llowGroupClose|llowInlineCells|llowLooseGrammar|llowReverseGroupClose|llowScriptLevelChange|llowVersionUpdate|llowedCloudExtraParameters|llowedCloudParameterExtensions|llowedDimensions|llowedFrequencyRange|llowedHeads|lternativeHypothesis|ltitudeMethod|mbiguityFunction|natomySkinStyle|nchoredSearch|nimationDirection|nimationRate|nimationRepetitions|nimationRunTime|nimationRunning|nimationTimeIndex|nnotationRules|ntialiasing|ppearance|ppearanceElements|ppearanceRules|spectRatio|ssociationFormat|ssumptions|synchronous|ttachedCell|udioChannelAssignment|udioEncoding|udioInputDevice|udioLabel|udioOutputDevice|uthentication|utoAction|utoCopy|utoDelete|utoGeneratedPackage|utoIndent|utoItalicWords|utoMultiplicationSymbol|utoOpenNotebooks|utoOpenPalettes|utoOperatorRenderings|utoRemove|utoScroll|utoSpacing|utoloadPath|utorunSequencing|xes|xesEdge|xesLabel|xesOrigin|xesStyle))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:B(?:ackground|arOrigin|arSpacing|aseStyle|aselinePosition|inaryFormat|ookmarks|ooleanStrings|oundaryStyle|oxBaselineShift|oxFormFormatTypes|oxFrame|oxMargins|oxRatios|oxStyle|oxed|ubbleScale|ubbleSizes|uttonBoxOptions|uttonData|uttonFunction|uttonMinHeight|uttonSource|yteOrdering))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:C(?:alendarType|alloutMarker|alloutStyle|aptureRunning|aseOrdering|elestialSystem|ellAutoOverwrite|ellBaseline|ellBracketOptions|ellChangeTimes|ellContext|ellDingbat|ellDingbatMargin|ellDynamicExpression|ellEditDuplicate|ellEpilog|ellEvaluationDuplicate|ellEvaluationFunction|ellEventActions|ellFrame|ellFrameColor|ellFrameLabelMargins|ellFrameLabels|ellFrameMargins|ellGrouping|ellGroupingRules|ellHorizontalScrolling|ellID|ellLabel|ellLabelAutoDelete|ellLabelMargins|ellLabelPositioning|ellLabelStyle|ellLabelTemplate|ellMargins|ellOpen|ellProlog|ellSize|ellTags|haracterEncoding|haracterEncodingsPath|hartBaseStyle|hartElementFunction|hartElements|hartLabels|hartLayout|hartLegends|hartStyle|lassPriors|lickToCopyEnabled|lipPlanes|lipPlanesStyle|lipRange|lippingStyle|losingAutoSave|loudBase|loudObjectNameFormat|loudObjectURLType|lusterDissimilarityFunction|odeAssistOptions|olorCoverage|olorFunction|olorFunctionBinning|olorFunctionScaling|olorRules|olorSelectorSettings|olorSpace|olumnAlignments|olumnLines|olumnSpacings|olumnWidths|olumnsEqual|ombinerFunction|ommonDefaultFormatTypes|ommunityBoundaryStyle|ommunityLabels|ommunityRegionStyle|ompilationOptions|ompilationTarget|ompiled|omplexityFunction|ompressionLevel|onfidenceLevel|onfidenceRange|onfidenceTransform|onfigurationPath|onstants|ontentPadding|ontentSelectable|ontentSize|ontinuousAction|ontourLabels|ontourShading|ontourStyle|ontours|ontrolPlacement|ontrolType|ontrollerLinking|ontrollerMethod|ontrollerPath|ontrolsRendering|onversionRules|ookieFunction|oordinatesToolOptions|opyFunction|opyable|ornerNeighbors|ounterAssignments|ounterFunction|ounterIncrements|ounterStyleMenuListing|ovarianceEstimatorFunction|reateCellID|reateIntermediateDirectories|riterionFunction|ubics|urveClosed))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:D(?:ataRange|ataReversed|atasetTheme|ateFormat|ateFunction|ateGranularity|ateReduction|ateTicksFormat|ayCountConvention|efaultDuplicateCellStyle|efaultDuration|efaultElement|efaultFontProperties|efaultFormatType|efaultInlineFormatType|efaultNaturalLanguage|efaultNewCellStyle|efaultNewInlineCellStyle|efaultNotebook|efaultOptions|efaultPrintPrecision|efaultStyleDefinitions|einitialization|eletable|eleteContents|eletionWarning|elimiterAutoMatching|elimiterFlashTime|elimiterMatching|elimiters|eliveryFunction|ependentVariables|eployed|escriptorStateSpace|iacriticalPositioning|ialogProlog|ialogSymbols|igitBlock|irectedEdges|irection|iscreteVariables|ispersionEstimatorFunction|isplayAllSteps|isplayFunction|istanceFunction|istributedContexts|ithering|ividers|ockedCell|ockedCells|ynamicEvaluationTimeout|ynamicModuleValues|ynamicUpdating))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:E(?:clipseType|dgeCapacity|dgeCost|dgeLabelStyle|dgeLabels|dgeShapeFunction|dgeStyle|dgeValueRange|dgeValueSizes|dgeWeight|ditCellTagsSettings|ditable|lidedForms|nabled|pilog|pilogFunction|scapeRadius|valuatable|valuationCompletionAction|valuationElements|valuationMonitor|valuator|valuatorNames|ventLabels|xcludePods|xcludedContexts|xcludedForms|xcludedLines|xcludedPhysicalQuantities|xclusions|xclusionsStyle|xponentFunction|xponentPosition|xponentStep|xponentialFamily|xportAutoReplacements|xpressionUUID|xtension|xtentElementFunction|xtentMarkers|xtentSize|xternalDataCharacterEncoding|xternalOptions|xternalTypeSignature))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:F(?:aceGrids|aceGridsStyle|ailureAction|eatureNames|eatureTypes|eedbackSector|eedbackSectorStyle|eedbackType|ieldCompletionFunction|ieldHint|ieldHintStyle|ieldMasked|ieldSize|ileNameDialogSettings|ileNameForms|illing|illingStyle|indSettings|itRegularization|ollowRedirects|ontColor|ontFamily|ontSize|ontSlant|ontSubstitutions|ontTracking|ontVariations|ontWeight|orceVersionInstall|ormBoxOptions|ormLayoutFunction|ormProtectionMethod|ormatType|ormatTypeAutoConvert|ourierParameters|ractionBoxOptions|ractionLine|rame|rameBoxOptions|rameLabel|rameMargins|rameRate|rameStyle|rameTicks|rameTicksStyle|rontEndEventActions|unctionSpace))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:G(?:apPenalty|augeFaceElementFunction|augeFaceStyle|augeFrameElementFunction|augeFrameSize|augeFrameStyle|augeLabels|augeMarkers|augeStyle|aussianIntegers|enerateConditions|eneratedCell|eneratedDocumentBinding|eneratedParameters|eneratedQuantityMagnitudes|eneratorDescription|eneratorHistoryLength|eneratorOutputType|eoArraySize|eoBackground|eoCenter|eoGridLines|eoGridLinesStyle|eoGridRange|eoGridRangePadding|eoLabels|eoLocation|eoModel|eoProjection|eoRange|eoRangePadding|eoResolution|eoScaleBar|eoServer|eoStylingImageFunction|eoZoomLevel|radient|raphHighlight|raphHighlightStyle|raphLayerStyle|raphLayers|raphLayout|ridCreationSettings|ridDefaultElement|ridFrame|ridFrameMargins|ridLines|ridLinesStyle|roupActionBase|roupPageBreakWithin))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:H(?:eaderAlignment|eaderBackground|eaderDisplayFunction|eaderLines|eaderSize|eaderStyle|eads|elpBrowserSettings|iddenItems|olidayCalendar|yperlinkAction|yphenation))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:I(?:conRules|gnoreCase|gnoreDiacritics|gnorePunctuation|mageCaptureFunction|mageFormattingWidth|mageLabels|mageLegends|mageMargins|magePadding|magePreviewFunction|mageRegion|mageResolution|mageSize|mageSizeAction|mageSizeMultipliers|magingDevice|mportAutoReplacements|mportOptions|ncludeConstantBasis|ncludeDefinitions|ncludeDirectories|ncludeFileExtension|ncludeGeneratorTasks|ncludeInflections|ncludeMetaInformation|ncludePods|ncludeQuantities|ncludeSingularSolutions|ncludeWindowTimes|ncludedContexts|ndeterminateThreshold|nflationMethod|nheritScope|nitialSeeding|nitialization|nitializationCell|nitializationCellEvaluation|nitializationCellWarning|nputAliases|nputAssumptions|nputAutoReplacements|nsertResults|nsertionFunction|nteractive|nterleaving|nterpolationOrder|nterpolationPoints|nterpretationBoxOptions|nterpretationFunction|ntervalMarkers|ntervalMarkersStyle|nverseFunctions|temAspectRatio|temDisplayFunction|temSize|temStyle))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:J(?:oined))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:K(?:eepExistingVersion|eyCollisionFunction|eypointStrength))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:L(?:abelStyle|abelVisibility|abelingFunction|abelingSize|anguage|anguageCategory|ayerSizeFunction|eaderSize|earningRate|egendAppearance|egendFunction|egendLabel|egendLayout|egendMargins|egendMarkerSize|egendMarkers|ighting|ightingAngle|imitsPositioning|imitsPositioningTokens|ineBreakWithin|ineIndent|ineIndentMaxFraction|ineIntegralConvolutionScale|ineSpacing|inearOffsetFunction|inebreakAdjustments|inkFunction|inkProtocol|istFormat|istPickerBoxOptions|ocalizeVariables|ocatorAutoCreate|ocatorRegion|ooping))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:M(?:agnification|ailAddressValidation|ailResponseFunction|ailSettings|asking|atchLocalNames|axCellMeasure|axColorDistance|axDuration|axExtraBandwidths|axExtraConditions|axFeatureDisplacement|axFeatures|axItems|axIterations|axMixtureKernels|axOverlapFraction|axPlotPoints|axRecursion|axStepFraction|axStepSize|axSteps|emoryConstraint|enuCommandKey|enuSortingValue|enuStyle|esh|eshCellHighlight|eshCellLabel|eshCellMarker|eshCellShapeFunction|eshCellStyle|eshFunctions|eshQualityGoal|eshRefinementFunction|eshShading|eshStyle|etaInformation|ethod|inColorDistance|inIntervalSize|inPointSeparation|issingBehavior|issingDataMethod|issingDataRules|issingString|issingStyle|odal|odulus|ultiaxisArrangement|ultiedgeStyle|ultilaunchWarning|ultilineFunction|ultiselection))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:N(?:icholsGridLines|ominalVariables|onConstants|ormFunction|ormalized|ormalsFunction|otebookAutoSave|otebookBrowseDirectory|otebookConvertSettings|otebookDynamicExpression|otebookEventActions|otebookPath|otebooksMenu|otificationFunction|ullRecords|ullWords|umberFormat|umberMarks|umberMultiplier|umberPadding|umberPoint|umberSeparator|umberSigns|yquistGridLines))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:O(?:pacityFunction|pacityFunctionScaling|peratingSystem|ptionInspectorSettings|utputAutoOverwrite|utputSizeLimit|verlaps|verscriptBoxOptions|verwriteTarget))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:P(?:IDDerivativeFilter|IDFeedforward|acletSite|adding|addingSize|ageBreakAbove|ageBreakBelow|ageBreakWithin|ageFooterLines|ageFooters|ageHeaderLines|ageHeaders|ageTheme|ageWidth|alettePath|aneled|aragraphIndent|aragraphSpacing|arallelization|arameterEstimator|artBehavior|artitionGranularity|assEventsDown|assEventsUp|asteBoxFormInlineCells|ath|erformanceGoal|ermissions|haseRange|laceholderReplace|layRange|lotLabel|lotLabels|lotLayout|lotLegends|lotMarkers|lotPoints|lotRange|lotRangeClipping|lotRangePadding|lotRegion|lotStyle|lotTheme|odStates|odWidth|olarAxes|olarAxesOrigin|olarGridLines|olarTicks|oleZeroMarkers|recisionGoal|referencesPath|reprocessingRules|reserveColor|reserveImageOptions|rincipalValue|rintAction|rintPrecision|rintingCopies|rintingOptions|rintingPageRange|rintingStartingPageNumber|rintingStyleEnvironment|rintout3DPreviewer|rivateCellOptions|rivateEvaluationOptions|rivateFontOptions|rivateNotebookOptions|rivatePaths|rocessDirectory|rocessEnvironment|rocessEstimator|rogressReporting|rolog|ropagateAborts))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:Q(?:uartics))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:R(?:adicalBoxOptions|andomSeeding|asterSize|eImLabels|eImStyle|ealBlockDiagonalForm|ecognitionPrior|ecordLists|ecordSeparators|eferenceLineStyle|efreshRate|egionBoundaryStyle|egionFillingStyle|egionFunction|egionSize|egularization|enderingOptions|equiredPhysicalQuantities|esampling|esamplingMethod|esolveContextAliases|estartInterval|eturnReceiptFunction|evolutionAxis|otateLabel|otationAction|oundingRadius|owAlignments|owLines|owMinHeight|owSpacings|owsEqual|ulerUnits|untimeAttributes|untimeOptions))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:S(?:ameTest|ampleDepth|ampleRate|amplingPeriod|aveConnection|aveDefinitions|aveable|caleDivisions|caleOrigin|calePadding|caleRangeStyle|caleRanges|calingFunctions|cientificNotationThreshold|creenStyleEnvironment|criptBaselineShifts|criptLevel|criptMinSize|criptSizeMultipliers|crollPosition|crollbars|crollingOptions|ectorOrigin|ectorSpacing|electable|elfLoopStyle|eriesTermGoal|haringList|howAutoSpellCheck|howAutoStyles|howCellBracket|howCellLabel|howCellTags|howClosedCellArea|howContents|howCursorTracker|howGroupOpener|howPageBreaks|howSelection|howShortBoxForm|howSpecialCharacters|howStringCharacters|hrinkingDelay|ignPadding|ignificanceLevel|imilarityRules|ingleLetterItalics|liderBoxOptions|ortedBy|oundVolume|pacings|panAdjustments|panCharacterRounding|panLineThickness|panMaxSize|panMinSize|panSymmetric|pecificityGoal|pellingCorrection|pellingDictionaries|pellingDictionariesPath|pellingOptions|phericalRegion|plineClosed|plineDegree|plineKnots|plineWeights|qrtBoxOptions|tabilityMargins|tabilityMarginsStyle|tandardized|tartingStepSize|tateSpaceRealization|tepMonitor|trataVariables|treamColorFunction|treamColorFunctionScaling|treamMarkers|treamPoints|treamScale|treamStyle|trictInequalities|tripOnInput|tripWrapperBoxes|tructuredSelection|tyleBoxAutoDelete|tyleDefinitions|tyleHints|tyleMenuListing|tyleNameDialogSettings|tyleSheetPath|ubscriptBoxOptions|ubsuperscriptBoxOptions|ubtitleEncoding|uperscriptBoxOptions|urdForm|ynchronousInitialization|ynchronousUpdating|yntaxForm|ystemHelpPath|ystemsModelLabels))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:T(?:abFilling|abSpacings|ableAlignments|ableDepth|ableDirections|ableHeadings|ableSpacing|agBoxOptions|aggingRules|argetFunctions|argetUnits|emplateBoxOptions|emporalRegularity|estID|extAlignment|extClipboardType|extJustification|extureCoordinateFunction|extureCoordinateScaling|icks|icksStyle|imeConstraint|imeDirection|imeFormat|imeGoal|imeSystem|imeZone|okenWords|olerance|ooltipDelay|ooltipStyle|otalWidth|ouchscreenAutoZoom|ouchscreenControlPlacement|raceAbove|raceBackward|raceDepth|raceForward|raceOff|raceOn|raceOriginal|rackedSymbols|rackingFunction|raditionalFunctionNotation|ransformationClass|ransformationFunctions|ransitionDirection|ransitionDuration|ransitionEffect|ranslationOptions|ravelMethod|rendStyle|rig))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:U(?:nderoverscriptBoxOptions|nderscriptBoxOptions|ndoOptions|ndoTrackedVariables|nitSystem|nityDimensions|nsavedVariables|pdateInterval|pdatePacletSites|tilityFunction))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:V(?:alidationLength|alidationSet|alueDimensions|arianceEstimatorFunction|ectorAspectRatio|ectorColorFunction|ectorColorFunctionScaling|ectorMarkers|ectorPoints|ectorRange|ectorScaling|ectorSizes|ectorStyle|erifyConvergence|erifySecurityCertificates|erifySolutions|erifyTestAssumptions|ersionedPreferences|ertexCapacity|ertexColors|ertexCoordinates|ertexDataCoordinates|ertexLabelStyle|ertexLabels|ertexNormals|ertexShape|ertexShapeFunction|ertexSize|ertexStyle|ertexTextureCoordinates|ertexWeight|ideoEncoding|iewAngle|iewCenter|iewMatrix|iewPoint|iewProjection|iewRange|iewVector|iewVertical|isible))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:W(?:aveletScale|eights|hitePoint|indowClickSelect|indowElements|indowFloating|indowFrame|indowFrameElements|indowMargins|indowOpacity|indowSize|indowStatusArea|indowTitle|indowToolbars|ordOrientation|ordSearch|ordSelectionFunction|ordSeparators|ordSpacings|orkingPrecision|rapAround))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:Z(?:eroTest|eroWidthTimes))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:A(?:bove|fter|lgebraics|ll|nonymous|utomatic|xis))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:B(?:ack|ackward|aseline|efore|elow|lack|lue|old|ooleans|ottom|oxes|rown|yte))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:C(?:atalan|ellStyle|enter|haracter|omplexInfinity|omplexes|onstant|yan))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:D(?:ashed|efaultAxesStyle|efaultBaseStyle|efaultBoxStyle|efaultFaceGridsStyle|efaultFieldHintStyle|efaultFrameStyle|efaultFrameTicksStyle|efaultGridLinesStyle|efaultLabelStyle|efaultMenuStyle|efaultTicksStyle|efaultTooltipStyle|egree|elimiter|igitCharacter|otDashed|otted))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:E(?:|ndOfBuffer|ndOfFile|ndOfLine|ndOfString|ulerGamma|xpression))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:F(?:alse|lat|ontProperties|orward|orwardBackward|riday|ront|rontEndDynamicExpression|ull))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:G(?:eneral|laisher|oldenAngle|oldenRatio|ray|reen))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:H(?:ere|exadecimalCharacter|oldAll|oldAllComplete|oldFirst|oldRest))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:I(?:|ndeterminate|nfinity|nherited|nteger|ntegers|talic))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:K(?:hinchin))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:L(?:arge|arger|eft|etterCharacter|ightBlue|ightBrown|ightCyan|ightGray|ightGreen|ightMagenta|ightOrange|ightPink|ightPurple|ightRed|ightYellow|istable|ocked))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:M(?:achinePrecision|agenta|anual|edium|eshCellCentroid|eshCellMeasure|eshCellQuality|onday))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:N(?:HoldAll|HoldFirst|HoldRest|egativeIntegers|egativeRationals|egativeReals|oWhitespace|onNegativeIntegers|onNegativeRationals|onNegativeReals|onPositiveIntegers|onPositiveRationals|onPositiveReals|one|ow|ull|umber|umberString|umericFunction))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:O(?:neIdentity|range|rderless))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:P(?:i|ink|lain|ositiveIntegers|ositiveRationals|ositiveReals|rimes|rotected|unctuationCharacter|urple))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:R(?:ationals|eadProtected|eal|eals|ecord|ed|ight))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:S(?:aturday|equenceHold|mall|maller|panFromAbove|panFromBoth|panFromLeft|tartOfLine|tartOfString|tring|truckthrough|tub|unday))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:T(?:emporary|hick|hin|hursday|iny|oday|omorrow|op|ransparent|rue|uesday))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:U(?:ndefined|nderlined))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:W(?:ednesday|hite|hitespace|hitespaceCharacter|ord|ordBoundary|ordCharacter))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:Y(?:ellow|esterday))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:\\$(?:Aborted|ActivationKey|AllowDataUpdates|AllowInternet|AssertFunction|Assumptions|AudioInputDevices|AudioOutputDevices|BaseDirectory|BasePacletsDirectory|BatchInput|BatchOutput|ByteOrdering|CacheBaseDirectory|Canceled|CharacterEncoding|CharacterEncodings|CloudAccountName|CloudBase|CloudConnected|CloudCreditsAvailable|CloudEvaluation|CloudExpressionBase|CloudObjectNameFormat|CloudObjectURLType|CloudRootDirectory|CloudSymbolBase|CloudUserID|CloudUserUUID|CloudVersion|CommandLine|CompilationTarget|Context|ContextAliases|ContextPath|ControlActiveSetting|Cookies|CreationDate|CurrentLink|CurrentTask|DateStringFormat|DefaultAudioInputDevice|DefaultAudioOutputDevice|DefaultFrontEnd|DefaultImagingDevice|DefaultKernels|DefaultLocalBase|DefaultLocalKernel|Display|DisplayFunction|DistributedContexts|DynamicEvaluation|Echo|EmbedCodeEnvironments|EmbeddableServices|Epilog|EvaluationCloudBase|EvaluationCloudObject|EvaluationEnvironment|ExportFormats|Failed|FontFamilies|FrontEnd|FrontEndSession|GeoLocation|GeoLocationCity|GeoLocationCountry|GeoLocationSource|HomeDirectory|IgnoreEOF|ImageFormattingWidth|ImageResolution|ImagingDevice|ImagingDevices|ImportFormats|InitialDirectory|Input|InputFileName|InputStreamMethods|Inspector|InstallationDirectory|InterpreterTypes|IterationLimit|KernelCount|KernelID|Language|LibraryPath|LicenseExpirationDate|LicenseID|LicenseServer|Linked|LocalBase|LocalSymbolBase|MachineAddresses|MachineDomains|MachineEpsilon|MachineID|MachineName|MachinePrecision|MachineType|MaxExtraPrecision|MaxMachineNumber|MaxNumber|MaxPiecewiseCases|MaxPrecision|MaxRootDegree|MessageGroups|MessageList|MessagePrePrint|Messages|MinMachineNumber|MinNumber|MinPrecision|MobilePhone|ModuleNumber|NetworkConnected|NewMessage|NewSymbol|NotebookInlineStorageLimit|Notebooks|NumberMarks|OperatingSystem|Output|OutputSizeLimit|OutputStreamMethods|Packages|ParentLink|ParentProcessID|PasswordFile|Path|PathnameSeparator|PerformanceGoal|Permissions|PlotTheme|Printout3DPreviewer|ProcessID|ProcessorCount|ProcessorType|ProgressReporting|RandomGeneratorState|RecursionLimit|ReleaseNumber|RequesterAddress|RequesterCloudUserID|RequesterCloudUserUUID|RequesterWolframID|RequesterWolframUUID|RootDirectory|ScriptCommandLine|ScriptInputString|Services|SessionID|SharedFunctions|SharedVariables|SoundDisplayFunction|SynchronousEvaluation|System|SystemCharacterEncoding|SystemID|SystemShell|SystemTimeZone|SystemWordLength|TemplatePath|TemporaryDirectory|TimeUnit|TimeZone|TimeZoneEntity|TimedOut|UnitSystem|Urgent|UserAgentString|UserBaseDirectory|UserBasePacletsDirectory|UserDocumentsDirectory|UserURLBase|Username|Version|VersionNumber|WolframDocumentsDirectory|WolframID|WolframUUID))(?![`$[:alnum:]])", + "name": "constant.language.wolfram" + }, + { + "match": "(?:A(?:bortScheduledTask|ctive|lgebraicRules|lternateImage|natomyForm|nimationCycleOffset|nimationCycleRepetitions|nimationDisplayTime|spectRatioFixed|stronomicalData|synchronousTaskObject|synchronousTasks|udioDevice|udioLooping))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:B(?:uttonEvaluator|uttonExpandable|uttonFrame|uttonMargins|uttonNote|uttonStyle))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:C(?:DFInformation|hebyshevDistance|lassifierInformation|lipFill|olorOutput|olumnForm|ompose|onstantArrayLayer|onstantPlusLayer|onstantTimesLayer|onstrainedMax|onstrainedMin|ontourGraphics|ontourLines|onversionOptions|reateScheduledTask|reateTemporary|urry))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:D(?:atabinRemove|ate|ebug|efaultColor|efaultFont|ensityGraphics|isplay|isplayString|otPlusLayer|ragAndDrop))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:E(?:dgeLabeling|dgeRenderingFunction|valuateScheduledTask|xpectedValue))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:F(?:actorComplete|ontForm|ormTheme|romDate|ullOptions))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:G(?:raphStyle|raphicsArray|raphicsSpacing|ridBaseline))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:H(?:TMLSave|eldPart|iddenSurface|omeDirectory))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:I(?:mageRotated|nstanceNormalizationLayer))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:L(?:UBackSubstitution|egendreType|ightSources|inearProgramming|inkOpen|iteral|ongestMatch))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:M(?:eshRange|oleculeEquivalentQ))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:N(?:etInformation|etSharedArray|extScheduledTaskTime|otebookCreate))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:O(?:penTemporary))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:P(?:IDData|ackingMethod|ersistentValue|ixelConstrained|lot3Matrix|lotDivision|lotJoined|olygonIntersections|redictorInformation|roperties|roperty|ropertyList|ropertyValue))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:R(?:andom|asterArray|ecognitionThreshold|elease|emoteKernelObject|emoveAsynchronousTask|emoveProperty|emoveScheduledTask|enderAll|eplaceHeldPart|esetScheduledTask|esumePacket|unScheduledTask))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:S(?:cheduledTaskActiveQ|cheduledTaskInformation|cheduledTaskObject|cheduledTasks|creenRectangle|electionAnimate|equenceAttentionLayer|equenceForm|etProperty|hading|hortestMatch|ingularValues|kinStyle|ocialMediaData|tartAsynchronousTask|tartScheduledTask|tateDimensions|topAsynchronousTask|topScheduledTask|tructuredArray|tyleForm|tylePrint|ubscripted|urfaceColor|urfaceGraphics|uspendPacket|ystemModelProgressReporting))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:T(?:eXSave|extStyle|imeWarpingCorrespondence|imeWarpingDistance|oDate|oFileName|oHeldExpression))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:U(?:RLFetch|RLFetchAsynchronous|RLSave|RLSaveAsynchronous))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:V(?:ectorScale|ertexCoordinateRules|ertexLabeling|ertexRenderingFunction))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:W(?:aitAsynchronousTask|indowMovable))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:\\$(?:AsynchronousTask|ConfiguredKernels|DefaultFont|EntityStores|FormatType|HTTPCookies|InstallationDate|MachineDomain|ProductInformation|ProgramName|RandomState|ScheduledTask|SummaryBoxDataSizeLimit|TemporaryPrefix|TextStyle|TopDirectory|UserAddOnsDirectory))(?![`$[:alnum:]])", + "name": "invalid.deprecated.wolfram" + }, + { + "match": "(?:A(?:ctionDelay|ctionMenuBox|ctionMenuBoxOptions|ctiveItem|lgebraicRulesData|lignmentMarker|llowAdultContent|llowChatServices|llowIncomplete|nalytic|nimatorBox|nimatorBoxOptions|nimatorElements|ppendCheck|rgumentCountQ|rrow3DBox|rrowBox|uthenticate|utoEvaluateEvents|utoIndentSpacings|utoMatch|utoNumberFormatting|utoQuoteCharacters|utoScaling|utoStyleOptions|utoStyleWords|utomaticImageSize|xis3DBox|xis3DBoxOptions|xisBox|xisBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:B(?:SplineCurve3DBox|SplineCurve3DBoxOptions|SplineCurveBox|SplineCurveBoxOptions|SplineSurface3DBox|SplineSurface3DBoxOptions|ackFaceColor|ackFaceGlowColor|ackFaceOpacity|ackFaceSpecularColor|ackFaceSpecularExponent|ackFaceSurfaceAppearance|ackFaceTexture|ackgroundAppearance|ackgroundTasksSettings|acksubstitution|eveled|ezierCurve3DBox|ezierCurve3DBoxOptions|ezierCurveBox|ezierCurveBoxOptions|lankForm|ounds|ox|oxDimensions|oxForm|oxID|oxRotation|oxRotationPoint|ra|raKet|rowserCategory|uttonCell|uttonContents|uttonStyleMenuListing))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:C(?:acheGraphics|achedValue|ardinalBSplineBasis|ellBoundingBox|ellContents|ellElementSpacings|ellElementsBoundingBox|ellFrameStyle|ellInsertionPointCell|ellTrayPosition|ellTrayWidgets|hangeOptions|hannelDatabin|hannelListenerWait|hannelPreSendFunction|hartElementData|hartElementDataFunction|heckAll|heckboxBox|heckboxBoxOptions|ircleBox|lipboardNotebook|lockwiseContourIntegral|losed|losingEvent|loudConnections|loudObjectInformation|loudObjectInformationData|loudUserID|oarse|oefficientDomain|olonForm|olorSetterBox|olorSetterBoxOptions|olumnBackgrounds|ompilerEnvironmentAppend|ompletionsListPacket|omponentwiseContextMenu|ompressedData|oneBox|onicHullRegion3DBox|onicHullRegion3DBoxOptions|onicHullRegionBox|onicHullRegionBoxOptions|onnect|ontentsBoundingBox|ontextMenu|ontinuation|ontourIntegral|ontourSmoothing|ontrolAlignment|ontrollerDuration|ontrollerInformationData|onvertToPostScript|onvertToPostScriptPacket|ookies|opyTag|ounterBox|ounterBoxOptions|ounterClockwiseContourIntegral|ounterEvaluator|ounterStyle|uboidBox|uboidBoxOptions|urlyDoubleQuote|urlyQuote|ylinderBox|ylinderBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:D(?:OSTextFormat|ampingFactor|ataCompression|atasetDisplayPanel|ateDelimiters|ebugTag|ecimal|efault2DTool|efault3DTool|efaultAttachedCellStyle|efaultControlPlacement|efaultDockedCellStyle|efaultInputFormatType|efaultOutputFormatType|efaultStyle|efaultTextFormatType|efaultTextInlineFormatType|efaultValue|efineExternal|egreeLexicographic|egreeReverseLexicographic|eleteWithContents|elimitedArray|estroyAfterEvaluation|eviceOpenQ|ialogIndent|ialogLevel|ifferenceOrder|igitBlockMinimum|isableConsolePrintPacket|iskBox|iskBoxOptions|ispatchQ|isplayRules|isplayTemporary|istributionDomain|ivergence|ocumentGeneratorInformationData|omainRegistrationInformation|oubleContourIntegral|oublyInfinite|own|rawBackFaces|rawFrontFaces|rawHighlighted|ualLinearProgramming|umpGet|ynamicBox|ynamicBoxOptions|ynamicLocation|ynamicModuleBox|ynamicModuleBoxOptions|ynamicModuleParent|ynamicName|ynamicNamespace|ynamicReference|ynamicWrapperBox|ynamicWrapperBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:E(?:ditButtonSettings|liminationOrder|llipticReducedHalfPeriods|mbeddingObject|mphasizeSyntaxErrors|mpty|nableConsolePrintPacket|ndAdd|ngineEnvironment|nter|qualColumns|qualRows|quatedTo|rrorBoxOptions|rrorNorm|rrorPacket|rrorsDialogSettings|valuated|valuationMode|valuationOrder|valuationRateLimit|ventEvaluator|ventHandlerTag|xactRootIsolation|xitDialog|xpectationE|xportPacket|xpressionPacket|xternalCall|xternalFunctionName))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:F(?:EDisableConsolePrintPacket|EEnableConsolePrintPacket|ail|ileInformation|ileName|illForm|illedCurveBox|illedCurveBoxOptions|ine|itAll|lashSelection|ont|ontName|ontOpacity|ontPostScriptName|ontReencoding|ormatRules|ormatValues|rameInset|rameless|rontEndObject|rontEndResource|rontEndResourceString|rontEndStackSize|rontEndValueCache|rontEndVersion|rontFaceColor|rontFaceGlowColor|rontFaceOpacity|rontFaceSpecularColor|rontFaceSpecularExponent|rontFaceSurfaceAppearance|rontFaceTexture|ullAxes))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:G(?:eneratedCellStyles|eneric|eometricTransformation3DBox|eometricTransformation3DBoxOptions|eometricTransformationBox|eometricTransformationBoxOptions|estureHandlerTag|etContext|etFileName|etLinebreakInformationPacket|lobalPreferences|lobalSession|raphLayerLabels|raphRoot|raphics3DBox|raphics3DBoxOptions|raphicsBaseline|raphicsBox|raphicsBoxOptions|raphicsComplex3DBox|raphicsComplex3DBoxOptions|raphicsComplexBox|raphicsComplexBoxOptions|raphicsContents|raphicsData|raphicsGridBox|raphicsGroup3DBox|raphicsGroup3DBoxOptions|raphicsGroupBox|raphicsGroupBoxOptions|raphicsGrouping|raphicsStyle|reekStyle|ridBoxAlignment|ridBoxBackground|ridBoxDividers|ridBoxFrame|ridBoxItemSize|ridBoxItemStyle|ridBoxOptions|ridBoxSpacings|ridElementStyleOptions|roupOpenerColor|roupOpenerInsideFrame|roupTogetherGrouping|roupTogetherNestedGrouping))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:H(?:eadCompose|eaders|elpBrowserLookup|elpBrowserNotebook|elpViewerSettings|essian|exahedronBox|exahedronBoxOptions|ighlightString|omePage|orizontal|orizontalForm|orizontalScrollPosition|yperlinkCreationSettings|yphenationOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:I(?:conizedObject|gnoreSpellCheck|mageCache|mageCacheValid|mageEditMode|mageMarkers|mageOffset|mageRangeCache|mageSizeCache|mageSizeRaw|nactiveStyle|ncludeSingularTerm|ndent|ndentMaxFraction|ndentingNewlineSpacings|ndexCreationOptions|ndexTag|nequality|nexactNumbers|nformationData|nformationDataGrid|nlineCounterAssignments|nlineCounterIncrements|nlineRules|nputFieldBox|nputFieldBoxOptions|nputGrouping|nputSettings|nputToBoxFormPacket|nsertionPointObject|nset3DBox|nset3DBoxOptions|nsetBox|nsetBoxOptions|ntegral|nterlaced|nterpolationPrecision|nterpretTemplate|nterruptSettings|nto|nvisibleApplication|nvisibleTimes|temBox|temBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:J(?:acobian|oinedCurveBox|oinedCurveBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:K(?:|ernelExecute|et))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:L(?:abeledSlider|ambertW|anguageOptions|aunch|ayoutInformation|exicographic|icenseID|ine3DBox|ine3DBoxOptions|ineBox|ineBoxOptions|ineBreak|ineWrapParts|inearFilter|inebreakSemicolonWeighting|inkConnectedQ|inkError|inkFlush|inkHost|inkMode|inkOptions|inkReadHeld|inkService|inkWriteHeld|istPickerBoxBackground|isten|iteralSearch|ocalizeDefinitions|ocatorBox|ocatorBoxOptions|ocatorCentering|ocatorPaneBox|ocatorPaneBoxOptions|ongEqual|ongForm|oopback))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:M(?:achineID|achineName|acintoshSystemPageSetup|ainSolve|aintainDynamicCaches|akeRules|atchLocalNameQ|aterial|athMLText|athematicaNotation|axBend|axPoints|enu|enuAppearance|enuEvaluator|enuItem|enuList|ergeDifferences|essageObject|essageOptions|essagesNotebook|etaCharacters|ethodOptions|inRecursion|inSize|ode|odular|onomialOrder|ouseAppearanceTag|ouseButtons|ousePointerNote|ultiLetterItalics|ultiLetterStyle|ultiplicity|ultiscriptBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:N(?:BernoulliB|ProductFactors|SumTerms|Values|amespaceBox|amespaceBoxOptions|estedScriptRules|etworkPacketRecordingDuring|ext|onAssociative|ormalGrouping|otebookDefault|otebookInterfaceObject))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:O(?:LEData|bjectExistsQ|pen|penFunctionInspectorPacket|penSpecialOptions|penerBox|penerBoxOptions|ptionQ|ptionValueBox|ptionValueBoxOptions|ptionsPacket|utputFormData|utputGrouping|utputMathEditExpression|ver|verlayBox|verlayBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:P(?:ackPaclet|ackage|acletDirectoryAdd|acletDirectoryRemove|acletInformation|acletObjectQ|acletUpdate|ageHeight|alettesMenuSettings|aneBox|aneBoxOptions|aneSelectorBox|aneSelectorBoxOptions|anelBox|anelBoxOptions|aperWidth|arameter|arameterVariables|arentConnect|arentForm|arentList|arenthesize|artialD|asteAutoQuoteCharacters|ausedTime|eriodicInterpolation|erpendicular|ickMode|ickedElements|ivoting|lotRangeClipPlanesStyle|oint3DBox|oint3DBoxOptions|ointBox|ointBoxOptions|olygon3DBox|olygon3DBoxOptions|olygonBox|olygonBoxOptions|olygonHoleScale|olygonScale|olyhedronBox|olyhedronBoxOptions|olynomialForm|olynomials|opupMenuBox|opupMenuBoxOptions|ostScript|recedence|redictionRoot|referencesSettings|revious|rimaryPlaceholder|rintForm|rismBox|rismBoxOptions|rivateFrontEndOptions|robabilityPr|rocessStateDomain|rocessTimeDomain|rogressIndicatorBox|rogressIndicatorBoxOptions|romptForm|yramidBox|yramidBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:R(?:adioButtonBox|adioButtonBoxOptions|andomSeed|angeSpecification|aster3DBox|aster3DBoxOptions|asterBox|asterBoxOptions|ationalFunctions|awArray|awMedium|ebuildPacletData|ectangleBox|ecurringDigitsForm|eferenceMarkerStyle|eferenceMarkers|einstall|emoved|epeatedString|esourceAcquire|esourceSubmissionObject|eturnCreatesNewCell|eturnEntersInput|eturnInputFormPacket|otationBox|otationBoxOptions|oundImplies|owBackgrounds|owHeights|uleCondition|uleForm))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:S(?:aveAutoDelete|caledMousePosition|cheduledTaskInformationData|criptForm|criptRules|ectionGrouping|electWithContents|election|electionCell|electionCellCreateCell|electionCellDefaultStyle|electionCellParentStyle|electionPlaceholder|elfLoops|erviceResponse|etOptionsPacket|etSecuredAuthenticationKey|etbacks|etterBox|etterBoxOptions|howAutoConvert|howCodeAssist|howControls|howGroupOpenCloseIcon|howInvisibleCharacters|howPredictiveInterface|howSyntaxStyles|hrinkWrapBoundingBox|ingleEvaluation|ingleLetterStyle|lider2DBox|lider2DBoxOptions|ocket|olveDelayed|oundAndGraphics|pace|paceForm|panningCharacters|phereBox|phereBoxOptions|tartupSound|tringBreak|tringByteCount|tripStyleOnPaste|trokeForm|tructuredArrayHeadQ|tyleKeyMapping|tyleNames|urfaceAppearance|yntax|ystemException|ystemGet|ystemInformationData|ystemStub|ystemTest))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:T(?:ab|abViewBox|abViewBoxOptions|ableViewBox|ableViewBoxAlignment|ableViewBoxBackground|ableViewBoxHeaders|ableViewBoxItemSize|ableViewBoxItemStyle|ableViewBoxOptions|agBoxNote|agStyle|emplateEvaluate|emplateSlotSequence|emplateUnevaluated|emplateVerbatim|emporaryVariable|ensorQ|etrahedronBox|etrahedronBoxOptions|ext3DBox|ext3DBoxOptions|extBand|extBoundingBox|extBox|extForm|extLine|extParagraph|hisLink|itleGrouping|oColor|oggle|oggleFalse|ogglerBox|ogglerBoxOptions|ooBig|ooltipBox|ooltipBoxOptions|otalHeight|raceAction|raceInternal|raceLevel|rackCellChangeTimes|raditionalNotation|raditionalOrder|ransparentColor|rapEnterKey|rapSelection|ubeBSplineCurveBox|ubeBSplineCurveBoxOptions|ubeBezierCurveBox|ubeBezierCurveBoxOptions|ubeBox|ubeBoxOptions))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:U(?:ntrackedVariables|p|seGraphicsRange|serDefinedWavelet|sing))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:V(?:2Get|alueBox|alueBoxOptions|alueForm|aluesData|ectorGlyphData|erbose|ertical|erticalForm|iewPointSelectorSettings|iewPort|irtualGroupData|isibleCell))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:W(?:aitUntil|ebPageMetaInformation|holeCellGroupOpener|indowPersistentStyles|indowSelected|indowWidth|olframAlphaDate|olframAlphaQuantity|olframAlphaResult|olframCloudSettings))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:\\$(?:ActivationGroupID|ActivationUserRegistered|AddOnsDirectory|BoxForms|CloudConnection|CloudVersionNumber|CloudWolframEngineVersionNumber|ConditionHold|DefaultMailbox|DefaultPath|FinancialDataSource|GeoEntityTypes|GeoLocationPrecision|HTMLExportRules|HTTPRequest|LaunchDirectory|LicenseProcesses|LicenseSubprocesses|LicenseType|LinkSupported|LoadedFiles|MaxLicenseProcesses|MaxLicenseSubprocesses|MinorReleaseNumber|NetworkLicense|Off|OutputForms|PatchLevelID|PermissionsGroupBase|PipeSupported|PreferencesDirectory|PrintForms|PrintLiteral|RegisteredDeviceClasses|RegisteredUserName|SecuredAuthenticationKeyTokens|SetParentLink|SoundDisplay|SuppressInputFormHeads|SystemMemory|TraceOff|TraceOn|TracePattern|TracePostAction|TracePreAction|UserAgentLanguages|UserAgentMachine|UserAgentName|UserAgentOperatingSystem|UserAgentVersion|UserName))(?![`$[:alnum:]])", + "name": "support.function.undocumented.wolfram" + }, + { + "match": "(?:A(?:ctiveClassification|ctiveClassificationObject|ctivePrediction|ctivePredictionObject|ddToSearchIndex|ggregatedEntityClass|ggregationLayer|ngleBisector|nimatedImage|nimationVideo|nomalyDetector|ppendLayer|pplication|pplyReaction|round|roundReplace|rrayReduce|sk|skAppend|skConfirm|skDisplay|skFunction|skState|skTemplateDisplay|skedQ|skedValue|ssessmentFunction|ssessmentResultObject|ssumeDeterministic|stroAngularSeparation|stroBackground|stroCenter|stroDistance|stroGraphics|stroGridLines|stroGridLinesStyle|stroPosition|stroProjection|stroRange|stroRangePadding|stroReferenceFrame|stroStyling|stroZoomLevel|tom|tomCoordinates|tomCount|tomDiagramCoordinates|tomLabelStyle|tomLabels|tomList|ttachCell|ttentionLayer|udioAnnotate|udioAnnotationLookup|udioIdentify|udioInstanceQ|udioPause|udioPlay|udioRecord|udioStop|udioStream|udioStreams|udioTrackApply|udioTrackSelection|utocomplete|utocompletionFunction|xiomaticTheory|xisLabel|xisObject|xisStyle))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:B(?:asicRecurrentLayer|atchNormalizationLayer|atchSize|ayesianMaximization|ayesianMaximizationObject|ayesianMinimization|ayesianMinimizationObject|esagL|innedVariogramList|inomialPointProcess|ioSequence|ioSequenceBackTranslateList|ioSequenceComplement|ioSequenceInstances|ioSequenceModify|ioSequencePlot|ioSequenceQ|ioSequenceReverseComplement|ioSequenceTranscribe|ioSequenceTranslate|itRate|lockDiagonalMatrix|lockLowerTriangularMatrix|lockUpperTriangularMatrix|lockchainAddressData|lockchainBase|lockchainBlockData|lockchainContractValue|lockchainData|lockchainGet|lockchainKeyEncode|lockchainPut|lockchainTokenData|lockchainTransaction|lockchainTransactionData|lockchainTransactionSign|lockchainTransactionSubmit|ond|ondCount|ondLabelStyle|ondLabels|ondList|ondQ|uildCompiledComponent))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:C(?:TCLossLayer|achePersistence|anvas|ast|ategoricalDistribution|atenateLayer|auchyPointProcess|hannelBase|hannelBrokerAction|hannelHistoryLength|hannelListen|hannelListener|hannelListeners|hannelObject|hannelReceiverFunction|hannelSend|hannelSubscribers|haracterNormalize|hemicalConvert|hemicalFormula|hemicalInstance|hemicalReaction|loudExpression|loudExpressions|loudRenderingMethod|ombinatorB|ombinatorC|ombinatorI|ombinatorK|ombinatorS|ombinatorW|ombinatorY|ombinedEntityClass|ompiledCodeFunction|ompiledComponent|ompiledExpressionDeclaration|ompiledLayer|ompilerCallback|ompilerEnvironment|ompilerEnvironmentAppendTo|ompilerEnvironmentObject|ompilerOptions|omplementedEntityClass|omputeUncertainty|onfirmQuiet|onformationMethod|onnectSystemModelComponents|onnectSystemModelController|onnectedMoleculeComponents|onnectedMoleculeQ|onnectionSettings|ontaining|ontentDetectorFunction|ontentFieldOptions|ontentLocationFunction|ontentObject|ontrastiveLossLayer|onvolutionLayer|reateChannel|reateCloudExpression|reateCompilerEnvironment|reateDataStructure|reateDataSystemModel|reateLicenseEntitlement|reateSearchIndex|reateSystemModel|reateTypeInstance|rossEntropyLossLayer|urrentNotebookImage|urrentScreenImage|urryApplied))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:D(?:SolveChangeVariables|ataStructure|ataStructureQ|atabaseConnect|atabaseDisconnect|atabaseReference|atabinSubmit|ateInterval|eclareCompiledComponent|econvolutionLayer|ecryptFile|eleteChannel|eleteCloudExpression|eleteElements|eleteSearchIndex|erivedKey|iggleGatesPointProcess|iggleGrattonPointProcess|igitalSignature|isableFormatting|ocumentWeightingRules|otLayer|ownValuesFunction|ropoutLayer|ynamicImage))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:E(?:choTiming|lementwiseLayer|mbeddedSQLEntityClass|mbeddedSQLExpression|mbeddingLayer|mptySpaceF|ncryptFile|ntityFunction|ntityStore|stimatedPointProcess|stimatedVariogramModel|valuationEnvironment|valuationPrivileges|xpirationDate|xpressionTree|xtendedEntityClass|xternalEvaluate|xternalFunction|xternalIdentifier|xternalObject|xternalSessionObject|xternalSessions|xternalStorageBase|xternalStorageDownload|xternalStorageGet|xternalStorageObject|xternalStoragePut|xternalStorageUpload|xternalValue|xtractLayer))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:F(?:aceRecognize|eatureDistance|eatureExtract|eatureExtraction|eatureExtractor|eatureExtractorFunction|ileConvert|ileFormatProperties|ileNameToFormatList|ileSystemTree|ilteredEntityClass|indChannels|indEquationalProof|indExternalEvaluators|indGeometricConjectures|indImageText|indIsomers|indMoleculeSubstructure|indPointProcessParameters|indSystemModelEquilibrium|indTextualAnswer|lattenLayer|orAllType|ormControl|orwardCloudCredentials|oxHReduce|rameListVideo|romRawPointer|unctionCompile|unctionCompileExport|unctionCompileExportByteArray|unctionCompileExportLibrary|unctionCompileExportString|unctionDeclaration|unctionLayer|unctionPoles))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:G(?:alleryView|atedRecurrentLayer|enerateDerivedKey|enerateDigitalSignature|enerateFileSignature|enerateSecuredAuthenticationKey|eneratedAssetFormat|eneratedAssetLocation|eoGraphValuePlot|eoOrientationData|eometricAssertion|eometricScene|eometricStep|eometricStylingRules|eometricTest|ibbsPointProcess|raphTree|ridVideo))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:H(?:andlerFunctions|andlerFunctionsKeys|ardcorePointProcess|istogramPointDensity))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:I(?:gnoreIsotopes|gnoreStereochemistry|mageAugmentationLayer|mageBoundingBoxes|mageCases|mageContainsQ|mageContents|mageGraphics|magePosition|magePyramid|magePyramidApply|mageStitch|mportedObject|ncludeAromaticBonds|ncludeHydrogens|ncludeRelatedTables|nertEvaluate|nertExpression|nfiniteFuture|nfinitePast|nhomogeneousPoissonPointProcess|nitialEvaluationHistory|nitializationObject|nitializationObjects|nitializationValue|nitialize|nputPorts|ntegrateChangeVariables|nterfaceSwitched|ntersectedEntityClass|nverseImagePyramid))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:K(?:ernelConfiguration|ernelFunction))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:L(?:earningRateMultipliers|ibraryFunctionDeclaration|icenseEntitlementObject|icenseEntitlements|icensingSettings|inearLayer|iteralType|oadCompiledComponent|ocalResponseNormalizationLayer|ongShortTermMemoryLayer|ossFunction))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:M(?:IMETypeToFormatList|ailExecute|ailFolder|ailItem|ailSearch|ailServerConnect|ailServerConnection|aternPointProcess|axDisplayedChildren|axTrainingRounds|axWordGap|eanAbsoluteLossLayer|eanAround|eanPointDensity|eanSquaredLossLayer|ergingFunction|idpoint|issingValuePattern|issingValueSynthesis|olecule|oleculeAlign|oleculeContainsQ|oleculeDraw|oleculeFreeQ|oleculeGraph|oleculeMatchQ|oleculeMaximumCommonSubstructure|oleculeModify|oleculeName|oleculePattern|oleculePlot|oleculePlot3D|oleculeProperty|oleculeQ|oleculeRecognize|oleculeSubstructureCount|oleculeValue))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:N(?:BodySimulation|BodySimulationData|earestNeighborG|estTree|etAppend|etArray|etArrayLayer|etBidirectionalOperator|etChain|etDecoder|etDelete|etDrop|etEncoder|etEvaluationMode|etExternalObject|etExtract|etFlatten|etFoldOperator|etGANOperator|etGraph|etInitialize|etInsert|etInsertSharedArrays|etJoin|etMapOperator|etMapThreadOperator|etMeasurements|etModel|etNestOperator|etPairEmbeddingOperator|etPort|etPortGradient|etPrepend|etRename|etReplace|etReplacePart|etStateObject|etTake|etTrain|etTrainResultsObject|etUnfold|etworkPacketCapture|etworkPacketRecording|etworkPacketTrace|eymanScottPointProcess|ominalScale|ormalizationLayer|umericArray|umericArrayQ|umericArrayType))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:O(?:peratorApplied|rderingLayer|rdinalScale|utputPorts|verlayVideo))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:P(?:acletSymbol|addingLayer|agination|airCorrelationG|arametricRampLayer|arentEdgeLabel|arentEdgeLabelFunction|arentEdgeLabelStyle|arentEdgeShapeFunction|arentEdgeStyle|arentEdgeStyleFunction|artLayer|artProtection|atternFilling|atternReaction|enttinenPointProcess|erpendicularBisector|ersistenceLocation|ersistenceTime|ersistentObject|ersistentObjects|ersistentSymbol|itchRecognize|laceholderLayer|laybackSettings|ointCountDistribution|ointDensity|ointDensityFunction|ointProcessEstimator|ointProcessFitTest|ointProcessParameterAssumptions|ointProcessParameterQ|ointStatisticFunction|ointValuePlot|oissonPointProcess|oolingLayer|rependLayer|roofObject|ublisherID))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:Q(?:uestionGenerator|uestionInterface|uestionObject|uestionSelector))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:R(?:andomArrayLayer|andomInstance|andomPointConfiguration|andomTree|eactionBalance|eactionBalancedQ|ecalibrationFunction|egisterExternalEvaluator|elationalDatabase|emoteAuthorizationCaching|emoteBatchJobAbort|emoteBatchJobObject|emoteBatchJobs|emoteBatchMapSubmit|emoteBatchSubmissionEnvironment|emoteBatchSubmit|emoteConnect|emoteConnectionObject|emoteEvaluate|emoteFile|emoteInputFiles|emoteProviderSettings|emoteRun|emoteRunProcess|emovalConditions|emoveAudioStream|emoveChannelListener|emoveChannelSubscribers|emoveVideoStream|eplicateLayer|eshapeLayer|esizeLayer|esourceFunction|esourceRegister|esourceRemove|esourceSubmit|esourceSystemBase|esourceSystemPath|esourceUpdate|esourceVersion|everseApplied|ipleyK|ipleyRassonRegion|ootTree|ulesTree))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:S(?:ameTestProperties|ampledEntityClass|earchAdjustment|earchIndexObject|earchIndices|earchQueryString|earchResultObject|ecuredAuthenticationKey|ecuredAuthenticationKeys|ecurityCertificate|equenceIndicesLayer|equenceLastLayer|equenceMostLayer|equencePredict|equencePredictorFunction|equenceRestLayer|equenceReverseLayer|erviceRequest|erviceSubmit|etFileFormatProperties|etSystemModel|lideShowVideo|moothPointDensity|nippet|nippetsVideo|nubPolyhedron|oftmaxLayer|olidBoundaryLoadValue|olidDisplacementCondition|olidFixedCondition|olidMechanicsPDEComponent|olidMechanicsStrain|olidMechanicsStress|ortedEntityClass|ourceLink|patialBinnedPointData|patialBoundaryCorrection|patialEstimate|patialEstimatorFunction|patialJ|patialNoiseLevel|patialObservationRegionQ|patialPointData|patialPointSelect|patialRandomnessTest|patialTransformationLayer|patialTrendFunction|peakerMatchQ|peechCases|peechInterpreter|peechRecognize|plice|tartExternalSession|tartWebSession|tereochemistryElements|traussHardcorePointProcess|traussPointProcess|ubsetCases|ubsetCount|ubsetPosition|ubsetReplace|ubtitleTrackSelection|ummationLayer|ymmetricDifference|ynthesizeMissingValues|ystemCredential|ystemCredentialData|ystemCredentialKey|ystemCredentialKeys|ystemCredentialStoreObject|ystemInstall|ystemModel|ystemModelExamples|ystemModelLinearize|ystemModelMeasurements|ystemModelParametricSimulate|ystemModelPlot|ystemModelReliability|ystemModelSimulate|ystemModelSimulateSensitivity|ystemModelSimulationData|ystemModeler|ystemModels))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:T(?:ableView|argetDevice|argetSystem|ernaryListPlot|ernaryPlotCorners|extCases|extContents|extElement|extPosition|extSearch|extSearchReport|extStructure|homasPointProcess|hreaded|hreadingLayer|ickDirection|ickLabelOrientation|ickLabelPositioning|ickLabels|ickLengths|ickPositions|oRawPointer|otalLayer|ourVideo|rainImageContentDetector|rainTextContentDetector|rainingProgressCheckpointing|rainingProgressFunction|rainingProgressMeasurements|rainingProgressReporting|rainingStoppingCriterion|rainingUpdateSchedule|ransposeLayer|ree|reeCases|reeChildren|reeCount|reeData|reeDelete|reeDepth|reeElementCoordinates|reeElementLabel|reeElementLabelFunction|reeElementLabelStyle|reeElementShape|reeElementShapeFunction|reeElementSize|reeElementSizeFunction|reeElementStyle|reeElementStyleFunction|reeExpression|reeExtract|reeFold|reeInsert|reeLayout|reeLeafCount|reeLeafQ|reeLeaves|reeLevel|reeMap|reeMapAt|reeOutline|reePosition|reeQ|reeReplacePart|reeRules|reeScan|reeSelect|reeSize|reeTraversalOrder|riangleCenter|riangleConstruct|riangleMeasurement|ypeDeclaration|ypeEvaluate|ypeOf|ypeSpecifier|yped))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:U(?:RLDownloadSubmit|nconstrainedParameters|nionedEntityClass|niqueElements|nitVectorLayer|nlabeledTree|nmanageObject|nregisterExternalEvaluator|pdateSearchIndex|seEmbeddedLibrary))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:V(?:alenceErrorHandling|alenceFilling|aluePreprocessingFunction|andermondeMatrix|arianceGammaPointProcess|ariogramFunction|ariogramModel|ectorAround|erifyDerivedKey|erifyDigitalSignature|erifyFileSignature|erifyInterpretation|ideo|ideoCapture|ideoCombine|ideoDelete|ideoExtractFrames|ideoFrameList|ideoFrameMap|ideoGenerator|ideoInsert|ideoIntervals|ideoJoin|ideoMap|ideoMapList|ideoMapTimeSeries|ideoPadding|ideoPause|ideoPlay|ideoQ|ideoRecord|ideoReplace|ideoScreenCapture|ideoSplit|ideoStop|ideoStream|ideoStreams|ideoTimeStretch|ideoTrackSelection|ideoTranscode|ideoTransparency|ideoTrim))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:W(?:ebAudioSearch|ebColumn|ebElementObject|ebExecute|ebImage|ebImageSearch|ebItem|ebRow|ebSearch|ebSessionObject|ebSessions|ebWindowObject|ikidataData|ikidataSearch|ikipediaSearch|ithCleanup|ithLock))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:Z(?:oomCenter|oomFactor))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:\\$(?:AllowExternalChannelFunctions|AudioDecoders|AudioEncoders|BlockchainBase|ChannelBase|CompilerEnvironment|CookieStore|CryptographicEllipticCurveNames|CurrentWebSession|DataStructures|DefaultNetworkInterface|DefaultProxyRules|DefaultRemoteBatchSubmissionEnvironment|DefaultRemoteKernel|DefaultSystemCredentialStore|ExternalIdentifierTypes|ExternalStorageBase|GeneratedAssetLocation|IncomingMailSettings|Initialization|InitializationContexts|MaxDisplayedChildren|NetworkInterfaces|NoValue|PersistenceBase|PersistencePath|PreInitialization|PublisherID|ResourceSystemBase|ResourceSystemPath|SSHAuthentication|ServiceCreditsAvailable|SourceLink|SubtitleDecoders|SubtitleEncoders|SystemCredentialStore|TargetSystems|TestFileName|VideoDecoders|VideoEncoders|VoiceStyles))(?![`$[:alnum:]])", + "name": "support.function.experimental.wolfram" + }, + { + "match": "(?:A(?:llFalse|nyFalse))(?![`$[:alnum:]])", + "name": "invalid.bad.wolfram" + }, + { + "match": "(?:B(?:oolean))(?![`$[:alnum:]])", + "name": "invalid.bad.wolfram" + }, + { + "match": "(?:C(?:loudbase|omplexQ))(?![`$[:alnum:]])", + "name": "invalid.bad.wolfram" + }, + { + "match": "(?:D(?:ataSet))(?![`$[:alnum:]])", + "name": "invalid.bad.wolfram" + }, + { + "match": "(?:E(?:xpandFilename|xportPacket))(?![`$[:alnum:]])", + "name": "invalid.bad.wolfram" + }, + { + "match": "(?:F(?:ailed|alseQ))(?![`$[:alnum:]])", + "name": "invalid.bad.wolfram" + }, + { + "match": "(?:I(?:nterpolationFunction|nterpolationPolynomial))(?![`$[:alnum:]])", + "name": "invalid.bad.wolfram" + }, + { + "match": "(?:M(?:atch))(?![`$[:alnum:]])", + "name": "invalid.bad.wolfram" + }, + { + "match": "(?:O(?:ptionPattern|ptionsQ))(?![`$[:alnum:]])", + "name": "invalid.bad.wolfram" + }, + { + "match": "(?:R(?:ationalQ|ealQ))(?![`$[:alnum:]])", + "name": "invalid.bad.wolfram" + }, + { + "match": "(?:S(?:tringMatch|ymbolQ))(?![`$[:alnum:]])", + "name": "invalid.bad.wolfram" + }, + { + "match": "(?:U(?:nSameQ|rlExecute))(?![`$[:alnum:]])", + "name": "invalid.bad.wolfram" + }, + { + "match": "(?:\\$(?:PathNameSeparator|RegisteredUsername))(?![`$[:alnum:]])", + "name": "invalid.bad.wolfram" + }, + { + "match": "(?:E(?:cho|xit))(?![`$[:alnum:]])", + "name": "invalid.session.wolfram" + }, + { + "match": "(?:I(?:n|nString))(?![`$[:alnum:]])", + "name": "invalid.session.wolfram" + }, + { + "match": "(?:O(?:ut))(?![`$[:alnum:]])", + "name": "invalid.session.wolfram" + }, + { + "match": "(?:P(?:rint))(?![`$[:alnum:]])", + "name": "invalid.session.wolfram" + }, + { + "match": "(?:Q(?:uit))(?![`$[:alnum:]])", + "name": "invalid.session.wolfram" + }, + { + "match": "(?:\\$(?:HistoryLength|Line|Post|Pre|PrePrint|PreRead|SyntaxHandler))(?![`$[:alnum:]])", + "name": "invalid.session.wolfram" + }, + { + "match": "(?:[$[:alpha:]][$[:alnum:]]*)(?=\\s*(\\[(?!\\s*\\[)|@(?!@)))", + "name": "variable.function.wolfram" + }, + { + "match": "(?:[$[:alpha:]][$[:alnum:]]*)", + "name": "symbol.unrecognized.wolfram" + } + ] + }, + "groups": { + "patterns": [ + { + "match": "\\\\\\)", + "name": "invalid.illegal.stray-linearsyntaxparens-end.wolfram" + }, + { + "match": "\\)", + "name": "invalid.illegal.stray-parens-end.wolfram" + }, + { + "match": "\\[\\s+\\[", + "name": "invalid.whitespace.Part.wolfram" + }, + { + "match": "\\]\\s+\\]", + "name": "invalid.whitespace.Part.wolfram" + }, + { + "match": "\\]\\]", + "name": "invalid.illegal.stray-parts-end.wolfram" + }, + { + "match": "\\]", + "name": "invalid.illegal.stray-brackets-end.wolfram" + }, + { + "match": "\\}", + "name": "invalid.illegal.stray-braces-end.wolfram" + }, + { + "match": "\\|>", + "name": "invalid.illegal.stray-associations-end.wolfram" + }, + { + "include": "#linearsyntaxparen-group" + }, + { + "include": "#paren-group" + }, + { + "include": "#part-group" + }, + { + "include": "#bracket-group" + }, + { + "include": "#brace-group" + }, + { + "include": "#association-group" + } + ] + }, + "linearsyntaxparen-group": { + "name": "meta.linearsyntaxparens.wolfram", + "begin": "\\\\\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.linearsyntaxparens.begin.wolfram" + } + }, + "end": "\\\\\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.linearsyntaxparens.end.wolfram" + } + }, + "patterns": [ + { + "include": "#expressions" + } + ] + }, + "paren-group": { + "name": "meta.parens.wolfram", + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.parens.begin.wolfram" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.parens.end.wolfram" + } + }, + "patterns": [ + { + "include": "#expressions" + } + ] + }, + "part-group": { + "name": "meta.parts.wolfram", + "begin": "\\[\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.parts.begin.wolfram" + } + }, + "end": "\\]\\]", + "endCaptures": { + "0": { + "name": "punctuation.section.parts.end.wolfram" + } + }, + "patterns": [ + { + "include": "#expressions" + } + ] + }, + "bracket-group": { + "name": "meta.brackets.wolfram", + "begin": "::\\[|\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.brackets.begin.wolfram" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.section.brackets.end.wolfram" + } + }, + "patterns": [ + { + "include": "#expressions" + } + ] + }, + "brace-group": { + "name": "meta.braces.wolfram", + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.braces.begin.wolfram" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.braces.end.wolfram" + } + }, + "patterns": [ + { + "include": "#expressions" + } + ] + }, + "association-group": { + "name": "meta.associations.wolfram", + "begin": "<\\|", + "beginCaptures": { + "0": { + "name": "punctuation.section.associations.begin.wolfram" + } + }, + "end": "\\|>", + "endCaptures": { + "0": { + "name": "punctuation.section.associations.end.wolfram" + } + }, + "patterns": [ + { + "include": "#expressions" + } + ] + }, + "pattern-operators": { + "patterns": [ + { + "match": "___", + "name": "keyword.operator.BlankNullSequence.wolfram" + }, + { + "match": "__", + "name": "keyword.operator.BlankSequence.wolfram" + }, + { + "match": "_\\.", + "name": "keyword.operator.Optional.wolfram" + }, + { + "match": "_", + "name": "keyword.operator.Blank.wolfram" + } + ] + }, + "out": { + "patterns": [ + { + "match": "%\\d+", + "name": "keyword.other.Out.wolfram" + }, + { + "match": "%+", + "name": "keyword.other.Out.wolfram" + } + ] + }, + "slot": { + "patterns": [ + { + "match": "#[[:alpha:]][[:alnum:]]*", + "name": "keyword.other.Slot.wolfram" + }, + { + "match": "##\\d*", + "name": "keyword.other.SlotSequence.wolfram" + }, + { + "match": "#\\d*", + "name": "keyword.other.Slot.wolfram" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/xml.tmLanguage.json b/src/lib/shiki/languages/xml.tmLanguage.json new file mode 100644 index 0000000..4d55a61 --- /dev/null +++ b/src/lib/shiki/languages/xml.tmLanguage.json @@ -0,0 +1,387 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-xml/blob/master/grammars/xml.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/atom/language-xml/commit/7bc75dfe779ad5b35d9bf4013d9181864358cb49", + "name": "xml", + "scopeName": "text.xml", + "patterns": [ + { + "begin": "(<\\?)\\s*([-_a-zA-Z0-9]+)", + "captures": { + "1": { + "name": "punctuation.definition.tag.xml" + }, + "2": { + "name": "entity.name.tag.xml" + } + }, + "end": "(\\?>)", + "name": "meta.tag.preprocessor.xml", + "patterns": [ + { + "match": " ([a-zA-Z-]+)", + "name": "entity.other.attribute-name.xml" + }, + { + "include": "#doublequotedString" + }, + { + "include": "#singlequotedString" + } + ] + }, + { + "begin": "(<!)(DOCTYPE)\\s+([:a-zA-Z_][:a-zA-Z0-9_.-]*)", + "captures": { + "1": { + "name": "punctuation.definition.tag.xml" + }, + "2": { + "name": "keyword.other.doctype.xml" + }, + "3": { + "name": "variable.language.documentroot.xml" + } + }, + "end": "\\s*(>)", + "name": "meta.tag.sgml.doctype.xml", + "patterns": [ + { + "include": "#internalSubset" + } + ] + }, + { + "include": "#comments" + }, + { + "begin": "(<)((?:([-_a-zA-Z0-9]+)(:))?([-_a-zA-Z0-9:]+))(?=(\\s[^>]*)?></\\2>)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.tag.xml" + }, + "2": { + "name": "entity.name.tag.xml" + }, + "3": { + "name": "entity.name.tag.namespace.xml" + }, + "4": { + "name": "punctuation.separator.namespace.xml" + }, + "5": { + "name": "entity.name.tag.localname.xml" + } + }, + "end": "(>)(</)((?:([-_a-zA-Z0-9]+)(:))?([-_a-zA-Z0-9:]+))(>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.xml" + }, + "2": { + "name": "punctuation.definition.tag.xml" + }, + "3": { + "name": "entity.name.tag.xml" + }, + "4": { + "name": "entity.name.tag.namespace.xml" + }, + "5": { + "name": "punctuation.separator.namespace.xml" + }, + "6": { + "name": "entity.name.tag.localname.xml" + }, + "7": { + "name": "punctuation.definition.tag.xml" + } + }, + "name": "meta.tag.no-content.xml", + "patterns": [ + { + "include": "#tagStuff" + } + ] + }, + { + "begin": "(</?)(?:([-\\w\\.]+)((:)))?([-\\w\\.:]+)", + "captures": { + "1": { + "name": "punctuation.definition.tag.xml" + }, + "2": { + "name": "entity.name.tag.namespace.xml" + }, + "3": { + "name": "entity.name.tag.xml" + }, + "4": { + "name": "punctuation.separator.namespace.xml" + }, + "5": { + "name": "entity.name.tag.localname.xml" + } + }, + "end": "(/?>)", + "name": "meta.tag.xml", + "patterns": [ + { + "include": "#tagStuff" + } + ] + }, + { + "include": "#entity" + }, + { + "include": "#bare-ampersand" + }, + { + "begin": "<%@", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.xml" + } + }, + "end": "%>", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.xml" + } + }, + "name": "source.java-props.embedded.xml", + "patterns": [ + { + "match": "page|include|taglib", + "name": "keyword.other.page-props.xml" + } + ] + }, + { + "begin": "<%[!=]?(?!--)", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.xml" + } + }, + "end": "(?!--)%>", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.xml" + } + }, + "name": "source.java.embedded.xml", + "patterns": [ + { + "include": "source.java" + } + ] + }, + { + "begin": "<!\\[CDATA\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.xml" + } + }, + "end": "]]>", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.xml" + } + }, + "name": "string.unquoted.cdata.xml" + } + ], + "repository": { + "EntityDecl": { + "begin": "(<!)(ENTITY)\\s+(%\\s+)?([:a-zA-Z_][:a-zA-Z0-9_.-]*)(\\s+(?:SYSTEM|PUBLIC)\\s+)?", + "captures": { + "1": { + "name": "punctuation.definition.tag.xml" + }, + "2": { + "name": "keyword.other.entity.xml" + }, + "3": { + "name": "punctuation.definition.entity.xml" + }, + "4": { + "name": "variable.language.entity.xml" + }, + "5": { + "name": "keyword.other.entitytype.xml" + } + }, + "end": "(>)", + "patterns": [ + { + "include": "#doublequotedString" + }, + { + "include": "#singlequotedString" + } + ] + }, + "bare-ampersand": { + "match": "&", + "name": "invalid.illegal.bad-ampersand.xml" + }, + "doublequotedString": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.xml" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.xml" + } + }, + "name": "string.quoted.double.xml", + "patterns": [ + { + "include": "#entity" + }, + { + "include": "#bare-ampersand" + } + ] + }, + "entity": { + "captures": { + "1": { + "name": "punctuation.definition.constant.xml" + }, + "3": { + "name": "punctuation.definition.constant.xml" + } + }, + "match": "(&)([:a-zA-Z_][:a-zA-Z0-9_.-]*|#[0-9]+|#x[0-9a-fA-F]+)(;)", + "name": "constant.character.entity.xml" + }, + "internalSubset": { + "begin": "(\\[)", + "captures": { + "1": { + "name": "punctuation.definition.constant.xml" + } + }, + "end": "(\\])", + "name": "meta.internalsubset.xml", + "patterns": [ + { + "include": "#EntityDecl" + }, + { + "include": "#parameterEntity" + }, + { + "include": "#comments" + } + ] + }, + "parameterEntity": { + "captures": { + "1": { + "name": "punctuation.definition.constant.xml" + }, + "3": { + "name": "punctuation.definition.constant.xml" + } + }, + "match": "(%)([:a-zA-Z_][:a-zA-Z0-9_.-]*)(;)", + "name": "constant.character.parameter-entity.xml" + }, + "singlequotedString": { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.xml" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.xml" + } + }, + "name": "string.quoted.single.xml", + "patterns": [ + { + "include": "#entity" + }, + { + "include": "#bare-ampersand" + } + ] + }, + "tagStuff": { + "patterns": [ + { + "captures": { + "1": { + "name": "entity.other.attribute-name.namespace.xml" + }, + "2": { + "name": "entity.other.attribute-name.xml" + }, + "3": { + "name": "punctuation.separator.namespace.xml" + }, + "4": { + "name": "entity.other.attribute-name.localname.xml" + } + }, + "match": "(?:^|\\s+)(?:([-\\w.]+)((:)))?([-\\w.:]+)\\s*=" + }, + { + "include": "#doublequotedString" + }, + { + "include": "#singlequotedString" + } + ] + }, + "comments": { + "patterns": [ + { + "begin": "<%--", + "captures": { + "0": { + "name": "punctuation.definition.comment.xml" + }, + "end": "--%>", + "name": "comment.block.xml" + } + }, + { + "begin": "<!--", + "captures": { + "0": { + "name": "punctuation.definition.comment.xml" + } + }, + "end": "-->", + "name": "comment.block.xml", + "patterns": [ + { + "begin": "--(?!>)", + "captures": { + "0": { + "name": "invalid.illegal.bad-comments-or-CDATA.xml" + } + } + } + ] + } + ] + } + } +} diff --git a/src/lib/shiki/languages/xsl.tmLanguage.json b/src/lib/shiki/languages/xsl.tmLanguage.json new file mode 100644 index 0000000..9b81a5f --- /dev/null +++ b/src/lib/shiki/languages/xsl.tmLanguage.json @@ -0,0 +1,94 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-xml/blob/master/grammars/xsl.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/atom/language-xml/commit/507de2ee7daca60cf02e9e21fbeb92bbae73e280", + "name": "xsl", + "scopeName": "text.xml.xsl", + "patterns": [ + { + "begin": "(<)(xsl)((:))(template)", + "captures": { + "1": { + "name": "punctuation.definition.tag.xml" + }, + "2": { + "name": "entity.name.tag.namespace.xml" + }, + "3": { + "name": "entity.name.tag.xml" + }, + "4": { + "name": "punctuation.separator.namespace.xml" + }, + "5": { + "name": "entity.name.tag.localname.xml" + } + }, + "end": "(>)", + "name": "meta.tag.xml.template", + "patterns": [ + { + "captures": { + "1": { + "name": "entity.other.attribute-name.namespace.xml" + }, + "2": { + "name": "entity.other.attribute-name.xml" + }, + "3": { + "name": "punctuation.separator.namespace.xml" + }, + "4": { + "name": "entity.other.attribute-name.localname.xml" + } + }, + "match": " (?:([-_a-zA-Z0-9]+)((:)))?([a-zA-Z-]+)" + }, + { + "include": "#doublequotedString" + }, + { + "include": "#singlequotedString" + } + ] + }, + { + "include": "text.xml" + } + ], + "repository": { + "doublequotedString": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.xml" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.xml" + } + }, + "name": "string.quoted.double.xml" + }, + "singlequotedString": { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.xml" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.xml" + } + }, + "name": "string.quoted.single.xml" + } + } +} diff --git a/src/lib/shiki/languages/yaml.tmLanguage.json b/src/lib/shiki/languages/yaml.tmLanguage.json new file mode 100644 index 0000000..add1ba2 --- /dev/null +++ b/src/lib/shiki/languages/yaml.tmLanguage.json @@ -0,0 +1,621 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/yaml.tmbundle/blob/master/Syntaxes/YAML.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/textmate/yaml.tmbundle/commit/e54ceae3b719506dba7e481a77cea4a8b576ae46", + "name": "yaml", + "scopeName": "source.yaml", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#property" + }, + { + "include": "#directive" + }, + { + "match": "^---", + "name": "entity.other.document.begin.yaml" + }, + { + "match": "^\\.{3}", + "name": "entity.other.document.end.yaml" + }, + { + "include": "#node" + } + ], + "repository": { + "block-collection": { + "patterns": [ + { + "include": "#block-sequence" + }, + { + "include": "#block-mapping" + } + ] + }, + "block-mapping": { + "patterns": [ + { + "include": "#block-pair" + } + ] + }, + "block-node": { + "patterns": [ + { + "include": "#prototype" + }, + { + "include": "#block-scalar" + }, + { + "include": "#block-collection" + }, + { + "include": "#flow-scalar-plain-out" + }, + { + "include": "#flow-node" + } + ] + }, + "block-pair": { + "patterns": [ + { + "begin": "\\?", + "beginCaptures": { + "1": { + "name": "punctuation.definition.key-value.begin.yaml" + } + }, + "end": "(?=\\?)|^ *(:)|(:)", + "endCaptures": { + "1": { + "name": "punctuation.separator.key-value.mapping.yaml" + }, + "2": { + "name": "invalid.illegal.expected-newline.yaml" + } + }, + "name": "meta.block-mapping.yaml", + "patterns": [ + { + "include": "#block-node" + } + ] + }, + { + "begin": "(?x)\n (?=\n (?x:\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] \\S\n )\n (\n [^\\s:]\n | : \\S\n | \\s+ (?![#\\s])\n )*\n \\s*\n :\n\t\t\t\t\t\t\t(\\s|$)\n )\n ", + "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n )\n ", + "patterns": [ + { + "include": "#flow-scalar-plain-out-implicit-type" + }, + { + "begin": "(?x)\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] \\S\n ", + "beginCaptures": { + "0": { + "name": "entity.name.tag.yaml" + } + }, + "contentName": "entity.name.tag.yaml", + "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n )\n ", + "name": "string.unquoted.plain.out.yaml" + } + ] + }, + { + "match": ":(?=\\s|$)", + "name": "punctuation.separator.key-value.mapping.yaml" + } + ] + }, + "block-scalar": { + "begin": "(?:(\\|)|(>))([1-9])?([-+])?(.*\\n?)", + "beginCaptures": { + "1": { + "name": "keyword.control.flow.block-scalar.literal.yaml" + }, + "2": { + "name": "keyword.control.flow.block-scalar.folded.yaml" + }, + "3": { + "name": "constant.numeric.indentation-indicator.yaml" + }, + "4": { + "name": "storage.modifier.chomping-indicator.yaml" + }, + "5": { + "patterns": [ + { + "include": "#comment" + }, + { + "match": ".+", + "name": "invalid.illegal.expected-comment-or-newline.yaml" + } + ] + } + }, + "end": "^(?=\\S)|(?!\\G)", + "patterns": [ + { + "begin": "^([ ]+)(?! )", + "end": "^(?!\\1|\\s*$)", + "name": "string.unquoted.block.yaml" + } + ] + }, + "block-sequence": { + "match": "(-)(?!\\S)", + "name": "punctuation.definition.block.sequence.item.yaml" + }, + "comment": { + "begin": "(?:(^[ \\t]*)|[ \\t]+)(?=#\\p{Print}*$)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.yaml" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.yaml" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.yaml" + } + ] + }, + "directive": { + "begin": "^%", + "beginCaptures": { + "0": { + "name": "punctuation.definition.directive.begin.yaml" + } + }, + "end": "(?=$|[ \\t]+($|#))", + "name": "meta.directive.yaml", + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.other.directive.yaml.yaml" + }, + "2": { + "name": "constant.numeric.yaml-version.yaml" + } + }, + "match": "\\G(YAML)[ \\t]+(\\d+\\.\\d+)" + }, + { + "captures": { + "1": { + "name": "keyword.other.directive.tag.yaml" + }, + "2": { + "name": "storage.type.tag-handle.yaml" + }, + "3": { + "name": "support.type.tag-prefix.yaml" + } + }, + "match": "(?x)\n \\G\n (TAG)\n (?:[ \\t]+\n ((?:!(?:[0-9A-Za-z\\-]*!)?))\n (?:[ \\t]+ (\n ! (?x: %[0-9A-Fa-f]{2} | [0-9A-Za-z\\-#;/?:@&=+$,_.!~*'()\\[\\]] )*\n | (?![,!\\[\\]{}]) (?x: %[0-9A-Fa-f]{2} | [0-9A-Za-z\\-#;/?:@&=+$,_.!~*'()\\[\\]] )+\n )\n )?\n )?\n " + }, + { + "captures": { + "1": { + "name": "support.other.directive.reserved.yaml" + }, + "2": { + "name": "string.unquoted.directive-name.yaml" + }, + "3": { + "name": "string.unquoted.directive-parameter.yaml" + } + }, + "match": "(?x) \\G (\\w+) (?:[ \\t]+ (\\w+) (?:[ \\t]+ (\\w+))? )?" + }, + { + "match": "\\S+", + "name": "invalid.illegal.unrecognized.yaml" + } + ] + }, + "flow-alias": { + "captures": { + "1": { + "name": "keyword.control.flow.alias.yaml" + }, + "2": { + "name": "punctuation.definition.alias.yaml" + }, + "3": { + "name": "variable.other.alias.yaml" + }, + "4": { + "name": "invalid.illegal.character.anchor.yaml" + } + }, + "match": "((\\*))([^\\s\\[\\]/{/},]+)([^\\s\\]},]\\S*)?" + }, + "flow-collection": { + "patterns": [ + { + "include": "#flow-sequence" + }, + { + "include": "#flow-mapping" + } + ] + }, + "flow-mapping": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.mapping.begin.yaml" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.mapping.end.yaml" + } + }, + "name": "meta.flow-mapping.yaml", + "patterns": [ + { + "include": "#prototype" + }, + { + "match": ",", + "name": "punctuation.separator.mapping.yaml" + }, + { + "include": "#flow-pair" + } + ] + }, + "flow-node": { + "patterns": [ + { + "include": "#prototype" + }, + { + "include": "#flow-alias" + }, + { + "include": "#flow-collection" + }, + { + "include": "#flow-scalar" + } + ] + }, + "flow-pair": { + "patterns": [ + { + "begin": "\\?", + "beginCaptures": { + "0": { + "name": "punctuation.definition.key-value.begin.yaml" + } + }, + "end": "(?=[},\\]])", + "name": "meta.flow-pair.explicit.yaml", + "patterns": [ + { + "include": "#prototype" + }, + { + "include": "#flow-pair" + }, + { + "include": "#flow-node" + }, + { + "begin": ":(?=\\s|$|[\\[\\]{},])", + "beginCaptures": { + "0": { + "name": "punctuation.separator.key-value.mapping.yaml" + } + }, + "end": "(?=[},\\]])", + "patterns": [ + { + "include": "#flow-value" + } + ] + } + ] + }, + { + "begin": "(?x)\n (?=\n (?:\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] [^\\s[\\[\\]{},]]\n )\n (\n [^\\s:[\\[\\]{},]]\n | : [^\\s[\\[\\]{},]]\n | \\s+ (?![#\\s])\n )*\n \\s*\n :\n\t\t\t\t\t\t\t(\\s|$)\n )\n ", + "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n | \\s* : [\\[\\]{},]\n | \\s* [\\[\\]{},]\n )\n ", + "name": "meta.flow-pair.key.yaml", + "patterns": [ + { + "include": "#flow-scalar-plain-in-implicit-type" + }, + { + "begin": "(?x)\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] [^\\s[\\[\\]{},]]\n ", + "beginCaptures": { + "0": { + "name": "entity.name.tag.yaml" + } + }, + "contentName": "entity.name.tag.yaml", + "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n | \\s* : [\\[\\]{},]\n | \\s* [\\[\\]{},]\n )\n ", + "name": "string.unquoted.plain.in.yaml" + } + ] + }, + { + "include": "#flow-node" + }, + { + "begin": ":(?=\\s|$|[\\[\\]{},])", + "captures": { + "0": { + "name": "punctuation.separator.key-value.mapping.yaml" + } + }, + "end": "(?=[},\\]])", + "name": "meta.flow-pair.yaml", + "patterns": [ + { + "include": "#flow-value" + } + ] + } + ] + }, + "flow-scalar": { + "patterns": [ + { + "include": "#flow-scalar-double-quoted" + }, + { + "include": "#flow-scalar-single-quoted" + }, + { + "include": "#flow-scalar-plain-in" + } + ] + }, + "flow-scalar-double-quoted": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.yaml" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.yaml" + } + }, + "name": "string.quoted.double.yaml", + "patterns": [ + { + "match": "\\\\([0abtnvfre \"/\\\\N_Lp]|x\\d\\d|u\\d{4}|U\\d{8})", + "name": "constant.character.escape.yaml" + }, + { + "match": "\\\\\\n", + "name": "constant.character.escape.double-quoted.newline.yaml" + } + ] + }, + "flow-scalar-plain-in": { + "patterns": [ + { + "include": "#flow-scalar-plain-in-implicit-type" + }, + { + "begin": "(?x)\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] [^\\s[\\[\\]{},]]\n ", + "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n | \\s* : [\\[\\]{},]\n | \\s* [\\[\\]{},]\n )\n ", + "name": "string.unquoted.plain.in.yaml" + } + ] + }, + "flow-scalar-plain-in-implicit-type": { + "patterns": [ + { + "captures": { + "1": { + "name": "constant.language.null.yaml" + }, + "2": { + "name": "constant.language.boolean.yaml" + }, + "3": { + "name": "constant.numeric.integer.yaml" + }, + "4": { + "name": "constant.numeric.float.yaml" + }, + "5": { + "name": "constant.other.timestamp.yaml" + }, + "6": { + "name": "constant.language.value.yaml" + }, + "7": { + "name": "constant.language.merge.yaml" + } + }, + "match": "(?x)\n (?x:\n (null|Null|NULL|~)\n | (y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)\n | (\n (?:\n [-+]? 0b [0-1_]+ # (base 2)\n | [-+]? 0 [0-7_]+ # (base 8)\n | [-+]? (?: 0|[1-9][0-9_]*) # (base 10)\n | [-+]? 0x [0-9a-fA-F_]+ # (base 16)\n | [-+]? [1-9] [0-9_]* (?: :[0-5]?[0-9])+ # (base 60)\n )\n )\n | (\n (?x:\n [-+]? (?: [0-9] [0-9_]*)? \\. [0-9.]* (?: [eE] [-+] [0-9]+)? # (base 10)\n | [-+]? [0-9] [0-9_]* (?: :[0-5]?[0-9])+ \\. [0-9_]* # (base 60)\n | [-+]? \\. (?: inf|Inf|INF) # (infinity)\n | \\. (?: nan|NaN|NAN) # (not a number)\n )\n )\n | (\n (?x:\n \\d{4} - \\d{2} - \\d{2} # (y-m-d)\n | \\d{4} # (year)\n - \\d{1,2} # (month)\n - \\d{1,2} # (day)\n (?: [Tt] | [ \\t]+) \\d{1,2} # (hour)\n : \\d{2} # (minute)\n : \\d{2} # (second)\n (?: \\.\\d*)? # (fraction)\n (?:\n (?:[ \\t]*) Z\n | [-+] \\d{1,2} (?: :\\d{1,2})?\n )? # (time zone)\n )\n )\n | (=)\n | (<<)\n )\n (?:\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n | \\s* : [\\[\\]{},]\n | \\s* [\\[\\]{},]\n )\n )\n " + } + ] + }, + "flow-scalar-plain-out": { + "patterns": [ + { + "include": "#flow-scalar-plain-out-implicit-type" + }, + { + "begin": "(?x)\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] \\S\n ", + "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n )\n ", + "name": "string.unquoted.plain.out.yaml" + } + ] + }, + "flow-scalar-plain-out-implicit-type": { + "patterns": [ + { + "captures": { + "1": { + "name": "constant.language.null.yaml" + }, + "2": { + "name": "constant.language.boolean.yaml" + }, + "3": { + "name": "constant.numeric.integer.yaml" + }, + "4": { + "name": "constant.numeric.float.yaml" + }, + "5": { + "name": "constant.other.timestamp.yaml" + }, + "6": { + "name": "constant.language.value.yaml" + }, + "7": { + "name": "constant.language.merge.yaml" + } + }, + "match": "(?x)\n (?x:\n (null|Null|NULL|~)\n | (y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)\n | (\n (?:\n [-+]? 0b [0-1_]+ # (base 2)\n | [-+]? 0 [0-7_]+ # (base 8)\n | [-+]? (?: 0|[1-9][0-9_]*) # (base 10)\n | [-+]? 0x [0-9a-fA-F_]+ # (base 16)\n | [-+]? [1-9] [0-9_]* (?: :[0-5]?[0-9])+ # (base 60)\n )\n )\n | (\n (?x:\n [-+]? (?: [0-9] [0-9_]*)? \\. [0-9.]* (?: [eE] [-+] [0-9]+)? # (base 10)\n | [-+]? [0-9] [0-9_]* (?: :[0-5]?[0-9])+ \\. [0-9_]* # (base 60)\n | [-+]? \\. (?: inf|Inf|INF) # (infinity)\n | \\. (?: nan|NaN|NAN) # (not a number)\n )\n )\n | (\n (?x:\n \\d{4} - \\d{2} - \\d{2} # (y-m-d)\n | \\d{4} # (year)\n - \\d{1,2} # (month)\n - \\d{1,2} # (day)\n (?: [Tt] | [ \\t]+) \\d{1,2} # (hour)\n : \\d{2} # (minute)\n : \\d{2} # (second)\n (?: \\.\\d*)? # (fraction)\n (?:\n (?:[ \\t]*) Z\n | [-+] \\d{1,2} (?: :\\d{1,2})?\n )? # (time zone)\n )\n )\n | (=)\n | (<<)\n )\n (?x:\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n )\n )\n " + } + ] + }, + "flow-scalar-single-quoted": { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.yaml" + } + }, + "end": "'(?!')", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.yaml" + } + }, + "name": "string.quoted.single.yaml", + "patterns": [ + { + "match": "''", + "name": "constant.character.escape.single-quoted.yaml" + } + ] + }, + "flow-sequence": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.sequence.begin.yaml" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.sequence.end.yaml" + } + }, + "name": "meta.flow-sequence.yaml", + "patterns": [ + { + "include": "#prototype" + }, + { + "match": ",", + "name": "punctuation.separator.sequence.yaml" + }, + { + "include": "#flow-pair" + }, + { + "include": "#flow-node" + } + ] + }, + "flow-value": { + "patterns": [ + { + "begin": "\\G(?![},\\]])", + "end": "(?=[},\\]])", + "name": "meta.flow-pair.value.yaml", + "patterns": [ + { + "include": "#flow-node" + } + ] + } + ] + }, + "node": { + "patterns": [ + { + "include": "#block-node" + } + ] + }, + "property": { + "begin": "(?=!|&)", + "end": "(?!\\G)", + "name": "meta.property.yaml", + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.control.property.anchor.yaml" + }, + "2": { + "name": "punctuation.definition.anchor.yaml" + }, + "3": { + "name": "entity.name.type.anchor.yaml" + }, + "4": { + "name": "invalid.illegal.character.anchor.yaml" + } + }, + "match": "\\G((&))([^\\s\\[\\]/{/},]+)(\\S+)?" + }, + { + "match": "(?x)\n \\G\n (?:\n ! < (?: %[0-9A-Fa-f]{2} | [0-9A-Za-z\\-#;/?:@&=+$,_.!~*'()\\[\\]] )+ >\n | (?:!(?:[0-9A-Za-z\\-]*!)?) (?: %[0-9A-Fa-f]{2} | [0-9A-Za-z\\-#;/?:@&=+$_.~*'()] )+\n | !\n )\n (?=\\ |\\t|$)\n ", + "name": "storage.type.tag-handle.yaml" + }, + { + "match": "\\S+", + "name": "invalid.illegal.tag-handle.yaml" + } + ] + }, + "prototype": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#property" + } + ] + } + } +} diff --git a/src/lib/shiki/languages/zenscript.tmLanguage.json b/src/lib/shiki/languages/zenscript.tmLanguage.json new file mode 100644 index 0000000..e779df7 --- /dev/null +++ b/src/lib/shiki/languages/zenscript.tmLanguage.json @@ -0,0 +1,254 @@ +{ + "fileTypes": ["zs"], + "name": "zenscript", + "patterns": [ + { + "comment": "numbers", + "name": "constant.numeric.zenscript", + "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDd]|UL|ul)?\\b" + }, + { + "comment": "prefixedNumbers", + "name": "constant.numeric.zenscript", + "match": "\\b\\-?(0b|0x|0o|0B|0X|0O)(0|[1-9a-fA-F][0-9a-fA-F_]*)[a-zA-Z_]*\\b" + }, + { + "include": "#code" + }, + { + "comment": "arrays", + "name": "storage.type.object.array.zenscript", + "match": "\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*)(?=\\[)" + } + ], + "repository": { + "code": { + "patterns": [ + { + "include": "#class" + }, + { + "include": "#functions" + }, + { + "include": "#dots" + }, + { + "include": "#quotes" + }, + { + "include": "#brackets" + }, + { + "include": "#comments" + }, + { + "include": "#var" + }, + { + "include": "#keywords" + }, + { + "include": "#constants" + }, + { + "include": "#operators" + } + ] + }, + "class": { + "comment": "class", + "name": "meta.class.zenscript", + "match": "(zenClass)\\s+(\\w+)", + "captures": { + "1": { + "name": "storage.type.zenscript" + }, + "2": { + "name": "entity.name.type.class.zenscript" + } + } + }, + "functions": { + "comment": "functions", + "name": "meta.function.zenscript", + "match": "function\\s+([A-Za-z_$][\\w$]*)\\s*(?=\\()", + "captures": { + "0": { + "name": "storage.type.function.zenscript" + }, + "1": { + "name": "entity.name.function.zenscript" + } + } + }, + "dots": { + "comment": "dots", + "name": "plain.text.zenscript", + "match": "\\b(\\w+)(\\.)(\\w+)((\\.)(\\w+))*", + "captures": { + "1": { + "name": "storage.type.zenscript" + }, + "2": { + "name": "keyword.control.zenscript" + }, + "5": { + "name": "keyword.control.zenscript" + } + } + }, + "quotes": { + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.zenscript" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.zenscript" + } + }, + "name": "string.quoted.double.zenscript", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.zenscript" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.zenscript" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.zenscript" + } + }, + "name": "string.quoted.single.zenscript", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.zenscript" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "comment": "items and blocks", + "name": "keyword.other.zenscript", + "match": "(<)\\b(.*?)(:(.*?(:(\\*|\\d+)?)?)?)(>)", + "captures": { + "1": { + "name": "keyword.control.zenscript" + }, + "2": { + "name": "keyword.other.zenscript" + }, + "3": { + "name": "keyword.control.zenscript" + }, + "4": { + "name": "variable.other.zenscript" + }, + "5": { + "name": "keyword.control.zenscript" + }, + "6": { + "name": "constant.numeric.zenscript" + }, + "7": { + "name": "keyword.control.zenscript" + } + } + } + ] + }, + "comments": { + "patterns": [ + { + "comment": "inline comments", + "name": "comment.line.double=slash", + "match": "//[^\n]*" + }, + { + "comment": "block comments", + "name": "comment.block", + "begin": "\\/\\*", + "beginCaptures": { + "0": { + "name": "comment.block" + } + }, + "end": "\\*\\/", + "endCaptures": { + "0": { + "name": "comment.block" + } + } + } + ] + }, + "var": { + "comment": "var", + "match": "\\b(val|var)\\b", + "name": "storage.type" + }, + "keywords": { + "patterns": [ + { + "comment": "statement keywords", + "name": "keyword.control.zenscript", + "match": "\\b(instanceof|get|implements|set|import|function|override|const|if|else|do|while|for|throw|panic|lock|try|catch|finally|return|break|continue|switch|case|default|in|is|as|match|throws|super|new)\\b" + }, + { + "comment": "storage keywords", + "name": "storage.type.zenscript", + "match": "\\b(zenClass|zenConstructor|alias|class|interface|enum|struct|expand|variant|set|void|bool|byte|sbyte|short|ushort|int|uint|long|ulong|usize|float|double|char|string)\\b" + }, + { + "comment": "modifier keywords", + "name": "storage.modifier.zenscript", + "match": "\\b(variant|abstract|final|private|public|export|internal|static|protected|implicit|virtual|extern|immutable)\\b" + }, + { + "comment": "annotation keywords", + "name": "entity.other.attribute-name", + "match": "\\b(Native|Precondition)\\b" + }, + { + "comment": "language keywords", + "name": "constant.language", + "match": "\\b(null|true|false)\\b" + } + ] + }, + "operators": { + "patterns": [ + { + "comment": "math operators", + "name": "keyword.control", + "match": "\\b(\\.|\\.\\.|\\.\\.\\.|,|\\+|\\+=|\\+\\+|-|-=|--|~|~=|\\*|\\*=|/|/=|%|%=|\\||\\|=|\\|\\||&|&=|&&|\\^|\\^=|\\?|\\?\\.|\\?\\?|<|<=|<<|<<=|>|>=|>>|>>=|>>>|>>>=|=>|=|==|===|!|!=|!==|\\$|`)\\b" + }, + { + "comment": "colons", + "name": "keyword.control", + "match": "\\b(;|:)\\b" + } + ] + } + }, + "scopeName": "source.zenscript" +} diff --git a/src/lib/shiki/languages/zig.tmLanguage.json b/src/lib/shiki/languages/zig.tmLanguage.json new file mode 100644 index 0000000..3012648 --- /dev/null +++ b/src/lib/shiki/languages/zig.tmLanguage.json @@ -0,0 +1,309 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "zig", + "scopeName": "source.zig", + "fileTypes": ["zig", "zon"], + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#strings" + }, + { + "include": "#keywords" + }, + { + "include": "#operators" + }, + { + "include": "#numbers" + }, + { + "include": "#support" + }, + { + "include": "#variables" + } + ], + "repository": { + "variables": { + "patterns": [ + { + "name": "meta.function.declaration.zig", + "patterns": [ + { + "match": "\\b(fn)\\s+([A-Z][a-zA-Z0-9]*)\\b", + "captures": { + "1": { + "name": "storage.type.function.zig" + }, + "2": { + "name": "entity.name.type.zig" + } + } + }, + { + "match": "\\b(fn)\\s+([_a-zA-Z][_a-zA-Z0-9]*)\\b", + "captures": { + "1": { + "name": "storage.type.function.zig" + }, + "2": { + "name": "entity.name.function.zig" + } + } + }, + { + "begin": "\\b(fn)\\s+@\"", + "end": "\"", + "name": "entity.name.function.string.zig", + "beginCaptures": { + "1": { + "name": "storage.type.function.zig" + } + }, + "patterns": [ + { + "include": "#stringcontent" + } + ] + }, + { + "name": "keyword.default.zig", + "match": "\\b(const|var|fn)\\b" + } + ] + }, + { + "name": "meta.function.call.zig", + "patterns": [ + { + "match": "([A-Z][a-zA-Z0-9]*)(?=\\s*\\()", + "name": "entity.name.type.zig" + }, + { + "match": "([_a-zA-Z][_a-zA-Z0-9]*)(?=\\s*\\()", + "name": "entity.name.function.zig" + } + ] + }, + { + "name": "meta.variable.zig", + "patterns": [ + { + "match": "\\b[_a-zA-Z][_a-zA-Z0-9]*\\b", + "name": "variable.zig" + }, + { + "begin": "@\"", + "end": "\"", + "name": "variable.string.zig", + "patterns": [ + { + "include": "#stringcontent" + } + ] + } + ] + } + ] + }, + "keywords": { + "patterns": [ + { + "match": "\\binline\\b(?!\\s*\\bfn\\b)", + "name": "keyword.control.repeat.zig" + }, + { + "match": "\\b(while|for)\\b", + "name": "keyword.control.repeat.zig" + }, + { + "name": "keyword.storage.zig", + "match": "\\b(extern|packed|export|pub|noalias|inline|comptime|volatile|align|linksection|threadlocal|allowzero|noinline|callconv)\\b" + }, + { + "name": "keyword.structure.zig", + "match": "\\b(struct|enum|union|opaque)\\b" + }, + { + "name": "keyword.statement.zig", + "match": "\\b(asm|unreachable)\\b" + }, + { + "name": "keyword.control.flow.zig", + "match": "\\b(break|return|continue|defer|errdefer)\\b" + }, + { + "name": "keyword.control.async.zig", + "match": "\\b(await|resume|suspend|async|nosuspend)\\b" + }, + { + "name": "keyword.control.trycatch.zig", + "match": "\\b(try|catch)\\b" + }, + { + "name": "keyword.control.conditional.zig", + "match": "\\b(if|else|switch|orelse)\\b" + }, + { + "name": "keyword.constant.default.zig", + "match": "\\b(null|undefined)\\b" + }, + { + "name": "keyword.constant.bool.zig", + "match": "\\b(true|false)\\b" + }, + { + "name": "keyword.default.zig", + "match": "\\b(usingnamespace|test|and|or)\\b" + }, + { + "name": "keyword.type.zig", + "match": "\\b(bool|void|noreturn|type|error|anyerror|anyframe|anytype|anyopaque)\\b" + }, + { + "name": "keyword.type.integer.zig", + "match": "\\b(f16|f32|f64|f80|f128|u\\d+|i\\d+|isize|usize|comptime_int|comptime_float)\\b" + }, + { + "name": "keyword.type.c.zig", + "match": "\\b(c_char|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|c_longlong|c_ulonglong|c_longdouble)\\b" + } + ] + }, + "operators": { + "patterns": [ + { + "name": "keyword.operator.c-pointer.zig", + "match": "\\[*c\\]" + }, + { + "name": "keyword.operator.comparison.zig", + "match": "(\\b(and|or)\\b)|(==|!=)" + }, + { + "name": "keyword.operator.arithmetic.zig", + "match": "(-%?|\\+%?|\\*%?|/|%)=?" + }, + { + "name": "keyword.operator.bitwise.zig", + "match": "(<<%?|>>|!|&|\\^|\\|)=?" + }, + { + "name": "keyword.operator.special.zig", + "match": "(==|\\+\\+|\\*\\*|->)" + } + ] + }, + "comments": { + "patterns": [ + { + "name": "comment.line.documentation.zig", + "begin": "//[!/](?=[^/])", + "end": "$", + "patterns": [ + { + "include": "#commentContents" + } + ] + }, + { + "name": "comment.line.double-slash.zig", + "begin": "//", + "end": "$", + "patterns": [ + { + "include": "#commentContents" + } + ] + } + ] + }, + "commentContents": { + "patterns": [ + { + "match": "\\b(TODO|FIXME|XXX|NOTE)\\b:?", + "name": "keyword.todo.zig" + } + ] + }, + "strings": { + "patterns": [ + { + "name": "string.quoted.double.zig", + "begin": "\"", + "end": "\"", + "patterns": [ + { + "include": "#stringcontent" + } + ] + }, + { + "name": "string.multiline.zig", + "begin": "\\\\\\\\", + "end": "$" + }, + { + "name": "string.quoted.single.zig", + "match": "'([^'\\\\]|\\\\(x\\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.))'" + } + ] + }, + "stringcontent": { + "patterns": [ + { + "name": "constant.character.escape.zig", + "match": "\\\\([nrt'\"\\\\]|(x[0-9a-fA-F]{2})|(u\\{[0-9a-fA-F]+\\}))" + }, + { + "name": "invalid.illegal.unrecognized-string-escape.zig", + "match": "\\\\." + } + ] + }, + "numbers": { + "patterns": [ + { + "name": "constant.numeric.hexfloat.zig", + "match": "\\b0x[0-9a-fA-F][0-9a-fA-F_]*(\\.[0-9a-fA-F][0-9a-fA-F_]*)?([pP][+-]?[0-9a-fA-F_]+)?\\b" + }, + { + "name": "constant.numeric.float.zig", + "match": "\\b[0-9][0-9_]*(\\.[0-9][0-9_]*)?([eE][+-]?[0-9_]+)?\\b" + }, + { + "name": "constant.numeric.decimal.zig", + "match": "\\b[0-9][0-9_]*\\b" + }, + { + "name": "constant.numeric.hexadecimal.zig", + "match": "\\b0x[a-fA-F0-9_]+\\b" + }, + { + "name": "constant.numeric.octal.zig", + "match": "\\b0o[0-7_]+\\b" + }, + { + "name": "constant.numeric.binary.zig", + "match": "\\b0b[01_]+\\b" + }, + { + "name": "constant.numeric.invalid.zig", + "match": "\\b[0-9](([eEpP][+-])|[0-9a-zA-Z_])*(\\.(([eEpP][+-])|[0-9a-zA-Z_])*)?([eEpP][+-])?[0-9a-zA-Z_]*\\b" + } + ] + }, + "support": { + "patterns": [ + { + "comment": "Built-in functions", + "name": "support.function.builtin.zig", + "match": "@[_a-zA-Z][_a-zA-Z0-9]*" + } + ] + } + } +} diff --git a/src/lib/shiki/themes/css-variables.json b/src/lib/shiki/themes/css-variables.json new file mode 100644 index 0000000..6d3226d --- /dev/null +++ b/src/lib/shiki/themes/css-variables.json @@ -0,0 +1,186 @@ +{ + "name": "css-variables", + "type": "css", + "colors": { + "editor.foreground": "#000001", + "editor.background": "#000002", + "terminal.ansiBlack": "#A00000", + "terminal.ansiRed": "#A00001", + "terminal.ansiGreen": "#A00002", + "terminal.ansiYellow": "#A00003", + "terminal.ansiBlue": "#A00004", + "terminal.ansiMagenta": "#A00005", + "terminal.ansiCyan": "#A00006", + "terminal.ansiWhite": "#A00007", + "terminal.ansiBrightBlack": "#A00008", + "terminal.ansiBrightRed": "#A00009", + "terminal.ansiBrightGreen": "#A00010", + "terminal.ansiBrightYellow": "#A00011", + "terminal.ansiBrightBlue": "#A00012", + "terminal.ansiBrightMagenta": "#A00013", + "terminal.ansiBrightCyan": "#A00014", + "terminal.ansiBrightWhite": "#A00015" + }, + "tokenColors": [ + { + "settings": { + "foreground": "#000001" + } + }, + { + "scope": [ + "keyword.operator.accessor", + "meta.group.braces.round.function.arguments", + "meta.template.expression", + "markup.fenced_code meta.embedded.block" + ], + "settings": { + "foreground": "#000001" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": ["strong", "markup.heading.markdown", "markup.bold.markdown"], + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": ["markup.italic.markdown"], + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "meta.link.inline.markdown", + "settings": { + "fontStyle": "underline", + "foreground": "#000004" + } + }, + { + "scope": ["string", "markup.fenced_code", "markup.inline"], + "settings": { + "foreground": "#000005" + } + }, + { + "scope": ["comment", "string.quoted.docstring.multi"], + "settings": { + "foreground": "#000006" + } + }, + { + "scope": [ + "constant.numeric", + "constant.language", + "constant.other.placeholder", + "constant.character.format.placeholder", + "variable.language.this", + "variable.other.object", + "variable.other.class", + "variable.other.constant", + "meta.property-name", + "meta.property-value", + "support" + ], + "settings": { + "foreground": "#000004" + } + }, + { + "scope": [ + "keyword", + "storage.modifier", + "storage.type", + "storage.control.clojure", + "entity.name.function.clojure", + "entity.name.tag.yaml", + "support.function.node", + "support.type.property-name.json", + "punctuation.separator.key-value", + "punctuation.definition.template-expression" + ], + "settings": { + "foreground": "#000007" + } + }, + { + "scope": "variable.parameter.function", + "settings": { + "foreground": "#000008" + } + }, + { + "scope": [ + "support.function", + "entity.name.type", + "entity.other.inherited-class", + "meta.function-call", + "meta.instance.constructor", + "entity.other.attribute-name", + "entity.name.function", + "constant.keyword.clojure" + ], + "settings": { + "foreground": "#000009" + } + }, + { + "scope": [ + "entity.name.tag", + "string.quoted", + "string.regexp", + "string.interpolated", + "string.template", + "string.unquoted.plain.out.yaml", + "keyword.other.template" + ], + "settings": { + "foreground": "#000010" + } + }, + { + "scope": [ + "punctuation.definition.arguments", + "punctuation.definition.dict", + "punctuation.separator", + "meta.function-call.arguments" + ], + "settings": { + "foreground": "#000011" + } + }, + { + "name": "[Custom] Markdown links", + "scope": ["markup.underline.link", "punctuation.definition.metadata.markdown"], + "settings": { + "foreground": "#000012" + } + }, + { + "name": "[Custom] Markdown list", + "scope": ["beginning.punctuation.definition.list.markdown"], + "settings": { + "foreground": "#000005" + } + }, + { + "name": "[Custom] Markdown punctuation definition brackets", + "scope": [ + "punctuation.definition.string.begin.markdown", + "punctuation.definition.string.end.markdown", + "string.other.link.title.markdown", + "string.other.link.description.markdown" + ], + "settings": { + "foreground": "#000007" + } + } + ] +} diff --git a/src/lib/shiki/themes/dark-plus.json b/src/lib/shiki/themes/dark-plus.json new file mode 100644 index 0000000..98847f3 --- /dev/null +++ b/src/lib/shiki/themes/dark-plus.json @@ -0,0 +1,575 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "dark-plus", + "tokenColors": [ + { + "settings": { + "foreground": "#D4D4D4" + } + }, + { + "scope": [ + "meta.embedded", + "source.groovy.embedded", + "string meta.image.inline.markdown", + "variable.legacy.builtin.python" + ], + "settings": { + "foreground": "#D4D4D4" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "header", + "settings": { + "foreground": "#000080" + } + }, + { + "scope": "comment", + "settings": { + "foreground": "#6A9955" + } + }, + { + "scope": "constant.language", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": [ + "constant.numeric", + "variable.other.enummember", + "keyword.operator.plus.exponent", + "keyword.operator.minus.exponent" + ], + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "constant.regexp", + "settings": { + "foreground": "#646695" + } + }, + { + "scope": "entity.name.tag", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "entity.name.tag.css", + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": [ + "entity.other.attribute-name.class.css", + "entity.other.attribute-name.class.mixin.css", + "entity.other.attribute-name.id.css", + "entity.other.attribute-name.parent-selector.css", + "entity.other.attribute-name.pseudo-class.css", + "entity.other.attribute-name.pseudo-element.css", + "source.css.less entity.other.attribute-name.id", + "entity.other.attribute-name.scss" + ], + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "invalid", + "settings": { + "foreground": "#f44747" + } + }, + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#569cd6" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#569cd6" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.strikethrough", + "settings": { + "fontStyle": "strikethrough" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "punctuation.definition.quote.begin.markdown", + "settings": { + "foreground": "#6A9955" + } + }, + { + "scope": "punctuation.definition.list.begin.markdown", + "settings": { + "foreground": "#6796e6" + } + }, + { + "scope": "markup.inline.raw", + "settings": { + "foreground": "#ce9178" + } + }, + { + "name": "brackets of XML/HTML tags", + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#808080" + } + }, + { + "scope": ["meta.preprocessor", "entity.name.function.preprocessor"], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "meta.structure.dictionary.key.python", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "storage.type", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": ["storage.modifier", "keyword.operator.noexcept"], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": ["string", "meta.embedded.assembly"], + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.tag", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.value", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#d16969" + } + }, + { + "name": "String interpolation", + "scope": [ + "punctuation.definition.template-expression.begin", + "punctuation.definition.template-expression.end", + "punctuation.section.embedded" + ], + "settings": { + "foreground": "#569cd6" + } + }, + { + "name": "Reset JavaScript string interpolation expression", + "scope": ["meta.template.expression"], + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": [ + "support.type.vendored.property-name", + "support.type.property-name", + "variable.css", + "variable.scss", + "variable.other.less", + "source.coffee.embedded" + ], + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": [ + "keyword.operator.new", + "keyword.operator.expression", + "keyword.operator.cast", + "keyword.operator.sizeof", + "keyword.operator.alignof", + "keyword.operator.typeid", + "keyword.operator.alignas", + "keyword.operator.instanceof", + "keyword.operator.logical.python", + "keyword.operator.wordlike" + ], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": ["punctuation.section.embedded.begin.php", "punctuation.section.embedded.end.php"], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "name": "coloring of the Java import and package identifiers", + "scope": [ + "storage.modifier.import.java", + "variable.language.wildcard.java", + "storage.modifier.package.java" + ], + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "name": "this.self", + "scope": "variable.language", + "settings": { + "foreground": "#569cd6" + } + }, + { + "name": "Function declarations", + "scope": [ + "entity.name.function", + "support.function", + "support.constant.handlebars", + "source.powershell variable.other.member", + "entity.name.operator.custom-literal" + ], + "settings": { + "foreground": "#DCDCAA" + } + }, + { + "name": "Types declaration and references", + "scope": [ + "support.class", + "support.type", + "entity.name.type", + "entity.name.namespace", + "entity.other.attribute", + "entity.name.scope-resolution", + "entity.name.class", + "storage.type.numeric.go", + "storage.type.byte.go", + "storage.type.boolean.go", + "storage.type.string.go", + "storage.type.uintptr.go", + "storage.type.error.go", + "storage.type.rune.go", + "storage.type.cs", + "storage.type.generic.cs", + "storage.type.modifier.cs", + "storage.type.variable.cs", + "storage.type.annotation.java", + "storage.type.generic.java", + "storage.type.java", + "storage.type.object.array.java", + "storage.type.primitive.array.java", + "storage.type.primitive.java", + "storage.type.token.java", + "storage.type.groovy", + "storage.type.annotation.groovy", + "storage.type.parameters.groovy", + "storage.type.generic.groovy", + "storage.type.object.array.groovy", + "storage.type.primitive.array.groovy", + "storage.type.primitive.groovy" + ], + "settings": { + "foreground": "#4EC9B0" + } + }, + { + "name": "Types declaration and references, TS grammar specific", + "scope": [ + "meta.type.cast.expr", + "meta.type.new.expr", + "support.constant.math", + "support.constant.dom", + "support.constant.json", + "entity.other.inherited-class" + ], + "settings": { + "foreground": "#4EC9B0" + } + }, + { + "name": "Control flow / Special keywords", + "scope": [ + "keyword.control", + "source.cpp keyword.operator.new", + "keyword.operator.delete", + "keyword.other.using", + "keyword.other.operator", + "entity.name.operator" + ], + "settings": { + "foreground": "#C586C0" + } + }, + { + "name": "Variable and parameter name", + "scope": [ + "variable", + "meta.definition.variable.name", + "support.variable", + "entity.name.variable", + "constant.other.placeholder" + ], + "settings": { + "foreground": "#9CDCFE" + } + }, + { + "name": "Constants and enums", + "scope": ["variable.other.constant", "variable.other.enummember"], + "settings": { + "foreground": "#4FC1FF" + } + }, + { + "name": "Object keys, TS grammar specific", + "scope": ["meta.object-literal.key"], + "settings": { + "foreground": "#9CDCFE" + } + }, + { + "name": "CSS property value", + "scope": [ + "support.constant.property-value", + "support.constant.font-name", + "support.constant.media-type", + "support.constant.media", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#CE9178" + } + }, + { + "name": "Regular expression groups", + "scope": [ + "punctuation.definition.group.regexp", + "punctuation.definition.group.assertion.regexp", + "punctuation.definition.character-class.regexp", + "punctuation.character.set.begin.regexp", + "punctuation.character.set.end.regexp", + "keyword.operator.negation.regexp", + "support.other.parenthesis.regexp" + ], + "settings": { + "foreground": "#CE9178" + } + }, + { + "scope": [ + "constant.character.character-class.regexp", + "constant.other.character-class.set.regexp", + "constant.other.character-class.regexp", + "constant.character.set.regexp" + ], + "settings": { + "foreground": "#d16969" + } + }, + { + "scope": ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"], + "settings": { + "foreground": "#DCDCAA" + } + }, + { + "scope": "keyword.operator.quantifier.regexp", + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": ["constant.character", "constant.other.option"], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "constant.character.escape", + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "entity.name.label", + "settings": { + "foreground": "#C8C8C8" + } + } + ], + "semanticTokenColors": { + "newOperator": "#C586C0", + "stringLiteral": "#ce9178", + "customLiteral": "#DCDCAA", + "numberLiteral": "#b5cea8" + }, + "colors": { + "checkbox.border": "#6B6B6B", + "editor.background": "#1E1E1E", + "editor.foreground": "#D4D4D4", + "editor.inactiveSelectionBackground": "#3A3D41", + "editorIndentGuide.background": "#404040", + "editorIndentGuide.activeBackground": "#707070", + "editor.selectionHighlightBackground": "#ADD6FF26", + "list.dropBackground": "#383B3D", + "activityBarBadge.background": "#007ACC", + "sideBarTitle.foreground": "#BBBBBB", + "input.placeholderForeground": "#A6A6A6", + "menu.background": "#252526", + "menu.foreground": "#CCCCCC", + "menu.separatorBackground": "#454545", + "menu.border": "#454545", + "statusBarItem.remoteForeground": "#FFF", + "statusBarItem.remoteBackground": "#16825D", + "ports.iconRunningProcessForeground": "#369432", + "sideBarSectionHeader.background": "#0000", + "sideBarSectionHeader.border": "#ccc3", + "tab.lastPinnedBorder": "#ccc3", + "list.activeSelectionIconForeground": "#FFF", + "terminal.inactiveSelectionBackground": "#3A3D41", + "widget.border": "#303031", + "actionBar.toggledBackground": "#383a49" + } +} diff --git a/src/lib/shiki/themes/dracula-soft.json b/src/lib/shiki/themes/dracula-soft.json new file mode 100644 index 0000000..9fba169 --- /dev/null +++ b/src/lib/shiki/themes/dracula-soft.json @@ -0,0 +1,1049 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "dracula-soft", + "author": "Zeno Rocha", + "maintainers": ["Derek P Sifford <dereksifford@gmail.com>"], + "semanticClass": "theme.dracula", + "semanticHighlighting": true, + "dracula": { + "base": [ + "#282A36", + "#F8F8F2", + "#44475A", + "#6272A4", + "#8BE9FD", + "#50FA7B", + "#FFB86C", + "#FF79C6", + "#BD93F9", + "#FF5555", + "#F1FA8C" + ], + "ansi": [ + "#21222C", + "#FF5555", + "#50FA7B", + "#F1FA8C", + "#BD93F9", + "#FF79C6", + "#8BE9FD", + "#F8F8F2", + "#6272A4", + "#FF6E6E", + "#69FF94", + "#FFFFA5", + "#D6ACFF", + "#FF92DF", + "#A4FFFF", + "#FFFFFF" + ], + "brightOther": ["#E9F284", "#8BE9FE"], + "other": [ + "#44475A75", + "#FFFFFF1A", + "#FFFFFF", + "#44475A70", + "#424450", + "#343746", + "#21222C", + "#191A21" + ] + }, + "colors": { + "terminal.background": "#282A36", + "terminal.foreground": "#f6f6f4", + "terminal.ansiBrightBlack": "#7b7f8b", + "terminal.ansiBrightRed": "#f07c7c", + "terminal.ansiBrightGreen": "#78f09a", + "terminal.ansiBrightYellow": "#f6f6ae", + "terminal.ansiBrightBlue": "#d6b4f7", + "terminal.ansiBrightMagenta": "#f49dda", + "terminal.ansiBrightCyan": "#adf6f6", + "terminal.ansiBrightWhite": "#ffffff", + "terminal.ansiBlack": "#262626", + "terminal.ansiRed": "#ee6666", + "terminal.ansiGreen": "#62e884", + "terminal.ansiYellow": "#e7ee98", + "terminal.ansiBlue": "#bf9eee", + "terminal.ansiMagenta": "#f286c4", + "terminal.ansiCyan": "#97e1f1", + "terminal.ansiWhite": "#f6f6f4", + "focusBorder": "#7b7f8b", + "foreground": "#f6f6f4", + "selection.background": "#bf9eee", + "errorForeground": "#ee6666", + "button.background": "#44475A", + "button.foreground": "#f6f6f4", + "button.secondaryBackground": "#282A36", + "button.secondaryForeground": "#f6f6f4", + "button.secondaryHoverBackground": "#343746", + "dropdown.background": "#343746", + "dropdown.border": "#191A21", + "dropdown.foreground": "#f6f6f4", + "input.background": "#282A36", + "input.foreground": "#f6f6f4", + "input.border": "#191A21", + "input.placeholderForeground": "#7b7f8b", + "inputOption.activeBorder": "#bf9eee", + "inputValidation.infoBorder": "#f286c4", + "inputValidation.warningBorder": "#FFB86C", + "inputValidation.errorBorder": "#ee6666", + "badge.foreground": "#f6f6f4", + "badge.background": "#44475A", + "progressBar.background": "#f286c4", + "list.activeSelectionBackground": "#44475A", + "list.activeSelectionForeground": "#f6f6f4", + "list.dropBackground": "#44475A", + "list.focusBackground": "#44475A75", + "list.highlightForeground": "#97e1f1", + "list.hoverBackground": "#44475A75", + "list.inactiveSelectionBackground": "#44475A75", + "list.warningForeground": "#FFB86C", + "list.errorForeground": "#ee6666", + "activityBar.background": "#343746", + "activityBar.inactiveForeground": "#7b7f8b", + "activityBar.foreground": "#f6f6f4", + "activityBar.activeBorder": "#FF79C680", + "activityBar.activeBackground": "#BD93F910", + "activityBarBadge.background": "#f286c4", + "activityBarBadge.foreground": "#f6f6f4", + "sideBar.background": "#262626", + "sideBarTitle.foreground": "#f6f6f4", + "sideBarSectionHeader.background": "#282A36", + "sideBarSectionHeader.border": "#191A21", + "editorGroup.border": "#bf9eee", + "editorGroup.dropBackground": "#44475A70", + "editorGroupHeader.tabsBackground": "#191A21", + "tab.activeBackground": "#282A36", + "tab.activeForeground": "#f6f6f4", + "tab.border": "#191A21", + "tab.activeBorderTop": "#FF79C680", + "tab.inactiveBackground": "#262626", + "tab.inactiveForeground": "#7b7f8b", + "editor.foreground": "#f6f6f4", + "editor.background": "#282A36", + "editorLineNumber.foreground": "#7b7f8b", + "editor.selectionBackground": "#44475A", + "editor.selectionHighlightBackground": "#424450", + "editor.foldBackground": "#21222C80", + "editor.wordHighlightBackground": "#8BE9FD50", + "editor.wordHighlightStrongBackground": "#50FA7B50", + "editor.findMatchBackground": "#FFB86C80", + "editor.findMatchHighlightBackground": "#FFFFFF40", + "editor.findRangeHighlightBackground": "#44475A75", + "editor.hoverHighlightBackground": "#8BE9FD50", + "editor.lineHighlightBorder": "#44475A", + "editorLink.activeForeground": "#97e1f1", + "editor.rangeHighlightBackground": "#BD93F915", + "editor.snippetTabstopHighlightBackground": "#282A36", + "editor.snippetTabstopHighlightBorder": "#7b7f8b", + "editor.snippetFinalTabstopHighlightBackground": "#282A36", + "editor.snippetFinalTabstopHighlightBorder": "#62e884", + "editorWhitespace.foreground": "#FFFFFF1A", + "editorIndentGuide.background": "#FFFFFF1A", + "editorIndentGuide.activeBackground": "#FFFFFF45", + "editorRuler.foreground": "#FFFFFF1A", + "editorCodeLens.foreground": "#7b7f8b", + "editorBracketHighlight.foreground1": "#f6f6f4", + "editorBracketHighlight.foreground2": "#f286c4", + "editorBracketHighlight.foreground3": "#97e1f1", + "editorBracketHighlight.foreground4": "#62e884", + "editorBracketHighlight.foreground5": "#bf9eee", + "editorBracketHighlight.foreground6": "#FFB86C", + "editorBracketHighlight.unexpectedBracket.foreground": "#ee6666", + "editorOverviewRuler.border": "#191A21", + "editorOverviewRuler.selectionHighlightForeground": "#FFB86C", + "editorOverviewRuler.wordHighlightForeground": "#97e1f1", + "editorOverviewRuler.wordHighlightStrongForeground": "#62e884", + "editorOverviewRuler.modifiedForeground": "#8BE9FD80", + "editorOverviewRuler.addedForeground": "#50FA7B80", + "editorOverviewRuler.deletedForeground": "#FF555580", + "editorOverviewRuler.errorForeground": "#FF555580", + "editorOverviewRuler.warningForeground": "#FFB86C80", + "editorOverviewRuler.infoForeground": "#8BE9FD80", + "editorError.foreground": "#ee6666", + "editorWarning.foreground": "#97e1f1", + "editorGutter.modifiedBackground": "#8BE9FD80", + "editorGutter.addedBackground": "#50FA7B80", + "editorGutter.deletedBackground": "#FF555580", + "gitDecoration.modifiedResourceForeground": "#97e1f1", + "gitDecoration.deletedResourceForeground": "#ee6666", + "gitDecoration.untrackedResourceForeground": "#62e884", + "gitDecoration.ignoredResourceForeground": "#7b7f8b", + "gitDecoration.conflictingResourceForeground": "#FFB86C", + "diffEditor.insertedTextBackground": "#50FA7B20", + "diffEditor.removedTextBackground": "#FF555550", + "inlineChat.regionHighlight": "#343746", + "editorWidget.background": "#262626", + "editorSuggestWidget.background": "#262626", + "editorSuggestWidget.foreground": "#f6f6f4", + "editorSuggestWidget.selectedBackground": "#44475A", + "editorHoverWidget.background": "#282A36", + "editorHoverWidget.border": "#7b7f8b", + "editorMarkerNavigation.background": "#262626", + "peekView.border": "#44475A", + "peekViewEditor.background": "#282A36", + "peekViewEditor.matchHighlightBackground": "#F1FA8C80", + "peekViewResult.background": "#262626", + "peekViewResult.fileForeground": "#f6f6f4", + "peekViewResult.lineForeground": "#f6f6f4", + "peekViewResult.matchHighlightBackground": "#F1FA8C80", + "peekViewResult.selectionBackground": "#44475A", + "peekViewResult.selectionForeground": "#f6f6f4", + "peekViewTitle.background": "#191A21", + "peekViewTitleDescription.foreground": "#7b7f8b", + "peekViewTitleLabel.foreground": "#f6f6f4", + "merge.currentHeaderBackground": "#50FA7B90", + "merge.incomingHeaderBackground": "#BD93F990", + "editorOverviewRuler.currentContentForeground": "#62e884", + "editorOverviewRuler.incomingContentForeground": "#bf9eee", + "panel.background": "#282A36", + "panel.border": "#bf9eee", + "panelTitle.activeBorder": "#f286c4", + "panelTitle.activeForeground": "#f6f6f4", + "panelTitle.inactiveForeground": "#7b7f8b", + "statusBar.background": "#191A21", + "statusBar.foreground": "#f6f6f4", + "statusBar.debuggingBackground": "#ee6666", + "statusBar.debuggingForeground": "#191A21", + "statusBar.noFolderBackground": "#191A21", + "statusBar.noFolderForeground": "#f6f6f4", + "statusBarItem.prominentBackground": "#ee6666", + "statusBarItem.prominentHoverBackground": "#FFB86C", + "statusBarItem.remoteForeground": "#282A36", + "statusBarItem.remoteBackground": "#bf9eee", + "titleBar.activeBackground": "#262626", + "titleBar.activeForeground": "#f6f6f4", + "titleBar.inactiveBackground": "#191A21", + "titleBar.inactiveForeground": "#7b7f8b", + "extensionButton.prominentForeground": "#f6f6f4", + "extensionButton.prominentBackground": "#50FA7B90", + "extensionButton.prominentHoverBackground": "#50FA7B60", + "pickerGroup.border": "#bf9eee", + "pickerGroup.foreground": "#97e1f1", + "debugToolBar.background": "#262626", + "walkThrough.embeddedEditorBackground": "#262626", + "settings.headerForeground": "#f6f6f4", + "settings.modifiedItemIndicator": "#FFB86C", + "settings.dropdownBackground": "#262626", + "settings.dropdownForeground": "#f6f6f4", + "settings.dropdownBorder": "#191A21", + "settings.checkboxBackground": "#262626", + "settings.checkboxForeground": "#f6f6f4", + "settings.checkboxBorder": "#191A21", + "settings.textInputBackground": "#262626", + "settings.textInputForeground": "#f6f6f4", + "settings.textInputBorder": "#191A21", + "settings.numberInputBackground": "#262626", + "settings.numberInputForeground": "#f6f6f4", + "settings.numberInputBorder": "#191A21", + "breadcrumb.foreground": "#7b7f8b", + "breadcrumb.background": "#282A36", + "breadcrumb.focusForeground": "#f6f6f4", + "breadcrumb.activeSelectionForeground": "#f6f6f4", + "breadcrumbPicker.background": "#191A21", + "listFilterWidget.background": "#343746", + "listFilterWidget.outline": "#424450", + "listFilterWidget.noMatchesOutline": "#ee6666" + }, + "tokenColors": [ + { + "scope": ["emphasis"], + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": ["strong"], + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": ["header"], + "settings": { + "foreground": "#bf9eee" + } + }, + { + "scope": ["meta.diff", "meta.diff.header"], + "settings": { + "foreground": "#7b7f8b" + } + }, + { + "scope": ["markup.inserted"], + "settings": { + "foreground": "#62e884" + } + }, + { + "scope": ["markup.deleted"], + "settings": { + "foreground": "#ee6666" + } + }, + { + "scope": ["markup.changed"], + "settings": { + "foreground": "#FFB86C" + } + }, + { + "scope": ["invalid"], + "settings": { + "foreground": "#ee6666", + "fontStyle": "underline italic" + } + }, + { + "scope": ["invalid.deprecated"], + "settings": { + "foreground": "#f6f6f4", + "fontStyle": "underline italic" + } + }, + { + "scope": ["entity.name.filename"], + "settings": { + "foreground": "#e7ee98" + } + }, + { + "scope": ["markup.error"], + "settings": { + "foreground": "#ee6666" + } + }, + { + "name": "Underlined markup", + "scope": ["markup.underline"], + "settings": { + "fontStyle": "underline" + } + }, + { + "name": "Bold markup", + "scope": ["markup.bold"], + "settings": { + "fontStyle": "bold", + "foreground": "#FFB86C" + } + }, + { + "name": "Markup headings", + "scope": ["markup.heading"], + "settings": { + "fontStyle": "bold", + "foreground": "#bf9eee" + } + }, + { + "name": "Markup italic", + "scope": ["markup.italic"], + "settings": { + "foreground": "#e7ee98", + "fontStyle": "italic" + } + }, + { + "name": "Bullets, lists (prose)", + "scope": [ + "beginning.punctuation.definition.list.markdown", + "beginning.punctuation.definition.quote.markdown", + "punctuation.definition.link.restructuredtext" + ], + "settings": { + "foreground": "#97e1f1" + } + }, + { + "name": "Inline code (prose)", + "scope": ["markup.inline.raw", "markup.raw.restructuredtext"], + "settings": { + "foreground": "#62e884" + } + }, + { + "name": "Links (prose)", + "scope": ["markup.underline.link", "markup.underline.link.image"], + "settings": { + "foreground": "#97e1f1" + } + }, + { + "name": "Link text, image alt text (prose)", + "scope": [ + "meta.link.reference.def.restructuredtext", + "punctuation.definition.directive.restructuredtext", + "string.other.link.description", + "string.other.link.title" + ], + "settings": { + "foreground": "#f286c4" + } + }, + { + "name": "Blockquotes (prose)", + "scope": ["entity.name.directive.restructuredtext", "markup.quote"], + "settings": { + "foreground": "#e7ee98", + "fontStyle": "italic" + } + }, + { + "name": "Horizontal rule (prose)", + "scope": ["meta.separator.markdown"], + "settings": { + "foreground": "#7b7f8b" + } + }, + { + "name": "Code blocks", + "scope": [ + "fenced_code.block.language", + "markup.raw.inner.restructuredtext", + "markup.fenced_code.block.markdown punctuation.definition.markdown" + ], + "settings": { + "foreground": "#62e884" + } + }, + { + "name": "Prose constants", + "scope": ["punctuation.definition.constant.restructuredtext"], + "settings": { + "foreground": "#bf9eee" + } + }, + { + "name": "Braces in markdown headings", + "scope": [ + "markup.heading.markdown punctuation.definition.string.begin", + "markup.heading.markdown punctuation.definition.string.end" + ], + "settings": { + "foreground": "#bf9eee" + } + }, + { + "name": "Braces in markdown paragraphs", + "scope": [ + "meta.paragraph.markdown punctuation.definition.string.begin", + "meta.paragraph.markdown punctuation.definition.string.end" + ], + "settings": { + "foreground": "#f6f6f4" + } + }, + { + "name": "Braces in markdown blockquotes", + "scope": [ + "markup.quote.markdown meta.paragraph.markdown punctuation.definition.string.begin", + "markup.quote.markdown meta.paragraph.markdown punctuation.definition.string.end" + ], + "settings": { + "foreground": "#e7ee98" + } + }, + { + "name": "User-defined class names", + "scope": ["entity.name.type.class", "entity.name.class"], + "settings": { + "foreground": "#97e1f1", + "fontStyle": "normal" + } + }, + { + "name": "this, super, self, etc.", + "scope": [ + "keyword.expressions-and-types.swift", + "keyword.other.this", + "variable.language", + "variable.language punctuation.definition.variable.php", + "variable.other.readwrite.instance.ruby", + "variable.parameter.function.language.special" + ], + "settings": { + "foreground": "#bf9eee", + "fontStyle": "italic" + } + }, + { + "name": "Inherited classes", + "scope": ["entity.other.inherited-class"], + "settings": { + "fontStyle": "italic", + "foreground": "#97e1f1" + } + }, + { + "name": "Comments", + "scope": ["comment", "punctuation.definition.comment", "unused.comment", "wildcard.comment"], + "settings": { + "foreground": "#7b7f8b" + } + }, + { + "name": "JSDoc-style keywords", + "scope": [ + "comment keyword.codetag.notation", + "comment.block.documentation keyword", + "comment.block.documentation storage.type.class" + ], + "settings": { + "foreground": "#f286c4" + } + }, + { + "name": "JSDoc-style types", + "scope": ["comment.block.documentation entity.name.type"], + "settings": { + "foreground": "#97e1f1", + "fontStyle": "italic" + } + }, + { + "name": "JSDoc-style type brackets", + "scope": ["comment.block.documentation entity.name.type punctuation.definition.bracket"], + "settings": { + "foreground": "#97e1f1" + } + }, + { + "name": "JSDoc-style comment parameters", + "scope": ["comment.block.documentation variable"], + "settings": { + "foreground": "#FFB86C", + "fontStyle": "italic" + } + }, + { + "name": "Constants", + "scope": ["constant", "variable.other.constant"], + "settings": { + "foreground": "#bf9eee" + } + }, + { + "name": "Constant escape sequences", + "scope": ["constant.character.escape", "constant.character.string.escape", "constant.regexp"], + "settings": { + "foreground": "#f286c4" + } + }, + { + "name": "HTML tags", + "scope": ["entity.name.tag"], + "settings": { + "foreground": "#f286c4" + } + }, + { + "name": "CSS attribute parent selectors ('&')", + "scope": ["entity.other.attribute-name.parent-selector"], + "settings": { + "foreground": "#f286c4" + } + }, + { + "name": "HTML/CSS attribute names", + "scope": ["entity.other.attribute-name"], + "settings": { + "foreground": "#62e884", + "fontStyle": "italic" + } + }, + { + "name": "Function names", + "scope": [ + "entity.name.function", + "meta.function-call.object", + "meta.function-call.php", + "meta.function-call.static", + "meta.method-call.java meta.method", + "meta.method.groovy", + "support.function.any-method.lua", + "keyword.operator.function.infix" + ], + "settings": { + "foreground": "#62e884" + } + }, + { + "name": "Function parameters", + "scope": [ + "entity.name.variable.parameter", + "meta.at-rule.function variable", + "meta.at-rule.mixin variable", + "meta.function.arguments variable.other.php", + "meta.selectionset.graphql meta.arguments.graphql variable.arguments.graphql", + "variable.parameter" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#FFB86C" + } + }, + { + "name": "Decorators", + "scope": [ + "meta.decorator variable.other.readwrite", + "meta.decorator variable.other.property" + ], + "settings": { + "foreground": "#62e884", + "fontStyle": "italic" + } + }, + { + "name": "Decorator Objects", + "scope": ["meta.decorator variable.other.object"], + "settings": { + "foreground": "#62e884" + } + }, + { + "name": "Keywords", + "scope": ["keyword", "punctuation.definition.keyword"], + "settings": { + "foreground": "#f286c4" + } + }, + { + "name": "Keyword \"new\"", + "scope": ["keyword.control.new", "keyword.operator.new"], + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Generic selectors (CSS/SCSS/Less/Stylus)", + "scope": ["meta.selector"], + "settings": { + "foreground": "#f286c4" + } + }, + { + "name": "Language Built-ins", + "scope": ["support"], + "settings": { + "fontStyle": "italic", + "foreground": "#97e1f1" + } + }, + { + "name": "Built-in magic functions and constants", + "scope": ["support.function.magic", "support.variable", "variable.other.predefined"], + "settings": { + "fontStyle": "regular", + "foreground": "#bf9eee" + } + }, + { + "name": "Built-in functions / properties", + "scope": ["support.function", "support.type.property-name"], + "settings": { + "fontStyle": "regular" + } + }, + { + "name": "Separators (key/value, namespace, inheritance, pointer, hash, slice, etc)", + "scope": [ + "constant.other.symbol.hashkey punctuation.definition.constant.ruby", + "entity.other.attribute-name.placeholder punctuation", + "entity.other.attribute-name.pseudo-class punctuation", + "entity.other.attribute-name.pseudo-element punctuation", + "meta.group.double.toml", + "meta.group.toml", + "meta.object-binding-pattern-variable punctuation.destructuring", + "punctuation.colon.graphql", + "punctuation.definition.block.scalar.folded.yaml", + "punctuation.definition.block.scalar.literal.yaml", + "punctuation.definition.block.sequence.item.yaml", + "punctuation.definition.entity.other.inherited-class", + "punctuation.function.swift", + "punctuation.separator.dictionary.key-value", + "punctuation.separator.hash", + "punctuation.separator.inheritance", + "punctuation.separator.key-value", + "punctuation.separator.key-value.mapping.yaml", + "punctuation.separator.namespace", + "punctuation.separator.pointer-access", + "punctuation.separator.slice", + "string.unquoted.heredoc punctuation.definition.string", + "support.other.chomping-indicator.yaml", + "punctuation.separator.annotation" + ], + "settings": { + "foreground": "#f286c4" + } + }, + { + "name": "Brackets, braces, parens, etc.", + "scope": [ + "keyword.operator.other.powershell", + "keyword.other.statement-separator.powershell", + "meta.brace.round", + "meta.function-call punctuation", + "punctuation.definition.arguments.begin", + "punctuation.definition.arguments.end", + "punctuation.definition.entity.begin", + "punctuation.definition.entity.end", + "punctuation.definition.tag.cs", + "punctuation.definition.type.begin", + "punctuation.definition.type.end", + "punctuation.section.scope.begin", + "punctuation.section.scope.end", + "punctuation.terminator.expression.php", + "storage.type.generic.java", + "string.template meta.brace", + "string.template punctuation.accessor" + ], + "settings": { + "foreground": "#f6f6f4" + } + }, + { + "name": "Variable interpolation operators", + "scope": [ + "meta.string-contents.quoted.double punctuation.definition.variable", + "punctuation.definition.interpolation.begin", + "punctuation.definition.interpolation.end", + "punctuation.definition.template-expression.begin", + "punctuation.definition.template-expression.end", + "punctuation.section.embedded.begin", + "punctuation.section.embedded.coffee", + "punctuation.section.embedded.end", + "punctuation.section.embedded.end source.php", + "punctuation.section.embedded.end source.ruby", + "punctuation.definition.variable.makefile" + ], + "settings": { + "foreground": "#f286c4" + } + }, + { + "name": "Keys (serializable languages)", + "scope": [ + "entity.name.function.target.makefile", + "entity.name.section.toml", + "entity.name.tag.yaml", + "variable.other.key.toml" + ], + "settings": { + "foreground": "#97e1f1" + } + }, + { + "name": "Dates / timestamps (serializable languages)", + "scope": ["constant.other.date", "constant.other.timestamp"], + "settings": { + "foreground": "#FFB86C" + } + }, + { + "name": "YAML aliases", + "scope": ["variable.other.alias.yaml"], + "settings": { + "fontStyle": "italic underline", + "foreground": "#62e884" + } + }, + { + "name": "Storage", + "scope": [ + "storage", + "meta.implementation storage.type.objc", + "meta.interface-or-protocol storage.type.objc", + "source.groovy storage.type.def" + ], + "settings": { + "fontStyle": "regular", + "foreground": "#f286c4" + } + }, + { + "name": "Types", + "scope": [ + "entity.name.type", + "keyword.primitive-datatypes.swift", + "keyword.type.cs", + "meta.protocol-list.objc", + "meta.return-type.objc", + "source.go storage.type", + "source.groovy storage.type", + "source.java storage.type", + "source.powershell entity.other.attribute-name", + "storage.class.std.rust", + "storage.type.attribute.swift", + "storage.type.c", + "storage.type.core.rust", + "storage.type.cs", + "storage.type.groovy", + "storage.type.objc", + "storage.type.php", + "storage.type.haskell", + "storage.type.ocaml" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#97e1f1" + } + }, + { + "name": "Generics, templates, and mapped type declarations", + "scope": [ + "entity.name.type.type-parameter", + "meta.indexer.mappedtype.declaration entity.name.type", + "meta.type.parameters entity.name.type" + ], + "settings": { + "foreground": "#FFB86C" + } + }, + { + "name": "Modifiers", + "scope": ["storage.modifier"], + "settings": { + "foreground": "#f286c4" + } + }, + { + "name": "RegExp string", + "scope": [ + "string.regexp", + "constant.other.character-class.set.regexp", + "constant.character.escape.backslash.regexp" + ], + "settings": { + "foreground": "#e7ee98" + } + }, + { + "name": "Non-capture operators", + "scope": ["punctuation.definition.group.capture.regexp"], + "settings": { + "foreground": "#f286c4" + } + }, + { + "name": "RegExp start and end characters", + "scope": [ + "string.regexp punctuation.definition.string.begin", + "string.regexp punctuation.definition.string.end" + ], + "settings": { + "foreground": "#ee6666" + } + }, + { + "name": "Character group", + "scope": ["punctuation.definition.character-class.regexp"], + "settings": { + "foreground": "#97e1f1" + } + }, + { + "name": "Capture groups", + "scope": ["punctuation.definition.group.regexp"], + "settings": { + "foreground": "#FFB86C" + } + }, + { + "name": "Assertion operators", + "scope": [ + "punctuation.definition.group.assertion.regexp", + "keyword.operator.negation.regexp" + ], + "settings": { + "foreground": "#ee6666" + } + }, + { + "name": "Positive lookaheads", + "scope": ["meta.assertion.look-ahead.regexp"], + "settings": { + "foreground": "#62e884" + } + }, + { + "name": "Strings", + "scope": ["string"], + "settings": { + "foreground": "#e7ee98" + } + }, + { + "name": "String quotes (temporary vscode fix)", + "scope": ["punctuation.definition.string.begin", "punctuation.definition.string.end"], + "settings": { + "foreground": "#dee492" + } + }, + { + "name": "Property quotes (temporary vscode fix)", + "scope": [ + "punctuation.support.type.property-name.begin", + "punctuation.support.type.property-name.end" + ], + "settings": { + "foreground": "#97e2f2" + } + }, + { + "name": "Docstrings", + "scope": [ + "string.quoted.docstring.multi", + "string.quoted.docstring.multi.python punctuation.definition.string.begin", + "string.quoted.docstring.multi.python punctuation.definition.string.end", + "string.quoted.docstring.multi.python constant.character.escape" + ], + "settings": { + "foreground": "#7b7f8b" + } + }, + { + "name": "Variables and object properties", + "scope": [ + "variable", + "constant.other.key.perl", + "support.variable.property", + "variable.other.constant.js", + "variable.other.constant.ts", + "variable.other.constant.tsx" + ], + "settings": { + "foreground": "#f6f6f4" + } + }, + { + "name": "Destructuring / aliasing reference name (LHS)", + "scope": [ + "meta.import variable.other.readwrite", + "meta.variable.assignment.destructured.object.coffee variable" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#FFB86C" + } + }, + { + "name": "Destructuring / aliasing variable name (RHS)", + "scope": [ + "meta.import variable.other.readwrite.alias", + "meta.export variable.other.readwrite.alias", + "meta.variable.assignment.destructured.object.coffee variable variable" + ], + "settings": { + "fontStyle": "normal", + "foreground": "#f6f6f4" + } + }, + { + "name": "GraphQL keys", + "scope": ["meta.selectionset.graphql variable"], + "settings": { + "foreground": "#e7ee98" + } + }, + { + "name": "GraphQL function arguments", + "scope": ["meta.selectionset.graphql meta.arguments variable"], + "settings": { + "foreground": "#f6f6f4" + } + }, + { + "name": "GraphQL fragment name (definition)", + "scope": ["entity.name.fragment.graphql", "variable.fragment.graphql"], + "settings": { + "foreground": "#97e1f1" + } + }, + { + "name": "Edge cases (foreground color resets)", + "scope": [ + "constant.other.symbol.hashkey.ruby", + "keyword.operator.dereference.java", + "keyword.operator.navigation.groovy", + "meta.scope.for-loop.shell punctuation.definition.string.begin", + "meta.scope.for-loop.shell punctuation.definition.string.end", + "meta.scope.for-loop.shell string", + "storage.modifier.import", + "punctuation.section.embedded.begin.tsx", + "punctuation.section.embedded.end.tsx", + "punctuation.section.embedded.begin.jsx", + "punctuation.section.embedded.end.jsx", + "punctuation.separator.list.comma.css", + "constant.language.empty-list.haskell" + ], + "settings": { + "foreground": "#f6f6f4" + } + }, + { + "name": "Shell variables prefixed with \"$\" (edge case)", + "scope": ["source.shell variable.other"], + "settings": { + "foreground": "#bf9eee" + } + }, + { + "name": "Powershell constants mistakenly scoped to `support`, rather than `constant` (edge)", + "scope": ["support.constant"], + "settings": { + "fontStyle": "normal", + "foreground": "#bf9eee" + } + }, + { + "name": "Makefile prerequisite names", + "scope": ["meta.scope.prerequisites.makefile"], + "settings": { + "foreground": "#e7ee98" + } + }, + { + "name": "SCSS attibute selector strings", + "scope": ["meta.attribute-selector.scss"], + "settings": { + "foreground": "#e7ee98" + } + }, + { + "name": "SCSS attribute selector brackets", + "scope": [ + "punctuation.definition.attribute-selector.end.bracket.square.scss", + "punctuation.definition.attribute-selector.begin.bracket.square.scss" + ], + "settings": { + "foreground": "#f6f6f4" + } + }, + { + "name": "Haskell Pragmas", + "scope": ["meta.preprocessor.haskell"], + "settings": { + "foreground": "#7b7f8b" + } + }, + { + "name": "Log file error", + "scope": ["log.error"], + "settings": { + "foreground": "#ee6666", + "fontStyle": "bold" + } + }, + { + "name": "Log file warning", + "scope": ["log.warning"], + "settings": { + "foreground": "#e7ee98", + "fontStyle": "bold" + } + } + ] +} diff --git a/src/lib/shiki/themes/dracula.json b/src/lib/shiki/themes/dracula.json new file mode 100644 index 0000000..b61df44 --- /dev/null +++ b/src/lib/shiki/themes/dracula.json @@ -0,0 +1,1049 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "dracula", + "author": "Zeno Rocha", + "maintainers": ["Derek P Sifford <dereksifford@gmail.com>"], + "semanticClass": "theme.dracula", + "semanticHighlighting": true, + "dracula": { + "base": [ + "#282A36", + "#F8F8F2", + "#44475A", + "#6272A4", + "#8BE9FD", + "#50FA7B", + "#FFB86C", + "#FF79C6", + "#BD93F9", + "#FF5555", + "#F1FA8C" + ], + "ansi": [ + "#21222C", + "#FF5555", + "#50FA7B", + "#F1FA8C", + "#BD93F9", + "#FF79C6", + "#8BE9FD", + "#F8F8F2", + "#6272A4", + "#FF6E6E", + "#69FF94", + "#FFFFA5", + "#D6ACFF", + "#FF92DF", + "#A4FFFF", + "#FFFFFF" + ], + "brightOther": ["#E9F284", "#8BE9FE"], + "other": [ + "#44475A75", + "#FFFFFF1A", + "#FFFFFF", + "#44475A70", + "#424450", + "#343746", + "#21222C", + "#191A21" + ] + }, + "colors": { + "terminal.background": "#282A36", + "terminal.foreground": "#F8F8F2", + "terminal.ansiBrightBlack": "#6272A4", + "terminal.ansiBrightRed": "#FF6E6E", + "terminal.ansiBrightGreen": "#69FF94", + "terminal.ansiBrightYellow": "#FFFFA5", + "terminal.ansiBrightBlue": "#D6ACFF", + "terminal.ansiBrightMagenta": "#FF92DF", + "terminal.ansiBrightCyan": "#A4FFFF", + "terminal.ansiBrightWhite": "#FFFFFF", + "terminal.ansiBlack": "#21222C", + "terminal.ansiRed": "#FF5555", + "terminal.ansiGreen": "#50FA7B", + "terminal.ansiYellow": "#F1FA8C", + "terminal.ansiBlue": "#BD93F9", + "terminal.ansiMagenta": "#FF79C6", + "terminal.ansiCyan": "#8BE9FD", + "terminal.ansiWhite": "#F8F8F2", + "focusBorder": "#6272A4", + "foreground": "#F8F8F2", + "selection.background": "#BD93F9", + "errorForeground": "#FF5555", + "button.background": "#44475A", + "button.foreground": "#F8F8F2", + "button.secondaryBackground": "#282A36", + "button.secondaryForeground": "#F8F8F2", + "button.secondaryHoverBackground": "#343746", + "dropdown.background": "#343746", + "dropdown.border": "#191A21", + "dropdown.foreground": "#F8F8F2", + "input.background": "#282A36", + "input.foreground": "#F8F8F2", + "input.border": "#191A21", + "input.placeholderForeground": "#6272A4", + "inputOption.activeBorder": "#BD93F9", + "inputValidation.infoBorder": "#FF79C6", + "inputValidation.warningBorder": "#FFB86C", + "inputValidation.errorBorder": "#FF5555", + "badge.foreground": "#F8F8F2", + "badge.background": "#44475A", + "progressBar.background": "#FF79C6", + "list.activeSelectionBackground": "#44475A", + "list.activeSelectionForeground": "#F8F8F2", + "list.dropBackground": "#44475A", + "list.focusBackground": "#44475A75", + "list.highlightForeground": "#8BE9FD", + "list.hoverBackground": "#44475A75", + "list.inactiveSelectionBackground": "#44475A75", + "list.warningForeground": "#FFB86C", + "list.errorForeground": "#FF5555", + "activityBar.background": "#343746", + "activityBar.inactiveForeground": "#6272A4", + "activityBar.foreground": "#F8F8F2", + "activityBar.activeBorder": "#FF79C680", + "activityBar.activeBackground": "#BD93F910", + "activityBarBadge.background": "#FF79C6", + "activityBarBadge.foreground": "#F8F8F2", + "sideBar.background": "#21222C", + "sideBarTitle.foreground": "#F8F8F2", + "sideBarSectionHeader.background": "#282A36", + "sideBarSectionHeader.border": "#191A21", + "editorGroup.border": "#BD93F9", + "editorGroup.dropBackground": "#44475A70", + "editorGroupHeader.tabsBackground": "#191A21", + "tab.activeBackground": "#282A36", + "tab.activeForeground": "#F8F8F2", + "tab.border": "#191A21", + "tab.activeBorderTop": "#FF79C680", + "tab.inactiveBackground": "#21222C", + "tab.inactiveForeground": "#6272A4", + "editor.foreground": "#F8F8F2", + "editor.background": "#282A36", + "editorLineNumber.foreground": "#6272A4", + "editor.selectionBackground": "#44475A", + "editor.selectionHighlightBackground": "#424450", + "editor.foldBackground": "#21222C80", + "editor.wordHighlightBackground": "#8BE9FD50", + "editor.wordHighlightStrongBackground": "#50FA7B50", + "editor.findMatchBackground": "#FFB86C80", + "editor.findMatchHighlightBackground": "#FFFFFF40", + "editor.findRangeHighlightBackground": "#44475A75", + "editor.hoverHighlightBackground": "#8BE9FD50", + "editor.lineHighlightBorder": "#44475A", + "editorLink.activeForeground": "#8BE9FD", + "editor.rangeHighlightBackground": "#BD93F915", + "editor.snippetTabstopHighlightBackground": "#282A36", + "editor.snippetTabstopHighlightBorder": "#6272A4", + "editor.snippetFinalTabstopHighlightBackground": "#282A36", + "editor.snippetFinalTabstopHighlightBorder": "#50FA7B", + "editorWhitespace.foreground": "#FFFFFF1A", + "editorIndentGuide.background": "#FFFFFF1A", + "editorIndentGuide.activeBackground": "#FFFFFF45", + "editorRuler.foreground": "#FFFFFF1A", + "editorCodeLens.foreground": "#6272A4", + "editorBracketHighlight.foreground1": "#F8F8F2", + "editorBracketHighlight.foreground2": "#FF79C6", + "editorBracketHighlight.foreground3": "#8BE9FD", + "editorBracketHighlight.foreground4": "#50FA7B", + "editorBracketHighlight.foreground5": "#BD93F9", + "editorBracketHighlight.foreground6": "#FFB86C", + "editorBracketHighlight.unexpectedBracket.foreground": "#FF5555", + "editorOverviewRuler.border": "#191A21", + "editorOverviewRuler.selectionHighlightForeground": "#FFB86C", + "editorOverviewRuler.wordHighlightForeground": "#8BE9FD", + "editorOverviewRuler.wordHighlightStrongForeground": "#50FA7B", + "editorOverviewRuler.modifiedForeground": "#8BE9FD80", + "editorOverviewRuler.addedForeground": "#50FA7B80", + "editorOverviewRuler.deletedForeground": "#FF555580", + "editorOverviewRuler.errorForeground": "#FF555580", + "editorOverviewRuler.warningForeground": "#FFB86C80", + "editorOverviewRuler.infoForeground": "#8BE9FD80", + "editorError.foreground": "#FF5555", + "editorWarning.foreground": "#8BE9FD", + "editorGutter.modifiedBackground": "#8BE9FD80", + "editorGutter.addedBackground": "#50FA7B80", + "editorGutter.deletedBackground": "#FF555580", + "gitDecoration.modifiedResourceForeground": "#8BE9FD", + "gitDecoration.deletedResourceForeground": "#FF5555", + "gitDecoration.untrackedResourceForeground": "#50FA7B", + "gitDecoration.ignoredResourceForeground": "#6272A4", + "gitDecoration.conflictingResourceForeground": "#FFB86C", + "diffEditor.insertedTextBackground": "#50FA7B20", + "diffEditor.removedTextBackground": "#FF555550", + "inlineChat.regionHighlight": "#343746", + "editorWidget.background": "#21222C", + "editorSuggestWidget.background": "#21222C", + "editorSuggestWidget.foreground": "#F8F8F2", + "editorSuggestWidget.selectedBackground": "#44475A", + "editorHoverWidget.background": "#282A36", + "editorHoverWidget.border": "#6272A4", + "editorMarkerNavigation.background": "#21222C", + "peekView.border": "#44475A", + "peekViewEditor.background": "#282A36", + "peekViewEditor.matchHighlightBackground": "#F1FA8C80", + "peekViewResult.background": "#21222C", + "peekViewResult.fileForeground": "#F8F8F2", + "peekViewResult.lineForeground": "#F8F8F2", + "peekViewResult.matchHighlightBackground": "#F1FA8C80", + "peekViewResult.selectionBackground": "#44475A", + "peekViewResult.selectionForeground": "#F8F8F2", + "peekViewTitle.background": "#191A21", + "peekViewTitleDescription.foreground": "#6272A4", + "peekViewTitleLabel.foreground": "#F8F8F2", + "merge.currentHeaderBackground": "#50FA7B90", + "merge.incomingHeaderBackground": "#BD93F990", + "editorOverviewRuler.currentContentForeground": "#50FA7B", + "editorOverviewRuler.incomingContentForeground": "#BD93F9", + "panel.background": "#282A36", + "panel.border": "#BD93F9", + "panelTitle.activeBorder": "#FF79C6", + "panelTitle.activeForeground": "#F8F8F2", + "panelTitle.inactiveForeground": "#6272A4", + "statusBar.background": "#191A21", + "statusBar.foreground": "#F8F8F2", + "statusBar.debuggingBackground": "#FF5555", + "statusBar.debuggingForeground": "#191A21", + "statusBar.noFolderBackground": "#191A21", + "statusBar.noFolderForeground": "#F8F8F2", + "statusBarItem.prominentBackground": "#FF5555", + "statusBarItem.prominentHoverBackground": "#FFB86C", + "statusBarItem.remoteForeground": "#282A36", + "statusBarItem.remoteBackground": "#BD93F9", + "titleBar.activeBackground": "#21222C", + "titleBar.activeForeground": "#F8F8F2", + "titleBar.inactiveBackground": "#191A21", + "titleBar.inactiveForeground": "#6272A4", + "extensionButton.prominentForeground": "#F8F8F2", + "extensionButton.prominentBackground": "#50FA7B90", + "extensionButton.prominentHoverBackground": "#50FA7B60", + "pickerGroup.border": "#BD93F9", + "pickerGroup.foreground": "#8BE9FD", + "debugToolBar.background": "#21222C", + "walkThrough.embeddedEditorBackground": "#21222C", + "settings.headerForeground": "#F8F8F2", + "settings.modifiedItemIndicator": "#FFB86C", + "settings.dropdownBackground": "#21222C", + "settings.dropdownForeground": "#F8F8F2", + "settings.dropdownBorder": "#191A21", + "settings.checkboxBackground": "#21222C", + "settings.checkboxForeground": "#F8F8F2", + "settings.checkboxBorder": "#191A21", + "settings.textInputBackground": "#21222C", + "settings.textInputForeground": "#F8F8F2", + "settings.textInputBorder": "#191A21", + "settings.numberInputBackground": "#21222C", + "settings.numberInputForeground": "#F8F8F2", + "settings.numberInputBorder": "#191A21", + "breadcrumb.foreground": "#6272A4", + "breadcrumb.background": "#282A36", + "breadcrumb.focusForeground": "#F8F8F2", + "breadcrumb.activeSelectionForeground": "#F8F8F2", + "breadcrumbPicker.background": "#191A21", + "listFilterWidget.background": "#343746", + "listFilterWidget.outline": "#424450", + "listFilterWidget.noMatchesOutline": "#FF5555" + }, + "tokenColors": [ + { + "scope": ["emphasis"], + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": ["strong"], + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": ["header"], + "settings": { + "foreground": "#BD93F9" + } + }, + { + "scope": ["meta.diff", "meta.diff.header"], + "settings": { + "foreground": "#6272A4" + } + }, + { + "scope": ["markup.inserted"], + "settings": { + "foreground": "#50FA7B" + } + }, + { + "scope": ["markup.deleted"], + "settings": { + "foreground": "#FF5555" + } + }, + { + "scope": ["markup.changed"], + "settings": { + "foreground": "#FFB86C" + } + }, + { + "scope": ["invalid"], + "settings": { + "foreground": "#FF5555", + "fontStyle": "underline italic" + } + }, + { + "scope": ["invalid.deprecated"], + "settings": { + "foreground": "#F8F8F2", + "fontStyle": "underline italic" + } + }, + { + "scope": ["entity.name.filename"], + "settings": { + "foreground": "#F1FA8C" + } + }, + { + "scope": ["markup.error"], + "settings": { + "foreground": "#FF5555" + } + }, + { + "name": "Underlined markup", + "scope": ["markup.underline"], + "settings": { + "fontStyle": "underline" + } + }, + { + "name": "Bold markup", + "scope": ["markup.bold"], + "settings": { + "fontStyle": "bold", + "foreground": "#FFB86C" + } + }, + { + "name": "Markup headings", + "scope": ["markup.heading"], + "settings": { + "fontStyle": "bold", + "foreground": "#BD93F9" + } + }, + { + "name": "Markup italic", + "scope": ["markup.italic"], + "settings": { + "foreground": "#F1FA8C", + "fontStyle": "italic" + } + }, + { + "name": "Bullets, lists (prose)", + "scope": [ + "beginning.punctuation.definition.list.markdown", + "beginning.punctuation.definition.quote.markdown", + "punctuation.definition.link.restructuredtext" + ], + "settings": { + "foreground": "#8BE9FD" + } + }, + { + "name": "Inline code (prose)", + "scope": ["markup.inline.raw", "markup.raw.restructuredtext"], + "settings": { + "foreground": "#50FA7B" + } + }, + { + "name": "Links (prose)", + "scope": ["markup.underline.link", "markup.underline.link.image"], + "settings": { + "foreground": "#8BE9FD" + } + }, + { + "name": "Link text, image alt text (prose)", + "scope": [ + "meta.link.reference.def.restructuredtext", + "punctuation.definition.directive.restructuredtext", + "string.other.link.description", + "string.other.link.title" + ], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "Blockquotes (prose)", + "scope": ["entity.name.directive.restructuredtext", "markup.quote"], + "settings": { + "foreground": "#F1FA8C", + "fontStyle": "italic" + } + }, + { + "name": "Horizontal rule (prose)", + "scope": ["meta.separator.markdown"], + "settings": { + "foreground": "#6272A4" + } + }, + { + "name": "Code blocks", + "scope": [ + "fenced_code.block.language", + "markup.raw.inner.restructuredtext", + "markup.fenced_code.block.markdown punctuation.definition.markdown" + ], + "settings": { + "foreground": "#50FA7B" + } + }, + { + "name": "Prose constants", + "scope": ["punctuation.definition.constant.restructuredtext"], + "settings": { + "foreground": "#BD93F9" + } + }, + { + "name": "Braces in markdown headings", + "scope": [ + "markup.heading.markdown punctuation.definition.string.begin", + "markup.heading.markdown punctuation.definition.string.end" + ], + "settings": { + "foreground": "#BD93F9" + } + }, + { + "name": "Braces in markdown paragraphs", + "scope": [ + "meta.paragraph.markdown punctuation.definition.string.begin", + "meta.paragraph.markdown punctuation.definition.string.end" + ], + "settings": { + "foreground": "#F8F8F2" + } + }, + { + "name": "Braces in markdown blockquotes", + "scope": [ + "markup.quote.markdown meta.paragraph.markdown punctuation.definition.string.begin", + "markup.quote.markdown meta.paragraph.markdown punctuation.definition.string.end" + ], + "settings": { + "foreground": "#F1FA8C" + } + }, + { + "name": "User-defined class names", + "scope": ["entity.name.type.class", "entity.name.class"], + "settings": { + "foreground": "#8BE9FD", + "fontStyle": "normal" + } + }, + { + "name": "this, super, self, etc.", + "scope": [ + "keyword.expressions-and-types.swift", + "keyword.other.this", + "variable.language", + "variable.language punctuation.definition.variable.php", + "variable.other.readwrite.instance.ruby", + "variable.parameter.function.language.special" + ], + "settings": { + "foreground": "#BD93F9", + "fontStyle": "italic" + } + }, + { + "name": "Inherited classes", + "scope": ["entity.other.inherited-class"], + "settings": { + "fontStyle": "italic", + "foreground": "#8BE9FD" + } + }, + { + "name": "Comments", + "scope": ["comment", "punctuation.definition.comment", "unused.comment", "wildcard.comment"], + "settings": { + "foreground": "#6272A4" + } + }, + { + "name": "JSDoc-style keywords", + "scope": [ + "comment keyword.codetag.notation", + "comment.block.documentation keyword", + "comment.block.documentation storage.type.class" + ], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "JSDoc-style types", + "scope": ["comment.block.documentation entity.name.type"], + "settings": { + "foreground": "#8BE9FD", + "fontStyle": "italic" + } + }, + { + "name": "JSDoc-style type brackets", + "scope": ["comment.block.documentation entity.name.type punctuation.definition.bracket"], + "settings": { + "foreground": "#8BE9FD" + } + }, + { + "name": "JSDoc-style comment parameters", + "scope": ["comment.block.documentation variable"], + "settings": { + "foreground": "#FFB86C", + "fontStyle": "italic" + } + }, + { + "name": "Constants", + "scope": ["constant", "variable.other.constant"], + "settings": { + "foreground": "#BD93F9" + } + }, + { + "name": "Constant escape sequences", + "scope": ["constant.character.escape", "constant.character.string.escape", "constant.regexp"], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "HTML tags", + "scope": ["entity.name.tag"], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "CSS attribute parent selectors ('&')", + "scope": ["entity.other.attribute-name.parent-selector"], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "HTML/CSS attribute names", + "scope": ["entity.other.attribute-name"], + "settings": { + "foreground": "#50FA7B", + "fontStyle": "italic" + } + }, + { + "name": "Function names", + "scope": [ + "entity.name.function", + "meta.function-call.object", + "meta.function-call.php", + "meta.function-call.static", + "meta.method-call.java meta.method", + "meta.method.groovy", + "support.function.any-method.lua", + "keyword.operator.function.infix" + ], + "settings": { + "foreground": "#50FA7B" + } + }, + { + "name": "Function parameters", + "scope": [ + "entity.name.variable.parameter", + "meta.at-rule.function variable", + "meta.at-rule.mixin variable", + "meta.function.arguments variable.other.php", + "meta.selectionset.graphql meta.arguments.graphql variable.arguments.graphql", + "variable.parameter" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#FFB86C" + } + }, + { + "name": "Decorators", + "scope": [ + "meta.decorator variable.other.readwrite", + "meta.decorator variable.other.property" + ], + "settings": { + "foreground": "#50FA7B", + "fontStyle": "italic" + } + }, + { + "name": "Decorator Objects", + "scope": ["meta.decorator variable.other.object"], + "settings": { + "foreground": "#50FA7B" + } + }, + { + "name": "Keywords", + "scope": ["keyword", "punctuation.definition.keyword"], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "Keyword \"new\"", + "scope": ["keyword.control.new", "keyword.operator.new"], + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Generic selectors (CSS/SCSS/Less/Stylus)", + "scope": ["meta.selector"], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "Language Built-ins", + "scope": ["support"], + "settings": { + "fontStyle": "italic", + "foreground": "#8BE9FD" + } + }, + { + "name": "Built-in magic functions and constants", + "scope": ["support.function.magic", "support.variable", "variable.other.predefined"], + "settings": { + "fontStyle": "regular", + "foreground": "#BD93F9" + } + }, + { + "name": "Built-in functions / properties", + "scope": ["support.function", "support.type.property-name"], + "settings": { + "fontStyle": "regular" + } + }, + { + "name": "Separators (key/value, namespace, inheritance, pointer, hash, slice, etc)", + "scope": [ + "constant.other.symbol.hashkey punctuation.definition.constant.ruby", + "entity.other.attribute-name.placeholder punctuation", + "entity.other.attribute-name.pseudo-class punctuation", + "entity.other.attribute-name.pseudo-element punctuation", + "meta.group.double.toml", + "meta.group.toml", + "meta.object-binding-pattern-variable punctuation.destructuring", + "punctuation.colon.graphql", + "punctuation.definition.block.scalar.folded.yaml", + "punctuation.definition.block.scalar.literal.yaml", + "punctuation.definition.block.sequence.item.yaml", + "punctuation.definition.entity.other.inherited-class", + "punctuation.function.swift", + "punctuation.separator.dictionary.key-value", + "punctuation.separator.hash", + "punctuation.separator.inheritance", + "punctuation.separator.key-value", + "punctuation.separator.key-value.mapping.yaml", + "punctuation.separator.namespace", + "punctuation.separator.pointer-access", + "punctuation.separator.slice", + "string.unquoted.heredoc punctuation.definition.string", + "support.other.chomping-indicator.yaml", + "punctuation.separator.annotation" + ], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "Brackets, braces, parens, etc.", + "scope": [ + "keyword.operator.other.powershell", + "keyword.other.statement-separator.powershell", + "meta.brace.round", + "meta.function-call punctuation", + "punctuation.definition.arguments.begin", + "punctuation.definition.arguments.end", + "punctuation.definition.entity.begin", + "punctuation.definition.entity.end", + "punctuation.definition.tag.cs", + "punctuation.definition.type.begin", + "punctuation.definition.type.end", + "punctuation.section.scope.begin", + "punctuation.section.scope.end", + "punctuation.terminator.expression.php", + "storage.type.generic.java", + "string.template meta.brace", + "string.template punctuation.accessor" + ], + "settings": { + "foreground": "#F8F8F2" + } + }, + { + "name": "Variable interpolation operators", + "scope": [ + "meta.string-contents.quoted.double punctuation.definition.variable", + "punctuation.definition.interpolation.begin", + "punctuation.definition.interpolation.end", + "punctuation.definition.template-expression.begin", + "punctuation.definition.template-expression.end", + "punctuation.section.embedded.begin", + "punctuation.section.embedded.coffee", + "punctuation.section.embedded.end", + "punctuation.section.embedded.end source.php", + "punctuation.section.embedded.end source.ruby", + "punctuation.definition.variable.makefile" + ], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "Keys (serializable languages)", + "scope": [ + "entity.name.function.target.makefile", + "entity.name.section.toml", + "entity.name.tag.yaml", + "variable.other.key.toml" + ], + "settings": { + "foreground": "#8BE9FD" + } + }, + { + "name": "Dates / timestamps (serializable languages)", + "scope": ["constant.other.date", "constant.other.timestamp"], + "settings": { + "foreground": "#FFB86C" + } + }, + { + "name": "YAML aliases", + "scope": ["variable.other.alias.yaml"], + "settings": { + "fontStyle": "italic underline", + "foreground": "#50FA7B" + } + }, + { + "name": "Storage", + "scope": [ + "storage", + "meta.implementation storage.type.objc", + "meta.interface-or-protocol storage.type.objc", + "source.groovy storage.type.def" + ], + "settings": { + "fontStyle": "regular", + "foreground": "#FF79C6" + } + }, + { + "name": "Types", + "scope": [ + "entity.name.type", + "keyword.primitive-datatypes.swift", + "keyword.type.cs", + "meta.protocol-list.objc", + "meta.return-type.objc", + "source.go storage.type", + "source.groovy storage.type", + "source.java storage.type", + "source.powershell entity.other.attribute-name", + "storage.class.std.rust", + "storage.type.attribute.swift", + "storage.type.c", + "storage.type.core.rust", + "storage.type.cs", + "storage.type.groovy", + "storage.type.objc", + "storage.type.php", + "storage.type.haskell", + "storage.type.ocaml" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#8BE9FD" + } + }, + { + "name": "Generics, templates, and mapped type declarations", + "scope": [ + "entity.name.type.type-parameter", + "meta.indexer.mappedtype.declaration entity.name.type", + "meta.type.parameters entity.name.type" + ], + "settings": { + "foreground": "#FFB86C" + } + }, + { + "name": "Modifiers", + "scope": ["storage.modifier"], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "RegExp string", + "scope": [ + "string.regexp", + "constant.other.character-class.set.regexp", + "constant.character.escape.backslash.regexp" + ], + "settings": { + "foreground": "#F1FA8C" + } + }, + { + "name": "Non-capture operators", + "scope": ["punctuation.definition.group.capture.regexp"], + "settings": { + "foreground": "#FF79C6" + } + }, + { + "name": "RegExp start and end characters", + "scope": [ + "string.regexp punctuation.definition.string.begin", + "string.regexp punctuation.definition.string.end" + ], + "settings": { + "foreground": "#FF5555" + } + }, + { + "name": "Character group", + "scope": ["punctuation.definition.character-class.regexp"], + "settings": { + "foreground": "#8BE9FD" + } + }, + { + "name": "Capture groups", + "scope": ["punctuation.definition.group.regexp"], + "settings": { + "foreground": "#FFB86C" + } + }, + { + "name": "Assertion operators", + "scope": [ + "punctuation.definition.group.assertion.regexp", + "keyword.operator.negation.regexp" + ], + "settings": { + "foreground": "#FF5555" + } + }, + { + "name": "Positive lookaheads", + "scope": ["meta.assertion.look-ahead.regexp"], + "settings": { + "foreground": "#50FA7B" + } + }, + { + "name": "Strings", + "scope": ["string"], + "settings": { + "foreground": "#F1FA8C" + } + }, + { + "name": "String quotes (temporary vscode fix)", + "scope": ["punctuation.definition.string.begin", "punctuation.definition.string.end"], + "settings": { + "foreground": "#E9F284" + } + }, + { + "name": "Property quotes (temporary vscode fix)", + "scope": [ + "punctuation.support.type.property-name.begin", + "punctuation.support.type.property-name.end" + ], + "settings": { + "foreground": "#8BE9FE" + } + }, + { + "name": "Docstrings", + "scope": [ + "string.quoted.docstring.multi", + "string.quoted.docstring.multi.python punctuation.definition.string.begin", + "string.quoted.docstring.multi.python punctuation.definition.string.end", + "string.quoted.docstring.multi.python constant.character.escape" + ], + "settings": { + "foreground": "#6272A4" + } + }, + { + "name": "Variables and object properties", + "scope": [ + "variable", + "constant.other.key.perl", + "support.variable.property", + "variable.other.constant.js", + "variable.other.constant.ts", + "variable.other.constant.tsx" + ], + "settings": { + "foreground": "#F8F8F2" + } + }, + { + "name": "Destructuring / aliasing reference name (LHS)", + "scope": [ + "meta.import variable.other.readwrite", + "meta.variable.assignment.destructured.object.coffee variable" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#FFB86C" + } + }, + { + "name": "Destructuring / aliasing variable name (RHS)", + "scope": [ + "meta.import variable.other.readwrite.alias", + "meta.export variable.other.readwrite.alias", + "meta.variable.assignment.destructured.object.coffee variable variable" + ], + "settings": { + "fontStyle": "normal", + "foreground": "#F8F8F2" + } + }, + { + "name": "GraphQL keys", + "scope": ["meta.selectionset.graphql variable"], + "settings": { + "foreground": "#F1FA8C" + } + }, + { + "name": "GraphQL function arguments", + "scope": ["meta.selectionset.graphql meta.arguments variable"], + "settings": { + "foreground": "#F8F8F2" + } + }, + { + "name": "GraphQL fragment name (definition)", + "scope": ["entity.name.fragment.graphql", "variable.fragment.graphql"], + "settings": { + "foreground": "#8BE9FD" + } + }, + { + "name": "Edge cases (foreground color resets)", + "scope": [ + "constant.other.symbol.hashkey.ruby", + "keyword.operator.dereference.java", + "keyword.operator.navigation.groovy", + "meta.scope.for-loop.shell punctuation.definition.string.begin", + "meta.scope.for-loop.shell punctuation.definition.string.end", + "meta.scope.for-loop.shell string", + "storage.modifier.import", + "punctuation.section.embedded.begin.tsx", + "punctuation.section.embedded.end.tsx", + "punctuation.section.embedded.begin.jsx", + "punctuation.section.embedded.end.jsx", + "punctuation.separator.list.comma.css", + "constant.language.empty-list.haskell" + ], + "settings": { + "foreground": "#F8F8F2" + } + }, + { + "name": "Shell variables prefixed with \"$\" (edge case)", + "scope": ["source.shell variable.other"], + "settings": { + "foreground": "#BD93F9" + } + }, + { + "name": "Powershell constants mistakenly scoped to `support`, rather than `constant` (edge)", + "scope": ["support.constant"], + "settings": { + "fontStyle": "normal", + "foreground": "#BD93F9" + } + }, + { + "name": "Makefile prerequisite names", + "scope": ["meta.scope.prerequisites.makefile"], + "settings": { + "foreground": "#F1FA8C" + } + }, + { + "name": "SCSS attibute selector strings", + "scope": ["meta.attribute-selector.scss"], + "settings": { + "foreground": "#F1FA8C" + } + }, + { + "name": "SCSS attribute selector brackets", + "scope": [ + "punctuation.definition.attribute-selector.end.bracket.square.scss", + "punctuation.definition.attribute-selector.begin.bracket.square.scss" + ], + "settings": { + "foreground": "#F8F8F2" + } + }, + { + "name": "Haskell Pragmas", + "scope": ["meta.preprocessor.haskell"], + "settings": { + "foreground": "#6272A4" + } + }, + { + "name": "Log file error", + "scope": ["log.error"], + "settings": { + "foreground": "#FF5555", + "fontStyle": "bold" + } + }, + { + "name": "Log file warning", + "scope": ["log.warning"], + "settings": { + "foreground": "#F1FA8C", + "fontStyle": "bold" + } + } + ] +} diff --git a/src/lib/shiki/themes/github-dark-dimmed.json b/src/lib/shiki/themes/github-dark-dimmed.json new file mode 100644 index 0000000..9b70271 --- /dev/null +++ b/src/lib/shiki/themes/github-dark-dimmed.json @@ -0,0 +1,597 @@ +{ + "name": "github-dark-dimmed", + "colors": { + "focusBorder": "#316dca", + "foreground": "#adbac7", + "descriptionForeground": "#768390", + "errorForeground": "#e5534b", + "textLink.foreground": "#539bf5", + "textLink.activeForeground": "#539bf5", + "textBlockQuote.background": "#1c2128", + "textBlockQuote.border": "#444c56", + "textCodeBlock.background": "#636e7b66", + "textPreformat.foreground": "#768390", + "textSeparator.foreground": "#373e47", + "icon.foreground": "#768390", + "keybindingLabel.foreground": "#adbac7", + "button.background": "#347d39", + "button.foreground": "#ffffff", + "button.hoverBackground": "#46954a", + "button.secondaryBackground": "#3d444d", + "button.secondaryForeground": "#adbac7", + "button.secondaryHoverBackground": "#444c56", + "checkbox.background": "#2d333b", + "checkbox.border": "#444c56", + "dropdown.background": "#2d333b", + "dropdown.border": "#444c56", + "dropdown.foreground": "#adbac7", + "dropdown.listBackground": "#2d333b", + "input.background": "#22272e", + "input.border": "#444c56", + "input.foreground": "#adbac7", + "input.placeholderForeground": "#636e7b", + "badge.foreground": "#cdd9e5", + "badge.background": "#316dca", + "progressBar.background": "#316dca", + "titleBar.activeForeground": "#768390", + "titleBar.activeBackground": "#22272e", + "titleBar.inactiveForeground": "#768390", + "titleBar.inactiveBackground": "#1c2128", + "titleBar.border": "#444c56", + "activityBar.foreground": "#adbac7", + "activityBar.inactiveForeground": "#768390", + "activityBar.background": "#22272e", + "activityBarBadge.foreground": "#cdd9e5", + "activityBarBadge.background": "#316dca", + "activityBar.activeBorder": "#ec775c", + "activityBar.border": "#444c56", + "sideBar.foreground": "#adbac7", + "sideBar.background": "#1c2128", + "sideBar.border": "#444c56", + "sideBarTitle.foreground": "#adbac7", + "sideBarSectionHeader.foreground": "#adbac7", + "sideBarSectionHeader.background": "#1c2128", + "sideBarSectionHeader.border": "#444c56", + "list.hoverForeground": "#adbac7", + "list.inactiveSelectionForeground": "#adbac7", + "list.activeSelectionForeground": "#adbac7", + "list.hoverBackground": "#636e7b1a", + "list.inactiveSelectionBackground": "#636e7b66", + "list.activeSelectionBackground": "#636e7b66", + "list.focusForeground": "#adbac7", + "list.focusBackground": "#4184e426", + "list.inactiveFocusBackground": "#4184e426", + "list.highlightForeground": "#539bf5", + "tree.indentGuidesStroke": "#373e47", + "notificationCenterHeader.foreground": "#768390", + "notificationCenterHeader.background": "#2d333b", + "notifications.foreground": "#adbac7", + "notifications.background": "#2d333b", + "notifications.border": "#444c56", + "notificationsErrorIcon.foreground": "#e5534b", + "notificationsWarningIcon.foreground": "#c69026", + "notificationsInfoIcon.foreground": "#539bf5", + "pickerGroup.border": "#444c56", + "pickerGroup.foreground": "#768390", + "quickInput.background": "#2d333b", + "quickInput.foreground": "#adbac7", + "statusBar.foreground": "#768390", + "statusBar.background": "#22272e", + "statusBar.border": "#444c56", + "statusBar.focusBorder": "#316dca80", + "statusBar.noFolderBackground": "#22272e", + "statusBar.debuggingForeground": "#cdd9e5", + "statusBar.debuggingBackground": "#c93c37", + "statusBarItem.prominentBackground": "#636e7b66", + "statusBarItem.remoteForeground": "#adbac7", + "statusBarItem.remoteBackground": "#444c56", + "statusBarItem.hoverBackground": "#adbac714", + "statusBarItem.activeBackground": "#adbac71f", + "statusBarItem.focusBorder": "#316dca", + "editorGroupHeader.tabsBackground": "#1c2128", + "editorGroupHeader.tabsBorder": "#444c56", + "editorGroup.border": "#444c56", + "tab.activeForeground": "#adbac7", + "tab.inactiveForeground": "#768390", + "tab.inactiveBackground": "#1c2128", + "tab.activeBackground": "#22272e", + "tab.hoverBackground": "#22272e", + "tab.unfocusedHoverBackground": "#636e7b1a", + "tab.border": "#444c56", + "tab.unfocusedActiveBorderTop": "#444c56", + "tab.activeBorder": "#22272e", + "tab.unfocusedActiveBorder": "#22272e", + "tab.activeBorderTop": "#ec775c", + "breadcrumb.foreground": "#768390", + "breadcrumb.focusForeground": "#adbac7", + "breadcrumb.activeSelectionForeground": "#768390", + "breadcrumbPicker.background": "#2d333b", + "editor.foreground": "#adbac7", + "editor.background": "#22272e", + "editorWidget.background": "#2d333b", + "editor.foldBackground": "#636e7b1a", + "editor.lineHighlightBackground": "#636e7b1a", + "editorLineNumber.foreground": "#636e7b", + "editorLineNumber.activeForeground": "#adbac7", + "editorIndentGuide.background": "#adbac71f", + "editorIndentGuide.activeBackground": "#adbac73d", + "editorWhitespace.foreground": "#545d68", + "editorCursor.foreground": "#539bf5", + "editor.findMatchBackground": "#966600", + "editor.findMatchHighlightBackground": "#eac55f80", + "editor.linkedEditingBackground": "#539bf512", + "editor.selectionHighlightBackground": "#57ab5a40", + "editor.wordHighlightBackground": "#636e7b80", + "editor.wordHighlightBorder": "#636e7b99", + "editor.wordHighlightStrongBackground": "#636e7b4d", + "editor.wordHighlightStrongBorder": "#636e7b99", + "editorBracketMatch.background": "#57ab5a40", + "editorBracketMatch.border": "#57ab5a99", + "editorInlayHint.background": "#76839033", + "editorInlayHint.foreground": "#768390", + "editorInlayHint.typeBackground": "#76839033", + "editorInlayHint.typeForeground": "#768390", + "editorInlayHint.paramBackground": "#76839033", + "editorInlayHint.paramForeground": "#768390", + "editorGutter.modifiedBackground": "#ae7c1466", + "editorGutter.addedBackground": "#46954a66", + "editorGutter.deletedBackground": "#e5534b66", + "diffEditor.insertedLineBackground": "#347d3926", + "diffEditor.insertedTextBackground": "#57ab5a4d", + "diffEditor.removedLineBackground": "#c93c3726", + "diffEditor.removedTextBackground": "#f470674d", + "scrollbar.shadow": "#545d6833", + "scrollbarSlider.background": "#76839033", + "scrollbarSlider.hoverBackground": "#7683903d", + "scrollbarSlider.activeBackground": "#76839047", + "editorOverviewRuler.border": "#1c2128", + "minimapSlider.background": "#76839033", + "minimapSlider.hoverBackground": "#7683903d", + "minimapSlider.activeBackground": "#76839047", + "panel.background": "#1c2128", + "panel.border": "#444c56", + "panelTitle.activeBorder": "#ec775c", + "panelTitle.activeForeground": "#adbac7", + "panelTitle.inactiveForeground": "#768390", + "panelInput.border": "#444c56", + "debugIcon.breakpointForeground": "#e5534b", + "debugConsole.infoForeground": "#768390", + "debugConsole.warningForeground": "#c69026", + "debugConsole.errorForeground": "#ff938a", + "debugConsole.sourceForeground": "#daaa3f", + "debugConsoleInputIcon.foreground": "#b083f0", + "debugTokenExpression.name": "#6cb6ff", + "debugTokenExpression.value": "#96d0ff", + "debugTokenExpression.string": "#96d0ff", + "debugTokenExpression.boolean": "#6bc46d", + "debugTokenExpression.number": "#6bc46d", + "debugTokenExpression.error": "#ff938a", + "symbolIcon.arrayForeground": "#e0823d", + "symbolIcon.booleanForeground": "#539bf5", + "symbolIcon.classForeground": "#e0823d", + "symbolIcon.colorForeground": "#6cb6ff", + "symbolIcon.constructorForeground": "#dcbdfb", + "symbolIcon.enumeratorForeground": "#e0823d", + "symbolIcon.enumeratorMemberForeground": "#539bf5", + "symbolIcon.eventForeground": "#636e7b", + "symbolIcon.fieldForeground": "#e0823d", + "symbolIcon.fileForeground": "#c69026", + "symbolIcon.folderForeground": "#c69026", + "symbolIcon.functionForeground": "#b083f0", + "symbolIcon.interfaceForeground": "#e0823d", + "symbolIcon.keyForeground": "#539bf5", + "symbolIcon.keywordForeground": "#f47067", + "symbolIcon.methodForeground": "#b083f0", + "symbolIcon.moduleForeground": "#f47067", + "symbolIcon.namespaceForeground": "#f47067", + "symbolIcon.nullForeground": "#539bf5", + "symbolIcon.numberForeground": "#57ab5a", + "symbolIcon.objectForeground": "#e0823d", + "symbolIcon.operatorForeground": "#6cb6ff", + "symbolIcon.packageForeground": "#e0823d", + "symbolIcon.propertyForeground": "#e0823d", + "symbolIcon.referenceForeground": "#539bf5", + "symbolIcon.snippetForeground": "#539bf5", + "symbolIcon.stringForeground": "#6cb6ff", + "symbolIcon.structForeground": "#e0823d", + "symbolIcon.textForeground": "#6cb6ff", + "symbolIcon.typeParameterForeground": "#6cb6ff", + "symbolIcon.unitForeground": "#539bf5", + "symbolIcon.variableForeground": "#e0823d", + "symbolIcon.constantForeground": [ + "#b4f1b4", + "#8ddb8c", + "#6bc46d", + "#57ab5a", + "#46954a", + "#347d39", + "#2b6a30", + "#245829", + "#1b4721", + "#113417" + ], + "terminal.foreground": "#adbac7", + "terminal.ansiBlack": "#545d68", + "terminal.ansiRed": "#f47067", + "terminal.ansiGreen": "#57ab5a", + "terminal.ansiYellow": "#c69026", + "terminal.ansiBlue": "#539bf5", + "terminal.ansiMagenta": "#b083f0", + "terminal.ansiCyan": "#39c5cf", + "terminal.ansiWhite": "#909dab", + "terminal.ansiBrightBlack": "#636e7b", + "terminal.ansiBrightRed": "#ff938a", + "terminal.ansiBrightGreen": "#6bc46d", + "terminal.ansiBrightYellow": "#daaa3f", + "terminal.ansiBrightBlue": "#6cb6ff", + "terminal.ansiBrightMagenta": "#dcbdfb", + "terminal.ansiBrightCyan": "#56d4dd", + "terminal.ansiBrightWhite": "#cdd9e5", + "editorBracketHighlight.foreground1": "#6cb6ff", + "editorBracketHighlight.foreground2": "#6bc46d", + "editorBracketHighlight.foreground3": "#daaa3f", + "editorBracketHighlight.foreground4": "#ff938a", + "editorBracketHighlight.foreground5": "#fc8dc7", + "editorBracketHighlight.foreground6": "#dcbdfb", + "editorBracketHighlight.unexpectedBracket.foreground": "#768390", + "gitDecoration.addedResourceForeground": "#57ab5a", + "gitDecoration.modifiedResourceForeground": "#c69026", + "gitDecoration.deletedResourceForeground": "#e5534b", + "gitDecoration.untrackedResourceForeground": "#57ab5a", + "gitDecoration.ignoredResourceForeground": "#636e7b", + "gitDecoration.conflictingResourceForeground": "#cc6b2c", + "gitDecoration.submoduleResourceForeground": "#768390", + "debugToolBar.background": "#2d333b", + "editor.stackFrameHighlightBackground": "#ae7c1466", + "editor.focusedStackFrameHighlightBackground": "#46954a66", + "peekViewEditor.matchHighlightBackground": "#ae7c1466", + "peekViewResult.matchHighlightBackground": "#ae7c1466", + "peekViewEditor.background": "#636e7b1a", + "peekViewResult.background": "#22272e", + "settings.headerForeground": "#adbac7", + "settings.modifiedItemIndicator": "#ae7c1466", + "welcomePage.buttonBackground": "#373e47", + "welcomePage.buttonHoverBackground": "#444c56" + }, + "semanticHighlighting": true, + "tokenColors": [ + { + "scope": ["comment", "punctuation.definition.comment", "string.comment"], + "settings": { + "foreground": "#768390" + } + }, + { + "scope": ["constant.other.placeholder", "constant.character"], + "settings": { + "foreground": "#f47067" + } + }, + { + "scope": [ + "constant", + "entity.name.constant", + "variable.other.constant", + "variable.other.enummember", + "variable.language", + "entity" + ], + "settings": { + "foreground": "#6cb6ff" + } + }, + { + "scope": ["entity.name", "meta.export.default", "meta.definition.variable"], + "settings": { + "foreground": "#f69d50" + } + }, + { + "scope": [ + "variable.parameter.function", + "meta.jsx.children", + "meta.block", + "meta.tag.attributes", + "entity.name.constant", + "meta.object.member", + "meta.embedded.expression" + ], + "settings": { + "foreground": "#adbac7" + } + }, + { + "scope": "entity.name.function", + "settings": { + "foreground": "#dcbdfb" + } + }, + { + "scope": ["entity.name.tag", "support.class.component"], + "settings": { + "foreground": "#8ddb8c" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#f47067" + } + }, + { + "scope": ["storage", "storage.type"], + "settings": { + "foreground": "#f47067" + } + }, + { + "scope": ["storage.modifier.package", "storage.modifier.import", "storage.type.java"], + "settings": { + "foreground": "#adbac7" + } + }, + { + "scope": ["string", "string punctuation.section.embedded source"], + "settings": { + "foreground": "#96d0ff" + } + }, + { + "scope": "support", + "settings": { + "foreground": "#6cb6ff" + } + }, + { + "scope": "meta.property-name", + "settings": { + "foreground": "#6cb6ff" + } + }, + { + "scope": "variable", + "settings": { + "foreground": "#f69d50" + } + }, + { + "scope": "variable.other", + "settings": { + "foreground": "#adbac7" + } + }, + { + "scope": "invalid.broken", + "settings": { + "fontStyle": "italic", + "foreground": "#ff938a" + } + }, + { + "scope": "invalid.deprecated", + "settings": { + "fontStyle": "italic", + "foreground": "#ff938a" + } + }, + { + "scope": "invalid.illegal", + "settings": { + "fontStyle": "italic", + "foreground": "#ff938a" + } + }, + { + "scope": "invalid.unimplemented", + "settings": { + "fontStyle": "italic", + "foreground": "#ff938a" + } + }, + { + "scope": "carriage-return", + "settings": { + "fontStyle": "italic underline", + "background": "#f47067", + "foreground": "#cdd9e5", + "content": "^M" + } + }, + { + "scope": "message.error", + "settings": { + "foreground": "#ff938a" + } + }, + { + "scope": "string variable", + "settings": { + "foreground": "#6cb6ff" + } + }, + { + "scope": ["source.regexp", "string.regexp"], + "settings": { + "foreground": "#96d0ff" + } + }, + { + "scope": [ + "string.regexp.character-class", + "string.regexp constant.character.escape", + "string.regexp source.ruby.embedded", + "string.regexp string.regexp.arbitrary-repitition" + ], + "settings": { + "foreground": "#96d0ff" + } + }, + { + "scope": "string.regexp constant.character.escape", + "settings": { + "fontStyle": "bold", + "foreground": "#8ddb8c" + } + }, + { + "scope": "support.constant", + "settings": { + "foreground": "#6cb6ff" + } + }, + { + "scope": "support.variable", + "settings": { + "foreground": "#6cb6ff" + } + }, + { + "scope": "support.type.property-name.json", + "settings": { + "foreground": "#8ddb8c" + } + }, + { + "scope": "meta.module-reference", + "settings": { + "foreground": "#6cb6ff" + } + }, + { + "scope": "punctuation.definition.list.begin.markdown", + "settings": { + "foreground": "#f69d50" + } + }, + { + "scope": ["markup.heading", "markup.heading entity.name"], + "settings": { + "fontStyle": "bold", + "foreground": "#6cb6ff" + } + }, + { + "scope": "markup.quote", + "settings": { + "foreground": "#8ddb8c" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic", + "foreground": "#adbac7" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#adbac7" + } + }, + { + "scope": ["markup.underline"], + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": ["markup.strikethrough"], + "settings": { + "fontStyle": "strikethrough" + } + }, + { + "scope": "markup.inline.raw", + "settings": { + "foreground": "#6cb6ff" + } + }, + { + "scope": ["markup.deleted", "meta.diff.header.from-file", "punctuation.definition.deleted"], + "settings": { + "background": "#5d0f12", + "foreground": "#ff938a" + } + }, + { + "scope": ["punctuation.section.embedded"], + "settings": { + "foreground": "#f47067" + } + }, + { + "scope": ["markup.inserted", "meta.diff.header.to-file", "punctuation.definition.inserted"], + "settings": { + "background": "#113417", + "foreground": "#8ddb8c" + } + }, + { + "scope": ["markup.changed", "punctuation.definition.changed"], + "settings": { + "background": "#682d0f", + "foreground": "#f69d50" + } + }, + { + "scope": ["markup.ignored", "markup.untracked"], + "settings": { + "foreground": "#2d333b", + "background": "#6cb6ff" + } + }, + { + "scope": "meta.diff.range", + "settings": { + "foreground": "#dcbdfb", + "fontStyle": "bold" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#6cb6ff" + } + }, + { + "scope": "meta.separator", + "settings": { + "fontStyle": "bold", + "foreground": "#6cb6ff" + } + }, + { + "scope": "meta.output", + "settings": { + "foreground": "#6cb6ff" + } + }, + { + "scope": [ + "brackethighlighter.tag", + "brackethighlighter.curly", + "brackethighlighter.round", + "brackethighlighter.square", + "brackethighlighter.angle", + "brackethighlighter.quote" + ], + "settings": { + "foreground": "#768390" + } + }, + { + "scope": "brackethighlighter.unmatched", + "settings": { + "foreground": "#ff938a" + } + }, + { + "scope": ["constant.other.reference.link", "string.other.link"], + "settings": { + "foreground": "#96d0ff" + } + } + ] +} diff --git a/src/lib/shiki/themes/github-dark.json b/src/lib/shiki/themes/github-dark.json new file mode 100644 index 0000000..cccc0e6 --- /dev/null +++ b/src/lib/shiki/themes/github-dark.json @@ -0,0 +1,501 @@ +{ + "name": "github-dark", + "colors": { + "focusBorder": "#005cc5", + "foreground": "#d1d5da", + "descriptionForeground": "#959da5", + "errorForeground": "#f97583", + "textLink.foreground": "#79b8ff", + "textLink.activeForeground": "#c8e1ff", + "textBlockQuote.background": "#24292e", + "textBlockQuote.border": "#444d56", + "textCodeBlock.background": "#2f363d", + "textPreformat.foreground": "#d1d5da", + "textSeparator.foreground": "#586069", + "button.background": "#176f2c", + "button.foreground": "#dcffe4", + "button.hoverBackground": "#22863a", + "button.secondaryBackground": "#444d56", + "button.secondaryForeground": "#fff", + "button.secondaryHoverBackground": "#586069", + "checkbox.background": "#444d56", + "checkbox.border": "#1b1f23", + "dropdown.background": "#2f363d", + "dropdown.border": "#1b1f23", + "dropdown.foreground": "#e1e4e8", + "dropdown.listBackground": "#24292e", + "input.background": "#2f363d", + "input.border": "#1b1f23", + "input.foreground": "#e1e4e8", + "input.placeholderForeground": "#959da5", + "badge.foreground": "#c8e1ff", + "badge.background": "#044289", + "progressBar.background": "#0366d6", + "titleBar.activeForeground": "#e1e4e8", + "titleBar.activeBackground": "#24292e", + "titleBar.inactiveForeground": "#959da5", + "titleBar.inactiveBackground": "#1f2428", + "titleBar.border": "#1b1f23", + "activityBar.foreground": "#e1e4e8", + "activityBar.inactiveForeground": "#6a737d", + "activityBar.background": "#24292e", + "activityBarBadge.foreground": "#fff", + "activityBarBadge.background": "#0366d6", + "activityBar.activeBorder": "#f9826c", + "activityBar.border": "#1b1f23", + "sideBar.foreground": "#d1d5da", + "sideBar.background": "#1f2428", + "sideBar.border": "#1b1f23", + "sideBarTitle.foreground": "#e1e4e8", + "sideBarSectionHeader.foreground": "#e1e4e8", + "sideBarSectionHeader.background": "#1f2428", + "sideBarSectionHeader.border": "#1b1f23", + "list.hoverForeground": "#e1e4e8", + "list.inactiveSelectionForeground": "#e1e4e8", + "list.activeSelectionForeground": "#e1e4e8", + "list.hoverBackground": "#282e34", + "list.inactiveSelectionBackground": "#282e34", + "list.activeSelectionBackground": "#39414a", + "list.inactiveFocusBackground": "#1d2d3e", + "list.focusBackground": "#044289", + "tree.indentGuidesStroke": "#2f363d", + "notificationCenterHeader.foreground": "#959da5", + "notificationCenterHeader.background": "#24292e", + "notifications.foreground": "#e1e4e8", + "notifications.background": "#2f363d", + "notifications.border": "#1b1f23", + "notificationsErrorIcon.foreground": "#ea4a5a", + "notificationsWarningIcon.foreground": "#ffab70", + "notificationsInfoIcon.foreground": "#79b8ff", + "pickerGroup.border": "#444d56", + "pickerGroup.foreground": "#e1e4e8", + "quickInput.background": "#24292e", + "quickInput.foreground": "#e1e4e8", + "statusBar.foreground": "#d1d5da", + "statusBar.background": "#24292e", + "statusBar.border": "#1b1f23", + "statusBar.noFolderBackground": "#24292e", + "statusBar.debuggingBackground": "#931c06", + "statusBar.debuggingForeground": "#fff", + "statusBarItem.prominentBackground": "#282e34", + "statusBarItem.remoteForeground": "#d1d5da", + "statusBarItem.remoteBackground": "#24292e", + "editorGroupHeader.tabsBackground": "#1f2428", + "editorGroupHeader.tabsBorder": "#1b1f23", + "editorGroup.border": "#1b1f23", + "tab.activeForeground": "#e1e4e8", + "tab.inactiveForeground": "#959da5", + "tab.inactiveBackground": "#1f2428", + "tab.activeBackground": "#24292e", + "tab.hoverBackground": "#24292e", + "tab.unfocusedHoverBackground": "#24292e", + "tab.border": "#1b1f23", + "tab.unfocusedActiveBorderTop": "#1b1f23", + "tab.activeBorder": "#24292e", + "tab.unfocusedActiveBorder": "#24292e", + "tab.activeBorderTop": "#f9826c", + "breadcrumb.foreground": "#959da5", + "breadcrumb.focusForeground": "#e1e4e8", + "breadcrumb.activeSelectionForeground": "#d1d5da", + "breadcrumbPicker.background": "#2b3036", + "editor.foreground": "#e1e4e8", + "editor.background": "#24292e", + "editorWidget.background": "#1f2428", + "editor.foldBackground": "#58606915", + "editor.lineHighlightBackground": "#2b3036", + "editorLineNumber.foreground": "#444d56", + "editorLineNumber.activeForeground": "#e1e4e8", + "editorIndentGuide.background": "#2f363d", + "editorIndentGuide.activeBackground": "#444d56", + "editorWhitespace.foreground": "#444d56", + "editorCursor.foreground": "#c8e1ff", + "editorError.foreground": "#f97583", + "editorWarning.foreground": "#ffea7f", + "editor.findMatchBackground": "#ffd33d44", + "editor.findMatchHighlightBackground": "#ffd33d22", + "editor.linkedEditingBackground": "#3392FF22", + "editor.inactiveSelectionBackground": "#3392FF22", + "editor.selectionBackground": "#3392FF44", + "editor.selectionHighlightBackground": "#17E5E633", + "editor.selectionHighlightBorder": "#17E5E600", + "editor.wordHighlightBackground": "#17E5E600", + "editor.wordHighlightStrongBackground": "#17E5E600", + "editor.wordHighlightBorder": "#17E5E699", + "editor.wordHighlightStrongBorder": "#17E5E666", + "editorBracketMatch.background": "#17E5E650", + "editorBracketMatch.border": "#17E5E600", + "editorGutter.modifiedBackground": "#2188ff", + "editorGutter.addedBackground": "#28a745", + "editorGutter.deletedBackground": "#ea4a5a", + "diffEditor.insertedTextBackground": "#28a74530", + "diffEditor.removedTextBackground": "#d73a4930", + "scrollbar.shadow": "#0008", + "scrollbarSlider.background": "#6a737d33", + "scrollbarSlider.hoverBackground": "#6a737d44", + "scrollbarSlider.activeBackground": "#6a737d88", + "editorOverviewRuler.border": "#1b1f23", + "panel.background": "#1f2428", + "panel.border": "#1b1f23", + "panelTitle.activeBorder": "#f9826c", + "panelTitle.activeForeground": "#e1e4e8", + "panelTitle.inactiveForeground": "#959da5", + "panelInput.border": "#2f363d", + "terminal.foreground": "#d1d5da", + "terminal.tab.activeBorder": "#f9826c", + "terminalCursor.background": "#586069", + "terminalCursor.foreground": "#79b8ff", + "terminal.ansiBrightWhite": "#fafbfc", + "terminal.ansiWhite": "#d1d5da", + "terminal.ansiBrightBlack": "#959da5", + "terminal.ansiBlack": "#586069", + "terminal.ansiBlue": "#2188ff", + "terminal.ansiBrightBlue": "#79b8ff", + "terminal.ansiGreen": "#34d058", + "terminal.ansiBrightGreen": "#85e89d", + "terminal.ansiCyan": "#39c5cf", + "terminal.ansiBrightCyan": "#56d4dd", + "terminal.ansiRed": "#ea4a5a", + "terminal.ansiBrightRed": "#f97583", + "terminal.ansiMagenta": "#b392f0", + "terminal.ansiBrightMagenta": "#b392f0", + "terminal.ansiYellow": "#ffea7f", + "terminal.ansiBrightYellow": "#ffea7f", + "editorBracketHighlight.foreground1": "#79b8ff", + "editorBracketHighlight.foreground2": "#ffab70", + "editorBracketHighlight.foreground3": "#b392f0", + "editorBracketHighlight.foreground4": "#79b8ff", + "editorBracketHighlight.foreground5": "#ffab70", + "editorBracketHighlight.foreground6": "#b392f0", + "gitDecoration.addedResourceForeground": "#34d058", + "gitDecoration.modifiedResourceForeground": "#79b8ff", + "gitDecoration.deletedResourceForeground": "#ea4a5a", + "gitDecoration.untrackedResourceForeground": "#34d058", + "gitDecoration.ignoredResourceForeground": "#6a737d", + "gitDecoration.conflictingResourceForeground": "#ffab70", + "gitDecoration.submoduleResourceForeground": "#6a737d", + "debugToolBar.background": "#2b3036", + "editor.stackFrameHighlightBackground": "#C6902625", + "editor.focusedStackFrameHighlightBackground": "#2b6a3033", + "peekViewEditor.matchHighlightBackground": "#ffd33d33", + "peekViewResult.matchHighlightBackground": "#ffd33d33", + "peekViewEditor.background": "#1f242888", + "peekViewResult.background": "#1f2428", + "settings.headerForeground": "#e1e4e8", + "settings.modifiedItemIndicator": "#0366d6", + "welcomePage.buttonBackground": "#2f363d", + "welcomePage.buttonHoverBackground": "#444d56" + }, + "semanticHighlighting": true, + "tokenColors": [ + { + "scope": ["comment", "punctuation.definition.comment", "string.comment"], + "settings": { + "foreground": "#6a737d" + } + }, + { + "scope": [ + "constant", + "entity.name.constant", + "variable.other.constant", + "variable.other.enummember", + "variable.language" + ], + "settings": { + "foreground": "#79b8ff" + } + }, + { + "scope": ["entity", "entity.name"], + "settings": { + "foreground": "#b392f0" + } + }, + { + "scope": "variable.parameter.function", + "settings": { + "foreground": "#e1e4e8" + } + }, + { + "scope": "entity.name.tag", + "settings": { + "foreground": "#85e89d" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#f97583" + } + }, + { + "scope": ["storage", "storage.type"], + "settings": { + "foreground": "#f97583" + } + }, + { + "scope": ["storage.modifier.package", "storage.modifier.import", "storage.type.java"], + "settings": { + "foreground": "#e1e4e8" + } + }, + { + "scope": [ + "string", + "punctuation.definition.string", + "string punctuation.section.embedded source" + ], + "settings": { + "foreground": "#9ecbff" + } + }, + { + "scope": "support", + "settings": { + "foreground": "#79b8ff" + } + }, + { + "scope": "meta.property-name", + "settings": { + "foreground": "#79b8ff" + } + }, + { + "scope": "variable", + "settings": { + "foreground": "#ffab70" + } + }, + { + "scope": "variable.other", + "settings": { + "foreground": "#e1e4e8" + } + }, + { + "scope": "invalid.broken", + "settings": { + "fontStyle": "italic", + "foreground": "#fdaeb7" + } + }, + { + "scope": "invalid.deprecated", + "settings": { + "fontStyle": "italic", + "foreground": "#fdaeb7" + } + }, + { + "scope": "invalid.illegal", + "settings": { + "fontStyle": "italic", + "foreground": "#fdaeb7" + } + }, + { + "scope": "invalid.unimplemented", + "settings": { + "fontStyle": "italic", + "foreground": "#fdaeb7" + } + }, + { + "scope": "carriage-return", + "settings": { + "fontStyle": "italic underline", + "background": "#f97583", + "foreground": "#24292e", + "content": "^M" + } + }, + { + "scope": "message.error", + "settings": { + "foreground": "#fdaeb7" + } + }, + { + "scope": "string variable", + "settings": { + "foreground": "#79b8ff" + } + }, + { + "scope": ["source.regexp", "string.regexp"], + "settings": { + "foreground": "#dbedff" + } + }, + { + "scope": [ + "string.regexp.character-class", + "string.regexp constant.character.escape", + "string.regexp source.ruby.embedded", + "string.regexp string.regexp.arbitrary-repitition" + ], + "settings": { + "foreground": "#dbedff" + } + }, + { + "scope": "string.regexp constant.character.escape", + "settings": { + "fontStyle": "bold", + "foreground": "#85e89d" + } + }, + { + "scope": "support.constant", + "settings": { + "foreground": "#79b8ff" + } + }, + { + "scope": "support.variable", + "settings": { + "foreground": "#79b8ff" + } + }, + { + "scope": "meta.module-reference", + "settings": { + "foreground": "#79b8ff" + } + }, + { + "scope": "punctuation.definition.list.begin.markdown", + "settings": { + "foreground": "#ffab70" + } + }, + { + "scope": ["markup.heading", "markup.heading entity.name"], + "settings": { + "fontStyle": "bold", + "foreground": "#79b8ff" + } + }, + { + "scope": "markup.quote", + "settings": { + "foreground": "#85e89d" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic", + "foreground": "#e1e4e8" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#e1e4e8" + } + }, + { + "scope": ["markup.underline"], + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": ["markup.strikethrough"], + "settings": { + "fontStyle": "strikethrough" + } + }, + { + "scope": "markup.inline.raw", + "settings": { + "foreground": "#79b8ff" + } + }, + { + "scope": ["markup.deleted", "meta.diff.header.from-file", "punctuation.definition.deleted"], + "settings": { + "background": "#86181d", + "foreground": "#fdaeb7" + } + }, + { + "scope": ["markup.inserted", "meta.diff.header.to-file", "punctuation.definition.inserted"], + "settings": { + "background": "#144620", + "foreground": "#85e89d" + } + }, + { + "scope": ["markup.changed", "punctuation.definition.changed"], + "settings": { + "background": "#c24e00", + "foreground": "#ffab70" + } + }, + { + "scope": ["markup.ignored", "markup.untracked"], + "settings": { + "foreground": "#2f363d", + "background": "#79b8ff" + } + }, + { + "scope": "meta.diff.range", + "settings": { + "foreground": "#b392f0", + "fontStyle": "bold" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#79b8ff" + } + }, + { + "scope": "meta.separator", + "settings": { + "fontStyle": "bold", + "foreground": "#79b8ff" + } + }, + { + "scope": "meta.output", + "settings": { + "foreground": "#79b8ff" + } + }, + { + "scope": [ + "brackethighlighter.tag", + "brackethighlighter.curly", + "brackethighlighter.round", + "brackethighlighter.square", + "brackethighlighter.angle", + "brackethighlighter.quote" + ], + "settings": { + "foreground": "#d1d5da" + } + }, + { + "scope": "brackethighlighter.unmatched", + "settings": { + "foreground": "#fdaeb7" + } + }, + { + "scope": ["constant.other.reference.link", "string.other.link"], + "settings": { + "foreground": "#dbedff", + "fontStyle": "underline" + } + } + ] +} diff --git a/src/lib/shiki/themes/github-light.json b/src/lib/shiki/themes/github-light.json new file mode 100644 index 0000000..55a548e --- /dev/null +++ b/src/lib/shiki/themes/github-light.json @@ -0,0 +1,497 @@ +{ + "name": "github-light", + "colors": { + "focusBorder": "#2188ff", + "foreground": "#444d56", + "descriptionForeground": "#6a737d", + "errorForeground": "#cb2431", + "textLink.foreground": "#0366d6", + "textLink.activeForeground": "#005cc5", + "textBlockQuote.background": "#fafbfc", + "textBlockQuote.border": "#e1e4e8", + "textCodeBlock.background": "#f6f8fa", + "textPreformat.foreground": "#586069", + "textSeparator.foreground": "#d1d5da", + "button.background": "#159739", + "button.foreground": "#fff", + "button.hoverBackground": "#138934", + "button.secondaryBackground": "#e1e4e8", + "button.secondaryForeground": "#1b1f23", + "button.secondaryHoverBackground": "#d1d5da", + "checkbox.background": "#fafbfc", + "checkbox.border": "#d1d5da", + "dropdown.background": "#fafbfc", + "dropdown.border": "#e1e4e8", + "dropdown.foreground": "#2f363d", + "dropdown.listBackground": "#fff", + "input.background": "#fafbfc", + "input.border": "#e1e4e8", + "input.foreground": "#2f363d", + "input.placeholderForeground": "#959da5", + "badge.foreground": "#005cc5", + "badge.background": "#dbedff", + "progressBar.background": "#2188ff", + "titleBar.activeForeground": "#2f363d", + "titleBar.activeBackground": "#fff", + "titleBar.inactiveForeground": "#6a737d", + "titleBar.inactiveBackground": "#f6f8fa", + "titleBar.border": "#e1e4e8", + "activityBar.foreground": "#2f363d", + "activityBar.inactiveForeground": "#959da5", + "activityBar.background": "#fff", + "activityBarBadge.foreground": "#fff", + "activityBarBadge.background": "#2188ff", + "activityBar.activeBorder": "#f9826c", + "activityBar.border": "#e1e4e8", + "sideBar.foreground": "#586069", + "sideBar.background": "#f6f8fa", + "sideBar.border": "#e1e4e8", + "sideBarTitle.foreground": "#2f363d", + "sideBarSectionHeader.foreground": "#2f363d", + "sideBarSectionHeader.background": "#f6f8fa", + "sideBarSectionHeader.border": "#e1e4e8", + "list.hoverForeground": "#2f363d", + "list.inactiveSelectionForeground": "#2f363d", + "list.activeSelectionForeground": "#2f363d", + "list.hoverBackground": "#ebf0f4", + "list.inactiveSelectionBackground": "#e8eaed", + "list.activeSelectionBackground": "#e2e5e9", + "list.inactiveFocusBackground": "#dbedff", + "list.focusBackground": "#cce5ff", + "tree.indentGuidesStroke": "#e1e4e8", + "notificationCenterHeader.foreground": "#6a737d", + "notificationCenterHeader.background": "#e1e4e8", + "notifications.foreground": "#2f363d", + "notifications.background": "#fafbfc", + "notifications.border": "#e1e4e8", + "notificationsErrorIcon.foreground": "#d73a49", + "notificationsWarningIcon.foreground": "#e36209", + "notificationsInfoIcon.foreground": "#005cc5", + "pickerGroup.border": "#e1e4e8", + "pickerGroup.foreground": "#2f363d", + "quickInput.background": "#fafbfc", + "quickInput.foreground": "#2f363d", + "statusBar.foreground": "#586069", + "statusBar.background": "#fff", + "statusBar.border": "#e1e4e8", + "statusBar.noFolderBackground": "#fff", + "statusBar.debuggingBackground": "#f9826c", + "statusBar.debuggingForeground": "#fff", + "statusBarItem.prominentBackground": "#e8eaed", + "statusBarItem.remoteForeground": "#586069", + "statusBarItem.remoteBackground": "#fff", + "editorGroupHeader.tabsBackground": "#f6f8fa", + "editorGroupHeader.tabsBorder": "#e1e4e8", + "editorGroup.border": "#e1e4e8", + "tab.activeForeground": "#2f363d", + "tab.inactiveForeground": "#6a737d", + "tab.inactiveBackground": "#f6f8fa", + "tab.activeBackground": "#fff", + "tab.hoverBackground": "#fff", + "tab.unfocusedHoverBackground": "#fff", + "tab.border": "#e1e4e8", + "tab.unfocusedActiveBorderTop": "#e1e4e8", + "tab.activeBorder": "#fff", + "tab.unfocusedActiveBorder": "#fff", + "tab.activeBorderTop": "#f9826c", + "breadcrumb.foreground": "#6a737d", + "breadcrumb.focusForeground": "#2f363d", + "breadcrumb.activeSelectionForeground": "#586069", + "breadcrumbPicker.background": "#fafbfc", + "editor.foreground": "#24292e", + "editor.background": "#fff", + "editorWidget.background": "#f6f8fa", + "editor.foldBackground": "#d1d5da11", + "editor.lineHighlightBackground": "#f6f8fa", + "editorLineNumber.foreground": "#1b1f234d", + "editorLineNumber.activeForeground": "#24292e", + "editorIndentGuide.background": "#eff2f6", + "editorIndentGuide.activeBackground": "#d7dbe0", + "editorWhitespace.foreground": "#d1d5da", + "editorCursor.foreground": "#044289", + "editorError.foreground": "#cb2431", + "editorWarning.foreground": "#f9c513", + "editor.findMatchBackground": "#ffdf5d", + "editor.findMatchHighlightBackground": "#ffdf5d66", + "editor.linkedEditingBackground": "#0366d611", + "editor.inactiveSelectionBackground": "#0366d611", + "editor.selectionBackground": "#0366d625", + "editor.selectionHighlightBackground": "#34d05840", + "editor.selectionHighlightBorder": "#34d05800", + "editor.wordHighlightBackground": "#34d05800", + "editor.wordHighlightStrongBackground": "#34d05800", + "editor.wordHighlightBorder": "#24943e99", + "editor.wordHighlightStrongBorder": "#24943e50", + "editorBracketMatch.background": "#34d05840", + "editorBracketMatch.border": "#34d05800", + "editorGutter.modifiedBackground": "#2188ff", + "editorGutter.addedBackground": "#28a745", + "editorGutter.deletedBackground": "#d73a49", + "diffEditor.insertedTextBackground": "#34d05822", + "diffEditor.removedTextBackground": "#d73a4922", + "scrollbar.shadow": "#6a737d33", + "scrollbarSlider.background": "#959da533", + "scrollbarSlider.hoverBackground": "#959da544", + "scrollbarSlider.activeBackground": "#959da588", + "editorOverviewRuler.border": "#fff", + "panel.background": "#f6f8fa", + "panel.border": "#e1e4e8", + "panelTitle.activeBorder": "#f9826c", + "panelTitle.activeForeground": "#2f363d", + "panelTitle.inactiveForeground": "#6a737d", + "panelInput.border": "#e1e4e8", + "terminal.foreground": "#586069", + "terminal.tab.activeBorder": "#f9826c", + "terminalCursor.background": "#d1d5da", + "terminalCursor.foreground": "#005cc5", + "terminal.ansiBrightWhite": "#d1d5da", + "terminal.ansiWhite": "#6a737d", + "terminal.ansiBrightBlack": "#959da5", + "terminal.ansiBlack": "#24292e", + "terminal.ansiBlue": "#0366d6", + "terminal.ansiBrightBlue": "#005cc5", + "terminal.ansiGreen": "#28a745", + "terminal.ansiBrightGreen": "#22863a", + "terminal.ansiCyan": "#1b7c83", + "terminal.ansiBrightCyan": "#3192aa", + "terminal.ansiRed": "#d73a49", + "terminal.ansiBrightRed": "#cb2431", + "terminal.ansiMagenta": "#5a32a3", + "terminal.ansiBrightMagenta": "#5a32a3", + "terminal.ansiYellow": "#dbab09", + "terminal.ansiBrightYellow": "#b08800", + "editorBracketHighlight.foreground1": "#005cc5", + "editorBracketHighlight.foreground2": "#e36209", + "editorBracketHighlight.foreground3": "#5a32a3", + "editorBracketHighlight.foreground4": "#005cc5", + "editorBracketHighlight.foreground5": "#e36209", + "editorBracketHighlight.foreground6": "#5a32a3", + "gitDecoration.addedResourceForeground": "#28a745", + "gitDecoration.modifiedResourceForeground": "#005cc5", + "gitDecoration.deletedResourceForeground": "#d73a49", + "gitDecoration.untrackedResourceForeground": "#28a745", + "gitDecoration.ignoredResourceForeground": "#959da5", + "gitDecoration.conflictingResourceForeground": "#e36209", + "gitDecoration.submoduleResourceForeground": "#959da5", + "debugToolBar.background": "#fff", + "editor.stackFrameHighlightBackground": "#ffd33d33", + "editor.focusedStackFrameHighlightBackground": "#28a74525", + "settings.headerForeground": "#2f363d", + "settings.modifiedItemIndicator": "#2188ff", + "welcomePage.buttonBackground": "#f6f8fa", + "welcomePage.buttonHoverBackground": "#e1e4e8" + }, + "semanticHighlighting": true, + "tokenColors": [ + { + "scope": ["comment", "punctuation.definition.comment", "string.comment"], + "settings": { + "foreground": "#6a737d" + } + }, + { + "scope": [ + "constant", + "entity.name.constant", + "variable.other.constant", + "variable.other.enummember", + "variable.language" + ], + "settings": { + "foreground": "#005cc5" + } + }, + { + "scope": ["entity", "entity.name"], + "settings": { + "foreground": "#6f42c1" + } + }, + { + "scope": "variable.parameter.function", + "settings": { + "foreground": "#24292e" + } + }, + { + "scope": "entity.name.tag", + "settings": { + "foreground": "#22863a" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#d73a49" + } + }, + { + "scope": ["storage", "storage.type"], + "settings": { + "foreground": "#d73a49" + } + }, + { + "scope": ["storage.modifier.package", "storage.modifier.import", "storage.type.java"], + "settings": { + "foreground": "#24292e" + } + }, + { + "scope": [ + "string", + "punctuation.definition.string", + "string punctuation.section.embedded source" + ], + "settings": { + "foreground": "#032f62" + } + }, + { + "scope": "support", + "settings": { + "foreground": "#005cc5" + } + }, + { + "scope": "meta.property-name", + "settings": { + "foreground": "#005cc5" + } + }, + { + "scope": "variable", + "settings": { + "foreground": "#e36209" + } + }, + { + "scope": "variable.other", + "settings": { + "foreground": "#24292e" + } + }, + { + "scope": "invalid.broken", + "settings": { + "fontStyle": "italic", + "foreground": "#b31d28" + } + }, + { + "scope": "invalid.deprecated", + "settings": { + "fontStyle": "italic", + "foreground": "#b31d28" + } + }, + { + "scope": "invalid.illegal", + "settings": { + "fontStyle": "italic", + "foreground": "#b31d28" + } + }, + { + "scope": "invalid.unimplemented", + "settings": { + "fontStyle": "italic", + "foreground": "#b31d28" + } + }, + { + "scope": "carriage-return", + "settings": { + "fontStyle": "italic underline", + "background": "#d73a49", + "foreground": "#fafbfc", + "content": "^M" + } + }, + { + "scope": "message.error", + "settings": { + "foreground": "#b31d28" + } + }, + { + "scope": "string variable", + "settings": { + "foreground": "#005cc5" + } + }, + { + "scope": ["source.regexp", "string.regexp"], + "settings": { + "foreground": "#032f62" + } + }, + { + "scope": [ + "string.regexp.character-class", + "string.regexp constant.character.escape", + "string.regexp source.ruby.embedded", + "string.regexp string.regexp.arbitrary-repitition" + ], + "settings": { + "foreground": "#032f62" + } + }, + { + "scope": "string.regexp constant.character.escape", + "settings": { + "fontStyle": "bold", + "foreground": "#22863a" + } + }, + { + "scope": "support.constant", + "settings": { + "foreground": "#005cc5" + } + }, + { + "scope": "support.variable", + "settings": { + "foreground": "#005cc5" + } + }, + { + "scope": "meta.module-reference", + "settings": { + "foreground": "#005cc5" + } + }, + { + "scope": "punctuation.definition.list.begin.markdown", + "settings": { + "foreground": "#e36209" + } + }, + { + "scope": ["markup.heading", "markup.heading entity.name"], + "settings": { + "fontStyle": "bold", + "foreground": "#005cc5" + } + }, + { + "scope": "markup.quote", + "settings": { + "foreground": "#22863a" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic", + "foreground": "#24292e" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#24292e" + } + }, + { + "scope": ["markup.underline"], + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": ["markup.strikethrough"], + "settings": { + "fontStyle": "strikethrough" + } + }, + { + "scope": "markup.inline.raw", + "settings": { + "foreground": "#005cc5" + } + }, + { + "scope": ["markup.deleted", "meta.diff.header.from-file", "punctuation.definition.deleted"], + "settings": { + "background": "#ffeef0", + "foreground": "#b31d28" + } + }, + { + "scope": ["markup.inserted", "meta.diff.header.to-file", "punctuation.definition.inserted"], + "settings": { + "background": "#f0fff4", + "foreground": "#22863a" + } + }, + { + "scope": ["markup.changed", "punctuation.definition.changed"], + "settings": { + "background": "#ffebda", + "foreground": "#e36209" + } + }, + { + "scope": ["markup.ignored", "markup.untracked"], + "settings": { + "foreground": "#f6f8fa", + "background": "#005cc5" + } + }, + { + "scope": "meta.diff.range", + "settings": { + "foreground": "#6f42c1", + "fontStyle": "bold" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#005cc5" + } + }, + { + "scope": "meta.separator", + "settings": { + "fontStyle": "bold", + "foreground": "#005cc5" + } + }, + { + "scope": "meta.output", + "settings": { + "foreground": "#005cc5" + } + }, + { + "scope": [ + "brackethighlighter.tag", + "brackethighlighter.curly", + "brackethighlighter.round", + "brackethighlighter.square", + "brackethighlighter.angle", + "brackethighlighter.quote" + ], + "settings": { + "foreground": "#586069" + } + }, + { + "scope": "brackethighlighter.unmatched", + "settings": { + "foreground": "#b31d28" + } + }, + { + "scope": ["constant.other.reference.link", "string.other.link"], + "settings": { + "foreground": "#032f62", + "fontStyle": "underline" + } + } + ] +} diff --git a/src/lib/shiki/themes/hc_light.json b/src/lib/shiki/themes/hc_light.json new file mode 100644 index 0000000..349e90f --- /dev/null +++ b/src/lib/shiki/themes/hc_light.json @@ -0,0 +1,566 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "hc_light", + "tokenColors": [ + { + "scope": ["meta.embedded", "source.groovy.embedded", "variable.legacy.builtin.python"], + "settings": { + "foreground": "#292929" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#062F4A" + } + }, + { + "scope": "comment", + "settings": { + "foreground": "#515151" + } + }, + { + "scope": "constant.language", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": [ + "constant.numeric", + "variable.other.enummember", + "keyword.operator.plus.exponent", + "keyword.operator.minus.exponent" + ], + "settings": { + "foreground": "#096d48" + } + }, + { + "scope": "constant.regexp", + "settings": { + "foreground": "#811F3F" + } + }, + { + "scope": "entity.name.tag", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "entity.name.selector", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#264F78" + } + }, + { + "scope": [ + "entity.other.attribute-name.class.css", + "entity.other.attribute-name.class.mixin.css", + "entity.other.attribute-name.id.css", + "entity.other.attribute-name.parent-selector.css", + "entity.other.attribute-name.pseudo-class.css", + "entity.other.attribute-name.pseudo-element.css", + "source.css.less entity.other.attribute-name.id", + "entity.other.attribute-name.scss" + ], + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "invalid", + "settings": { + "foreground": "#B5200D" + } + }, + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "markup.bold", + "settings": { + "foreground": "#000080", + "fontStyle": "bold" + } + }, + { + "scope": "markup.heading", + "settings": { + "foreground": "#0F4A85", + "fontStyle": "bold" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.strikethrough", + "settings": { + "fontStyle": "strikethrough" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#096d48" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#5A5A5A" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#0451A5" + } + }, + { + "scope": [ + "punctuation.definition.quote.begin.markdown", + "punctuation.definition.list.begin.markdown" + ], + "settings": { + "foreground": "#0451A5" + } + }, + { + "scope": "markup.inline.raw", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": ["meta.preprocessor", "entity.name.function.preprocessor"], + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#b5200d" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#096d48" + } + }, + { + "scope": "meta.structure.dictionary.key.python", + "settings": { + "foreground": "#0451A5" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "storage.type", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": ["storage.modifier", "keyword.operator.noexcept"], + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": ["string", "meta.embedded.assembly"], + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": [ + "string.comment.buffered.block.pug", + "string.quoted.pug", + "string.interpolated.pug", + "string.unquoted.plain.in.yaml", + "string.unquoted.plain.out.yaml", + "string.unquoted.block.yaml", + "string.quoted.single.yaml", + "string.quoted.double.xml", + "string.quoted.single.xml", + "string.unquoted.cdata.xml", + "string.quoted.double.html", + "string.quoted.single.html", + "string.unquoted.html", + "string.quoted.single.handlebars", + "string.quoted.double.handlebars" + ], + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#811F3F" + } + }, + { + "scope": [ + "punctuation.definition.template-expression.begin", + "punctuation.definition.template-expression.end", + "punctuation.section.embedded" + ], + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": ["meta.template.expression"], + "settings": { + "foreground": "#000000" + } + }, + { + "scope": [ + "support.constant.property-value", + "support.constant.font-name", + "support.constant.media-type", + "support.constant.media", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#0451A5" + } + }, + { + "scope": [ + "support.type.vendored.property-name", + "support.type.property-name", + "variable.css", + "variable.scss", + "variable.other.less", + "source.coffee.embedded" + ], + "settings": { + "foreground": "#264F78" + } + }, + { + "scope": ["support.type.property-name.json"], + "settings": { + "foreground": "#0451A5" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#000000" + } + }, + { + "scope": [ + "keyword.operator.new", + "keyword.operator.expression", + "keyword.operator.cast", + "keyword.operator.sizeof", + "keyword.operator.alignof", + "keyword.operator.typeid", + "keyword.operator.alignas", + "keyword.operator.instanceof", + "keyword.operator.logical.python", + "keyword.operator.wordlike" + ], + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#096d48" + } + }, + { + "scope": ["punctuation.section.embedded.begin.php", "punctuation.section.embedded.end.php"], + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#0451A5" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#096d48" + } + }, + { + "scope": [ + "storage.modifier.import.java", + "variable.language.wildcard.java", + "storage.modifier.package.java" + ], + "settings": { + "foreground": "#000000" + } + }, + { + "scope": "variable.language", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": [ + "entity.name.function", + "support.function", + "support.constant.handlebars", + "source.powershell variable.other.member", + "entity.name.operator.custom-literal" + ], + "settings": { + "foreground": "#5e2cbc" + } + }, + { + "scope": [ + "support.class", + "support.type", + "entity.name.type", + "entity.name.namespace", + "entity.other.attribute", + "entity.name.scope-resolution", + "entity.name.class", + "storage.type.numeric.go", + "storage.type.byte.go", + "storage.type.boolean.go", + "storage.type.string.go", + "storage.type.uintptr.go", + "storage.type.error.go", + "storage.type.rune.go", + "storage.type.cs", + "storage.type.generic.cs", + "storage.type.modifier.cs", + "storage.type.variable.cs", + "storage.type.annotation.java", + "storage.type.generic.java", + "storage.type.java", + "storage.type.object.array.java", + "storage.type.primitive.array.java", + "storage.type.primitive.java", + "storage.type.token.java", + "storage.type.groovy", + "storage.type.annotation.groovy", + "storage.type.parameters.groovy", + "storage.type.generic.groovy", + "storage.type.object.array.groovy", + "storage.type.primitive.array.groovy", + "storage.type.primitive.groovy" + ], + "settings": { + "foreground": "#185E73" + } + }, + { + "scope": [ + "meta.type.cast.expr", + "meta.type.new.expr", + "support.constant.math", + "support.constant.dom", + "support.constant.json", + "entity.other.inherited-class" + ], + "settings": { + "foreground": "#185E73" + } + }, + { + "scope": [ + "keyword.control", + "source.cpp keyword.operator.new", + "source.cpp keyword.operator.delete", + "keyword.other.using", + "keyword.other.operator", + "entity.name.operator" + ], + "settings": { + "foreground": "#b5200d" + } + }, + { + "scope": [ + "variable", + "meta.definition.variable.name", + "support.variable", + "entity.name.variable", + "constant.other.placeholder" + ], + "settings": { + "foreground": "#001080" + } + }, + { + "scope": ["variable.other.constant", "variable.other.enummember"], + "settings": { + "foreground": "#02715D" + } + }, + { + "scope": ["meta.object-literal.key"], + "settings": { + "foreground": "#001080" + } + }, + { + "scope": [ + "support.constant.property-value", + "support.constant.font-name", + "support.constant.media-type", + "support.constant.media", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#0451A5" + } + }, + { + "scope": [ + "punctuation.definition.group.regexp", + "punctuation.definition.group.assertion.regexp", + "punctuation.definition.character-class.regexp", + "punctuation.character.set.begin.regexp", + "punctuation.character.set.end.regexp", + "keyword.operator.negation.regexp", + "support.other.parenthesis.regexp" + ], + "settings": { + "foreground": "#D16969" + } + }, + { + "scope": [ + "constant.character.character-class.regexp", + "constant.other.character-class.set.regexp", + "constant.other.character-class.regexp", + "constant.character.set.regexp" + ], + "settings": { + "foreground": "#811F3F" + } + }, + { + "scope": "keyword.operator.quantifier.regexp", + "settings": { + "foreground": "#000000" + } + }, + { + "scope": ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"], + "settings": { + "foreground": "#EE0000" + } + }, + { + "scope": "constant.character", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "constant.character.escape", + "settings": { + "foreground": "#EE0000" + } + }, + { + "scope": "entity.name.label", + "settings": { + "foreground": "#000000" + } + }, + { + "scope": "token.info-token", + "settings": { + "foreground": "#316BCD" + } + }, + { + "scope": "token.warn-token", + "settings": { + "foreground": "#CD9731" + } + }, + { + "scope": "token.error-token", + "settings": { + "foreground": "#CD3131" + } + }, + { + "scope": "token.debug-token", + "settings": { + "foreground": "#800080" + } + } + ], + "colors": { + "actionBar.toggledBackground": "#dddddd" + } +} diff --git a/src/lib/shiki/themes/light-plus.json b/src/lib/shiki/themes/light-plus.json new file mode 100644 index 0000000..833b7f7 --- /dev/null +++ b/src/lib/shiki/themes/light-plus.json @@ -0,0 +1,603 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "light-plus", + "tokenColors": [ + { + "settings": { + "foreground": "#000000" + } + }, + { + "scope": [ + "meta.embedded", + "source.groovy.embedded", + "string meta.image.inline.markdown", + "variable.legacy.builtin.python" + ], + "settings": { + "foreground": "#000000ff" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#000080" + } + }, + { + "scope": "comment", + "settings": { + "foreground": "#008000" + } + }, + { + "scope": "constant.language", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": [ + "constant.numeric", + "variable.other.enummember", + "keyword.operator.plus.exponent", + "keyword.operator.minus.exponent" + ], + "settings": { + "foreground": "#098658" + } + }, + { + "scope": "constant.regexp", + "settings": { + "foreground": "#811f3f" + } + }, + { + "name": "css tags in selectors, xml tags", + "scope": "entity.name.tag", + "settings": { + "foreground": "#800000" + } + }, + { + "scope": "entity.name.selector", + "settings": { + "foreground": "#800000" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#e50000" + } + }, + { + "scope": [ + "entity.other.attribute-name.class.css", + "entity.other.attribute-name.class.mixin.css", + "entity.other.attribute-name.id.css", + "entity.other.attribute-name.parent-selector.css", + "entity.other.attribute-name.pseudo-class.css", + "entity.other.attribute-name.pseudo-element.css", + "source.css.less entity.other.attribute-name.id", + "entity.other.attribute-name.scss" + ], + "settings": { + "foreground": "#800000" + } + }, + { + "scope": "invalid", + "settings": { + "foreground": "#cd3131" + } + }, + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#000080" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#800000" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.strikethrough", + "settings": { + "fontStyle": "strikethrough" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#098658" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#a31515" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": [ + "punctuation.definition.quote.begin.markdown", + "punctuation.definition.list.begin.markdown" + ], + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": "markup.inline.raw", + "settings": { + "foreground": "#800000" + } + }, + { + "name": "brackets of XML/HTML tags", + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#800000" + } + }, + { + "scope": ["meta.preprocessor", "entity.name.function.preprocessor"], + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#a31515" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#098658" + } + }, + { + "scope": "meta.structure.dictionary.key.python", + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "storage.type", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": ["storage.modifier", "keyword.operator.noexcept"], + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": ["string", "meta.embedded.assembly"], + "settings": { + "foreground": "#a31515" + } + }, + { + "scope": [ + "string.comment.buffered.block.pug", + "string.quoted.pug", + "string.interpolated.pug", + "string.unquoted.plain.in.yaml", + "string.unquoted.plain.out.yaml", + "string.unquoted.block.yaml", + "string.quoted.single.yaml", + "string.quoted.double.xml", + "string.quoted.single.xml", + "string.unquoted.cdata.xml", + "string.quoted.double.html", + "string.quoted.single.html", + "string.unquoted.html", + "string.quoted.single.handlebars", + "string.quoted.double.handlebars" + ], + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#811f3f" + } + }, + { + "name": "String interpolation", + "scope": [ + "punctuation.definition.template-expression.begin", + "punctuation.definition.template-expression.end", + "punctuation.section.embedded" + ], + "settings": { + "foreground": "#0000ff" + } + }, + { + "name": "Reset JavaScript string interpolation expression", + "scope": ["meta.template.expression"], + "settings": { + "foreground": "#000000" + } + }, + { + "scope": [ + "support.constant.property-value", + "support.constant.font-name", + "support.constant.media-type", + "support.constant.media", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": [ + "support.type.vendored.property-name", + "support.type.property-name", + "variable.css", + "variable.scss", + "variable.other.less", + "source.coffee.embedded" + ], + "settings": { + "foreground": "#e50000" + } + }, + { + "scope": ["support.type.property-name.json"], + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#000000" + } + }, + { + "scope": [ + "keyword.operator.new", + "keyword.operator.expression", + "keyword.operator.cast", + "keyword.operator.sizeof", + "keyword.operator.alignof", + "keyword.operator.typeid", + "keyword.operator.alignas", + "keyword.operator.instanceof", + "keyword.operator.logical.python", + "keyword.operator.wordlike" + ], + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#098658" + } + }, + { + "scope": ["punctuation.section.embedded.begin.php", "punctuation.section.embedded.end.php"], + "settings": { + "foreground": "#800000" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#098658" + } + }, + { + "name": "coloring of the Java import and package identifiers", + "scope": [ + "storage.modifier.import.java", + "variable.language.wildcard.java", + "storage.modifier.package.java" + ], + "settings": { + "foreground": "#000000" + } + }, + { + "name": "this.self", + "scope": "variable.language", + "settings": { + "foreground": "#0000ff" + } + }, + { + "name": "Function declarations", + "scope": [ + "entity.name.function", + "support.function", + "support.constant.handlebars", + "source.powershell variable.other.member", + "entity.name.operator.custom-literal" + ], + "settings": { + "foreground": "#795E26" + } + }, + { + "name": "Types declaration and references", + "scope": [ + "support.class", + "support.type", + "entity.name.type", + "entity.name.namespace", + "entity.other.attribute", + "entity.name.scope-resolution", + "entity.name.class", + "storage.type.numeric.go", + "storage.type.byte.go", + "storage.type.boolean.go", + "storage.type.string.go", + "storage.type.uintptr.go", + "storage.type.error.go", + "storage.type.rune.go", + "storage.type.cs", + "storage.type.generic.cs", + "storage.type.modifier.cs", + "storage.type.variable.cs", + "storage.type.annotation.java", + "storage.type.generic.java", + "storage.type.java", + "storage.type.object.array.java", + "storage.type.primitive.array.java", + "storage.type.primitive.java", + "storage.type.token.java", + "storage.type.groovy", + "storage.type.annotation.groovy", + "storage.type.parameters.groovy", + "storage.type.generic.groovy", + "storage.type.object.array.groovy", + "storage.type.primitive.array.groovy", + "storage.type.primitive.groovy" + ], + "settings": { + "foreground": "#267f99" + } + }, + { + "name": "Types declaration and references, TS grammar specific", + "scope": [ + "meta.type.cast.expr", + "meta.type.new.expr", + "support.constant.math", + "support.constant.dom", + "support.constant.json", + "entity.other.inherited-class" + ], + "settings": { + "foreground": "#267f99" + } + }, + { + "name": "Control flow / Special keywords", + "scope": [ + "keyword.control", + "source.cpp keyword.operator.new", + "source.cpp keyword.operator.delete", + "keyword.other.using", + "keyword.other.operator", + "entity.name.operator" + ], + "settings": { + "foreground": "#AF00DB" + } + }, + { + "name": "Variable and parameter name", + "scope": [ + "variable", + "meta.definition.variable.name", + "support.variable", + "entity.name.variable", + "constant.other.placeholder" + ], + "settings": { + "foreground": "#001080" + } + }, + { + "name": "Constants and enums", + "scope": ["variable.other.constant", "variable.other.enummember"], + "settings": { + "foreground": "#0070C1" + } + }, + { + "name": "Object keys, TS grammar specific", + "scope": ["meta.object-literal.key"], + "settings": { + "foreground": "#001080" + } + }, + { + "name": "CSS property value", + "scope": [ + "support.constant.property-value", + "support.constant.font-name", + "support.constant.media-type", + "support.constant.media", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#0451a5" + } + }, + { + "name": "Regular expression groups", + "scope": [ + "punctuation.definition.group.regexp", + "punctuation.definition.group.assertion.regexp", + "punctuation.definition.character-class.regexp", + "punctuation.character.set.begin.regexp", + "punctuation.character.set.end.regexp", + "keyword.operator.negation.regexp", + "support.other.parenthesis.regexp" + ], + "settings": { + "foreground": "#d16969" + } + }, + { + "scope": [ + "constant.character.character-class.regexp", + "constant.other.character-class.set.regexp", + "constant.other.character-class.regexp", + "constant.character.set.regexp" + ], + "settings": { + "foreground": "#811f3f" + } + }, + { + "scope": "keyword.operator.quantifier.regexp", + "settings": { + "foreground": "#000000" + } + }, + { + "scope": ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"], + "settings": { + "foreground": "#EE0000" + } + }, + { + "scope": ["constant.character", "constant.other.option"], + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "constant.character.escape", + "settings": { + "foreground": "#EE0000" + } + }, + { + "scope": "entity.name.label", + "settings": { + "foreground": "#000000" + } + } + ], + "semanticHighlighting": true, + "semanticTokenColors": { + "newOperator": "#AF00DB", + "stringLiteral": "#a31515", + "customLiteral": "#795E26", + "numberLiteral": "#098658" + }, + "colors": { + "checkbox.border": "#919191", + "editor.background": "#FFFFFF", + "editor.foreground": "#000000", + "editor.inactiveSelectionBackground": "#E5EBF1", + "editorIndentGuide.background": "#D3D3D3", + "editorIndentGuide.activeBackground": "#939393", + "editor.selectionHighlightBackground": "#ADD6FF80", + "editorSuggestWidget.background": "#F3F3F3", + "activityBarBadge.background": "#007ACC", + "sideBarTitle.foreground": "#6F6F6F", + "list.hoverBackground": "#E8E8E8", + "menu.border": "#D4D4D4", + "input.placeholderForeground": "#767676", + "searchEditor.textInputBorder": "#CECECE", + "settings.textInputBorder": "#CECECE", + "settings.numberInputBorder": "#CECECE", + "statusBarItem.remoteForeground": "#FFF", + "statusBarItem.remoteBackground": "#16825D", + "ports.iconRunningProcessForeground": "#369432", + "sideBarSectionHeader.background": "#0000", + "sideBarSectionHeader.border": "#61616130", + "tab.lastPinnedBorder": "#61616130", + "notebook.cellBorderColor": "#E8E8E8", + "notebook.selectedCellBackground": "#c8ddf150", + "statusBarItem.errorBackground": "#c72e0f", + "list.activeSelectionIconForeground": "#FFF", + "list.focusAndSelectionOutline": "#90C2F9", + "terminal.inactiveSelectionBackground": "#E5EBF1", + "widget.border": "#d4d4d4", + "actionBar.toggledBackground": "#dddddd" + } +} diff --git a/src/lib/shiki/themes/material-theme-darker.json b/src/lib/shiki/themes/material-theme-darker.json new file mode 100644 index 0000000..16966b6 --- /dev/null +++ b/src/lib/shiki/themes/material-theme-darker.json @@ -0,0 +1,815 @@ +{ + "name": "material-theme-darker", + "semanticHighlighting": true, + "tokenColors": [ + { + "name": "Global settings", + "settings": { + "background": "#212121", + "foreground": "#EEFFFF" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "Punctuation", + "scope": "punctuation, constant.other.symbol", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "String Escape", + "scope": "constant.character.escape, text.html constant.character.entity.named", + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "Boolean", + "scope": "constant.language.boolean", + "settings": { + "foreground": "#ff9cac" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Variable", + "scope": "variable, variable.parameter, support.variable, variable.language, support.constant, meta.definition.variable entity.name.function, meta.function-call.arguments", + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "Other Keyword", + "scope": "keyword.other", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Keyword", + "scope": "keyword, modifier, variable.language.this, support.type.object, constant.language", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Function call", + "scope": "entity.name.function, support.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Storage", + "scope": "storage.type, storage.modifier, storage.control", + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "Modules", + "scope": "support.module, support.node", + "settings": { + "foreground": "#f07178", + "fontStyle": "italic" + } + }, + { + "name": "Type", + "scope": "support.type, constant.other.key", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "Type", + "scope": "entity.name.type, entity.other.inherited-class, entity.other", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "foreground": "#545454", + "fontStyle": "italic" + } + }, + { + "name": "Comment", + "scope": "comment punctuation.definition.comment, string.quoted.docstring", + "settings": { + "foreground": "#545454", + "fontStyle": "italic" + } + }, + { + "name": "Punctuation", + "scope": "punctuation", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Class", + "scope": "entity.name, entity.name.type.class, support.type, support.class, meta.use", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "Class variable", + "scope": "variable.object.property, meta.field.declaration entity.name.function", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Class method", + "scope": "meta.definition.method entity.name.function", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Function definition", + "scope": "meta.function entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Template expression", + "scope": "template.expression.begin, template.expression.end, punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Reset embedded/template expression colors", + "scope": "meta.embedded, source.groovy.embedded, meta.template.expression", + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "YAML key", + "scope": "entity.name.tag.yaml", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "JSON key", + "scope": "meta.object-literal.key, meta.object-literal.key string, support.type.property-name.json", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "JSON constant", + "scope": "constant.language.json", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "CSS class", + "scope": "entity.other.attribute-name.class", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "CSS ID", + "scope": "entity.other.attribute-name.id", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "CSS tag", + "scope": "source.css entity.name.tag", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "CSS properties", + "scope": "support.type.property-name.css", + "settings": { + "foreground": "#B2CCD6" + } + }, + { + "name": "HTML tag outer", + "scope": "meta.tag, punctuation.definition.tag", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "HTML tag inner", + "scope": "entity.name.tag", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "HTML tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "HTML entities", + "scope": "punctuation.definition.entity.html", + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "Markdown heading", + "scope": "markup.heading", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Markdown link text", + "scope": "text.html.markdown meta.link.inline, meta.link.reference", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Markdown list item", + "scope": "text.html.markdown beginning.punctuation.definition.list", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Markdown italic", + "scope": "markup.italic", + "settings": { + "foreground": "#f07178", + "fontStyle": "italic" + } + }, + { + "name": "Markdown bold", + "scope": "markup.bold", + "settings": { + "foreground": "#f07178", + "fontStyle": "bold" + } + }, + { + "name": "Markdown bold italic", + "scope": "markup.bold markup.italic, markup.italic markup.bold", + "settings": { + "foreground": "#f07178", + "fontStyle": "italic bold" + } + }, + { + "name": "Markdown code block", + "scope": "markup.fenced_code.block.markdown punctuation.definition.markdown", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "Markdown inline code", + "scope": "markup.inline.raw.string.markdown", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "INI property name", + "scope": "keyword.other.definition.ini", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "INI section title", + "scope": "entity.name.section.group-title.ini", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "C# class", + "scope": "source.cs meta.class.identifier storage.type", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "C# class method", + "scope": "source.cs meta.method.identifier entity.name.function", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "C# function call", + "scope": "source.cs meta.method-call meta.method, source.cs entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "C# type", + "scope": "source.cs storage.type", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "C# return type", + "scope": "source.cs meta.method.return-type", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "C# preprocessor", + "scope": "source.cs meta.preprocessor", + "settings": { + "foreground": "#545454" + } + }, + { + "name": "C# namespace", + "scope": "source.cs entity.name.type.namespace", + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "JSX Text", + "scope": "meta.jsx.children, SXNested", + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "JSX Components name", + "scope": "support.class.component", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "C-related Block Level Variables", + "scope": "source.cpp meta.block variable.other", + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "Member Access Meta", + "scope": "source.python meta.member.access.python", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Function Call", + "scope": "source.python meta.function-call.python, meta.function-call.arguments", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Blocks", + "scope": "meta.block", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Function Call", + "scope": "entity.name.function.call", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Namespaces", + "scope": "source.php support.other.namespace, source.php meta.use support.class", + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "Constant keywords", + "scope": "constant.keyword", + "settings": { + "foreground": "#89DDFF", + "fontStyle": "italic" + } + }, + { + "name": "Entity name", + "scope": "entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Global settings", + "settings": { + "background": "#212121", + "foreground": "#EEFFFF" + } + }, + { + "name": "Markup Deleted", + "scope": ["markup.deleted"], + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Markup Inserted", + "scope": ["markup.inserted"], + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "Markup Underline", + "scope": ["markup.underline"], + "settings": { + "fontStyle": "underline" + } + }, + { + "name": "Keyword Control", + "scope": ["keyword.control"], + "settings": { + "foreground": "#89DDFF", + "fontStyle": "italic" + } + }, + { + "name": "Parameter", + "scope": ["variable.parameter"], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "Python - Self Parameter", + "scope": ["variable.parameter.function.language.special.self.python"], + "settings": { + "foreground": "#f07178", + "fontStyle": "italic" + } + }, + { + "name": "Python - Format Placeholder", + "scope": ["constant.character.format.placeholder.other.python"], + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Markdown - Blockquote", + "scope": ["markup.quote"], + "settings": { + "fontStyle": "italic", + "foreground": "#89DDFF" + } + }, + { + "name": "Markdown - Fenced Language", + "scope": ["markup.fenced_code.block"], + "settings": { + "foreground": "#EEFFFF90" + } + }, + { + "name": "Markdown - Blockquote Punctuation", + "scope": ["punctuation.definition.quote"], + "settings": { + "foreground": "#ff9cac" + } + }, + { + "name": "JSON Key - Level 0", + "scope": ["meta.structure.dictionary.json support.type.property-name.json"], + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "JSON Key - Level 1", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "JSON Key - Level 2", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "JSON Key - Level 3", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "JSON Key - Level 4", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#916b53" + } + }, + { + "name": "JSON Key - Level 5", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "JSON Key - Level 6", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#ff9cac" + } + }, + { + "name": "JSON Key - Level 7", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "JSON Key - Level 8", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#C3E88D" + } + } + ], + "colors": { + "focusBorder": "#FFFFFF00", + "foreground": "#EEFFFF", + "button.background": "#61616150", + "button.foreground": "#ffffff", + "dropdown.background": "#212121", + "input.background": "#2B2B2B", + "inputOption.activeBorder": "#EEFFFF30", + "list.activeSelectionBackground": "#212121", + "list.activeSelectionForeground": "#80CBC4", + "list.dropBackground": "#f0717880", + "list.focusBackground": "#EEFFFF20", + "list.focusForeground": "#EEFFFF", + "list.highlightForeground": "#80CBC4", + "list.hoverBackground": "#212121", + "list.inactiveSelectionBackground": "#00000030", + "activityBar.background": "#212121", + "activityBar.dropBackground": "#f0717880", + "activityBarBadge.background": "#80CBC4", + "activityBarBadge.foreground": "#000000", + "badge.background": "#00000030", + "badge.foreground": "#545454", + "sideBar.background": "#212121", + "sideBarSectionHeader.background": "#212121", + "editorGroup.dropBackground": "#f0717880", + "editorGroup.focusedEmptyBorder": "#f07178", + "editorGroupHeader.tabsBackground": "#212121", + "tab.border": "#212121", + "tab.activeBorder": "#80CBC4", + "tab.inactiveBackground": "#212121", + "tab.activeModifiedBorder": "#616161", + "tab.inactiveModifiedBorder": "#904348", + "tab.unfocusedActiveModifiedBorder": "#c05a60", + "tab.unfocusedInactiveModifiedBorder": "#904348", + "editor.background": "#212121", + "editor.foreground": "#EEFFFF", + "editorLineNumber.foreground": "#424242", + "editorLineNumber.activeForeground": "#616161", + "editorCursor.foreground": "#FFCC00", + "editor.selectionBackground": "#61616150", + "editor.selectionHighlightBackground": "#FFCC0020", + "editor.wordHighlightBackground": "#ff9cac30", + "editor.wordHighlightStrongBackground": "#C3E88D30", + "editor.findMatchHighlight": "#EEFFFF", + "editor.findRangeHighlightBackground": "#FFCB6B30", + "editor.lineHighlightBorder": "#00000000", + "editor.rangeHighlightBackground": "#FFFFFF0d", + "editorWhitespace.foreground": "#EEFFFF40", + "editorWidget.background": "#212121", + "editorHoverWidget.background": "#212121", + "editorMarkerNavigation.background": "#EEFFFF05", + "peekView.border": "#00000030", + "peekViewEditor.background": "#EEFFFF05", + "peekViewResult.background": "#EEFFFF05", + "peekViewTitle.background": "#EEFFFF05", + "panel.background": "#212121", + "panel.border": "#21212160", + "panelTitle.activeBorder": "#80CBC4", + "panelTitle.inactiveForeground": "#EEFFFF", + "notebook.focusedCellBorder": "#80CBC4", + "notebook.inactiveFocusedCellBorder": "#80CBC450", + "statusBar.background": "#212121", + "statusBar.debuggingBackground": "#C792EA", + "statusBar.debuggingForeground": "#ffffff", + "statusBar.noFolderBackground": "#212121", + "statusBarItem.activeBackground": "#f0717880", + "statusBarItem.hoverBackground": "#54545420", + "statusBarItem.remoteBackground": "#80CBC4", + "statusBarItem.remoteForeground": "#000000", + "titleBar.activeBackground": "#212121", + "pickerGroup.border": "#FFFFFF1a", + "terminal.ansiBlack": "#000000", + "terminal.ansiBlue": "#82AAFF", + "terminal.ansiBrightBlack": "#545454", + "terminal.ansiBrightBlue": "#82AAFF", + "terminal.ansiBrightCyan": "#89DDFF", + "terminal.ansiBrightGreen": "#C3E88D", + "terminal.ansiBrightMagenta": "#C792EA", + "terminal.ansiBrightRed": "#f07178", + "terminal.ansiBrightWhite": "#ffffff", + "terminal.ansiBrightYellow": "#FFCB6B", + "terminal.ansiCyan": "#89DDFF", + "terminal.ansiGreen": "#C3E88D", + "terminal.ansiMagenta": "#C792EA", + "terminal.ansiRed": "#f07178", + "terminal.ansiWhite": "#ffffff", + "terminal.ansiYellow": "#FFCB6B", + "debugToolBar.background": "#212121", + "debugConsole.errorForeground": "#f07178", + "debugConsole.infoForeground": "#89DDFF", + "debugConsole.warningForeground": "#FFCB6B", + "selection.background": "#00000080", + "editorRuler.foreground": "#424242", + "widget.shadow": "#00000030", + "scrollbar.shadow": "#00000030", + "editorLink.activeForeground": "#EEFFFF", + "progressBar.background": "#80CBC4", + "pickerGroup.foreground": "#80CBC4", + "tree.indentGuidesStroke": "#424242", + "terminalCursor.foreground": "#FFCB6B", + "terminalCursor.background": "#000000", + "inputOption.activeBackground": "#EEFFFF30", + "textLink.foreground": "#80CBC4", + "textLink.activeForeground": "#EEFFFF", + "sideBar.foreground": "#616161", + "sideBar.border": "#21212160", + "sideBarTitle.foreground": "#EEFFFF", + "sideBarSectionHeader.border": "#21212160", + "panel.dropBackground": "#EEFFFF", + "sash.hoverBorder": "#80CBC450", + "panelTitle.activeForeground": "#FFFFFF", + "editor.lineHighlightBackground": "#00000050", + "editor.findMatchBackground": "#000000", + "editor.findMatchHighlightBackground": "#00000050", + "editor.findMatchBorder": "#80CBC4", + "editor.findMatchHighlightBorder": "#ffffff30", + "editorIndentGuide.background": "#42424270", + "editorIndentGuide.activeBackground": "#424242", + "editorGroup.border": "#00000030", + "editorGutter.modifiedBackground": "#82AAFF60", + "editorGutter.addedBackground": "#C3E88D60", + "editorGutter.deletedBackground": "#f0717860", + "activityBar.border": "#21212160", + "activityBar.foreground": "#EEFFFF", + "activityBar.activeBorder": "#80CBC4", + "extensionBadge.remoteForeground": "#EEFFFF", + "scrollbarSlider.background": "#EEFFFF20", + "scrollbarSlider.hoverBackground": "#EEFFFF10", + "scrollbarSlider.activeBackground": "#80CBC4", + "tab.unfocusedActiveBorder": "#545454", + "tab.activeForeground": "#FFFFFF", + "tab.inactiveForeground": "#616161", + "tab.activeBackground": "#212121", + "tab.unfocusedActiveForeground": "#EEFFFF", + "editorWidget.resizeBorder": "#80CBC4", + "editorWidget.border": "#80CBC4", + "statusBar.border": "#21212160", + "statusBar.foreground": "#616161", + "editorBracketMatch.border": "#FFCC0050", + "editorBracketMatch.background": "#212121", + "editorOverviewRuler.findMatchForeground": "#80CBC4", + "editorOverviewRuler.border": "#212121", + "editorOverviewRuler.errorForeground": "#f0717840", + "editorOverviewRuler.infoForeground": "#82AAFF40", + "editorOverviewRuler.warningForeground": "#FFCB6B40", + "editorInfo.foreground": "#82AAFF70", + "editorWarning.foreground": "#FFCB6B70", + "editorError.foreground": "#f0717870", + "editorHoverWidget.border": "#FFFFFF10", + "titleBar.activeForeground": "#EEFFFF", + "titleBar.inactiveBackground": "#212121", + "titleBar.inactiveForeground": "#616161", + "titleBar.border": "#21212160", + "input.foreground": "#EEFFFF", + "input.placeholderForeground": "#EEFFFF60", + "input.border": "#FFFFFF10", + "inputValidation.errorBorder": "#f07178", + "inputValidation.infoBorder": "#82AAFF", + "inputValidation.warningBorder": "#FFCB6B", + "dropdown.border": "#FFFFFF10", + "quickInput.background": "#212121", + "quickInput.foreground": "#616161", + "list.hoverForeground": "#FFFFFF", + "list.inactiveSelectionForeground": "#80CBC4", + "quickInput.list.focusBackground": "#EEFFFF20", + "editorSuggestWidget.background": "#212121", + "editorSuggestWidget.foreground": "#EEFFFF", + "editorSuggestWidget.highlightForeground": "#80CBC4", + "editorSuggestWidget.selectedBackground": "#00000050", + "editorSuggestWidget.border": "#FFFFFF10", + "diffEditor.insertedTextBackground": "#89DDFF20", + "diffEditor.removedTextBackground": "#ff9cac20", + "notifications.background": "#212121", + "notifications.foreground": "#EEFFFF", + "notificationLink.foreground": "#80CBC4", + "extensionButton.prominentBackground": "#C3E88D90", + "extensionButton.prominentHoverBackground": "#C3E88D", + "extensionButton.prominentForeground": "#EEFFFF", + "peekViewEditorGutter.background": "#EEFFFF05", + "peekViewTitleDescription.foreground": "#EEFFFF60", + "peekViewResult.matchHighlightBackground": "#61616150", + "peekViewEditor.matchHighlightBackground": "#61616150", + "peekViewResult.selectionBackground": "#61616170", + "gitDecoration.deletedResourceForeground": "#f0717890", + "gitDecoration.conflictingResourceForeground": "#FFCB6B90", + "gitDecoration.modifiedResourceForeground": "#82AAFF90", + "gitDecoration.untrackedResourceForeground": "#C3E88D90", + "gitDecoration.ignoredResourceForeground": "#61616190", + "breadcrumb.background": "#212121", + "breadcrumb.foreground": "#616161", + "breadcrumb.focusForeground": "#EEFFFF", + "breadcrumb.activeSelectionForeground": "#80CBC4", + "breadcrumbPicker.background": "#212121", + "menu.background": "#212121", + "menu.foreground": "#EEFFFF", + "menu.selectionBackground": "#00000050", + "menu.selectionForeground": "#80CBC4", + "menu.selectionBorder": "#00000030", + "menu.separatorBackground": "#EEFFFF", + "menubar.selectionBackground": "#00000030", + "menubar.selectionForeground": "#80CBC4", + "menubar.selectionBorder": "#00000030", + "settings.dropdownForeground": "#EEFFFF", + "settings.dropdownBackground": "#212121", + "settings.numberInputForeground": "#EEFFFF", + "settings.numberInputBackground": "#212121", + "settings.textInputForeground": "#EEFFFF", + "settings.textInputBackground": "#212121", + "settings.headerForeground": "#80CBC4", + "settings.modifiedItemIndicator": "#80CBC4", + "settings.checkboxBackground": "#212121", + "settings.checkboxForeground": "#EEFFFF", + "listFilterWidget.background": "#00000030", + "listFilterWidget.outline": "#00000030", + "listFilterWidget.noMatchesOutline": "#00000030" + } +} diff --git a/src/lib/shiki/themes/material-theme-lighter.json b/src/lib/shiki/themes/material-theme-lighter.json new file mode 100644 index 0000000..e168cc3 --- /dev/null +++ b/src/lib/shiki/themes/material-theme-lighter.json @@ -0,0 +1,815 @@ +{ + "name": "material-theme-lighter", + "semanticHighlighting": true, + "tokenColors": [ + { + "name": "Global settings", + "settings": { + "background": "#FAFAFA", + "foreground": "#90A4AE" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#91B859" + } + }, + { + "name": "Punctuation", + "scope": "punctuation, constant.other.symbol", + "settings": { + "foreground": "#39ADB5" + } + }, + { + "name": "String Escape", + "scope": "constant.character.escape, text.html constant.character.entity.named", + "settings": { + "foreground": "#90A4AE" + } + }, + { + "name": "Boolean", + "scope": "constant.language.boolean", + "settings": { + "foreground": "#FF5370" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "foreground": "#F76D47" + } + }, + { + "name": "Variable", + "scope": "variable, variable.parameter, support.variable, variable.language, support.constant, meta.definition.variable entity.name.function, meta.function-call.arguments", + "settings": { + "foreground": "#90A4AE" + } + }, + { + "name": "Other Keyword", + "scope": "keyword.other", + "settings": { + "foreground": "#F76D47" + } + }, + { + "name": "Keyword", + "scope": "keyword, modifier, variable.language.this, support.type.object, constant.language", + "settings": { + "foreground": "#39ADB5" + } + }, + { + "name": "Function call", + "scope": "entity.name.function, support.function", + "settings": { + "foreground": "#6182B8" + } + }, + { + "name": "Storage", + "scope": "storage.type, storage.modifier, storage.control", + "settings": { + "foreground": "#9C3EDA" + } + }, + { + "name": "Modules", + "scope": "support.module, support.node", + "settings": { + "foreground": "#E53935", + "fontStyle": "italic" + } + }, + { + "name": "Type", + "scope": "support.type, constant.other.key", + "settings": { + "foreground": "#E2931D" + } + }, + { + "name": "Type", + "scope": "entity.name.type, entity.other.inherited-class, entity.other", + "settings": { + "foreground": "#E2931D" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "foreground": "#90A4AE", + "fontStyle": "italic" + } + }, + { + "name": "Comment", + "scope": "comment punctuation.definition.comment, string.quoted.docstring", + "settings": { + "foreground": "#90A4AE", + "fontStyle": "italic" + } + }, + { + "name": "Punctuation", + "scope": "punctuation", + "settings": { + "foreground": "#39ADB5" + } + }, + { + "name": "Class", + "scope": "entity.name, entity.name.type.class, support.type, support.class, meta.use", + "settings": { + "foreground": "#E2931D" + } + }, + { + "name": "Class variable", + "scope": "variable.object.property, meta.field.declaration entity.name.function", + "settings": { + "foreground": "#E53935" + } + }, + { + "name": "Class method", + "scope": "meta.definition.method entity.name.function", + "settings": { + "foreground": "#E53935" + } + }, + { + "name": "Function definition", + "scope": "meta.function entity.name.function", + "settings": { + "foreground": "#6182B8" + } + }, + { + "name": "Template expression", + "scope": "template.expression.begin, template.expression.end, punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end", + "settings": { + "foreground": "#39ADB5" + } + }, + { + "name": "Reset embedded/template expression colors", + "scope": "meta.embedded, source.groovy.embedded, meta.template.expression", + "settings": { + "foreground": "#90A4AE" + } + }, + { + "name": "YAML key", + "scope": "entity.name.tag.yaml", + "settings": { + "foreground": "#E53935" + } + }, + { + "name": "JSON key", + "scope": "meta.object-literal.key, meta.object-literal.key string, support.type.property-name.json", + "settings": { + "foreground": "#E53935" + } + }, + { + "name": "JSON constant", + "scope": "constant.language.json", + "settings": { + "foreground": "#39ADB5" + } + }, + { + "name": "CSS class", + "scope": "entity.other.attribute-name.class", + "settings": { + "foreground": "#E2931D" + } + }, + { + "name": "CSS ID", + "scope": "entity.other.attribute-name.id", + "settings": { + "foreground": "#F76D47" + } + }, + { + "name": "CSS tag", + "scope": "source.css entity.name.tag", + "settings": { + "foreground": "#E2931D" + } + }, + { + "name": "CSS properties", + "scope": "support.type.property-name.css", + "settings": { + "foreground": "#8796B0" + } + }, + { + "name": "HTML tag outer", + "scope": "meta.tag, punctuation.definition.tag", + "settings": { + "foreground": "#39ADB5" + } + }, + { + "name": "HTML tag inner", + "scope": "entity.name.tag", + "settings": { + "foreground": "#E53935" + } + }, + { + "name": "HTML tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#9C3EDA" + } + }, + { + "name": "HTML entities", + "scope": "punctuation.definition.entity.html", + "settings": { + "foreground": "#90A4AE" + } + }, + { + "name": "Markdown heading", + "scope": "markup.heading", + "settings": { + "foreground": "#39ADB5" + } + }, + { + "name": "Markdown link text", + "scope": "text.html.markdown meta.link.inline, meta.link.reference", + "settings": { + "foreground": "#E53935" + } + }, + { + "name": "Markdown list item", + "scope": "text.html.markdown beginning.punctuation.definition.list", + "settings": { + "foreground": "#39ADB5" + } + }, + { + "name": "Markdown italic", + "scope": "markup.italic", + "settings": { + "foreground": "#E53935", + "fontStyle": "italic" + } + }, + { + "name": "Markdown bold", + "scope": "markup.bold", + "settings": { + "foreground": "#E53935", + "fontStyle": "bold" + } + }, + { + "name": "Markdown bold italic", + "scope": "markup.bold markup.italic, markup.italic markup.bold", + "settings": { + "foreground": "#E53935", + "fontStyle": "italic bold" + } + }, + { + "name": "Markdown code block", + "scope": "markup.fenced_code.block.markdown punctuation.definition.markdown", + "settings": { + "foreground": "#91B859" + } + }, + { + "name": "Markdown inline code", + "scope": "markup.inline.raw.string.markdown", + "settings": { + "foreground": "#91B859" + } + }, + { + "name": "INI property name", + "scope": "keyword.other.definition.ini", + "settings": { + "foreground": "#E53935" + } + }, + { + "name": "INI section title", + "scope": "entity.name.section.group-title.ini", + "settings": { + "foreground": "#39ADB5" + } + }, + { + "name": "C# class", + "scope": "source.cs meta.class.identifier storage.type", + "settings": { + "foreground": "#E2931D" + } + }, + { + "name": "C# class method", + "scope": "source.cs meta.method.identifier entity.name.function", + "settings": { + "foreground": "#E53935" + } + }, + { + "name": "C# function call", + "scope": "source.cs meta.method-call meta.method, source.cs entity.name.function", + "settings": { + "foreground": "#6182B8" + } + }, + { + "name": "C# type", + "scope": "source.cs storage.type", + "settings": { + "foreground": "#E2931D" + } + }, + { + "name": "C# return type", + "scope": "source.cs meta.method.return-type", + "settings": { + "foreground": "#E2931D" + } + }, + { + "name": "C# preprocessor", + "scope": "source.cs meta.preprocessor", + "settings": { + "foreground": "#90A4AE" + } + }, + { + "name": "C# namespace", + "scope": "source.cs entity.name.type.namespace", + "settings": { + "foreground": "#90A4AE" + } + }, + { + "name": "JSX Text", + "scope": "meta.jsx.children, SXNested", + "settings": { + "foreground": "#90A4AE" + } + }, + { + "name": "JSX Components name", + "scope": "support.class.component", + "settings": { + "foreground": "#E2931D" + } + }, + { + "name": "C-related Block Level Variables", + "scope": "source.cpp meta.block variable.other", + "settings": { + "foreground": "#90A4AE" + } + }, + { + "name": "Member Access Meta", + "scope": "source.python meta.member.access.python", + "settings": { + "foreground": "#E53935" + } + }, + { + "name": "Function Call", + "scope": "source.python meta.function-call.python, meta.function-call.arguments", + "settings": { + "foreground": "#6182B8" + } + }, + { + "name": "Blocks", + "scope": "meta.block", + "settings": { + "foreground": "#E53935" + } + }, + { + "name": "Function Call", + "scope": "entity.name.function.call", + "settings": { + "foreground": "#6182B8" + } + }, + { + "name": "Namespaces", + "scope": "source.php support.other.namespace, source.php meta.use support.class", + "settings": { + "foreground": "#90A4AE" + } + }, + { + "name": "Constant keywords", + "scope": "constant.keyword", + "settings": { + "foreground": "#39ADB5", + "fontStyle": "italic" + } + }, + { + "name": "Entity name", + "scope": "entity.name.function", + "settings": { + "foreground": "#6182B8" + } + }, + { + "name": "Global settings", + "settings": { + "background": "#FAFAFA", + "foreground": "#90A4AE" + } + }, + { + "name": "Markup Deleted", + "scope": ["markup.deleted"], + "settings": { + "foreground": "#E53935" + } + }, + { + "name": "Markup Inserted", + "scope": ["markup.inserted"], + "settings": { + "foreground": "#91B859" + } + }, + { + "name": "Markup Underline", + "scope": ["markup.underline"], + "settings": { + "fontStyle": "underline" + } + }, + { + "name": "Keyword Control", + "scope": ["keyword.control"], + "settings": { + "foreground": "#39ADB5", + "fontStyle": "italic" + } + }, + { + "name": "Parameter", + "scope": ["variable.parameter"], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "Python - Self Parameter", + "scope": ["variable.parameter.function.language.special.self.python"], + "settings": { + "foreground": "#E53935", + "fontStyle": "italic" + } + }, + { + "name": "Python - Format Placeholder", + "scope": ["constant.character.format.placeholder.other.python"], + "settings": { + "foreground": "#F76D47" + } + }, + { + "name": "Markdown - Blockquote", + "scope": ["markup.quote"], + "settings": { + "fontStyle": "italic", + "foreground": "#39ADB5" + } + }, + { + "name": "Markdown - Fenced Language", + "scope": ["markup.fenced_code.block"], + "settings": { + "foreground": "#90A4AE90" + } + }, + { + "name": "Markdown - Blockquote Punctuation", + "scope": ["punctuation.definition.quote"], + "settings": { + "foreground": "#FF5370" + } + }, + { + "name": "JSON Key - Level 0", + "scope": ["meta.structure.dictionary.json support.type.property-name.json"], + "settings": { + "foreground": "#9C3EDA" + } + }, + { + "name": "JSON Key - Level 1", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#E2931D" + } + }, + { + "name": "JSON Key - Level 2", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#F76D47" + } + }, + { + "name": "JSON Key - Level 3", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#E53935" + } + }, + { + "name": "JSON Key - Level 4", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#916b53" + } + }, + { + "name": "JSON Key - Level 5", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#6182B8" + } + }, + { + "name": "JSON Key - Level 6", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#FF5370" + } + }, + { + "name": "JSON Key - Level 7", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#9C3EDA" + } + }, + { + "name": "JSON Key - Level 8", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#91B859" + } + } + ], + "colors": { + "focusBorder": "#FFFFFF00", + "foreground": "#90A4AE", + "button.background": "#80CBC440", + "button.foreground": "#ffffff", + "dropdown.background": "#FAFAFA", + "input.background": "#EEEEEE", + "inputOption.activeBorder": "#90A4AE30", + "list.activeSelectionBackground": "#FAFAFA", + "list.activeSelectionForeground": "#80CBC4", + "list.dropBackground": "#E5393580", + "list.focusBackground": "#90A4AE20", + "list.focusForeground": "#90A4AE", + "list.highlightForeground": "#80CBC4", + "list.hoverBackground": "#FAFAFA", + "list.inactiveSelectionBackground": "#CCD7DA50", + "activityBar.background": "#FAFAFA", + "activityBar.dropBackground": "#E5393580", + "activityBarBadge.background": "#80CBC4", + "activityBarBadge.foreground": "#000000", + "badge.background": "#CCD7DA30", + "badge.foreground": "#90A4AE", + "sideBar.background": "#FAFAFA", + "sideBarSectionHeader.background": "#FAFAFA", + "editorGroup.dropBackground": "#E5393580", + "editorGroup.focusedEmptyBorder": "#E53935", + "editorGroupHeader.tabsBackground": "#FAFAFA", + "tab.border": "#FAFAFA", + "tab.activeBorder": "#80CBC4", + "tab.inactiveBackground": "#FAFAFA", + "tab.activeModifiedBorder": "#7E939E", + "tab.inactiveModifiedBorder": "#89221f", + "tab.unfocusedActiveModifiedBorder": "#b72d2a", + "tab.unfocusedInactiveModifiedBorder": "#89221f", + "editor.background": "#FAFAFA", + "editor.foreground": "#90A4AE", + "editorLineNumber.foreground": "#CFD8DC", + "editorLineNumber.activeForeground": "#7E939E", + "editorCursor.foreground": "#272727", + "editor.selectionBackground": "#80CBC440", + "editor.selectionHighlightBackground": "#27272720", + "editor.wordHighlightBackground": "#FF537030", + "editor.wordHighlightStrongBackground": "#91B85930", + "editor.findMatchHighlight": "#90A4AE", + "editor.findRangeHighlightBackground": "#E2931D30", + "editor.lineHighlightBorder": "#CCD7DA00", + "editor.rangeHighlightBackground": "#FFFFFF0d", + "editorWhitespace.foreground": "#90A4AE40", + "editorWidget.background": "#FAFAFA", + "editorHoverWidget.background": "#FAFAFA", + "editorMarkerNavigation.background": "#90A4AE05", + "peekView.border": "#00000020", + "peekViewEditor.background": "#90A4AE05", + "peekViewResult.background": "#90A4AE05", + "peekViewTitle.background": "#90A4AE05", + "panel.background": "#FAFAFA", + "panel.border": "#FAFAFA60", + "panelTitle.activeBorder": "#80CBC4", + "panelTitle.inactiveForeground": "#90A4AE", + "notebook.focusedCellBorder": "#80CBC4", + "notebook.inactiveFocusedCellBorder": "#80CBC450", + "statusBar.background": "#FAFAFA", + "statusBar.debuggingBackground": "#9C3EDA", + "statusBar.debuggingForeground": "#FFFFFF", + "statusBar.noFolderBackground": "#FAFAFA", + "statusBarItem.activeBackground": "#E5393580", + "statusBarItem.hoverBackground": "#90A4AE20", + "statusBarItem.remoteBackground": "#80CBC4", + "statusBarItem.remoteForeground": "#000000", + "titleBar.activeBackground": "#FAFAFA", + "pickerGroup.border": "#FFFFFF1a", + "terminal.ansiBlack": "#000000", + "terminal.ansiBlue": "#6182B8", + "terminal.ansiBrightBlack": "#90A4AE", + "terminal.ansiBrightBlue": "#6182B8", + "terminal.ansiBrightCyan": "#39ADB5", + "terminal.ansiBrightGreen": "#91B859", + "terminal.ansiBrightMagenta": "#9C3EDA", + "terminal.ansiBrightRed": "#E53935", + "terminal.ansiBrightWhite": "#FFFFFF", + "terminal.ansiBrightYellow": "#E2931D", + "terminal.ansiCyan": "#39ADB5", + "terminal.ansiGreen": "#91B859", + "terminal.ansiMagenta": "#9C3EDA", + "terminal.ansiRed": "#E53935", + "terminal.ansiWhite": "#FFFFFF", + "terminal.ansiYellow": "#E2931D", + "debugToolBar.background": "#FAFAFA", + "debugConsole.errorForeground": "#E53935", + "debugConsole.infoForeground": "#39ADB5", + "debugConsole.warningForeground": "#E2931D", + "selection.background": "#CCD7DA80", + "editorRuler.foreground": "#B0BEC5", + "widget.shadow": "#00000020", + "scrollbar.shadow": "#00000020", + "editorLink.activeForeground": "#90A4AE", + "progressBar.background": "#80CBC4", + "pickerGroup.foreground": "#80CBC4", + "tree.indentGuidesStroke": "#B0BEC5", + "terminalCursor.foreground": "#E2931D", + "terminalCursor.background": "#000000", + "inputOption.activeBackground": "#90A4AE30", + "textLink.foreground": "#80CBC4", + "textLink.activeForeground": "#90A4AE", + "sideBar.foreground": "#7E939E", + "sideBar.border": "#FAFAFA60", + "sideBarTitle.foreground": "#90A4AE", + "sideBarSectionHeader.border": "#FAFAFA60", + "panel.dropBackground": "#90A4AE", + "sash.hoverBorder": "#80CBC450", + "panelTitle.activeForeground": "#000000", + "editor.lineHighlightBackground": "#CCD7DA50", + "editor.findMatchBackground": "#00000020", + "editor.findMatchHighlightBackground": "#00000010", + "editor.findMatchBorder": "#80CBC4", + "editor.findMatchHighlightBorder": "#00000030", + "editorIndentGuide.background": "#B0BEC570", + "editorIndentGuide.activeBackground": "#B0BEC5", + "editorGroup.border": "#00000020", + "editorGutter.modifiedBackground": "#6182B860", + "editorGutter.addedBackground": "#91B85960", + "editorGutter.deletedBackground": "#E5393560", + "activityBar.border": "#FAFAFA60", + "activityBar.foreground": "#90A4AE", + "activityBar.activeBorder": "#80CBC4", + "extensionBadge.remoteForeground": "#90A4AE", + "scrollbarSlider.background": "#90A4AE20", + "scrollbarSlider.hoverBackground": "#90A4AE10", + "scrollbarSlider.activeBackground": "#80CBC4", + "tab.unfocusedActiveBorder": "#90A4AE", + "tab.activeForeground": "#000000", + "tab.inactiveForeground": "#7E939E", + "tab.activeBackground": "#FAFAFA", + "tab.unfocusedActiveForeground": "#90A4AE", + "editorWidget.resizeBorder": "#80CBC4", + "editorWidget.border": "#80CBC4", + "statusBar.border": "#FAFAFA60", + "statusBar.foreground": "#7E939E", + "editorBracketMatch.border": "#27272750", + "editorBracketMatch.background": "#FAFAFA", + "editorOverviewRuler.findMatchForeground": "#80CBC4", + "editorOverviewRuler.border": "#FAFAFA", + "editorOverviewRuler.errorForeground": "#E5393540", + "editorOverviewRuler.infoForeground": "#6182B840", + "editorOverviewRuler.warningForeground": "#E2931D40", + "editorInfo.foreground": "#6182B870", + "editorWarning.foreground": "#E2931D70", + "editorError.foreground": "#E5393570", + "editorHoverWidget.border": "#00000010", + "titleBar.activeForeground": "#90A4AE", + "titleBar.inactiveBackground": "#FAFAFA", + "titleBar.inactiveForeground": "#7E939E", + "titleBar.border": "#FAFAFA60", + "input.foreground": "#90A4AE", + "input.placeholderForeground": "#90A4AE60", + "input.border": "#00000010", + "inputValidation.errorBorder": "#E53935", + "inputValidation.infoBorder": "#6182B8", + "inputValidation.warningBorder": "#E2931D", + "dropdown.border": "#00000010", + "quickInput.background": "#FAFAFA", + "quickInput.foreground": "#7E939E", + "list.hoverForeground": "#B1C7D3", + "list.inactiveSelectionForeground": "#80CBC4", + "quickInput.list.focusBackground": "#90A4AE20", + "editorSuggestWidget.background": "#FAFAFA", + "editorSuggestWidget.foreground": "#90A4AE", + "editorSuggestWidget.highlightForeground": "#80CBC4", + "editorSuggestWidget.selectedBackground": "#CCD7DA50", + "editorSuggestWidget.border": "#00000010", + "diffEditor.insertedTextBackground": "#39ADB520", + "diffEditor.removedTextBackground": "#FF537020", + "notifications.background": "#FAFAFA", + "notifications.foreground": "#90A4AE", + "notificationLink.foreground": "#80CBC4", + "extensionButton.prominentBackground": "#91B85990", + "extensionButton.prominentHoverBackground": "#91B859", + "extensionButton.prominentForeground": "#90A4AE", + "peekViewEditorGutter.background": "#90A4AE05", + "peekViewTitleDescription.foreground": "#90A4AE60", + "peekViewResult.matchHighlightBackground": "#80CBC440", + "peekViewEditor.matchHighlightBackground": "#80CBC440", + "peekViewResult.selectionBackground": "#7E939E70", + "gitDecoration.deletedResourceForeground": "#E5393590", + "gitDecoration.conflictingResourceForeground": "#E2931D90", + "gitDecoration.modifiedResourceForeground": "#6182B890", + "gitDecoration.untrackedResourceForeground": "#91B85990", + "gitDecoration.ignoredResourceForeground": "#7E939E90", + "breadcrumb.background": "#FAFAFA", + "breadcrumb.foreground": "#7E939E", + "breadcrumb.focusForeground": "#90A4AE", + "breadcrumb.activeSelectionForeground": "#80CBC4", + "breadcrumbPicker.background": "#FAFAFA", + "menu.background": "#FAFAFA", + "menu.foreground": "#90A4AE", + "menu.selectionBackground": "#CCD7DA50", + "menu.selectionForeground": "#80CBC4", + "menu.selectionBorder": "#CCD7DA50", + "menu.separatorBackground": "#90A4AE", + "menubar.selectionBackground": "#CCD7DA50", + "menubar.selectionForeground": "#80CBC4", + "menubar.selectionBorder": "#CCD7DA50", + "settings.dropdownForeground": "#90A4AE", + "settings.dropdownBackground": "#FAFAFA", + "settings.numberInputForeground": "#90A4AE", + "settings.numberInputBackground": "#FAFAFA", + "settings.textInputForeground": "#90A4AE", + "settings.textInputBackground": "#FAFAFA", + "settings.headerForeground": "#80CBC4", + "settings.modifiedItemIndicator": "#80CBC4", + "settings.checkboxBackground": "#FAFAFA", + "settings.checkboxForeground": "#90A4AE", + "listFilterWidget.background": "#CCD7DA50", + "listFilterWidget.outline": "#CCD7DA50", + "listFilterWidget.noMatchesOutline": "#CCD7DA50" + } +} diff --git a/src/lib/shiki/themes/material-theme-ocean.json b/src/lib/shiki/themes/material-theme-ocean.json new file mode 100644 index 0000000..6c84a3b --- /dev/null +++ b/src/lib/shiki/themes/material-theme-ocean.json @@ -0,0 +1,815 @@ +{ + "name": "material-theme-ocean", + "semanticHighlighting": true, + "tokenColors": [ + { + "name": "Global settings", + "settings": { + "background": "#0F111A", + "foreground": "#babed8" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "Punctuation", + "scope": "punctuation, constant.other.symbol", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "String Escape", + "scope": "constant.character.escape, text.html constant.character.entity.named", + "settings": { + "foreground": "#babed8" + } + }, + { + "name": "Boolean", + "scope": "constant.language.boolean", + "settings": { + "foreground": "#ff9cac" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Variable", + "scope": "variable, variable.parameter, support.variable, variable.language, support.constant, meta.definition.variable entity.name.function, meta.function-call.arguments", + "settings": { + "foreground": "#babed8" + } + }, + { + "name": "Other Keyword", + "scope": "keyword.other", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Keyword", + "scope": "keyword, modifier, variable.language.this, support.type.object, constant.language", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Function call", + "scope": "entity.name.function, support.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Storage", + "scope": "storage.type, storage.modifier, storage.control", + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "Modules", + "scope": "support.module, support.node", + "settings": { + "foreground": "#f07178", + "fontStyle": "italic" + } + }, + { + "name": "Type", + "scope": "support.type, constant.other.key", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "Type", + "scope": "entity.name.type, entity.other.inherited-class, entity.other", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "foreground": "#464B5D", + "fontStyle": "italic" + } + }, + { + "name": "Comment", + "scope": "comment punctuation.definition.comment, string.quoted.docstring", + "settings": { + "foreground": "#464B5D", + "fontStyle": "italic" + } + }, + { + "name": "Punctuation", + "scope": "punctuation", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Class", + "scope": "entity.name, entity.name.type.class, support.type, support.class, meta.use", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "Class variable", + "scope": "variable.object.property, meta.field.declaration entity.name.function", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Class method", + "scope": "meta.definition.method entity.name.function", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Function definition", + "scope": "meta.function entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Template expression", + "scope": "template.expression.begin, template.expression.end, punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Reset embedded/template expression colors", + "scope": "meta.embedded, source.groovy.embedded, meta.template.expression", + "settings": { + "foreground": "#babed8" + } + }, + { + "name": "YAML key", + "scope": "entity.name.tag.yaml", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "JSON key", + "scope": "meta.object-literal.key, meta.object-literal.key string, support.type.property-name.json", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "JSON constant", + "scope": "constant.language.json", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "CSS class", + "scope": "entity.other.attribute-name.class", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "CSS ID", + "scope": "entity.other.attribute-name.id", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "CSS tag", + "scope": "source.css entity.name.tag", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "CSS properties", + "scope": "support.type.property-name.css", + "settings": { + "foreground": "#B2CCD6" + } + }, + { + "name": "HTML tag outer", + "scope": "meta.tag, punctuation.definition.tag", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "HTML tag inner", + "scope": "entity.name.tag", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "HTML tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "HTML entities", + "scope": "punctuation.definition.entity.html", + "settings": { + "foreground": "#babed8" + } + }, + { + "name": "Markdown heading", + "scope": "markup.heading", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Markdown link text", + "scope": "text.html.markdown meta.link.inline, meta.link.reference", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Markdown list item", + "scope": "text.html.markdown beginning.punctuation.definition.list", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Markdown italic", + "scope": "markup.italic", + "settings": { + "foreground": "#f07178", + "fontStyle": "italic" + } + }, + { + "name": "Markdown bold", + "scope": "markup.bold", + "settings": { + "foreground": "#f07178", + "fontStyle": "bold" + } + }, + { + "name": "Markdown bold italic", + "scope": "markup.bold markup.italic, markup.italic markup.bold", + "settings": { + "foreground": "#f07178", + "fontStyle": "italic bold" + } + }, + { + "name": "Markdown code block", + "scope": "markup.fenced_code.block.markdown punctuation.definition.markdown", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "Markdown inline code", + "scope": "markup.inline.raw.string.markdown", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "INI property name", + "scope": "keyword.other.definition.ini", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "INI section title", + "scope": "entity.name.section.group-title.ini", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "C# class", + "scope": "source.cs meta.class.identifier storage.type", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "C# class method", + "scope": "source.cs meta.method.identifier entity.name.function", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "C# function call", + "scope": "source.cs meta.method-call meta.method, source.cs entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "C# type", + "scope": "source.cs storage.type", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "C# return type", + "scope": "source.cs meta.method.return-type", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "C# preprocessor", + "scope": "source.cs meta.preprocessor", + "settings": { + "foreground": "#464B5D" + } + }, + { + "name": "C# namespace", + "scope": "source.cs entity.name.type.namespace", + "settings": { + "foreground": "#babed8" + } + }, + { + "name": "JSX Text", + "scope": "meta.jsx.children, SXNested", + "settings": { + "foreground": "#babed8" + } + }, + { + "name": "JSX Components name", + "scope": "support.class.component", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "C-related Block Level Variables", + "scope": "source.cpp meta.block variable.other", + "settings": { + "foreground": "#babed8" + } + }, + { + "name": "Member Access Meta", + "scope": "source.python meta.member.access.python", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Function Call", + "scope": "source.python meta.function-call.python, meta.function-call.arguments", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Blocks", + "scope": "meta.block", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Function Call", + "scope": "entity.name.function.call", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Namespaces", + "scope": "source.php support.other.namespace, source.php meta.use support.class", + "settings": { + "foreground": "#babed8" + } + }, + { + "name": "Constant keywords", + "scope": "constant.keyword", + "settings": { + "foreground": "#89DDFF", + "fontStyle": "italic" + } + }, + { + "name": "Entity name", + "scope": "entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Global settings", + "settings": { + "background": "#0F111A", + "foreground": "#babed8" + } + }, + { + "name": "Markup Deleted", + "scope": ["markup.deleted"], + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Markup Inserted", + "scope": ["markup.inserted"], + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "Markup Underline", + "scope": ["markup.underline"], + "settings": { + "fontStyle": "underline" + } + }, + { + "name": "Keyword Control", + "scope": ["keyword.control"], + "settings": { + "foreground": "#89DDFF", + "fontStyle": "italic" + } + }, + { + "name": "Parameter", + "scope": ["variable.parameter"], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "Python - Self Parameter", + "scope": ["variable.parameter.function.language.special.self.python"], + "settings": { + "foreground": "#f07178", + "fontStyle": "italic" + } + }, + { + "name": "Python - Format Placeholder", + "scope": ["constant.character.format.placeholder.other.python"], + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Markdown - Blockquote", + "scope": ["markup.quote"], + "settings": { + "fontStyle": "italic", + "foreground": "#89DDFF" + } + }, + { + "name": "Markdown - Fenced Language", + "scope": ["markup.fenced_code.block"], + "settings": { + "foreground": "#babed890" + } + }, + { + "name": "Markdown - Blockquote Punctuation", + "scope": ["punctuation.definition.quote"], + "settings": { + "foreground": "#ff9cac" + } + }, + { + "name": "JSON Key - Level 0", + "scope": ["meta.structure.dictionary.json support.type.property-name.json"], + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "JSON Key - Level 1", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "JSON Key - Level 2", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "JSON Key - Level 3", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "JSON Key - Level 4", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#916b53" + } + }, + { + "name": "JSON Key - Level 5", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "JSON Key - Level 6", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#ff9cac" + } + }, + { + "name": "JSON Key - Level 7", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "JSON Key - Level 8", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#C3E88D" + } + } + ], + "colors": { + "focusBorder": "#FFFFFF00", + "foreground": "#babed8", + "button.background": "#717CB450", + "button.foreground": "#ffffff", + "dropdown.background": "#0F111A", + "input.background": "#1A1C25", + "inputOption.activeBorder": "#babed830", + "list.activeSelectionBackground": "#0F111A", + "list.activeSelectionForeground": "#80CBC4", + "list.dropBackground": "#f0717880", + "list.focusBackground": "#babed820", + "list.focusForeground": "#babed8", + "list.highlightForeground": "#80CBC4", + "list.hoverBackground": "#0F111A", + "list.inactiveSelectionBackground": "#00000030", + "activityBar.background": "#0F111A", + "activityBar.dropBackground": "#f0717880", + "activityBarBadge.background": "#80CBC4", + "activityBarBadge.foreground": "#000000", + "badge.background": "#00000030", + "badge.foreground": "#464B5D", + "sideBar.background": "#0F111A", + "sideBarSectionHeader.background": "#0F111A", + "editorGroup.dropBackground": "#f0717880", + "editorGroup.focusedEmptyBorder": "#f07178", + "editorGroupHeader.tabsBackground": "#0F111A", + "tab.border": "#0F111A", + "tab.activeBorder": "#80CBC4", + "tab.inactiveBackground": "#0F111A", + "tab.activeModifiedBorder": "#525975", + "tab.inactiveModifiedBorder": "#904348", + "tab.unfocusedActiveModifiedBorder": "#c05a60", + "tab.unfocusedInactiveModifiedBorder": "#904348", + "editor.background": "#0F111A", + "editor.foreground": "#babed8", + "editorLineNumber.foreground": "#3B3F5180", + "editorLineNumber.activeForeground": "#525975", + "editorCursor.foreground": "#FFCC00", + "editor.selectionBackground": "#717CB450", + "editor.selectionHighlightBackground": "#FFCC0020", + "editor.wordHighlightBackground": "#ff9cac30", + "editor.wordHighlightStrongBackground": "#C3E88D30", + "editor.findMatchHighlight": "#babed8", + "editor.findRangeHighlightBackground": "#FFCB6B30", + "editor.lineHighlightBorder": "#00000000", + "editor.rangeHighlightBackground": "#FFFFFF0d", + "editorWhitespace.foreground": "#babed840", + "editorWidget.background": "#0F111A", + "editorHoverWidget.background": "#0F111A", + "editorMarkerNavigation.background": "#babed805", + "peekView.border": "#00000030", + "peekViewEditor.background": "#babed805", + "peekViewResult.background": "#babed805", + "peekViewTitle.background": "#babed805", + "panel.background": "#0F111A", + "panel.border": "#0F111A60", + "panelTitle.activeBorder": "#80CBC4", + "panelTitle.inactiveForeground": "#babed8", + "notebook.focusedCellBorder": "#80CBC4", + "notebook.inactiveFocusedCellBorder": "#80CBC450", + "statusBar.background": "#0F111A", + "statusBar.debuggingBackground": "#C792EA", + "statusBar.debuggingForeground": "#ffffff", + "statusBar.noFolderBackground": "#0F111A", + "statusBarItem.activeBackground": "#f0717880", + "statusBarItem.hoverBackground": "#464B5D20", + "statusBarItem.remoteBackground": "#80CBC4", + "statusBarItem.remoteForeground": "#000000", + "titleBar.activeBackground": "#0F111A", + "pickerGroup.border": "#FFFFFF1a", + "terminal.ansiBlack": "#000000", + "terminal.ansiBlue": "#82AAFF", + "terminal.ansiBrightBlack": "#464B5D", + "terminal.ansiBrightBlue": "#82AAFF", + "terminal.ansiBrightCyan": "#89DDFF", + "terminal.ansiBrightGreen": "#C3E88D", + "terminal.ansiBrightMagenta": "#C792EA", + "terminal.ansiBrightRed": "#f07178", + "terminal.ansiBrightWhite": "#ffffff", + "terminal.ansiBrightYellow": "#FFCB6B", + "terminal.ansiCyan": "#89DDFF", + "terminal.ansiGreen": "#C3E88D", + "terminal.ansiMagenta": "#C792EA", + "terminal.ansiRed": "#f07178", + "terminal.ansiWhite": "#ffffff", + "terminal.ansiYellow": "#FFCB6B", + "debugToolBar.background": "#0F111A", + "debugConsole.errorForeground": "#f07178", + "debugConsole.infoForeground": "#89DDFF", + "debugConsole.warningForeground": "#FFCB6B", + "selection.background": "#00000080", + "editorRuler.foreground": "#3B3F51", + "widget.shadow": "#00000030", + "scrollbar.shadow": "#00000030", + "editorLink.activeForeground": "#babed8", + "progressBar.background": "#80CBC4", + "pickerGroup.foreground": "#80CBC4", + "tree.indentGuidesStroke": "#3B3F51", + "terminalCursor.foreground": "#FFCB6B", + "terminalCursor.background": "#000000", + "inputOption.activeBackground": "#babed830", + "textLink.foreground": "#80CBC4", + "textLink.activeForeground": "#babed8", + "sideBar.foreground": "#525975", + "sideBar.border": "#0F111A60", + "sideBarTitle.foreground": "#babed8", + "sideBarSectionHeader.border": "#0F111A60", + "panel.dropBackground": "#babed8", + "sash.hoverBorder": "#80CBC450", + "panelTitle.activeForeground": "#FFFFFF", + "editor.lineHighlightBackground": "#00000050", + "editor.findMatchBackground": "#000000", + "editor.findMatchHighlightBackground": "#00000050", + "editor.findMatchBorder": "#80CBC4", + "editor.findMatchHighlightBorder": "#ffffff30", + "editorIndentGuide.background": "#3B3F5170", + "editorIndentGuide.activeBackground": "#3B3F51", + "editorGroup.border": "#00000030", + "editorGutter.modifiedBackground": "#82AAFF60", + "editorGutter.addedBackground": "#C3E88D60", + "editorGutter.deletedBackground": "#f0717860", + "activityBar.border": "#0F111A60", + "activityBar.foreground": "#babed8", + "activityBar.activeBorder": "#80CBC4", + "extensionBadge.remoteForeground": "#babed8", + "scrollbarSlider.background": "#8F93A220", + "scrollbarSlider.hoverBackground": "#8F93A210", + "scrollbarSlider.activeBackground": "#80CBC4", + "tab.unfocusedActiveBorder": "#464B5D", + "tab.activeForeground": "#FFFFFF", + "tab.inactiveForeground": "#525975", + "tab.activeBackground": "#0F111A", + "tab.unfocusedActiveForeground": "#babed8", + "editorWidget.resizeBorder": "#80CBC4", + "editorWidget.border": "#80CBC4", + "statusBar.border": "#0F111A60", + "statusBar.foreground": "#4B526D", + "editorBracketMatch.border": "#FFCC0050", + "editorBracketMatch.background": "#0F111A", + "editorOverviewRuler.findMatchForeground": "#80CBC4", + "editorOverviewRuler.border": "#0F111A", + "editorOverviewRuler.errorForeground": "#f0717840", + "editorOverviewRuler.infoForeground": "#82AAFF40", + "editorOverviewRuler.warningForeground": "#FFCB6B40", + "editorInfo.foreground": "#82AAFF70", + "editorWarning.foreground": "#FFCB6B70", + "editorError.foreground": "#f0717870", + "editorHoverWidget.border": "#FFFFFF10", + "titleBar.activeForeground": "#babed8", + "titleBar.inactiveBackground": "#0F111A", + "titleBar.inactiveForeground": "#525975", + "titleBar.border": "#0F111A60", + "input.foreground": "#babed8", + "input.placeholderForeground": "#babed860", + "input.border": "#FFFFFF10", + "inputValidation.errorBorder": "#f07178", + "inputValidation.infoBorder": "#82AAFF", + "inputValidation.warningBorder": "#FFCB6B", + "dropdown.border": "#FFFFFF10", + "quickInput.background": "#0F111A", + "quickInput.foreground": "#525975", + "list.hoverForeground": "#FFFFFF", + "list.inactiveSelectionForeground": "#80CBC4", + "quickInput.list.focusBackground": "#babed820", + "editorSuggestWidget.background": "#0F111A", + "editorSuggestWidget.foreground": "#babed8", + "editorSuggestWidget.highlightForeground": "#80CBC4", + "editorSuggestWidget.selectedBackground": "#00000050", + "editorSuggestWidget.border": "#FFFFFF10", + "diffEditor.insertedTextBackground": "#89DDFF20", + "diffEditor.removedTextBackground": "#ff9cac20", + "notifications.background": "#0F111A", + "notifications.foreground": "#babed8", + "notificationLink.foreground": "#80CBC4", + "extensionButton.prominentBackground": "#C3E88D90", + "extensionButton.prominentHoverBackground": "#C3E88D", + "extensionButton.prominentForeground": "#babed8", + "peekViewEditorGutter.background": "#babed805", + "peekViewTitleDescription.foreground": "#babed860", + "peekViewResult.matchHighlightBackground": "#717CB450", + "peekViewEditor.matchHighlightBackground": "#717CB450", + "peekViewResult.selectionBackground": "#52597570", + "gitDecoration.deletedResourceForeground": "#f0717890", + "gitDecoration.conflictingResourceForeground": "#FFCB6B90", + "gitDecoration.modifiedResourceForeground": "#82AAFF90", + "gitDecoration.untrackedResourceForeground": "#C3E88D90", + "gitDecoration.ignoredResourceForeground": "#52597590", + "breadcrumb.background": "#0F111A", + "breadcrumb.foreground": "#525975", + "breadcrumb.focusForeground": "#babed8", + "breadcrumb.activeSelectionForeground": "#80CBC4", + "breadcrumbPicker.background": "#0F111A", + "menu.background": "#0F111A", + "menu.foreground": "#babed8", + "menu.selectionBackground": "#00000050", + "menu.selectionForeground": "#80CBC4", + "menu.selectionBorder": "#00000030", + "menu.separatorBackground": "#babed8", + "menubar.selectionBackground": "#00000030", + "menubar.selectionForeground": "#80CBC4", + "menubar.selectionBorder": "#00000030", + "settings.dropdownForeground": "#babed8", + "settings.dropdownBackground": "#0F111A", + "settings.numberInputForeground": "#babed8", + "settings.numberInputBackground": "#0F111A", + "settings.textInputForeground": "#babed8", + "settings.textInputBackground": "#0F111A", + "settings.headerForeground": "#80CBC4", + "settings.modifiedItemIndicator": "#80CBC4", + "settings.checkboxBackground": "#0F111A", + "settings.checkboxForeground": "#babed8", + "listFilterWidget.background": "#00000030", + "listFilterWidget.outline": "#00000030", + "listFilterWidget.noMatchesOutline": "#00000030" + } +} diff --git a/src/lib/shiki/themes/material-theme-palenight.json b/src/lib/shiki/themes/material-theme-palenight.json new file mode 100644 index 0000000..49ba53b --- /dev/null +++ b/src/lib/shiki/themes/material-theme-palenight.json @@ -0,0 +1,815 @@ +{ + "name": "material-theme-palenight", + "semanticHighlighting": true, + "tokenColors": [ + { + "name": "Global settings", + "settings": { + "background": "#292D3E", + "foreground": "#babed8" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "Punctuation", + "scope": "punctuation, constant.other.symbol", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "String Escape", + "scope": "constant.character.escape, text.html constant.character.entity.named", + "settings": { + "foreground": "#babed8" + } + }, + { + "name": "Boolean", + "scope": "constant.language.boolean", + "settings": { + "foreground": "#ff9cac" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Variable", + "scope": "variable, variable.parameter, support.variable, variable.language, support.constant, meta.definition.variable entity.name.function, meta.function-call.arguments", + "settings": { + "foreground": "#babed8" + } + }, + { + "name": "Other Keyword", + "scope": "keyword.other", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Keyword", + "scope": "keyword, modifier, variable.language.this, support.type.object, constant.language", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Function call", + "scope": "entity.name.function, support.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Storage", + "scope": "storage.type, storage.modifier, storage.control", + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "Modules", + "scope": "support.module, support.node", + "settings": { + "foreground": "#f07178", + "fontStyle": "italic" + } + }, + { + "name": "Type", + "scope": "support.type, constant.other.key", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "Type", + "scope": "entity.name.type, entity.other.inherited-class, entity.other", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "foreground": "#676E95", + "fontStyle": "italic" + } + }, + { + "name": "Comment", + "scope": "comment punctuation.definition.comment, string.quoted.docstring", + "settings": { + "foreground": "#676E95", + "fontStyle": "italic" + } + }, + { + "name": "Punctuation", + "scope": "punctuation", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Class", + "scope": "entity.name, entity.name.type.class, support.type, support.class, meta.use", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "Class variable", + "scope": "variable.object.property, meta.field.declaration entity.name.function", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Class method", + "scope": "meta.definition.method entity.name.function", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Function definition", + "scope": "meta.function entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Template expression", + "scope": "template.expression.begin, template.expression.end, punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Reset embedded/template expression colors", + "scope": "meta.embedded, source.groovy.embedded, meta.template.expression", + "settings": { + "foreground": "#babed8" + } + }, + { + "name": "YAML key", + "scope": "entity.name.tag.yaml", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "JSON key", + "scope": "meta.object-literal.key, meta.object-literal.key string, support.type.property-name.json", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "JSON constant", + "scope": "constant.language.json", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "CSS class", + "scope": "entity.other.attribute-name.class", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "CSS ID", + "scope": "entity.other.attribute-name.id", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "CSS tag", + "scope": "source.css entity.name.tag", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "CSS properties", + "scope": "support.type.property-name.css", + "settings": { + "foreground": "#B2CCD6" + } + }, + { + "name": "HTML tag outer", + "scope": "meta.tag, punctuation.definition.tag", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "HTML tag inner", + "scope": "entity.name.tag", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "HTML tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "HTML entities", + "scope": "punctuation.definition.entity.html", + "settings": { + "foreground": "#babed8" + } + }, + { + "name": "Markdown heading", + "scope": "markup.heading", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Markdown link text", + "scope": "text.html.markdown meta.link.inline, meta.link.reference", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Markdown list item", + "scope": "text.html.markdown beginning.punctuation.definition.list", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Markdown italic", + "scope": "markup.italic", + "settings": { + "foreground": "#f07178", + "fontStyle": "italic" + } + }, + { + "name": "Markdown bold", + "scope": "markup.bold", + "settings": { + "foreground": "#f07178", + "fontStyle": "bold" + } + }, + { + "name": "Markdown bold italic", + "scope": "markup.bold markup.italic, markup.italic markup.bold", + "settings": { + "foreground": "#f07178", + "fontStyle": "italic bold" + } + }, + { + "name": "Markdown code block", + "scope": "markup.fenced_code.block.markdown punctuation.definition.markdown", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "Markdown inline code", + "scope": "markup.inline.raw.string.markdown", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "INI property name", + "scope": "keyword.other.definition.ini", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "INI section title", + "scope": "entity.name.section.group-title.ini", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "C# class", + "scope": "source.cs meta.class.identifier storage.type", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "C# class method", + "scope": "source.cs meta.method.identifier entity.name.function", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "C# function call", + "scope": "source.cs meta.method-call meta.method, source.cs entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "C# type", + "scope": "source.cs storage.type", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "C# return type", + "scope": "source.cs meta.method.return-type", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "C# preprocessor", + "scope": "source.cs meta.preprocessor", + "settings": { + "foreground": "#676E95" + } + }, + { + "name": "C# namespace", + "scope": "source.cs entity.name.type.namespace", + "settings": { + "foreground": "#babed8" + } + }, + { + "name": "JSX Text", + "scope": "meta.jsx.children, SXNested", + "settings": { + "foreground": "#babed8" + } + }, + { + "name": "JSX Components name", + "scope": "support.class.component", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "C-related Block Level Variables", + "scope": "source.cpp meta.block variable.other", + "settings": { + "foreground": "#babed8" + } + }, + { + "name": "Member Access Meta", + "scope": "source.python meta.member.access.python", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Function Call", + "scope": "source.python meta.function-call.python, meta.function-call.arguments", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Blocks", + "scope": "meta.block", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Function Call", + "scope": "entity.name.function.call", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Namespaces", + "scope": "source.php support.other.namespace, source.php meta.use support.class", + "settings": { + "foreground": "#babed8" + } + }, + { + "name": "Constant keywords", + "scope": "constant.keyword", + "settings": { + "foreground": "#89DDFF", + "fontStyle": "italic" + } + }, + { + "name": "Entity name", + "scope": "entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Global settings", + "settings": { + "background": "#292D3E", + "foreground": "#babed8" + } + }, + { + "name": "Markup Deleted", + "scope": ["markup.deleted"], + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Markup Inserted", + "scope": ["markup.inserted"], + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "Markup Underline", + "scope": ["markup.underline"], + "settings": { + "fontStyle": "underline" + } + }, + { + "name": "Keyword Control", + "scope": ["keyword.control"], + "settings": { + "foreground": "#89DDFF", + "fontStyle": "italic" + } + }, + { + "name": "Parameter", + "scope": ["variable.parameter"], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "Python - Self Parameter", + "scope": ["variable.parameter.function.language.special.self.python"], + "settings": { + "foreground": "#f07178", + "fontStyle": "italic" + } + }, + { + "name": "Python - Format Placeholder", + "scope": ["constant.character.format.placeholder.other.python"], + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Markdown - Blockquote", + "scope": ["markup.quote"], + "settings": { + "fontStyle": "italic", + "foreground": "#89DDFF" + } + }, + { + "name": "Markdown - Fenced Language", + "scope": ["markup.fenced_code.block"], + "settings": { + "foreground": "#babed890" + } + }, + { + "name": "Markdown - Blockquote Punctuation", + "scope": ["punctuation.definition.quote"], + "settings": { + "foreground": "#ff9cac" + } + }, + { + "name": "JSON Key - Level 0", + "scope": ["meta.structure.dictionary.json support.type.property-name.json"], + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "JSON Key - Level 1", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "JSON Key - Level 2", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "JSON Key - Level 3", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "JSON Key - Level 4", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#916b53" + } + }, + { + "name": "JSON Key - Level 5", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "JSON Key - Level 6", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#ff9cac" + } + }, + { + "name": "JSON Key - Level 7", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "JSON Key - Level 8", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#C3E88D" + } + } + ], + "colors": { + "focusBorder": "#FFFFFF00", + "foreground": "#babed8", + "button.background": "#717CB450", + "button.foreground": "#ffffff", + "dropdown.background": "#292D3E", + "input.background": "#333747", + "inputOption.activeBorder": "#babed830", + "list.activeSelectionBackground": "#292D3E", + "list.activeSelectionForeground": "#80CBC4", + "list.dropBackground": "#f0717880", + "list.focusBackground": "#babed820", + "list.focusForeground": "#babed8", + "list.highlightForeground": "#80CBC4", + "list.hoverBackground": "#292D3E", + "list.inactiveSelectionBackground": "#00000030", + "activityBar.background": "#292D3E", + "activityBar.dropBackground": "#f0717880", + "activityBarBadge.background": "#80CBC4", + "activityBarBadge.foreground": "#000000", + "badge.background": "#00000030", + "badge.foreground": "#676E95", + "sideBar.background": "#292D3E", + "sideBarSectionHeader.background": "#292D3E", + "editorGroup.dropBackground": "#f0717880", + "editorGroup.focusedEmptyBorder": "#f07178", + "editorGroupHeader.tabsBackground": "#292D3E", + "tab.border": "#292D3E", + "tab.activeBorder": "#80CBC4", + "tab.inactiveBackground": "#292D3E", + "tab.activeModifiedBorder": "#676E95", + "tab.inactiveModifiedBorder": "#904348", + "tab.unfocusedActiveModifiedBorder": "#c05a60", + "tab.unfocusedInactiveModifiedBorder": "#904348", + "editor.background": "#292D3E", + "editor.foreground": "#babed8", + "editorLineNumber.foreground": "#3A3F58", + "editorLineNumber.activeForeground": "#676E95", + "editorCursor.foreground": "#FFCC00", + "editor.selectionBackground": "#717CB450", + "editor.selectionHighlightBackground": "#FFCC0020", + "editor.wordHighlightBackground": "#ff9cac30", + "editor.wordHighlightStrongBackground": "#C3E88D30", + "editor.findMatchHighlight": "#babed8", + "editor.findRangeHighlightBackground": "#FFCB6B30", + "editor.lineHighlightBorder": "#00000000", + "editor.rangeHighlightBackground": "#FFFFFF0d", + "editorWhitespace.foreground": "#babed840", + "editorWidget.background": "#292D3E", + "editorHoverWidget.background": "#292D3E", + "editorMarkerNavigation.background": "#babed805", + "peekView.border": "#00000030", + "peekViewEditor.background": "#babed805", + "peekViewResult.background": "#babed805", + "peekViewTitle.background": "#babed805", + "panel.background": "#292D3E", + "panel.border": "#292D3E60", + "panelTitle.activeBorder": "#80CBC4", + "panelTitle.inactiveForeground": "#babed8", + "notebook.focusedCellBorder": "#80CBC4", + "notebook.inactiveFocusedCellBorder": "#80CBC450", + "statusBar.background": "#292D3E", + "statusBar.debuggingBackground": "#C792EA", + "statusBar.debuggingForeground": "#ffffff", + "statusBar.noFolderBackground": "#292D3E", + "statusBarItem.activeBackground": "#f0717880", + "statusBarItem.hoverBackground": "#676E9520", + "statusBarItem.remoteBackground": "#80CBC4", + "statusBarItem.remoteForeground": "#000000", + "titleBar.activeBackground": "#292D3E", + "pickerGroup.border": "#FFFFFF1a", + "terminal.ansiBlack": "#000000", + "terminal.ansiBlue": "#82AAFF", + "terminal.ansiBrightBlack": "#676E95", + "terminal.ansiBrightBlue": "#82AAFF", + "terminal.ansiBrightCyan": "#89DDFF", + "terminal.ansiBrightGreen": "#C3E88D", + "terminal.ansiBrightMagenta": "#C792EA", + "terminal.ansiBrightRed": "#f07178", + "terminal.ansiBrightWhite": "#ffffff", + "terminal.ansiBrightYellow": "#FFCB6B", + "terminal.ansiCyan": "#89DDFF", + "terminal.ansiGreen": "#C3E88D", + "terminal.ansiMagenta": "#C792EA", + "terminal.ansiRed": "#f07178", + "terminal.ansiWhite": "#ffffff", + "terminal.ansiYellow": "#FFCB6B", + "debugToolBar.background": "#292D3E", + "debugConsole.errorForeground": "#f07178", + "debugConsole.infoForeground": "#89DDFF", + "debugConsole.warningForeground": "#FFCB6B", + "selection.background": "#00000080", + "editorRuler.foreground": "#4E5579", + "widget.shadow": "#00000030", + "scrollbar.shadow": "#00000030", + "editorLink.activeForeground": "#babed8", + "progressBar.background": "#80CBC4", + "pickerGroup.foreground": "#80CBC4", + "tree.indentGuidesStroke": "#4E5579", + "terminalCursor.foreground": "#FFCB6B", + "terminalCursor.background": "#000000", + "inputOption.activeBackground": "#babed830", + "textLink.foreground": "#80CBC4", + "textLink.activeForeground": "#babed8", + "sideBar.foreground": "#676E95", + "sideBar.border": "#292D3E60", + "sideBarTitle.foreground": "#babed8", + "sideBarSectionHeader.border": "#292D3E60", + "panel.dropBackground": "#babed8", + "sash.hoverBorder": "#80CBC450", + "panelTitle.activeForeground": "#FFFFFF", + "editor.lineHighlightBackground": "#00000050", + "editor.findMatchBackground": "#000000", + "editor.findMatchHighlightBackground": "#00000050", + "editor.findMatchBorder": "#80CBC4", + "editor.findMatchHighlightBorder": "#ffffff30", + "editorIndentGuide.background": "#4E557970", + "editorIndentGuide.activeBackground": "#4E5579", + "editorGroup.border": "#00000030", + "editorGutter.modifiedBackground": "#82AAFF60", + "editorGutter.addedBackground": "#C3E88D60", + "editorGutter.deletedBackground": "#f0717860", + "activityBar.border": "#292D3E60", + "activityBar.foreground": "#babed8", + "activityBar.activeBorder": "#80CBC4", + "extensionBadge.remoteForeground": "#babed8", + "scrollbarSlider.background": "#A6ACCD20", + "scrollbarSlider.hoverBackground": "#A6ACCD10", + "scrollbarSlider.activeBackground": "#80CBC4", + "tab.unfocusedActiveBorder": "#676E95", + "tab.activeForeground": "#FFFFFF", + "tab.inactiveForeground": "#676E95", + "tab.activeBackground": "#292D3E", + "tab.unfocusedActiveForeground": "#babed8", + "editorWidget.resizeBorder": "#80CBC4", + "editorWidget.border": "#80CBC4", + "statusBar.border": "#292D3E60", + "statusBar.foreground": "#676E95", + "editorBracketMatch.border": "#FFCC0050", + "editorBracketMatch.background": "#292D3E", + "editorOverviewRuler.findMatchForeground": "#80CBC4", + "editorOverviewRuler.border": "#292D3E", + "editorOverviewRuler.errorForeground": "#f0717840", + "editorOverviewRuler.infoForeground": "#82AAFF40", + "editorOverviewRuler.warningForeground": "#FFCB6B40", + "editorInfo.foreground": "#82AAFF70", + "editorWarning.foreground": "#FFCB6B70", + "editorError.foreground": "#f0717870", + "editorHoverWidget.border": "#FFFFFF10", + "titleBar.activeForeground": "#babed8", + "titleBar.inactiveBackground": "#292D3E", + "titleBar.inactiveForeground": "#676E95", + "titleBar.border": "#292D3E60", + "input.foreground": "#babed8", + "input.placeholderForeground": "#babed860", + "input.border": "#FFFFFF10", + "inputValidation.errorBorder": "#f07178", + "inputValidation.infoBorder": "#82AAFF", + "inputValidation.warningBorder": "#FFCB6B", + "dropdown.border": "#FFFFFF10", + "quickInput.background": "#292D3E", + "quickInput.foreground": "#676E95", + "list.hoverForeground": "#FFFFFF", + "list.inactiveSelectionForeground": "#80CBC4", + "quickInput.list.focusBackground": "#babed820", + "editorSuggestWidget.background": "#292D3E", + "editorSuggestWidget.foreground": "#babed8", + "editorSuggestWidget.highlightForeground": "#80CBC4", + "editorSuggestWidget.selectedBackground": "#00000050", + "editorSuggestWidget.border": "#FFFFFF10", + "diffEditor.insertedTextBackground": "#89DDFF20", + "diffEditor.removedTextBackground": "#ff9cac20", + "notifications.background": "#292D3E", + "notifications.foreground": "#babed8", + "notificationLink.foreground": "#80CBC4", + "extensionButton.prominentBackground": "#C3E88D90", + "extensionButton.prominentHoverBackground": "#C3E88D", + "extensionButton.prominentForeground": "#babed8", + "peekViewEditorGutter.background": "#babed805", + "peekViewTitleDescription.foreground": "#babed860", + "peekViewResult.matchHighlightBackground": "#717CB450", + "peekViewEditor.matchHighlightBackground": "#717CB450", + "peekViewResult.selectionBackground": "#676E9570", + "gitDecoration.deletedResourceForeground": "#f0717890", + "gitDecoration.conflictingResourceForeground": "#FFCB6B90", + "gitDecoration.modifiedResourceForeground": "#82AAFF90", + "gitDecoration.untrackedResourceForeground": "#C3E88D90", + "gitDecoration.ignoredResourceForeground": "#676E9590", + "breadcrumb.background": "#292D3E", + "breadcrumb.foreground": "#676E95", + "breadcrumb.focusForeground": "#babed8", + "breadcrumb.activeSelectionForeground": "#80CBC4", + "breadcrumbPicker.background": "#292D3E", + "menu.background": "#292D3E", + "menu.foreground": "#babed8", + "menu.selectionBackground": "#00000050", + "menu.selectionForeground": "#80CBC4", + "menu.selectionBorder": "#00000030", + "menu.separatorBackground": "#babed8", + "menubar.selectionBackground": "#00000030", + "menubar.selectionForeground": "#80CBC4", + "menubar.selectionBorder": "#00000030", + "settings.dropdownForeground": "#babed8", + "settings.dropdownBackground": "#292D3E", + "settings.numberInputForeground": "#babed8", + "settings.numberInputBackground": "#292D3E", + "settings.textInputForeground": "#babed8", + "settings.textInputBackground": "#292D3E", + "settings.headerForeground": "#80CBC4", + "settings.modifiedItemIndicator": "#80CBC4", + "settings.checkboxBackground": "#292D3E", + "settings.checkboxForeground": "#babed8", + "listFilterWidget.background": "#00000030", + "listFilterWidget.outline": "#00000030", + "listFilterWidget.noMatchesOutline": "#00000030" + } +} diff --git a/src/lib/shiki/themes/material-theme.json b/src/lib/shiki/themes/material-theme.json new file mode 100644 index 0000000..57f2ec5 --- /dev/null +++ b/src/lib/shiki/themes/material-theme.json @@ -0,0 +1,815 @@ +{ + "name": "material-theme", + "semanticHighlighting": true, + "tokenColors": [ + { + "name": "Global settings", + "settings": { + "background": "#263238", + "foreground": "#EEFFFF" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "Punctuation", + "scope": "punctuation, constant.other.symbol", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "String Escape", + "scope": "constant.character.escape, text.html constant.character.entity.named", + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "Boolean", + "scope": "constant.language.boolean", + "settings": { + "foreground": "#ff9cac" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Variable", + "scope": "variable, variable.parameter, support.variable, variable.language, support.constant, meta.definition.variable entity.name.function, meta.function-call.arguments", + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "Other Keyword", + "scope": "keyword.other", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Keyword", + "scope": "keyword, modifier, variable.language.this, support.type.object, constant.language", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Function call", + "scope": "entity.name.function, support.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Storage", + "scope": "storage.type, storage.modifier, storage.control", + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "Modules", + "scope": "support.module, support.node", + "settings": { + "foreground": "#f07178", + "fontStyle": "italic" + } + }, + { + "name": "Type", + "scope": "support.type, constant.other.key", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "Type", + "scope": "entity.name.type, entity.other.inherited-class, entity.other", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "foreground": "#546E7A", + "fontStyle": "italic" + } + }, + { + "name": "Comment", + "scope": "comment punctuation.definition.comment, string.quoted.docstring", + "settings": { + "foreground": "#546E7A", + "fontStyle": "italic" + } + }, + { + "name": "Punctuation", + "scope": "punctuation", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Class", + "scope": "entity.name, entity.name.type.class, support.type, support.class, meta.use", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "Class variable", + "scope": "variable.object.property, meta.field.declaration entity.name.function", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Class method", + "scope": "meta.definition.method entity.name.function", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Function definition", + "scope": "meta.function entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Template expression", + "scope": "template.expression.begin, template.expression.end, punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Reset embedded/template expression colors", + "scope": "meta.embedded, source.groovy.embedded, meta.template.expression", + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "YAML key", + "scope": "entity.name.tag.yaml", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "JSON key", + "scope": "meta.object-literal.key, meta.object-literal.key string, support.type.property-name.json", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "JSON constant", + "scope": "constant.language.json", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "CSS class", + "scope": "entity.other.attribute-name.class", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "CSS ID", + "scope": "entity.other.attribute-name.id", + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "CSS tag", + "scope": "source.css entity.name.tag", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "CSS properties", + "scope": "support.type.property-name.css", + "settings": { + "foreground": "#B2CCD6" + } + }, + { + "name": "HTML tag outer", + "scope": "meta.tag, punctuation.definition.tag", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "HTML tag inner", + "scope": "entity.name.tag", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "HTML tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "HTML entities", + "scope": "punctuation.definition.entity.html", + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "Markdown heading", + "scope": "markup.heading", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Markdown link text", + "scope": "text.html.markdown meta.link.inline, meta.link.reference", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Markdown list item", + "scope": "text.html.markdown beginning.punctuation.definition.list", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Markdown italic", + "scope": "markup.italic", + "settings": { + "foreground": "#f07178", + "fontStyle": "italic" + } + }, + { + "name": "Markdown bold", + "scope": "markup.bold", + "settings": { + "foreground": "#f07178", + "fontStyle": "bold" + } + }, + { + "name": "Markdown bold italic", + "scope": "markup.bold markup.italic, markup.italic markup.bold", + "settings": { + "foreground": "#f07178", + "fontStyle": "italic bold" + } + }, + { + "name": "Markdown code block", + "scope": "markup.fenced_code.block.markdown punctuation.definition.markdown", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "Markdown inline code", + "scope": "markup.inline.raw.string.markdown", + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "INI property name", + "scope": "keyword.other.definition.ini", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "INI section title", + "scope": "entity.name.section.group-title.ini", + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "C# class", + "scope": "source.cs meta.class.identifier storage.type", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "C# class method", + "scope": "source.cs meta.method.identifier entity.name.function", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "C# function call", + "scope": "source.cs meta.method-call meta.method, source.cs entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "C# type", + "scope": "source.cs storage.type", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "C# return type", + "scope": "source.cs meta.method.return-type", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "C# preprocessor", + "scope": "source.cs meta.preprocessor", + "settings": { + "foreground": "#546E7A" + } + }, + { + "name": "C# namespace", + "scope": "source.cs entity.name.type.namespace", + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "JSX Text", + "scope": "meta.jsx.children, SXNested", + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "JSX Components name", + "scope": "support.class.component", + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "C-related Block Level Variables", + "scope": "source.cpp meta.block variable.other", + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "Member Access Meta", + "scope": "source.python meta.member.access.python", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Function Call", + "scope": "source.python meta.function-call.python, meta.function-call.arguments", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Blocks", + "scope": "meta.block", + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Function Call", + "scope": "entity.name.function.call", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Namespaces", + "scope": "source.php support.other.namespace, source.php meta.use support.class", + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "Constant keywords", + "scope": "constant.keyword", + "settings": { + "foreground": "#89DDFF", + "fontStyle": "italic" + } + }, + { + "name": "Entity name", + "scope": "entity.name.function", + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Global settings", + "settings": { + "background": "#263238", + "foreground": "#EEFFFF" + } + }, + { + "name": "Markup Deleted", + "scope": ["markup.deleted"], + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "Markup Inserted", + "scope": ["markup.inserted"], + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "Markup Underline", + "scope": ["markup.underline"], + "settings": { + "fontStyle": "underline" + } + }, + { + "name": "Keyword Control", + "scope": ["keyword.control"], + "settings": { + "foreground": "#89DDFF", + "fontStyle": "italic" + } + }, + { + "name": "Parameter", + "scope": ["variable.parameter"], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "Python - Self Parameter", + "scope": ["variable.parameter.function.language.special.self.python"], + "settings": { + "foreground": "#f07178", + "fontStyle": "italic" + } + }, + { + "name": "Python - Format Placeholder", + "scope": ["constant.character.format.placeholder.other.python"], + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "Markdown - Blockquote", + "scope": ["markup.quote"], + "settings": { + "fontStyle": "italic", + "foreground": "#89DDFF" + } + }, + { + "name": "Markdown - Fenced Language", + "scope": ["markup.fenced_code.block"], + "settings": { + "foreground": "#EEFFFF90" + } + }, + { + "name": "Markdown - Blockquote Punctuation", + "scope": ["punctuation.definition.quote"], + "settings": { + "foreground": "#ff9cac" + } + }, + { + "name": "JSON Key - Level 0", + "scope": ["meta.structure.dictionary.json support.type.property-name.json"], + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "JSON Key - Level 1", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "JSON Key - Level 2", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#F78C6C" + } + }, + { + "name": "JSON Key - Level 3", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "JSON Key - Level 4", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#916b53" + } + }, + { + "name": "JSON Key - Level 5", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "JSON Key - Level 6", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#ff9cac" + } + }, + { + "name": "JSON Key - Level 7", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "JSON Key - Level 8", + "scope": [ + "meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#C3E88D" + } + } + ], + "colors": { + "focusBorder": "#FFFFFF00", + "foreground": "#EEFFFF", + "button.background": "#80CBC420", + "button.foreground": "#ffffff", + "dropdown.background": "#263238", + "input.background": "#303C41", + "inputOption.activeBorder": "#EEFFFF30", + "list.activeSelectionBackground": "#263238", + "list.activeSelectionForeground": "#80CBC4", + "list.dropBackground": "#f0717880", + "list.focusBackground": "#EEFFFF20", + "list.focusForeground": "#EEFFFF", + "list.highlightForeground": "#80CBC4", + "list.hoverBackground": "#263238", + "list.inactiveSelectionBackground": "#00000030", + "activityBar.background": "#263238", + "activityBar.dropBackground": "#f0717880", + "activityBarBadge.background": "#80CBC4", + "activityBarBadge.foreground": "#000000", + "badge.background": "#00000030", + "badge.foreground": "#546E7A", + "sideBar.background": "#263238", + "sideBarSectionHeader.background": "#263238", + "editorGroup.dropBackground": "#f0717880", + "editorGroup.focusedEmptyBorder": "#f07178", + "editorGroupHeader.tabsBackground": "#263238", + "tab.border": "#263238", + "tab.activeBorder": "#80CBC4", + "tab.inactiveBackground": "#263238", + "tab.activeModifiedBorder": "#607a86", + "tab.inactiveModifiedBorder": "#904348", + "tab.unfocusedActiveModifiedBorder": "#c05a60", + "tab.unfocusedInactiveModifiedBorder": "#904348", + "editor.background": "#263238", + "editor.foreground": "#EEFFFF", + "editorLineNumber.foreground": "#465A64", + "editorLineNumber.activeForeground": "#607a86", + "editorCursor.foreground": "#FFCC00", + "editor.selectionBackground": "#80CBC420", + "editor.selectionHighlightBackground": "#FFCC0020", + "editor.wordHighlightBackground": "#ff9cac30", + "editor.wordHighlightStrongBackground": "#C3E88D30", + "editor.findMatchHighlight": "#EEFFFF", + "editor.findRangeHighlightBackground": "#FFCB6B30", + "editor.lineHighlightBorder": "#00000000", + "editor.rangeHighlightBackground": "#FFFFFF0d", + "editorWhitespace.foreground": "#EEFFFF40", + "editorWidget.background": "#263238", + "editorHoverWidget.background": "#263238", + "editorMarkerNavigation.background": "#EEFFFF05", + "peekView.border": "#00000030", + "peekViewEditor.background": "#EEFFFF05", + "peekViewResult.background": "#EEFFFF05", + "peekViewTitle.background": "#EEFFFF05", + "panel.background": "#263238", + "panel.border": "#26323860", + "panelTitle.activeBorder": "#80CBC4", + "panelTitle.inactiveForeground": "#EEFFFF", + "notebook.focusedCellBorder": "#80CBC4", + "notebook.inactiveFocusedCellBorder": "#80CBC450", + "statusBar.background": "#263238", + "statusBar.debuggingBackground": "#C792EA", + "statusBar.debuggingForeground": "#ffffff", + "statusBar.noFolderBackground": "#263238", + "statusBarItem.activeBackground": "#f0717880", + "statusBarItem.hoverBackground": "#546E7A20", + "statusBarItem.remoteBackground": "#80CBC4", + "statusBarItem.remoteForeground": "#000000", + "titleBar.activeBackground": "#263238", + "pickerGroup.border": "#FFFFFF1a", + "terminal.ansiBlack": "#000000", + "terminal.ansiBlue": "#82AAFF", + "terminal.ansiBrightBlack": "#546E7A", + "terminal.ansiBrightBlue": "#82AAFF", + "terminal.ansiBrightCyan": "#89DDFF", + "terminal.ansiBrightGreen": "#C3E88D", + "terminal.ansiBrightMagenta": "#C792EA", + "terminal.ansiBrightRed": "#f07178", + "terminal.ansiBrightWhite": "#ffffff", + "terminal.ansiBrightYellow": "#FFCB6B", + "terminal.ansiCyan": "#89DDFF", + "terminal.ansiGreen": "#C3E88D", + "terminal.ansiMagenta": "#C792EA", + "terminal.ansiRed": "#f07178", + "terminal.ansiWhite": "#ffffff", + "terminal.ansiYellow": "#FFCB6B", + "debugToolBar.background": "#263238", + "debugConsole.errorForeground": "#f07178", + "debugConsole.infoForeground": "#89DDFF", + "debugConsole.warningForeground": "#FFCB6B", + "selection.background": "#00000080", + "editorRuler.foreground": "#37474F", + "widget.shadow": "#00000030", + "scrollbar.shadow": "#00000030", + "editorLink.activeForeground": "#EEFFFF", + "progressBar.background": "#80CBC4", + "pickerGroup.foreground": "#80CBC4", + "tree.indentGuidesStroke": "#37474F", + "terminalCursor.foreground": "#FFCB6B", + "terminalCursor.background": "#000000", + "inputOption.activeBackground": "#EEFFFF30", + "textLink.foreground": "#80CBC4", + "textLink.activeForeground": "#EEFFFF", + "sideBar.foreground": "#607a86", + "sideBar.border": "#26323860", + "sideBarTitle.foreground": "#EEFFFF", + "sideBarSectionHeader.border": "#26323860", + "panel.dropBackground": "#EEFFFF", + "sash.hoverBorder": "#80CBC450", + "panelTitle.activeForeground": "#FFFFFF", + "editor.lineHighlightBackground": "#00000050", + "editor.findMatchBackground": "#000000", + "editor.findMatchHighlightBackground": "#00000050", + "editor.findMatchBorder": "#80CBC4", + "editor.findMatchHighlightBorder": "#ffffff30", + "editorIndentGuide.background": "#37474F70", + "editorIndentGuide.activeBackground": "#37474F", + "editorGroup.border": "#00000030", + "editorGutter.modifiedBackground": "#82AAFF60", + "editorGutter.addedBackground": "#C3E88D60", + "editorGutter.deletedBackground": "#f0717860", + "activityBar.border": "#26323860", + "activityBar.foreground": "#EEFFFF", + "activityBar.activeBorder": "#80CBC4", + "extensionBadge.remoteForeground": "#EEFFFF", + "scrollbarSlider.background": "#EEFFFF20", + "scrollbarSlider.hoverBackground": "#EEFFFF10", + "scrollbarSlider.activeBackground": "#80CBC4", + "tab.unfocusedActiveBorder": "#546E7A", + "tab.activeForeground": "#FFFFFF", + "tab.inactiveForeground": "#607a86", + "tab.activeBackground": "#263238", + "tab.unfocusedActiveForeground": "#EEFFFF", + "editorWidget.resizeBorder": "#80CBC4", + "editorWidget.border": "#80CBC4", + "statusBar.border": "#26323860", + "statusBar.foreground": "#546E7A", + "editorBracketMatch.border": "#FFCC0050", + "editorBracketMatch.background": "#263238", + "editorOverviewRuler.findMatchForeground": "#80CBC4", + "editorOverviewRuler.border": "#263238", + "editorOverviewRuler.errorForeground": "#f0717840", + "editorOverviewRuler.infoForeground": "#82AAFF40", + "editorOverviewRuler.warningForeground": "#FFCB6B40", + "editorInfo.foreground": "#82AAFF70", + "editorWarning.foreground": "#FFCB6B70", + "editorError.foreground": "#f0717870", + "editorHoverWidget.border": "#FFFFFF10", + "titleBar.activeForeground": "#EEFFFF", + "titleBar.inactiveBackground": "#263238", + "titleBar.inactiveForeground": "#607a86", + "titleBar.border": "#26323860", + "input.foreground": "#EEFFFF", + "input.placeholderForeground": "#EEFFFF60", + "input.border": "#FFFFFF10", + "inputValidation.errorBorder": "#f07178", + "inputValidation.infoBorder": "#82AAFF", + "inputValidation.warningBorder": "#FFCB6B", + "dropdown.border": "#FFFFFF10", + "quickInput.background": "#263238", + "quickInput.foreground": "#607a86", + "list.hoverForeground": "#FFFFFF", + "list.inactiveSelectionForeground": "#80CBC4", + "quickInput.list.focusBackground": "#EEFFFF20", + "editorSuggestWidget.background": "#263238", + "editorSuggestWidget.foreground": "#EEFFFF", + "editorSuggestWidget.highlightForeground": "#80CBC4", + "editorSuggestWidget.selectedBackground": "#00000050", + "editorSuggestWidget.border": "#FFFFFF10", + "diffEditor.insertedTextBackground": "#89DDFF20", + "diffEditor.removedTextBackground": "#ff9cac20", + "notifications.background": "#263238", + "notifications.foreground": "#EEFFFF", + "notificationLink.foreground": "#80CBC4", + "extensionButton.prominentBackground": "#C3E88D90", + "extensionButton.prominentHoverBackground": "#C3E88D", + "extensionButton.prominentForeground": "#EEFFFF", + "peekViewEditorGutter.background": "#EEFFFF05", + "peekViewTitleDescription.foreground": "#EEFFFF60", + "peekViewResult.matchHighlightBackground": "#80CBC420", + "peekViewEditor.matchHighlightBackground": "#80CBC420", + "peekViewResult.selectionBackground": "#607a8670", + "gitDecoration.deletedResourceForeground": "#f0717890", + "gitDecoration.conflictingResourceForeground": "#FFCB6B90", + "gitDecoration.modifiedResourceForeground": "#82AAFF90", + "gitDecoration.untrackedResourceForeground": "#C3E88D90", + "gitDecoration.ignoredResourceForeground": "#607a8690", + "breadcrumb.background": "#263238", + "breadcrumb.foreground": "#607a86", + "breadcrumb.focusForeground": "#EEFFFF", + "breadcrumb.activeSelectionForeground": "#80CBC4", + "breadcrumbPicker.background": "#263238", + "menu.background": "#263238", + "menu.foreground": "#EEFFFF", + "menu.selectionBackground": "#00000050", + "menu.selectionForeground": "#80CBC4", + "menu.selectionBorder": "#00000030", + "menu.separatorBackground": "#EEFFFF", + "menubar.selectionBackground": "#00000030", + "menubar.selectionForeground": "#80CBC4", + "menubar.selectionBorder": "#00000030", + "settings.dropdownForeground": "#EEFFFF", + "settings.dropdownBackground": "#263238", + "settings.numberInputForeground": "#EEFFFF", + "settings.numberInputBackground": "#263238", + "settings.textInputForeground": "#EEFFFF", + "settings.textInputBackground": "#263238", + "settings.headerForeground": "#80CBC4", + "settings.modifiedItemIndicator": "#80CBC4", + "settings.checkboxBackground": "#263238", + "settings.checkboxForeground": "#EEFFFF", + "listFilterWidget.background": "#00000030", + "listFilterWidget.outline": "#00000030", + "listFilterWidget.noMatchesOutline": "#00000030" + } +} diff --git a/src/lib/shiki/themes/min-dark.json b/src/lib/shiki/themes/min-dark.json new file mode 100644 index 0000000..830375a --- /dev/null +++ b/src/lib/shiki/themes/min-dark.json @@ -0,0 +1,294 @@ +{ + "name": "min-dark", + "type": "dark", + "colors": { + "editorIndentGuide.activeBackground": "#383838", + "editorIndentGuide.background": "#2A2A2A", + "editorRuler.foreground": "#2A2A2A", + "editorLineNumber.foreground": "#727272", + "activityBar.background": "#1A1A1A", + "activityBar.foreground": "#7D7D7D", + "activityBarBadge.background": "#383838", + "badge.background": "#383838", + "badge.foreground": "#C1C1C1", + "button.background": "#333", + "editor.background": "#1f1f1f", + "editor.lineHighlightBorder": "#303030", + "editorGroupHeader.tabsBackground": "#1A1A1A", + "editorGroupHeader.tabsBorder": "#1A1A1A", + "editorSuggestWidget.background": "#1A1A1A", + "focusBorder": "#444", + "foreground": "#888888", + "gitDecoration.ignoredResourceForeground": "#444444", + "input.background": "#2A2A2A", + "input.foreground": "#E0E0E0", + "list.activeSelectionBackground": "#212121", + "list.activeSelectionForeground": "#F5F5F5", + "list.focusBackground": "#292929", + "list.highlightForeground": "#EAEAEA", + "list.hoverBackground": "#262626", + "list.hoverForeground": "#9E9E9E", + "list.inactiveSelectionBackground": "#212121", + "list.inactiveSelectionForeground": "#F5F5F5", + "panelTitle.activeBorder": "#1f1f1f", + "panelTitle.activeForeground": "#FAFAFA", + "panelTitle.inactiveForeground": "#484848", + "peekView.border": "#444", + "peekViewEditor.background": "#242424", + "pickerGroup.border": "#363636", + "pickerGroup.foreground": "#EAEAEA", + "progressBar.background": "#FAFAFA", + "scrollbar.shadow": "#1f1f1f", + "sideBar.background": "#1A1A1A", + "sideBarSectionHeader.background": "#202020", + "statusBar.background": "#1A1A1A", + "statusBar.debuggingBackground": "#1A1A1A", + "statusBar.foreground": "#7E7E7E", + "statusBar.noFolderBackground": "#1A1A1A", + "statusBarItem.remoteForeground": "#7E7E7E", + "statusBarItem.remoteBackground": "#1a1a1a00", + "statusBarItem.prominentBackground": "#fafafa1a", + "tab.activeBorder": "#1e1e1e", + "tab.activeForeground": "#FAFAFA", + "tab.border": "#1A1A1A", + "tab.inactiveBackground": "#1A1A1A", + "tab.inactiveForeground": "#727272", + "textLink.foreground": "#CCC", + "textLink.activeForeground": "#fafafa", + "titleBar.activeBackground": "#1A1A1A", + "titleBar.border": "#00000000", + "terminal.ansiBrightBlack": "#5c5c5c", + "inputOption.activeBackground": "#3a3a3a", + "debugIcon.continueForeground": "#FF7A84", + "debugIcon.disconnectForeground": "#FF7A84", + "debugIcon.pauseForeground": "#FF7A84", + "debugIcon.restartForeground": "#79b8ff", + "debugIcon.startForeground": "#79b8ff", + "debugIcon.stepBackForeground": "#FF7A84", + "debugIcon.stepIntoForeground": "#FF7A84", + "debugIcon.stepOutForeground": "#FF7A84", + "debugIcon.stepOverForeground": "#FF7A84", + "debugIcon.stopForeground": "#79b8ff", + "debugIcon.breakpointCurrentStackframeForeground": "#79b8ff", + "debugIcon.breakpointDisabledForeground": "#848484", + "debugIcon.breakpointForeground": "#FF7A84", + "debugIcon.breakpointStackframeForeground": "#79b8ff", + "debugIcon.breakpointUnverifiedForeground": "#848484", + "symbolIcon.classForeground": "#FF9800", + "symbolIcon.enumeratorForeground": "#FF9800", + "symbolIcon.eventForeground": "#FF9800", + "symbolIcon.methodForeground": "#b392f0", + "symbolIcon.constructorForeground": "#b392f0", + "symbolIcon.functionForeground": "#b392f0", + "symbolIcon.fieldForeground": "#79b8ff", + "symbolIcon.interfaceForeground": "#79b8ff", + "symbolIcon.variableForeground": "#79b8ff", + "symbolIcon.enumeratorMemberForeground": "#79b8ff", + "diffEditor.insertedTextBackground": "#3a632a4b", + "diffEditor.removedTextBackground": "#88063852" + }, + "tokenColors": [ + { + "settings": { + "foreground": "#b392f0" + } + }, + { + "scope": [ + "support.function", + "keyword.operator.accessor", + "meta.group.braces.round.function.arguments", + "meta.template.expression", + "markup.fenced_code meta.embedded.block" + ], + "settings": { + "foreground": "#b392f0" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": ["strong", "markup.heading.markdown", "markup.bold.markdown"], + "settings": { + "fontStyle": "bold", + "foreground": "#FF7A84" + } + }, + { + "scope": ["markup.italic.markdown"], + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "meta.link.inline.markdown", + "settings": { + "fontStyle": "underline", + "foreground": "#1976D2" + } + }, + { + "scope": ["string", "markup.fenced_code", "markup.inline"], + "settings": { + "foreground": "#9db1c5" + } + }, + { + "scope": ["comment", "string.quoted.docstring.multi"], + "settings": { + "foreground": "#6b737c" + } + }, + { + "scope": [ + "constant.language", + "variable.language.this", + "variable.other.object", + "variable.other.class", + "variable.other.constant", + "meta.property-name", + "support", + "string.other.link.title.markdown" + ], + "settings": { + "foreground": "#79b8ff" + } + }, + { + "scope": [ + "constant.numeric", + "constant.other.placeholder", + "constant.character.format.placeholder", + "meta.property-value", + "keyword.other.unit", + "keyword.other.template", + "entity.name.tag.yaml", + "entity.other.attribute-name", + "support.type.property-name.json" + ], + "settings": { + "foreground": "#f8f8f8" + } + }, + { + "scope": [ + "keyword", + "storage.modifier", + "storage.type", + "storage.control.clojure", + "entity.name.function.clojure", + "support.function.node", + "punctuation.separator.key-value", + "punctuation.definition.template-expression" + ], + "settings": { + "foreground": "#f97583" + } + }, + { + "scope": "variable.parameter.function", + "settings": { + "foreground": "#FF9800" + } + }, + { + "scope": [ + "entity.name.type", + "entity.other.inherited-class", + "meta.function-call", + "meta.instance.constructor", + "entity.other.attribute-name", + "entity.name.function", + "constant.keyword.clojure" + ], + "settings": { + "foreground": "#b392f0" + } + }, + { + "scope": [ + "entity.name.tag", + "string.quoted", + "string.regexp", + "string.interpolated", + "string.template", + "string.unquoted.plain.out.yaml", + "keyword.other.template" + ], + "settings": { + "foreground": "#ffab70" + } + }, + { + "scope": "token.info-token", + "settings": { + "foreground": "#316bcd" + } + }, + { + "scope": "token.warn-token", + "settings": { + "foreground": "#cd9731" + } + }, + { + "scope": "token.error-token", + "settings": { + "foreground": "#cd3131" + } + }, + { + "scope": "token.debug-token", + "settings": { + "foreground": "#800080" + } + }, + { + "scope": [ + "punctuation.definition.arguments", + "punctuation.definition.dict", + "punctuation.separator", + "meta.function-call.arguments" + ], + "settings": { + "foreground": "#bbbbbb" + } + }, + { + "name": "[Custom] Markdown links", + "scope": "markup.underline.link", + "settings": { + "foreground": "#ffab70" + } + }, + { + "name": "[Custom] Markdown list", + "scope": ["beginning.punctuation.definition.list.markdown"], + "settings": { + "foreground": "#FF7A84" + } + }, + { + "name": "[Custom] Markdown punctuation definition", + "scope": "punctuation.definition.metadata.markdown", + "settings": { + "foreground": "#ffab70" + } + }, + { + "name": "[Custom] Markdown punctuation definition brackets", + "scope": [ + "punctuation.definition.string.begin.markdown", + "punctuation.definition.string.end.markdown" + ], + "settings": { + "foreground": "#79b8ff" + } + } + ], + "semanticHighlighting": true +} diff --git a/src/lib/shiki/themes/min-light.json b/src/lib/shiki/themes/min-light.json new file mode 100644 index 0000000..1604823 --- /dev/null +++ b/src/lib/shiki/themes/min-light.json @@ -0,0 +1,305 @@ +{ + "name": "min-light", + "type": "light", + "colors": { + "activityBar.background": "#f6f6f6", + "activityBar.foreground": "#9E9E9E", + "activityBarBadge.background": "#616161", + "badge.background": "#E0E0E0", + "badge.foreground": "#616161", + "button.background": "#757575", + "button.hoverBackground": "#616161", + "editor.background": "#ffffff", + "editor.foreground": "#212121", + "editor.lineHighlightBorder": "#f2f2f2", + "editorBracketMatch.background": "#E7F3FF", + "editorBracketMatch.border": "#c8e1ff", + "editorGroupHeader.tabsBackground": "#f6f6f6", + "editorGroupHeader.tabsBorder": "#fff", + "editorIndentGuide.background": "#EEE", + "editorLineNumber.activeForeground": "#757575", + "editorLineNumber.foreground": "#CCC", + "editorSuggestWidget.background": "#F3F3F3", + "extensionButton.prominentBackground": "#000000AA", + "extensionButton.prominentHoverBackground": "#000000BB", + "focusBorder": "#D0D0D0", + "foreground": "#757575", + "gitDecoration.ignoredResourceForeground": "#AAAAAA", + "input.border": "#E9E9E9", + "list.activeSelectionBackground": "#EEE", + "list.activeSelectionForeground": "#212121", + "list.focusBackground": "#ddd", + "list.focusForeground": "#212121", + "list.highlightForeground": "#212121", + "list.inactiveSelectionBackground": "#E0E0E0", + "list.inactiveSelectionForeground": "#212121", + "panel.background": "#fff", + "panel.border": "#f4f4f4", + "panelTitle.activeBorder": "#fff", + "panelTitle.inactiveForeground": "#BDBDBD", + "peekView.border": "#E0E0E0", + "peekViewEditor.background": "#f8f8f8", + "pickerGroup.foreground": "#000", + "progressBar.background": "#000", + "scrollbar.shadow": "#FFF", + "sideBar.background": "#f6f6f6", + "sideBar.border": "#f6f6f6", + "sideBarSectionHeader.background": "#EEE", + "sideBarTitle.foreground": "#999", + "statusBar.background": "#f6f6f6", + "statusBar.border": "#f6f6f6", + "statusBar.debuggingBackground": "#f6f6f6", + "statusBar.foreground": "#7E7E7E", + "statusBar.noFolderBackground": "#f6f6f6", + "statusBarItem.remoteForeground": "#7E7E7E", + "statusBarItem.remoteBackground": "#f6f6f600", + "statusBarItem.prominentBackground": "#0000001a", + "tab.activeBorder": "#FFF", + "tab.activeForeground": "#424242", + "tab.border": "#f6f6f6", + "tab.inactiveBackground": "#f6f6f6", + "tab.inactiveForeground": "#BDBDBD", + "tab.unfocusedActiveBorder": "#fff", + "terminal.ansiBlack": "#333", + "terminal.ansiBlue": "#e0e0e0", + "terminal.ansiBrightBlack": "#a1a1a1", + "terminal.ansiBrightBlue": "#6871ff", + "terminal.ansiBrightCyan": "#57d9ad", + "terminal.ansiBrightGreen": "#a3d900", + "terminal.ansiBrightMagenta": "#a37acc", + "terminal.ansiBrightRed": "#d6656a", + "terminal.ansiBrightWhite": "#7E7E7E", + "terminal.ansiBrightYellow": "#e7c547", + "terminal.ansiCyan": "#4dbf99", + "terminal.ansiGreen": "#77cc00", + "terminal.ansiMagenta": "#9966cc", + "terminal.ansiRed": "#D32F2F", + "terminal.ansiWhite": "#c7c7c7", + "terminal.ansiYellow": "#f29718", + "terminal.background": "#fff", + "textLink.activeForeground": "#000", + "textLink.foreground": "#000", + "titleBar.activeBackground": "#f6f6f6", + "titleBar.border": "#FFFFFF00", + "titleBar.inactiveBackground": "#f6f6f6", + "inputOption.activeBackground": "#EDEDED", + "debugIcon.continueForeground": "#6f42c1", + "debugIcon.disconnectForeground": "#6f42c1", + "debugIcon.pauseForeground": "#6f42c1", + "debugIcon.restartForeground": "#1976D2", + "debugIcon.startForeground": "#1976D2", + "debugIcon.stepBackForeground": "#6f42c1", + "debugIcon.stepIntoForeground": "#6f42c1", + "debugIcon.stepOutForeground": "#6f42c1", + "debugIcon.stepOverForeground": "#6f42c1", + "debugIcon.stopForeground": "#1976D2", + "debugIcon.breakpointCurrentStackframeForeground": "#1976D2", + "debugIcon.breakpointDisabledForeground": "#848484", + "debugIcon.breakpointForeground": "#D32F2F", + "debugIcon.breakpointStackframeForeground": "#1976D2", + "symbolIcon.classForeground": "#dd8500", + "symbolIcon.enumeratorForeground": "#dd8500", + "symbolIcon.eventForeground": "#dd8500", + "symbolIcon.methodForeground": "#6f42c1", + "symbolIcon.constructorForeground": "#6f42c1", + "symbolIcon.functionForeground": "#6f42c1", + "symbolIcon.fieldForeground": "#1976D2", + "symbolIcon.interfaceForeground": "#1976D2", + "symbolIcon.variableForeground": "#1976D2", + "symbolIcon.enumeratorMemberForeground": "#1976D2", + "diffEditor.removedTextBackground": "#e597af52", + "diffEditor.insertedTextBackground": "#b7e7a44b" + }, + "tokenColors": [ + { + "settings": { + "foreground": "#24292eff" + } + }, + { + "scope": [ + "keyword.operator.accessor", + "meta.group.braces.round.function.arguments", + "meta.template.expression", + "markup.fenced_code meta.embedded.block" + ], + "settings": { + "foreground": "#24292eff" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": ["strong", "markup.heading.markdown", "markup.bold.markdown"], + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": ["markup.italic.markdown"], + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "meta.link.inline.markdown", + "settings": { + "fontStyle": "underline", + "foreground": "#1976D2" + } + }, + { + "scope": ["string", "markup.fenced_code", "markup.inline"], + "settings": { + "foreground": "#2b5581" + } + }, + { + "scope": ["comment", "string.quoted.docstring.multi"], + "settings": { + "foreground": "#c2c3c5" + } + }, + { + "scope": [ + "constant.numeric", + "constant.language", + "constant.other.placeholder", + "constant.character.format.placeholder", + "variable.language.this", + "variable.other.object", + "variable.other.class", + "variable.other.constant", + "meta.property-name", + "meta.property-value", + "support" + ], + "settings": { + "foreground": "#1976D2" + } + }, + { + "scope": [ + "keyword", + "storage.modifier", + "storage.type", + "storage.control.clojure", + "entity.name.function.clojure", + "entity.name.tag.yaml", + "support.function.node", + "support.type.property-name.json", + "punctuation.separator.key-value", + "punctuation.definition.template-expression" + ], + "settings": { + "foreground": "#D32F2F" + } + }, + { + "scope": "variable.parameter.function", + "settings": { + "foreground": "#FF9800" + } + }, + { + "scope": [ + "support.function", + "entity.name.type", + "entity.other.inherited-class", + "meta.function-call", + "meta.instance.constructor", + "entity.other.attribute-name", + "entity.name.function", + "constant.keyword.clojure" + ], + "settings": { + "foreground": "#6f42c1" + } + }, + { + "scope": [ + "entity.name.tag", + "string.quoted", + "string.regexp", + "string.interpolated", + "string.template", + "string.unquoted.plain.out.yaml", + "keyword.other.template" + ], + "settings": { + "foreground": "#22863a" + } + }, + { + "scope": "token.info-token", + "settings": { + "foreground": "#316bcd" + } + }, + { + "scope": "token.warn-token", + "settings": { + "foreground": "#cd9731" + } + }, + { + "scope": "token.error-token", + "settings": { + "foreground": "#cd3131" + } + }, + { + "scope": "token.debug-token", + "settings": { + "foreground": "#800080" + } + }, + { + "scope": ["strong", "markup.heading.markdown", "markup.bold.markdown"], + "settings": { + "foreground": "#6f42c1" + } + }, + { + "scope": [ + "punctuation.definition.arguments", + "punctuation.definition.dict", + "punctuation.separator", + "meta.function-call.arguments" + ], + "settings": { + "foreground": "#212121" + } + }, + { + "name": "[Custom] Markdown links", + "scope": ["markup.underline.link", "punctuation.definition.metadata.markdown"], + "settings": { + "foreground": "#22863a" + } + }, + { + "name": "[Custom] Markdown list", + "scope": ["beginning.punctuation.definition.list.markdown"], + "settings": { + "foreground": "#6f42c1" + } + }, + { + "name": "[Custom] Markdown punctuation definition brackets", + "scope": [ + "punctuation.definition.string.begin.markdown", + "punctuation.definition.string.end.markdown", + "string.other.link.title.markdown", + "string.other.link.description.markdown" + ], + "settings": { + "foreground": "#d32f2f" + } + } + ] +} diff --git a/src/lib/shiki/themes/monokai.json b/src/lib/shiki/themes/monokai.json new file mode 100644 index 0000000..3829ff3 --- /dev/null +++ b/src/lib/shiki/themes/monokai.json @@ -0,0 +1,477 @@ +{ + "type": "dark", + "colors": { + "dropdown.background": "#414339", + "list.activeSelectionBackground": "#75715E", + "quickInputList.focusBackground": "#414339", + "dropdown.listBackground": "#1e1f1c", + "list.inactiveSelectionBackground": "#414339", + "list.hoverBackground": "#3e3d32", + "list.dropBackground": "#414339", + "list.highlightForeground": "#f8f8f2", + "button.background": "#75715E", + "editor.background": "#272822", + "editor.foreground": "#f8f8f2", + "selection.background": "#878b9180", + "editor.selectionHighlightBackground": "#575b6180", + "editor.selectionBackground": "#878b9180", + "minimap.selectionHighlight": "#878b9180", + "editor.wordHighlightBackground": "#4a4a7680", + "editor.wordHighlightStrongBackground": "#6a6a9680", + "editor.lineHighlightBackground": "#3e3d32", + "editorLineNumber.activeForeground": "#c2c2bf", + "editorCursor.foreground": "#f8f8f0", + "editorWhitespace.foreground": "#464741", + "editorIndentGuide.background": "#464741", + "editorIndentGuide.activeBackground": "#767771", + "editorGroupHeader.tabsBackground": "#1e1f1c", + "editorGroup.dropBackground": "#41433980", + "tab.inactiveBackground": "#34352f", + "tab.border": "#1e1f1c", + "tab.inactiveForeground": "#ccccc7", + "tab.lastPinnedBorder": "#414339", + "widget.shadow": "#00000098", + "progressBar.background": "#75715E", + "badge.background": "#75715E", + "badge.foreground": "#f8f8f2", + "editorLineNumber.foreground": "#90908a", + "panelTitle.activeForeground": "#f8f8f2", + "panelTitle.activeBorder": "#75715E", + "panelTitle.inactiveForeground": "#75715E", + "panel.border": "#414339", + "settings.focusedRowBackground": "#4143395A", + "titleBar.activeBackground": "#1e1f1c", + "statusBar.background": "#414339", + "statusBar.noFolderBackground": "#414339", + "statusBar.debuggingBackground": "#75715E", + "statusBarItem.remoteBackground": "#AC6218", + "ports.iconRunningProcessForeground": "#ccccc7", + "activityBar.background": "#272822", + "activityBar.foreground": "#f8f8f2", + "sideBar.background": "#1e1f1c", + "sideBarSectionHeader.background": "#272822", + "menu.background": "#1e1f1c", + "menu.foreground": "#cccccc", + "pickerGroup.foreground": "#75715E", + "input.background": "#414339", + "inputOption.activeBorder": "#75715E", + "focusBorder": "#99947c", + "editorWidget.background": "#1e1f1c", + "debugToolBar.background": "#1e1f1c", + "diffEditor.insertedTextBackground": "#4b661680", + "diffEditor.removedTextBackground": "#90274A70", + "inputValidation.errorBackground": "#90274A", + "inputValidation.errorBorder": "#f92672", + "inputValidation.warningBackground": "#848528", + "inputValidation.warningBorder": "#e2e22e", + "inputValidation.infoBackground": "#546190", + "inputValidation.infoBorder": "#819aff", + "editorHoverWidget.background": "#414339", + "editorHoverWidget.border": "#75715E", + "editorSuggestWidget.background": "#272822", + "editorSuggestWidget.border": "#75715E", + "editorGroup.border": "#34352f", + "peekView.border": "#75715E", + "peekViewEditor.background": "#272822", + "peekViewResult.background": "#1e1f1c", + "peekViewTitle.background": "#1e1f1c", + "peekViewResult.selectionBackground": "#414339", + "peekViewResult.matchHighlightBackground": "#75715E", + "peekViewEditor.matchHighlightBackground": "#75715E", + "terminal.ansiBlack": "#333333", + "terminal.ansiRed": "#C4265E", + "terminal.ansiGreen": "#86B42B", + "terminal.ansiYellow": "#B3B42B", + "terminal.ansiBlue": "#6A7EC8", + "terminal.ansiMagenta": "#8C6BC8", + "terminal.ansiCyan": "#56ADBC", + "terminal.ansiWhite": "#e3e3dd", + "terminal.ansiBrightBlack": "#666666", + "terminal.ansiBrightRed": "#f92672", + "terminal.ansiBrightGreen": "#A6E22E", + "terminal.ansiBrightYellow": "#e2e22e", + "terminal.ansiBrightBlue": "#819aff", + "terminal.ansiBrightMagenta": "#AE81FF", + "terminal.ansiBrightCyan": "#66D9EF", + "terminal.ansiBrightWhite": "#f8f8f2" + }, + "tokenColors": [ + { + "settings": { + "foreground": "#F8F8F2" + } + }, + { + "scope": [ + "meta.embedded", + "source.groovy.embedded", + "string meta.image.inline.markdown", + "variable.legacy.builtin.python" + ], + "settings": { + "foreground": "#F8F8F2" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "foreground": "#88846f" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#E6DB74" + } + }, + { + "name": "Template Definition", + "scope": ["punctuation.definition.template-expression", "punctuation.section.embedded"], + "settings": { + "foreground": "#F92672" + } + }, + { + "name": "Reset JavaScript string interpolation expression", + "scope": ["meta.template.expression"], + "settings": { + "foreground": "#F8F8F2" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "foreground": "#AE81FF" + } + }, + { + "name": "Built-in constant", + "scope": "constant.language", + "settings": { + "foreground": "#AE81FF" + } + }, + { + "name": "User-defined constant", + "scope": "constant.character, constant.other", + "settings": { + "foreground": "#AE81FF" + } + }, + { + "name": "Variable", + "scope": "variable", + "settings": { + "fontStyle": "", + "foreground": "#F8F8F2" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "foreground": "#F92672" + } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "fontStyle": "", + "foreground": "#F92672" + } + }, + { + "name": "Storage type", + "scope": "storage.type", + "settings": { + "fontStyle": "italic", + "foreground": "#66D9EF" + } + }, + { + "name": "Class name", + "scope": "entity.name.type, entity.name.class, entity.name.namespace, entity.name.scope-resolution", + "settings": { + "fontStyle": "underline", + "foreground": "#A6E22E" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "fontStyle": "italic underline", + "foreground": "#A6E22E" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "fontStyle": "", + "foreground": "#A6E22E" + } + }, + { + "name": "Function argument", + "scope": "variable.parameter", + "settings": { + "fontStyle": "italic", + "foreground": "#FD971F" + } + }, + { + "name": "Tag name", + "scope": "entity.name.tag", + "settings": { + "fontStyle": "", + "foreground": "#F92672" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "fontStyle": "", + "foreground": "#A6E22E" + } + }, + { + "name": "Library function", + "scope": "support.function", + "settings": { + "fontStyle": "", + "foreground": "#66D9EF" + } + }, + { + "name": "Library constant", + "scope": "support.constant", + "settings": { + "fontStyle": "", + "foreground": "#66D9EF" + } + }, + { + "name": "Library class/type", + "scope": "support.type, support.class", + "settings": { + "fontStyle": "italic", + "foreground": "#66D9EF" + } + }, + { + "name": "Library variable", + "scope": "support.other.variable", + "settings": { + "fontStyle": "" + } + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": { + "fontStyle": "", + "foreground": "#F44747" + } + }, + { + "name": "Invalid deprecated", + "scope": "invalid.deprecated", + "settings": { + "foreground": "#F44747" + } + }, + { + "name": "JSON String", + "scope": "meta.structure.dictionary.json string.quoted.double.json", + "settings": { + "foreground": "#CFCFC2" + } + }, + { + "name": "diff.header", + "scope": "meta.diff, meta.diff.header", + "settings": { + "foreground": "#75715E" + } + }, + { + "name": "diff.deleted", + "scope": "markup.deleted", + "settings": { + "foreground": "#F92672" + } + }, + { + "name": "diff.inserted", + "scope": "markup.inserted", + "settings": { + "foreground": "#A6E22E" + } + }, + { + "name": "diff.changed", + "scope": "markup.changed", + "settings": { + "foreground": "#E6DB74" + } + }, + { + "scope": "constant.numeric.line-number.find-in-files - match", + "settings": { + "foreground": "#AE81FFA0" + } + }, + { + "scope": "entity.name.filename.find-in-files", + "settings": { + "foreground": "#E6DB74" + } + }, + { + "name": "Markup Quote", + "scope": "markup.quote", + "settings": { + "foreground": "#F92672" + } + }, + { + "name": "Markup Lists", + "scope": "markup.list", + "settings": { + "foreground": "#E6DB74" + } + }, + { + "name": "Markup Styling", + "scope": "markup.bold, markup.italic", + "settings": { + "foreground": "#66D9EF" + } + }, + { + "name": "Markup Inline", + "scope": "markup.inline.raw", + "settings": { + "fontStyle": "", + "foreground": "#FD971F" + } + }, + { + "name": "Markup Headings", + "scope": "markup.heading", + "settings": { + "foreground": "#A6E22E" + } + }, + { + "name": "Markup Setext Header", + "scope": "markup.heading.setext", + "settings": { + "foreground": "#A6E22E", + "fontStyle": "bold" + } + }, + { + "name": "Markup Headings", + "scope": "markup.heading.markdown", + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Markdown Quote", + "scope": "markup.quote.markdown", + "settings": { + "fontStyle": "italic", + "foreground": "#75715E" + } + }, + { + "name": "Markdown Bold", + "scope": "markup.bold.markdown", + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Markdown Link Title/Description", + "scope": "string.other.link.title.markdown,string.other.link.description.markdown", + "settings": { + "foreground": "#AE81FF" + } + }, + { + "name": "Markdown Underline Link/Image", + "scope": "markup.underline.link.markdown,markup.underline.link.image.markdown", + "settings": { + "foreground": "#E6DB74" + } + }, + { + "name": "Markdown Emphasis", + "scope": "markup.italic.markdown", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.strikethrough", + "settings": { + "fontStyle": "strikethrough" + } + }, + { + "name": "Markdown Punctuation Definition Link", + "scope": "markup.list.unnumbered.markdown, markup.list.numbered.markdown", + "settings": { + "foreground": "#f8f8f2" + } + }, + { + "name": "Markdown List Punctuation", + "scope": ["punctuation.definition.list.begin.markdown"], + "settings": { + "foreground": "#A6E22E" + } + }, + { + "scope": "token.info-token", + "settings": { + "foreground": "#6796e6" + } + }, + { + "scope": "token.warn-token", + "settings": { + "foreground": "#cd9731" + } + }, + { + "scope": "token.error-token", + "settings": { + "foreground": "#f44747" + } + }, + { + "scope": "token.debug-token", + "settings": { + "foreground": "#b267e6" + } + }, + { + "name": "this.self", + "scope": "variable.language", + "settings": { + "foreground": "#FD971F" + } + } + ], + "semanticHighlighting": true, + "name": "monokai" +} diff --git a/src/lib/shiki/themes/nord.json b/src/lib/shiki/themes/nord.json new file mode 100644 index 0000000..8fa8559 --- /dev/null +++ b/src/lib/shiki/themes/nord.json @@ -0,0 +1,1402 @@ +{ + "name": "nord", + "type": "dark", + "semanticHighlighting": true, + "colors": { + "focusBorder": "#3b4252", + "foreground": "#d8dee9", + "activityBar.background": "#2e3440", + "activityBar.dropBackground": "#3b4252", + "activityBar.foreground": "#d8dee9", + "activityBar.activeBorder": "#88c0d0", + "activityBar.activeBackground": "#3b4252", + "activityBarBadge.background": "#88c0d0", + "activityBarBadge.foreground": "#2e3440", + "badge.foreground": "#2e3440", + "badge.background": "#88c0d0", + "button.background": "#88c0d0ee", + "button.foreground": "#2e3440", + "button.hoverBackground": "#88c0d0", + "button.secondaryBackground": "#434c5e", + "button.secondaryForeground": "#d8dee9", + "button.secondaryHoverBackground": "#4c566a", + "charts.red": "#bf616a", + "charts.blue": "#81a1c1", + "charts.yellow": "#ebcb8b", + "charts.orange": "#d08770", + "charts.green": "#a3be8c", + "charts.purple": "#b48ead", + "charts.foreground": "#d8dee9", + "charts.lines": "#88c0d0", + "debugConsole.infoForeground": "#88c0d0", + "debugConsole.warningForeground": "#ebcb8b", + "debugConsole.errorForeground": "#bf616a", + "debugConsole.sourceForeground": "#616e88", + "debugConsoleInputIcon.foreground": "#81a1c1", + "debugExceptionWidget.background": "#4c566a", + "debugExceptionWidget.border": "#2e3440", + "debugToolBar.background": "#3b4252", + "descriptionForeground": "#d8dee9e6", + "diffEditor.insertedTextBackground": "#81a1c133", + "diffEditor.removedTextBackground": "#bf616a4d", + "dropdown.background": "#3b4252", + "dropdown.border": "#3b4252", + "dropdown.foreground": "#d8dee9", + "editorActiveLineNumber.foreground": "#d8dee9cc", + "editorCursor.foreground": "#d8dee9", + "editorHint.border": "#ebcb8b00", + "editorHint.foreground": "#ebcb8b", + "editorIndentGuide.background": "#434c5eb3", + "editorIndentGuide.activeBackground": "#4c566a", + "editorInlayHint.background": "#434c5e", + "editorInlayHint.foreground": "#d8dee9", + "editorLineNumber.foreground": "#4c566a", + "editorLineNumber.activeForeground": "#d8dee9", + "editorWhitespace.foreground": "#4c566ab3", + "editorWidget.background": "#2e3440", + "editorWidget.border": "#3b4252", + "editor.background": "#2e3440", + "editor.foreground": "#d8dee9", + "editor.hoverHighlightBackground": "#3b4252", + "editor.findMatchBackground": "#88c0d066", + "editor.findMatchHighlightBackground": "#88c0d033", + "editor.findRangeHighlightBackground": "#88c0d033", + "editor.lineHighlightBackground": "#3b4252", + "editor.lineHighlightBorder": "#3b4252", + "editor.inactiveSelectionBackground": "#434c5ecc", + "editor.inlineValuesBackground": "#4c566a", + "editor.inlineValuesForeground": "#eceff4", + "editor.selectionBackground": "#434c5ecc", + "editor.selectionHighlightBackground": "#434c5ecc", + "editor.rangeHighlightBackground": "#434c5e52", + "editor.wordHighlightBackground": "#81a1c166", + "editor.wordHighlightStrongBackground": "#81a1c199", + "editor.stackFrameHighlightBackground": "#5e81ac", + "editor.focusedStackFrameHighlightBackground": "#5e81ac", + "editorError.foreground": "#bf616a", + "editorError.border": "#bf616a00", + "editorWarning.foreground": "#ebcb8b", + "editorWarning.border": "#ebcb8b00", + "editorBracketMatch.background": "#2e344000", + "editorBracketMatch.border": "#88c0d0", + "editorBracketHighlight.foreground1": "#8fbcbb", + "editorBracketHighlight.foreground2": "#88c0d0", + "editorBracketHighlight.foreground3": "#81a1c1", + "editorBracketHighlight.foreground4": "#5e81ac", + "editorBracketHighlight.foreground5": "#8fbcbb", + "editorBracketHighlight.foreground6": "#88c0d0", + "editorBracketHighlight.unexpectedBracket.foreground": "#bf616a", + "editorCodeLens.foreground": "#4c566a", + "editorGroup.background": "#2e3440", + "editorGroup.border": "#3b425201", + "editorGroup.dropBackground": "#3b425299", + "editorGroupHeader.border": "#3b425200", + "editorGroupHeader.noTabsBackground": "#2e3440", + "editorGroupHeader.tabsBackground": "#2e3440", + "editorGroupHeader.tabsBorder": "#3b425200", + "editorGutter.background": "#2e3440", + "editorGutter.modifiedBackground": "#ebcb8b", + "editorGutter.addedBackground": "#a3be8c", + "editorGutter.deletedBackground": "#bf616a", + "editorHoverWidget.background": "#3b4252", + "editorHoverWidget.border": "#3b4252", + "editorLink.activeForeground": "#88c0d0", + "editorMarkerNavigation.background": "#5e81acc0", + "editorMarkerNavigationError.background": "#bf616ac0", + "editorMarkerNavigationWarning.background": "#ebcb8bc0", + "editorOverviewRuler.border": "#3b4252", + "editorOverviewRuler.currentContentForeground": "#3b4252", + "editorOverviewRuler.incomingContentForeground": "#3b4252", + "editorOverviewRuler.findMatchForeground": "#88c0d066", + "editorOverviewRuler.rangeHighlightForeground": "#88c0d066", + "editorOverviewRuler.selectionHighlightForeground": "#88c0d066", + "editorOverviewRuler.wordHighlightForeground": "#88c0d066", + "editorOverviewRuler.wordHighlightStrongForeground": "#88c0d066", + "editorOverviewRuler.modifiedForeground": "#ebcb8b", + "editorOverviewRuler.addedForeground": "#a3be8c", + "editorOverviewRuler.deletedForeground": "#bf616a", + "editorOverviewRuler.errorForeground": "#bf616a", + "editorOverviewRuler.warningForeground": "#ebcb8b", + "editorOverviewRuler.infoForeground": "#81a1c1", + "editorRuler.foreground": "#434c5e", + "editorSuggestWidget.background": "#2e3440", + "editorSuggestWidget.border": "#3b4252", + "editorSuggestWidget.foreground": "#d8dee9", + "editorSuggestWidget.focusHighlightForeground": "#88c0d0", + "editorSuggestWidget.highlightForeground": "#88c0d0", + "editorSuggestWidget.selectedBackground": "#434c5e", + "editorSuggestWidget.selectedForeground": "#d8dee9", + "extensionButton.prominentForeground": "#d8dee9", + "extensionButton.prominentBackground": "#434c5e", + "extensionButton.prominentHoverBackground": "#4c566a", + "errorForeground": "#bf616a", + "gitDecoration.modifiedResourceForeground": "#ebcb8b", + "gitDecoration.deletedResourceForeground": "#bf616a", + "gitDecoration.untrackedResourceForeground": "#a3be8c", + "gitDecoration.ignoredResourceForeground": "#d8dee966", + "gitDecoration.conflictingResourceForeground": "#5e81ac", + "gitDecoration.submoduleResourceForeground": "#8fbcbb", + "gitDecoration.stageDeletedResourceForeground": "#bf616a", + "gitDecoration.stageModifiedResourceForeground": "#ebcb8b", + "input.background": "#3b4252", + "input.foreground": "#d8dee9", + "input.placeholderForeground": "#d8dee999", + "input.border": "#3b4252", + "inputOption.activeBackground": "#5e81ac", + "inputOption.activeBorder": "#5e81ac", + "inputOption.activeForeground": "#eceff4", + "inputValidation.errorBackground": "#bf616a", + "inputValidation.errorBorder": "#bf616a", + "inputValidation.infoBackground": "#81a1c1", + "inputValidation.infoBorder": "#81a1c1", + "inputValidation.warningBackground": "#d08770", + "inputValidation.warningBorder": "#d08770", + "keybindingLabel.background": "#4c566a", + "keybindingLabel.border": "#4c566a", + "keybindingLabel.bottomBorder": "#4c566a", + "keybindingLabel.foreground": "#d8dee9", + "list.activeSelectionBackground": "#88c0d0", + "list.activeSelectionForeground": "#2e3440", + "list.inactiveSelectionBackground": "#434c5e", + "list.inactiveSelectionForeground": "#d8dee9", + "list.inactiveFocusBackground": "#434c5ecc", + "list.hoverForeground": "#eceff4", + "list.focusForeground": "#d8dee9", + "list.focusBackground": "#88c0d099", + "list.focusHighlightForeground": "#eceff4", + "list.hoverBackground": "#3b4252", + "list.dropBackground": "#88c0d099", + "list.highlightForeground": "#88c0d0", + "list.errorForeground": "#bf616a", + "list.warningForeground": "#ebcb8b", + "merge.currentHeaderBackground": "#81a1c166", + "merge.currentContentBackground": "#81a1c14d", + "merge.incomingHeaderBackground": "#8fbcbb66", + "merge.incomingContentBackground": "#8fbcbb4d", + "merge.border": "#3b425200", + "minimap.background": "#2e3440", + "minimap.errorHighlight": "#bf616acc", + "minimap.findMatchHighlight": "#88c0d0", + "minimap.selectionHighlight": "#88c0d0cc", + "minimap.warningHighlight": "#ebcb8bcc", + "minimapGutter.addedBackground": "#a3be8c", + "minimapGutter.deletedBackground": "#bf616a", + "minimapGutter.modifiedBackground": "#ebcb8b", + "minimapSlider.activeBackground": "#434c5eaa", + "minimapSlider.background": "#434c5e99", + "minimapSlider.hoverBackground": "#434c5eaa", + "notification.background": "#3b4252", + "notification.buttonBackground": "#434c5e", + "notification.buttonForeground": "#d8dee9", + "notification.buttonHoverBackground": "#4c566a", + "notification.errorBackground": "#bf616a", + "notification.errorForeground": "#2e3440", + "notification.foreground": "#d8dee9", + "notification.infoBackground": "#88c0d0", + "notification.infoForeground": "#2e3440", + "notification.warningBackground": "#ebcb8b", + "notification.warningForeground": "#2e3440", + "notificationCenter.border": "#3b425200", + "notificationCenterHeader.background": "#2e3440", + "notificationCenterHeader.foreground": "#88c0d0", + "notificationLink.foreground": "#88c0d0", + "notifications.background": "#3b4252", + "notifications.border": "#2e3440", + "notifications.foreground": "#d8dee9", + "notificationToast.border": "#3b425200", + "panel.background": "#2e3440", + "panel.border": "#3b4252", + "panelTitle.activeBorder": "#88c0d000", + "panelTitle.activeForeground": "#88c0d0", + "panelTitle.inactiveForeground": "#d8dee9", + "peekView.border": "#4c566a", + "peekViewEditor.background": "#2e3440", + "peekViewEditorGutter.background": "#2e3440", + "peekViewEditor.matchHighlightBackground": "#88c0d04d", + "peekViewResult.background": "#2e3440", + "peekViewResult.fileForeground": "#88c0d0", + "peekViewResult.lineForeground": "#d8dee966", + "peekViewResult.matchHighlightBackground": "#88c0d0cc", + "peekViewResult.selectionBackground": "#434c5e", + "peekViewResult.selectionForeground": "#d8dee9", + "peekViewTitle.background": "#3b4252", + "peekViewTitleDescription.foreground": "#d8dee9", + "peekViewTitleLabel.foreground": "#88c0d0", + "pickerGroup.border": "#3b4252", + "pickerGroup.foreground": "#88c0d0", + "progressBar.background": "#88c0d0", + "quickInputList.focusBackground": "#88c0d0", + "quickInputList.focusForeground": "#2e3440", + "sash.hoverBorder": "#88c0d0", + "scrollbar.shadow": "#00000066", + "scrollbarSlider.activeBackground": "#434c5eaa", + "scrollbarSlider.background": "#434c5e99", + "scrollbarSlider.hoverBackground": "#434c5eaa", + "selection.background": "#88c0d099", + "sideBar.background": "#2e3440", + "sideBar.foreground": "#d8dee9", + "sideBar.border": "#3b4252", + "sideBarSectionHeader.background": "#3b4252", + "sideBarSectionHeader.foreground": "#d8dee9", + "sideBarTitle.foreground": "#d8dee9", + "statusBar.background": "#3b4252", + "statusBar.debuggingBackground": "#5e81ac", + "statusBar.debuggingForeground": "#d8dee9", + "statusBar.noFolderForeground": "#d8dee9", + "statusBar.noFolderBackground": "#3b4252", + "statusBar.foreground": "#d8dee9", + "statusBarItem.activeBackground": "#4c566a", + "statusBarItem.hoverBackground": "#434c5e", + "statusBarItem.prominentBackground": "#3b4252", + "statusBarItem.prominentHoverBackground": "#434c5e", + "statusBarItem.errorBackground": "#3b4252", + "statusBarItem.errorForeground": "#bf616a", + "statusBarItem.warningBackground": "#ebcb8b", + "statusBarItem.warningForeground": "#2e3440", + "statusBar.border": "#3b425200", + "tab.activeBackground": "#3b4252", + "tab.activeForeground": "#d8dee9", + "tab.border": "#3b425200", + "tab.activeBorder": "#88c0d000", + "tab.unfocusedActiveBorder": "#88c0d000", + "tab.inactiveBackground": "#2e3440", + "tab.inactiveForeground": "#d8dee966", + "tab.unfocusedActiveForeground": "#d8dee999", + "tab.unfocusedInactiveForeground": "#d8dee966", + "tab.hoverBackground": "#3b4252cc", + "tab.unfocusedHoverBackground": "#3b4252b3", + "tab.hoverBorder": "#88c0d000", + "tab.unfocusedHoverBorder": "#88c0d000", + "tab.activeBorderTop": "#88c0d000", + "tab.unfocusedActiveBorderTop": "#88c0d000", + "tab.lastPinnedBorder": "#4c566a", + "terminal.background": "#2e3440", + "terminal.foreground": "#d8dee9", + "terminal.ansiBlack": "#3b4252", + "terminal.ansiRed": "#bf616a", + "terminal.ansiGreen": "#a3be8c", + "terminal.ansiYellow": "#ebcb8b", + "terminal.ansiBlue": "#81a1c1", + "terminal.ansiMagenta": "#b48ead", + "terminal.ansiCyan": "#88c0d0", + "terminal.ansiWhite": "#e5e9f0", + "terminal.ansiBrightBlack": "#4c566a", + "terminal.ansiBrightRed": "#bf616a", + "terminal.ansiBrightGreen": "#a3be8c", + "terminal.ansiBrightYellow": "#ebcb8b", + "terminal.ansiBrightBlue": "#81a1c1", + "terminal.ansiBrightMagenta": "#b48ead", + "terminal.ansiBrightCyan": "#8fbcbb", + "terminal.ansiBrightWhite": "#eceff4", + "terminal.tab.activeBorder": "#88c0d0", + "textBlockQuote.background": "#3b4252", + "textBlockQuote.border": "#81a1c1", + "textCodeBlock.background": "#4c566a", + "textLink.activeForeground": "#88c0d0", + "textLink.foreground": "#88c0d0", + "textPreformat.foreground": "#8fbcbb", + "textSeparator.foreground": "#eceff4", + "titleBar.activeBackground": "#2e3440", + "titleBar.activeForeground": "#d8dee9", + "titleBar.border": "#2e344000", + "titleBar.inactiveBackground": "#2e3440", + "titleBar.inactiveForeground": "#d8dee966", + "tree.indentGuidesStroke": "#616e88", + "walkThrough.embeddedEditorBackground": "#2e3440", + "welcomePage.buttonBackground": "#434c5e", + "welcomePage.buttonHoverBackground": "#4c566a", + "widget.shadow": "#00000066" + }, + "tokenColors": [ + { + "settings": { + "foreground": "#d8dee9ff", + "background": "#2e3440ff" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "foreground": "#616E88" + } + }, + { + "name": "Constant Character", + "scope": "constant.character", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "Constant Character Escape", + "scope": "constant.character.escape", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "Constant Language", + "scope": "constant.language", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Constant Numeric", + "scope": "constant.numeric", + "settings": { + "foreground": "#B48EAD" + } + }, + { + "name": "Constant Regexp", + "scope": "constant.regexp", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "Entity Name Class/Type", + "scope": ["entity.name.class", "entity.name.type.class"], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "Entity Name Function", + "scope": "entity.name.function", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "Entity Name Tag", + "scope": "entity.name.tag", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Entity Other Attribute Name", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "Entity Other Inherited Class", + "scope": "entity.other.inherited-class", + "settings": { + "fontStyle": "bold", + "foreground": "#8FBCBB" + } + }, + { + "name": "Invalid Deprecated", + "scope": "invalid.deprecated", + "settings": { + "foreground": "#D8DEE9", + "background": "#EBCB8B" + } + }, + { + "name": "Invalid Illegal", + "scope": "invalid.illegal", + "settings": { + "foreground": "#D8DEE9", + "background": "#BF616A" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Keyword Operator", + "scope": "keyword.operator", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Keyword Other New", + "scope": "keyword.other.new", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Markup Bold", + "scope": "markup.bold", + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Markup Changed", + "scope": "markup.changed", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "Markup Deleted", + "scope": "markup.deleted", + "settings": { + "foreground": "#BF616A" + } + }, + { + "name": "Markup Inserted", + "scope": "markup.inserted", + "settings": { + "foreground": "#A3BE8C" + } + }, + { + "name": "Meta Preprocessor", + "scope": "meta.preprocessor", + "settings": { + "foreground": "#5E81AC" + } + }, + { + "name": "Punctuation", + "scope": "punctuation", + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "Punctuation Definition Parameters", + "scope": [ + "punctuation.definition.method-parameters", + "punctuation.definition.function-parameters", + "punctuation.definition.parameters" + ], + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "Punctuation Definition Tag", + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Punctuation Definition Comment", + "scope": [ + "punctuation.definition.comment", + "punctuation.end.definition.comment", + "punctuation.start.definition.comment" + ], + "settings": { + "foreground": "#616E88" + } + }, + { + "name": "Punctuation Section", + "scope": "punctuation.section", + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "Punctuation Section Embedded", + "scope": ["punctuation.section.embedded.begin", "punctuation.section.embedded.end"], + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Punctuation Terminator", + "scope": "punctuation.terminator", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Punctuation Variable", + "scope": "punctuation.definition.variable", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#A3BE8C" + } + }, + { + "name": "String Regexp", + "scope": "string.regexp", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "Support Class", + "scope": "support.class", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "Support Constant", + "scope": "support.constant", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Support Function", + "scope": "support.function", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "Support Function Construct", + "scope": "support.function.construct", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Support Type", + "scope": "support.type", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "Support Type Exception", + "scope": "support.type.exception", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "Token Debug", + "scope": "token.debug-token", + "settings": { + "foreground": "#b48ead" + } + }, + { + "name": "Token Error", + "scope": "token.error-token", + "settings": { + "foreground": "#bf616a" + } + }, + { + "name": "Token Info", + "scope": "token.info-token", + "settings": { + "foreground": "#88c0d0" + } + }, + { + "name": "Token Warning", + "scope": "token.warn-token", + "settings": { + "foreground": "#ebcb8b" + } + }, + { + "name": "Variable", + "scope": "variable.other", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "Variable Language", + "scope": "variable.language", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "Variable Parameter", + "scope": "variable.parameter", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[C/CPP] Punctuation Separator Pointer-Access", + "scope": "punctuation.separator.pointer-access.c", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[C/CPP] Meta Preprocessor Include", + "scope": ["source.c meta.preprocessor.include", "source.c string.quoted.other.lt-gt.include"], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[C/CPP] Conditional Directive", + "scope": [ + "source.cpp keyword.control.directive.conditional", + "source.cpp punctuation.definition.directive", + "source.c keyword.control.directive.conditional", + "source.c punctuation.definition.directive" + ], + "settings": { + "foreground": "#5E81AC", + "fontStyle": "bold" + } + }, + { + "name": "[CSS] Constant Other Color RGB Value", + "scope": "source.css constant.other.color.rgb-value", + "settings": { + "foreground": "#B48EAD" + } + }, + { + "name": "[CSS](Function) Meta Property-Value", + "scope": "source.css meta.property-value", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[CSS] Media Queries", + "scope": [ + "source.css keyword.control.at-rule.media", + "source.css keyword.control.at-rule.media punctuation.definition.keyword" + ], + "settings": { + "foreground": "#D08770" + } + }, + { + "name": "[CSS] Punctuation Definition Keyword", + "scope": "source.css punctuation.definition.keyword", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[CSS] Support Type Property Name", + "scope": "source.css support.type.property-name", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[diff] Meta Range Context", + "scope": "source.diff meta.diff.range.context", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[diff] Meta Header From-File", + "scope": "source.diff meta.diff.header.from-file", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[diff] Punctuation Definition From-File", + "scope": "source.diff punctuation.definition.from-file", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[diff] Punctuation Definition Range", + "scope": "source.diff punctuation.definition.range", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[diff] Punctuation Definition Separator", + "scope": "source.diff punctuation.definition.separator", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Elixir](JakeBecker.elixir-ls) module names", + "scope": "entity.name.type.module.elixir", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Elixir](JakeBecker.elixir-ls) module attributes", + "scope": "variable.other.readwrite.module.elixir", + "settings": { + "foreground": "#D8DEE9", + "fontStyle": "bold" + } + }, + { + "name": "[Elixir](JakeBecker.elixir-ls) atoms", + "scope": "constant.other.symbol.elixir", + "settings": { + "foreground": "#D8DEE9", + "fontStyle": "bold" + } + }, + { + "name": "[Elixir](JakeBecker.elixir-ls) modules", + "scope": "variable.other.constant.elixir", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Go] String Format Placeholder", + "scope": "source.go constant.other.placeholder.go", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "[Java](JavaDoc) Comment Block Documentation HTML Entities", + "scope": "source.java comment.block.documentation.javadoc punctuation.definition.entity.html", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Java](JavaDoc) Constant Other", + "scope": "source.java constant.other", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[Java](JavaDoc) Keyword Other Documentation", + "scope": "source.java keyword.other.documentation", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java](JavaDoc) Keyword Other Documentation Author", + "scope": "source.java keyword.other.documentation.author.javadoc", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java](JavaDoc) Keyword Other Documentation Directive/Custom", + "scope": [ + "source.java keyword.other.documentation.directive", + "source.java keyword.other.documentation.custom" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java](JavaDoc) Keyword Other Documentation See", + "scope": "source.java keyword.other.documentation.see.javadoc", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java] Meta Method-Call", + "scope": "source.java meta.method-call meta.method", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Java](JavaDoc) Meta Tag Template Link", + "scope": [ + "source.java meta.tag.template.link.javadoc", + "source.java string.other.link.title.javadoc" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java](JavaDoc) Meta Tag Template Value", + "scope": "source.java meta.tag.template.value.javadoc", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Java](JavaDoc) Punctuation Definition Keyword", + "scope": "source.java punctuation.definition.keyword.javadoc", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java](JavaDoc) Punctuation Definition Tag", + "scope": [ + "source.java punctuation.definition.tag.begin.javadoc", + "source.java punctuation.definition.tag.end.javadoc" + ], + "settings": { + "foreground": "#616E88" + } + }, + { + "name": "[Java] Storage Modifier Import", + "scope": "source.java storage.modifier.import", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java] Storage Modifier Package", + "scope": "source.java storage.modifier.package", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java] Storage Type", + "scope": "source.java storage.type", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java] Storage Type Annotation", + "scope": "source.java storage.type.annotation", + "settings": { + "foreground": "#D08770" + } + }, + { + "name": "[Java] Storage Type Generic", + "scope": "source.java storage.type.generic", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Java] Storage Type Primitive", + "scope": "source.java storage.type.primitive", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[JavaScript] Decorator", + "scope": [ + "source.js punctuation.decorator", + "source.js meta.decorator variable.other.readwrite", + "source.js meta.decorator entity.name.function" + ], + "settings": { + "foreground": "#D08770" + } + }, + { + "name": "[JavaScript] Meta Object-Literal Key", + "scope": "source.js meta.object-literal.key", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[JavaScript](JSDoc) Storage Type Class", + "scope": "source.js storage.type.class.jsdoc", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[JavaScript] String Template Literals Punctuation", + "scope": [ + "source.js string.quoted.template punctuation.quasi.element.begin", + "source.js string.quoted.template punctuation.quasi.element.end", + "source.js string.template punctuation.definition.template-expression" + ], + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[JavaScript] Interpolated String Template Punctuation Functions", + "scope": "source.js string.quoted.template meta.method-call.with-arguments", + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "[JavaScript] String Template Literal Variable", + "scope": [ + "source.js string.template meta.template.expression support.variable.property", + "source.js string.template meta.template.expression variable.other.object" + ], + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[JavaScript] Support Type Primitive", + "scope": "source.js support.type.primitive", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[JavaScript] Variable Other Object", + "scope": "source.js variable.other.object", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[JavaScript] Variable Other Read-Write Alias", + "scope": "source.js variable.other.readwrite.alias", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[JavaScript] Parentheses in Template Strings", + "scope": [ + "source.js meta.embedded.line meta.brace.square", + "source.js meta.embedded.line meta.brace.round", + "source.js string.quoted.template meta.brace.square", + "source.js string.quoted.template meta.brace.round" + ], + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "[HTML] Constant Character Entity", + "scope": "text.html.basic constant.character.entity.html", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "[HTML] Constant Other Inline-Data", + "scope": "text.html.basic constant.other.inline-data", + "settings": { + "foreground": "#D08770", + "fontStyle": "italic" + } + }, + { + "name": "[HTML] Meta Tag SGML Doctype", + "scope": "text.html.basic meta.tag.sgml.doctype", + "settings": { + "foreground": "#5E81AC" + } + }, + { + "name": "[HTML] Punctuation Definition Entity", + "scope": "text.html.basic punctuation.definition.entity", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[INI] Entity Name Section Group-Title", + "scope": "source.properties entity.name.section.group-title.ini", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[INI] Punctuation Separator Key-Value", + "scope": "source.properties punctuation.separator.key-value.ini", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] Markup Fenced Code Block", + "scope": [ + "text.html.markdown markup.fenced_code.block", + "text.html.markdown markup.fenced_code.block punctuation.definition" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Markdown] Markup Heading", + "scope": "markup.heading", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Markdown] Markup Inline", + "scope": [ + "text.html.markdown markup.inline.raw", + "text.html.markdown markup.inline.raw punctuation.definition.raw" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Markdown] Markup Italic", + "scope": "text.html.markdown markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "[Markdown] Markup Link", + "scope": "text.html.markdown markup.underline.link", + "settings": { + "fontStyle": "underline" + } + }, + { + "name": "[Markdown] Markup List Numbered/Unnumbered", + "scope": "text.html.markdown beginning.punctuation.definition.list", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] Markup Quote Punctuation Definition", + "scope": "text.html.markdown beginning.punctuation.definition.quote", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Markdown] Markup Quote Punctuation Definition", + "scope": "text.html.markdown markup.quote", + "settings": { + "foreground": "#616E88" + } + }, + { + "name": "[Markdown] Markup Math Constant", + "scope": "text.html.markdown constant.character.math.tex", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] Markup Math Definition Marker", + "scope": [ + "text.html.markdown punctuation.definition.math.begin", + "text.html.markdown punctuation.definition.math.end" + ], + "settings": { + "foreground": "#5E81AC" + } + }, + { + "name": "[Markdown] Markup Math Function Definition Marker", + "scope": "text.html.markdown punctuation.definition.function.math.tex", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Markdown] Markup Math Operator", + "scope": "text.html.markdown punctuation.math.operator.latex", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] Punctuation Definition Heading", + "scope": "text.html.markdown punctuation.definition.heading", + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] Punctuation Definition Constant/String", + "scope": [ + "text.html.markdown punctuation.definition.constant", + "text.html.markdown punctuation.definition.string" + ], + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Markdown] String Other Link Description/Title", + "scope": [ + "text.html.markdown constant.other.reference.link", + "text.html.markdown string.other.link.description", + "text.html.markdown string.other.link.title" + ], + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Perl] Perl Sigils", + "scope": "source.perl punctuation.definition.variable", + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[PHP] Meta Function-Call Object", + "scope": ["source.php meta.function-call", "source.php meta.function-call.object"], + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Python] Decorator", + "scope": [ + "source.python entity.name.function.decorator", + "source.python meta.function.decorator support.type" + ], + "settings": { + "foreground": "#D08770" + } + }, + { + "name": "[Python] Function Call", + "scope": "source.python meta.function-call.generic", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Python] Support Type", + "scope": "source.python support.type", + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[Python] Function Parameter", + "scope": ["source.python variable.parameter.function.language"], + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[Python] Function Parameter Special", + "scope": [ + "source.python meta.function.parameters variable.parameter.function.language.special.self" + ], + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[Rust] Entity types", + "scope": "source.rust entity.name.type", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[Rust] Macro", + "scope": "source.rust meta.macro entity.name.function", + "settings": { + "fontStyle": "bold", + "foreground": "#88C0D0" + } + }, + { + "name": "[Rust] Attributes", + "scope": [ + "source.rust meta.attribute", + "source.rust meta.attribute punctuation", + "source.rust meta.attribute keyword.operator" + ], + "settings": { + "foreground": "#5E81AC" + } + }, + { + "name": "[Rust] Traits", + "scope": "source.rust entity.name.type.trait", + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "[Rust] Interpolation Bracket Curly", + "scope": "source.rust punctuation.definition.interpolation", + "settings": { + "foreground": "#EBCB8B" + } + }, + { + "name": "[SCSS] Punctuation Definition Interpolation Bracket Curly", + "scope": [ + "source.css.scss punctuation.definition.interpolation.begin.bracket.curly", + "source.css.scss punctuation.definition.interpolation.end.bracket.curly" + ], + "settings": { + "foreground": "#81A1C1" + } + }, + { + "name": "[SCSS] Variable Interpolation", + "scope": "source.css.scss variable.interpolation", + "settings": { + "foreground": "#D8DEE9", + "fontStyle": "italic" + } + }, + { + "name": "[TypeScript] Decorators", + "scope": [ + "source.ts punctuation.decorator", + "source.ts meta.decorator variable.other.readwrite", + "source.ts meta.decorator entity.name.function", + "source.tsx punctuation.decorator", + "source.tsx meta.decorator variable.other.readwrite", + "source.tsx meta.decorator entity.name.function" + ], + "settings": { + "foreground": "#D08770" + } + }, + { + "name": "[TypeScript] Object-literal keys", + "scope": ["source.ts meta.object-literal.key", "source.tsx meta.object-literal.key"], + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[TypeScript] Object-literal functions", + "scope": [ + "source.ts meta.object-literal.key entity.name.function", + "source.tsx meta.object-literal.key entity.name.function" + ], + "settings": { + "foreground": "#88C0D0" + } + }, + { + "name": "[TypeScript] Type/Class", + "scope": [ + "source.ts support.class", + "source.ts support.type", + "source.ts entity.name.type", + "source.ts entity.name.class", + "source.tsx support.class", + "source.tsx support.type", + "source.tsx entity.name.type", + "source.tsx entity.name.class" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[TypeScript] Static Class Support", + "scope": [ + "source.ts support.constant.math", + "source.ts support.constant.dom", + "source.ts support.constant.json", + "source.tsx support.constant.math", + "source.tsx support.constant.dom", + "source.tsx support.constant.json" + ], + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[TypeScript] Variables", + "scope": ["source.ts support.variable", "source.tsx support.variable"], + "settings": { + "foreground": "#D8DEE9" + } + }, + { + "name": "[TypeScript] Parentheses in Template Strings", + "scope": [ + "source.ts meta.embedded.line meta.brace.square", + "source.ts meta.embedded.line meta.brace.round", + "source.tsx meta.embedded.line meta.brace.square", + "source.tsx meta.embedded.line meta.brace.round" + ], + "settings": { + "foreground": "#ECEFF4" + } + }, + { + "name": "[XML] Entity Name Tag Namespace", + "scope": "text.xml entity.name.tag.namespace", + "settings": { + "foreground": "#8FBCBB" + } + }, + { + "name": "[XML] Keyword Other Doctype", + "scope": "text.xml keyword.other.doctype", + "settings": { + "foreground": "#5E81AC" + } + }, + { + "name": "[XML] Meta Tag Preprocessor", + "scope": "text.xml meta.tag.preprocessor entity.name.tag", + "settings": { + "foreground": "#5E81AC" + } + }, + { + "name": "[XML] Entity Name Tag Namespace", + "scope": [ + "text.xml string.unquoted.cdata", + "text.xml string.unquoted.cdata punctuation.definition.string" + ], + "settings": { + "foreground": "#D08770", + "fontStyle": "italic" + } + }, + { + "name": "[YAML] Entity Name Tag", + "scope": "source.yaml entity.name.tag", + "settings": { + "foreground": "#8FBCBB" + } + } + ] +} diff --git a/src/lib/shiki/themes/one-dark-pro.json b/src/lib/shiki/themes/one-dark-pro.json new file mode 100644 index 0000000..1c141bf --- /dev/null +++ b/src/lib/shiki/themes/one-dark-pro.json @@ -0,0 +1,2107 @@ +{ + "name": "one-dark-pro", + "type": "dark", + "semanticHighlighting": true, + "semanticTokenColors": { + "enumMember": { + "foreground": "#56b6c2" + }, + "variable.constant": { + "foreground": "#d19a66" + }, + "variable.defaultLibrary": { + "foreground": "#e5c07b" + }, + "variable:dart": { + "foreground": "#d19a66" + }, + "property:dart": { + "foreground": "#d19a66" + }, + "annotation:dart": { + "foreground": "#d19a66" + }, + "parameter.label:dart": { + "foreground": "#abb2bf" + }, + "macro": { + "foreground": "#d19a66" + }, + "tomlArrayKey": { + "foreground": "#e5c07b" + }, + "memberOperatorOverload": { + "foreground": "#c678dd" + } + }, + "tokenColors": [ + { + "scope": "meta.embedded", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "unison punctuation", + "scope": "punctuation.definition.delayed.unison,punctuation.definition.list.begin.unison,punctuation.definition.list.end.unison,punctuation.definition.ability.begin.unison,punctuation.definition.ability.end.unison,punctuation.operator.assignment.as.unison,punctuation.separator.pipe.unison,punctuation.separator.delimiter.unison,punctuation.definition.hash.unison", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "haskell variable generic-type", + "scope": "variable.other.generic-type.haskell", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "haskell storage type", + "scope": "storage.type.haskell", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "support.variable.magic.python", + "scope": "support.variable.magic.python", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "punctuation.separator.parameters.python", + "scope": "punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "variable.parameter.function.language.special.self.python", + "scope": "variable.parameter.function.language.special.self.python", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "variable.parameter.function.language.special.cls.python", + "scope": "variable.parameter.function.language.special.cls.python", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "storage.modifier.lifetime.rust", + "scope": "storage.modifier.lifetime.rust", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "support.function.std.rust", + "scope": "support.function.std.rust", + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "entity.name.lifetime.rust", + "scope": "entity.name.lifetime.rust", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "variable.language.rust", + "scope": "variable.language.rust", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "support.constant.edge", + "scope": "support.constant.edge", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "regexp constant character-class", + "scope": "constant.other.character-class.regexp", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "keyword.operator", + "scope": ["keyword.operator.word"], + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "regexp operator.quantifier", + "scope": "keyword.operator.quantifier.regexp", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "Text", + "scope": "variable.parameter.function", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "Comment Markup Link", + "scope": "comment markup.link", + "settings": { + "foreground": "#5c6370" + } + }, + { + "name": "markup diff", + "scope": "markup.changed.diff", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "diff", + "scope": "meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff", + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "inserted.diff", + "scope": "markup.inserted.diff", + "settings": { + "foreground": "#98c379" + } + }, + { + "name": "deleted.diff", + "scope": "markup.deleted.diff", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "c++ function", + "scope": "meta.function.c,meta.function.cpp", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "c++ block", + "scope": "punctuation.section.block.begin.bracket.curly.cpp,punctuation.section.block.end.bracket.curly.cpp,punctuation.terminator.statement.c,punctuation.section.block.begin.bracket.curly.c,punctuation.section.block.end.bracket.curly.c,punctuation.section.parens.begin.bracket.round.c,punctuation.section.parens.end.bracket.round.c,punctuation.section.parameters.begin.bracket.round.c,punctuation.section.parameters.end.bracket.round.c", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "js/ts punctuation separator key-value", + "scope": "punctuation.separator.key-value", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "js/ts import keyword", + "scope": "keyword.operator.expression.import", + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "math js/ts", + "scope": "support.constant.math", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "math property js/ts", + "scope": "support.constant.property.math", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "js/ts variable.other.constant", + "scope": "variable.other.constant", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "java type", + "scope": ["storage.type.annotation.java", "storage.type.object.array.java"], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "java source", + "scope": "source.java", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "java modifier.import", + "scope": "punctuation.section.block.begin.java,punctuation.section.block.end.java,punctuation.definition.method-parameters.begin.java,punctuation.definition.method-parameters.end.java,meta.method.identifier.java,punctuation.section.method.begin.java,punctuation.section.method.end.java,punctuation.terminator.java,punctuation.section.class.begin.java,punctuation.section.class.end.java,punctuation.section.inner-class.begin.java,punctuation.section.inner-class.end.java,meta.method-call.java,punctuation.section.class.begin.bracket.curly.java,punctuation.section.class.end.bracket.curly.java,punctuation.section.method.begin.bracket.curly.java,punctuation.section.method.end.bracket.curly.java,punctuation.separator.period.java,punctuation.bracket.angle.java,punctuation.definition.annotation.java,meta.method.body.java", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "java modifier.import", + "scope": "meta.method.java", + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "java modifier.import", + "scope": "storage.modifier.import.java,storage.type.java,storage.type.generic.java", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "java instanceof", + "scope": "keyword.operator.instanceof.java", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "java variable.name", + "scope": "meta.definition.variable.name.java", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "operator logical", + "scope": "keyword.operator.logical", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "operator bitwise", + "scope": "keyword.operator.bitwise", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "operator channel", + "scope": "keyword.operator.channel", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "support.constant.property-value.scss", + "scope": "support.constant.property-value.scss,support.constant.property-value.css", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "CSS/SCSS/LESS Operators", + "scope": "keyword.operator.css,keyword.operator.scss,keyword.operator.less", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "css color standard name", + "scope": "support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "css comma", + "scope": "punctuation.separator.list.comma.css", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "css attribute-name.id", + "scope": "support.constant.color.w3c-standard-color-name.css", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "css property-name", + "scope": "support.type.vendored.property-name.css", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "js/ts module", + "scope": "support.module.node,support.type.object.module,support.module.node", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "entity.name.type.module", + "scope": "entity.name.type.module", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "js variable readwrite", + "scope": "variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "js/ts json", + "scope": "support.constant.json", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "js/ts Keyword", + "scope": [ + "keyword.operator.expression.instanceof", + "keyword.operator.new", + "keyword.operator.ternary", + "keyword.operator.optional", + "keyword.operator.expression.keyof" + ], + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "js/ts console", + "scope": "support.type.object.console", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "js/ts support.variable.property.process", + "scope": "support.variable.property.process", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "js console function", + "scope": "entity.name.function,support.function.console", + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "keyword.operator.misc.rust", + "scope": "keyword.operator.misc.rust", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "keyword.operator.sigil.rust", + "scope": "keyword.operator.sigil.rust", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "operator", + "scope": "keyword.operator.delete", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "js dom", + "scope": "support.type.object.dom", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "js dom variable", + "scope": "support.variable.dom,support.variable.property.dom", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "keyword.operator", + "scope": "keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "C operator assignment", + "scope": "keyword.operator.assignment.c,keyword.operator.comparison.c,keyword.operator.c,keyword.operator.increment.c,keyword.operator.decrement.c,keyword.operator.bitwise.shift.c,keyword.operator.assignment.cpp,keyword.operator.comparison.cpp,keyword.operator.cpp,keyword.operator.increment.cpp,keyword.operator.decrement.cpp,keyword.operator.bitwise.shift.cpp", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "Punctuation", + "scope": "punctuation.separator.delimiter", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "Other punctuation .c", + "scope": "punctuation.separator.c,punctuation.separator.cpp", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "C type posix-reserved", + "scope": "support.type.posix-reserved.c,support.type.posix-reserved.cpp", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "keyword.operator.sizeof.c", + "scope": "keyword.operator.sizeof.c,keyword.operator.sizeof.cpp", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "python parameter", + "scope": "variable.parameter.function.language.python", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "python type", + "scope": "support.type.python", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "python logical", + "scope": "keyword.operator.logical.python", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "pyCs", + "scope": "variable.parameter.function.python", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "python block", + "scope": "punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "python function-call.generic", + "scope": "meta.function-call.generic.python", + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "python placeholder reset to normal string", + "scope": "constant.character.format.placeholder.other.python", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "Operators", + "scope": "keyword.operator", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "Compound Assignment Operators", + "scope": "keyword.operator.assignment.compound", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "Compound Assignment Operators js/ts", + "scope": "keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "Keywords", + "scope": "keyword", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "Namespaces", + "scope": "entity.name.namespace", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "Variables", + "scope": "variable", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "Variables", + "scope": "variable.c", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "Language variables", + "scope": "variable.language", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "Java Variables", + "scope": "token.variable.parameter.java", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "Java Imports", + "scope": "import.storage.java", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "Packages", + "scope": "token.package.keyword", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "Packages", + "scope": "token.package", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "Functions", + "scope": [ + "entity.name.function", + "meta.require", + "support.function.any-method", + "variable.function" + ], + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "Classes", + "scope": "entity.name.type.namespace", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "Classes", + "scope": "support.class, entity.name.type.class", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "Class name", + "scope": "entity.name.class.identifier.namespace.type", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "Class name", + "scope": ["entity.name.class", "variable.other.class.js", "variable.other.class.ts"], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "Class name php", + "scope": "variable.other.class.php", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "Type Name", + "scope": "entity.name.type", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "Keyword Control", + "scope": "keyword.control", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "Control Elements", + "scope": "control.elements, keyword.operator.less", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "Methods", + "scope": "keyword.other.special-method", + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "Storage JS TS", + "scope": "token.storage", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "Source Js Keyword Operator Delete,source Js Keyword Operator In,source Js Keyword Operator Of,source Js Keyword Operator Instanceof,source Js Keyword Operator New,source Js Keyword Operator Typeof,source Js Keyword Operator Void", + "scope": "keyword.operator.expression.delete,keyword.operator.expression.in,keyword.operator.expression.of,keyword.operator.expression.instanceof,keyword.operator.new,keyword.operator.expression.typeof,keyword.operator.expression.void", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "Java Storage", + "scope": "token.storage.type.java", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "Support", + "scope": "support.function", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "Support type", + "scope": "support.type.property-name", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "[VSCODE-CUSTOM] toml support", + "scope": "support.type.property-name.toml, support.type.property-name.table.toml, support.type.property-name.array.toml", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "Support type", + "scope": "support.constant.property-value", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "Support type", + "scope": "support.constant.font-name", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "Meta tag", + "scope": "meta.tag", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "Strings", + "scope": "string", + "settings": { + "foreground": "#98c379" + } + }, + { + "name": "Constant other symbol", + "scope": "constant.other.symbol", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "Integers", + "scope": "constant.numeric", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "Constants", + "scope": "constant", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "Constants", + "scope": "punctuation.definition.constant", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "Tags", + "scope": "entity.name.tag", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "Attributes", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "Attribute IDs", + "scope": "entity.other.attribute-name.id", + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "Attribute class", + "scope": "entity.other.attribute-name.class.css", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "Selector", + "scope": "meta.selector", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "Headings", + "scope": "markup.heading", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "Headings", + "scope": "markup.heading punctuation.definition.heading, entity.name.section", + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "Units", + "scope": "keyword.other.unit", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "Bold", + "scope": "markup.bold,todo.bold", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "Bold", + "scope": "punctuation.definition.bold", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "markup Italic", + "scope": "markup.italic, punctuation.definition.italic,todo.emphasis", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "emphasis md", + "scope": "emphasis md", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "[VSCODE-CUSTOM] Markdown headings", + "scope": "entity.name.section.markdown", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "[VSCODE-CUSTOM] Markdown heading Punctuation Definition", + "scope": "punctuation.definition.heading.markdown", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "punctuation.definition.list.begin.markdown", + "scope": "punctuation.definition.list.begin.markdown", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "[VSCODE-CUSTOM] Markdown heading setext", + "scope": "markup.heading.setext", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "[VSCODE-CUSTOM] Markdown Punctuation Definition Bold", + "scope": "punctuation.definition.bold.markdown", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "[VSCODE-CUSTOM] Markdown Inline Raw", + "scope": "markup.inline.raw.markdown", + "settings": { + "foreground": "#98c379" + } + }, + { + "name": "[VSCODE-CUSTOM] Markdown Inline Raw", + "scope": "markup.inline.raw.string.markdown", + "settings": { + "foreground": "#98c379" + } + }, + { + "name": "[VSCODE-CUSTOM] Markdown Inline Raw punctuation", + "scope": "punctuation.definition.raw.markdown", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "[VSCODE-CUSTOM] Markdown List Punctuation Definition", + "scope": "punctuation.definition.list.markdown", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "[VSCODE-CUSTOM] Markdown Punctuation Definition String", + "scope": [ + "punctuation.definition.string.begin.markdown", + "punctuation.definition.string.end.markdown", + "punctuation.definition.metadata.markdown" + ], + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "beginning.punctuation.definition.list.markdown", + "scope": ["beginning.punctuation.definition.list.markdown"], + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "[VSCODE-CUSTOM] Markdown Punctuation Definition Link", + "scope": "punctuation.definition.metadata.markdown", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "[VSCODE-CUSTOM] Markdown Underline Link/Image", + "scope": "markup.underline.link.markdown,markup.underline.link.image.markdown", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "[VSCODE-CUSTOM] Markdown Link Title/Description", + "scope": "string.other.link.title.markdown,string.other.link.description.markdown", + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "[VSCODE-CUSTOM] Asciidoc Inline Raw", + "scope": "markup.raw.monospace.asciidoc", + "settings": { + "foreground": "#98c379" + } + }, + { + "name": "[VSCODE-CUSTOM] Asciidoc Inline Raw Punctuation Definition", + "scope": "punctuation.definition.asciidoc", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "[VSCODE-CUSTOM] Asciidoc List Punctuation Definition", + "scope": "markup.list.asciidoc", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "[VSCODE-CUSTOM] Asciidoc underline link", + "scope": "markup.link.asciidoc,markup.other.url.asciidoc", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "[VSCODE-CUSTOM] Asciidoc link name", + "scope": "string.unquoted.asciidoc,markup.other.url.asciidoc", + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "Regular Expressions", + "scope": "string.regexp", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "Embedded", + "scope": "punctuation.section.embedded, variable.interpolation", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "Embedded", + "scope": "punctuation.section.embedded.begin,punctuation.section.embedded.end", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "illegal", + "scope": "invalid.illegal", + "settings": { + "foreground": "#ffffff" + } + }, + { + "name": "illegal", + "scope": "invalid.illegal.bad-ampersand.html", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "scope": "invalid.illegal.unrecognized-tag.html", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "Broken", + "scope": "invalid.broken", + "settings": { + "foreground": "#ffffff" + } + }, + { + "name": "Deprecated", + "scope": "invalid.deprecated", + "settings": { + "foreground": "#ffffff" + } + }, + { + "name": "html Deprecated", + "scope": "invalid.deprecated.entity.other.attribute-name.html", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "Unimplemented", + "scope": "invalid.unimplemented", + "settings": { + "foreground": "#ffffff" + } + }, + { + "name": "Source Json Meta Structure Dictionary Json > String Quoted Json", + "scope": "source.json meta.structure.dictionary.json > string.quoted.json", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "Source Json Meta Structure Dictionary Json > String Quoted Json > Punctuation String", + "scope": "source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "Source Json Meta Structure Dictionary Json > Value Json > String Quoted Json,source Json Meta Structure Array Json > Value Json > String Quoted Json,source Json Meta Structure Dictionary Json > Value Json > String Quoted Json > Punctuation,source Json Meta Structure Array Json > Value Json > String Quoted Json > Punctuation", + "scope": "source.json meta.structure.dictionary.json > value.json > string.quoted.json,source.json meta.structure.array.json > value.json > string.quoted.json,source.json meta.structure.dictionary.json > value.json > string.quoted.json > punctuation,source.json meta.structure.array.json > value.json > string.quoted.json > punctuation", + "settings": { + "foreground": "#98c379" + } + }, + { + "name": "Source Json Meta Structure Dictionary Json > Constant Language Json,source Json Meta Structure Array Json > Constant Language Json", + "scope": "source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "[VSCODE-CUSTOM] JSON Property Name", + "scope": "support.type.property-name.json", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "[VSCODE-CUSTOM] JSON Punctuation for Property Name", + "scope": "support.type.property-name.json punctuation", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "laravel blade tag", + "scope": "text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "laravel blade @", + "scope": "text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "use statement for other classes", + "scope": "support.other.namespace.use.php,support.other.namespace.use-as.php,entity.other.alias.php,meta.interface.php", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "error suppression", + "scope": "keyword.operator.error-control.php", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "php instanceof", + "scope": "keyword.operator.type.php", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "style double quoted array index normal begin", + "scope": "punctuation.section.array.begin.php", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "style double quoted array index normal end", + "scope": "punctuation.section.array.end.php", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "php illegal.non-null-typehinted", + "scope": "invalid.illegal.non-null-typehinted.php", + "settings": { + "foreground": "#f44747" + } + }, + { + "name": "php types", + "scope": "storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "php call-function", + "scope": "meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php", + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "php function-resets", + "scope": "punctuation.definition.parameters.begin.bracket.round.php,punctuation.definition.parameters.end.bracket.round.php,punctuation.separator.delimiter.php,punctuation.section.scope.begin.php,punctuation.section.scope.end.php,punctuation.terminator.expression.php,punctuation.definition.arguments.begin.bracket.round.php,punctuation.definition.arguments.end.bracket.round.php,punctuation.definition.storage-type.begin.bracket.round.php,punctuation.definition.storage-type.end.bracket.round.php,punctuation.definition.array.begin.bracket.round.php,punctuation.definition.array.end.bracket.round.php,punctuation.definition.begin.bracket.round.php,punctuation.definition.end.bracket.round.php,punctuation.definition.begin.bracket.curly.php,punctuation.definition.end.bracket.curly.php,punctuation.definition.section.switch-block.end.bracket.curly.php,punctuation.definition.section.switch-block.start.bracket.curly.php,punctuation.definition.section.switch-block.begin.bracket.curly.php,punctuation.definition.section.switch-block.end.bracket.curly.php", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "support php constants", + "scope": "support.constant.core.rust", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "support php constants", + "scope": "support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "php goto", + "scope": "entity.name.goto-label.php,support.other.php", + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "php logical/bitwise operator", + "scope": "keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "php regexp operator", + "scope": "keyword.operator.regexp.php", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "php comparison", + "scope": "keyword.operator.comparison.php", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "php heredoc/nowdoc", + "scope": "keyword.operator.heredoc.php,keyword.operator.nowdoc.php", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "python function decorator @", + "scope": "meta.function.decorator.python", + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "python function support", + "scope": "support.token.decorator.python,meta.function.decorator.identifier.python", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "parameter function js/ts", + "scope": "function.parameter", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "brace function", + "scope": "function.brace", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "parameter function ruby cs", + "scope": "function.parameter.ruby, function.parameter.cs", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "constant.language.symbol.ruby", + "scope": "constant.language.symbol.ruby", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "constant.language.symbol.hashkey.ruby", + "scope": "constant.language.symbol.hashkey.ruby", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "rgb-value", + "scope": "rgb-value", + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "rgb value", + "scope": "inline-color-decoration rgb-value", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "rgb value less", + "scope": "less rgb-value", + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "sass selector", + "scope": "selector.sass", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "ts primitive/builtin types", + "scope": "support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "block scope", + "scope": "block.scope.end,block.scope.begin", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "cs storage type", + "scope": "storage.type.cs", + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "cs local variable", + "scope": "entity.name.variable.local.cs", + "settings": { + "foreground": "#e06c75" + } + }, + { + "scope": "token.info-token", + "settings": { + "foreground": "#61afef" + } + }, + { + "scope": "token.warn-token", + "settings": { + "foreground": "#d19a66" + } + }, + { + "scope": "token.error-token", + "settings": { + "foreground": "#f44747" + } + }, + { + "scope": "token.debug-token", + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "String interpolation", + "scope": [ + "punctuation.definition.template-expression.begin", + "punctuation.definition.template-expression.end", + "punctuation.section.embedded" + ], + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "Reset JavaScript string interpolation expression", + "scope": ["meta.template.expression"], + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "Import module JS", + "scope": ["keyword.operator.module"], + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "js Flowtype", + "scope": ["support.type.type.flowtype"], + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "js Flow", + "scope": ["support.type.primitive"], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "js class prop", + "scope": ["meta.property.object"], + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "js func parameter", + "scope": ["variable.parameter.function.js"], + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "js template literals begin", + "scope": ["keyword.other.template.begin"], + "settings": { + "foreground": "#98c379" + } + }, + { + "name": "js template literals end", + "scope": ["keyword.other.template.end"], + "settings": { + "foreground": "#98c379" + } + }, + { + "name": "js template literals variable braces begin", + "scope": ["keyword.other.substitution.begin"], + "settings": { + "foreground": "#98c379" + } + }, + { + "name": "js template literals variable braces end", + "scope": ["keyword.other.substitution.end"], + "settings": { + "foreground": "#98c379" + } + }, + { + "name": "js operator.assignment", + "scope": ["keyword.operator.assignment"], + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "go operator", + "scope": ["keyword.operator.assignment.go"], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "go operator", + "scope": ["keyword.operator.arithmetic.go", "keyword.operator.address.go"], + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "Go package name", + "scope": ["entity.name.package.go"], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "elm prelude", + "scope": ["support.type.prelude.elm"], + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "elm constant", + "scope": ["support.constant.elm"], + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "template literal", + "scope": ["punctuation.quasi.element"], + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "html/pug (jade) escaped characters and entities", + "scope": ["constant.character.entity"], + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "styling css pseudo-elements/classes to be able to differentiate from classes which are the same colour", + "scope": [ + "entity.other.attribute-name.pseudo-element", + "entity.other.attribute-name.pseudo-class" + ], + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "Clojure globals", + "scope": ["entity.global.clojure"], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "Clojure symbols", + "scope": ["meta.symbol.clojure"], + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "Clojure constants", + "scope": ["constant.keyword.clojure"], + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "CoffeeScript Function Argument", + "scope": ["meta.arguments.coffee", "variable.parameter.function.coffee"], + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "Ini Default Text", + "scope": ["source.ini"], + "settings": { + "foreground": "#98c379" + } + }, + { + "name": "Makefile prerequisities", + "scope": ["meta.scope.prerequisites.makefile"], + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "Makefile text colour", + "scope": ["source.makefile"], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "Groovy import names", + "scope": ["storage.modifier.import.groovy"], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "Groovy Methods", + "scope": ["meta.method.groovy"], + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "Groovy Variables", + "scope": ["meta.definition.variable.name.groovy"], + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "Groovy Inheritance", + "scope": ["meta.definition.class.inherited.classes.groovy"], + "settings": { + "foreground": "#98c379" + } + }, + { + "name": "HLSL Semantic", + "scope": ["support.variable.semantic.hlsl"], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "HLSL Types", + "scope": [ + "support.type.texture.hlsl", + "support.type.sampler.hlsl", + "support.type.object.hlsl", + "support.type.object.rw.hlsl", + "support.type.fx.hlsl", + "support.type.object.hlsl" + ], + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "SQL Variables", + "scope": ["text.variable", "text.bracketed"], + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "types", + "scope": ["support.type.swift", "support.type.vb.asp"], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "heading 1, keyword", + "scope": ["entity.name.function.xi"], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "heading 2, callable", + "scope": ["entity.name.class.xi"], + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "heading 3, property", + "scope": ["constant.character.character-class.regexp.xi"], + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "heading 4, type, class, interface", + "scope": ["constant.regexp.xi"], + "settings": { + "foreground": "#c678dd" + } + }, + { + "name": "heading 5, enums, preprocessor, constant, decorator", + "scope": ["keyword.control.xi"], + "settings": { + "foreground": "#56b6c2" + } + }, + { + "name": "heading 6, number", + "scope": ["invalid.xi"], + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "string", + "scope": ["beginning.punctuation.definition.quote.markdown.xi"], + "settings": { + "foreground": "#98c379" + } + }, + { + "name": "comments", + "scope": ["beginning.punctuation.definition.list.markdown.xi"], + "settings": { + "foreground": "#7f848e" + } + }, + { + "name": "link", + "scope": ["constant.character.xi"], + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "accent", + "scope": ["accent.xi"], + "settings": { + "foreground": "#61afef" + } + }, + { + "name": "wikiword", + "scope": ["wikiword.xi"], + "settings": { + "foreground": "#d19a66" + } + }, + { + "name": "language operators like '+', '-' etc", + "scope": ["constant.other.color.rgb-value.xi"], + "settings": { + "foreground": "#ffffff" + } + }, + { + "name": "elements to dim", + "scope": ["punctuation.definition.tag.xi"], + "settings": { + "foreground": "#5c6370" + } + }, + { + "name": "C++/C#", + "scope": [ + "entity.name.label.cs", + "entity.name.scope-resolution.function.call", + "entity.name.scope-resolution.function.definition" + ], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "Markdown underscore-style headers", + "scope": [ + "entity.name.label.cs", + "markup.heading.setext.1.markdown", + "markup.heading.setext.2.markdown" + ], + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "meta.brace.square", + "scope": [" meta.brace.square"], + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "Comments", + "scope": "comment, punctuation.definition.comment", + "settings": { + "foreground": "#7f848e", + "fontStyle": "italic" + } + }, + { + "name": "[VSCODE-CUSTOM] Markdown Quote", + "scope": "markup.quote.markdown", + "settings": { + "foreground": "#5c6370" + } + }, + { + "name": "punctuation.definition.block.sequence.item.yaml", + "scope": "punctuation.definition.block.sequence.item.yaml", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "scope": ["constant.language.symbol.elixir", "constant.language.symbol.double-quoted.elixir"], + "settings": { + "foreground": "#56b6c2" + } + }, + { + "scope": ["entity.name.variable.parameter.cs"], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "scope": ["entity.name.variable.field.cs"], + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "Deleted", + "scope": "markup.deleted", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "Inserted", + "scope": "markup.inserted", + "settings": { + "foreground": "#98c379" + } + }, + { + "name": "Underline", + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "name": "punctuation.section.embedded.begin.php", + "scope": ["punctuation.section.embedded.begin.php", "punctuation.section.embedded.end.php"], + "settings": { + "foreground": "#BE5046" + } + }, + { + "name": "support.other.namespace.php", + "scope": ["support.other.namespace.php"], + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "Latex variable parameter", + "scope": ["variable.parameter.function.latex"], + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "variable.other.object", + "scope": ["variable.other.object"], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "variable.other.constant.property", + "scope": ["variable.other.constant.property"], + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "entity.other.inherited-class", + "scope": ["entity.other.inherited-class"], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "name": "c variable readwrite", + "scope": "variable.other.readwrite.c", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "php scope", + "scope": "entity.name.variable.parameter.php,punctuation.separator.colon.php,constant.other.php", + "settings": { + "foreground": "#abb2bf" + } + }, + { + "name": "Assembly", + "scope": ["constant.numeric.decimal.asm.x86_64"], + "settings": { + "foreground": "#c678dd" + } + }, + { + "scope": ["support.other.parenthesis.regexp"], + "settings": { + "foreground": "#d19a66" + } + }, + { + "scope": ["constant.character.escape"], + "settings": { + "foreground": "#56b6c2" + } + }, + { + "scope": ["string.regexp"], + "settings": { + "foreground": "#e06c75" + } + }, + { + "scope": ["log.info"], + "settings": { + "foreground": "#98c379" + } + }, + { + "scope": ["log.warning"], + "settings": { + "foreground": "#e5c07b" + } + }, + { + "scope": ["log.error"], + "settings": { + "foreground": "#e06c75" + } + }, + { + "scope": "keyword.operator.expression.is", + "settings": { + "foreground": "#c678dd" + } + }, + { + "scope": "entity.name.label", + "settings": { + "foreground": "#e06c75" + } + }, + { + "name": "js/ts italic", + "scope": "entity.other.attribute-name.js,entity.other.attribute-name.ts,entity.other.attribute-name.jsx,entity.other.attribute-name.tsx,variable.parameter,variable.language.super", + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "comment", + "scope": "comment.line.double-slash,comment.block.documentation", + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "markup.italic.markdown", + "scope": "markup.italic.markdown", + "settings": { + "fontStyle": "italic" + } + } + ], + "colors": { + "activityBar.background": "#282c34", + "activityBar.foreground": "#d7dae0", + "activityBarBadge.background": "#4d78cc", + "activityBarBadge.foreground": "#f8fafd", + "badge.background": "#282c34", + "button.background": "#404754", + "button.secondaryBackground": "#30333d", + "button.secondaryForeground": "#c0bdbd", + "checkbox.border": "#404754", + "debugToolBar.background": "#21252b", + "descriptionForeground": "#abb2bf", + "diffEditor.insertedTextBackground": "#00809b33", + "dropdown.background": "#21252b", + "dropdown.border": "#21252b", + "editor.background": "#282c34", + "editor.findMatchBackground": "#42557b", + "editor.findMatchBorder": "#457dff", + "editor.findMatchHighlightBackground": "#6199ff2f", + "editor.foreground": "#abb2bf", + "editorBracketHighlight.foreground1": "#d19a66", + "editorBracketHighlight.foreground2": "#c678dd", + "editorBracketHighlight.foreground3": "#56b6c2", + "editorHoverWidget.highlightForeground": "#61afef", + "editorInlayHint.foreground": "#abb2bf", + "editorInlayHint.background": "#2c313c", + "editor.lineHighlightBackground": "#2c313c", + "editorLineNumber.activeForeground": "#abb2bf", + "editorGutter.addedBackground": "#109868", + "editorGutter.deletedBackground": "#9A353D", + "editorGutter.modifiedBackground": "#948B60", + "editorOverviewRuler.addedBackground": "#109868", + "editorOverviewRuler.deletedBackground": "#9A353D", + "editorOverviewRuler.modifiedBackground": "#948B60", + "editor.selectionBackground": "#67769660", + "editor.selectionHighlightBackground": "#ffffff10", + "editor.selectionHighlightBorder": "#dddddd", + "editor.wordHighlightBackground": "#d2e0ff2f", + "editor.wordHighlightBorder": "#7f848e", + "editor.wordHighlightStrongBackground": "#abb2bf26", + "editor.wordHighlightStrongBorder": "#7f848e", + "editorBracketMatch.background": "#515a6b", + "editorBracketMatch.border": "#515a6b", + "editorCursor.background": "#ffffffc9", + "editorCursor.foreground": "#528bff", + "editorError.foreground": "#c24038", + "editorGroup.background": "#181a1f", + "editorGroup.border": "#181a1f", + "editorGroupHeader.tabsBackground": "#21252b", + "editorHoverWidget.background": "#21252b", + "editorHoverWidget.border": "#181a1f", + "editorIndentGuide.activeBackground": "#c8c8c859", + "editorIndentGuide.background": "#3b4048", + "editorLineNumber.foreground": "#495162", + "editorMarkerNavigation.background": "#21252b", + "editorRuler.foreground": "#abb2bf26", + "editorSuggestWidget.background": "#21252b", + "editorSuggestWidget.border": "#181a1f", + "editorSuggestWidget.selectedBackground": "#2c313a", + "editorWarning.foreground": "#d19a66", + "editorWhitespace.foreground": "#ffffff1d", + "editorWidget.background": "#21252b", + "focusBorder": "#3e4452", + "gitDecoration.ignoredResourceForeground": "#636b78", + "input.background": "#1d1f23", + "input.foreground": "#abb2bf", + "list.activeSelectionBackground": "#2c313a", + "list.activeSelectionForeground": "#d7dae0", + "list.focusBackground": "#323842", + "list.focusForeground": "#f0f0f0", + "list.highlightForeground": "#ecebeb", + "list.hoverBackground": "#2c313a", + "list.hoverForeground": "#abb2bf", + "list.inactiveSelectionBackground": "#323842", + "list.inactiveSelectionForeground": "#d7dae0", + "list.warningForeground": "#d19a66", + "menu.foreground": "#abb2bf", + "menu.separatorBackground": "#343a45", + "minimapGutter.addedBackground": "#109868", + "minimapGutter.deletedBackground": "#9A353D", + "minimapGutter.modifiedBackground": "#948B60", + "panel.border": "#3e4452", + "panelSectionHeader.background": "#21252b", + "peekViewEditor.background": "#1b1d23", + "peekViewEditor.matchHighlightBackground": "#29244b", + "peekViewResult.background": "#22262b", + "scrollbar.shadow": "#23252c", + "scrollbarSlider.activeBackground": "#747d9180", + "scrollbarSlider.background": "#4e566660", + "scrollbarSlider.hoverBackground": "#5a637580", + "settings.focusedRowBackground": "#282c34", + "settings.headerForeground": "#fff", + "sideBar.background": "#21252b", + "sideBar.foreground": "#abb2bf", + "sideBarSectionHeader.background": "#282c34", + "sideBarSectionHeader.foreground": "#abb2bf", + "statusBar.background": "#21252b", + "statusBar.debuggingBackground": "#cc6633", + "statusBar.debuggingBorder": "#ff000000", + "statusBar.debuggingForeground": "#ffffff", + "statusBar.foreground": "#9da5b4", + "statusBar.noFolderBackground": "#21252b", + "statusBarItem.remoteBackground": "#4d78cc", + "statusBarItem.remoteForeground": "#f8fafd", + "tab.activeBackground": "#282c34", + "tab.activeBorder": "#b4b4b4", + "tab.activeForeground": "#dcdcdc", + "tab.border": "#181a1f", + "tab.hoverBackground": "#323842", + "tab.inactiveBackground": "#21252b", + "tab.unfocusedHoverBackground": "#323842", + "terminal.ansiBlack": "#3f4451", + "terminal.ansiBlue": "#4aa5f0", + "terminal.ansiBrightBlack": "#4f5666", + "terminal.ansiBrightBlue": "#4dc4ff", + "terminal.ansiBrightCyan": "#4cd1e0", + "terminal.ansiBrightGreen": "#a5e075", + "terminal.ansiBrightMagenta": "#de73ff", + "terminal.ansiBrightRed": "#ff616e", + "terminal.ansiBrightWhite": "#e6e6e6", + "terminal.ansiBrightYellow": "#f0a45d", + "terminal.ansiCyan": "#42b3c2", + "terminal.ansiGreen": "#8cc265", + "terminal.ansiMagenta": "#c162de", + "terminal.ansiRed": "#e05561", + "terminal.ansiWhite": "#d7dae0", + "terminal.ansiYellow": "#d18f52", + "terminal.background": "#282c34", + "terminal.border": "#3e4452", + "terminal.foreground": "#abb2bf", + "terminal.selectionBackground": "#abb2bf30", + "textBlockQuote.background": "#2e3440", + "textBlockQuote.border": "#4b5362", + "textLink.foreground": "#61afef", + "textPreformat.foreground": "#d19a66", + "titleBar.activeBackground": "#282c34", + "titleBar.activeForeground": "#9da5b4", + "titleBar.inactiveBackground": "#282c34", + "titleBar.inactiveForeground": "#6b717d", + "tree.indentGuidesStroke": "#ffffff1d", + "walkThrough.embeddedEditorBackground": "#2e3440", + "welcomePage.buttonHoverBackground": "#404754" + } +} diff --git a/src/lib/shiki/themes/poimandres.json b/src/lib/shiki/themes/poimandres.json new file mode 100644 index 0000000..92fac99 --- /dev/null +++ b/src/lib/shiki/themes/poimandres.json @@ -0,0 +1,1218 @@ +{ + "name": "poimandres", + "type": "dark", + "colors": { + "activityBar.background": "#1b1e28", + "activityBar.foreground": "#a6accd", + "activityBarBadge.background": "#303340", + "activityBarBadge.foreground": "#e4f0fb", + "badge.background": "#303340", + "badge.foreground": "#e4f0fb", + "button.background": "#303340", + "diffEditor.insertedTextBackground": "#50647715", + "diffEditor.removedTextBackground": "#d0679d20", + "dropdown.background": "#1b1e28", + "dropdown.border": "#ffffff10", + "editor.background": "#1b1e28", + "editor.findMatchBackground": "#ADD7FF40", + "editor.findMatchBorder": "#ADD7FF", + "editor.findMatchHighlightBackground": "#ADD7FF40", + "editor.foreground": "#a6accd", + "editor.lineHighlightBackground": "#717cb425", + "editor.lineHighlightBorder": "#00000000", + "editor.selectionBackground": "#717cb425", + "editor.selectionHighlightBackground": "#00000000", + "editor.selectionHighlightBorder": "#ADD7FF80", + "editor.wordHighlightBackground": "#ADD7FF20", + "editor.wordHighlightStrongBackground": "#ADD7FF40", + "editorBracketMatch.border": "#e4f0fb40", + "editorCursor.foreground": "#a6accd", + "editorGroup.border": "#00000030", + "editorGroupHeader.tabsBackground": "#1b1e28", + "editorHoverWidget.background": "#1b1e28", + "editorHoverWidget.border": "#ffffff10", + "editorIndentGuide.background": "#303340", + "editorLineNumber.foreground": "#767c9d50", + "editorLink.activeForeground": "#ADD7FF", + "editorSuggestWidget.background": "#1b1e28", + "editorSuggestWidget.border": "#ffffff10", + "editorSuggestWidget.foreground": "#a6accd", + "editorSuggestWidget.highlightForeground": "#5DE4c7", + "editorSuggestWidget.selectedBackground": "#00000050", + "editorWidget.background": "#1b1e28", + "editor.findRangeHighlightBackground": "#ADD7FF40", + "editor.focusedStackFrameHighlightBackground": "#7abd7a4d", + "editor.foldBackground": "#717cb40b", + "editor.hoverHighlightBackground": "#264f7840", + "editor.inactiveSelectionBackground": "#717cb425", + "editor.linkedEditingBackground": "#d0679d4d", + "editor.rangeHighlightBackground": "#ffffff0b", + "editor.snippetFinalTabstopHighlightBorder": "#525252", + "editor.snippetTabstopHighlightBackground": "#7c7c7c4d", + "editor.stackFrameHighlightBackground": "#ffff0033", + "editor.symbolHighlightBackground": "#89ddff60", + "editorBracketMatch.background": "#00000000", + "editorCodeLens.foreground": "#a6accd", + "editorError.foreground": "#d0679d", + "editorGroup.dropBackground": "#7390AA80", + "editorGroupHeader.noTabsBackground": "#1b1e28", + "editorGutter.background": "#1b1e28", + "editorGutter.commentRangeForeground": "#a6accd", + "editorGutter.foldingControlForeground": "#a6accd", + "editorGutter.addedBackground": "#5fb3a140", + "editorGutter.deletedBackground": "#d0679d40", + "editorGutter.modifiedBackground": "#ADD7FF20", + "editorHint.foreground": "#7390AAb3", + "editorHoverWidget.foreground": "#a6accd", + "editorHoverWidget.statusBarBackground": "#202430", + "editorIndentGuide.activeBackground": "#e3e4e229", + "editorInfo.foreground": "#ADD7FF", + "editorInlineHint.background": "#a6accd", + "editorInlineHint.foreground": "#1b1e28", + "editorLightBulb.foreground": "#fffac2", + "editorLightBulbAutoFix.foreground": "#ADD7FF", + "editorLineNumber.activeForeground": "#a6accd", + "editorMarkerNavigation.background": "#2d2d30", + "editorMarkerNavigationError.background": "#d0679d", + "editorMarkerNavigationInfo.background": "#ADD7FF", + "editorMarkerNavigationWarning.background": "#fffac2", + "editorOverviewRuler.addedForeground": "#5fb3a199", + "editorOverviewRuler.border": "#00000000", + "editorOverviewRuler.bracketMatchForeground": "#a0a0a0", + "editorOverviewRuler.commonContentForeground": "#a6accd66", + "editorOverviewRuler.currentContentForeground": "#5fb3a180", + "editorOverviewRuler.deletedForeground": "#d0679d99", + "editorOverviewRuler.errorForeground": "#d0679db3", + "editorOverviewRuler.findMatchForeground": "#e4f0fb20", + "editorOverviewRuler.incomingContentForeground": "#89ddff80", + "editorOverviewRuler.infoForeground": "#ADD7FF", + "editorOverviewRuler.modifiedForeground": "#89ddff99", + "editorOverviewRuler.rangeHighlightForeground": "#89ddff99", + "editorOverviewRuler.selectionHighlightForeground": "#a0a0a0cc", + "editorOverviewRuler.warningForeground": "#fffac2", + "editorOverviewRuler.wordHighlightForeground": "#a0a0a0cc", + "editorOverviewRuler.wordHighlightStrongForeground": "#89ddffcc", + "editorPane.background": "#1b1e28", + "editorRuler.foreground": "#e4f0fb10", + "editorUnnecessaryCode.opacity": "#000000aa", + "editorWarning.foreground": "#fffac2", + "editorWhitespace.foreground": "#303340", + "editorWidget.border": "#a6accd", + "editorWidget.foreground": "#a6accd", + "extensionButton.prominentBackground": "#30334090", + "extensionButton.prominentHoverBackground": "#303340", + "focusBorder": "#00000000", + "input.background": "#ffffff05", + "input.border": "#ffffff10", + "input.foreground": "#e4f0fb", + "input.placeholderForeground": "#a6accd60", + "inputValidation.errorBorder": "#d0679d", + "inputValidation.errorForeground": "#d0679d", + "inputValidation.infoBorder": "#89ddff", + "inputValidation.warningBorder": "#fffac2", + "notifications.background": "#1b1e28", + "notifications.foreground": "#e4f0fb", + "panel.border": "#00000030", + "panelTitle.activeForeground": "#a6accd", + "peekView.border": "#00000030", + "peekViewEditor.background": "#a6accd05", + "peekViewEditorGutter.background": "#a6accd05", + "peekViewResult.background": "#a6accd05", + "peekViewTitle.background": "#a6accd05", + "peekViewTitleDescription.foreground": "#a6accd60", + "scrollbar.shadow": "#00000000", + "scrollbarSlider.activeBackground": "#a6accd25", + "scrollbarSlider.background": "#00000080", + "scrollbarSlider.hoverBackground": "#a6accd25", + "selection.background": "#a6accd", + "sideBar.background": "#1b1e28", + "sideBar.foreground": "#767c9d", + "sideBarSectionHeader.background": "#1b1e28", + "sideBarTitle.foreground": "#a6accd", + "statusBar.background": "#1b1e28", + "statusBar.foreground": "#a6accd", + "statusBar.noFolderBackground": "#1b1e28", + "tab.activeBackground": "#30334080", + "tab.activeForeground": "#e4f0fb", + "tab.border": "#00000000", + "tab.inactiveBackground": "#1b1e28", + "tab.inactiveForeground": "#767c9d", + "tab.unfocusedActiveForeground": "#a6accd", + "tab.activeModifiedBorder": "#ADD7FF", + "tab.inactiveModifiedBorder": "#ADD7FF80", + "tab.lastPinnedBorder": "#00000000", + "tab.unfocusedActiveBackground": "#1b1e28", + "tab.unfocusedActiveModifiedBorder": "#ADD7FF40", + "tab.unfocusedInactiveBackground": "#1b1e28", + "tab.unfocusedInactiveForeground": "#a6accd80", + "tab.unfocusedInactiveModifiedBorder": "#ADD7FF40", + "terminal.ansiBlack": "#1b1e28", + "terminal.ansiBlue": "#89ddff", + "terminal.ansiBrightBlack": "#a6accd", + "terminal.ansiBrightBlue": "#ADD7FF", + "terminal.ansiBrightCyan": "#ADD7FF", + "terminal.ansiBrightGreen": "#5DE4c7", + "terminal.ansiBrightMagenta": "#f087bd", + "terminal.ansiBrightRed": "#d0679d", + "terminal.ansiBrightWhite": "#ffffff", + "terminal.ansiBrightYellow": "#fffac2", + "terminal.ansiCyan": "#89ddff", + "terminal.ansiGreen": "#5DE4c7", + "terminal.ansiMagenta": "#f087bd", + "terminal.ansiRed": "#d0679d", + "terminal.ansiWhite": "#ffffff", + "terminal.ansiYellow": "#fffac2", + "textLink.activeForeground": "#ADD7FF", + "textLink.foreground": "#ADD7FF", + "titleBar.activeBackground": "#1b1e28", + "titleBar.activeForeground": "#a6accd", + "titleBar.inactiveBackground": "#1b1e28", + "titleBar.inactiveForeground": "#767c9d", + "tree.indentGuidesStroke": "#303340", + "widget.shadow": "#00000030", + "activityBar.activeBorder": "#a6accd", + "activityBar.dropBorder": "#a6accd", + "activityBar.inactiveForeground": "#a6accd66", + "breadcrumb.activeSelectionForeground": "#e4f0fb", + "breadcrumb.background": "#00000000", + "breadcrumb.focusForeground": "#e4f0fb", + "breadcrumb.foreground": "#767c9dcc", + "breadcrumbPicker.background": "#1b1e28", + "button.foreground": "#ffffff", + "button.hoverBackground": "#50647750", + "button.secondaryBackground": "#a6accd", + "button.secondaryForeground": "#ffffff", + "button.secondaryHoverBackground": "#a6accd", + "charts.blue": "#ADD7FF", + "charts.foreground": "#a6accd", + "charts.green": "#5DE4c7", + "charts.lines": "#a6accd80", + "charts.orange": "#89ddff", + "charts.purple": "#f087bd", + "charts.red": "#d0679d", + "charts.yellow": "#fffac2", + "checkbox.background": "#1b1e28", + "checkbox.border": "#ffffff10", + "checkbox.foreground": "#e4f0fb", + "debugConsole.errorForeground": "#d0679d", + "debugConsole.infoForeground": "#ADD7FF", + "debugConsole.sourceForeground": "#a6accd", + "debugConsole.warningForeground": "#fffac2", + "debugConsoleInputIcon.foreground": "#a6accd", + "debugExceptionWidget.background": "#d0679d", + "debugExceptionWidget.border": "#d0679d", + "debugIcon.breakpointCurrentStackframeForeground": "#fffac2", + "debugIcon.breakpointDisabledForeground": "#7390AA", + "debugIcon.breakpointForeground": "#d0679d", + "debugIcon.breakpointStackframeForeground": "#5fb3a1", + "debugIcon.breakpointUnverifiedForeground": "#7390AA", + "debugIcon.continueForeground": "#ADD7FF", + "debugIcon.disconnectForeground": "#d0679d", + "debugIcon.pauseForeground": "#ADD7FF", + "debugIcon.restartForeground": "#5fb3a1", + "debugIcon.startForeground": "#5fb3a1", + "debugIcon.stepBackForeground": "#ADD7FF", + "debugIcon.stepIntoForeground": "#ADD7FF", + "debugIcon.stepOutForeground": "#ADD7FF", + "debugIcon.stepOverForeground": "#ADD7FF", + "debugIcon.stopForeground": "#d0679d", + "debugTokenExpression.boolean": "#89ddff", + "debugTokenExpression.error": "#d0679d", + "debugTokenExpression.name": "#e4f0fb", + "debugTokenExpression.number": "#5fb3a1", + "debugTokenExpression.string": "#89ddff", + "debugTokenExpression.value": "#a6accd99", + "debugToolBar.background": "#303340", + "debugView.exceptionLabelBackground": "#d0679d", + "debugView.exceptionLabelForeground": "#e4f0fb", + "debugView.stateLabelBackground": "#303340", + "debugView.stateLabelForeground": "#a6accd", + "debugView.valueChangedHighlight": "#89ddff", + "descriptionForeground": "#a6accdb3", + "diffEditor.diagonalFill": "#a6accd33", + "dropdown.foreground": "#e4f0fb", + "errorForeground": "#d0679d", + "extensionBadge.remoteBackground": "#303340", + "extensionBadge.remoteForeground": "#e4f0fb", + "extensionButton.prominentForeground": "#ffffff", + "extensionIcon.starForeground": "#fffac2", + "foreground": "#a6accd", + "gitDecoration.addedResourceForeground": "#5fb3a1", + "gitDecoration.conflictingResourceForeground": "#d0679d", + "gitDecoration.deletedResourceForeground": "#d0679d", + "gitDecoration.ignoredResourceForeground": "#767c9d70", + "gitDecoration.modifiedResourceForeground": "#ADD7FF", + "gitDecoration.renamedResourceForeground": "#5DE4c7", + "gitDecoration.stageDeletedResourceForeground": "#d0679d", + "gitDecoration.stageModifiedResourceForeground": "#ADD7FF", + "gitDecoration.submoduleResourceForeground": "#89ddff", + "gitDecoration.untrackedResourceForeground": "#5DE4c7", + "icon.foreground": "#a6accd", + "imagePreview.border": "#303340", + "inputOption.activeBackground": "#00000000", + "inputOption.activeBorder": "#00000000", + "inputOption.activeForeground": "#ffffff", + "inputValidation.errorBackground": "#1b1e28", + "inputValidation.infoBackground": "#506477", + "inputValidation.warningBackground": "#506477", + "list.deemphasizedForeground": "#767c9d", + "list.dropBackground": "#506477", + "list.filterMatchBackground": "#89ddff60", + "list.focusOutline": "#00000000", + "list.invalidItemForeground": "#fffac2", + "list.warningForeground": "#fffac2", + "listFilterWidget.background": "#303340", + "listFilterWidget.noMatchesOutline": "#d0679d", + "listFilterWidget.outline": "#00000000", + "list.activeSelectionBackground": "#30334080", + "list.activeSelectionForeground": "#e4f0fb", + "list.errorForeground": "#d0679d", + "list.focusBackground": "#30334080", + "list.focusForeground": "#a6accd", + "list.highlightForeground": "#5fb3a1", + "list.hoverBackground": "#30334080", + "list.hoverForeground": "#e4f0fb", + "list.inactiveSelectionBackground": "#30334080", + "list.inactiveSelectionForeground": "#e4f0fb", + "menu.background": "#1b1e28", + "menu.foreground": "#e4f0fb", + "menu.selectionBackground": "#303340", + "menu.selectionForeground": "#7390AA", + "menu.separatorBackground": "#767c9d", + "menubar.selectionBackground": "#717cb425", + "menubar.selectionForeground": "#a6accd", + "merge.commonContentBackground": "#a6accd29", + "merge.commonHeaderBackground": "#a6accd66", + "merge.currentContentBackground": "#5fb3a133", + "merge.currentHeaderBackground": "#5fb3a180", + "merge.incomingContentBackground": "#89ddff33", + "merge.incomingHeaderBackground": "#89ddff80", + "minimap.errorHighlight": "#d0679d", + "minimap.findMatchHighlight": "#ADD7FF", + "minimap.selectionHighlight": "#e4f0fb40", + "minimap.warningHighlight": "#fffac2", + "minimapGutter.addedBackground": "#5fb3a180", + "minimapGutter.deletedBackground": "#d0679d80", + "minimapGutter.modifiedBackground": "#ADD7FF80", + "minimapSlider.activeBackground": "#a6accd30", + "minimapSlider.background": "#a6accd20", + "minimapSlider.hoverBackground": "#a6accd30", + "notebook.cellBorderColor": "#1b1e28", + "notebook.cellInsertionIndicator": "#00000000", + "notebook.cellStatusBarItemHoverBackground": "#ffffff26", + "notebook.cellToolbarSeparator": "#303340", + "notebook.focusedCellBorder": "#00000000", + "notebook.focusedEditorBorder": "#00000000", + "notebook.focusedRowBorder": "#00000000", + "notebook.inactiveFocusedCellBorder": "#00000000", + "notebook.outputContainerBackgroundColor": "#1b1e28", + "notebook.rowHoverBackground": "#30334000", + "notebook.selectedCellBackground": "#303340", + "notebook.selectedCellBorder": "#1b1e28", + "notebook.symbolHighlightBackground": "#ffffff0b", + "notebookScrollbarSlider.activeBackground": "#a6accd25", + "notebookScrollbarSlider.background": "#00000050", + "notebookScrollbarSlider.hoverBackground": "#a6accd25", + "notebookStatusErrorIcon.foreground": "#d0679d", + "notebookStatusRunningIcon.foreground": "#a6accd", + "notebookStatusSuccessIcon.foreground": "#5fb3a1", + "notificationCenterHeader.background": "#303340", + "notificationLink.foreground": "#ADD7FF", + "notifications.border": "#303340", + "notificationsErrorIcon.foreground": "#d0679d", + "notificationsInfoIcon.foreground": "#ADD7FF", + "notificationsWarningIcon.foreground": "#fffac2", + "panel.background": "#1b1e28", + "panel.dropBorder": "#a6accd", + "panelSection.border": "#1b1e28", + "panelSection.dropBackground": "#7390AA80", + "panelSectionHeader.background": "#303340", + "panelTitle.activeBorder": "#a6accd", + "panelTitle.inactiveForeground": "#a6accd99", + "peekViewEditor.matchHighlightBackground": "#303340", + "peekViewResult.fileForeground": "#ffffff", + "peekViewResult.lineForeground": "#a6accd", + "peekViewResult.matchHighlightBackground": "#303340", + "peekViewResult.selectionBackground": "#717cb425", + "peekViewResult.selectionForeground": "#ffffff", + "peekViewTitleLabel.foreground": "#ffffff", + "pickerGroup.border": "#a6accd", + "pickerGroup.foreground": "#89ddff", + "problemsErrorIcon.foreground": "#d0679d", + "problemsInfoIcon.foreground": "#ADD7FF", + "problemsWarningIcon.foreground": "#fffac2", + "progressBar.background": "#89ddff", + "quickInput.background": "#1b1e28", + "quickInput.foreground": "#a6accd", + "quickInputList.focusBackground": "#a6accd10", + "quickInputTitle.background": "#ffffff1b", + "sash.hoverBorder": "#00000000", + "scm.providerBorder": "#e4f0fb10", + "searchEditor.findMatchBackground": "#ADD7FF50", + "searchEditor.textInputBorder": "#ffffff10", + "settings.checkboxBackground": "#1b1e28", + "settings.checkboxBorder": "#ffffff10", + "settings.checkboxForeground": "#e4f0fb", + "settings.dropdownBackground": "#1b1e28", + "settings.dropdownBorder": "#ffffff10", + "settings.dropdownForeground": "#e4f0fb", + "settings.dropdownListBorder": "#e4f0fb10", + "settings.focusedRowBackground": "#00000000", + "settings.headerForeground": "#e4f0fb", + "settings.modifiedItemIndicator": "#ADD7FF", + "settings.numberInputBackground": "#ffffff05", + "settings.numberInputBorder": "#ffffff10", + "settings.numberInputForeground": "#e4f0fb", + "settings.textInputBackground": "#ffffff05", + "settings.textInputBorder": "#ffffff10", + "settings.textInputForeground": "#e4f0fb", + "sideBar.dropBackground": "#7390AA80", + "sideBarSectionHeader.foreground": "#a6accd", + "statusBar.debuggingBackground": "#303340", + "statusBar.debuggingForeground": "#ffffff", + "statusBar.noFolderForeground": "#a6accd", + "statusBarItem.activeBackground": "#ffffff2e", + "statusBarItem.errorBackground": "#d0679d", + "statusBarItem.errorForeground": "#ffffff", + "statusBarItem.hoverBackground": "#ffffff1f", + "statusBarItem.prominentBackground": "#00000080", + "statusBarItem.prominentForeground": "#a6accd", + "statusBarItem.prominentHoverBackground": "#0000004d", + "statusBarItem.remoteBackground": "#303340", + "statusBarItem.remoteForeground": "#e4f0fb", + "symbolIcon.arrayForeground": "#a6accd", + "symbolIcon.booleanForeground": "#a6accd", + "symbolIcon.classForeground": "#fffac2", + "symbolIcon.colorForeground": "#a6accd", + "symbolIcon.constantForeground": "#a6accd", + "symbolIcon.constructorForeground": "#f087bd", + "symbolIcon.enumeratorForeground": "#fffac2", + "symbolIcon.enumeratorMemberForeground": "#ADD7FF", + "symbolIcon.eventForeground": "#fffac2", + "symbolIcon.fieldForeground": "#ADD7FF", + "symbolIcon.fileForeground": "#a6accd", + "symbolIcon.folderForeground": "#a6accd", + "symbolIcon.functionForeground": "#f087bd", + "symbolIcon.interfaceForeground": "#ADD7FF", + "symbolIcon.keyForeground": "#a6accd", + "symbolIcon.keywordForeground": "#a6accd", + "symbolIcon.methodForeground": "#f087bd", + "symbolIcon.moduleForeground": "#a6accd", + "symbolIcon.namespaceForeground": "#a6accd", + "symbolIcon.nullForeground": "#a6accd", + "symbolIcon.numberForeground": "#a6accd", + "symbolIcon.objectForeground": "#a6accd", + "symbolIcon.operatorForeground": "#a6accd", + "symbolIcon.packageForeground": "#a6accd", + "symbolIcon.propertyForeground": "#a6accd", + "symbolIcon.referenceForeground": "#a6accd", + "symbolIcon.snippetForeground": "#a6accd", + "symbolIcon.stringForeground": "#a6accd", + "symbolIcon.structForeground": "#a6accd", + "symbolIcon.textForeground": "#a6accd", + "symbolIcon.typeParameterForeground": "#a6accd", + "symbolIcon.unitForeground": "#a6accd", + "symbolIcon.variableForeground": "#ADD7FF", + "terminal.border": "#00000000", + "terminal.foreground": "#a6accd", + "terminal.selectionBackground": "#717cb425", + "terminalCommandDecoration.errorBackground": "#d0679d", + "terminalCommandDecoration.successBackground": "#5DE4c7", + "terminalCommandDecoration.defaultBackground": "#767c9d", + "testing.iconErrored": "#d0679d", + "testing.iconFailed": "#d0679d", + "testing.iconPassed": "#5DE4c7", + "testing.iconQueued": "#fffac2", + "testing.iconSkipped": "#7390AA", + "testing.iconUnset": "#7390AA", + "testing.message.error.decorationForeground": "#d0679d", + "testing.message.error.lineBackground": "#d0679d33", + "testing.message.hint.decorationForeground": "#7390AAb3", + "testing.message.info.decorationForeground": "#ADD7FF", + "testing.message.info.lineBackground": "#89ddff33", + "testing.message.warning.decorationForeground": "#fffac2", + "testing.message.warning.lineBackground": "#fffac233", + "testing.peekBorder": "#d0679d", + "testing.runAction": "#5DE4c7", + "textBlockQuote.background": "#7390AA1a", + "textBlockQuote.border": "#89ddff80", + "textCodeBlock.background": "#00000050", + "textPreformat.foreground": "#e4f0fb", + "textSeparator.foreground": "#ffffff2e", + "tree.tableColumnsBorder": "#a6accd20", + "welcomePage.progress.background": "#ffffff05", + "welcomePage.progress.foreground": "#5fb3a1", + "welcomePage.tileBackground": "#1b1e28", + "welcomePage.tileHoverBackground": "#303340" + }, + "tokenColors": [ + { + "scope": ["comment", "punctuation.definition.comment"], + "settings": { + "foreground": "#767c9dB0", + "fontStyle": "italic" + } + }, + { + "scope": "meta.parameters comment.block", + "settings": { + "foreground": "#a6accd", + "fontStyle": "italic" + } + }, + { + "scope": [ + "variable.other.constant.object", + "variable.other.readwrite.alias", + "meta.import variable.other.readwrite" + ], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": ["variable.other", "support.type.object"], + "settings": { + "foreground": "#e4f0fb" + } + }, + { + "scope": [ + "variable.other.object.property", + "variable.other.property", + "support.variable.property" + ], + "settings": { + "foreground": "#e4f0fb" + } + }, + { + "scope": ["entity.name.function.method", "string.unquoted", "meta.object.member"], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": [ + "variable - meta.import", + "constant.other.placeholder", + "meta.object-literal.key-meta.object.member" + ], + "settings": { + "foreground": "#e4f0fb" + } + }, + { + "scope": ["keyword.control.flow"], + "settings": { + "foreground": "#5DE4c7c0" + } + }, + { + "scope": ["keyword.operator.new", "keyword.control.new"], + "settings": { + "foreground": "#5DE4c7" + } + }, + { + "scope": [ + "variable.language.this", + "storage.modifier.async", + "storage.modifier", + "variable.language.super" + ], + "settings": { + "foreground": "#5DE4c7" + } + }, + { + "scope": [ + "support.class.error", + "keyword.control.trycatch", + "keyword.operator.expression.delete", + "keyword.operator.expression.void", + "keyword.operator.void", + "keyword.operator.delete", + "constant.language.null", + "constant.language.boolean.false", + "constant.language.undefined" + ], + "settings": { + "foreground": "#d0679d" + } + }, + { + "scope": [ + "variable.parameter", + "variable.other.readwrite.js", + "meta.definition.variable variable.other.constant", + "meta.definition.variable variable.other.readwrite" + ], + "settings": { + "foreground": "#e4f0fb" + } + }, + { + "scope": ["constant.other.color"], + "settings": { + "foreground": "#ffffff" + } + }, + { + "scope": ["invalid", "invalid.illegal"], + "settings": { + "foreground": "#d0679d" + } + }, + { + "scope": ["invalid.deprecated"], + "settings": { + "foreground": "#d0679d" + } + }, + { + "scope": ["keyword.control", "keyword"], + "settings": { + "foreground": "#a6accd" + } + }, + { + "scope": ["keyword.operator", "storage.type"], + "settings": { + "foreground": "#91B4D5" + } + }, + { + "scope": [ + "keyword.control.module", + "keyword.control.import", + "keyword.control.export", + "keyword.control.default", + "meta.import", + "meta.export" + ], + "settings": { + "foreground": "#5DE4c7" + } + }, + { + "scope": ["Keyword", "Storage"], + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": ["keyword-meta.export"], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": ["meta.brace", "punctuation", "keyword.operator.existential"], + "settings": { + "foreground": "#a6accd" + } + }, + { + "scope": [ + "constant.other.color", + "meta.tag", + "punctuation.definition.tag", + "punctuation.separator.inheritance.php", + "punctuation.definition.tag.html", + "punctuation.definition.tag.begin.html", + "punctuation.definition.tag.end.html", + "punctuation.section.embedded", + "keyword.other.template", + "keyword.other.substitution", + "meta.objectliteral" + ], + "settings": { + "foreground": "#e4f0fb" + } + }, + { + "scope": ["support.class.component"], + "settings": { + "foreground": "#5DE4c7" + } + }, + { + "scope": ["entity.name.tag", "entity.name.tag", "meta.tag.sgml", "markup.deleted.git_gutter"], + "settings": { + "foreground": "#5DE4c7" + } + }, + { + "name": "Function Call", + "scope": "variable.function, source meta.function-call entity.name.function, source meta.function-call entity.name.function, source meta.method-call entity.name.function, meta.class meta.group.braces.curly meta.function-call variable.function, meta.class meta.field.declaration meta.function-call entity.name.function, variable.function.constructor, meta.block meta.var.expr meta.function-call entity.name.function, support.function.console, meta.function-call support.function, meta.property.class variable.other.class, punctuation.definition.entity.css", + "settings": { + "foreground": "#e4f0fbd0" + } + }, + { + "name": "Function/Class Name", + "scope": "entity.name.function, meta.class entity.name.class, meta.class entity.name.type.class, meta.class meta.function-call variable.function, keyword.other.important", + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": ["source.cpp meta.block variable.other"], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": ["support.other.variable", "string.other.link"], + "settings": { + "foreground": "#5DE4c7" + } + }, + { + "scope": [ + "constant.numeric", + "support.constant", + "constant.character", + "constant.escape", + "keyword.other.unit", + "keyword.other", + "string", + "constant.language", + "constant.other.symbol", + "constant.other.key", + "markup.heading", + "markup.inserted.git_gutter", + "meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js", + "text.html.derivative" + ], + "settings": { + "foreground": "#5DE4c7" + } + }, + { + "scope": ["entity.other.inherited-class"], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": ["meta.type.declaration"], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": ["entity.name.type.alias"], + "settings": { + "foreground": "#a6accd" + } + }, + { + "scope": ["keyword.control.as", "entity.name.type", "support.type"], + "settings": { + "foreground": "#a6accdC0" + } + }, + { + "scope": [ + "entity.name", + "support.orther.namespace.use.php", + "meta.use.php", + "support.other.namespace.php", + "markup.changed.git_gutter", + "support.type.sys-types" + ], + "settings": { + "foreground": "#91B4D5" + } + }, + { + "scope": ["support.class", "support.constant", "variable.other.constant.object"], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": [ + "source.css support.type.property-name", + "source.sass support.type.property-name", + "source.scss support.type.property-name", + "source.less support.type.property-name", + "source.stylus support.type.property-name", + "source.postcss support.type.property-name" + ], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": ["entity.name.module.js", "variable.import.parameter.js", "variable.other.class.js"], + "settings": { + "foreground": "#e4f0fb" + } + }, + { + "scope": ["variable.language"], + "settings": { + "foreground": "#ADD7FF", + "fontStyle": "italic" + } + }, + { + "scope": ["entity.name.method.js"], + "settings": { + "foreground": "#91B4D5", + "fontStyle": "italic" + } + }, + { + "scope": ["meta.class-method.js entity.name.function.js", "variable.function.constructor"], + "settings": { + "foreground": "#91B4D5" + } + }, + { + "scope": ["entity.other.attribute-name"], + "settings": { + "foreground": "#91B4D5", + "fontStyle": "italic" + } + }, + { + "scope": [ + "text.html.basic entity.other.attribute-name.html", + "text.html.basic entity.other.attribute-name" + ], + "settings": { + "foreground": "#5fb3a1", + "fontStyle": "italic" + } + }, + { + "scope": ["entity.other.attribute-name.class"], + "settings": { + "foreground": "#5fb3a1" + } + }, + { + "scope": ["source.sass keyword.control"], + "settings": { + "foreground": "#42675A" + } + }, + { + "scope": ["markup.inserted"], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": ["markup.deleted"], + "settings": { + "foreground": "#506477" + } + }, + { + "scope": ["markup.changed"], + "settings": { + "foreground": "#91B4D5" + } + }, + { + "scope": ["string.regexp"], + "settings": { + "foreground": "#5fb3a1" + } + }, + { + "scope": ["constant.character.escape"], + "settings": { + "foreground": "#5fb3a1" + } + }, + { + "scope": ["*url*", "*link*", "*uri*"], + "settings": { + "foreground": "#ADD7FF", + "fontStyle": "underline" + } + }, + { + "scope": [ + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js" + ], + "settings": { + "foreground": "#42675A", + "fontStyle": "italic" + } + }, + { + "scope": ["source.js constant.other.object.key.js string.unquoted.label.js"], + "settings": { + "foreground": "#5fb3a1", + "fontStyle": "italic" + } + }, + { + "scope": ["source.json meta.structure.dictionary.json support.type.property-name.json"], + "settings": { + "foreground": "#e4f0fb" + } + }, + { + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#91B4D5" + } + }, + { + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#7390AA" + } + }, + { + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#e4f0fb" + } + }, + { + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#91B4D5" + } + }, + { + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#7390AA" + } + }, + { + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#e4f0fb" + } + }, + { + "scope": ["text.html.markdown", "punctuation.definition.list_item.markdown"], + "settings": { + "foreground": "#e4f0fb" + } + }, + { + "scope": ["text.html.markdown markup.inline.raw.markdown"], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": [ + "text.html.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown" + ], + "settings": { + "foreground": "#91B4D5" + } + }, + { + "scope": [ + "markdown.heading", + "markup.heading | markup.heading entity.name", + "markup.heading.markdown punctuation.definition.heading.markdown" + ], + "settings": { + "foreground": "#e4f0fb" + } + }, + { + "scope": ["markup.italic"], + "settings": { + "foreground": "#7390AA", + "fontStyle": "italic" + } + }, + { + "scope": ["markup.bold", "markup.bold string"], + "settings": { + "foreground": "#7390AA", + "fontStyle": "bold" + } + }, + { + "scope": [ + "markup.bold markup.italic", + "markup.italic markup.bold", + "markup.quote markup.bold", + "markup.bold markup.italic string", + "markup.italic markup.bold string", + "markup.quote markup.bold string" + ], + "settings": { + "foreground": "#7390AA", + "fontStyle": "bold" + } + }, + { + "scope": ["markup.underline"], + "settings": { + "foreground": "#7390AA", + "fontStyle": "underline" + } + }, + { + "scope": ["markup.strike"], + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": ["markup.quote punctuation.definition.blockquote.markdown"], + "settings": { + "foreground": "#5DE4c7" + } + }, + { + "scope": ["markup.quote"], + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": ["string.other.link.title.markdown"], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": ["string.other.link.description.title.markdown"], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": ["constant.other.reference.link.markdown"], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": ["markup.raw.block"], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": ["markup.raw.block.fenced.markdown"], + "settings": { + "foreground": "#50647750" + } + }, + { + "scope": ["punctuation.definition.fenced.markdown"], + "settings": { + "foreground": "#50647750" + } + }, + { + "scope": [ + "markup.raw.block.fenced.markdown", + "variable.language.fenced.markdown", + "punctuation.section.class.end" + ], + "settings": { + "foreground": "#91B4D5" + } + }, + { + "scope": ["variable.language.fenced.markdown"], + "settings": { + "foreground": "#91B4D5" + } + }, + { + "scope": ["meta.separator"], + "settings": { + "foreground": "#7390AA", + "fontStyle": "bold" + } + }, + { + "scope": ["markup.table"], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": "token.info-token", + "settings": { + "foreground": "#89ddff" + } + }, + { + "scope": "token.warn-token", + "settings": { + "foreground": "#fffac2" + } + }, + { + "scope": "token.error-token", + "settings": { + "foreground": "#d0679d" + } + }, + { + "scope": "token.debug-token", + "settings": { + "foreground": "#e4f0fb" + } + }, + { + "scope": [ + "entity.name.section.markdown", + "markup.heading.setext.1.markdown", + "markup.heading.setext.2.markdown" + ], + "settings": { + "foreground": "#e4f0fb", + "fontStyle": "bold" + } + }, + { + "scope": "meta.paragraph.markdown", + "settings": { + "foreground": "#e4f0fbd0" + } + }, + { + "scope": ["punctuation.definition.from-file.diff", "meta.diff.header.from-file"], + "settings": { + "foreground": "#506477" + } + }, + { + "scope": "markup.inline.raw.string.markdown", + "settings": { + "foreground": "#7390AA" + } + }, + { + "scope": "meta.separator.markdown", + "settings": { + "foreground": "#767c9d" + } + }, + { + "scope": "markup.bold.markdown", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "markup.italic.markdown", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": [ + "beginning.punctuation.definition.list.markdown", + "punctuation.definition.list.begin.markdown", + "markup.list.unnumbered.markdown" + ], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": [ + "string.other.link.description.title.markdown punctuation.definition.string.markdown", + "meta.link.inline.markdown string.other.link.description.title.markdown", + "string.other.link.description.title.markdown punctuation.definition.string.begin.markdown", + "string.other.link.description.title.markdown punctuation.definition.string.end.markdown", + "meta.image.inline.markdown string.other.link.description.title.markdown" + ], + "settings": { + "foreground": "#ADD7FF", + "fontStyle": "" + } + }, + { + "scope": [ + "meta.link.inline.markdown string.other.link.title.markdown", + "meta.link.reference.markdown string.other.link.title.markdown", + "meta.link.reference.def.markdown markup.underline.link.markdown" + ], + "settings": { + "foreground": "#ADD7FF", + "fontStyle": "underline" + } + }, + { + "scope": ["markup.underline.link.markdown", "string.other.link.description.title.markdown"], + "settings": { + "foreground": "#5DE4c7" + } + }, + { + "scope": ["fenced_code.block.language", "markup.inline.raw.markdown"], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": [ + "punctuation.definition.markdown", + "punctuation.definition.raw.markdown", + "punctuation.definition.heading.markdown", + "punctuation.definition.bold.markdown", + "punctuation.definition.italic.markdown" + ], + "settings": { + "foreground": "#ADD7FF" + } + }, + { + "scope": ["source.ignore", "log.error", "log.exception"], + "settings": { + "foreground": "#d0679d" + } + }, + { + "scope": ["log.verbose"], + "settings": { + "foreground": "#a6accd" + } + } + ] +} diff --git a/src/lib/shiki/themes/rose-pine-dawn.json b/src/lib/shiki/themes/rose-pine-dawn.json new file mode 100644 index 0000000..9d10783 --- /dev/null +++ b/src/lib/shiki/themes/rose-pine-dawn.json @@ -0,0 +1,675 @@ +{ + "name": "rose-pine-dawn", + "type": "light", + "colors": { + "activityBar.activeBorder": "#575279", + "activityBar.background": "#faf4ed", + "activityBar.dropBorder": "#f2e9e1", + "activityBar.foreground": "#575279", + "activityBar.inactiveForeground": "#797593", + "activityBarBadge.background": "#d7827e", + "activityBarBadge.foreground": "#faf4ed", + "badge.background": "#d7827e", + "badge.foreground": "#faf4ed", + "banner.background": "#fffaf3", + "banner.foreground": "#575279", + "banner.iconForeground": "#797593", + "breadcrumb.activeSelectionForeground": "#d7827e", + "breadcrumb.background": "#faf4ed", + "breadcrumb.focusForeground": "#797593", + "breadcrumb.foreground": "#9893a5", + "breadcrumbPicker.background": "#fffaf3", + "button.background": "#d7827e", + "button.foreground": "#faf4ed", + "button.hoverBackground": "#d7827ee6", + "button.secondaryBackground": "#fffaf3", + "button.secondaryForeground": "#575279", + "button.secondaryHoverBackground": "#f2e9e1", + "charts.blue": "#56949f", + "charts.foreground": "#575279", + "charts.green": "#286983", + "charts.lines": "#797593", + "charts.orange": "#d7827e", + "charts.purple": "#907aa9", + "charts.red": "#b4637a", + "charts.yellow": "#ea9d34", + "checkbox.background": "#fffaf3", + "checkbox.border": "#6e6a8614", + "checkbox.foreground": "#575279", + "debugExceptionWidget.background": "#fffaf3", + "debugExceptionWidget.border": "#6e6a8614", + "debugIcon.breakpointCurrentStackframeForeground": "#797593", + "debugIcon.breakpointDisabledForeground": "#797593", + "debugIcon.breakpointForeground": "#797593", + "debugIcon.breakpointStackframeForeground": "#797593", + "debugIcon.breakpointUnverifiedForeground": "#797593", + "debugIcon.continueForeground": "#797593", + "debugIcon.disconnectForeground": "#797593", + "debugIcon.pauseForeground": "#797593", + "debugIcon.restartForeground": "#797593", + "debugIcon.startForeground": "#797593", + "debugIcon.stepBackForeground": "#797593", + "debugIcon.stepIntoForeground": "#797593", + "debugIcon.stepOutForeground": "#797593", + "debugIcon.stepOverForeground": "#797593", + "debugIcon.stopForeground": "#b4637a", + "debugToolBar.background": "#fffaf3", + "debugToolBar.border": "#f2e9e1", + "descriptionForeground": "#797593", + "diffEditor.border": "#f2e9e1", + "diffEditor.diagonalFill": "#6e6a8626", + "diffEditor.insertedLineBackground": "#56949f26", + "diffEditor.insertedTextBackground": "#56949f26", + "diffEditor.removedLineBackground": "#b4637a26", + "diffEditor.removedTextBackground": "#b4637a26", + "diffEditorOverview.insertedForeground": "#56949f80", + "diffEditorOverview.removedForeground": "#b4637a80", + "dropdown.background": "#fffaf3", + "dropdown.border": "#6e6a8614", + "dropdown.foreground": "#575279", + "dropdown.listBackground": "#fffaf3", + "editor.background": "#faf4ed", + "editor.findMatchBackground": "#6e6a8626", + "editor.findMatchHighlightBackground": "#6e6a8626", + "editor.findRangeHighlightBackground": "#6e6a8626", + "editor.findRangeHighlightBorder": "#0000", + "editor.focusedStackFrameHighlightBackground": "#6e6a8614", + "editor.foldBackground": "#fffaf3", + "editor.foreground": "#575279", + "editor.hoverHighlightBackground": "#0000", + "editor.inactiveSelectionBackground": "#6e6a860d", + "editor.inlineValuesBackground": "#0000", + "editor.inlineValuesForeground": "#797593", + "editor.lineHighlightBackground": "#6e6a860d", + "editor.lineHighlightBorder": "#0000", + "editor.linkedEditingBackground": "#fffaf3", + "editor.rangeHighlightBackground": "#6e6a860d", + "editor.selectionBackground": "#6e6a8614", + "editor.selectionForeground": "#575279", + "editor.selectionHighlightBackground": "#6e6a8614", + "editor.selectionHighlightBorder": "#faf4ed", + "editor.snippetFinalTabstopHighlightBackground": "#6e6a8614", + "editor.snippetFinalTabstopHighlightBorder": "#fffaf3", + "editor.snippetTabstopHighlightBackground": "#6e6a8614", + "editor.snippetTabstopHighlightBorder": "#fffaf3", + "editor.stackFrameHighlightBackground": "#6e6a8614", + "editor.symbolHighlightBackground": "#6e6a8614", + "editor.symbolHighlightBorder": "#0000", + "editor.wordHighlightBackground": "#6e6a8614", + "editor.wordHighlightBorder": "#0000", + "editor.wordHighlightStrongBackground": "#6e6a8614", + "editor.wordHighlightStrongBorder": "#6e6a8614", + "editorBracketHighlight.foreground1": "#b4637a80", + "editorBracketHighlight.foreground2": "#28698380", + "editorBracketHighlight.foreground3": "#ea9d3480", + "editorBracketHighlight.foreground4": "#56949f80", + "editorBracketHighlight.foreground5": "#d7827e80", + "editorBracketHighlight.foreground6": "#907aa980", + "editorBracketMatch.background": "#0000", + "editorBracketMatch.border": "#797593", + "editorBracketPairGuide.activeBackground1": "#286983", + "editorBracketPairGuide.activeBackground2": "#d7827e", + "editorBracketPairGuide.activeBackground3": "#907aa9", + "editorBracketPairGuide.activeBackground4": "#56949f", + "editorBracketPairGuide.activeBackground5": "#ea9d34", + "editorBracketPairGuide.activeBackground6": "#b4637a", + "editorBracketPairGuide.background1": "#28698380", + "editorBracketPairGuide.background2": "#d7827e80", + "editorBracketPairGuide.background3": "#907aa980", + "editorBracketPairGuide.background4": "#56949f80", + "editorBracketPairGuide.background5": "#ea9d3480", + "editorBracketPairGuide.background6": "#b4637a80", + "editorCodeLens.foreground": "#d7827e", + "editorCursor.background": "#575279", + "editorCursor.foreground": "#9893a5", + "editorError.border": "#0000", + "editorError.foreground": "#b4637a", + "editorGhostText.foreground": "#797593", + "editorGroup.border": "#0000", + "editorGroup.dropBackground": "#fffaf3", + "editorGroup.emptyBackground": "#0000", + "editorGroup.focusedEmptyBorder": "#0000", + "editorGroupHeader.noTabsBackground": "#0000", + "editorGroupHeader.tabsBackground": "#0000", + "editorGroupHeader.tabsBorder": "#0000", + "editorGutter.addedBackground": "#56949f", + "editorGutter.background": "#faf4ed", + "editorGutter.commentRangeForeground": "#797593", + "editorGutter.deletedBackground": "#b4637a", + "editorGutter.foldingControlForeground": "#907aa9", + "editorGutter.modifiedBackground": "#d7827e", + "editorHint.border": "#0000", + "editorHint.foreground": "#797593", + "editorHoverWidget.background": "#fffaf3", + "editorHoverWidget.border": "#9893a580", + "editorHoverWidget.foreground": "#797593", + "editorHoverWidget.highlightForeground": "#575279", + "editorHoverWidget.statusBarBackground": "#0000", + "editorIndentGuide.activeBackground": "#9893a5", + "editorIndentGuide.background": "#6e6a8626", + "editorInfo.border": "#f2e9e1", + "editorInfo.foreground": "#56949f", + "editorInlayHint.background": "#f2e9e1", + "editorInlayHint.foreground": "#797593", + "editorInlayHint.parameterBackground": "#f2e9e1", + "editorInlayHint.parameterForeground": "#907aa9", + "editorInlayHint.typeBackground": "#f2e9e1", + "editorInlayHint.typeForeground": "#56949f", + "editorLightBulb.foreground": "#286983", + "editorLightBulbAutoFix.foreground": "#d7827e", + "editorLineNumber.activeForeground": "#575279", + "editorLineNumber.foreground": "#797593", + "editorLink.activeForeground": "#d7827e", + "editorMarkerNavigation.background": "#fffaf3", + "editorMarkerNavigationError.background": "#fffaf3", + "editorMarkerNavigationInfo.background": "#fffaf3", + "editorMarkerNavigationWarning.background": "#fffaf3", + "editorOverviewRuler.addedForeground": "#56949f80", + "editorOverviewRuler.background": "#faf4ed", + "editorOverviewRuler.border": "#6e6a8626", + "editorOverviewRuler.bracketMatchForeground": "#797593", + "editorOverviewRuler.commonContentForeground": "#6e6a860d", + "editorOverviewRuler.currentContentForeground": "#6e6a8614", + "editorOverviewRuler.deletedForeground": "#b4637a80", + "editorOverviewRuler.errorForeground": "#b4637a80", + "editorOverviewRuler.findMatchForeground": "#6e6a8626", + "editorOverviewRuler.incomingContentForeground": "#907aa980", + "editorOverviewRuler.infoForeground": "#56949f80", + "editorOverviewRuler.modifiedForeground": "#d7827e80", + "editorOverviewRuler.rangeHighlightForeground": "#6e6a8626", + "editorOverviewRuler.selectionHighlightForeground": "#6e6a8626", + "editorOverviewRuler.warningForeground": "#ea9d3480", + "editorOverviewRuler.wordHighlightForeground": "#6e6a8614", + "editorOverviewRuler.wordHighlightStrongForeground": "#6e6a8626", + "editorPane.background": "#0000", + "editorRuler.foreground": "#6e6a8626", + "editorSuggestWidget.background": "#fffaf3", + "editorSuggestWidget.border": "#0000", + "editorSuggestWidget.focusHighlightForeground": "#d7827e", + "editorSuggestWidget.foreground": "#797593", + "editorSuggestWidget.highlightForeground": "#d7827e", + "editorSuggestWidget.selectedBackground": "#6e6a8614", + "editorSuggestWidget.selectedForeground": "#575279", + "editorSuggestWidget.selectedIconForeground": "#575279", + "editorUnnecessaryCode.border": "#0000", + "editorUnnecessaryCode.opacity": "#57527980", + "editorWarning.border": "#0000", + "editorWarning.foreground": "#ea9d34", + "editorWhitespace.foreground": "#9893a5", + "editorWidget.background": "#fffaf3", + "editorWidget.border": "#f2e9e1", + "editorWidget.foreground": "#797593", + "editorWidget.resizeBorder": "#9893a5", + "errorForeground": "#b4637a", + "extensionBadge.remoteBackground": "#907aa9", + "extensionBadge.remoteForeground": "#faf4ed", + "extensionButton.prominentBackground": "#d7827e", + "extensionButton.prominentForeground": "#faf4ed", + "extensionButton.prominentHoverBackground": "#d7827ee6", + "extensionIcon.preReleaseForeground": "#286983", + "extensionIcon.starForeground": "#d7827e", + "extensionIcon.verifiedForeground": "#907aa9", + "focusBorder": "#6e6a8614", + "foreground": "#575279", + "gitDecoration.addedResourceForeground": "#56949f", + "gitDecoration.conflictingResourceForeground": "#b4637a", + "gitDecoration.deletedResourceForeground": "#797593", + "gitDecoration.ignoredResourceForeground": "#9893a5", + "gitDecoration.modifiedResourceForeground": "#d7827e", + "gitDecoration.renamedResourceForeground": "#286983", + "gitDecoration.stageDeletedResourceForeground": "#b4637a", + "gitDecoration.stageModifiedResourceForeground": "#907aa9", + "gitDecoration.submoduleResourceForeground": "#ea9d34", + "gitDecoration.untrackedResourceForeground": "#ea9d34", + "icon.foreground": "#797593", + "input.background": "#f2e9e180", + "input.border": "#6e6a8614", + "input.foreground": "#575279", + "input.placeholderForeground": "#797593", + "inputOption.activeBackground": "#d7827e26", + "inputOption.activeForeground": "#d7827e", + "inputValidation.errorBackground": "#fffaf3", + "inputValidation.errorBorder": "#6e6a8626", + "inputValidation.errorForeground": "#b4637a", + "inputValidation.infoBackground": "#fffaf3", + "inputValidation.infoBorder": "#6e6a8626", + "inputValidation.infoForeground": "#56949f", + "inputValidation.warningBackground": "#fffaf3", + "inputValidation.warningBorder": "#6e6a8626", + "inputValidation.warningForeground": "#56949f80", + "keybindingLabel.background": "#f2e9e1", + "keybindingLabel.border": "#6e6a8626", + "keybindingLabel.bottomBorder": "#6e6a8626", + "keybindingLabel.foreground": "#907aa9", + "keybindingTable.headerBackground": "#f2e9e1", + "keybindingTable.rowsBackground": "#fffaf3", + "list.activeSelectionBackground": "#6e6a8614", + "list.activeSelectionForeground": "#575279", + "list.deemphasizedForeground": "#797593", + "list.dropBackground": "#fffaf3", + "list.errorForeground": "#b4637a", + "list.filterMatchBackground": "#fffaf3", + "list.filterMatchBorder": "#d7827e", + "list.focusBackground": "#6e6a8626", + "list.focusForeground": "#575279", + "list.focusOutline": "#6e6a8614", + "list.highlightForeground": "#d7827e", + "list.hoverBackground": "#6e6a860d", + "list.hoverForeground": "#575279", + "list.inactiveFocusBackground": "#6e6a860d", + "list.inactiveSelectionBackground": "#fffaf3", + "list.inactiveSelectionForeground": "#575279", + "list.invalidItemForeground": "#b4637a", + "list.warningForeground": "#ea9d34", + "listFilterWidget.background": "#fffaf3", + "listFilterWidget.noMatchesOutline": "#b4637a", + "listFilterWidget.outline": "#f2e9e1", + "menu.background": "#fffaf3", + "menu.border": "#6e6a860d", + "menu.foreground": "#575279", + "menu.selectionBackground": "#6e6a8614", + "menu.selectionBorder": "#f2e9e1", + "menu.selectionForeground": "#575279", + "menu.separatorBackground": "#6e6a8626", + "menubar.selectionBackground": "#6e6a8614", + "menubar.selectionBorder": "#6e6a860d", + "menubar.selectionForeground": "#575279", + "merge.border": "#f2e9e1", + "merge.commonContentBackground": "#6e6a8614", + "merge.commonHeaderBackground": "#6e6a8614", + "merge.currentContentBackground": "#ea9d3480", + "merge.currentHeaderBackground": "#ea9d3480", + "merge.incomingContentBackground": "#56949f80", + "merge.incomingHeaderBackground": "#56949f80", + "minimap.background": "#fffaf3", + "minimap.errorHighlight": "#b4637a80", + "minimap.findMatchHighlight": "#6e6a8614", + "minimap.selectionHighlight": "#6e6a8614", + "minimap.warningHighlight": "#ea9d3480", + "minimapGutter.addedBackground": "#56949f", + "minimapGutter.deletedBackground": "#b4637a", + "minimapGutter.modifiedBackground": "#d7827e", + "minimapSlider.activeBackground": "#6e6a8626", + "minimapSlider.background": "#6e6a8614", + "minimapSlider.hoverBackground": "#6e6a8614", + "notebook.cellBorderColor": "#56949f80", + "notebook.cellEditorBackground": "#fffaf3", + "notebook.cellHoverBackground": "#f2e9e180", + "notebook.focusedCellBackground": "#6e6a860d", + "notebook.focusedCellBorder": "#56949f", + "notebook.outputContainerBackgroundColor": "#6e6a860d", + "notificationCenter.border": "#6e6a8614", + "notificationCenterHeader.background": "#fffaf3", + "notificationCenterHeader.foreground": "#797593", + "notificationLink.foreground": "#907aa9", + "notifications.background": "#fffaf3", + "notifications.border": "#6e6a8614", + "notifications.foreground": "#575279", + "notificationsErrorIcon.foreground": "#b4637a", + "notificationsInfoIcon.foreground": "#56949f", + "notificationsWarningIcon.foreground": "#ea9d34", + "notificationToast.border": "#6e6a8614", + "panel.background": "#fffaf3", + "panel.border": "#0000", + "panel.dropBorder": "#f2e9e1", + "panelInput.border": "#fffaf3", + "panelSection.dropBackground": "#6e6a8614", + "panelSectionHeader.background": "#fffaf3", + "panelSectionHeader.foreground": "#575279", + "panelTitle.activeBorder": "#6e6a8626", + "panelTitle.activeForeground": "#575279", + "panelTitle.inactiveForeground": "#797593", + "peekView.border": "#f2e9e1", + "peekViewEditor.background": "#fffaf3", + "peekViewEditor.matchHighlightBackground": "#6e6a8626", + "peekViewResult.background": "#fffaf3", + "peekViewResult.fileForeground": "#797593", + "peekViewResult.lineForeground": "#797593", + "peekViewResult.matchHighlightBackground": "#6e6a8626", + "peekViewResult.selectionBackground": "#6e6a8614", + "peekViewResult.selectionForeground": "#575279", + "peekViewTitle.background": "#f2e9e1", + "peekViewTitleDescription.foreground": "#797593", + "pickerGroup.border": "#6e6a8626", + "pickerGroup.foreground": "#907aa9", + "ports.iconRunningProcessForeground": "#d7827e", + "problemsErrorIcon.foreground": "#b4637a", + "problemsInfoIcon.foreground": "#56949f", + "problemsWarningIcon.foreground": "#ea9d34", + "progressBar.background": "#d7827e", + "quickInput.background": "#fffaf3", + "quickInput.foreground": "#797593", + "quickInputList.focusBackground": "#6e6a8614", + "quickInputList.focusForeground": "#575279", + "quickInputList.focusIconForeground": "#575279", + "scrollbar.shadow": "#fffaf34d", + "scrollbarSlider.activeBackground": "#28698380", + "scrollbarSlider.background": "#6e6a8614", + "scrollbarSlider.hoverBackground": "#6e6a8626", + "searchEditor.findMatchBackground": "#6e6a8614", + "selection.background": "#6e6a8626", + "settings.focusedRowBackground": "#fffaf3", + "settings.headerForeground": "#575279", + "settings.modifiedItemIndicator": "#d7827e", + "settings.focusedRowBorder": "#6e6a8614", + "settings.rowHoverBackground": "#fffaf3", + "sideBar.background": "#faf4ed", + "sideBar.dropBackground": "#fffaf3", + "sideBar.foreground": "#797593", + "sideBarSectionHeader.background": "#0000", + "sideBarSectionHeader.border": "#6e6a8614", + "statusBar.background": "#faf4ed", + "statusBar.debuggingBackground": "#907aa9", + "statusBar.debuggingForeground": "#faf4ed", + "statusBar.foreground": "#797593", + "statusBar.noFolderBackground": "#faf4ed", + "statusBar.noFolderForeground": "#797593", + "statusBarItem.activeBackground": "#6e6a8626", + "statusBarItem.hoverBackground": "#6e6a8614", + "statusBarItem.prominentBackground": "#f2e9e1", + "statusBarItem.prominentForeground": "#575279", + "statusBarItem.prominentHoverBackground": "#6e6a8614", + "statusBarItem.remoteBackground": "#faf4ed", + "statusBarItem.remoteForeground": "#ea9d34", + "statusBarItem.errorBackground": "#faf4ed", + "statusBarItem.errorForeground": "#b4637a", + "symbolIcon.arrayForeground": "#797593", + "symbolIcon.classForeground": "#797593", + "symbolIcon.colorForeground": "#797593", + "symbolIcon.constantForeground": "#797593", + "symbolIcon.constructorForeground": "#797593", + "symbolIcon.enumeratorForeground": "#797593", + "symbolIcon.enumeratorMemberForeground": "#797593", + "symbolIcon.eventForeground": "#797593", + "symbolIcon.fieldForeground": "#797593", + "symbolIcon.fileForeground": "#797593", + "symbolIcon.folderForeground": "#797593", + "symbolIcon.functionForeground": "#797593", + "symbolIcon.interfaceForeground": "#797593", + "symbolIcon.keyForeground": "#797593", + "symbolIcon.keywordForeground": "#797593", + "symbolIcon.methodForeground": "#797593", + "symbolIcon.moduleForeground": "#797593", + "symbolIcon.namespaceForeground": "#797593", + "symbolIcon.nullForeground": "#797593", + "symbolIcon.numberForeground": "#797593", + "symbolIcon.objectForeground": "#797593", + "symbolIcon.operatorForeground": "#797593", + "symbolIcon.packageForeground": "#797593", + "symbolIcon.propertyForeground": "#797593", + "symbolIcon.referenceForeground": "#797593", + "symbolIcon.snippetForeground": "#797593", + "symbolIcon.stringForeground": "#797593", + "symbolIcon.structForeground": "#797593", + "symbolIcon.textForeground": "#797593", + "symbolIcon.typeParameterForeground": "#797593", + "symbolIcon.unitForeground": "#797593", + "symbolIcon.variableForeground": "#797593", + "tab.activeBackground": "#6e6a860d", + "tab.activeForeground": "#575279", + "tab.activeModifiedBorder": "#56949f", + "tab.border": "#0000", + "tab.hoverBackground": "#6e6a8614", + "tab.inactiveBackground": "#0000", + "tab.inactiveForeground": "#797593", + "tab.inactiveModifiedBorder": "#56949f80", + "tab.lastPinnedBorder": "#9893a5", + "tab.unfocusedActiveBackground": "#0000", + "tab.unfocusedHoverBackground": "#0000", + "tab.unfocusedInactiveBackground": "#0000", + "tab.unfocusedInactiveModifiedBorder": "#56949f80", + "terminal.ansiBlack": "#f2e9e1", + "terminal.ansiBlue": "#56949f", + "terminal.ansiBrightBlack": "#797593", + "terminal.ansiBrightBlue": "#56949f", + "terminal.ansiBrightCyan": "#d7827e", + "terminal.ansiBrightGreen": "#286983", + "terminal.ansiBrightMagenta": "#907aa9", + "terminal.ansiBrightRed": "#b4637a", + "terminal.ansiBrightWhite": "#575279", + "terminal.ansiBrightYellow": "#ea9d34", + "terminal.ansiCyan": "#d7827e", + "terminal.ansiGreen": "#286983", + "terminal.ansiMagenta": "#907aa9", + "terminal.ansiRed": "#b4637a", + "terminal.ansiWhite": "#575279", + "terminal.ansiYellow": "#ea9d34", + "terminal.dropBackground": "#6e6a8614", + "terminal.foreground": "#575279", + "terminal.selectionBackground": "#6e6a8614", + "terminal.tab.activeBorder": "#575279", + "terminalCursor.background": "#575279", + "terminalCursor.foreground": "#9893a5", + "textBlockQuote.background": "#fffaf3", + "textBlockQuote.border": "#6e6a8614", + "textCodeBlock.background": "#fffaf3", + "textLink.activeForeground": "#907aa9e6", + "textLink.foreground": "#907aa9", + "textPreformat.foreground": "#ea9d34", + "textSeparator.foreground": "#797593", + "titleBar.activeBackground": "#faf4ed", + "titleBar.activeForeground": "#797593", + "titleBar.inactiveBackground": "#fffaf3", + "titleBar.inactiveForeground": "#797593", + "toolbar.activeBackground": "#6e6a8626", + "toolbar.hoverBackground": "#6e6a8614", + "tree.indentGuidesStroke": "#797593", + "walkThrough.embeddedEditorBackground": "#faf4ed", + "welcomePage.background": "#faf4ed", + "welcomePage.buttonBackground": "#fffaf3", + "welcomePage.buttonHoverBackground": "#f2e9e1", + "widget.shadow": "#fffaf34d", + "window.activeBorder": "#fffaf3", + "window.inactiveBorder": "#fffaf3" + }, + "tokenColors": [ + { + "scope": ["comment"], + "settings": { + "foreground": "#9893a5", + "fontStyle": "italic" + } + }, + { + "scope": ["constant"], + "settings": { + "foreground": "#286983" + } + }, + { + "scope": ["constant.numeric", "constant.language"], + "settings": { + "foreground": "#d7827e" + } + }, + { + "scope": ["entity.name"], + "settings": { + "foreground": "#d7827e" + } + }, + { + "scope": [ + "entity.name.section", + "entity.name.tag", + "entity.name.namespace", + "entity.name.type" + ], + "settings": { + "foreground": "#56949f" + } + }, + { + "scope": ["entity.other.attribute-name", "entity.other.inherited-class"], + "settings": { + "foreground": "#907aa9", + "fontStyle": "italic" + } + }, + { + "scope": ["invalid"], + "settings": { + "foreground": "#b4637a" + } + }, + { + "scope": ["invalid.deprecated"], + "settings": { + "foreground": "#797593" + } + }, + { + "scope": ["keyword"], + "settings": { + "foreground": "#286983" + } + }, + { + "scope": ["markup.inserted.diff"], + "settings": { + "foreground": "#56949f" + } + }, + { + "scope": ["markup.deleted.diff"], + "settings": { + "foreground": "#b4637a" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "markup.bold.markdown", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "markup.italic.markdown", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": ["meta.diff.range"], + "settings": { + "foreground": "#907aa9" + } + }, + { + "scope": ["meta.tag", "meta.brace"], + "settings": { + "foreground": "#575279" + } + }, + { + "scope": ["meta.import", "meta.export"], + "settings": { + "foreground": "#286983" + } + }, + { + "scope": "meta.directive.vue", + "settings": { + "foreground": "#907aa9", + "fontStyle": "italic" + } + }, + { + "scope": "meta.property-name.css", + "settings": { + "foreground": "#56949f" + } + }, + { + "scope": "meta.property-value.css", + "settings": { + "foreground": "#ea9d34" + } + }, + { + "scope": "meta.tag.other.html", + "settings": { + "foreground": "#797593" + } + }, + { + "scope": ["punctuation"], + "settings": { + "foreground": "#797593" + } + }, + { + "scope": ["punctuation.accessor"], + "settings": { + "foreground": "#286983" + } + }, + { + "scope": ["punctuation.definition.string"], + "settings": { + "foreground": "#ea9d34" + } + }, + { + "scope": ["punctuation.definition.tag"], + "settings": { + "foreground": "#9893a5" + } + }, + { + "scope": ["storage.type", "storage.modifier"], + "settings": { + "foreground": "#286983" + } + }, + { + "scope": ["string"], + "settings": { + "foreground": "#ea9d34" + } + }, + { + "scope": ["support"], + "settings": { + "foreground": "#56949f" + } + }, + { + "scope": ["support.constant"], + "settings": { + "foreground": "#ea9d34" + } + }, + { + "scope": ["support.function"], + "settings": { + "foreground": "#b4637a", + "fontStyle": "italic" + } + }, + { + "scope": ["variable"], + "settings": { + "foreground": "#d7827e", + "fontStyle": "italic" + } + }, + { + "scope": ["variable.other", "variable.language", "variable.function", "variable.argument"], + "settings": { + "foreground": "#575279" + } + }, + { + "scope": ["variable.parameter"], + "settings": { + "foreground": "#907aa9" + } + } + ] +} diff --git a/src/lib/shiki/themes/rose-pine-moon.json b/src/lib/shiki/themes/rose-pine-moon.json new file mode 100644 index 0000000..0a7667a --- /dev/null +++ b/src/lib/shiki/themes/rose-pine-moon.json @@ -0,0 +1,675 @@ +{ + "name": "rose-pine-moon", + "type": "dark", + "colors": { + "activityBar.activeBorder": "#e0def4", + "activityBar.background": "#232136", + "activityBar.dropBorder": "#393552", + "activityBar.foreground": "#e0def4", + "activityBar.inactiveForeground": "#908caa", + "activityBarBadge.background": "#ea9a97", + "activityBarBadge.foreground": "#232136", + "badge.background": "#ea9a97", + "badge.foreground": "#232136", + "banner.background": "#2a273f", + "banner.foreground": "#e0def4", + "banner.iconForeground": "#908caa", + "breadcrumb.activeSelectionForeground": "#ea9a97", + "breadcrumb.background": "#232136", + "breadcrumb.focusForeground": "#908caa", + "breadcrumb.foreground": "#6e6a86", + "breadcrumbPicker.background": "#2a273f", + "button.background": "#ea9a97", + "button.foreground": "#232136", + "button.hoverBackground": "#ea9a97e6", + "button.secondaryBackground": "#2a273f", + "button.secondaryForeground": "#e0def4", + "button.secondaryHoverBackground": "#393552", + "charts.blue": "#9ccfd8", + "charts.foreground": "#e0def4", + "charts.green": "#3e8fb0", + "charts.lines": "#908caa", + "charts.orange": "#ea9a97", + "charts.purple": "#c4a7e7", + "charts.red": "#eb6f92", + "charts.yellow": "#f6c177", + "checkbox.background": "#2a273f", + "checkbox.border": "#817c9c26", + "checkbox.foreground": "#e0def4", + "debugExceptionWidget.background": "#2a273f", + "debugExceptionWidget.border": "#817c9c26", + "debugIcon.breakpointCurrentStackframeForeground": "#908caa", + "debugIcon.breakpointDisabledForeground": "#908caa", + "debugIcon.breakpointForeground": "#908caa", + "debugIcon.breakpointStackframeForeground": "#908caa", + "debugIcon.breakpointUnverifiedForeground": "#908caa", + "debugIcon.continueForeground": "#908caa", + "debugIcon.disconnectForeground": "#908caa", + "debugIcon.pauseForeground": "#908caa", + "debugIcon.restartForeground": "#908caa", + "debugIcon.startForeground": "#908caa", + "debugIcon.stepBackForeground": "#908caa", + "debugIcon.stepIntoForeground": "#908caa", + "debugIcon.stepOutForeground": "#908caa", + "debugIcon.stepOverForeground": "#908caa", + "debugIcon.stopForeground": "#eb6f92", + "debugToolBar.background": "#2a273f", + "debugToolBar.border": "#393552", + "descriptionForeground": "#908caa", + "diffEditor.border": "#393552", + "diffEditor.diagonalFill": "#817c9c4d", + "diffEditor.insertedLineBackground": "#9ccfd826", + "diffEditor.insertedTextBackground": "#9ccfd826", + "diffEditor.removedLineBackground": "#eb6f9226", + "diffEditor.removedTextBackground": "#eb6f9226", + "diffEditorOverview.insertedForeground": "#9ccfd880", + "diffEditorOverview.removedForeground": "#eb6f9280", + "dropdown.background": "#2a273f", + "dropdown.border": "#817c9c26", + "dropdown.foreground": "#e0def4", + "dropdown.listBackground": "#2a273f", + "editor.background": "#232136", + "editor.findMatchBackground": "#817c9c4d", + "editor.findMatchHighlightBackground": "#817c9c4d", + "editor.findRangeHighlightBackground": "#817c9c4d", + "editor.findRangeHighlightBorder": "#0000", + "editor.focusedStackFrameHighlightBackground": "#817c9c26", + "editor.foldBackground": "#2a273f", + "editor.foreground": "#e0def4", + "editor.hoverHighlightBackground": "#0000", + "editor.inactiveSelectionBackground": "#817c9c14", + "editor.inlineValuesBackground": "#0000", + "editor.inlineValuesForeground": "#908caa", + "editor.lineHighlightBackground": "#817c9c14", + "editor.lineHighlightBorder": "#0000", + "editor.linkedEditingBackground": "#2a273f", + "editor.rangeHighlightBackground": "#817c9c14", + "editor.selectionBackground": "#817c9c26", + "editor.selectionForeground": "#e0def4", + "editor.selectionHighlightBackground": "#817c9c26", + "editor.selectionHighlightBorder": "#232136", + "editor.snippetFinalTabstopHighlightBackground": "#817c9c26", + "editor.snippetFinalTabstopHighlightBorder": "#2a273f", + "editor.snippetTabstopHighlightBackground": "#817c9c26", + "editor.snippetTabstopHighlightBorder": "#2a273f", + "editor.stackFrameHighlightBackground": "#817c9c26", + "editor.symbolHighlightBackground": "#817c9c26", + "editor.symbolHighlightBorder": "#0000", + "editor.wordHighlightBackground": "#817c9c26", + "editor.wordHighlightBorder": "#0000", + "editor.wordHighlightStrongBackground": "#817c9c26", + "editor.wordHighlightStrongBorder": "#817c9c26", + "editorBracketHighlight.foreground1": "#eb6f9280", + "editorBracketHighlight.foreground2": "#3e8fb080", + "editorBracketHighlight.foreground3": "#f6c17780", + "editorBracketHighlight.foreground4": "#9ccfd880", + "editorBracketHighlight.foreground5": "#ea9a9780", + "editorBracketHighlight.foreground6": "#c4a7e780", + "editorBracketMatch.background": "#0000", + "editorBracketMatch.border": "#908caa", + "editorBracketPairGuide.activeBackground1": "#3e8fb0", + "editorBracketPairGuide.activeBackground2": "#ea9a97", + "editorBracketPairGuide.activeBackground3": "#c4a7e7", + "editorBracketPairGuide.activeBackground4": "#9ccfd8", + "editorBracketPairGuide.activeBackground5": "#f6c177", + "editorBracketPairGuide.activeBackground6": "#eb6f92", + "editorBracketPairGuide.background1": "#3e8fb080", + "editorBracketPairGuide.background2": "#ea9a9780", + "editorBracketPairGuide.background3": "#c4a7e780", + "editorBracketPairGuide.background4": "#9ccfd880", + "editorBracketPairGuide.background5": "#f6c17780", + "editorBracketPairGuide.background6": "#eb6f9280", + "editorCodeLens.foreground": "#ea9a97", + "editorCursor.background": "#e0def4", + "editorCursor.foreground": "#6e6a86", + "editorError.border": "#0000", + "editorError.foreground": "#eb6f92", + "editorGhostText.foreground": "#908caa", + "editorGroup.border": "#0000", + "editorGroup.dropBackground": "#2a273f", + "editorGroup.emptyBackground": "#0000", + "editorGroup.focusedEmptyBorder": "#0000", + "editorGroupHeader.noTabsBackground": "#0000", + "editorGroupHeader.tabsBackground": "#0000", + "editorGroupHeader.tabsBorder": "#0000", + "editorGutter.addedBackground": "#9ccfd8", + "editorGutter.background": "#232136", + "editorGutter.commentRangeForeground": "#908caa", + "editorGutter.deletedBackground": "#eb6f92", + "editorGutter.foldingControlForeground": "#c4a7e7", + "editorGutter.modifiedBackground": "#ea9a97", + "editorHint.border": "#0000", + "editorHint.foreground": "#908caa", + "editorHoverWidget.background": "#2a273f", + "editorHoverWidget.border": "#6e6a8680", + "editorHoverWidget.foreground": "#908caa", + "editorHoverWidget.highlightForeground": "#e0def4", + "editorHoverWidget.statusBarBackground": "#0000", + "editorIndentGuide.activeBackground": "#6e6a86", + "editorIndentGuide.background": "#817c9c4d", + "editorInfo.border": "#393552", + "editorInfo.foreground": "#9ccfd8", + "editorInlayHint.background": "#393552", + "editorInlayHint.foreground": "#908caa", + "editorInlayHint.parameterBackground": "#393552", + "editorInlayHint.parameterForeground": "#c4a7e7", + "editorInlayHint.typeBackground": "#393552", + "editorInlayHint.typeForeground": "#9ccfd8", + "editorLightBulb.foreground": "#3e8fb0", + "editorLightBulbAutoFix.foreground": "#ea9a97", + "editorLineNumber.activeForeground": "#e0def4", + "editorLineNumber.foreground": "#908caa", + "editorLink.activeForeground": "#ea9a97", + "editorMarkerNavigation.background": "#2a273f", + "editorMarkerNavigationError.background": "#2a273f", + "editorMarkerNavigationInfo.background": "#2a273f", + "editorMarkerNavigationWarning.background": "#2a273f", + "editorOverviewRuler.addedForeground": "#9ccfd880", + "editorOverviewRuler.background": "#232136", + "editorOverviewRuler.border": "#817c9c4d", + "editorOverviewRuler.bracketMatchForeground": "#908caa", + "editorOverviewRuler.commonContentForeground": "#817c9c14", + "editorOverviewRuler.currentContentForeground": "#817c9c26", + "editorOverviewRuler.deletedForeground": "#eb6f9280", + "editorOverviewRuler.errorForeground": "#eb6f9280", + "editorOverviewRuler.findMatchForeground": "#817c9c4d", + "editorOverviewRuler.incomingContentForeground": "#c4a7e780", + "editorOverviewRuler.infoForeground": "#9ccfd880", + "editorOverviewRuler.modifiedForeground": "#ea9a9780", + "editorOverviewRuler.rangeHighlightForeground": "#817c9c4d", + "editorOverviewRuler.selectionHighlightForeground": "#817c9c4d", + "editorOverviewRuler.warningForeground": "#f6c17780", + "editorOverviewRuler.wordHighlightForeground": "#817c9c26", + "editorOverviewRuler.wordHighlightStrongForeground": "#817c9c4d", + "editorPane.background": "#0000", + "editorRuler.foreground": "#817c9c4d", + "editorSuggestWidget.background": "#2a273f", + "editorSuggestWidget.border": "#0000", + "editorSuggestWidget.focusHighlightForeground": "#ea9a97", + "editorSuggestWidget.foreground": "#908caa", + "editorSuggestWidget.highlightForeground": "#ea9a97", + "editorSuggestWidget.selectedBackground": "#817c9c26", + "editorSuggestWidget.selectedForeground": "#e0def4", + "editorSuggestWidget.selectedIconForeground": "#e0def4", + "editorUnnecessaryCode.border": "#0000", + "editorUnnecessaryCode.opacity": "#e0def480", + "editorWarning.border": "#0000", + "editorWarning.foreground": "#f6c177", + "editorWhitespace.foreground": "#6e6a86", + "editorWidget.background": "#2a273f", + "editorWidget.border": "#393552", + "editorWidget.foreground": "#908caa", + "editorWidget.resizeBorder": "#6e6a86", + "errorForeground": "#eb6f92", + "extensionBadge.remoteBackground": "#c4a7e7", + "extensionBadge.remoteForeground": "#232136", + "extensionButton.prominentBackground": "#ea9a97", + "extensionButton.prominentForeground": "#232136", + "extensionButton.prominentHoverBackground": "#ea9a97e6", + "extensionIcon.preReleaseForeground": "#3e8fb0", + "extensionIcon.starForeground": "#ea9a97", + "extensionIcon.verifiedForeground": "#c4a7e7", + "focusBorder": "#817c9c26", + "foreground": "#e0def4", + "gitDecoration.addedResourceForeground": "#9ccfd8", + "gitDecoration.conflictingResourceForeground": "#eb6f92", + "gitDecoration.deletedResourceForeground": "#908caa", + "gitDecoration.ignoredResourceForeground": "#6e6a86", + "gitDecoration.modifiedResourceForeground": "#ea9a97", + "gitDecoration.renamedResourceForeground": "#3e8fb0", + "gitDecoration.stageDeletedResourceForeground": "#eb6f92", + "gitDecoration.stageModifiedResourceForeground": "#c4a7e7", + "gitDecoration.submoduleResourceForeground": "#f6c177", + "gitDecoration.untrackedResourceForeground": "#f6c177", + "icon.foreground": "#908caa", + "input.background": "#39355280", + "input.border": "#817c9c26", + "input.foreground": "#e0def4", + "input.placeholderForeground": "#908caa", + "inputOption.activeBackground": "#ea9a9726", + "inputOption.activeForeground": "#ea9a97", + "inputValidation.errorBackground": "#2a273f", + "inputValidation.errorBorder": "#817c9c4d", + "inputValidation.errorForeground": "#eb6f92", + "inputValidation.infoBackground": "#2a273f", + "inputValidation.infoBorder": "#817c9c4d", + "inputValidation.infoForeground": "#9ccfd8", + "inputValidation.warningBackground": "#2a273f", + "inputValidation.warningBorder": "#817c9c4d", + "inputValidation.warningForeground": "#9ccfd880", + "keybindingLabel.background": "#393552", + "keybindingLabel.border": "#817c9c4d", + "keybindingLabel.bottomBorder": "#817c9c4d", + "keybindingLabel.foreground": "#c4a7e7", + "keybindingTable.headerBackground": "#393552", + "keybindingTable.rowsBackground": "#2a273f", + "list.activeSelectionBackground": "#817c9c26", + "list.activeSelectionForeground": "#e0def4", + "list.deemphasizedForeground": "#908caa", + "list.dropBackground": "#2a273f", + "list.errorForeground": "#eb6f92", + "list.filterMatchBackground": "#2a273f", + "list.filterMatchBorder": "#ea9a97", + "list.focusBackground": "#817c9c4d", + "list.focusForeground": "#e0def4", + "list.focusOutline": "#817c9c26", + "list.highlightForeground": "#ea9a97", + "list.hoverBackground": "#817c9c14", + "list.hoverForeground": "#e0def4", + "list.inactiveFocusBackground": "#817c9c14", + "list.inactiveSelectionBackground": "#2a273f", + "list.inactiveSelectionForeground": "#e0def4", + "list.invalidItemForeground": "#eb6f92", + "list.warningForeground": "#f6c177", + "listFilterWidget.background": "#2a273f", + "listFilterWidget.noMatchesOutline": "#eb6f92", + "listFilterWidget.outline": "#393552", + "menu.background": "#2a273f", + "menu.border": "#817c9c14", + "menu.foreground": "#e0def4", + "menu.selectionBackground": "#817c9c26", + "menu.selectionBorder": "#393552", + "menu.selectionForeground": "#e0def4", + "menu.separatorBackground": "#817c9c4d", + "menubar.selectionBackground": "#817c9c26", + "menubar.selectionBorder": "#817c9c14", + "menubar.selectionForeground": "#e0def4", + "merge.border": "#393552", + "merge.commonContentBackground": "#817c9c26", + "merge.commonHeaderBackground": "#817c9c26", + "merge.currentContentBackground": "#f6c17780", + "merge.currentHeaderBackground": "#f6c17780", + "merge.incomingContentBackground": "#9ccfd880", + "merge.incomingHeaderBackground": "#9ccfd880", + "minimap.background": "#2a273f", + "minimap.errorHighlight": "#eb6f9280", + "minimap.findMatchHighlight": "#817c9c26", + "minimap.selectionHighlight": "#817c9c26", + "minimap.warningHighlight": "#f6c17780", + "minimapGutter.addedBackground": "#9ccfd8", + "minimapGutter.deletedBackground": "#eb6f92", + "minimapGutter.modifiedBackground": "#ea9a97", + "minimapSlider.activeBackground": "#817c9c4d", + "minimapSlider.background": "#817c9c26", + "minimapSlider.hoverBackground": "#817c9c26", + "notebook.cellBorderColor": "#9ccfd880", + "notebook.cellEditorBackground": "#2a273f", + "notebook.cellHoverBackground": "#39355280", + "notebook.focusedCellBackground": "#817c9c14", + "notebook.focusedCellBorder": "#9ccfd8", + "notebook.outputContainerBackgroundColor": "#817c9c14", + "notificationCenter.border": "#817c9c26", + "notificationCenterHeader.background": "#2a273f", + "notificationCenterHeader.foreground": "#908caa", + "notificationLink.foreground": "#c4a7e7", + "notifications.background": "#2a273f", + "notifications.border": "#817c9c26", + "notifications.foreground": "#e0def4", + "notificationsErrorIcon.foreground": "#eb6f92", + "notificationsInfoIcon.foreground": "#9ccfd8", + "notificationsWarningIcon.foreground": "#f6c177", + "notificationToast.border": "#817c9c26", + "panel.background": "#2a273f", + "panel.border": "#0000", + "panel.dropBorder": "#393552", + "panelInput.border": "#2a273f", + "panelSection.dropBackground": "#817c9c26", + "panelSectionHeader.background": "#2a273f", + "panelSectionHeader.foreground": "#e0def4", + "panelTitle.activeBorder": "#817c9c4d", + "panelTitle.activeForeground": "#e0def4", + "panelTitle.inactiveForeground": "#908caa", + "peekView.border": "#393552", + "peekViewEditor.background": "#2a273f", + "peekViewEditor.matchHighlightBackground": "#817c9c4d", + "peekViewResult.background": "#2a273f", + "peekViewResult.fileForeground": "#908caa", + "peekViewResult.lineForeground": "#908caa", + "peekViewResult.matchHighlightBackground": "#817c9c4d", + "peekViewResult.selectionBackground": "#817c9c26", + "peekViewResult.selectionForeground": "#e0def4", + "peekViewTitle.background": "#393552", + "peekViewTitleDescription.foreground": "#908caa", + "pickerGroup.border": "#817c9c4d", + "pickerGroup.foreground": "#c4a7e7", + "ports.iconRunningProcessForeground": "#ea9a97", + "problemsErrorIcon.foreground": "#eb6f92", + "problemsInfoIcon.foreground": "#9ccfd8", + "problemsWarningIcon.foreground": "#f6c177", + "progressBar.background": "#ea9a97", + "quickInput.background": "#2a273f", + "quickInput.foreground": "#908caa", + "quickInputList.focusBackground": "#817c9c26", + "quickInputList.focusForeground": "#e0def4", + "quickInputList.focusIconForeground": "#e0def4", + "scrollbar.shadow": "#2a273f4d", + "scrollbarSlider.activeBackground": "#3e8fb080", + "scrollbarSlider.background": "#817c9c26", + "scrollbarSlider.hoverBackground": "#817c9c4d", + "searchEditor.findMatchBackground": "#817c9c26", + "selection.background": "#817c9c4d", + "settings.focusedRowBackground": "#2a273f", + "settings.headerForeground": "#e0def4", + "settings.modifiedItemIndicator": "#ea9a97", + "settings.focusedRowBorder": "#817c9c26", + "settings.rowHoverBackground": "#2a273f", + "sideBar.background": "#232136", + "sideBar.dropBackground": "#2a273f", + "sideBar.foreground": "#908caa", + "sideBarSectionHeader.background": "#0000", + "sideBarSectionHeader.border": "#817c9c26", + "statusBar.background": "#232136", + "statusBar.debuggingBackground": "#c4a7e7", + "statusBar.debuggingForeground": "#232136", + "statusBar.foreground": "#908caa", + "statusBar.noFolderBackground": "#232136", + "statusBar.noFolderForeground": "#908caa", + "statusBarItem.activeBackground": "#817c9c4d", + "statusBarItem.hoverBackground": "#817c9c26", + "statusBarItem.prominentBackground": "#393552", + "statusBarItem.prominentForeground": "#e0def4", + "statusBarItem.prominentHoverBackground": "#817c9c26", + "statusBarItem.remoteBackground": "#232136", + "statusBarItem.remoteForeground": "#f6c177", + "statusBarItem.errorBackground": "#232136", + "statusBarItem.errorForeground": "#eb6f92", + "symbolIcon.arrayForeground": "#908caa", + "symbolIcon.classForeground": "#908caa", + "symbolIcon.colorForeground": "#908caa", + "symbolIcon.constantForeground": "#908caa", + "symbolIcon.constructorForeground": "#908caa", + "symbolIcon.enumeratorForeground": "#908caa", + "symbolIcon.enumeratorMemberForeground": "#908caa", + "symbolIcon.eventForeground": "#908caa", + "symbolIcon.fieldForeground": "#908caa", + "symbolIcon.fileForeground": "#908caa", + "symbolIcon.folderForeground": "#908caa", + "symbolIcon.functionForeground": "#908caa", + "symbolIcon.interfaceForeground": "#908caa", + "symbolIcon.keyForeground": "#908caa", + "symbolIcon.keywordForeground": "#908caa", + "symbolIcon.methodForeground": "#908caa", + "symbolIcon.moduleForeground": "#908caa", + "symbolIcon.namespaceForeground": "#908caa", + "symbolIcon.nullForeground": "#908caa", + "symbolIcon.numberForeground": "#908caa", + "symbolIcon.objectForeground": "#908caa", + "symbolIcon.operatorForeground": "#908caa", + "symbolIcon.packageForeground": "#908caa", + "symbolIcon.propertyForeground": "#908caa", + "symbolIcon.referenceForeground": "#908caa", + "symbolIcon.snippetForeground": "#908caa", + "symbolIcon.stringForeground": "#908caa", + "symbolIcon.structForeground": "#908caa", + "symbolIcon.textForeground": "#908caa", + "symbolIcon.typeParameterForeground": "#908caa", + "symbolIcon.unitForeground": "#908caa", + "symbolIcon.variableForeground": "#908caa", + "tab.activeBackground": "#817c9c14", + "tab.activeForeground": "#e0def4", + "tab.activeModifiedBorder": "#9ccfd8", + "tab.border": "#0000", + "tab.hoverBackground": "#817c9c26", + "tab.inactiveBackground": "#0000", + "tab.inactiveForeground": "#908caa", + "tab.inactiveModifiedBorder": "#9ccfd880", + "tab.lastPinnedBorder": "#6e6a86", + "tab.unfocusedActiveBackground": "#0000", + "tab.unfocusedHoverBackground": "#0000", + "tab.unfocusedInactiveBackground": "#0000", + "tab.unfocusedInactiveModifiedBorder": "#9ccfd880", + "terminal.ansiBlack": "#393552", + "terminal.ansiBlue": "#9ccfd8", + "terminal.ansiBrightBlack": "#908caa", + "terminal.ansiBrightBlue": "#9ccfd8", + "terminal.ansiBrightCyan": "#ea9a97", + "terminal.ansiBrightGreen": "#3e8fb0", + "terminal.ansiBrightMagenta": "#c4a7e7", + "terminal.ansiBrightRed": "#eb6f92", + "terminal.ansiBrightWhite": "#e0def4", + "terminal.ansiBrightYellow": "#f6c177", + "terminal.ansiCyan": "#ea9a97", + "terminal.ansiGreen": "#3e8fb0", + "terminal.ansiMagenta": "#c4a7e7", + "terminal.ansiRed": "#eb6f92", + "terminal.ansiWhite": "#e0def4", + "terminal.ansiYellow": "#f6c177", + "terminal.dropBackground": "#817c9c26", + "terminal.foreground": "#e0def4", + "terminal.selectionBackground": "#817c9c26", + "terminal.tab.activeBorder": "#e0def4", + "terminalCursor.background": "#e0def4", + "terminalCursor.foreground": "#6e6a86", + "textBlockQuote.background": "#2a273f", + "textBlockQuote.border": "#817c9c26", + "textCodeBlock.background": "#2a273f", + "textLink.activeForeground": "#c4a7e7e6", + "textLink.foreground": "#c4a7e7", + "textPreformat.foreground": "#f6c177", + "textSeparator.foreground": "#908caa", + "titleBar.activeBackground": "#232136", + "titleBar.activeForeground": "#908caa", + "titleBar.inactiveBackground": "#2a273f", + "titleBar.inactiveForeground": "#908caa", + "toolbar.activeBackground": "#817c9c4d", + "toolbar.hoverBackground": "#817c9c26", + "tree.indentGuidesStroke": "#908caa", + "walkThrough.embeddedEditorBackground": "#232136", + "welcomePage.background": "#232136", + "welcomePage.buttonBackground": "#2a273f", + "welcomePage.buttonHoverBackground": "#393552", + "widget.shadow": "#2a273f4d", + "window.activeBorder": "#2a273f", + "window.inactiveBorder": "#2a273f" + }, + "tokenColors": [ + { + "scope": ["comment"], + "settings": { + "foreground": "#6e6a86", + "fontStyle": "italic" + } + }, + { + "scope": ["constant"], + "settings": { + "foreground": "#3e8fb0" + } + }, + { + "scope": ["constant.numeric", "constant.language"], + "settings": { + "foreground": "#ea9a97" + } + }, + { + "scope": ["entity.name"], + "settings": { + "foreground": "#ea9a97" + } + }, + { + "scope": [ + "entity.name.section", + "entity.name.tag", + "entity.name.namespace", + "entity.name.type" + ], + "settings": { + "foreground": "#9ccfd8" + } + }, + { + "scope": ["entity.other.attribute-name", "entity.other.inherited-class"], + "settings": { + "foreground": "#c4a7e7", + "fontStyle": "italic" + } + }, + { + "scope": ["invalid"], + "settings": { + "foreground": "#eb6f92" + } + }, + { + "scope": ["invalid.deprecated"], + "settings": { + "foreground": "#908caa" + } + }, + { + "scope": ["keyword"], + "settings": { + "foreground": "#3e8fb0" + } + }, + { + "scope": ["markup.inserted.diff"], + "settings": { + "foreground": "#9ccfd8" + } + }, + { + "scope": ["markup.deleted.diff"], + "settings": { + "foreground": "#eb6f92" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "markup.bold.markdown", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "markup.italic.markdown", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": ["meta.diff.range"], + "settings": { + "foreground": "#c4a7e7" + } + }, + { + "scope": ["meta.tag", "meta.brace"], + "settings": { + "foreground": "#e0def4" + } + }, + { + "scope": ["meta.import", "meta.export"], + "settings": { + "foreground": "#3e8fb0" + } + }, + { + "scope": "meta.directive.vue", + "settings": { + "foreground": "#c4a7e7", + "fontStyle": "italic" + } + }, + { + "scope": "meta.property-name.css", + "settings": { + "foreground": "#9ccfd8" + } + }, + { + "scope": "meta.property-value.css", + "settings": { + "foreground": "#f6c177" + } + }, + { + "scope": "meta.tag.other.html", + "settings": { + "foreground": "#908caa" + } + }, + { + "scope": ["punctuation"], + "settings": { + "foreground": "#908caa" + } + }, + { + "scope": ["punctuation.accessor"], + "settings": { + "foreground": "#3e8fb0" + } + }, + { + "scope": ["punctuation.definition.string"], + "settings": { + "foreground": "#f6c177" + } + }, + { + "scope": ["punctuation.definition.tag"], + "settings": { + "foreground": "#6e6a86" + } + }, + { + "scope": ["storage.type", "storage.modifier"], + "settings": { + "foreground": "#3e8fb0" + } + }, + { + "scope": ["string"], + "settings": { + "foreground": "#f6c177" + } + }, + { + "scope": ["support"], + "settings": { + "foreground": "#9ccfd8" + } + }, + { + "scope": ["support.constant"], + "settings": { + "foreground": "#f6c177" + } + }, + { + "scope": ["support.function"], + "settings": { + "foreground": "#eb6f92", + "fontStyle": "italic" + } + }, + { + "scope": ["variable"], + "settings": { + "foreground": "#ea9a97", + "fontStyle": "italic" + } + }, + { + "scope": ["variable.other", "variable.language", "variable.function", "variable.argument"], + "settings": { + "foreground": "#e0def4" + } + }, + { + "scope": ["variable.parameter"], + "settings": { + "foreground": "#c4a7e7" + } + } + ] +} diff --git a/src/lib/shiki/themes/rose-pine.json b/src/lib/shiki/themes/rose-pine.json new file mode 100644 index 0000000..1124a07 --- /dev/null +++ b/src/lib/shiki/themes/rose-pine.json @@ -0,0 +1,675 @@ +{ + "name": "rose-pine", + "type": "dark", + "colors": { + "activityBar.activeBorder": "#e0def4", + "activityBar.background": "#191724", + "activityBar.dropBorder": "#26233a", + "activityBar.foreground": "#e0def4", + "activityBar.inactiveForeground": "#908caa", + "activityBarBadge.background": "#ebbcba", + "activityBarBadge.foreground": "#191724", + "badge.background": "#ebbcba", + "badge.foreground": "#191724", + "banner.background": "#1f1d2e", + "banner.foreground": "#e0def4", + "banner.iconForeground": "#908caa", + "breadcrumb.activeSelectionForeground": "#ebbcba", + "breadcrumb.background": "#191724", + "breadcrumb.focusForeground": "#908caa", + "breadcrumb.foreground": "#6e6a86", + "breadcrumbPicker.background": "#1f1d2e", + "button.background": "#ebbcba", + "button.foreground": "#191724", + "button.hoverBackground": "#ebbcbae6", + "button.secondaryBackground": "#1f1d2e", + "button.secondaryForeground": "#e0def4", + "button.secondaryHoverBackground": "#26233a", + "charts.blue": "#9ccfd8", + "charts.foreground": "#e0def4", + "charts.green": "#31748f", + "charts.lines": "#908caa", + "charts.orange": "#ebbcba", + "charts.purple": "#c4a7e7", + "charts.red": "#eb6f92", + "charts.yellow": "#f6c177", + "checkbox.background": "#1f1d2e", + "checkbox.border": "#6e6a8633", + "checkbox.foreground": "#e0def4", + "debugExceptionWidget.background": "#1f1d2e", + "debugExceptionWidget.border": "#6e6a8633", + "debugIcon.breakpointCurrentStackframeForeground": "#908caa", + "debugIcon.breakpointDisabledForeground": "#908caa", + "debugIcon.breakpointForeground": "#908caa", + "debugIcon.breakpointStackframeForeground": "#908caa", + "debugIcon.breakpointUnverifiedForeground": "#908caa", + "debugIcon.continueForeground": "#908caa", + "debugIcon.disconnectForeground": "#908caa", + "debugIcon.pauseForeground": "#908caa", + "debugIcon.restartForeground": "#908caa", + "debugIcon.startForeground": "#908caa", + "debugIcon.stepBackForeground": "#908caa", + "debugIcon.stepIntoForeground": "#908caa", + "debugIcon.stepOutForeground": "#908caa", + "debugIcon.stepOverForeground": "#908caa", + "debugIcon.stopForeground": "#eb6f92", + "debugToolBar.background": "#1f1d2e", + "debugToolBar.border": "#26233a", + "descriptionForeground": "#908caa", + "diffEditor.border": "#26233a", + "diffEditor.diagonalFill": "#6e6a8666", + "diffEditor.insertedLineBackground": "#9ccfd826", + "diffEditor.insertedTextBackground": "#9ccfd826", + "diffEditor.removedLineBackground": "#eb6f9226", + "diffEditor.removedTextBackground": "#eb6f9226", + "diffEditorOverview.insertedForeground": "#9ccfd880", + "diffEditorOverview.removedForeground": "#eb6f9280", + "dropdown.background": "#1f1d2e", + "dropdown.border": "#6e6a8633", + "dropdown.foreground": "#e0def4", + "dropdown.listBackground": "#1f1d2e", + "editor.background": "#191724", + "editor.findMatchBackground": "#6e6a8666", + "editor.findMatchHighlightBackground": "#6e6a8666", + "editor.findRangeHighlightBackground": "#6e6a8666", + "editor.findRangeHighlightBorder": "#0000", + "editor.focusedStackFrameHighlightBackground": "#6e6a8633", + "editor.foldBackground": "#1f1d2e", + "editor.foreground": "#e0def4", + "editor.hoverHighlightBackground": "#0000", + "editor.inactiveSelectionBackground": "#6e6a861a", + "editor.inlineValuesBackground": "#0000", + "editor.inlineValuesForeground": "#908caa", + "editor.lineHighlightBackground": "#6e6a861a", + "editor.lineHighlightBorder": "#0000", + "editor.linkedEditingBackground": "#1f1d2e", + "editor.rangeHighlightBackground": "#6e6a861a", + "editor.selectionBackground": "#6e6a8633", + "editor.selectionForeground": "#e0def4", + "editor.selectionHighlightBackground": "#6e6a8633", + "editor.selectionHighlightBorder": "#191724", + "editor.snippetFinalTabstopHighlightBackground": "#6e6a8633", + "editor.snippetFinalTabstopHighlightBorder": "#1f1d2e", + "editor.snippetTabstopHighlightBackground": "#6e6a8633", + "editor.snippetTabstopHighlightBorder": "#1f1d2e", + "editor.stackFrameHighlightBackground": "#6e6a8633", + "editor.symbolHighlightBackground": "#6e6a8633", + "editor.symbolHighlightBorder": "#0000", + "editor.wordHighlightBackground": "#6e6a8633", + "editor.wordHighlightBorder": "#0000", + "editor.wordHighlightStrongBackground": "#6e6a8633", + "editor.wordHighlightStrongBorder": "#6e6a8633", + "editorBracketHighlight.foreground1": "#eb6f9280", + "editorBracketHighlight.foreground2": "#31748f80", + "editorBracketHighlight.foreground3": "#f6c17780", + "editorBracketHighlight.foreground4": "#9ccfd880", + "editorBracketHighlight.foreground5": "#ebbcba80", + "editorBracketHighlight.foreground6": "#c4a7e780", + "editorBracketMatch.background": "#0000", + "editorBracketMatch.border": "#908caa", + "editorBracketPairGuide.activeBackground1": "#31748f", + "editorBracketPairGuide.activeBackground2": "#ebbcba", + "editorBracketPairGuide.activeBackground3": "#c4a7e7", + "editorBracketPairGuide.activeBackground4": "#9ccfd8", + "editorBracketPairGuide.activeBackground5": "#f6c177", + "editorBracketPairGuide.activeBackground6": "#eb6f92", + "editorBracketPairGuide.background1": "#31748f80", + "editorBracketPairGuide.background2": "#ebbcba80", + "editorBracketPairGuide.background3": "#c4a7e780", + "editorBracketPairGuide.background4": "#9ccfd880", + "editorBracketPairGuide.background5": "#f6c17780", + "editorBracketPairGuide.background6": "#eb6f9280", + "editorCodeLens.foreground": "#ebbcba", + "editorCursor.background": "#e0def4", + "editorCursor.foreground": "#6e6a86", + "editorError.border": "#0000", + "editorError.foreground": "#eb6f92", + "editorGhostText.foreground": "#908caa", + "editorGroup.border": "#0000", + "editorGroup.dropBackground": "#1f1d2e", + "editorGroup.emptyBackground": "#0000", + "editorGroup.focusedEmptyBorder": "#0000", + "editorGroupHeader.noTabsBackground": "#0000", + "editorGroupHeader.tabsBackground": "#0000", + "editorGroupHeader.tabsBorder": "#0000", + "editorGutter.addedBackground": "#9ccfd8", + "editorGutter.background": "#191724", + "editorGutter.commentRangeForeground": "#908caa", + "editorGutter.deletedBackground": "#eb6f92", + "editorGutter.foldingControlForeground": "#c4a7e7", + "editorGutter.modifiedBackground": "#ebbcba", + "editorHint.border": "#0000", + "editorHint.foreground": "#908caa", + "editorHoverWidget.background": "#1f1d2e", + "editorHoverWidget.border": "#6e6a8680", + "editorHoverWidget.foreground": "#908caa", + "editorHoverWidget.highlightForeground": "#e0def4", + "editorHoverWidget.statusBarBackground": "#0000", + "editorIndentGuide.activeBackground": "#6e6a86", + "editorIndentGuide.background": "#6e6a8666", + "editorInfo.border": "#26233a", + "editorInfo.foreground": "#9ccfd8", + "editorInlayHint.background": "#26233a", + "editorInlayHint.foreground": "#908caa", + "editorInlayHint.parameterBackground": "#26233a", + "editorInlayHint.parameterForeground": "#c4a7e7", + "editorInlayHint.typeBackground": "#26233a", + "editorInlayHint.typeForeground": "#9ccfd8", + "editorLightBulb.foreground": "#31748f", + "editorLightBulbAutoFix.foreground": "#ebbcba", + "editorLineNumber.activeForeground": "#e0def4", + "editorLineNumber.foreground": "#908caa", + "editorLink.activeForeground": "#ebbcba", + "editorMarkerNavigation.background": "#1f1d2e", + "editorMarkerNavigationError.background": "#1f1d2e", + "editorMarkerNavigationInfo.background": "#1f1d2e", + "editorMarkerNavigationWarning.background": "#1f1d2e", + "editorOverviewRuler.addedForeground": "#9ccfd880", + "editorOverviewRuler.background": "#191724", + "editorOverviewRuler.border": "#6e6a8666", + "editorOverviewRuler.bracketMatchForeground": "#908caa", + "editorOverviewRuler.commonContentForeground": "#6e6a861a", + "editorOverviewRuler.currentContentForeground": "#6e6a8633", + "editorOverviewRuler.deletedForeground": "#eb6f9280", + "editorOverviewRuler.errorForeground": "#eb6f9280", + "editorOverviewRuler.findMatchForeground": "#6e6a8666", + "editorOverviewRuler.incomingContentForeground": "#c4a7e780", + "editorOverviewRuler.infoForeground": "#9ccfd880", + "editorOverviewRuler.modifiedForeground": "#ebbcba80", + "editorOverviewRuler.rangeHighlightForeground": "#6e6a8666", + "editorOverviewRuler.selectionHighlightForeground": "#6e6a8666", + "editorOverviewRuler.warningForeground": "#f6c17780", + "editorOverviewRuler.wordHighlightForeground": "#6e6a8633", + "editorOverviewRuler.wordHighlightStrongForeground": "#6e6a8666", + "editorPane.background": "#0000", + "editorRuler.foreground": "#6e6a8666", + "editorSuggestWidget.background": "#1f1d2e", + "editorSuggestWidget.border": "#0000", + "editorSuggestWidget.focusHighlightForeground": "#ebbcba", + "editorSuggestWidget.foreground": "#908caa", + "editorSuggestWidget.highlightForeground": "#ebbcba", + "editorSuggestWidget.selectedBackground": "#6e6a8633", + "editorSuggestWidget.selectedForeground": "#e0def4", + "editorSuggestWidget.selectedIconForeground": "#e0def4", + "editorUnnecessaryCode.border": "#0000", + "editorUnnecessaryCode.opacity": "#e0def480", + "editorWarning.border": "#0000", + "editorWarning.foreground": "#f6c177", + "editorWhitespace.foreground": "#6e6a86", + "editorWidget.background": "#1f1d2e", + "editorWidget.border": "#26233a", + "editorWidget.foreground": "#908caa", + "editorWidget.resizeBorder": "#6e6a86", + "errorForeground": "#eb6f92", + "extensionBadge.remoteBackground": "#c4a7e7", + "extensionBadge.remoteForeground": "#191724", + "extensionButton.prominentBackground": "#ebbcba", + "extensionButton.prominentForeground": "#191724", + "extensionButton.prominentHoverBackground": "#ebbcbae6", + "extensionIcon.preReleaseForeground": "#31748f", + "extensionIcon.starForeground": "#ebbcba", + "extensionIcon.verifiedForeground": "#c4a7e7", + "focusBorder": "#6e6a8633", + "foreground": "#e0def4", + "gitDecoration.addedResourceForeground": "#9ccfd8", + "gitDecoration.conflictingResourceForeground": "#eb6f92", + "gitDecoration.deletedResourceForeground": "#908caa", + "gitDecoration.ignoredResourceForeground": "#6e6a86", + "gitDecoration.modifiedResourceForeground": "#ebbcba", + "gitDecoration.renamedResourceForeground": "#31748f", + "gitDecoration.stageDeletedResourceForeground": "#eb6f92", + "gitDecoration.stageModifiedResourceForeground": "#c4a7e7", + "gitDecoration.submoduleResourceForeground": "#f6c177", + "gitDecoration.untrackedResourceForeground": "#f6c177", + "icon.foreground": "#908caa", + "input.background": "#26233a80", + "input.border": "#6e6a8633", + "input.foreground": "#e0def4", + "input.placeholderForeground": "#908caa", + "inputOption.activeBackground": "#ebbcba26", + "inputOption.activeForeground": "#ebbcba", + "inputValidation.errorBackground": "#1f1d2e", + "inputValidation.errorBorder": "#6e6a8666", + "inputValidation.errorForeground": "#eb6f92", + "inputValidation.infoBackground": "#1f1d2e", + "inputValidation.infoBorder": "#6e6a8666", + "inputValidation.infoForeground": "#9ccfd8", + "inputValidation.warningBackground": "#1f1d2e", + "inputValidation.warningBorder": "#6e6a8666", + "inputValidation.warningForeground": "#9ccfd880", + "keybindingLabel.background": "#26233a", + "keybindingLabel.border": "#6e6a8666", + "keybindingLabel.bottomBorder": "#6e6a8666", + "keybindingLabel.foreground": "#c4a7e7", + "keybindingTable.headerBackground": "#26233a", + "keybindingTable.rowsBackground": "#1f1d2e", + "list.activeSelectionBackground": "#6e6a8633", + "list.activeSelectionForeground": "#e0def4", + "list.deemphasizedForeground": "#908caa", + "list.dropBackground": "#1f1d2e", + "list.errorForeground": "#eb6f92", + "list.filterMatchBackground": "#1f1d2e", + "list.filterMatchBorder": "#ebbcba", + "list.focusBackground": "#6e6a8666", + "list.focusForeground": "#e0def4", + "list.focusOutline": "#6e6a8633", + "list.highlightForeground": "#ebbcba", + "list.hoverBackground": "#6e6a861a", + "list.hoverForeground": "#e0def4", + "list.inactiveFocusBackground": "#6e6a861a", + "list.inactiveSelectionBackground": "#1f1d2e", + "list.inactiveSelectionForeground": "#e0def4", + "list.invalidItemForeground": "#eb6f92", + "list.warningForeground": "#f6c177", + "listFilterWidget.background": "#1f1d2e", + "listFilterWidget.noMatchesOutline": "#eb6f92", + "listFilterWidget.outline": "#26233a", + "menu.background": "#1f1d2e", + "menu.border": "#6e6a861a", + "menu.foreground": "#e0def4", + "menu.selectionBackground": "#6e6a8633", + "menu.selectionBorder": "#26233a", + "menu.selectionForeground": "#e0def4", + "menu.separatorBackground": "#6e6a8666", + "menubar.selectionBackground": "#6e6a8633", + "menubar.selectionBorder": "#6e6a861a", + "menubar.selectionForeground": "#e0def4", + "merge.border": "#26233a", + "merge.commonContentBackground": "#6e6a8633", + "merge.commonHeaderBackground": "#6e6a8633", + "merge.currentContentBackground": "#f6c17780", + "merge.currentHeaderBackground": "#f6c17780", + "merge.incomingContentBackground": "#9ccfd880", + "merge.incomingHeaderBackground": "#9ccfd880", + "minimap.background": "#1f1d2e", + "minimap.errorHighlight": "#eb6f9280", + "minimap.findMatchHighlight": "#6e6a8633", + "minimap.selectionHighlight": "#6e6a8633", + "minimap.warningHighlight": "#f6c17780", + "minimapGutter.addedBackground": "#9ccfd8", + "minimapGutter.deletedBackground": "#eb6f92", + "minimapGutter.modifiedBackground": "#ebbcba", + "minimapSlider.activeBackground": "#6e6a8666", + "minimapSlider.background": "#6e6a8633", + "minimapSlider.hoverBackground": "#6e6a8633", + "notebook.cellBorderColor": "#9ccfd880", + "notebook.cellEditorBackground": "#1f1d2e", + "notebook.cellHoverBackground": "#26233a80", + "notebook.focusedCellBackground": "#6e6a861a", + "notebook.focusedCellBorder": "#9ccfd8", + "notebook.outputContainerBackgroundColor": "#6e6a861a", + "notificationCenter.border": "#6e6a8633", + "notificationCenterHeader.background": "#1f1d2e", + "notificationCenterHeader.foreground": "#908caa", + "notificationLink.foreground": "#c4a7e7", + "notifications.background": "#1f1d2e", + "notifications.border": "#6e6a8633", + "notifications.foreground": "#e0def4", + "notificationsErrorIcon.foreground": "#eb6f92", + "notificationsInfoIcon.foreground": "#9ccfd8", + "notificationsWarningIcon.foreground": "#f6c177", + "notificationToast.border": "#6e6a8633", + "panel.background": "#1f1d2e", + "panel.border": "#0000", + "panel.dropBorder": "#26233a", + "panelInput.border": "#1f1d2e", + "panelSection.dropBackground": "#6e6a8633", + "panelSectionHeader.background": "#1f1d2e", + "panelSectionHeader.foreground": "#e0def4", + "panelTitle.activeBorder": "#6e6a8666", + "panelTitle.activeForeground": "#e0def4", + "panelTitle.inactiveForeground": "#908caa", + "peekView.border": "#26233a", + "peekViewEditor.background": "#1f1d2e", + "peekViewEditor.matchHighlightBackground": "#6e6a8666", + "peekViewResult.background": "#1f1d2e", + "peekViewResult.fileForeground": "#908caa", + "peekViewResult.lineForeground": "#908caa", + "peekViewResult.matchHighlightBackground": "#6e6a8666", + "peekViewResult.selectionBackground": "#6e6a8633", + "peekViewResult.selectionForeground": "#e0def4", + "peekViewTitle.background": "#26233a", + "peekViewTitleDescription.foreground": "#908caa", + "pickerGroup.border": "#6e6a8666", + "pickerGroup.foreground": "#c4a7e7", + "ports.iconRunningProcessForeground": "#ebbcba", + "problemsErrorIcon.foreground": "#eb6f92", + "problemsInfoIcon.foreground": "#9ccfd8", + "problemsWarningIcon.foreground": "#f6c177", + "progressBar.background": "#ebbcba", + "quickInput.background": "#1f1d2e", + "quickInput.foreground": "#908caa", + "quickInputList.focusBackground": "#6e6a8633", + "quickInputList.focusForeground": "#e0def4", + "quickInputList.focusIconForeground": "#e0def4", + "scrollbar.shadow": "#1f1d2e4d", + "scrollbarSlider.activeBackground": "#31748f80", + "scrollbarSlider.background": "#6e6a8633", + "scrollbarSlider.hoverBackground": "#6e6a8666", + "searchEditor.findMatchBackground": "#6e6a8633", + "selection.background": "#6e6a8666", + "settings.focusedRowBackground": "#1f1d2e", + "settings.headerForeground": "#e0def4", + "settings.modifiedItemIndicator": "#ebbcba", + "settings.focusedRowBorder": "#6e6a8633", + "settings.rowHoverBackground": "#1f1d2e", + "sideBar.background": "#191724", + "sideBar.dropBackground": "#1f1d2e", + "sideBar.foreground": "#908caa", + "sideBarSectionHeader.background": "#0000", + "sideBarSectionHeader.border": "#6e6a8633", + "statusBar.background": "#191724", + "statusBar.debuggingBackground": "#c4a7e7", + "statusBar.debuggingForeground": "#191724", + "statusBar.foreground": "#908caa", + "statusBar.noFolderBackground": "#191724", + "statusBar.noFolderForeground": "#908caa", + "statusBarItem.activeBackground": "#6e6a8666", + "statusBarItem.hoverBackground": "#6e6a8633", + "statusBarItem.prominentBackground": "#26233a", + "statusBarItem.prominentForeground": "#e0def4", + "statusBarItem.prominentHoverBackground": "#6e6a8633", + "statusBarItem.remoteBackground": "#191724", + "statusBarItem.remoteForeground": "#f6c177", + "statusBarItem.errorBackground": "#191724", + "statusBarItem.errorForeground": "#eb6f92", + "symbolIcon.arrayForeground": "#908caa", + "symbolIcon.classForeground": "#908caa", + "symbolIcon.colorForeground": "#908caa", + "symbolIcon.constantForeground": "#908caa", + "symbolIcon.constructorForeground": "#908caa", + "symbolIcon.enumeratorForeground": "#908caa", + "symbolIcon.enumeratorMemberForeground": "#908caa", + "symbolIcon.eventForeground": "#908caa", + "symbolIcon.fieldForeground": "#908caa", + "symbolIcon.fileForeground": "#908caa", + "symbolIcon.folderForeground": "#908caa", + "symbolIcon.functionForeground": "#908caa", + "symbolIcon.interfaceForeground": "#908caa", + "symbolIcon.keyForeground": "#908caa", + "symbolIcon.keywordForeground": "#908caa", + "symbolIcon.methodForeground": "#908caa", + "symbolIcon.moduleForeground": "#908caa", + "symbolIcon.namespaceForeground": "#908caa", + "symbolIcon.nullForeground": "#908caa", + "symbolIcon.numberForeground": "#908caa", + "symbolIcon.objectForeground": "#908caa", + "symbolIcon.operatorForeground": "#908caa", + "symbolIcon.packageForeground": "#908caa", + "symbolIcon.propertyForeground": "#908caa", + "symbolIcon.referenceForeground": "#908caa", + "symbolIcon.snippetForeground": "#908caa", + "symbolIcon.stringForeground": "#908caa", + "symbolIcon.structForeground": "#908caa", + "symbolIcon.textForeground": "#908caa", + "symbolIcon.typeParameterForeground": "#908caa", + "symbolIcon.unitForeground": "#908caa", + "symbolIcon.variableForeground": "#908caa", + "tab.activeBackground": "#6e6a861a", + "tab.activeForeground": "#e0def4", + "tab.activeModifiedBorder": "#9ccfd8", + "tab.border": "#0000", + "tab.hoverBackground": "#6e6a8633", + "tab.inactiveBackground": "#0000", + "tab.inactiveForeground": "#908caa", + "tab.inactiveModifiedBorder": "#9ccfd880", + "tab.lastPinnedBorder": "#6e6a86", + "tab.unfocusedActiveBackground": "#0000", + "tab.unfocusedHoverBackground": "#0000", + "tab.unfocusedInactiveBackground": "#0000", + "tab.unfocusedInactiveModifiedBorder": "#9ccfd880", + "terminal.ansiBlack": "#26233a", + "terminal.ansiBlue": "#9ccfd8", + "terminal.ansiBrightBlack": "#908caa", + "terminal.ansiBrightBlue": "#9ccfd8", + "terminal.ansiBrightCyan": "#ebbcba", + "terminal.ansiBrightGreen": "#31748f", + "terminal.ansiBrightMagenta": "#c4a7e7", + "terminal.ansiBrightRed": "#eb6f92", + "terminal.ansiBrightWhite": "#e0def4", + "terminal.ansiBrightYellow": "#f6c177", + "terminal.ansiCyan": "#ebbcba", + "terminal.ansiGreen": "#31748f", + "terminal.ansiMagenta": "#c4a7e7", + "terminal.ansiRed": "#eb6f92", + "terminal.ansiWhite": "#e0def4", + "terminal.ansiYellow": "#f6c177", + "terminal.dropBackground": "#6e6a8633", + "terminal.foreground": "#e0def4", + "terminal.selectionBackground": "#6e6a8633", + "terminal.tab.activeBorder": "#e0def4", + "terminalCursor.background": "#e0def4", + "terminalCursor.foreground": "#6e6a86", + "textBlockQuote.background": "#1f1d2e", + "textBlockQuote.border": "#6e6a8633", + "textCodeBlock.background": "#1f1d2e", + "textLink.activeForeground": "#c4a7e7e6", + "textLink.foreground": "#c4a7e7", + "textPreformat.foreground": "#f6c177", + "textSeparator.foreground": "#908caa", + "titleBar.activeBackground": "#191724", + "titleBar.activeForeground": "#908caa", + "titleBar.inactiveBackground": "#1f1d2e", + "titleBar.inactiveForeground": "#908caa", + "toolbar.activeBackground": "#6e6a8666", + "toolbar.hoverBackground": "#6e6a8633", + "tree.indentGuidesStroke": "#908caa", + "walkThrough.embeddedEditorBackground": "#191724", + "welcomePage.background": "#191724", + "welcomePage.buttonBackground": "#1f1d2e", + "welcomePage.buttonHoverBackground": "#26233a", + "widget.shadow": "#1f1d2e4d", + "window.activeBorder": "#1f1d2e", + "window.inactiveBorder": "#1f1d2e" + }, + "tokenColors": [ + { + "scope": ["comment"], + "settings": { + "foreground": "#6e6a86", + "fontStyle": "italic" + } + }, + { + "scope": ["constant"], + "settings": { + "foreground": "#31748f" + } + }, + { + "scope": ["constant.numeric", "constant.language"], + "settings": { + "foreground": "#ebbcba" + } + }, + { + "scope": ["entity.name"], + "settings": { + "foreground": "#ebbcba" + } + }, + { + "scope": [ + "entity.name.section", + "entity.name.tag", + "entity.name.namespace", + "entity.name.type" + ], + "settings": { + "foreground": "#9ccfd8" + } + }, + { + "scope": ["entity.other.attribute-name", "entity.other.inherited-class"], + "settings": { + "foreground": "#c4a7e7", + "fontStyle": "italic" + } + }, + { + "scope": ["invalid"], + "settings": { + "foreground": "#eb6f92" + } + }, + { + "scope": ["invalid.deprecated"], + "settings": { + "foreground": "#908caa" + } + }, + { + "scope": ["keyword"], + "settings": { + "foreground": "#31748f" + } + }, + { + "scope": ["markup.inserted.diff"], + "settings": { + "foreground": "#9ccfd8" + } + }, + { + "scope": ["markup.deleted.diff"], + "settings": { + "foreground": "#eb6f92" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "markup.bold.markdown", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "markup.italic.markdown", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": ["meta.diff.range"], + "settings": { + "foreground": "#c4a7e7" + } + }, + { + "scope": ["meta.tag", "meta.brace"], + "settings": { + "foreground": "#e0def4" + } + }, + { + "scope": ["meta.import", "meta.export"], + "settings": { + "foreground": "#31748f" + } + }, + { + "scope": "meta.directive.vue", + "settings": { + "foreground": "#c4a7e7", + "fontStyle": "italic" + } + }, + { + "scope": "meta.property-name.css", + "settings": { + "foreground": "#9ccfd8" + } + }, + { + "scope": "meta.property-value.css", + "settings": { + "foreground": "#f6c177" + } + }, + { + "scope": "meta.tag.other.html", + "settings": { + "foreground": "#908caa" + } + }, + { + "scope": ["punctuation"], + "settings": { + "foreground": "#908caa" + } + }, + { + "scope": ["punctuation.accessor"], + "settings": { + "foreground": "#31748f" + } + }, + { + "scope": ["punctuation.definition.string"], + "settings": { + "foreground": "#f6c177" + } + }, + { + "scope": ["punctuation.definition.tag"], + "settings": { + "foreground": "#6e6a86" + } + }, + { + "scope": ["storage.type", "storage.modifier"], + "settings": { + "foreground": "#31748f" + } + }, + { + "scope": ["string"], + "settings": { + "foreground": "#f6c177" + } + }, + { + "scope": ["support"], + "settings": { + "foreground": "#9ccfd8" + } + }, + { + "scope": ["support.constant"], + "settings": { + "foreground": "#f6c177" + } + }, + { + "scope": ["support.function"], + "settings": { + "foreground": "#eb6f92", + "fontStyle": "italic" + } + }, + { + "scope": ["variable"], + "settings": { + "foreground": "#ebbcba", + "fontStyle": "italic" + } + }, + { + "scope": ["variable.other", "variable.language", "variable.function", "variable.argument"], + "settings": { + "foreground": "#e0def4" + } + }, + { + "scope": ["variable.parameter"], + "settings": { + "foreground": "#c4a7e7" + } + } + ] +} diff --git a/src/lib/shiki/themes/slack-dark.json b/src/lib/shiki/themes/slack-dark.json new file mode 100644 index 0000000..2679002 --- /dev/null +++ b/src/lib/shiki/themes/slack-dark.json @@ -0,0 +1,564 @@ +{ + "name": "slack-dark", + "type": "dark", + "colors": { + "activityBarBadge.background": "#1D978D", + "editor.background": "#222222", + "editor.foreground": "#E6E6E6", + "editor.inactiveSelectionBackground": "#3a3d41", + "editor.selectionHighlightBackground": "#add6ff26", + "editorIndentGuide.activeBackground": "#707070", + "editorIndentGuide.background": "#404040", + "input.placeholderForeground": "#7A7A7A", + "list.dropBackground": "#383b3d", + "list.activeSelectionBackground": "#222222", + "list.focusBackground": "#0077B5", + "menu.background": "#252526", + "menu.foreground": "#E6E6E6", + "settings.numberInputBackground": "#292929", + "settings.textInputBackground": "#292929", + "sideBarTitle.foreground": "#E6E6E6", + "statusBar.background": "#222222", + "statusBar.noFolderBackground": "#141414", + "statusBar.debuggingBackground": "#1D978D", + "list.hoverBackground": "#222222", + "gitDecoration.modifiedResourceForeground": "#ECB22E", + "gitDecoration.deletedResourceForeground": "#FFF", + "gitDecoration.untrackedResourceForeground": "#ECB22E", + "gitDecoration.ignoredResourceForeground": "#877583", + "gitDecoration.addedResourceForeground": "#ECB22E", + "gitDecoration.conflictingResourceForeground": "#FFF", + "editor.lineHighlightBorder": "#141414", + "editor.lineHighlightBackground": "#141414", + "editorSuggestWidget.selectedBackground": "#0077B5", + "sideBarSectionHeader.background": "#222222", + "activityBar.background": "#222222", + "button.background": "#0077B5", + "button.foreground": "#FFF", + "button.hoverBackground": "#005076", + "extensionButton.prominentBackground": "#0077B5", + "extensionButton.prominentForeground": "#FFF", + "extensionButton.prominentHoverBackground": "#005076", + "debugExceptionWidget.background": "#141414", + "debugExceptionWidget.border": "#FFF", + "debugToolBar.background": "#141414", + "titleBar.activeBackground": "#222222", + "titleBar.activeForeground": "#E6E6E6", + "titleBar.inactiveBackground": "#222222", + "titleBar.inactiveForeground": "#7A7A7A", + "focusBorder": "#0077B5", + "textLink.activeForeground": "#0077B5", + "textLink.foreground": "#0077B5", + "editorLink.activeForeground": "#0077B5", + "notificationLink.foreground": "#0077B5" + }, + "tokenColors": [ + { + "scope": ["meta.embedded", "source.groovy.embedded"], + "settings": { + "foreground": "#D4D4D4" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "header", + "settings": { + "foreground": "#000080" + } + }, + { + "scope": "comment", + "settings": { + "foreground": "#6A9955" + } + }, + { + "scope": "constant.language", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": ["constant.numeric"], + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "constant.regexp", + "settings": { + "foreground": "#646695" + } + }, + { + "scope": "entity.name.tag", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "entity.name.tag.css", + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": [ + "entity.other.attribute-name.class.css", + "entity.other.attribute-name.class.mixin.css", + "entity.other.attribute-name.id.css", + "entity.other.attribute-name.parent-selector.css", + "entity.other.attribute-name.pseudo-class.css", + "entity.other.attribute-name.pseudo-element.css", + "source.css.less entity.other.attribute-name.id", + "entity.other.attribute-name.attribute.scss", + "entity.other.attribute-name.scss" + ], + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "invalid", + "settings": { + "foreground": "#f44747" + } + }, + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#569cd6" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#569cd6" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "punctuation.definition.quote.begin.markdown", + "settings": { + "foreground": "#6A9955" + } + }, + { + "scope": "punctuation.definition.list.begin.markdown", + "settings": { + "foreground": "#6796e6" + } + }, + { + "scope": "markup.inline.raw", + "settings": { + "foreground": "#ce9178" + } + }, + { + "name": "brackets of XML/HTML tags", + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#808080" + } + }, + { + "scope": "meta.preprocessor", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "meta.structure.dictionary.key.python", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "storage.type", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "storage.modifier", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "string", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.tag", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.value", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#d16969" + } + }, + { + "name": "String interpolation", + "scope": [ + "punctuation.definition.template-expression.begin", + "punctuation.definition.template-expression.end", + "punctuation.section.embedded" + ], + "settings": { + "foreground": "#569cd6" + } + }, + { + "name": "Reset JavaScript string interpolation expression", + "scope": ["meta.template.expression"], + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": [ + "support.type.vendored.property-name", + "support.type.property-name", + "variable.css", + "variable.scss", + "variable.other.less", + "source.coffee.embedded" + ], + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": [ + "keyword.operator.new", + "keyword.operator.expression", + "keyword.operator.cast", + "keyword.operator.sizeof", + "keyword.operator.instanceof", + "keyword.operator.logical.python" + ], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": ["punctuation.section.embedded.begin.php", "punctuation.section.embedded.end.php"], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "name": "coloring of the Java import and package identifiers", + "scope": [ + "storage.modifier.import.java", + "variable.language.wildcard.java", + "storage.modifier.package.java" + ], + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "name": "this.self", + "scope": "variable.language", + "settings": { + "foreground": "#569cd6" + } + }, + { + "name": "Function declarations", + "scope": ["entity.name.function", "support.function", "support.constant.handlebars"], + "settings": { + "foreground": "#DCDCAA" + } + }, + { + "name": "Types declaration and references", + "scope": [ + "meta.return-type", + "support.class", + "support.type", + "entity.name.type", + "entity.name.class", + "storage.type.numeric.go", + "storage.type.byte.go", + "storage.type.boolean.go", + "storage.type.string.go", + "storage.type.uintptr.go", + "storage.type.error.go", + "storage.type.rune.go", + "storage.type.cs", + "storage.type.generic.cs", + "storage.type.modifier.cs", + "storage.type.variable.cs", + "storage.type.annotation.java", + "storage.type.generic.java", + "storage.type.java", + "storage.type.object.array.java", + "storage.type.primitive.array.java", + "storage.type.primitive.java", + "storage.type.token.java", + "storage.type.groovy", + "storage.type.annotation.groovy", + "storage.type.parameters.groovy", + "storage.type.generic.groovy", + "storage.type.object.array.groovy", + "storage.type.primitive.array.groovy", + "storage.type.primitive.groovy" + ], + "settings": { + "foreground": "#4EC9B0" + } + }, + { + "name": "Types declaration and references, TS grammar specific", + "scope": [ + "meta.type.cast.expr", + "meta.type.new.expr", + "support.constant.math", + "support.constant.dom", + "support.constant.json", + "entity.other.inherited-class" + ], + "settings": { + "foreground": "#4EC9B0" + } + }, + { + "name": "Control flow keywords", + "scope": "keyword.control", + "settings": { + "foreground": "#C586C0" + } + }, + { + "name": "Variable and parameter name", + "scope": [ + "variable", + "meta.definition.variable.name", + "support.variable", + "entity.name.variable" + ], + "settings": { + "foreground": "#9CDCFE" + } + }, + { + "name": "Object keys, TS grammar specific", + "scope": ["meta.object-literal.key"], + "settings": { + "foreground": "#9CDCFE" + } + }, + { + "name": "CSS property value", + "scope": [ + "support.constant.property-value", + "support.constant.font-name", + "support.constant.media-type", + "support.constant.media", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#CE9178" + } + }, + { + "name": "Regular expression groups", + "scope": [ + "punctuation.definition.group.regexp", + "punctuation.definition.group.assertion.regexp", + "punctuation.definition.character-class.regexp", + "punctuation.character.set.begin.regexp", + "punctuation.character.set.end.regexp", + "keyword.operator.negation.regexp", + "support.other.parenthesis.regexp" + ], + "settings": { + "foreground": "#CE9178" + } + }, + { + "scope": [ + "constant.character.character-class.regexp", + "constant.other.character-class.set.regexp", + "constant.other.character-class.regexp", + "constant.character.set.regexp" + ], + "settings": { + "foreground": "#d16969" + } + }, + { + "scope": ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"], + "settings": { + "foreground": "#DCDCAA" + } + }, + { + "scope": "keyword.operator.quantifier.regexp", + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "constant.character", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "constant.character.escape", + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "token.info-token", + "settings": { + "foreground": "#6796e6" + } + }, + { + "scope": "token.warn-token", + "settings": { + "foreground": "#cd9731" + } + }, + { + "scope": "token.error-token", + "settings": { + "foreground": "#f44747" + } + }, + { + "scope": "token.debug-token", + "settings": { + "foreground": "#b267e6" + } + } + ] +} diff --git a/src/lib/shiki/themes/slack-ochin.json b/src/lib/shiki/themes/slack-ochin.json new file mode 100644 index 0000000..3a84711 --- /dev/null +++ b/src/lib/shiki/themes/slack-ochin.json @@ -0,0 +1,475 @@ +{ + "name": "slack-ochin", + "type": "dark", + "colors": { + "foreground": "#616161", + "focusBorder": "#161F26", + "widget.shadow": "#161F2694", + "input.background": "#FFF", + "input.border": "#161F26", + "input.foreground": "#000", + "input.placeholderForeground": "#a0a0a0", + "inputOption.activeBorder": "#3E313C", + "inputValidation.errorBackground": "#F44C5E", + "inputValidation.errorForeground": "#FFF", + "inputValidation.infoBackground": "#6182b8", + "inputValidation.infoForeground": "#FFF", + "inputValidation.warningBackground": "#F6B555", + "inputValidation.warningForeground": "#000", + "list.activeSelectionBackground": "#5899C5", + "list.activeSelectionForeground": "#fff", + "list.hoverBackground": "#d5e1ea", + "list.hoverForeground": "#fff", + "list.focusBackground": "#d5e1ea", + "list.focusForeground": "#fff", + "list.inactiveSelectionBackground": "#5899C5", + "list.inactiveSelectionForeground": "#fff", + "list.highlightForeground": "#2D3E4C", + "list.inactiveFocusBackground": "#161F26", + "list.invalidItemForeground": "#fff", + "button.background": "#475663", + "button.foreground": "#FFF", + "button.hoverBackground": "#161F26", + "scrollbar.shadow": "#ffffff00", + "scrollbarSlider.activeBackground": "#161F267e", + "scrollbarSlider.background": "#161F267e", + "scrollbarSlider.hoverBackground": "#161F267e", + "badge.background": "#8AE773", + "progressBar.background": "#8AE773", + "editor.background": "#FFF", + "editor.foreground": "#000", + "editor.lineHighlightBackground": "#EEEEEE", + "editor.wordHighlightStrongBackground": "#EEEEEE", + "editor.selectionBackground": "#AED4FB", + "editorLineNumber.foreground": "#b9b9b9", + "editorActiveLineNumber.foreground": "#475663", + "editor.findMatchBackground": "#AED4FB", + "editorHint.foreground": "#F9F9F9", + "editorHint.border": "#F9F9F9", + "editor.wordHighlightBackground": "#AED4FB", + "terminal.border": "#2D3E4C", + "terminal.foreground": "#161F26", + "terminal.ansiBlack": "#000000", + "terminal.ansiBlue": "#6182b8", + "terminal.ansiBrightBlack": "#90a4ae", + "terminal.ansiBrightBlue": "#6182b8", + "terminal.ansiBrightCyan": "#39adb5", + "terminal.ansiBrightGreen": "#91b859", + "terminal.ansiBrightMagenta": "#7c4dff", + "terminal.ansiBrightRed": "#e53935", + "terminal.ansiBrightWhite": "#ffffff", + "terminal.ansiBrightYellow": "#ffb62c", + "terminal.ansiCyan": "#39adb5", + "terminal.ansiGreen": "#91b859", + "terminal.ansiMagenta": "#7c4dff", + "terminal.ansiRed": "#e53935", + "terminal.ansiWhite": "#ffffff", + "terminal.ansiYellow": "#ffb62c", + "terminal.selectionBackground": "#0006", + "panelTitle.activeForeground": "#161F26", + "activityBar.background": "#161F26", + "activityBar.foreground": "#FFF", + "activityBar.dropBackground": "#FFF", + "activityBarBadge.background": "#8AE773", + "activityBarBadge.foreground": "#FFF", + "panel.border": "#2D3E4C", + "dropdown.background": "#FFF", + "dropdown.listBackground": "#FFF", + "dropdown.border": "#DCDEDF", + "dropdown.foreground": "#DCDEDF", + "sideBar.background": "#2D3E4C", + "sideBar.foreground": "#DCDEDF", + "sideBarTitle.foreground": "#FFF", + "sideBarSectionHeader.foreground": "#FFF", + "sideBarSectionHeader.background": "#161F26", + "debugToolBar.background": "#161F26", + "tab.border": "#F3F3F3", + "tab.activeBackground": "#FFF", + "tab.inactiveForeground": "#686868", + "tab.inactiveBackground": "#F3F3F3", + "tab.activeForeground": "#000", + "editorGroupHeader.tabsBackground": "#2D3E4C", + "statusBar.foreground": "#FFF", + "statusBar.background": "#5899C5", + "statusBar.debuggingBackground": "#8AE773", + "statusBar.noFolderBackground": "#161F26", + "extensionButton.prominentBackground": "#475663", + "extensionButton.prominentForeground": "#F6F6F6", + "extensionButton.prominentHoverBackground": "#161F26", + "gitDecoration.modifiedResourceForeground": "#ECB22E", + "gitDecoration.deletedResourceForeground": "#FFF", + "gitDecoration.untrackedResourceForeground": "#ECB22E", + "gitDecoration.ignoredResourceForeground": "#877583", + "gitDecoration.addedResourceForeground": "#ECB22E", + "gitDecoration.conflictingResourceForeground": "#FFF", + "notificationCenter.border": "#161F26", + "notificationToast.border": "#161F26", + "notifications.foreground": "#FFF", + "notifications.background": "#161F26", + "notifications.border": "#161F26", + "notificationCenterHeader.foreground": "#FFF", + "notificationLink.foreground": "#FFF", + "titleBar.activeBackground": "#2D3E4C", + "titleBar.activeForeground": "#FFF", + "titleBar.inactiveBackground": "#161F26", + "titleBar.inactiveForeground": "#685C66", + "titleBar.border": "#2D3E4C", + "welcomePage.buttonBackground": "#F3F3F3", + "welcomePage.buttonHoverBackground": "#ECECEC", + "editorWidget.background": "#F9F9F9", + "editorWidget.border": "#dbdbdb", + "editorSuggestWidget.foreground": "#2D3E4C", + "editorSuggestWidget.highlightForeground": "#2D3E4C", + "editorSuggestWidget.selectedBackground": "#b9b9b9", + "editorGroup.emptyBackground": "#2D3E4C", + "editorGroup.focusedEmptyBorder": "#2D3E4C", + "editorPane.background": "#2D3E4C", + "breadcrumb.foreground": "#161F26", + "breadcrumb.focusForeground": "#475663", + "settings.headerForeground": "#161F26", + "settings.dropdownForeground": "#161F26", + "settings.dropdownBorder": "#161F26", + "menu.separatorBackground": "#F9FAFA", + "menu.background": "#161F26", + "menu.foreground": "#F9FAFA", + "textPreformat.foreground": "#161F26", + "editorIndentGuide.background": "#F3F3F3", + "editorIndentGuide.activeBackground": "#dbdbdb", + "debugExceptionWidget.background": "#AED4FB", + "debugExceptionWidget.border": "#161F26", + "editorMarkerNavigation.background": "#F9F9F9", + "editorMarkerNavigationInfo.background": "#6182b8", + "editorMarkerNavigationError.background": "#F44C5E", + "editorMarkerNavigationWarning.background": "#F6B555" + }, + "tokenColors": [ + { + "settings": { + "foreground": "#002339" + } + }, + { + "scope": ["meta.paragraph.markdown", "string.other.link.description.title.markdown"], + "settings": { + "foreground": "#110000" + } + }, + { + "scope": ["entity.name.section.markdown", "punctuation.definition.heading.markdown"], + "settings": { + "foreground": "#034c7c" + } + }, + { + "scope": [ + "punctuation.definition.string.begin.markdown", + "punctuation.definition.string.end.markdown", + "markup.quote.markdown" + ], + "settings": { + "foreground": "#00AC8F" + } + }, + { + "scope": ["markup.quote.markdown"], + "settings": { + "fontStyle": "italic", + "foreground": "#003494" + } + }, + { + "scope": ["markup.bold.markdown", "punctuation.definition.bold.markdown"], + "settings": { + "fontStyle": "bold", + "foreground": "#4e76b5" + } + }, + { + "scope": ["markup.italic.markdown", "punctuation.definition.italic.markdown"], + "settings": { + "fontStyle": "italic", + "foreground": "#C792EA" + } + }, + { + "scope": ["markup.inline.raw.string.markdown", "markup.fenced_code.block.markdown"], + "settings": { + "fontStyle": "italic", + "foreground": "#0460b1" + } + }, + { + "scope": ["punctuation.definition.metadata.markdown"], + "settings": { + "foreground": "#00AC8F" + } + }, + { + "scope": ["markup.underline.link.image.markdown", "markup.underline.link.markdown"], + "settings": { + "foreground": "#924205" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "fontStyle": "italic", + "foreground": "#357b42" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#a44185" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "foreground": "#174781" + } + }, + { + "name": "Constant", + "scope": "constant", + "settings": { + "foreground": "#174781" + } + }, + { + "name": "Built-in constant", + "scope": "language.method", + "settings": { + "foreground": "#174781" + } + }, + { + "name": "User-defined constant", + "scope": ["constant.character", "constant.other"], + "settings": { + "foreground": "#174781" + } + }, + { + "name": "Variable", + "scope": "variable", + "settings": { + "fontStyle": "", + "foreground": "#2f86d2" + } + }, + { + "name": "Variable", + "scope": "variable.language.this", + "settings": { + "fontStyle": "", + "foreground": "#000000" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "fontStyle": "", + "foreground": "#7b30d0" + } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "fontStyle": "", + "foreground": "#da5221" + } + }, + { + "name": "Storage type", + "scope": "storage.type", + "settings": { + "foreground": "#0991b6", + "fontStyle": "" + } + }, + { + "name": "Class name", + "scope": "entity.name.class", + "settings": { + "foreground": "#1172c7" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "fontStyle": "", + "foreground": "#b02767" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "fontStyle": "", + "foreground": "#7eb233" + } + }, + { + "name": "Function argument", + "scope": "variable.parameter", + "settings": { + "foreground": "#b1108e", + "fontStyle": "" + } + }, + { + "name": "Tag name", + "scope": "entity.name.tag", + "settings": { + "fontStyle": "", + "foreground": "#0444ac" + } + }, + { + "name": "Html Other", + "scope": "text.html.basic", + "settings": { + "fontStyle": "", + "foreground": "#0071ce" + } + }, + { + "name": "Entity Name Type", + "scope": "entity.name.type", + "settings": { + "foreground": "#0444ac" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "fontStyle": "italic", + "foreground": "#df8618" + } + }, + { + "name": "Library function", + "scope": "support.function", + "settings": { + "fontStyle": "", + "foreground": "#1ab394" + } + }, + { + "name": "Library constant", + "scope": "support.constant", + "settings": { + "fontStyle": "", + "foreground": "#174781" + } + }, + { + "name": "Library class/type", + "scope": ["support.type", "support.class"], + "settings": { + "foreground": "#dc3eb7" + } + }, + { + "name": "Library variable", + "scope": "support.other.variable", + "settings": { + "foreground": "#224555" + } + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": { + "fontStyle": " italic bold underline", + "foreground": "#207bb8" + } + }, + { + "name": "Invalid deprecated", + "scope": "invalid.deprecated", + "settings": { + "foreground": "#207bb8", + "fontStyle": " bold italic underline" + } + }, + { + "name": "[JSON] - Support", + "scope": "source.json support", + "settings": { + "foreground": "#6dbdfa" + } + }, + { + "name": "[JSON] - String", + "scope": ["source.json string", "source.json punctuation.definition.string"], + "settings": { + "foreground": "#00820f" + } + }, + { + "name": "Lists", + "scope": "markup.list", + "settings": { + "foreground": "#207bb8" + } + }, + { + "name": "Headings", + "scope": ["markup.heading punctuation.definition.heading", "entity.name.section"], + "settings": { + "fontStyle": "", + "foreground": "#4FB4D8" + } + }, + { + "name": "Support", + "scope": [ + "text.html.markdown meta.paragraph meta.link.inline", + "text.html.markdown meta.paragraph meta.link.inline punctuation.definition.string.begin.markdown", + "text.html.markdown meta.paragraph meta.link.inline punctuation.definition.string.end.markdown" + ], + "settings": { + "foreground": "#87429A" + } + }, + { + "name": "Quotes", + "scope": "markup.quote", + "settings": { + "foreground": "#87429A" + } + }, + { + "name": "Bold", + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#08134A" + } + }, + { + "name": "Italic", + "scope": ["markup.italic", "punctuation.definition.italic"], + "settings": { + "fontStyle": "italic", + "foreground": "#174781" + } + }, + { + "name": "Link Url", + "scope": "meta.link", + "settings": { + "foreground": "#87429A" + } + } + ] +} diff --git a/src/lib/shiki/themes/solarized-dark.json b/src/lib/shiki/themes/solarized-dark.json new file mode 100644 index 0000000..646d3f8 --- /dev/null +++ b/src/lib/shiki/themes/solarized-dark.json @@ -0,0 +1,396 @@ +{ + "name": "solarized-dark", + "tokenColors": [ + { + "settings": { + "foreground": "#839496" + } + }, + { + "scope": [ + "meta.embedded", + "source.groovy.embedded", + "string meta.image.inline.markdown", + "variable.legacy.builtin.python" + ], + "settings": { + "foreground": "#839496" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "fontStyle": "italic", + "foreground": "#586E75" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#2AA198" + } + }, + { + "name": "Regexp", + "scope": "string.regexp", + "settings": { + "foreground": "#DC322F" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "foreground": "#D33682" + } + }, + { + "name": "Variable", + "scope": ["variable.language", "variable.other"], + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "fontStyle": "bold", + "foreground": "#93A1A1" + } + }, + { + "name": "Class name", + "scope": [ + "entity.name.class", + "entity.name.type", + "entity.name.namespace", + "entity.name.scope-resolution" + ], + "settings": { + "fontStyle": "", + "foreground": "#CB4B16" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Variable start", + "scope": "punctuation.definition.variable", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Embedded code markers", + "scope": ["punctuation.section.embedded.begin", "punctuation.section.embedded.end"], + "settings": { + "foreground": "#DC322F" + } + }, + { + "name": "Built-in constant", + "scope": ["constant.language", "meta.preprocessor"], + "settings": { + "foreground": "#B58900" + } + }, + { + "name": "Support.construct", + "scope": ["support.function.construct", "keyword.other.new"], + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "User-defined constant", + "scope": ["constant.character", "constant.other"], + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "foreground": "#6C71C4" + } + }, + { + "name": "Function argument", + "scope": "variable.parameter", + "settings": {} + }, + { + "name": "Tag name", + "scope": "entity.name.tag", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Tag start/end", + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#586E75" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#93A1A1" + } + }, + { + "name": "Library function", + "scope": "support.function", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Continuation", + "scope": "punctuation.separator.continuation", + "settings": { + "foreground": "#DC322F" + } + }, + { + "name": "Library constant", + "scope": ["support.constant", "support.variable"], + "settings": {} + }, + { + "name": "Library class/type", + "scope": ["support.type", "support.class"], + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Library Exception", + "scope": "support.type.exception", + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "Library variable", + "scope": "support.other.variable", + "settings": {} + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": { + "foreground": "#DC322F" + } + }, + { + "name": "diff: header", + "scope": ["meta.diff", "meta.diff.header"], + "settings": { + "fontStyle": "italic", + "foreground": "#268BD2" + } + }, + { + "name": "diff: deleted", + "scope": "markup.deleted", + "settings": { + "fontStyle": "", + "foreground": "#DC322F" + } + }, + { + "name": "diff: changed", + "scope": "markup.changed", + "settings": { + "fontStyle": "", + "foreground": "#CB4B16" + } + }, + { + "name": "diff: inserted", + "scope": "markup.inserted", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Markup Quote", + "scope": "markup.quote", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Markup Lists", + "scope": "markup.list", + "settings": { + "foreground": "#B58900" + } + }, + { + "name": "Markup Styling", + "scope": ["markup.bold", "markup.italic"], + "settings": { + "foreground": "#D33682" + } + }, + { + "name": "Markup: Strong", + "scope": "markup.bold", + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Markup: Emphasis", + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.strikethrough", + "settings": { + "fontStyle": "strikethrough" + } + }, + { + "name": "Markup Inline", + "scope": "markup.inline.raw", + "settings": { + "fontStyle": "", + "foreground": "#2AA198" + } + }, + { + "name": "Markup Headings", + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#268BD2" + } + }, + { + "name": "Markup Setext Header", + "scope": "markup.heading.setext", + "settings": { + "fontStyle": "", + "foreground": "#268BD2" + } + } + ], + "colors": { + "focusBorder": "#2AA19899", + "selection.background": "#2AA19899", + "input.background": "#003847", + "input.foreground": "#93A1A1", + "input.placeholderForeground": "#93A1A1AA", + "inputOption.activeBorder": "#2AA19899", + "inputValidation.infoBorder": "#363b5f", + "inputValidation.infoBackground": "#052730", + "inputValidation.warningBackground": "#5d5938", + "inputValidation.warningBorder": "#9d8a5e", + "inputValidation.errorBackground": "#571b26", + "inputValidation.errorBorder": "#a92049", + "errorForeground": "#ffeaea", + "badge.background": "#047aa6", + "progressBar.background": "#047aa6", + "dropdown.background": "#00212B", + "dropdown.border": "#2AA19899", + "button.background": "#2AA19899", + "list.activeSelectionBackground": "#005A6F", + "quickInputList.focusBackground": "#005A6F", + "list.hoverBackground": "#004454AA", + "list.inactiveSelectionBackground": "#00445488", + "list.dropBackground": "#00445488", + "list.highlightForeground": "#1ebcc5", + "editor.background": "#002B36", + "editor.foreground": "#839496", + "editorWidget.background": "#00212B", + "editorCursor.foreground": "#D30102", + "editorWhitespace.foreground": "#93A1A180", + "editor.lineHighlightBackground": "#073642", + "editorLineNumber.activeForeground": "#949494", + "editor.selectionBackground": "#274642", + "minimap.selectionHighlight": "#274642", + "editorIndentGuide.background": "#93A1A180", + "editorIndentGuide.activeBackground": "#C3E1E180", + "editorHoverWidget.background": "#004052", + "editorMarkerNavigationError.background": "#AB395B", + "editorMarkerNavigationWarning.background": "#5B7E7A", + "editor.selectionHighlightBackground": "#005A6FAA", + "editor.wordHighlightBackground": "#004454AA", + "editor.wordHighlightStrongBackground": "#005A6FAA", + "editorBracketHighlight.foreground1": "#cdcdcdff", + "editorBracketHighlight.foreground2": "#b58900ff", + "editorBracketHighlight.foreground3": "#d33682ff", + "peekViewResult.background": "#00212B", + "peekViewEditor.background": "#10192c", + "peekViewTitle.background": "#00212B", + "peekView.border": "#2b2b4a", + "peekViewEditor.matchHighlightBackground": "#7744AA40", + "titleBar.activeBackground": "#002C39", + "editorGroup.border": "#00212B", + "editorGroup.dropBackground": "#2AA19844", + "editorGroupHeader.tabsBackground": "#004052", + "tab.activeForeground": "#d6dbdb", + "tab.activeBackground": "#002B37", + "tab.inactiveForeground": "#93A1A1", + "tab.inactiveBackground": "#004052", + "tab.border": "#003847", + "tab.lastPinnedBorder": "#2AA19844", + "activityBar.background": "#003847", + "panel.border": "#2b2b4a", + "sideBar.background": "#00212B", + "sideBarTitle.foreground": "#93A1A1", + "statusBar.foreground": "#93A1A1", + "statusBar.background": "#00212B", + "statusBar.debuggingBackground": "#00212B", + "statusBar.noFolderBackground": "#00212B", + "statusBarItem.remoteBackground": "#2AA19899", + "ports.iconRunningProcessForeground": "#369432", + "statusBarItem.prominentBackground": "#003847", + "statusBarItem.prominentHoverBackground": "#003847", + "debugToolBar.background": "#00212B", + "debugExceptionWidget.background": "#00212B", + "debugExceptionWidget.border": "#AB395B", + "pickerGroup.foreground": "#2AA19899", + "pickerGroup.border": "#2AA19899", + "terminal.ansiBlack": "#073642", + "terminal.ansiRed": "#dc322f", + "terminal.ansiGreen": "#859900", + "terminal.ansiYellow": "#b58900", + "terminal.ansiBlue": "#268bd2", + "terminal.ansiMagenta": "#d33682", + "terminal.ansiCyan": "#2aa198", + "terminal.ansiWhite": "#eee8d5", + "terminal.ansiBrightBlack": "#002b36", + "terminal.ansiBrightRed": "#cb4b16", + "terminal.ansiBrightGreen": "#586e75", + "terminal.ansiBrightYellow": "#657b83", + "terminal.ansiBrightBlue": "#839496", + "terminal.ansiBrightMagenta": "#6c71c4", + "terminal.ansiBrightCyan": "#93a1a1", + "terminal.ansiBrightWhite": "#fdf6e3" + }, + "semanticHighlighting": true +} diff --git a/src/lib/shiki/themes/solarized-light.json b/src/lib/shiki/themes/solarized-light.json new file mode 100644 index 0000000..9283f3e --- /dev/null +++ b/src/lib/shiki/themes/solarized-light.json @@ -0,0 +1,388 @@ +{ + "name": "solarized-light", + "tokenColors": [ + { + "settings": { + "foreground": "#657B83" + } + }, + { + "scope": [ + "meta.embedded", + "source.groovy.embedded", + "string meta.image.inline.markdown", + "variable.legacy.builtin.python" + ], + "settings": { + "foreground": "#657B83" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "fontStyle": "italic", + "foreground": "#93A1A1" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#2AA198" + } + }, + { + "name": "Regexp", + "scope": "string.regexp", + "settings": { + "foreground": "#DC322F" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "foreground": "#D33682" + } + }, + { + "name": "Variable", + "scope": ["variable.language", "variable.other"], + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "fontStyle": "bold", + "foreground": "#586E75" + } + }, + { + "name": "Class name", + "scope": [ + "entity.name.class", + "entity.name.type", + "entity.name.namespace", + "entity.name.scope-resolution" + ], + "settings": { + "fontStyle": "", + "foreground": "#CB4B16" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Variable start", + "scope": "punctuation.definition.variable", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Embedded code markers", + "scope": ["punctuation.section.embedded.begin", "punctuation.section.embedded.end"], + "settings": { + "foreground": "#DC322F" + } + }, + { + "name": "Built-in constant", + "scope": ["constant.language", "meta.preprocessor"], + "settings": { + "foreground": "#B58900" + } + }, + { + "name": "Support.construct", + "scope": ["support.function.construct", "keyword.other.new"], + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "User-defined constant", + "scope": ["constant.character", "constant.other"], + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "foreground": "#6C71C4" + } + }, + { + "name": "Function argument", + "scope": "variable.parameter", + "settings": {} + }, + { + "name": "Tag name", + "scope": "entity.name.tag", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Tag start/end", + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#93A1A1" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#93A1A1" + } + }, + { + "name": "Library function", + "scope": "support.function", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Continuation", + "scope": "punctuation.separator.continuation", + "settings": { + "foreground": "#DC322F" + } + }, + { + "name": "Library constant", + "scope": ["support.constant", "support.variable"], + "settings": {} + }, + { + "name": "Library class/type", + "scope": ["support.type", "support.class"], + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Library Exception", + "scope": "support.type.exception", + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "Library variable", + "scope": "support.other.variable", + "settings": {} + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": { + "foreground": "#DC322F" + } + }, + { + "name": "diff: header", + "scope": ["meta.diff", "meta.diff.header"], + "settings": { + "fontStyle": "italic", + "foreground": "#268BD2" + } + }, + { + "name": "diff: deleted", + "scope": "markup.deleted", + "settings": { + "fontStyle": "", + "foreground": "#DC322F" + } + }, + { + "name": "diff: changed", + "scope": "markup.changed", + "settings": { + "fontStyle": "", + "foreground": "#CB4B16" + } + }, + { + "name": "diff: inserted", + "scope": "markup.inserted", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Markup Quote", + "scope": "markup.quote", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Markup Lists", + "scope": "markup.list", + "settings": { + "foreground": "#B58900" + } + }, + { + "name": "Markup Styling", + "scope": ["markup.bold", "markup.italic"], + "settings": { + "foreground": "#D33682" + } + }, + { + "name": "Markup: Strong", + "scope": "markup.bold", + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Markup: Emphasis", + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.strikethrough", + "settings": { + "fontStyle": "strikethrough" + } + }, + { + "name": "Markup Inline", + "scope": "markup.inline.raw", + "settings": { + "fontStyle": "", + "foreground": "#2AA198" + } + }, + { + "name": "Markup Headings", + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#268BD2" + } + }, + { + "name": "Markup Setext Header", + "scope": "markup.heading.setext", + "settings": { + "fontStyle": "", + "foreground": "#268BD2" + } + } + ], + "colors": { + "focusBorder": "#b49471", + "input.background": "#DDD6C1", + "input.foreground": "#586E75", + "input.placeholderForeground": "#586E75AA", + "inputOption.activeBorder": "#D3AF86", + "badge.background": "#B58900AA", + "progressBar.background": "#B58900", + "dropdown.background": "#EEE8D5", + "dropdown.border": "#D3AF86", + "button.background": "#AC9D57", + "selection.background": "#878b9180", + "list.activeSelectionBackground": "#DFCA88", + "list.activeSelectionForeground": "#6C6C6C", + "quickInputList.focusBackground": "#DFCA8866", + "list.hoverBackground": "#DFCA8844", + "list.inactiveSelectionBackground": "#D1CBB8", + "list.highlightForeground": "#B58900", + "editor.background": "#FDF6E3", + "editor.foreground": "#657B83", + "notebook.cellEditorBackground": "#F7F0E0", + "editorWidget.background": "#EEE8D5", + "editorCursor.foreground": "#657B83", + "editorWhitespace.foreground": "#586E7580", + "editor.lineHighlightBackground": "#EEE8D5", + "editor.selectionBackground": "#EEE8D5", + "minimap.selectionHighlight": "#EEE8D5", + "editorIndentGuide.background": "#586E7580", + "editorIndentGuide.activeBackground": "#081E2580", + "editorHoverWidget.background": "#CCC4B0", + "editorLineNumber.activeForeground": "#567983", + "peekViewResult.background": "#EEE8D5", + "peekViewEditor.background": "#FFFBF2", + "peekViewTitle.background": "#EEE8D5", + "peekView.border": "#B58900", + "peekViewEditor.matchHighlightBackground": "#7744AA40", + "titleBar.activeBackground": "#EEE8D5", + "editorGroup.border": "#DDD6C1", + "editorGroup.dropBackground": "#DDD6C1AA", + "editorGroupHeader.tabsBackground": "#D9D2C2", + "tab.border": "#DDD6C1", + "tab.activeBackground": "#FDF6E3", + "tab.inactiveForeground": "#586E75", + "tab.inactiveBackground": "#D3CBB7", + "tab.activeModifiedBorder": "#cb4b16", + "tab.lastPinnedBorder": "#FDF6E3", + "activityBar.background": "#DDD6C1", + "activityBar.foreground": "#584c27", + "activityBarBadge.background": "#B58900", + "panel.border": "#DDD6C1", + "sideBar.background": "#EEE8D5", + "sideBarTitle.foreground": "#586E75", + "statusBar.foreground": "#586E75", + "statusBar.background": "#EEE8D5", + "statusBar.debuggingBackground": "#EEE8D5", + "statusBar.noFolderBackground": "#EEE8D5", + "statusBarItem.remoteBackground": "#AC9D57", + "ports.iconRunningProcessForeground": "#2AA19899", + "statusBarItem.prominentBackground": "#DDD6C1", + "statusBarItem.prominentHoverBackground": "#DDD6C199", + "debugToolBar.background": "#DDD6C1", + "debugExceptionWidget.background": "#DDD6C1", + "debugExceptionWidget.border": "#AB395B", + "pickerGroup.border": "#2AA19899", + "pickerGroup.foreground": "#2AA19899", + "extensionButton.prominentBackground": "#b58900", + "extensionButton.prominentHoverBackground": "#584c27aa", + "terminal.ansiBlack": "#073642", + "terminal.ansiRed": "#dc322f", + "terminal.ansiGreen": "#859900", + "terminal.ansiYellow": "#b58900", + "terminal.ansiBlue": "#268bd2", + "terminal.ansiMagenta": "#d33682", + "terminal.ansiCyan": "#2aa198", + "terminal.ansiWhite": "#eee8d5", + "terminal.ansiBrightBlack": "#002b36", + "terminal.ansiBrightRed": "#cb4b16", + "terminal.ansiBrightGreen": "#586e75", + "terminal.ansiBrightYellow": "#657b83", + "terminal.ansiBrightBlue": "#839496", + "terminal.ansiBrightMagenta": "#6c71c4", + "terminal.ansiBrightCyan": "#93a1a1", + "terminal.ansiBrightWhite": "#fdf6e3", + "terminal.background": "#FDF6E3", + "walkThrough.embeddedEditorBackground": "#00000014" + }, + "semanticHighlighting": true +} diff --git a/src/lib/shiki/themes/vitesse-dark.json b/src/lib/shiki/themes/vitesse-dark.json new file mode 100644 index 0000000..7689d61 --- /dev/null +++ b/src/lib/shiki/themes/vitesse-dark.json @@ -0,0 +1,1091 @@ +{ + "name": "vitesse-dark", + "base": "vs-dark", + "colors": { + "focusBorder": "#00000000", + "foreground": "#dbd7caee", + "descriptionForeground": "#dedcd590", + "errorForeground": "#cb7676", + "textLink.foreground": "#4d9375", + "textLink.activeForeground": "#4d9375", + "textBlockQuote.background": "#121212", + "textBlockQuote.border": "#191919", + "textCodeBlock.background": "#121212", + "textPreformat.foreground": "#d1d5da", + "textSeparator.foreground": "#586069", + "button.background": "#4d9375", + "button.foreground": "#121212", + "button.hoverBackground": "#4d9375", + "checkbox.background": "#181818", + "checkbox.border": "#2f363d", + "dropdown.background": "#121212", + "dropdown.border": "#191919", + "dropdown.foreground": "#dbd7caee", + "dropdown.listBackground": "#181818", + "input.background": "#181818", + "input.border": "#191919", + "input.foreground": "#dbd7caee", + "input.placeholderForeground": "#dedcd590", + "inputOption.activeBackground": "#dedcd550", + "badge.foreground": "#121212", + "badge.background": "#dedcd590", + "progressBar.background": "#4d9375", + "titleBar.activeForeground": "#bfbaaa", + "titleBar.activeBackground": "#121212", + "titleBar.inactiveForeground": "#959da5", + "titleBar.inactiveBackground": "#121212", + "titleBar.border": "#181818", + "activityBar.foreground": "#dbd7caee", + "activityBar.inactiveForeground": "#dedcd550", + "activityBar.background": "#121212", + "activityBarBadge.foreground": "#121212", + "activityBarBadge.background": "#bfbaaa", + "activityBar.activeBorder": "#4d9375", + "activityBar.border": "#191919", + "sideBar.foreground": "#bfbaaa", + "sideBar.background": "#121212", + "sideBar.border": "#191919", + "sideBarTitle.foreground": "#dbd7caee", + "sideBarSectionHeader.foreground": "#dbd7caee", + "sideBarSectionHeader.background": "#121212", + "sideBarSectionHeader.border": "#191919", + "list.hoverForeground": "#dbd7caee", + "list.inactiveSelectionForeground": "#dbd7caee", + "list.activeSelectionForeground": "#dbd7caee", + "list.hoverBackground": "#181818", + "list.inactiveSelectionBackground": "#181818", + "list.activeSelectionBackground": "#181818", + "list.inactiveFocusBackground": "#121212", + "list.focusBackground": "#181818", + "list.highlightForeground": "#4d9375", + "tree.indentGuidesStroke": "#2f363d", + "notificationCenterHeader.foreground": "#959da5", + "notificationCenterHeader.background": "#121212", + "notifications.foreground": "#dbd7caee", + "notifications.background": "#121212", + "notifications.border": "#191919", + "notificationsErrorIcon.foreground": "#cb7676", + "notificationsWarningIcon.foreground": "#d4976c", + "notificationsInfoIcon.foreground": "#6394bf", + "pickerGroup.border": "#191919", + "pickerGroup.foreground": "#dbd7caee", + "quickInput.background": "#121212", + "quickInput.foreground": "#dbd7caee", + "quickInputList.focusBackground": "#181818", + "statusBar.foreground": "#bfbaaa", + "statusBar.background": "#121212", + "statusBar.border": "#191919", + "statusBar.noFolderBackground": "#121212", + "statusBar.debuggingBackground": "#181818", + "statusBar.debuggingForeground": "#bfbaaa", + "statusBarItem.prominentBackground": "#181818", + "editorGroupHeader.tabsBackground": "#121212", + "editorGroupHeader.tabsBorder": "#191919", + "editorGroup.border": "#191919", + "tab.activeForeground": "#dbd7caee", + "tab.inactiveForeground": "#959da5", + "tab.inactiveBackground": "#121212", + "tab.activeBackground": "#121212", + "tab.hoverBackground": "#181818", + "tab.unfocusedHoverBackground": "#121212", + "tab.border": "#191919", + "tab.unfocusedActiveBorderTop": "#191919", + "tab.activeBorder": "#191919", + "tab.unfocusedActiveBorder": "#191919", + "tab.activeBorderTop": "#dedcd590", + "breadcrumb.foreground": "#959da5", + "breadcrumb.focusForeground": "#dbd7caee", + "breadcrumb.background": "#181818", + "breadcrumb.activeSelectionForeground": "#eeeeee15", + "breadcrumbPicker.background": "#121212", + "editor.foreground": "#dbd7caee", + "editor.background": "#121212", + "editorWidget.background": "#121212", + "editor.foldBackground": "#eeeeee10", + "editor.lineHighlightBackground": "#181818", + "editorLineNumber.foreground": "#dedcd550", + "editorLineNumber.activeForeground": "#bfbaaa", + "editorIndentGuide.background": "#ffffff15", + "editorIndentGuide.activeBackground": "#ffffff30", + "editorWhitespace.foreground": "#ffffff15", + "editor.findMatchBackground": "#e6cc7722", + "editor.findMatchHighlightBackground": "#e6cc7744", + "editor.inactiveSelectionBackground": "#eeeeee08", + "editor.selectionBackground": "#eeeeee15", + "editor.selectionHighlightBackground": "#eeeeee08", + "editor.wordHighlightBackground": "#1c6b4805", + "editor.wordHighlightStrongBackground": "#1c6b4810", + "editorBracketMatch.background": "#4d937520", + "diffEditor.insertedTextBackground": "#4d937522", + "diffEditor.removedTextBackground": "#ab595922", + "scrollbar.shadow": "#0000", + "scrollbarSlider.background": "#dedcd510", + "scrollbarSlider.hoverBackground": "#dedcd550", + "scrollbarSlider.activeBackground": "#dedcd550", + "editorOverviewRuler.border": "#111", + "panel.background": "#121212", + "panel.border": "#191919", + "panelTitle.activeBorder": "#4d9375", + "panelTitle.activeForeground": "#dbd7caee", + "panelTitle.inactiveForeground": "#959da5", + "panelInput.border": "#2f363d", + "terminal.foreground": "#dbd7caee", + "terminal.selectionBackground": "#eeeeee15", + "terminal.ansiBrightBlack": "#777777", + "terminal.ansiBrightBlue": "#6394bf", + "terminal.ansiBrightCyan": "#5eaab5", + "terminal.ansiBrightGreen": "#4d9375", + "terminal.ansiBrightMagenta": "#d9739f", + "terminal.ansiBrightRed": "#cb7676", + "terminal.ansiBrightWhite": "#ffffff", + "terminal.ansiBrightYellow": "#e6cc77", + "terminal.ansiBlack": "#393a34", + "terminal.ansiBlue": "#6394bf", + "terminal.ansiCyan": "#5eaab5", + "terminal.ansiGreen": "#4d9375", + "terminal.ansiMagenta": "#d9739f", + "terminal.ansiRed": "#cb7676", + "terminal.ansiWhite": "#dbd7caee", + "terminal.ansiYellow": "#e6cc77", + "gitDecoration.addedResourceForeground": "#4d9375", + "gitDecoration.modifiedResourceForeground": "#6394bf", + "gitDecoration.deletedResourceForeground": "#cb7676", + "gitDecoration.untrackedResourceForeground": "#5eaab5", + "gitDecoration.ignoredResourceForeground": "#dedcd550", + "gitDecoration.conflictingResourceForeground": "#d4976c", + "gitDecoration.submoduleResourceForeground": "#dedcd590", + "editorGutter.modifiedBackground": "#6394bf", + "editorGutter.addedBackground": "#4d9375", + "editorGutter.deletedBackground": "#cb7676", + "editorBracketHighlight.foreground1": "#5eaab5", + "editorBracketHighlight.foreground2": "#4d9375", + "editorBracketHighlight.foreground3": "#d4976c", + "editorBracketHighlight.foreground4": "#d9739f", + "editorBracketHighlight.foreground5": "#e6cc77", + "editorBracketHighlight.foreground6": "#6394bf", + "debugToolBar.background": "#121212", + "editor.stackFrameHighlightBackground": "#a707", + "editor.focusedStackFrameHighlightBackground": "#b808", + "peekViewEditor.matchHighlightBackground": "#ffd33d33", + "peekViewResult.matchHighlightBackground": "#ffd33d33", + "peekViewEditor.background": "#121212", + "peekViewResult.background": "#121212", + "settings.headerForeground": "#dbd7caee", + "settings.modifiedItemIndicator": "#4d9375", + "welcomePage.buttonBackground": "#2f363d", + "welcomePage.buttonHoverBackground": "#444d56", + "problemsErrorIcon.foreground": "#cb7676", + "problemsWarningIcon.foreground": "#d4976c", + "problemsInfoIcon.foreground": "#6394bf", + "editorError.foreground": "#cb7676", + "editorWarning.foreground": "#d4976c", + "editorInfo.foreground": "#6394bf", + "editorHint.foreground": "#4d9375", + "editorGutter.commentRangeForeground": "#dedcd550", + "editorGutter.foldingControlForeground": "#dedcd590", + "editorInlayHint.foreground": "#666666", + "editorInlayHint.background": "#00000000", + "editorStickyScroll.background": "#181818", + "editorStickyScrollHover.background": "#181818", + "menu.separatorBackground": "#191919" + }, + "semanticHighlighting": true, + "semanticTokenColors": { + "namespace": "#db889a", + "property": "#b8a965", + "interface": "#5d99a9", + "type": "#5d99a9", + "class": "#7f8ac7" + }, + "tokenColors": [ + { + "scope": ["comment", "punctuation.definition.comment", "string.comment"], + "settings": { + "foreground": "#758575dd" + } + }, + { + "scope": [ + "delimiter.bracket", + "delimiter", + "invalid.illegal.character-not-allowed-here.html", + "keyword.operator.rest", + "keyword.operator.spread", + "keyword.operator.type.annotation", + "keyword.operator.relational", + "keyword.operator.assignment", + "meta.brace", + "meta.tag.block.any.html", + "meta.tag.inline.any.html", + "meta.tag.structure.input.void.html", + "meta.type.annotation", + "meta.embedded.block.github-actions-expression", + "storage.type.function.arrow", + "keyword.operator.type", + "meta.objectliteral.ts", + "punctuation" + ], + "settings": { + "foreground": "#666666" + } + }, + { + "scope": [ + "constant", + "entity.name.constant", + "variable.language", + "meta.definition.variable" + ], + "settings": { + "foreground": "#c99076" + } + }, + { + "scope": ["entity", "entity.name"], + "settings": { + "foreground": "#80a665" + } + }, + { + "scope": "variable.parameter.function", + "settings": { + "foreground": "#dbd7caee" + } + }, + { + "scope": ["entity.name.tag", "tag.html"], + "settings": { + "foreground": "#4d9375" + } + }, + { + "scope": "entity.name.function", + "settings": { + "foreground": "#80a665" + } + }, + { + "scope": ["keyword", "storage.type.class.jsdoc"], + "settings": { + "foreground": "#4d9375" + } + }, + { + "scope": [ + "storage", + "storage.type", + "support.type.builtin", + "constant.language.undefined", + "constant.language.null" + ], + "settings": { + "foreground": "#cb7676" + } + }, + { + "scope": [ + "text.html.derivative", + "storage.modifier.package", + "storage.modifier.import", + "storage.type.java" + ], + "settings": { + "foreground": "#dbd7caee" + } + }, + { + "scope": ["string", "string punctuation.section.embedded source", "attribute.value"], + "settings": { + "foreground": "#c98a7d" + } + }, + { + "scope": ["punctuation.definition.string", "punctuation.support.type.property-name"], + "settings": { + "foreground": "#c98a7d99" + } + }, + { + "scope": "support", + "settings": { + "foreground": "#b8a965" + } + }, + { + "scope": [ + "property", + "meta.property-name", + "meta.object-literal.key", + "entity.name.tag.yaml", + "attribute.name" + ], + "settings": { + "foreground": "#b8a965" + } + }, + { + "scope": [ + "entity.other.attribute-name", + "invalid.deprecated.entity.other.attribute-name.html" + ], + "settings": { + "foreground": "#bd976a" + } + }, + { + "scope": ["variable", "identifier"], + "settings": { + "foreground": "#bd976a" + } + }, + { + "scope": ["support.type.primitive", "entity.name.type"], + "settings": { + "foreground": "#5DA994" + } + }, + { + "scope": "namespace", + "settings": { + "foreground": "#db889a" + } + }, + { + "scope": ["keyword.operator", "keyword.operator.assignment.compound", "meta.var.expr.ts"], + "settings": { + "foreground": "#cb7676" + } + }, + { + "scope": "invalid.broken", + "settings": { + "fontStyle": "italic", + "foreground": "#fdaeb7" + } + }, + { + "scope": "invalid.deprecated", + "settings": { + "fontStyle": "italic", + "foreground": "#fdaeb7" + } + }, + { + "scope": "invalid.illegal", + "settings": { + "fontStyle": "italic", + "foreground": "#fdaeb7" + } + }, + { + "scope": "invalid.unimplemented", + "settings": { + "fontStyle": "italic", + "foreground": "#fdaeb7" + } + }, + { + "scope": "carriage-return", + "settings": { + "fontStyle": "italic underline", + "background": "#f97583", + "foreground": "#24292e", + "content": "^M" + } + }, + { + "scope": "message.error", + "settings": { + "foreground": "#fdaeb7" + } + }, + { + "scope": "string variable", + "settings": { + "foreground": "#c98a7d" + } + }, + { + "scope": ["source.regexp", "string.regexp"], + "settings": { + "foreground": "#c4704f" + } + }, + { + "scope": [ + "string.regexp.character-class", + "string.regexp constant.character.escape", + "string.regexp source.ruby.embedded", + "string.regexp string.regexp.arbitrary-repitition" + ], + "settings": { + "foreground": "#c98a7d" + } + }, + { + "scope": "string.regexp constant.character.escape", + "settings": { + "foreground": "#e6cc77" + } + }, + { + "scope": ["support.constant"], + "settings": { + "foreground": "#c99076" + } + }, + { + "scope": ["constant.numeric", "number"], + "settings": { + "foreground": "#4C9A91" + } + }, + { + "scope": ["keyword.other.unit"], + "settings": { + "foreground": "#cb7676" + } + }, + { + "scope": ["constant.language.boolean", "constant.language"], + "settings": { + "foreground": "#4d9375" + } + }, + { + "scope": "meta.module-reference", + "settings": { + "foreground": "#4d9375" + } + }, + { + "scope": "punctuation.definition.list.begin.markdown", + "settings": { + "foreground": "#d4976c" + } + }, + { + "scope": ["markup.heading", "markup.heading entity.name"], + "settings": { + "fontStyle": "bold", + "foreground": "#4d9375" + } + }, + { + "scope": "markup.quote", + "settings": { + "foreground": "#5d99a9" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic", + "foreground": "#dbd7caee" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#dbd7caee" + } + }, + { + "scope": "markup.raw", + "settings": { + "foreground": "#4d9375" + } + }, + { + "scope": ["markup.deleted", "meta.diff.header.from-file", "punctuation.definition.deleted"], + "settings": { + "background": "#86181d", + "foreground": "#fdaeb7" + } + }, + { + "scope": ["markup.inserted", "meta.diff.header.to-file", "punctuation.definition.inserted"], + "settings": { + "background": "#144620", + "foreground": "#85e89d" + } + }, + { + "scope": ["markup.changed", "punctuation.definition.changed"], + "settings": { + "background": "#c24e00", + "foreground": "#ffab70" + } + }, + { + "scope": ["markup.ignored", "markup.untracked"], + "settings": { + "foreground": "#2f363d", + "background": "#79b8ff" + } + }, + { + "scope": "meta.diff.range", + "settings": { + "foreground": "#b392f0", + "fontStyle": "bold" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#79b8ff" + } + }, + { + "scope": "meta.separator", + "settings": { + "fontStyle": "bold", + "foreground": "#79b8ff" + } + }, + { + "scope": "meta.output", + "settings": { + "foreground": "#79b8ff" + } + }, + { + "scope": [ + "brackethighlighter.tag", + "brackethighlighter.curly", + "brackethighlighter.round", + "brackethighlighter.square", + "brackethighlighter.angle", + "brackethighlighter.quote" + ], + "settings": { + "foreground": "#d1d5da" + } + }, + { + "scope": "brackethighlighter.unmatched", + "settings": { + "foreground": "#fdaeb7" + } + }, + { + "scope": [ + "constant.other.reference.link", + "string.other.link", + "punctuation.definition.string.begin.markdown", + "punctuation.definition.string.end.markdown" + ], + "settings": { + "foreground": "#c98a7d" + } + }, + { + "scope": ["markup.underline.link.markdown"], + "settings": { + "foreground": "#dedcd590", + "fontStyle": "underline" + } + }, + { + "scope": ["type.identifier"], + "settings": { + "foreground": "#7f8ac7" + } + }, + { + "scope": ["entity.other.attribute-name.html.vue"], + "settings": { + "foreground": "#80a665" + } + }, + { + "scope": ["invalid.illegal.unrecognized-tag.html"], + "settings": { + "fontStyle": "normal" + } + } + ], + "rules": [ + { + "token": "comment", + "foreground": "758575dd" + }, + { + "token": "punctuation.definition.comment", + "foreground": "758575dd" + }, + { + "token": "string.comment", + "foreground": "758575dd" + }, + { + "token": "delimiter.bracket", + "foreground": "666666" + }, + { + "token": "delimiter", + "foreground": "666666" + }, + { + "token": "invalid.illegal.character-not-allowed-here.html", + "foreground": "666666" + }, + { + "token": "keyword.operator.rest", + "foreground": "666666" + }, + { + "token": "keyword.operator.spread", + "foreground": "666666" + }, + { + "token": "keyword.operator.type.annotation", + "foreground": "666666" + }, + { + "token": "keyword.operator.relational", + "foreground": "666666" + }, + { + "token": "keyword.operator.assignment", + "foreground": "666666" + }, + { + "token": "meta.brace", + "foreground": "666666" + }, + { + "token": "meta.tag.block.any.html", + "foreground": "666666" + }, + { + "token": "meta.tag.inline.any.html", + "foreground": "666666" + }, + { + "token": "meta.tag.structure.input.void.html", + "foreground": "666666" + }, + { + "token": "meta.type.annotation", + "foreground": "666666" + }, + { + "token": "meta.embedded.block.github-actions-expression", + "foreground": "666666" + }, + { + "token": "storage.type.function.arrow", + "foreground": "666666" + }, + { + "token": "keyword.operator.type", + "foreground": "666666" + }, + { + "token": "meta.objectliteral.ts", + "foreground": "666666" + }, + { + "token": "punctuation", + "foreground": "666666" + }, + { + "token": "constant", + "foreground": "c99076" + }, + { + "token": "entity.name.constant", + "foreground": "c99076" + }, + { + "token": "variable.language", + "foreground": "c99076" + }, + { + "token": "meta.definition.variable", + "foreground": "c99076" + }, + { + "token": "entity", + "foreground": "80a665" + }, + { + "token": "entity.name", + "foreground": "80a665" + }, + { + "token": "variable.parameter.function", + "foreground": "dbd7caee" + }, + { + "token": "entity.name.tag", + "foreground": "4d9375" + }, + { + "token": "tag.html", + "foreground": "4d9375" + }, + { + "token": "entity.name.function", + "foreground": "80a665" + }, + { + "token": "keyword", + "foreground": "4d9375" + }, + { + "token": "storage.type.class.jsdoc", + "foreground": "4d9375" + }, + { + "token": "storage", + "foreground": "cb7676" + }, + { + "token": "storage.type", + "foreground": "cb7676" + }, + { + "token": "support.type.builtin", + "foreground": "cb7676" + }, + { + "token": "constant.language.undefined", + "foreground": "cb7676" + }, + { + "token": "constant.language.null", + "foreground": "cb7676" + }, + { + "token": "text.html.derivative", + "foreground": "dbd7caee" + }, + { + "token": "storage.modifier.package", + "foreground": "dbd7caee" + }, + { + "token": "storage.modifier.import", + "foreground": "dbd7caee" + }, + { + "token": "storage.type.java", + "foreground": "dbd7caee" + }, + { + "token": "string", + "foreground": "c98a7d" + }, + { + "token": "string punctuation.section.embedded source", + "foreground": "c98a7d" + }, + { + "token": "attribute.value", + "foreground": "c98a7d" + }, + { + "token": "punctuation.definition.string", + "foreground": "c98a7d99" + }, + { + "token": "punctuation.support.type.property-name", + "foreground": "c98a7d99" + }, + { + "token": "support", + "foreground": "b8a965" + }, + { + "token": "property", + "foreground": "b8a965" + }, + { + "token": "meta.property-name", + "foreground": "b8a965" + }, + { + "token": "meta.object-literal.key", + "foreground": "b8a965" + }, + { + "token": "entity.name.tag.yaml", + "foreground": "b8a965" + }, + { + "token": "attribute.name", + "foreground": "b8a965" + }, + { + "token": "entity.other.attribute-name", + "foreground": "bd976a" + }, + { + "token": "invalid.deprecated.entity.other.attribute-name.html", + "foreground": "bd976a" + }, + { + "token": "variable", + "foreground": "bd976a" + }, + { + "token": "identifier", + "foreground": "bd976a" + }, + { + "token": "support.type.primitive", + "foreground": "5DA994" + }, + { + "token": "entity.name.type", + "foreground": "5DA994" + }, + { + "token": "namespace", + "foreground": "db889a" + }, + { + "token": "keyword.operator", + "foreground": "cb7676" + }, + { + "token": "keyword.operator.assignment.compound", + "foreground": "cb7676" + }, + { + "token": "meta.var.expr.ts", + "foreground": "cb7676" + }, + { + "token": "invalid.broken", + "foreground": "fdaeb7" + }, + { + "token": "invalid.deprecated", + "foreground": "fdaeb7" + }, + { + "token": "invalid.illegal", + "foreground": "fdaeb7" + }, + { + "token": "invalid.unimplemented", + "foreground": "fdaeb7" + }, + { + "token": "carriage-return", + "foreground": "24292e" + }, + { + "token": "message.error", + "foreground": "fdaeb7" + }, + { + "token": "string variable", + "foreground": "c98a7d" + }, + { + "token": "source.regexp", + "foreground": "c4704f" + }, + { + "token": "string.regexp", + "foreground": "c4704f" + }, + { + "token": "string.regexp.character-class", + "foreground": "c98a7d" + }, + { + "token": "string.regexp constant.character.escape", + "foreground": "c98a7d" + }, + { + "token": "string.regexp source.ruby.embedded", + "foreground": "c98a7d" + }, + { + "token": "string.regexp string.regexp.arbitrary-repitition", + "foreground": "c98a7d" + }, + { + "token": "string.regexp constant.character.escape", + "foreground": "e6cc77" + }, + { + "token": "support.constant", + "foreground": "c99076" + }, + { + "token": "constant.numeric", + "foreground": "4C9A91" + }, + { + "token": "number", + "foreground": "4C9A91" + }, + { + "token": "keyword.other.unit", + "foreground": "cb7676" + }, + { + "token": "constant.language.boolean", + "foreground": "4d9375" + }, + { + "token": "constant.language", + "foreground": "4d9375" + }, + { + "token": "meta.module-reference", + "foreground": "4d9375" + }, + { + "token": "punctuation.definition.list.begin.markdown", + "foreground": "d4976c" + }, + { + "token": "markup.heading", + "foreground": "4d9375" + }, + { + "token": "markup.heading entity.name", + "foreground": "4d9375" + }, + { + "token": "markup.quote", + "foreground": "5d99a9" + }, + { + "token": "markup.italic", + "foreground": "dbd7caee" + }, + { + "token": "markup.bold", + "foreground": "dbd7caee" + }, + { + "token": "markup.raw", + "foreground": "4d9375" + }, + { + "token": "markup.deleted", + "foreground": "fdaeb7" + }, + { + "token": "meta.diff.header.from-file", + "foreground": "fdaeb7" + }, + { + "token": "punctuation.definition.deleted", + "foreground": "fdaeb7" + }, + { + "token": "markup.inserted", + "foreground": "85e89d" + }, + { + "token": "meta.diff.header.to-file", + "foreground": "85e89d" + }, + { + "token": "punctuation.definition.inserted", + "foreground": "85e89d" + }, + { + "token": "markup.changed", + "foreground": "ffab70" + }, + { + "token": "punctuation.definition.changed", + "foreground": "ffab70" + }, + { + "token": "markup.ignored", + "foreground": "2f363d" + }, + { + "token": "markup.untracked", + "foreground": "2f363d" + }, + { + "token": "meta.diff.range", + "foreground": "b392f0" + }, + { + "token": "meta.diff.header", + "foreground": "79b8ff" + }, + { + "token": "meta.separator", + "foreground": "79b8ff" + }, + { + "token": "meta.output", + "foreground": "79b8ff" + }, + { + "token": "brackethighlighter.tag", + "foreground": "d1d5da" + }, + { + "token": "brackethighlighter.curly", + "foreground": "d1d5da" + }, + { + "token": "brackethighlighter.round", + "foreground": "d1d5da" + }, + { + "token": "brackethighlighter.square", + "foreground": "d1d5da" + }, + { + "token": "brackethighlighter.angle", + "foreground": "d1d5da" + }, + { + "token": "brackethighlighter.quote", + "foreground": "d1d5da" + }, + { + "token": "brackethighlighter.unmatched", + "foreground": "fdaeb7" + }, + { + "token": "constant.other.reference.link", + "foreground": "c98a7d" + }, + { + "token": "string.other.link", + "foreground": "c98a7d" + }, + { + "token": "punctuation.definition.string.begin.markdown", + "foreground": "c98a7d" + }, + { + "token": "punctuation.definition.string.end.markdown", + "foreground": "c98a7d" + }, + { + "token": "markup.underline.link.markdown", + "foreground": "dedcd590" + }, + { + "token": "type.identifier", + "foreground": "7f8ac7" + }, + { + "token": "entity.other.attribute-name.html.vue", + "foreground": "80a665" + }, + { + "token": "invalid.illegal.unrecognized-tag.html" + } + ] +} diff --git a/src/lib/shiki/themes/vitesse-light.json b/src/lib/shiki/themes/vitesse-light.json new file mode 100644 index 0000000..a7a1df5 --- /dev/null +++ b/src/lib/shiki/themes/vitesse-light.json @@ -0,0 +1,1089 @@ +{ + "name": "vitesse-light", + "base": "vs", + "colors": { + "focusBorder": "#00000000", + "foreground": "#393a34", + "descriptionForeground": "#393a3490", + "errorForeground": "#ab5959", + "textLink.foreground": "#1c6b48", + "textLink.activeForeground": "#1c6b48", + "textBlockQuote.background": "#ffffff", + "textBlockQuote.border": "#f0f0f0", + "textCodeBlock.background": "#ffffff", + "textPreformat.foreground": "#586069", + "textSeparator.foreground": "#d1d5da", + "button.background": "#1c6b48", + "button.foreground": "#ffffff", + "button.hoverBackground": "#1c6b48", + "checkbox.background": "#f7f7f7", + "checkbox.border": "#d1d5da", + "dropdown.background": "#ffffff", + "dropdown.border": "#f0f0f0", + "dropdown.foreground": "#393a34", + "dropdown.listBackground": "#f7f7f7", + "input.background": "#f7f7f7", + "input.border": "#f0f0f0", + "input.foreground": "#393a34", + "input.placeholderForeground": "#393a3490", + "inputOption.activeBackground": "#393a3450", + "badge.foreground": "#ffffff", + "badge.background": "#393a3490", + "progressBar.background": "#1c6b48", + "titleBar.activeForeground": "#4e4f47", + "titleBar.activeBackground": "#ffffff", + "titleBar.inactiveForeground": "#6a737d", + "titleBar.inactiveBackground": "#ffffff", + "titleBar.border": "#f7f7f7", + "activityBar.foreground": "#393a34", + "activityBar.inactiveForeground": "#393a3450", + "activityBar.background": "#ffffff", + "activityBarBadge.foreground": "#ffffff", + "activityBarBadge.background": "#4e4f47", + "activityBar.activeBorder": "#1c6b48", + "activityBar.border": "#f0f0f0", + "sideBar.foreground": "#4e4f47", + "sideBar.background": "#ffffff", + "sideBar.border": "#f0f0f0", + "sideBarTitle.foreground": "#393a34", + "sideBarSectionHeader.foreground": "#393a34", + "sideBarSectionHeader.background": "#ffffff", + "sideBarSectionHeader.border": "#f0f0f0", + "list.hoverForeground": "#393a34", + "list.inactiveSelectionForeground": "#393a34", + "list.activeSelectionForeground": "#393a34", + "list.hoverBackground": "#f7f7f7", + "list.inactiveSelectionBackground": "#f7f7f7", + "list.activeSelectionBackground": "#f7f7f7", + "list.inactiveFocusBackground": "#ffffff", + "list.focusBackground": "#f7f7f7", + "list.highlightForeground": "#1c6b48", + "tree.indentGuidesStroke": "#e1e4e8", + "notificationCenterHeader.foreground": "#6a737d", + "notificationCenterHeader.background": "#ffffff", + "notifications.foreground": "#393a34", + "notifications.background": "#ffffff", + "notifications.border": "#f0f0f0", + "notificationsErrorIcon.foreground": "#ab5959", + "notificationsWarningIcon.foreground": "#a65e2b", + "notificationsInfoIcon.foreground": "#296aa3", + "pickerGroup.border": "#f0f0f0", + "pickerGroup.foreground": "#393a34", + "quickInput.background": "#ffffff", + "quickInput.foreground": "#393a34", + "quickInputList.focusBackground": "#f7f7f7", + "statusBar.foreground": "#4e4f47", + "statusBar.background": "#ffffff", + "statusBar.border": "#f0f0f0", + "statusBar.noFolderBackground": "#ffffff", + "statusBar.debuggingBackground": "#f7f7f7", + "statusBar.debuggingForeground": "#4e4f47", + "statusBarItem.prominentBackground": "#f7f7f7", + "editorGroupHeader.tabsBackground": "#ffffff", + "editorGroupHeader.tabsBorder": "#f0f0f0", + "editorGroup.border": "#f0f0f0", + "tab.activeForeground": "#393a34", + "tab.inactiveForeground": "#6a737d", + "tab.inactiveBackground": "#ffffff", + "tab.activeBackground": "#ffffff", + "tab.hoverBackground": "#f7f7f7", + "tab.unfocusedHoverBackground": "#ffffff", + "tab.border": "#f0f0f0", + "tab.unfocusedActiveBorderTop": "#f0f0f0", + "tab.activeBorder": "#f0f0f0", + "tab.unfocusedActiveBorder": "#f0f0f0", + "tab.activeBorderTop": "#393a3490", + "breadcrumb.foreground": "#6a737d", + "breadcrumb.focusForeground": "#393a34", + "breadcrumb.background": "#f7f7f7", + "breadcrumb.activeSelectionForeground": "#22222215", + "breadcrumbPicker.background": "#ffffff", + "editor.foreground": "#393a34", + "editor.background": "#ffffff", + "editorWidget.background": "#ffffff", + "editor.foldBackground": "#22222210", + "editor.lineHighlightBackground": "#f7f7f7", + "editorLineNumber.foreground": "#393a3450", + "editorLineNumber.activeForeground": "#4e4f47", + "editorIndentGuide.background": "#00000015", + "editorIndentGuide.activeBackground": "#00000030", + "editorWhitespace.foreground": "#00000015", + "editor.findMatchBackground": "#e6cc7744", + "editor.findMatchHighlightBackground": "#e6cc7766", + "editor.inactiveSelectionBackground": "#22222208", + "editor.selectionBackground": "#22222215", + "editor.selectionHighlightBackground": "#22222208", + "editor.wordHighlightBackground": "#1c6b4805", + "editor.wordHighlightStrongBackground": "#1c6b4810", + "editorBracketMatch.background": "#1c6b4820", + "diffEditor.insertedTextBackground": "#1c6b4815", + "diffEditor.removedTextBackground": "#ab595910", + "scrollbar.shadow": "#6a737d33", + "scrollbarSlider.background": "#393a3410", + "scrollbarSlider.hoverBackground": "#393a3450", + "scrollbarSlider.activeBackground": "#393a3450", + "editorOverviewRuler.border": "#fff", + "panel.background": "#ffffff", + "panel.border": "#f0f0f0", + "panelTitle.activeBorder": "#1c6b48", + "panelTitle.activeForeground": "#393a34", + "panelTitle.inactiveForeground": "#6a737d", + "panelInput.border": "#e1e4e8", + "terminal.foreground": "#393a34", + "terminal.selectionBackground": "#22222215", + "terminal.ansiBrightBlack": "#aaaaaa", + "terminal.ansiBrightBlue": "#296aa3", + "terminal.ansiBrightCyan": "#2993a3", + "terminal.ansiBrightGreen": "#1e754f", + "terminal.ansiBrightMagenta": "#a13865", + "terminal.ansiBrightRed": "#ab5959", + "terminal.ansiBrightWhite": "#dddddd", + "terminal.ansiBrightYellow": "#bda437", + "terminal.ansiBlack": "#121212", + "terminal.ansiBlue": "#296aa3", + "terminal.ansiCyan": "#2993a3", + "terminal.ansiGreen": "#1e754f", + "terminal.ansiMagenta": "#a13865", + "terminal.ansiRed": "#ab5959", + "terminal.ansiWhite": "#dbd7caee", + "terminal.ansiYellow": "#bda437", + "gitDecoration.addedResourceForeground": "#1e754f", + "gitDecoration.modifiedResourceForeground": "#296aa3", + "gitDecoration.deletedResourceForeground": "#ab5959", + "gitDecoration.untrackedResourceForeground": "#2993a3", + "gitDecoration.ignoredResourceForeground": "#393a3450", + "gitDecoration.conflictingResourceForeground": "#a65e2b", + "gitDecoration.submoduleResourceForeground": "#393a3490", + "editorGutter.modifiedBackground": "#296aa3", + "editorGutter.addedBackground": "#1e754f", + "editorGutter.deletedBackground": "#ab5959", + "editorBracketHighlight.foreground1": "#2993a3", + "editorBracketHighlight.foreground2": "#1e754f", + "editorBracketHighlight.foreground3": "#a65e2b", + "editorBracketHighlight.foreground4": "#a13865", + "editorBracketHighlight.foreground5": "#bda437", + "editorBracketHighlight.foreground6": "#296aa3", + "debugToolBar.background": "#ffffff", + "editor.stackFrameHighlightBackground": "#fffbdd", + "editor.focusedStackFrameHighlightBackground": "#fff5b1", + "peekViewEditor.background": "#ffffff", + "peekViewResult.background": "#ffffff", + "settings.headerForeground": "#393a34", + "settings.modifiedItemIndicator": "#1c6b48", + "welcomePage.buttonBackground": "#f6f8fa", + "welcomePage.buttonHoverBackground": "#e1e4e8", + "problemsErrorIcon.foreground": "#ab5959", + "problemsWarningIcon.foreground": "#a65e2b", + "problemsInfoIcon.foreground": "#296aa3", + "editorError.foreground": "#ab5959", + "editorWarning.foreground": "#a65e2b", + "editorInfo.foreground": "#296aa3", + "editorHint.foreground": "#1e754f", + "editorGutter.commentRangeForeground": "#393a3450", + "editorGutter.foldingControlForeground": "#393a3490", + "editorInlayHint.foreground": "#999999", + "editorInlayHint.background": "#00000000", + "editorStickyScroll.background": "#f7f7f7", + "editorStickyScrollHover.background": "#f7f7f7", + "menu.separatorBackground": "#f0f0f0" + }, + "semanticHighlighting": true, + "semanticTokenColors": { + "namespace": "#b05a78", + "property": "#998418", + "interface": "#2e808f", + "type": "#2e808f", + "class": "#5a6aa6" + }, + "tokenColors": [ + { + "scope": ["comment", "punctuation.definition.comment", "string.comment"], + "settings": { + "foreground": "#a0ada0" + } + }, + { + "scope": [ + "delimiter.bracket", + "delimiter", + "invalid.illegal.character-not-allowed-here.html", + "keyword.operator.rest", + "keyword.operator.spread", + "keyword.operator.type.annotation", + "keyword.operator.relational", + "keyword.operator.assignment", + "meta.brace", + "meta.tag.block.any.html", + "meta.tag.inline.any.html", + "meta.tag.structure.input.void.html", + "meta.type.annotation", + "meta.embedded.block.github-actions-expression", + "storage.type.function.arrow", + "keyword.operator.type", + "meta.objectliteral.ts", + "punctuation" + ], + "settings": { + "foreground": "#999999" + } + }, + { + "scope": [ + "constant", + "entity.name.constant", + "variable.language", + "meta.definition.variable" + ], + "settings": { + "foreground": "#a65e2b" + } + }, + { + "scope": ["entity", "entity.name"], + "settings": { + "foreground": "#59873a" + } + }, + { + "scope": "variable.parameter.function", + "settings": { + "foreground": "#393a34" + } + }, + { + "scope": ["entity.name.tag", "tag.html"], + "settings": { + "foreground": "#1e754f" + } + }, + { + "scope": "entity.name.function", + "settings": { + "foreground": "#59873a" + } + }, + { + "scope": ["keyword", "storage.type.class.jsdoc"], + "settings": { + "foreground": "#1e754f" + } + }, + { + "scope": [ + "storage", + "storage.type", + "support.type.builtin", + "constant.language.undefined", + "constant.language.null" + ], + "settings": { + "foreground": "#ab5959" + } + }, + { + "scope": [ + "text.html.derivative", + "storage.modifier.package", + "storage.modifier.import", + "storage.type.java" + ], + "settings": { + "foreground": "#393a34" + } + }, + { + "scope": ["string", "string punctuation.section.embedded source", "attribute.value"], + "settings": { + "foreground": "#b56959" + } + }, + { + "scope": ["punctuation.definition.string", "punctuation.support.type.property-name"], + "settings": { + "foreground": "#b5695999" + } + }, + { + "scope": "support", + "settings": { + "foreground": "#998418" + } + }, + { + "scope": [ + "property", + "meta.property-name", + "meta.object-literal.key", + "entity.name.tag.yaml", + "attribute.name" + ], + "settings": { + "foreground": "#998418" + } + }, + { + "scope": [ + "entity.other.attribute-name", + "invalid.deprecated.entity.other.attribute-name.html" + ], + "settings": { + "foreground": "#b07d48" + } + }, + { + "scope": ["variable", "identifier"], + "settings": { + "foreground": "#b07d48" + } + }, + { + "scope": ["support.type.primitive", "entity.name.type"], + "settings": { + "foreground": "#2e8f82" + } + }, + { + "scope": "namespace", + "settings": { + "foreground": "#b05a78" + } + }, + { + "scope": ["keyword.operator", "keyword.operator.assignment.compound", "meta.var.expr.ts"], + "settings": { + "foreground": "#ab5959" + } + }, + { + "scope": "invalid.broken", + "settings": { + "fontStyle": "italic", + "foreground": "#b31d28" + } + }, + { + "scope": "invalid.deprecated", + "settings": { + "fontStyle": "italic", + "foreground": "#b31d28" + } + }, + { + "scope": "invalid.illegal", + "settings": { + "fontStyle": "italic", + "foreground": "#b31d28" + } + }, + { + "scope": "invalid.unimplemented", + "settings": { + "fontStyle": "italic", + "foreground": "#b31d28" + } + }, + { + "scope": "carriage-return", + "settings": { + "fontStyle": "italic underline", + "background": "#d73a49", + "foreground": "#fafbfc", + "content": "^M" + } + }, + { + "scope": "message.error", + "settings": { + "foreground": "#b31d28" + } + }, + { + "scope": "string variable", + "settings": { + "foreground": "#b56959" + } + }, + { + "scope": ["source.regexp", "string.regexp"], + "settings": { + "foreground": "#ab5e3f" + } + }, + { + "scope": [ + "string.regexp.character-class", + "string.regexp constant.character.escape", + "string.regexp source.ruby.embedded", + "string.regexp string.regexp.arbitrary-repitition" + ], + "settings": { + "foreground": "#b56959" + } + }, + { + "scope": "string.regexp constant.character.escape", + "settings": { + "foreground": "#bda437" + } + }, + { + "scope": ["support.constant"], + "settings": { + "foreground": "#a65e2b" + } + }, + { + "scope": ["constant.numeric", "number"], + "settings": { + "foreground": "#2f798a" + } + }, + { + "scope": ["keyword.other.unit"], + "settings": { + "foreground": "#ab5959" + } + }, + { + "scope": ["constant.language.boolean", "constant.language"], + "settings": { + "foreground": "#1e754f" + } + }, + { + "scope": "meta.module-reference", + "settings": { + "foreground": "#1c6b48" + } + }, + { + "scope": "punctuation.definition.list.begin.markdown", + "settings": { + "foreground": "#a65e2b" + } + }, + { + "scope": ["markup.heading", "markup.heading entity.name"], + "settings": { + "fontStyle": "bold", + "foreground": "#1c6b48" + } + }, + { + "scope": "markup.quote", + "settings": { + "foreground": "#2e808f" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic", + "foreground": "#393a34" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#393a34" + } + }, + { + "scope": "markup.raw", + "settings": { + "foreground": "#1c6b48" + } + }, + { + "scope": ["markup.deleted", "meta.diff.header.from-file", "punctuation.definition.deleted"], + "settings": { + "background": "#ffeef0", + "foreground": "#b31d28" + } + }, + { + "scope": ["markup.inserted", "meta.diff.header.to-file", "punctuation.definition.inserted"], + "settings": { + "background": "#f0fff4", + "foreground": "#22863a" + } + }, + { + "scope": ["markup.changed", "punctuation.definition.changed"], + "settings": { + "background": "#ffebda", + "foreground": "#e36209" + } + }, + { + "scope": ["markup.ignored", "markup.untracked"], + "settings": { + "foreground": "#f6f8fa", + "background": "#005cc5" + } + }, + { + "scope": "meta.diff.range", + "settings": { + "foreground": "#6f42c1", + "fontStyle": "bold" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#005cc5" + } + }, + { + "scope": "meta.separator", + "settings": { + "fontStyle": "bold", + "foreground": "#005cc5" + } + }, + { + "scope": "meta.output", + "settings": { + "foreground": "#005cc5" + } + }, + { + "scope": [ + "brackethighlighter.tag", + "brackethighlighter.curly", + "brackethighlighter.round", + "brackethighlighter.square", + "brackethighlighter.angle", + "brackethighlighter.quote" + ], + "settings": { + "foreground": "#586069" + } + }, + { + "scope": "brackethighlighter.unmatched", + "settings": { + "foreground": "#b31d28" + } + }, + { + "scope": [ + "constant.other.reference.link", + "string.other.link", + "punctuation.definition.string.begin.markdown", + "punctuation.definition.string.end.markdown" + ], + "settings": { + "foreground": "#b56959" + } + }, + { + "scope": ["markup.underline.link.markdown"], + "settings": { + "foreground": "#393a3490", + "fontStyle": "underline" + } + }, + { + "scope": ["type.identifier"], + "settings": { + "foreground": "#5a6aa6" + } + }, + { + "scope": ["entity.other.attribute-name.html.vue"], + "settings": { + "foreground": "#59873a" + } + }, + { + "scope": ["invalid.illegal.unrecognized-tag.html"], + "settings": { + "fontStyle": "normal" + } + } + ], + "rules": [ + { + "token": "comment", + "foreground": "a0ada0" + }, + { + "token": "punctuation.definition.comment", + "foreground": "a0ada0" + }, + { + "token": "string.comment", + "foreground": "a0ada0" + }, + { + "token": "delimiter.bracket", + "foreground": "999999" + }, + { + "token": "delimiter", + "foreground": "999999" + }, + { + "token": "invalid.illegal.character-not-allowed-here.html", + "foreground": "999999" + }, + { + "token": "keyword.operator.rest", + "foreground": "999999" + }, + { + "token": "keyword.operator.spread", + "foreground": "999999" + }, + { + "token": "keyword.operator.type.annotation", + "foreground": "999999" + }, + { + "token": "keyword.operator.relational", + "foreground": "999999" + }, + { + "token": "keyword.operator.assignment", + "foreground": "999999" + }, + { + "token": "meta.brace", + "foreground": "999999" + }, + { + "token": "meta.tag.block.any.html", + "foreground": "999999" + }, + { + "token": "meta.tag.inline.any.html", + "foreground": "999999" + }, + { + "token": "meta.tag.structure.input.void.html", + "foreground": "999999" + }, + { + "token": "meta.type.annotation", + "foreground": "999999" + }, + { + "token": "meta.embedded.block.github-actions-expression", + "foreground": "999999" + }, + { + "token": "storage.type.function.arrow", + "foreground": "999999" + }, + { + "token": "keyword.operator.type", + "foreground": "999999" + }, + { + "token": "meta.objectliteral.ts", + "foreground": "999999" + }, + { + "token": "punctuation", + "foreground": "999999" + }, + { + "token": "constant", + "foreground": "a65e2b" + }, + { + "token": "entity.name.constant", + "foreground": "a65e2b" + }, + { + "token": "variable.language", + "foreground": "a65e2b" + }, + { + "token": "meta.definition.variable", + "foreground": "a65e2b" + }, + { + "token": "entity", + "foreground": "59873a" + }, + { + "token": "entity.name", + "foreground": "59873a" + }, + { + "token": "variable.parameter.function", + "foreground": "393a34" + }, + { + "token": "entity.name.tag", + "foreground": "1e754f" + }, + { + "token": "tag.html", + "foreground": "1e754f" + }, + { + "token": "entity.name.function", + "foreground": "59873a" + }, + { + "token": "keyword", + "foreground": "1e754f" + }, + { + "token": "storage.type.class.jsdoc", + "foreground": "1e754f" + }, + { + "token": "storage", + "foreground": "ab5959" + }, + { + "token": "storage.type", + "foreground": "ab5959" + }, + { + "token": "support.type.builtin", + "foreground": "ab5959" + }, + { + "token": "constant.language.undefined", + "foreground": "ab5959" + }, + { + "token": "constant.language.null", + "foreground": "ab5959" + }, + { + "token": "text.html.derivative", + "foreground": "393a34" + }, + { + "token": "storage.modifier.package", + "foreground": "393a34" + }, + { + "token": "storage.modifier.import", + "foreground": "393a34" + }, + { + "token": "storage.type.java", + "foreground": "393a34" + }, + { + "token": "string", + "foreground": "b56959" + }, + { + "token": "string punctuation.section.embedded source", + "foreground": "b56959" + }, + { + "token": "attribute.value", + "foreground": "b56959" + }, + { + "token": "punctuation.definition.string", + "foreground": "b5695999" + }, + { + "token": "punctuation.support.type.property-name", + "foreground": "b5695999" + }, + { + "token": "support", + "foreground": "998418" + }, + { + "token": "property", + "foreground": "998418" + }, + { + "token": "meta.property-name", + "foreground": "998418" + }, + { + "token": "meta.object-literal.key", + "foreground": "998418" + }, + { + "token": "entity.name.tag.yaml", + "foreground": "998418" + }, + { + "token": "attribute.name", + "foreground": "998418" + }, + { + "token": "entity.other.attribute-name", + "foreground": "b07d48" + }, + { + "token": "invalid.deprecated.entity.other.attribute-name.html", + "foreground": "b07d48" + }, + { + "token": "variable", + "foreground": "b07d48" + }, + { + "token": "identifier", + "foreground": "b07d48" + }, + { + "token": "support.type.primitive", + "foreground": "2e8f82" + }, + { + "token": "entity.name.type", + "foreground": "2e8f82" + }, + { + "token": "namespace", + "foreground": "b05a78" + }, + { + "token": "keyword.operator", + "foreground": "ab5959" + }, + { + "token": "keyword.operator.assignment.compound", + "foreground": "ab5959" + }, + { + "token": "meta.var.expr.ts", + "foreground": "ab5959" + }, + { + "token": "invalid.broken", + "foreground": "b31d28" + }, + { + "token": "invalid.deprecated", + "foreground": "b31d28" + }, + { + "token": "invalid.illegal", + "foreground": "b31d28" + }, + { + "token": "invalid.unimplemented", + "foreground": "b31d28" + }, + { + "token": "carriage-return", + "foreground": "fafbfc" + }, + { + "token": "message.error", + "foreground": "b31d28" + }, + { + "token": "string variable", + "foreground": "b56959" + }, + { + "token": "source.regexp", + "foreground": "ab5e3f" + }, + { + "token": "string.regexp", + "foreground": "ab5e3f" + }, + { + "token": "string.regexp.character-class", + "foreground": "b56959" + }, + { + "token": "string.regexp constant.character.escape", + "foreground": "b56959" + }, + { + "token": "string.regexp source.ruby.embedded", + "foreground": "b56959" + }, + { + "token": "string.regexp string.regexp.arbitrary-repitition", + "foreground": "b56959" + }, + { + "token": "string.regexp constant.character.escape", + "foreground": "bda437" + }, + { + "token": "support.constant", + "foreground": "a65e2b" + }, + { + "token": "constant.numeric", + "foreground": "2f798a" + }, + { + "token": "number", + "foreground": "2f798a" + }, + { + "token": "keyword.other.unit", + "foreground": "ab5959" + }, + { + "token": "constant.language.boolean", + "foreground": "1e754f" + }, + { + "token": "constant.language", + "foreground": "1e754f" + }, + { + "token": "meta.module-reference", + "foreground": "1c6b48" + }, + { + "token": "punctuation.definition.list.begin.markdown", + "foreground": "a65e2b" + }, + { + "token": "markup.heading", + "foreground": "1c6b48" + }, + { + "token": "markup.heading entity.name", + "foreground": "1c6b48" + }, + { + "token": "markup.quote", + "foreground": "2e808f" + }, + { + "token": "markup.italic", + "foreground": "393a34" + }, + { + "token": "markup.bold", + "foreground": "393a34" + }, + { + "token": "markup.raw", + "foreground": "1c6b48" + }, + { + "token": "markup.deleted", + "foreground": "b31d28" + }, + { + "token": "meta.diff.header.from-file", + "foreground": "b31d28" + }, + { + "token": "punctuation.definition.deleted", + "foreground": "b31d28" + }, + { + "token": "markup.inserted", + "foreground": "22863a" + }, + { + "token": "meta.diff.header.to-file", + "foreground": "22863a" + }, + { + "token": "punctuation.definition.inserted", + "foreground": "22863a" + }, + { + "token": "markup.changed", + "foreground": "e36209" + }, + { + "token": "punctuation.definition.changed", + "foreground": "e36209" + }, + { + "token": "markup.ignored", + "foreground": "f6f8fa" + }, + { + "token": "markup.untracked", + "foreground": "f6f8fa" + }, + { + "token": "meta.diff.range", + "foreground": "6f42c1" + }, + { + "token": "meta.diff.header", + "foreground": "005cc5" + }, + { + "token": "meta.separator", + "foreground": "005cc5" + }, + { + "token": "meta.output", + "foreground": "005cc5" + }, + { + "token": "brackethighlighter.tag", + "foreground": "586069" + }, + { + "token": "brackethighlighter.curly", + "foreground": "586069" + }, + { + "token": "brackethighlighter.round", + "foreground": "586069" + }, + { + "token": "brackethighlighter.square", + "foreground": "586069" + }, + { + "token": "brackethighlighter.angle", + "foreground": "586069" + }, + { + "token": "brackethighlighter.quote", + "foreground": "586069" + }, + { + "token": "brackethighlighter.unmatched", + "foreground": "b31d28" + }, + { + "token": "constant.other.reference.link", + "foreground": "b56959" + }, + { + "token": "string.other.link", + "foreground": "b56959" + }, + { + "token": "punctuation.definition.string.begin.markdown", + "foreground": "b56959" + }, + { + "token": "punctuation.definition.string.end.markdown", + "foreground": "b56959" + }, + { + "token": "markup.underline.link.markdown", + "foreground": "393a3490" + }, + { + "token": "type.identifier", + "foreground": "5a6aa6" + }, + { + "token": "entity.other.attribute-name.html.vue", + "foreground": "59873a" + }, + { + "token": "invalid.illegal.unrecognized-tag.html" + } + ] +} diff --git a/src/lib/shikiHilighter.ts b/src/lib/shikiHilighter.ts new file mode 100644 index 0000000..ef8a1b3 --- /dev/null +++ b/src/lib/shikiHilighter.ts @@ -0,0 +1,32 @@ +import fs from "fs"; +import path from "path"; +import { Options } from "rehype-pretty-code"; +import shiki from "shiki"; + +const getShikiPath = (): string => { + return path.join(process.cwd(), "src/lib/shiki"); +}; + +const touched = { current: false }; + +const touchShikiPath = (): void => { + if (touched.current) { + return; + } + fs.readdirSync(getShikiPath()); + touched.current = true; +}; + +const getHighlighter: Options["getHighlighter"] = async (options) => { + touchShikiPath(); + + return await shiki.getHighlighter({ + ...(options as any), + paths: { + languages: `${getShikiPath()}/languages/`, + themes: `${getShikiPath()}/themes/`, + }, + }); +}; + +export default getHighlighter;