on master help sign in
.github/ISSUE_TEMPLATE/bug_report.md+19−2
since splitsnapshots
unifiedsplit
@@ -7,9 +7,26 @@ assignees: ''
7
7
8---
8---
9
9
10+<!--
11+
10−<!-- Hey there, thank you for creating an issue! -->
12+Hey there, thank you for reporting a bug!
13+
14+Please note that the following bugs have already been reported:
15+
16+* dpkg: error processing archive /some/path/some-program.deb (--unpack):
17+ trying to overwrite '/usr/.crates2.json'
18+
19+ See https://github.com/sharkdp/bat/issues/938
20+
21+-->
22+
23+**What steps will reproduce the bug?**
24+
25+1. step 1
26+2. step 2
27+3. ...
11
28
12−**Describe the bug you encountered:**
29+**What happens?**
13
30
14...
31...
15
32
.github/ISSUE_TEMPLATE/config.yml−1
@@ -1,2 +1 @@
1blank_issues_enabled: true
1blank_issues_enabled: true
2−
.github/ISSUE_TEMPLATE/feature_request.md−1
@@ -7,4 +7,3 @@ assignees: ''
7
7
8---
8---
9
9
10−
.github/ISSUE_TEMPLATE/question.md+2−1
@@ -7,4 +7,5 @@ assignees: ''
7
7
8---
8---
9
9
10−
10+<!-- Using a normal ticket is still fine, but feel free to ask your
11+questions about bat on https://github.com/sharkdp/bat/discussions instead. -->
.github/workflows/CICD.yml+75−17
@@ -1,7 +1,7 @@
1name: CICD
1name: CICD
2
2
3env:
3env:
4− MIN_SUPPORTED_RUST_VERSION: "1.45.0"
4+ MIN_SUPPORTED_RUST_VERSION: "1.51.0"
5 CICD_INTERMEDIATES_DIR: "_cicd-intermediates"
5 CICD_INTERMEDIATES_DIR: "_cicd-intermediates"
6
6
7on:
7on:
@@ -14,9 +14,31 @@ on:
14 - '*'
14 - '*'
15
15
16jobs:
16jobs:
17+ ensure_cargo_fmt:
18+ name: Ensure 'cargo fmt' has been run
19+ runs-on: ubuntu-20.04
20+ steps:
21+ - uses: actions-rs/toolchain@v1
22+ with:
23+ toolchain: stable
24+ default: true
25+ profile: minimal
26+ components: rustfmt
27+ - uses: actions/checkout@v2
28+ - run: cargo fmt -- --check
29+
30+ license_checks:
31+ name: License checks
32+ runs-on: ubuntu-20.04
33+ steps:
34+ - uses: actions/checkout@v2
35+ with:
36+ submodules: true # we especially want to perform license checks on submodules
37+ - run: tests/scripts/license-checks.sh
38+
17 min_version:
39 min_version:
18 name: Minimum supported rust version
40 name: Minimum supported rust version
19− runs-on: ubuntu-18.04
41+ runs-on: ubuntu-20.04
20 steps:
42 steps:
21 - name: Checkout source code
43 - name: Checkout source code
22 uses: actions/checkout@v2
44 uses: actions/checkout@v2
@@ -41,7 +63,7 @@ jobs:
41
63
42 test_with_new_syntaxes_and_themes:
64 test_with_new_syntaxes_and_themes:
43 name: Run tests with updated syntaxes and themes
65 name: Run tests with updated syntaxes and themes
44− runs-on: ubuntu-18.04
66+ runs-on: ubuntu-20.04
45 steps:
67 steps:
46 - name: Git checkout
68 - name: Git checkout
47 uses: actions/checkout@v2
69 uses: actions/checkout@v2
@@ -81,6 +103,33 @@ jobs:
81 run: bat --list-languages
103 run: bat --list-languages
82 - name: List of themes
104 - name: List of themes
83 run: bat --list-themes
105 run: bat --list-themes
106+ - name: Test custom assets
107+ run: tests/syntax-tests/test_custom_assets.sh
108+
109+ documentation:
110+ name: Documentation
111+ runs-on: ubuntu-20.04
112+ steps:
113+ - name: Git checkout
114+ uses: actions/checkout@v2
115+ - name: Install Rust toolchain
116+ uses: actions-rs/toolchain@v1
117+ with:
118+ toolchain: stable
119+ default: true
120+ profile: minimal
121+ - name: Print -h
122+ uses: actions-rs/cargo@v1
123+ with:
124+ command: run
125+ args: --locked -- -h
126+ - name: Print --help
127+ uses: actions-rs/cargo@v1
128+ with:
129+ command: run
130+ args: --locked -- --help
131+ - name: Show man page
132+ run: man $(find . -name bat.1)
84 - name: Check documentation
133 - name: Check documentation
85 env:
134 env:
86 RUSTDOCFLAGS: -D warnings
135 RUSTDOCFLAGS: -D warnings
@@ -90,23 +139,23 @@ jobs:
90 args: --locked --no-deps --document-private-items --all-features
139 args: --locked --no-deps --document-private-items --all-features
91
140
92 build:
141 build:
93− name: ${{ matrix.job.os }} (${{ matrix.job.target }})
142+ name: ${{ matrix.job.target }} (${{ matrix.job.os }})
94 runs-on: ${{ matrix.job.os }}
143 runs-on: ${{ matrix.job.os }}
95 strategy:
144 strategy:
96 fail-fast: false
145 fail-fast: false
97 matrix:
146 matrix:
98 job:
147 job:
148+ - { target: aarch64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
99− - { os: ubuntu-18.04, target: arm-unknown-linux-gnueabihf , use-cross: true }
149+ - { target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true }
100− - { os: ubuntu-18.04, target: aarch64-unknown-linux-gnu , use-cross: true }
150+ - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
151+ - { target: i686-pc-windows-msvc , os: windows-2019 }
101− - { os: ubuntu-18.04, target: i686-unknown-linux-gnu , use-cross: true }
152+ - { target: i686-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
102− - { os: ubuntu-18.04, target: i686-unknown-linux-musl , use-cross: true }
153+ - { target: i686-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
103− - { os: ubuntu-18.04, target: x86_64-unknown-linux-gnu }
154+ - { target: x86_64-apple-darwin , os: macos-10.15 }
104− - { os: ubuntu-18.04, target: x86_64-unknown-linux-musl , use-cross: true }
105− - { os: macos-10.15 , target: x86_64-apple-darwin }
106− # - { os: windows-2019, target: i686-pc-windows-gnu } ## disabled; error: linker `i686-w64-mingw32-gcc` not found
107− - { os: windows-2019, target: i686-pc-windows-msvc }
108− - { os: windows-2019, target: x86_64-pc-windows-gnu }
155+ - { target: x86_64-pc-windows-gnu , os: windows-2019 }
109− - { os: windows-2019, target: x86_64-pc-windows-msvc }
156+ - { target: x86_64-pc-windows-msvc , os: windows-2019 }
157+ - { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
158+ - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
110 steps:
159 steps:
111 - name: Checkout source code
160 - name: Checkout source code
112 uses: actions/checkout@v2
161 uses: actions/checkout@v2
@@ -115,7 +164,7 @@ jobs:
115 shell: bash
164 shell: bash
116 run: |
165 run: |
117 case ${{ matrix.job.target }} in
166 case ${{ matrix.job.target }} in
118− arm-unknown-linux-gnueabihf) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
167+ arm-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
119 aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;
168 aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;
120 esac
169 esac
121
170
@@ -165,7 +214,7 @@ jobs:
165 # Figure out what strip tool to use if any
214 # Figure out what strip tool to use if any
166 STRIP="strip"
215 STRIP="strip"
167 case ${{ matrix.job.target }} in
216 case ${{ matrix.job.target }} in
168− arm-unknown-linux-gnueabihf) STRIP="arm-linux-gnueabihf-strip" ;;
217+ arm-unknown-linux-*) STRIP="arm-linux-gnueabihf-strip" ;;
169 aarch64-unknown-linux-gnu) STRIP="aarch64-linux-gnu-strip" ;;
218 aarch64-unknown-linux-gnu) STRIP="aarch64-linux-gnu-strip" ;;
170 *-pc-windows-msvc) STRIP="" ;;
219 *-pc-windows-msvc) STRIP="" ;;
171 esac;
220 esac;
@@ -246,6 +295,13 @@ jobs:
246 command: check
295 command: check
247 args: --locked --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git,paging
296 args: --locked --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git,paging
248
297
298+ - name: "Feature check: minimal-application"
299+ uses: actions-rs/cargo@v1
300+ with:
301+ use-cross: ${{ matrix.job.use-cross }}
302+ command: check
303+ args: --locked --target=${{ matrix.job.target }} --verbose --no-default-features --features minimal-application
304+
249 - name: Create tarball
305 - name: Create tarball
250 id: package
306 id: package
251 shell: bash
307 shell: bash
@@ -272,6 +328,7 @@ jobs:
272 # Autocompletion files
328 # Autocompletion files
273 cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.bash "$ARCHIVE_DIR/autocomplete/${{ env.PROJECT_NAME }}.bash"
329 cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.bash "$ARCHIVE_DIR/autocomplete/${{ env.PROJECT_NAME }}.bash"
274 cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.fish "$ARCHIVE_DIR/autocomplete/${{ env.PROJECT_NAME }}.fish"
330 cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.fish "$ARCHIVE_DIR/autocomplete/${{ env.PROJECT_NAME }}.fish"
331+ cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/_bat.ps1 "$ARCHIVE_DIR/autocomplete/_${{ env.PROJECT_NAME }}.ps1"
275 cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.zsh "$ARCHIVE_DIR/autocomplete/${{ env.PROJECT_NAME }}.zsh"
332 cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.zsh "$ARCHIVE_DIR/autocomplete/${{ env.PROJECT_NAME }}.zsh"
276
333
277 # base compressed package
334 # base compressed package
@@ -320,6 +377,7 @@ jobs:
320 gzip -n --best "${DPKG_DIR}/usr/share/man/man1/${{ env.PROJECT_NAME }}.1"
377 gzip -n --best "${DPKG_DIR}/usr/share/man/man1/${{ env.PROJECT_NAME }}.1"
321
378
322 # Autocompletion files
379 # Autocompletion files
380+ install -Dm644 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.bash "${DPKG_DIR}/usr/share/bash-completion/completions/${{ env.PROJECT_NAME }}"
323 install -Dm644 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.fish "${DPKG_DIR}/usr/share/fish/vendor_completions.d/${{ env.PROJECT_NAME }}.fish"
381 install -Dm644 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.fish "${DPKG_DIR}/usr/share/fish/vendor_completions.d/${{ env.PROJECT_NAME }}.fish"
324 install -Dm644 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.zsh "${DPKG_DIR}/usr/share/zsh/vendor-completions/_${{ env.PROJECT_NAME }}"
382 install -Dm644 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.zsh "${DPKG_DIR}/usr/share/zsh/vendor-completions/_${{ env.PROJECT_NAME }}"
325
383
.gitmodules+23−6
@@ -67,9 +67,6 @@
67[submodule "assets/syntaxes/JavaScript (Babel)"]
67[submodule "assets/syntaxes/JavaScript (Babel)"]
68 path = assets/syntaxes/02_Extra/JavaScript (Babel)
68 path = assets/syntaxes/02_Extra/JavaScript (Babel)
69 url = https://github.com/babel/babel-sublime
69 url = https://github.com/babel/babel-sublime
70−[submodule "assets/syntaxes/Dart"]
71− path = assets/syntaxes/02_Extra/Dart
72− url = https://github.com/guillermooo/dart-sublime-bundle
73[submodule "assets/syntaxes/FSharp"]
70[submodule "assets/syntaxes/FSharp"]
74 path = assets/syntaxes/02_Extra/FSharp
71 path = assets/syntaxes/02_Extra/FSharp
75 url = https://github.com/hoest/sublimetext-fsharp
72 url = https://github.com/hoest/sublimetext-fsharp
@@ -113,9 +110,6 @@
113[submodule "assets/syntaxes/Org mode"]
110[submodule "assets/syntaxes/Org mode"]
114 path = assets/syntaxes/02_Extra/Org mode
111 path = assets/syntaxes/02_Extra/Org mode
115 url = https://github.com/jezcope/Org.tmbundle.git
112 url = https://github.com/jezcope/Org.tmbundle.git
116−[submodule "assets/syntaxes/requirementstxt"]
117− path = assets/syntaxes/02_Extra/requirementstxt
118− url = https://github.com/wuub/requirementstxt
119[submodule "assets/syntaxes/DotENV"]
113[submodule "assets/syntaxes/DotENV"]
120 path = assets/syntaxes/02_Extra/DotENV
114 path = assets/syntaxes/02_Extra/DotENV
121 url = https://github.com/zaynali53/DotENV
115 url = https://github.com/zaynali53/DotENV
@@ -203,6 +197,9 @@
203[submodule "assets/syntaxes/02_Extra/Lean"]
197[submodule "assets/syntaxes/02_Extra/Lean"]
204 path = assets/syntaxes/02_Extra/Lean
198 path = assets/syntaxes/02_Extra/Lean
205 url = https://github.com/leanprover/vscode-lean.git
199 url = https://github.com/leanprover/vscode-lean.git
200+[submodule "assets/syntaxes/02_Extra/LiveScript"]
201+ path = assets/syntaxes/02_Extra/LiveScript
202+ url = https://github.com/paulmillr/LiveScript.tmbundle
206[submodule "assets/syntaxes/02_Extra/Zig"]
203[submodule "assets/syntaxes/02_Extra/Zig"]
207 path = assets/syntaxes/02_Extra/Zig
204 path = assets/syntaxes/02_Extra/Zig
208 url = https://github.com/ziglang/sublime-zig-language.git
205 url = https://github.com/ziglang/sublime-zig-language.git
@@ -227,3 +224,23 @@
227[submodule "assets/syntaxes/02_Extra/LLVM"]
224[submodule "assets/syntaxes/02_Extra/LLVM"]
228 path = assets/syntaxes/02_Extra/LLVM
225 path = assets/syntaxes/02_Extra/LLVM
229 url = https://github.com/ioncodes/LLVM.tmBundle
226 url = https://github.com/ioncodes/LLVM.tmBundle
227+[submodule "assets/syntaxes/02_Extra/Slim"]
228+ path = assets/syntaxes/02_Extra/Slim
229+ url = https://github.com/slim-template/ruby-slim.tmbundle.git
230+[submodule "assets/syntaxes/02_Extra/Racket"]
231+ path = assets/syntaxes/02_Extra/Racket
232+ url = https://github.com/follesoe/sublime-racket.git
233+[submodule "assets/syntaxes/02_Extra/MediaWiki"]
234+ path = assets/syntaxes/02_Extra/MediaWiki
235+ url = https://github.com/tosher/Mediawiker.git
236+[submodule "assets/syntaxes/02_Extra/Dart"]
237+ path = assets/syntaxes/02_Extra/Dart
238+ url = https://github.com/elMuso/Dartlight.git
239+[submodule "assets/syntaxes/02_Extra/SublimeJQ"]
240+ path = assets/syntaxes/02_Extra/SublimeJQ
241+ url = https://github.com/zogwarg/SublimeJQ.git
242+[submodule "assets/syntaxes/02_Extra/cmd-help"]
243+ path = assets/syntaxes/02_Extra/cmd-help
244+ url = https://github.com/victor-gp/cmd-help-sublime-syntax.git
245+ branch = main
246+ shallow = true
CHANGELOG.md+122−6
@@ -2,16 +2,117 @@
2
2
3## Features
3## Features
4
4
5+- Make the default macOS theme depend on Dark Mode. See #2197, #1746 (@Enselic)
5
6
6## Bugfixes
7## Bugfixes
7
8
8−- Python syntax highlighting no longer suffers from abysmal performance in specific scenarios. See #1688 (@keith-hall)
9+## Other
10+
11+- Relaxed glibc requirements on amd64, see #2106 and #2194 (@sharkdp)
12+
13+## Syntaxes
14+
15+## Themes
16+
17+## `bat` as a library
18+
19+
20+# v0.21.0
21+
22+## Features
23+
24+- Correctly render tab stops in `--show-all`, see #2038 (@Synthetica9)
25+- Add a `--style=default` option and make it the default. It is less verbose than `full`, see #2061 (@IsaacHorvath)
26+- Enable BusyBox `less` as pager, see #2162 (@nfisher1226)
27+- File extensions are now matched case-insensitively. See #1854, #2181 (@Enselic)
28+
29+## Bugfixes
30+
31+- Bump `regex` dependency from 1.5.4 to 1.5.5 to fix [CVE-2022-24713](https://blog.rust-lang.org/2022/03/08/cve-2022-24713.html), see #2145, #2139 (@Enselic)
32+- `bat` no longer crashes when encountering files that references missing syntaxes. See #915, #2181 (@Enselic)
33+
34+## Performance
35+
36+- Skip syntax highlighting on long lines (> 16384 chars) to help improve performance. See #2165 (@keith-hall)
37+- Vastly improve startup time by lazy-loading syntaxes via syntect 5.0.0. This makes bat display small files ~75% faster than before. See #951, #2181 (@Enselic)
9
38
10## Other
39## Other
11
40
12−- Load cached assets as fast as integrated assets, see #1753 (@Enselic)
41+- Include info about custom assets in `--diagnostics` if used. See #2107, #2144 (@Enselic)
13−- Greatly reduce startup time in loop-through mode, e.g. when redirecting output. Instead of *50 ms* - *100 ms*, startup takes *5 ms* - *10 ms*. See #1747 (@Enselic)
42+
43+## Syntaxes
44+
45+- Mapped clang-format config file (.clang-format) to YAML syntax (@TruncatedDinosour)
46+- log syntax: improved handling of escape characters in double quoted strings. See #2123 (@keith-hall)
47+- Associate `/var/spool/mail/*` and `/var/mail/*` with the `Email` syntax. See #2156 (@cyqsimon)
48+- Added cmd-help syntax to scope --help messages. See #2148 (@victor-gp)
49+- Slightly adjust Zig syntax. See #2136 (@Enselic)
50+- Associate `.inf` files with the `INI` syntax. See #2190 (@Enselic)
51+
52+## `bat` as a library
53+
54+- Allow configuration of `show_nonprintable` with `PrettyPrinter`, see #2142
55+- The binary format of syntaxes.bin has been changed due to syntaxes now being lazy-loaded via syntect 5.0.0. See #2181 (@Enselic)
56+- Mark `bat::error::Error` enum as `#[non_exhaustive]` to allow adding new variants without future semver breakage. See #2181 (@Enselic)
57+- Change `Error::SyntectError(syntect::LoadingError)` to `Error::SyntectError(syntect::Error)`. See #2181 (@Enselic)
58+- Add `Error::SyntectLoadingError(syntect::LoadingError)` enum variant. See #2181 (@Enselic)
59+
60+
61+# v0.20.0
62+
63+## Features
64+
65+- New style component `header-filesize` to show size of the displayed file in the header. See #1988 (@mdibaiee)
66+- Use underline for line highlighting on ANSI, see #1730 (@mdibaiee)
67+
68+## Bugfixes
69+
70+- Fix bash completion on bash 3.x and bash-completion 1.x. See #2066 (@joshpencheon)
71+
72+## Syntaxes
73+
74+- `GraphQL`: Add support for interfaces implementing interfaces and consider ampersand an operator. See #2000
75+- Associate `_vimrc` and `_gvimrc` files with the `VimL` syntax. See #2002
76+- Associate `poetry.lock` files with the `TOML` syntax. See #2049
77+- Associate `.mesh`, `.task`, `.rgen`, `.rint`, `.rahit`, `.rchit`, `.rmiss`, and `.rcall` with the `GLSL` syntax. See #2050
78+- Added support for `JQ` syntax, see #2072
79+- Properly associate global git config files rooted in `$XDG_CONFIG_HOME/git/` or `$HOME/.config/git/`. See #2067 (@cyqsimon)
80+
81+## `bat` as a library
82+
83+- Exposed `get_syntax_set` and `get_theme` methods on `HighlightingAssets`. See #2030 (@dandavison)
84+- Added `HeaderFilename` and `HeaderFilesize` to `StyleComponent` enum, and mark it `#[non_exhaustive]`. See #1988 (@mdibaiee)
85+
86+
87+# v0.19.0
88+
89+## Performance
14
90
91+- Reduce startup time in loop-through mode (e.g. when redirecting output) by 90%. See #1747 (@Enselic)
92+- Load themes lazily to make bat start 25% faster when disregarding syntax load time. See #1969 (@Enselic)
93+- Python syntax highlighting no longer suffers from abysmal performance in specific scenarios. See #1688 (@keith-hall)
94+- Fix for poor performance when ANSI escape sequences are piped to `bat`, see #1596 (@eth-p)
95+- Fix for incorrect handling of ANSI escape sequences when using `--wrap=never`, see #1596 (@eth-p)
96+- Load custom assets as fast as integrated assets, see #1753 (@Enselic)
97+
98+## Features
99+
100+- Support for `x:-delta` (minus) syntax in line ranges (e.g. `20:-10`). See #1901 (@bojan88)
101+- Support for `--ignored-suffix` argument. See #1892 (@bojan88)
102+- `$BAT_CONFIG_DIR` is now a recognized environment variable. It has precedence over `$XDG_CONFIG_HOME`, see #1727 (@billrisher)
103+- Support for `x:+delta` syntax in line ranges (e.g. `20:+10`). See #1810 (@bojan88)
104+- Add new `--acknowledgements` option that gives credit to theme and syntax definition authors. See #1971 (@Enselic)
105+- Include git hash in `bat -V` and `bat --version` output if present. See #1921 (@Enselic)
106+
107+## Bugfixes
108+
109+- First line not shown in diff context. See #1891 (@divagant-martian)
110+- Do not ignore syntaxes that handle file names with a `*.conf` extension. See #1703 (@cbolgiano)
111+
112+## Other
113+
114+- Add PowerShell completion, see #1826 (@rashil2000)
115+- Minimum supported Rust version (MSRV) bumped to 1.51, see #1994 (@mdibaiee)
15
116
16## Syntaxes
117## Syntaxes
17
118
@@ -19,15 +120,30 @@
19- HTTP Requests and Responses, see #1748 (@keith-hall)
120- HTTP Requests and Responses, see #1748 (@keith-hall)
20- LLVM, see #1777 (@ioncodes)
121- LLVM, see #1777 (@ioncodes)
21- Highlight for `vimrc` and `gvimrc` files, see #1763 (@SuperSandro2000)
122- Highlight for `vimrc` and `gvimrc` files, see #1763 (@SuperSandro2000)
123+- Syslog highlighting improvements, see #1793 (@scop)
124+- Added support for `slim` syntax, see #1693 (@mfinelli)
125+- Racket, see #1884 (@jubnzv)
126+- LiveScript, see #1915 (@Enselic)
127+- MediaWiki, see #1925 (@sorairolake)
128+- The `requirements.txt` syntax has been removed due to incompatible license requirements.
129+- Dart, new highlighter, see #1959 (@Ersikan)
130+- SCSS and Sass syntaxes updated, see #1766 (@Enselic)
131+- PowerShell syntax updated, see #1935 (@Enselic)
132+- TypeScript syntax updated, see #1834 (@Enselic)
22
133
134+## `bat` as a library
23
135
24−## New themes
136+- Deprecate `HighlightingAssets::syntaxes()` and `HighlightingAssets::syntax_for_file_name()`. Use `HighlightingAssets::get_syntaxes()` and `HighlightingAssets::get_syntax_for_path()` instead. They return a `Result` which is needed for upcoming lazy-loading work to improve startup performance. They also return which `SyntaxSet` the returned `SyntaxReference` belongs to. See #1747, #1755, #1776, #1862 (@Enselic)
137+- Remove `HighlightingAssets::from_files` and `HighlightingAssets::save_to_cache`. Instead of calling the former and then the latter you now make a single call to `bat::assets::build`. See #1802, #1971 (@Enselic)
138+- Replace the `error::Error(error::ErrorKind, _)` struct and enum with an `error::Error` enum. `Error(ErrorKind::UnknownSyntax, _)` becomes `Error::UnknownSyntax`, etc. Also remove the `error::ResultExt` trait. These changes stem from replacing `error-chain` with `thiserror`. See #1820 (@Enselic)
139+- Add new `MappingTarget` enum variant `MapExtensionToUnknown`. Refer to its documentation for more information. Also mark `MappingTarget` as `#[non_exhaustive]` since more enum variants might be added in the future. See #1703 (@cbolgiano), #2012 (@Enselic)
25
140
26
141
27−## `bat` as a library
142+# v0.18.3
28
143
29−- Deprecate `HighlightingAssets::syntaxes()` and `HighlightingAssets::syntax_for_file_name()`. Use `HighlightingAssets::get_syntaxes()` and `HighlightingAssets::get_syntax_for_file_name()` instead. They return a `Result` which is needed for upcoming lazy-loading work to improve startup performance. See #1747 and #1755 (@Enselic)
144+## Bugfixes
30
145
146+- Bump `git2` dependency to fix build with Rust 1.54, see #1761
31
147
32
148
33# v0.18.2
149# v0.18.2
CONTRIBUTING.md+22
@@ -46,3 +46,25 @@ If you really think that a particular syntax or theme should be added for all
46users, please read the corresponding
46users, please read the corresponding
47[documentation](https://github.com/sharkdp/bat/blob/master/doc/assets.md)
47[documentation](https://github.com/sharkdp/bat/blob/master/doc/assets.md)
48first.
48first.
49+
50+
51+## Regression tests
52+
53+You are strongly encouraged to add regression tests. Regression tests are great,
54+not least because they:
55+
56+* ensure that your contribution will never completely stop working,
57+
58+* makes code review easier, because it becomes very clear what the code is
59+ supposed to do.
60+
61+For functional changes, you most likely want to add a test to
62+[`tests/integration_tests.rs`](https://github.com/sharkdp/bat/blob/master/tests/integration_tests.rs).
63+Look at existing tests to know how to write a new test. In short, you will
64+invoke the `bat` binary with a certain set of arguments, and then assert on
65+stdout/stderr.
66+
67+To learn how to write regression tests for theme and syntax changes, read the
68+[Syntax
69+tests](https://github.com/sharkdp/bat/blob/master/doc/assets.md#syntax-tests)
70+section in `assets.md`.
Cargo.lock+249−260
@@ -19,20 +19,11 @@ dependencies = [
19
19
20[[package]]
20[[package]]
21name = "ansi_colours"
21name = "ansi_colours"
22−version = "1.0.4"
22+version = "1.1.1"
23−source = "registry+https://github.com/rust-lang/crates.io-index"
24−checksum = "60e2fb6138a49ad9f1cb3c6d8f8ccbdd5e62b4dab317c1b435a47ecd7da1d28f"
25−dependencies = [
26− "cc",
27−]
28−
29−[[package]]
30−name = "ansi_term"
31−version = "0.11.0"
32source = "registry+https://github.com/rust-lang/crates.io-index"
23source = "registry+https://github.com/rust-lang/crates.io-index"
33−checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
24+checksum = "32678233b67f9056b0c144b39d46dc3218637e8d84ad6038ded339e08b19620d"
34dependencies = [
25dependencies = [
35− "winapi",
26+ "rgb",
36]
27]
37
28
38[[package]]
29[[package]]
@@ -46,9 +37,9 @@ dependencies = [
46
37
47[[package]]
38[[package]]
48name = "assert_cmd"
39name = "assert_cmd"
49−version = "1.0.8"
40+version = "2.0.4"
50source = "registry+https://github.com/rust-lang/crates.io-index"
41source = "registry+https://github.com/rust-lang/crates.io-index"
51−checksum = "c98233c6673d8601ab23e77eb38f999c51100d46c5703b17288c57fddf3a1ffe"
42+checksum = "93ae1ddd39efd67689deb1979d80bad3bf7f2b09c6e6117c8d1f2443b5e2f83e"
52dependencies = [
43dependencies = [
53 "bstr",
44 "bstr",
54 "doc-comment",
45 "doc-comment",
@@ -83,28 +74,30 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
83
74
84[[package]]
75[[package]]
85name = "bat"
76name = "bat"
86−version = "0.18.2"
77+version = "0.21.0"
87dependencies = [
78dependencies = [
88 "ansi_colours",
79 "ansi_colours",
89− "ansi_term 0.12.1",
80+ "ansi_term",
90 "assert_cmd",
81 "assert_cmd",
91 "atty",
82 "atty",
83+ "bincode",
92 "bugreport",
84 "bugreport",
85+ "bytesize",
93 "clap",
86 "clap",
94 "clircle",
87 "clircle",
95 "console",
88 "console",
96 "content_inspector",
89 "content_inspector",
97 "dirs-next",
90 "dirs-next",
98 "encoding",
91 "encoding",
99− "error-chain",
92+ "flate2",
100 "git2",
93 "git2",
101 "globset",
94 "globset",
102 "grep-cli",
95 "grep-cli",
103− "lazy_static",
104− "lazycell",
105 "nix",
96 "nix",
97+ "once_cell",
106 "path_abs",
98 "path_abs",
107 "predicates",
99 "predicates",
100+ "regex",
108 "semver",
101 "semver",
109 "serde",
102 "serde",
110 "serde_yaml",
103 "serde_yaml",
@@ -112,8 +105,10 @@ dependencies = [
112 "shell-words",
105 "shell-words",
113 "syntect",
106 "syntect",
114 "tempfile",
107 "tempfile",
108+ "thiserror",
115 "unicode-width",
109 "unicode-width",
116 "wait-timeout",
110 "wait-timeout",
111+ "walkdir",
117 "wild",
112 "wild",
118]
113]
119
114
@@ -143,15 +138,15 @@ checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
143
138
144[[package]]
139[[package]]
145name = "bitflags"
140name = "bitflags"
146−version = "1.2.1"
141+version = "1.3.2"
147source = "registry+https://github.com/rust-lang/crates.io-index"
142source = "registry+https://github.com/rust-lang/crates.io-index"
148−checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
143+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
149
144
150[[package]]
145[[package]]
151name = "bstr"
146name = "bstr"
152−version = "0.2.16"
147+version = "0.2.17"
153source = "registry+https://github.com/rust-lang/crates.io-index"
148source = "registry+https://github.com/rust-lang/crates.io-index"
154−checksum = "90682c8d613ad3373e66de8c6411e0ae2ab2571e879d2efbf73558cc66f21279"
149+checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
155dependencies = [
150dependencies = [
156 "lazy_static",
151 "lazy_static",
157 "memchr",
152 "memchr",
@@ -160,9 +155,9 @@ dependencies = [
160
155
161[[package]]
156[[package]]
162name = "bugreport"
157name = "bugreport"
163−version = "0.4.0"
158+version = "0.5.0"
164source = "registry+https://github.com/rust-lang/crates.io-index"
159source = "registry+https://github.com/rust-lang/crates.io-index"
165−checksum = "a0e97e538864a7c95d33accbf64c8d354018ba3b6e032502fd0fe7259cf1aa3d"
160+checksum = "535120b8182547808081a66f1f77a64533c780b23da26763e0ee34dfb94f98c9"
166dependencies = [
161dependencies = [
167 "git-version",
162 "git-version",
168 "shell-escape",
163 "shell-escape",
@@ -170,16 +165,22 @@ dependencies = [
170]
165]
171
166
172[[package]]
167[[package]]
173−name = "byteorder"
168+name = "bytemuck"
174−version = "1.4.3"
169+version = "1.7.3"
170+source = "registry+https://github.com/rust-lang/crates.io-index"
171+checksum = "439989e6b8c38d1b6570a384ef1e49c8848128f5a97f3914baef02920842712f"
172+
173+[[package]]
174+name = "bytesize"
175+version = "1.1.0"
175source = "registry+https://github.com/rust-lang/crates.io-index"
176source = "registry+https://github.com/rust-lang/crates.io-index"
176−checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
177+checksum = "6c58ec36aac5066d5ca17df51b3e70279f5670a72102f5752cb7e7c856adfc70"
177
178
178[[package]]
179[[package]]
179name = "cc"
180name = "cc"
180−version = "1.0.67"
181+version = "1.0.72"
181source = "registry+https://github.com/rust-lang/crates.io-index"
182source = "registry+https://github.com/rust-lang/crates.io-index"
182−checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd"
183+checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee"
183dependencies = [
184dependencies = [
184 "jobserver",
185 "jobserver",
185]
186]
@@ -190,23 +191,13 @@ version = "1.0.0"
190source = "registry+https://github.com/rust-lang/crates.io-index"
191source = "registry+https://github.com/rust-lang/crates.io-index"
191checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
192checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
192
193
193−[[package]]
194−name = "chrono"
195−version = "0.4.19"
196−source = "registry+https://github.com/rust-lang/crates.io-index"
197−checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
198−dependencies = [
199− "num-integer",
200− "num-traits",
201−]
202−
203[[package]]
194[[package]]
204name = "clap"
195name = "clap"
205−version = "2.33.3"
196+version = "2.34.0"
206source = "registry+https://github.com/rust-lang/crates.io-index"
197source = "registry+https://github.com/rust-lang/crates.io-index"
207−checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
198+checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
208dependencies = [
199dependencies = [
209− "ansi_term 0.11.0",
200+ "ansi_term",
210 "atty",
201 "atty",
211 "bitflags",
202 "bitflags",
212 "strsim",
203 "strsim",
@@ -230,13 +221,13 @@ dependencies = [
230
221
231[[package]]
222[[package]]
232name = "console"
223name = "console"
233−version = "0.14.1"
224+version = "0.15.0"
234source = "registry+https://github.com/rust-lang/crates.io-index"
225source = "registry+https://github.com/rust-lang/crates.io-index"
235−checksum = "3993e6445baa160675931ec041a5e03ca84b9c6e32a056150d3aa2bdda0a1f45"
226+checksum = "a28b32d32ca44b70c3e4acd7db1babf555fa026e385fb95f18028f88848b3c31"
236dependencies = [
227dependencies = [
237 "encode_unicode",
228 "encode_unicode",
238− "lazy_static",
239 "libc",
229 "libc",
230+ "once_cell",
240 "regex",
231 "regex",
241 "terminal_size",
232 "terminal_size",
242 "unicode-width",
233 "unicode-width",
@@ -254,9 +245,9 @@ dependencies = [
254
245
255[[package]]
246[[package]]
256name = "crc32fast"
247name = "crc32fast"
257−version = "1.2.1"
248+version = "1.3.0"
258source = "registry+https://github.com/rust-lang/crates.io-index"
249source = "registry+https://github.com/rust-lang/crates.io-index"
259−checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a"
250+checksum = "738c290dfaea84fc1ca15ad9c168d083b05a714e1efddd8edaab678dc28d2836"
260dependencies = [
251dependencies = [
261 "cfg-if",
252 "cfg-if",
262]
253]
@@ -294,12 +285,6 @@ version = "0.3.3"
294source = "registry+https://github.com/rust-lang/crates.io-index"
285source = "registry+https://github.com/rust-lang/crates.io-index"
295checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
286checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
296
287
297−[[package]]
298−name = "dtoa"
299−version = "0.4.8"
300−source = "registry+https://github.com/rust-lang/crates.io-index"
301−checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0"
302−
303[[package]]
288[[package]]
304name = "either"
289name = "either"
305version = "1.6.1"
290version = "1.6.1"
@@ -376,15 +361,6 @@ version = "0.1.4"
376source = "registry+https://github.com/rust-lang/crates.io-index"
361source = "registry+https://github.com/rust-lang/crates.io-index"
377checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569"
362checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569"
378
363
379−[[package]]
380−name = "error-chain"
381−version = "0.12.4"
382−source = "registry+https://github.com/rust-lang/crates.io-index"
383−checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc"
384−dependencies = [
385− "version_check",
386−]
387−
388[[package]]
364[[package]]
389name = "fancy-regex"
365name = "fancy-regex"
390version = "0.7.1"
366version = "0.7.1"
@@ -395,11 +371,20 @@ dependencies = [
395 "regex",
371 "regex",
396]
372]
397
373
374+[[package]]
375+name = "fastrand"
376+version = "1.7.0"
377+source = "registry+https://github.com/rust-lang/crates.io-index"
378+checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf"
379+dependencies = [
380+ "instant",
381+]
382+
398[[package]]
383[[package]]
399name = "flate2"
384name = "flate2"
400−version = "1.0.20"
385+version = "1.0.23"
401source = "registry+https://github.com/rust-lang/crates.io-index"
386source = "registry+https://github.com/rust-lang/crates.io-index"
402−checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0"
387+checksum = "b39522e96686d38f4bc984b9198e3a0613264abaebaff2c5c918bfa6b6da09af"
403dependencies = [
388dependencies = [
404 "cfg-if",
389 "cfg-if",
405 "crc32fast",
390 "crc32fast",
@@ -434,9 +419,9 @@ dependencies = [
434
419
435[[package]]
420[[package]]
436name = "getrandom"
421name = "getrandom"
437−version = "0.2.2"
422+version = "0.2.3"
438source = "registry+https://github.com/rust-lang/crates.io-index"
423source = "registry+https://github.com/rust-lang/crates.io-index"
439−checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8"
424+checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753"
440dependencies = [
425dependencies = [
441 "cfg-if",
426 "cfg-if",
442 "libc",
427 "libc",
@@ -445,9 +430,9 @@ dependencies = [
445
430
446[[package]]
431[[package]]
447name = "git-version"
432name = "git-version"
448−version = "0.3.4"
433+version = "0.3.5"
449source = "registry+https://github.com/rust-lang/crates.io-index"
434source = "registry+https://github.com/rust-lang/crates.io-index"
450−checksum = "94918e83f1e01dedc2e361d00ce9487b14c58c7f40bab148026fa39d42cb41e2"
435+checksum = "f6b0decc02f4636b9ccad390dcbe77b722a77efedfa393caf8379a51d5c61899"
451dependencies = [
436dependencies = [
452 "git-version-macro",
437 "git-version-macro",
453 "proc-macro-hack",
438 "proc-macro-hack",
@@ -455,9 +440,9 @@ dependencies = [
455
440
456[[package]]
441[[package]]
457name = "git-version-macro"
442name = "git-version-macro"
458−version = "0.3.4"
443+version = "0.3.5"
459source = "registry+https://github.com/rust-lang/crates.io-index"
444source = "registry+https://github.com/rust-lang/crates.io-index"
460−checksum = "34a97a52fdee1870a34fa6e4b77570cba531b27d1838874fef4429a791a3d657"
445+checksum = "fe69f1cbdb6e28af2bac214e943b99ce8a0a06b447d15d3e61161b0423139f3f"
461dependencies = [
446dependencies = [
462 "proc-macro-hack",
447 "proc-macro-hack",
463 "proc-macro2",
448 "proc-macro2",
@@ -467,9 +452,9 @@ dependencies = [
467
452
468[[package]]
453[[package]]
469name = "git2"
454name = "git2"
470−version = "0.13.20"
455+version = "0.14.2"
471source = "registry+https://github.com/rust-lang/crates.io-index"
456source = "registry+https://github.com/rust-lang/crates.io-index"
472−checksum = "d9831e983241f8c5591ed53f17d874833e2fa82cac2625f3888c50cbfe136cba"
457+checksum = "3826a6e0e2215d7a41c2bfc7c9244123969273f3476b939a226aac0ab56e9e3c"
473dependencies = [
458dependencies = [
474 "bitflags",
459 "bitflags",
475 "libc",
460 "libc",
@@ -516,15 +501,15 @@ dependencies = [
516
501
517[[package]]
502[[package]]
518name = "hashbrown"
503name = "hashbrown"
519−version = "0.9.1"
504+version = "0.11.2"
520source = "registry+https://github.com/rust-lang/crates.io-index"
505source = "registry+https://github.com/rust-lang/crates.io-index"
521−checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
506+checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
522
507
523[[package]]
508[[package]]
524name = "hermit-abi"
509name = "hermit-abi"
525−version = "0.1.18"
510+version = "0.1.19"
526source = "registry+https://github.com/rust-lang/crates.io-index"
511source = "registry+https://github.com/rust-lang/crates.io-index"
527−checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c"
512+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
528dependencies = [
513dependencies = [
529 "libc",
514 "libc",
530]
515]
@@ -542,9 +527,9 @@ dependencies = [
542
527
543[[package]]
528[[package]]
544name = "indexmap"
529name = "indexmap"
545−version = "1.6.2"
530+version = "1.7.0"
546source = "registry+https://github.com/rust-lang/crates.io-index"
531source = "registry+https://github.com/rust-lang/crates.io-index"
547−checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3"
532+checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5"
548dependencies = [
533dependencies = [
549 "autocfg",
534 "autocfg",
550 "hashbrown",
535 "hashbrown",
@@ -552,33 +537,39 @@ dependencies = [
552
537
553[[package]]
538[[package]]
554name = "instant"
539name = "instant"
555−version = "0.1.9"
540+version = "0.1.12"
556source = "registry+https://github.com/rust-lang/crates.io-index"
541source = "registry+https://github.com/rust-lang/crates.io-index"
557−checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec"
542+checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
558dependencies = [
543dependencies = [
559 "cfg-if",
544 "cfg-if",
560]
545]
561
546
562[[package]]
547[[package]]
563name = "itertools"
548name = "itertools"
564−version = "0.10.1"
549+version = "0.10.3"
565source = "registry+https://github.com/rust-lang/crates.io-index"
550source = "registry+https://github.com/rust-lang/crates.io-index"
566−checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf"
551+checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3"
567dependencies = [
552dependencies = [
568 "either",
553 "either",
569]
554]
570
555
571[[package]]
556[[package]]
572name = "itoa"
557name = "itoa"
573−version = "0.4.7"
558+version = "0.4.8"
559+source = "registry+https://github.com/rust-lang/crates.io-index"
560+checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
561+
562+[[package]]
563+name = "itoa"
564+version = "1.0.1"
574source = "registry+https://github.com/rust-lang/crates.io-index"
565source = "registry+https://github.com/rust-lang/crates.io-index"
575−checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
566+checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
576
567
577[[package]]
568[[package]]
578name = "jobserver"
569name = "jobserver"
579−version = "0.1.22"
570+version = "0.1.24"
580source = "registry+https://github.com/rust-lang/crates.io-index"
571source = "registry+https://github.com/rust-lang/crates.io-index"
581−checksum = "972f5ae5d1cb9c6ae417789196c803205313edde988685da5e3aae0827b9e7fd"
572+checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa"
582dependencies = [
573dependencies = [
583 "libc",
574 "libc",
584]
575]
@@ -589,23 +580,17 @@ version = "1.4.0"
589source = "registry+https://github.com/rust-lang/crates.io-index"
580source = "registry+https://github.com/rust-lang/crates.io-index"
590checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
581checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
591
582
592−[[package]]
593−name = "lazycell"
594−version = "1.3.0"
595−source = "registry+https://github.com/rust-lang/crates.io-index"
596−checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
597−
598[[package]]
583[[package]]
599name = "libc"
584name = "libc"
600−version = "0.2.98"
585+version = "0.2.125"
601source = "registry+https://github.com/rust-lang/crates.io-index"
586source = "registry+https://github.com/rust-lang/crates.io-index"
602−checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790"
587+checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b"
603
588
604[[package]]
589[[package]]
605name = "libgit2-sys"
590name = "libgit2-sys"
606−version = "0.12.21+1.1.0"
591+version = "0.13.2+1.4.2"
607source = "registry+https://github.com/rust-lang/crates.io-index"
592source = "registry+https://github.com/rust-lang/crates.io-index"
608−checksum = "86271bacd72b2b9e854c3dcfb82efd538f15f870e4c11af66900effb462f6825"
593+checksum = "3a42de9a51a5c12e00fc0e4ca6bc2ea43582fc6418488e8f615e905d886f258b"
609dependencies = [
594dependencies = [
610 "cc",
595 "cc",
611 "libc",
596 "libc",
@@ -642,9 +627,9 @@ checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
642
627
643[[package]]
628[[package]]
644name = "lock_api"
629name = "lock_api"
645−version = "0.4.4"
630+version = "0.4.5"
646source = "registry+https://github.com/rust-lang/crates.io-index"
631source = "registry+https://github.com/rust-lang/crates.io-index"
647−checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb"
632+checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109"
648dependencies = [
633dependencies = [
649 "scopeguard",
634 "scopeguard",
650]
635]
@@ -660,46 +645,34 @@ dependencies = [
660
645
661[[package]]
646[[package]]
662name = "matches"
647name = "matches"
663−version = "0.1.8"
648+version = "0.1.9"
664source = "registry+https://github.com/rust-lang/crates.io-index"
649source = "registry+https://github.com/rust-lang/crates.io-index"
665−checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
650+checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
666
651
667[[package]]
652[[package]]
668name = "memchr"
653name = "memchr"
669−version = "2.4.0"
654+version = "2.4.1"
670−source = "registry+https://github.com/rust-lang/crates.io-index"
671−checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc"
672−
673−[[package]]
674−name = "memoffset"
675−version = "0.6.4"
676source = "registry+https://github.com/rust-lang/crates.io-index"
655source = "registry+https://github.com/rust-lang/crates.io-index"
677−checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9"
656+checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
678−dependencies = [
679− "autocfg",
680−]
681
657
682[[package]]
658[[package]]
683name = "miniz_oxide"
659name = "miniz_oxide"
684−version = "0.4.4"
660+version = "0.5.1"
685source = "registry+https://github.com/rust-lang/crates.io-index"
661source = "registry+https://github.com/rust-lang/crates.io-index"
686−checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b"
662+checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082"
687dependencies = [
663dependencies = [
688 "adler",
664 "adler",
689− "autocfg",
690]
665]
691
666
692[[package]]
667[[package]]
693name = "nix"
668name = "nix"
694−version = "0.22.0"
669+version = "0.24.1"
695source = "registry+https://github.com/rust-lang/crates.io-index"
670source = "registry+https://github.com/rust-lang/crates.io-index"
696−checksum = "cf1e25ee6b412c2a1e3fcb6a4499a5c1bfe7f43e014bdce9a6b6666e5aa2d187"
671+checksum = "8f17df307904acd05aa8e32e97bb20f2a0df1728bbc2d771ae8f9a90463441e9"
697dependencies = [
672dependencies = [
698 "bitflags",
673 "bitflags",
699− "cc",
700 "cfg-if",
674 "cfg-if",
701 "libc",
675 "libc",
702− "memoffset",
703]
676]
704
677
705[[package]]
678[[package]]
@@ -708,16 +681,6 @@ version = "0.3.0"
708source = "registry+https://github.com/rust-lang/crates.io-index"
681source = "registry+https://github.com/rust-lang/crates.io-index"
709checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be"
682checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be"
710
683
711−[[package]]
712−name = "num-integer"
713−version = "0.1.44"
714−source = "registry+https://github.com/rust-lang/crates.io-index"
715−checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
716−dependencies = [
717− "autocfg",
718− "num-traits",
719−]
720−
721[[package]]
684[[package]]
722name = "num-traits"
685name = "num-traits"
723version = "0.2.14"
686version = "0.2.14"
@@ -727,11 +690,17 @@ dependencies = [
727 "autocfg",
690 "autocfg",
728]
691]
729
692
693+[[package]]
694+name = "once_cell"
695+version = "1.10.0"
696+source = "registry+https://github.com/rust-lang/crates.io-index"
697+checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9"
698+
730[[package]]
699[[package]]
731name = "onig"
700name = "onig"
732−version = "6.1.1"
701+version = "6.3.1"
733source = "registry+https://github.com/rust-lang/crates.io-index"
702source = "registry+https://github.com/rust-lang/crates.io-index"
734−checksum = "30b46fd9edbc018f0be4e366c24c46db44fac49cd01c039ae85308088b089dd5"
703+checksum = "67ddfe2c93bb389eea6e6d713306880c7f6dcc99a75b659ce145d962c861b225"
735dependencies = [
704dependencies = [
736 "bitflags",
705 "bitflags",
737 "lazy_static",
706 "lazy_static",
@@ -741,9 +710,9 @@ dependencies = [
741
710
742[[package]]
711[[package]]
743name = "onig_sys"
712name = "onig_sys"
744−version = "69.6.0"
713+version = "69.7.1"
745source = "registry+https://github.com/rust-lang/crates.io-index"
714source = "registry+https://github.com/rust-lang/crates.io-index"
746−checksum = "ed063c96cf4c0f2e5d09324409d158b38a0a85a7b90fbd68c8cad75c495d5775"
715+checksum = "5dd3eee045c84695b53b20255bb7317063df090b68e18bfac0abb6c39cf7f33e"
747dependencies = [
716dependencies = [
748 "cc",
717 "cc",
749 "pkg-config",
718 "pkg-config",
@@ -751,9 +720,9 @@ dependencies = [
751
720
752[[package]]
721[[package]]
753name = "parking_lot"
722name = "parking_lot"
754−version = "0.11.1"
723+version = "0.11.2"
755source = "registry+https://github.com/rust-lang/crates.io-index"
724source = "registry+https://github.com/rust-lang/crates.io-index"
756−checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb"
725+checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
757dependencies = [
726dependencies = [
758 "instant",
727 "instant",
759 "lock_api",
728 "lock_api",
@@ -762,9 +731,9 @@ dependencies = [
762
731
763[[package]]
732[[package]]
764name = "parking_lot_core"
733name = "parking_lot_core"
765−version = "0.8.3"
734+version = "0.8.5"
766source = "registry+https://github.com/rust-lang/crates.io-index"
735source = "registry+https://github.com/rust-lang/crates.io-index"
767−checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018"
736+checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216"
768dependencies = [
737dependencies = [
769 "cfg-if",
738 "cfg-if",
770 "instant",
739 "instant",
@@ -791,35 +760,29 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
791
760
792[[package]]
761[[package]]
793name = "pkg-config"
762name = "pkg-config"
794−version = "0.3.19"
763+version = "0.3.24"
795source = "registry+https://github.com/rust-lang/crates.io-index"
764source = "registry+https://github.com/rust-lang/crates.io-index"
796−checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
765+checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe"
797
766
798[[package]]
767[[package]]
799name = "plist"
768name = "plist"
800−version = "1.1.0"
769+version = "1.3.1"
801source = "registry+https://github.com/rust-lang/crates.io-index"
770source = "registry+https://github.com/rust-lang/crates.io-index"
802−checksum = "679104537029ed2287c216bfb942bbf723f48ee98f0aef15611634173a74ef21"
771+checksum = "bd39bc6cdc9355ad1dc5eeedefee696bb35c34caf21768741e81826c0bbd7225"
803dependencies = [
772dependencies = [
804 "base64",
773 "base64",
805− "chrono",
806 "indexmap",
774 "indexmap",
807 "line-wrap",
775 "line-wrap",
808 "serde",
776 "serde",
777+ "time",
809 "xml-rs",
778 "xml-rs",
810]
779]
811
780
812−[[package]]
813−name = "ppv-lite86"
814−version = "0.2.10"
815−source = "registry+https://github.com/rust-lang/crates.io-index"
816−checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
817−
818[[package]]
781[[package]]
819name = "predicates"
782name = "predicates"
820−version = "2.0.1"
783+version = "2.1.1"
821source = "registry+https://github.com/rust-lang/crates.io-index"
784source = "registry+https://github.com/rust-lang/crates.io-index"
822−checksum = "bc3d91237f5de3bcd9d927e24d03b495adb6135097b001cea7403e2d573d00a9"
785+checksum = "a5aab5be6e4732b473071984b3164dbbfb7a3674d30ea5ff44410b6bcd960c3c"
823dependencies = [
786dependencies = [
824 "difflib",
787 "difflib",
825 "float-cmp",
788 "float-cmp",
@@ -837,83 +800,67 @@ checksum = "57e35a3326b75e49aa85f5dc6ec15b41108cf5aee58eabb1f274dd18b73c2451"
837
800
838[[package]]
801[[package]]
839name = "predicates-tree"
802name = "predicates-tree"
840−version = "1.0.2"
803+version = "1.0.4"
841source = "registry+https://github.com/rust-lang/crates.io-index"
804source = "registry+https://github.com/rust-lang/crates.io-index"
842−checksum = "15f553275e5721409451eb85e15fd9a860a6e5ab4496eb215987502b5f5391f2"
805+checksum = "338c7be2905b732ae3984a2f40032b5e94fd8f52505b186c7d4d68d193445df7"
843dependencies = [
806dependencies = [
844 "predicates-core",
807 "predicates-core",
845− "treeline",
808+ "termtree",
846]
809]
847
810
848[[package]]
811[[package]]
849−name = "proc-macro-hack"
812+name = "proc-macro-error"
850−version = "0.5.19"
851−source = "registry+https://github.com/rust-lang/crates.io-index"
852−checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
853−
854−[[package]]
855−name = "proc-macro2"
856−version = "1.0.26"
813+version = "1.0.4"
857−source = "registry+https://github.com/rust-lang/crates.io-index"
858−checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec"
859−dependencies = [
860− "unicode-xid",
861−]
862−
863−[[package]]
864−name = "quote"
865−version = "1.0.9"
866source = "registry+https://github.com/rust-lang/crates.io-index"
814source = "registry+https://github.com/rust-lang/crates.io-index"
867−checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
815+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
868dependencies = [
816dependencies = [
817+ "proc-macro-error-attr",
869 "proc-macro2",
818 "proc-macro2",
819+ "quote",
820+ "syn",
821+ "version_check",
870]
822]
871
823
872[[package]]
824[[package]]
873−name = "rand"
825+name = "proc-macro-error-attr"
874−version = "0.8.3"
826+version = "1.0.4"
875source = "registry+https://github.com/rust-lang/crates.io-index"
827source = "registry+https://github.com/rust-lang/crates.io-index"
876−checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e"
828+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
877dependencies = [
829dependencies = [
878− "libc",
830+ "proc-macro2",
879− "rand_chacha",
831+ "quote",
880− "rand_core",
832+ "version_check",
881− "rand_hc",
882]
833]
883
834
884[[package]]
835[[package]]
885−name = "rand_chacha"
836+name = "proc-macro-hack"
886−version = "0.3.0"
837+version = "0.5.19"
887source = "registry+https://github.com/rust-lang/crates.io-index"
838source = "registry+https://github.com/rust-lang/crates.io-index"
888−checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d"
839+checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
889−dependencies = [
890− "ppv-lite86",
891− "rand_core",
892−]
893
840
894[[package]]
841[[package]]
895−name = "rand_core"
842+name = "proc-macro2"
896−version = "0.6.2"
843+version = "1.0.36"
897source = "registry+https://github.com/rust-lang/crates.io-index"
844source = "registry+https://github.com/rust-lang/crates.io-index"
898−checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7"
845+checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
899dependencies = [
846dependencies = [
900− "getrandom",
847+ "unicode-xid",
901]
848]
902
849
903[[package]]
850[[package]]
904−name = "rand_hc"
851+name = "quote"
905−version = "0.3.0"
852+version = "1.0.14"
906source = "registry+https://github.com/rust-lang/crates.io-index"
853source = "registry+https://github.com/rust-lang/crates.io-index"
907−checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73"
854+checksum = "47aa80447ce4daf1717500037052af176af5d38cc3e571d9ec1c7353fc10c87d"
908dependencies = [
855dependencies = [
909− "rand_core",
856+ "proc-macro2",
910]
857]
911
858
912[[package]]
859[[package]]
913name = "redox_syscall"
860name = "redox_syscall"
914−version = "0.2.8"
861+version = "0.2.10"
915source = "registry+https://github.com/rust-lang/crates.io-index"
862source = "registry+https://github.com/rust-lang/crates.io-index"
916−checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc"
863+checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff"
917dependencies = [
864dependencies = [
918 "bitflags",
865 "bitflags",
919]
866]
@@ -930,9 +877,9 @@ dependencies = [
930
877
931[[package]]
878[[package]]
932name = "regex"
879name = "regex"
933−version = "1.5.4"
880+version = "1.5.5"
934source = "registry+https://github.com/rust-lang/crates.io-index"
881source = "registry+https://github.com/rust-lang/crates.io-index"
935−checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
882+checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286"
936dependencies = [
883dependencies = [
937 "aho-corasick",
884 "aho-corasick",
938 "memchr",
885 "memchr",
@@ -941,12 +888,9 @@ dependencies = [
941
888
942[[package]]
889[[package]]
943name = "regex-automata"
890name = "regex-automata"
944−version = "0.1.9"
891+version = "0.1.10"
945source = "registry+https://github.com/rust-lang/crates.io-index"
892source = "registry+https://github.com/rust-lang/crates.io-index"
946−checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4"
893+checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
947−dependencies = [
948− "byteorder",
949−]
950
894
951[[package]]
895[[package]]
952name = "regex-syntax"
896name = "regex-syntax"
@@ -963,11 +907,26 @@ dependencies = [
963 "winapi",
907 "winapi",
964]
908]
965
909
910+[[package]]
911+name = "rgb"
912+version = "0.8.31"
913+source = "registry+https://github.com/rust-lang/crates.io-index"
914+checksum = "9a374af9a0e5fdcdd98c1c7b64f05004f9ea2555b6c75f211daa81268a3c50f1"
915+dependencies = [
916+ "bytemuck",
917+]
918+
919+[[package]]
920+name = "rustversion"
921+version = "1.0.6"
922+source = "registry+https://github.com/rust-lang/crates.io-index"
923+checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f"
924+
966[[package]]
925[[package]]
967name = "ryu"
926name = "ryu"
968−version = "1.0.5"
927+version = "1.0.9"
969source = "registry+https://github.com/rust-lang/crates.io-index"
928source = "registry+https://github.com/rust-lang/crates.io-index"
970−checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
929+checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
971
930
972[[package]]
931[[package]]
973name = "safemem"
932name = "safemem"
@@ -992,24 +951,24 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
992
951
993[[package]]
952[[package]]
994name = "semver"
953name = "semver"
995−version = "1.0.4"
954+version = "1.0.7"
996source = "registry+https://github.com/rust-lang/crates.io-index"
955source = "registry+https://github.com/rust-lang/crates.io-index"
997−checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012"
956+checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4"
998
957
999[[package]]
958[[package]]
1000name = "serde"
959name = "serde"
1001−version = "1.0.127"
960+version = "1.0.136"
1002source = "registry+https://github.com/rust-lang/crates.io-index"
961source = "registry+https://github.com/rust-lang/crates.io-index"
1003−checksum = "f03b9878abf6d14e6779d3f24f07b2cfa90352cfec4acc5aab8f1ac7f146fae8"
962+checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"
1004dependencies = [
963dependencies = [
1005 "serde_derive",
964 "serde_derive",
1006]
965]
1007
966
1008[[package]]
967[[package]]
1009name = "serde_derive"
968name = "serde_derive"
1010−version = "1.0.127"
969+version = "1.0.136"
1011source = "registry+https://github.com/rust-lang/crates.io-index"
970source = "registry+https://github.com/rust-lang/crates.io-index"
1012−checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc"
971+checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9"
1013dependencies = [
972dependencies = [
1014 "proc-macro2",
973 "proc-macro2",
1015 "quote",
974 "quote",
@@ -1018,32 +977,32 @@ dependencies = [
1018
977
1019[[package]]
978[[package]]
1020name = "serde_json"
979name = "serde_json"
1021−version = "1.0.64"
980+version = "1.0.74"
1022source = "registry+https://github.com/rust-lang/crates.io-index"
981source = "registry+https://github.com/rust-lang/crates.io-index"
1023−checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79"
982+checksum = "ee2bb9cd061c5865d345bb02ca49fcef1391741b672b54a0bf7b679badec3142"
1024dependencies = [
983dependencies = [
1025− "itoa",
984+ "itoa 1.0.1",
1026 "ryu",
985 "ryu",
1027 "serde",
986 "serde",
1028]
987]
1029
988
1030[[package]]
989[[package]]
1031name = "serde_yaml"
990name = "serde_yaml"
1032−version = "0.8.17"
991+version = "0.8.23"
1033source = "registry+https://github.com/rust-lang/crates.io-index"
992source = "registry+https://github.com/rust-lang/crates.io-index"
1034−checksum = "15654ed4ab61726bf918a39cb8d98a2e2995b002387807fa6ba58fdf7f59bb23"
993+checksum = "a4a521f2940385c165a24ee286aa8599633d162077a54bdcae2a6fd5a7bfa7a0"
1035dependencies = [
994dependencies = [
1036− "dtoa",
995+ "indexmap",
1037− "linked-hash-map",
996+ "ryu",
1038 "serde",
997 "serde",
1039 "yaml-rust",
998 "yaml-rust",
1040]
999]
1041
1000
1042[[package]]
1001[[package]]
1043name = "serial_test"
1002name = "serial_test"
1044−version = "0.5.1"
1003+version = "0.6.0"
1045source = "registry+https://github.com/rust-lang/crates.io-index"
1004source = "registry+https://github.com/rust-lang/crates.io-index"
1046−checksum = "e0bccbcf40c8938196944a3da0e133e031a33f4d6b72db3bda3cc556e361905d"
1005+checksum = "e5bcc41d18f7a1d50525d080fd3e953be87c4f9f1a974f3c21798ca00d54ec15"
1047dependencies = [
1006dependencies = [
1048 "lazy_static",
1007 "lazy_static",
1049 "parking_lot",
1008 "parking_lot",
@@ -1052,12 +1011,14 @@ dependencies = [
1052
1011
1053[[package]]
1012[[package]]
1054name = "serial_test_derive"
1013name = "serial_test_derive"
1055−version = "0.5.1"
1014+version = "0.6.0"
1056source = "registry+https://github.com/rust-lang/crates.io-index"
1015source = "registry+https://github.com/rust-lang/crates.io-index"
1057−checksum = "b2acd6defeddb41eb60bb468f8825d0cfd0c2a76bc03bfd235b6a1dc4f6a1ad5"
1016+checksum = "2881bccd7d60fb32dfa3d7b3136385312f8ad75e2674aab2852867a09790cae8"
1058dependencies = [
1017dependencies = [
1018+ "proc-macro-error",
1059 "proc-macro2",
1019 "proc-macro2",
1060 "quote",
1020 "quote",
1021+ "rustversion",
1061 "syn",
1022 "syn",
1062]
1023]
1063
1024
@@ -1069,15 +1030,15 @@ checksum = "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f"
1069
1030
1070[[package]]
1031[[package]]
1071name = "shell-words"
1032name = "shell-words"
1072−version = "1.0.0"
1033+version = "1.1.0"
1073source = "registry+https://github.com/rust-lang/crates.io-index"
1034source = "registry+https://github.com/rust-lang/crates.io-index"
1074−checksum = "b6fa3938c99da4914afedd13bf3d79bcb6c277d1b2c398d23257a304d9e1b074"
1035+checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
1075
1036
1076[[package]]
1037[[package]]
1077name = "smallvec"
1038name = "smallvec"
1078−version = "1.6.1"
1039+version = "1.7.0"
1079source = "registry+https://github.com/rust-lang/crates.io-index"
1040source = "registry+https://github.com/rust-lang/crates.io-index"
1080−checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
1041+checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309"
1081
1042
1082[[package]]
1043[[package]]
1083name = "std_prelude"
1044name = "std_prelude"
@@ -1093,9 +1054,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
1093
1054
1094[[package]]
1055[[package]]
1095name = "syn"
1056name = "syn"
1096−version = "1.0.72"
1057+version = "1.0.85"
1097source = "registry+https://github.com/rust-lang/crates.io-index"
1058source = "registry+https://github.com/rust-lang/crates.io-index"
1098−checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82"
1059+checksum = "a684ac3dcd8913827e18cd09a68384ee66c1de24157e3c556c9ab16d85695fb7"
1099dependencies = [
1060dependencies = [
1100 "proc-macro2",
1061 "proc-macro2",
1101 "quote",
1062 "quote",
@@ -1104,9 +1065,9 @@ dependencies = [
1104
1065
1105[[package]]
1066[[package]]
1106name = "syntect"
1067name = "syntect"
1107−version = "4.6.0"
1068+version = "5.0.0"
1108source = "registry+https://github.com/rust-lang/crates.io-index"
1069source = "registry+https://github.com/rust-lang/crates.io-index"
1109−checksum = "8b20815bbe80ee0be06e6957450a841185fcf690fe0178f14d77a05ce2caa031"
1070+checksum = "c6c454c27d9d7d9a84c7803aaa3c50cd088d2906fe3c6e42da3209aa623576a8"
1110dependencies = [
1071dependencies = [
1111 "bincode",
1072 "bincode",
1112 "bitflags",
1073 "bitflags",
@@ -1114,22 +1075,23 @@ dependencies = [
1114 "flate2",
1075 "flate2",
1115 "fnv",
1076 "fnv",
1116 "lazy_static",
1077 "lazy_static",
1117− "lazycell",
1078+ "once_cell",
1118 "onig",
1079 "onig",
1119 "plist",
1080 "plist",
1120 "regex-syntax",
1081 "regex-syntax",
1121 "serde",
1082 "serde",
1122 "serde_derive",
1083 "serde_derive",
1123 "serde_json",
1084 "serde_json",
1085+ "thiserror",
1124 "walkdir",
1086 "walkdir",
1125 "yaml-rust",
1087 "yaml-rust",
1126]
1088]
1127
1089
1128[[package]]
1090[[package]]
1129name = "sys-info"
1091name = "sys-info"
1130−version = "0.9.0"
1092+version = "0.9.1"
1131source = "registry+https://github.com/rust-lang/crates.io-index"
1093source = "registry+https://github.com/rust-lang/crates.io-index"
1132−checksum = "33fcecee49339531cf6bd84ecf3ed94f9c8ef4a7e700f2a1cac9cc1ca485383a"
1094+checksum = "0b3a0d0aba8bf96a0e1ddfdc352fc53b3df7f39318c71854910c3c4b024ae52c"
1133dependencies = [
1095dependencies = [
1134 "cc",
1096 "cc",
1135 "libc",
1097 "libc",
@@ -1137,13 +1099,13 @@ dependencies = [
1137
1099
1138[[package]]
1100[[package]]
1139name = "tempfile"
1101name = "tempfile"
1140−version = "3.2.0"
1102+version = "3.3.0"
1141source = "registry+https://github.com/rust-lang/crates.io-index"
1103source = "registry+https://github.com/rust-lang/crates.io-index"
1142−checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22"
1104+checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
1143dependencies = [
1105dependencies = [
1144 "cfg-if",
1106 "cfg-if",
1107+ "fastrand",
1145 "libc",
1108 "libc",
1146− "rand",
1147 "redox_syscall",
1109 "redox_syscall",
1148 "remove_dir_all",
1110 "remove_dir_all",
1149 "winapi",
1111 "winapi",
@@ -1170,14 +1132,20 @@ dependencies = [
1170
1132
1171[[package]]
1133[[package]]
1172name = "terminal_size"
1134name = "terminal_size"
1173−version = "0.1.16"
1135+version = "0.1.17"
1174source = "registry+https://github.com/rust-lang/crates.io-index"
1136source = "registry+https://github.com/rust-lang/crates.io-index"
1175−checksum = "86ca8ced750734db02076f44132d802af0b33b09942331f4459dde8636fd2406"
1137+checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df"
1176dependencies = [
1138dependencies = [
1177 "libc",
1139 "libc",
1178 "winapi",
1140 "winapi",
1179]
1141]
1180
1142
1143+[[package]]
1144+name = "termtree"
1145+version = "0.2.3"
1146+source = "registry+https://github.com/rust-lang/crates.io-index"
1147+checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16"
1148+
1181[[package]]
1149[[package]]
1182name = "textwrap"
1150name = "textwrap"
1183version = "0.11.0"
1151version = "0.11.0"
@@ -1188,11 +1156,41 @@ dependencies = [
1188 "unicode-width",
1156 "unicode-width",
1189]
1157]
1190
1158
1159+[[package]]
1160+name = "thiserror"
1161+version = "1.0.31"
1162+source = "registry+https://github.com/rust-lang/crates.io-index"
1163+checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a"
1164+dependencies = [
1165+ "thiserror-impl",
1166+]
1167+
1168+[[package]]
1169+name = "thiserror-impl"
1170+version = "1.0.31"
1171+source = "registry+https://github.com/rust-lang/crates.io-index"
1172+checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a"
1173+dependencies = [
1174+ "proc-macro2",
1175+ "quote",
1176+ "syn",
1177+]
1178+
1179+[[package]]
1180+name = "time"
1181+version = "0.3.5"
1182+source = "registry+https://github.com/rust-lang/crates.io-index"
1183+checksum = "41effe7cfa8af36f439fac33861b66b049edc6f9a32331e2312660529c1c24ad"
1184+dependencies = [
1185+ "itoa 0.4.8",
1186+ "libc",
1187+]
1188+
1191[[package]]
1189[[package]]
1192name = "tinyvec"
1190name = "tinyvec"
1193−version = "1.2.0"
1191+version = "1.5.1"
1194source = "registry+https://github.com/rust-lang/crates.io-index"
1192source = "registry+https://github.com/rust-lang/crates.io-index"
1195−checksum = "5b5220f05bb7de7f3f53c7c065e1199b3172696fe2db9f9c4d8ad9b4ee74c342"
1193+checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2"
1196dependencies = [
1194dependencies = [
1197 "tinyvec_macros",
1195 "tinyvec_macros",
1198]
1196]
@@ -1203,35 +1201,26 @@ version = "0.1.0"
1203source = "registry+https://github.com/rust-lang/crates.io-index"
1201source = "registry+https://github.com/rust-lang/crates.io-index"
1204checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
1202checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
1205
1203
1206−[[package]]
1207−name = "treeline"
1208−version = "0.1.0"
1209−source = "registry+https://github.com/rust-lang/crates.io-index"
1210−checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41"
1211−
1212[[package]]
1204[[package]]
1213name = "unicode-bidi"
1205name = "unicode-bidi"
1214−version = "0.3.5"
1206+version = "0.3.7"
1215source = "registry+https://github.com/rust-lang/crates.io-index"
1207source = "registry+https://github.com/rust-lang/crates.io-index"
1216−checksum = "eeb8be209bb1c96b7c177c7420d26e04eccacb0eeae6b980e35fcb74678107e0"
1208+checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f"
1217−dependencies = [
1218− "matches",
1219−]
1220
1209
1221[[package]]
1210[[package]]
1222name = "unicode-normalization"
1211name = "unicode-normalization"
1223−version = "0.1.17"
1212+version = "0.1.19"
1224source = "registry+https://github.com/rust-lang/crates.io-index"
1213source = "registry+https://github.com/rust-lang/crates.io-index"
1225−checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef"
1214+checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9"
1226dependencies = [
1215dependencies = [
1227 "tinyvec",
1216 "tinyvec",
1228]
1217]
1229
1218
1230[[package]]
1219[[package]]
1231name = "unicode-width"
1220name = "unicode-width"
1232−version = "0.1.8"
1221+version = "0.1.9"
1233source = "registry+https://github.com/rust-lang/crates.io-index"
1222source = "registry+https://github.com/rust-lang/crates.io-index"
1234−checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
1223+checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
1235
1224
1236[[package]]
1225[[package]]
1237name = "unicode-xid"
1226name = "unicode-xid"
@@ -1253,9 +1242,9 @@ dependencies = [
1253
1242
1254[[package]]
1243[[package]]
1255name = "vcpkg"
1244name = "vcpkg"
1256−version = "0.2.12"
1245+version = "0.2.15"
1257source = "registry+https://github.com/rust-lang/crates.io-index"
1246source = "registry+https://github.com/rust-lang/crates.io-index"
1258−checksum = "cbdbff6266a24120518560b5dc983096efb98462e51d0d68169895b237be3e5d"
1247+checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
1259
1248
1260[[package]]
1249[[package]]
1261name = "vec_map"
1250name = "vec_map"
@@ -1265,9 +1254,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
1265
1254
1266[[package]]
1255[[package]]
1267name = "version_check"
1256name = "version_check"
1268−version = "0.9.3"
1257+version = "0.9.4"
1269source = "registry+https://github.com/rust-lang/crates.io-index"
1258source = "registry+https://github.com/rust-lang/crates.io-index"
1270−checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe"
1259+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
1271
1260
1272[[package]]
1261[[package]]
1273name = "wait-timeout"
1262name = "wait-timeout"
@@ -1337,9 +1326,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1337
1326
1338[[package]]
1327[[package]]
1339name = "xml-rs"
1328name = "xml-rs"
1340−version = "0.8.3"
1329+version = "0.8.4"
1341source = "registry+https://github.com/rust-lang/crates.io-index"
1330source = "registry+https://github.com/rust-lang/crates.io-index"
1342−checksum = "b07db065a5cf61a7e4ba64f29e67db906fb1787316516c4e6e5ff0fea1efcd8a"
1331+checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3"
1343
1332
1344[[package]]
1333[[package]]
1345name = "yaml-rust"
1334name = "yaml-rust"
Cargo.toml+35−27
@@ -6,7 +6,7 @@ homepage = "https://github.com/sharkdp/bat"
6license = "MIT/Apache-2.0"
6license = "MIT/Apache-2.0"
7name = "bat"
7name = "bat"
8repository = "https://github.com/sharkdp/bat"
8repository = "https://github.com/sharkdp/bat"
9−version = "0.18.2"
9+version = "0.21.0"
10exclude = ["assets/syntaxes/*", "assets/themes/*"]
10exclude = ["assets/syntaxes/*", "assets/themes/*"]
11build = "build.rs"
11build = "build.rs"
12edition = '2018'
12edition = '2018'
@@ -16,17 +16,24 @@ default = ["application"]
16# Feature required for bat the application. Should be disabled when depending on
16# Feature required for bat the application. Should be disabled when depending on
17# bat as a library.
17# bat as a library.
18application = [
18application = [
19+ "bugreport",
20+ "build-assets",
21+ "git",
22+ "minimal-application",
23+]
24+# Mainly for developers that want to iterate quickly
25+# Be aware that the included features might change in the future
26+minimal-application = [
19 "atty",
27 "atty",
20 "clap",
28 "clap",
21 "dirs-next",
29 "dirs-next",
22− "git",
23− "lazy_static",
24 "paging",
30 "paging",
25− "wild",
26 "regex-onig",
31 "regex-onig",
32+ "wild",
27]
33]
28git = ["git2"] # Support indicating git modifications
34git = ["git2"] # Support indicating git modifications
29−paging = ["shell-words"] # Support applying a pager on the output
35+paging = ["shell-words", "grep-cli"] # Support applying a pager on the output
36+build-assets = ["syntect/yaml-load", "syntect/plist-load", "regex", "walkdir"]
30
37
31# You need to use one of these if you depend on bat as a library:
38# You need to use one of these if you depend on bat as a library:
32regex-onig = ["syntect/regex-onig"] # Use the "oniguruma" regex engine
39regex-onig = ["syntect/regex-onig"] # Use the "oniguruma" regex engine
@@ -35,57 +42,58 @@ regex-fancy = ["syntect/regex-fancy"] # Use the rust-only "fancy-regex" engine
35[dependencies]
42[dependencies]
36atty = { version = "0.2.14", optional = true }
43atty = { version = "0.2.14", optional = true }
37ansi_term = "^0.12.1"
44ansi_term = "^0.12.1"
38−ansi_colours = "^1.0"
45+ansi_colours = "^1.1"
46+bincode = "1.0"
39−console = "0.14.1"
47+console = "0.15.0"
40−lazy_static = { version = "1.4", optional = true }
48+flate2 = "1.0"
41−lazycell = "1.0"
49+once_cell = "1.10"
50+thiserror = "1.0"
42wild = { version = "2.0", optional = true }
51wild = { version = "2.0", optional = true }
43content_inspector = "0.2.4"
52content_inspector = "0.2.4"
44encoding = "0.2"
53encoding = "0.2"
45−shell-words = { version = "1.0.0", optional = true }
54+shell-words = { version = "1.1.0", optional = true }
46−unicode-width = "0.1.8"
55+unicode-width = "0.1.9"
47globset = "0.4"
56globset = "0.4"
48serde = { version = "1.0", features = ["derive"] }
57serde = { version = "1.0", features = ["derive"] }
49serde_yaml = "0.8"
58serde_yaml = "0.8"
50semver = "1.0"
59semver = "1.0"
51path_abs = { version = "0.5", default-features = false }
60path_abs = { version = "0.5", default-features = false }
52clircle = "0.3"
61clircle = "0.3"
53−bugreport = "0.4"
62+bugreport = { version = "0.5.0", optional = true }
54dirs-next = { version = "2.0.0", optional = true }
63dirs-next = { version = "2.0.0", optional = true }
55−grep-cli = "0.1.6"
64+grep-cli = { version = "0.1.6", optional = true }
65+regex = { version = "1.5.5", optional = true }
66+walkdir = { version = "2.0", optional = true }
67+bytesize = { version = "1.1.0" }
56
68
57[dependencies.git2]
69[dependencies.git2]
58−version = "0.13"
70+version = "0.14"
59optional = true
71optional = true
60default-features = false
72default-features = false
61
73
62[dependencies.syntect]
74[dependencies.syntect]
63−version = "4.6.0"
75+version = "5.0.0"
64default-features = false
76default-features = false
65−features = ["parsing", "yaml-load", "dump-load", "dump-create"]
77+features = ["parsing"]
66
78
67[dependencies.clap]
79[dependencies.clap]
68−version = "2.33"
80+version = "2.34"
69optional = true
81optional = true
70default-features = false
82default-features = false
71features = ["suggestions", "color", "wrap_help"]
83features = ["suggestions", "color", "wrap_help"]
72
84
73−[dependencies.error-chain]
74−version = "0.12"
75−default-features = false
76−
77[dev-dependencies]
85[dev-dependencies]
78−assert_cmd = "1.0.8"
86+assert_cmd = "2.0.4"
79−serial_test = "0.5.1"
87+serial_test = "0.6.0"
80−predicates = "2.0.1"
88+predicates = "2.1.1"
81wait-timeout = "0.2.0"
89wait-timeout = "0.2.0"
82−tempfile = "3.2.0"
90+tempfile = "3.3.0"
83
91
84[target.'cfg(unix)'.dev-dependencies]
92[target.'cfg(unix)'.dev-dependencies]
85−nix = "0.22.0"
93+nix = { version = "0.24.1", default-features = false, features = ["term"] }
86
94
87[build-dependencies]
95[build-dependencies]
88−clap = { version = "2.33", optional = true }
96+clap = { version = "2.34", optional = true }
89
97
90[profile.release]
98[profile.release]
91lto = true
99lto = true
NOTICEnew file+6
@@ -0,0 +1,6 @@
1+Copyright (c) 2018-2021 bat-developers (https://github.com/sharkdp/bat).
2+
3+bat is made available under the terms of either the MIT License or the Apache
4+License 2.0, at your option.
5+
6+See the LICENSE-APACHE and LICENSE-MIT files for license details.
README.md+79−16
@@ -12,9 +12,26 @@
12 <a href="#installation">Installation</a> •
12 <a href="#installation">Installation</a> •
13 <a href="#customization">Customization</a> •
13 <a href="#customization">Customization</a> •
14 <a href="#project-goals-and-alternatives">Project goals, alternatives</a><br>
14 <a href="#project-goals-and-alternatives">Project goals, alternatives</a><br>
15+ [English]
16+ [<a href="doc/README-zh.md">中文</a>]
17+ [<a href="doc/README-ja.md">日本語</a>]
18+ [<a href="doc/README-ko.md">한국어</a>]
15− [<a href="https://github.com/chinanf-boy/bat-zh">中文</a>] [<a href="doc/README-ja.md">日本語</a>] [<a href="doc/README-ko.md">한국어</a>] [<a href="doc/README-ru.md">Русский</a>]
19+ [<a href="doc/README-ru.md">Русский</a>]
16</p>
20</p>
17
21
22+### Sponsors
23+
24+A special *thank you* goes to our biggest <a href="doc/sponsors.md">sponsors</a>:<br>
25+<a href="https://workos.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=bat&utm_source=github">
26+ <img src="doc/sponsors/workos-logo-white-bg.svg" width="200" alt="WorkOS">
27+ <br>
28+ <strong>Your app, enterprise-ready.</strong>
29+ <br>
30+ <sub>Start selling to enterprise customers with just a few lines of code.</sub>
31+ <br>
32+ <sup>Add Single Sign-On (and more) in minutes instead of months.</sup>
33+</a>
34+
18### Syntax highlighting
35### Syntax highlighting
19
36
20`bat` supports syntax highlighting for a large number of programming and markup
37`bat` supports syntax highlighting for a large number of programming and markup
@@ -38,7 +55,7 @@ characters:
38
55
39### Automatic paging
56### Automatic paging
40
57
41−By default, `bat` pipes its own output to a pager (e.g `less`) if the output is too large for one screen.
58+By default, `bat` pipes its own output to a pager (e.g. `less`) if the output is too large for one screen.
42If you would rather `bat` work like `cat` all the time (never page output), you can set `--paging=never` as an option, either on the command line or in your configuration file.
59If you would rather `bat` work like `cat` all the time (never page output), you can set `--paging=never` as an option, either on the command line or in your configuration file.
43If you intend to alias `cat` to `bat` in your shell configuration, you can use `alias cat='bat --paging=never'` to preserve the default behavior.
60If you intend to alias `cat` to `bat` in your shell configuration, you can use `alias cat='bat --paging=never'` to preserve the default behavior.
44
61
@@ -99,19 +116,23 @@ bat f - g # output 'f', then stdin, then 'g'.
99You can use `bat` as a previewer for [`fzf`](https://github.com/junegunn/fzf). To do this,
116You can use `bat` as a previewer for [`fzf`](https://github.com/junegunn/fzf). To do this,
100use `bat`s `--color=always` option to force colorized output. You can also use `--line-range`
117use `bat`s `--color=always` option to force colorized output. You can also use `--line-range`
101option to restrict the load times for long files:
118option to restrict the load times for long files:
119+
102```bash
120```bash
103fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'
121fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'
104```
122```
123+
105−For more information, see [`fzf`s `README`](https://github.com/junegunn/fzf#preview-window).
124+For more information, see [`fzf`'s `README`](https://github.com/junegunn/fzf#preview-window).
106
125
107#### `find` or `fd`
126#### `find` or `fd`
108
127
109You can use the `-exec` option of `find` to preview all search results with `bat`:
128You can use the `-exec` option of `find` to preview all search results with `bat`:
129+
110```bash
130```bash
111find … -exec bat {} +
131find … -exec bat {} +
112```
132```
113
133
114If you happen to use [`fd`](https://github.com/sharkdp/fd), you can use the `-X`/`--exec-batch` option to do the same:
134If you happen to use [`fd`](https://github.com/sharkdp/fd), you can use the `-X`/`--exec-batch` option to do the same:
135+
115```bash
136```bash
116fd … -X bat
137fd … -X bat
117```
138```
@@ -127,9 +148,11 @@ batgrep needle src/
127#### `tail -f`
148#### `tail -f`
128
149
129`bat` can be combined with `tail -f` to continuously monitor a given file with syntax highlighting.
150`bat` can be combined with `tail -f` to continuously monitor a given file with syntax highlighting.
151+
130```bash
152```bash
131tail -f /var/log/pacman.log | bat --paging=never -l log
153tail -f /var/log/pacman.log | bat --paging=never -l log
132```
154```
155+
133Note that we have to switch off paging in order for this to work. We have also specified the syntax
156Note that we have to switch off paging in order for this to work. We have also specified the syntax
134explicitly (`-l log`), as it can not be auto-detected in this case.
157explicitly (`-l log`), as it can not be auto-detected in this case.
135
158
@@ -137,6 +160,7 @@ explicitly (`-l log`), as it can not be auto-detected in this case.
137
160
138You can combine `bat` with `git show` to view an older version of a given file with proper syntax
161You can combine `bat` with `git show` to view an older version of a given file with proper syntax
139highlighting:
162highlighting:
163+
140```bash
164```bash
141git show v0.6.0:src/main.rs | bat -l rs
165git show v0.6.0:src/main.rs | bat -l rs
142```
166```
@@ -147,7 +171,7 @@ You can combine `bat` with `git diff` to view lines around code changes with pro
147highlighting:
171highlighting:
148```bash
172```bash
149batdiff() {
173batdiff() {
150− git diff --name-only --diff-filter=d | xargs bat --diff
174+ git diff --name-only --relative --diff-filter=d | xargs bat --diff
151}
175}
152```
176```
153If you prefer to use this as a separate tool, check out `batdiff` in [`bat-extras`](https://github.com/eth-p/bat-extras).
177If you prefer to use this as a separate tool, check out `batdiff` in [`bat-extras`](https://github.com/eth-p/bat-extras).
@@ -173,7 +197,7 @@ bat main.cpp | xclip
173export MANPAGER="sh -c 'col -bx | bat -l man -p'"
197export MANPAGER="sh -c 'col -bx | bat -l man -p'"
174man 2 select
198man 2 select
175```
199```
176−(replace `bat` by `batcat` if you are on Debian or Ubuntu)
200+(replace `bat` with `batcat` if you are on Debian or Ubuntu)
177
201
178It might also be necessary to set `MANROFFOPT="-c"` if you experience
202It might also be necessary to set `MANROFFOPT="-c"` if you experience
179formatting problems.
203formatting problems.
@@ -188,6 +212,24 @@ Also, note that this will [not work](https://github.com/sharkdp/bat/issues/1145)
188
212
189The [`prettybat`](https://github.com/eth-p/bat-extras/blob/master/doc/prettybat.md) script is a wrapper that will format code and print it with `bat`.
213The [`prettybat`](https://github.com/eth-p/bat-extras/blob/master/doc/prettybat.md) script is a wrapper that will format code and print it with `bat`.
190
214
215+#### Highlighting `--help` messages
216+
217+You can use `bat` to colorize help text: `$ cp --help | bat -plhelp`
218+
219+You can also use a wrapper around this:
220+
221+```bash
222+# in your .bashrc/.zshrc/*rc
223+alias bathelp='bat --plain --language=help'
224+help() {
225+ "$@" --help 2>&1 | bathelp
226+}
227+```
228+
229+Then you can do `$ help cp` or `$ help git commit`.
230+
231+Please report any issues with the help syntax in [this repository](https://github.com/victor-gp/cmd-help-sublime-syntax).
232+
191
233
192## Installation
234## Installation
193
235
@@ -196,15 +238,12 @@ The [`prettybat`](https://github.com/eth-p/bat-extras/blob/master/doc/prettybat.
196### On Ubuntu (using `apt`)
238### On Ubuntu (using `apt`)
197*... and other Debian-based Linux distributions.*
239*... and other Debian-based Linux distributions.*
198
240
199−`bat` is making its way through the [Ubuntu](https://packages.ubuntu.com/eoan/bat) and
241+`bat` is available on [Ubuntu since 20.04 ("Focal")](https://packages.ubuntu.com/search?keywords=bat&exact=1) and [Debian since August 2021 (Debian 11 - "Bullseye")](https://packages.debian.org/bullseye/bat).
200−[Debian](https://packages.debian.org/testing/bat) package release process, and is available
201−for Ubuntu as of Eoan 19.10. On Debian `bat` is currently available on the unstable
202−"Sid" branch and on the testing branch.
203
242
204If your Ubuntu/Debian installation is new enough you can simply run:
243If your Ubuntu/Debian installation is new enough you can simply run:
205
244
206```bash
245```bash
207−apt install bat
246+sudo apt install bat
208```
247```
209
248
210**Important**: If you install `bat` this way, please note that the executable may be installed as `batcat` instead of `bat` (due to [a name
249**Important**: If you install `bat` this way, please note that the executable may be installed as `batcat` instead of `bat` (due to [a name
@@ -222,7 +261,7 @@ the most recent release of `bat`, download the latest `.deb` package from the
222[release page](https://github.com/sharkdp/bat/releases) and install it via:
261[release page](https://github.com/sharkdp/bat/releases) and install it via:
223
262
224```bash
263```bash
225−sudo dpkg -i bat_0.18.2_amd64.deb # adapt version number and architecture
264+sudo dpkg -i bat_0.18.3_amd64.deb # adapt version number and architecture
226```
265```
227
266
228### On Alpine Linux
267### On Alpine Linux
@@ -251,6 +290,14 @@ You can install [the `bat` package](https://koji.fedoraproject.org/koji/packagei
251dnf install bat
290dnf install bat
252```
291```
253
292
293+### On Funtoo Linux
294+
295+You can install [the `bat` package](https://github.com/funtoo/dev-kit/tree/1.4-release/sys-apps/bat) from dev-kit.
296+
297+```bash
298+emerge sys-apps/bat
299+```
300+
254### On Gentoo Linux
301### On Gentoo Linux
255
302
256You can install [the `bat` package](https://packages.gentoo.org/packages/sys-apps/bat)
303You can install [the `bat` package](https://packages.gentoo.org/packages/sys-apps/bat)
@@ -289,6 +336,14 @@ cd /usr/ports/textproc/bat
289make install
336make install
290```
337```
291
338
339+### On OpenBSD
340+
341+You can install `bat` package using [`pkg_add(1)`](https://man.openbsd.org/pkg_add.1):
342+
343+```bash
344+pkg_add bat
345+```
346+
292### Via nix
347### Via nix
293
348
294You can install `bat` using the [nix package manager](https://nixos.org/nix):
349You can install `bat` using the [nix package manager](https://nixos.org/nix):
@@ -363,7 +418,7 @@ binaries are also available: look for archives with `musl` in the file name.
363
418
364### From source
419### From source
365
420
366−If you want to build `bat` from source, you need Rust 1.45 or
421+If you want to build `bat` from source, you need Rust 1.51 or
367higher. You can then use `cargo` to build everything:
422higher. You can then use `cargo` to build everything:
368
423
369```bash
424```bash
@@ -491,8 +546,9 @@ command line option. The option takes an argument of the form `pattern:syntax` w
491the absolute file path. The `syntax` part is the full name of a supported language
546the absolute file path. The `syntax` part is the full name of a supported language
492(use `bat --list-languages` for an overview).
547(use `bat --list-languages` for an overview).
493
548
494−Note: You probably want to use this option as an entry in `bat`s configuration file instead
549+**Note:** You probably want to use this option as [an entry in `bat`'s configuration file](#configuration-file)
495−of passing it on the command line (see below).
550+for persistence instead of passing it on the command line as a one-off. Generally
551+you'd just use `-l` if you want to manually specify a language for a file.
496
552
497Example: To use "INI" syntax highlighting for all files with a `.conf` file extension, use
553Example: To use "INI" syntax highlighting for all files with a `.conf` file extension, use
498```bash
554```bash
@@ -568,7 +624,7 @@ alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /de
568
624
569`bat` can also be customized with a configuration file. The location of the file is dependent
625`bat` can also be customized with a configuration file. The location of the file is dependent
570on your operating system. To get the default path for your system, call
626on your operating system. To get the default path for your system, call
571−```
627+```bash
572bat --config-file
628bat --config-file
573```
629```
574
630
@@ -598,7 +654,7 @@ Example configuration file:
598# Use italic text on the terminal (not supported on all terminals)
654# Use italic text on the terminal (not supported on all terminals)
599--italic-text=always
655--italic-text=always
600
656
601−# Use C++ syntax for .ino files
657+# Use C++ syntax for Arduino .ino files
602--map-syntax "*.ino:C++"
658--map-syntax "*.ino:C++"
603```
659```
604
660
@@ -650,6 +706,13 @@ bat() {
650
706
651## Troubleshooting
707## Troubleshooting
652
708
709+### Garbled output
710+
711+If an input file contains color codes or other ANSI escape sequences or control characters, `bat` will have problems
712+performing syntax highlighting and text wrapping, and thus the output can become garbled.
713+When displaying such files it is recommended to disable both syntax highlighting and wrapping by
714+passing the `--color=never --wrap=never` options to `bat`.
715+
653### Terminals & colors
716### Terminals & colors
654
717
655`bat` handles terminals *with* and *without* truecolor support. However, the colors in most syntax
718`bat` handles terminals *with* and *without* truecolor support. However, the colors in most syntax
assets/acknowledgements.binnew file

Binary file not shown.

assets/completions/_bat.ps1.innew file+92
@@ -0,0 +1,92 @@
1+
2+using namespace System.Management.Automation
3+using namespace System.Management.Automation.Language
4+
5+Register-ArgumentCompleter -Native -CommandName '{{PROJECT_EXECUTABLE}}' -ScriptBlock {
6+ param($wordToComplete, $commandAst, $cursorPosition)
7+
8+ $commandElements = $commandAst.CommandElements
9+ $command = @(
10+ '{{PROJECT_EXECUTABLE}}'
11+ for ($i = 1; $i -lt $commandElements.Count; $i++) {
12+ $element = $commandElements[$i]
13+ if ($element -isnot [StringConstantExpressionAst] -or
14+ $element.StringConstantType -ne [StringConstantType]::BareWord -or
15+ $element.Value.StartsWith('-')) {
16+ break
17+ }
18+ $element.Value
19+ }) -join ';'
20+
21+ $completions = @(switch ($command) {
22+ '{{PROJECT_EXECUTABLE}}' {
23+ [CompletionResult]::new('-l', 'l', [CompletionResultType]::ParameterName, 'Set the language for syntax highlighting.')
24+ [CompletionResult]::new('--language', 'language', [CompletionResultType]::ParameterName, 'Set the language for syntax highlighting.')
25+ [CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Highlight lines N through M.')
26+ [CompletionResult]::new('--highlight-line', 'highlight-line', [CompletionResultType]::ParameterName, 'Highlight lines N through M.')
27+ [CompletionResult]::new('--file-name', 'file-name', [CompletionResultType]::ParameterName, 'Specify the name to display for a file.')
28+ [CompletionResult]::new('--diff-context', 'diff-context', [CompletionResultType]::ParameterName, 'diff-context')
29+ [CompletionResult]::new('--tabs', 'tabs', [CompletionResultType]::ParameterName, 'Set the tab width to T spaces.')
30+ [CompletionResult]::new('--wrap', 'wrap', [CompletionResultType]::ParameterName, 'Specify the text-wrapping mode (*auto*, never, character).')
31+ [CompletionResult]::new('--terminal-width', 'terminal-width', [CompletionResultType]::ParameterName, 'Explicitly set the width of the terminal instead of determining it automatically. If prefixed with ''+'' or ''-'', the value will be treated as an offset to the actual terminal width. See also: ''--wrap''.')
32+ [CompletionResult]::new('--color', 'color', [CompletionResultType]::ParameterName, 'When to use colors (*auto*, never, always).')
33+ [CompletionResult]::new('--italic-text', 'italic-text', [CompletionResultType]::ParameterName, 'Use italics in output (always, *never*)')
34+ [CompletionResult]::new('--decorations', 'decorations', [CompletionResultType]::ParameterName, 'When to show the decorations (*auto*, never, always).')
35+ [CompletionResult]::new('--paging', 'paging', [CompletionResultType]::ParameterName, 'Specify when to use the pager, or use `-P` to disable (*auto*, never, always).')
36+ [CompletionResult]::new('--pager', 'pager', [CompletionResultType]::ParameterName, 'Determine which pager to use.')
37+ [CompletionResult]::new('-m', 'm', [CompletionResultType]::ParameterName, 'Use the specified syntax for files matching the glob pattern (''*.cpp:C++'').')
38+ [CompletionResult]::new('--map-syntax', 'map-syntax', [CompletionResultType]::ParameterName, 'Use the specified syntax for files matching the glob pattern (''*.cpp:C++'').')
39+ [CompletionResult]::new('--theme', 'theme', [CompletionResultType]::ParameterName, 'Set the color theme for syntax highlighting.')
40+ [CompletionResult]::new('--style', 'style', [CompletionResultType]::ParameterName, 'Comma-separated list of style elements to display (*default*, auto, full, plain, changes, header, header-filename, header-filesize, grid, rule, numbers, snip).')
41+ [CompletionResult]::new('-r', 'r', [CompletionResultType]::ParameterName, 'Only print the lines from N to M.')
42+ [CompletionResult]::new('--line-range', 'line-range', [CompletionResultType]::ParameterName, 'Only print the lines from N to M.')
43+ [CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Show non-printable characters (space, tab, newline, ..).')
44+ [CompletionResult]::new('--show-all', 'show-all', [CompletionResultType]::ParameterName, 'Show non-printable characters (space, tab, newline, ..).')
45+ [CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'Show plain style (alias for ''--style=plain'').')
46+ [CompletionResult]::new('--plain', 'plain', [CompletionResultType]::ParameterName, 'Show plain style (alias for ''--style=plain'').')
47+ [CompletionResult]::new('-d', 'd', [CompletionResultType]::ParameterName, 'Only show lines that have been added/removed/modified.')
48+ [CompletionResult]::new('--diff', 'diff', [CompletionResultType]::ParameterName, 'Only show lines that have been added/removed/modified.')
49+ [CompletionResult]::new('-n', 'n', [CompletionResultType]::ParameterName, 'Show line numbers (alias for ''--style=numbers'').')
50+ [CompletionResult]::new('--number', 'number', [CompletionResultType]::ParameterName, 'Show line numbers (alias for ''--style=numbers'').')
51+ [CompletionResult]::new('-f', 'f', [CompletionResultType]::ParameterName, 'f')
52+ [CompletionResult]::new('--force-colorization', 'force-colorization', [CompletionResultType]::ParameterName, 'force-colorization')
53+ [CompletionResult]::new('-P', 'P', [CompletionResultType]::ParameterName, 'Alias for ''--paging=never''')
54+ [CompletionResult]::new('--no-paging', 'no-paging', [CompletionResultType]::ParameterName, 'Alias for ''--paging=never''')
55+ [CompletionResult]::new('--list-themes', 'list-themes', [CompletionResultType]::ParameterName, 'Display all supported highlighting themes.')
56+ [CompletionResult]::new('-L', 'L', [CompletionResultType]::ParameterName, 'Display all supported languages.')
57+ [CompletionResult]::new('--list-languages', 'list-languages', [CompletionResultType]::ParameterName, 'Display all supported languages.')
58+ [CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'u')
59+ [CompletionResult]::new('--unbuffered', 'unbuffered', [CompletionResultType]::ParameterName, 'unbuffered')
60+ [CompletionResult]::new('--no-config', 'no-config', [CompletionResultType]::ParameterName, 'Do not use the configuration file')
61+ [CompletionResult]::new('--no-custom-assets', 'no-custom-assets', [CompletionResultType]::ParameterName, 'Do not load custom assets')
62+ [CompletionResult]::new('--config-file', 'config-file', [CompletionResultType]::ParameterName, 'Show path to the configuration file.')
63+ [CompletionResult]::new('--generate-config-file', 'generate-config-file', [CompletionResultType]::ParameterName, 'Generates a default configuration file.')
64+ [CompletionResult]::new('--config-dir', 'config-dir', [CompletionResultType]::ParameterName, 'Show bat''s configuration directory.')
65+ [CompletionResult]::new('--cache-dir', 'cache-dir', [CompletionResultType]::ParameterName, 'Show bat''s cache directory.')
66+ [CompletionResult]::new('--diagnostic', 'diagnostic', [CompletionResultType]::ParameterName, 'Show diagnostic information for bug reports.')
67+ [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print this help message.')
68+ [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print this help message.')
69+ [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Show version information.')
70+ [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Show version information.')
71+ [CompletionResult]::new('cache', 'cache', [CompletionResultType]::ParameterValue, 'Modify the syntax-definition and theme cache')
72+ break
73+ }
74+ '{{PROJECT_EXECUTABLE}};cache' {
75+ [CompletionResult]::new('--source', 'source', [CompletionResultType]::ParameterName, 'Use a different directory to load syntaxes and themes from.')
76+ [CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'Use a different directory to store the cached syntax and theme set.')
77+ [CompletionResult]::new('-b', 'b', [CompletionResultType]::ParameterName, 'Initialize (or update) the syntax/theme cache.')
78+ [CompletionResult]::new('--build', 'build', [CompletionResultType]::ParameterName, 'Initialize (or update) the syntax/theme cache.')
79+ [CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Remove the cached syntax definitions and themes.')
80+ [CompletionResult]::new('--clear', 'clear', [CompletionResultType]::ParameterName, 'Remove the cached syntax definitions and themes.')
81+ [CompletionResult]::new('--blank', 'blank', [CompletionResultType]::ParameterName, 'Create completely new syntax and theme sets (instead of appending to the default sets).')
82+ [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
83+ [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
84+ [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
85+ [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
86+ break
87+ }
88+ })
89+
90+ $completions.Where{ $_.CompletionText -like "$wordToComplete*" } |
91+ Sort-Object -Property ListItemText
92+}
assets/completions/bat.bash.in+15−2
@@ -2,9 +2,22 @@
2
2
3# Requires https://github.com/scop/bash-completion
3# Requires https://github.com/scop/bash-completion
4
4
5+# Macs have bash3 for which the bash-completion package doesn't include
6+# _init_completion. This is a minimal version of that function.
7+__bat_init_completion()
8+{
9+ COMPREPLY=()
10+ _get_comp_words_by_ref "$@" cur prev words cword
11+}
12+
5_bat() {
13_bat() {
6− local cur prev words cword split
14+ local cur prev words cword split=false
15+ if declare -F _init_completion >/dev/null 2>&1; then
7− _init_completion -s || return 0
16+ _init_completion -s || return 0
17+ else
18+ __bat_init_completion -n "=" || return 0
19+ _split_longopt && split=true
20+ fi
8
21
9 if [[ ${words[1]-} == cache ]]; then
22 if [[ ${words[1]-} == cache ]]; then
10 case $prev in
23 case $prev in
assets/completions/bat.fish.in+2−2
@@ -34,7 +34,7 @@ complete -c {{PROJECT_EXECUTABLE}} -s H -l highlight-line -x -d "<N> Highlight t
34
34
35complete -c {{PROJECT_EXECUTABLE}} -l italic-text -xka "always never" -d "Specify when to use ANSI sequences for italic text (default: never)" -n "not __fish_seen_subcommand_from cache"
35complete -c {{PROJECT_EXECUTABLE}} -l italic-text -xka "always never" -d "Specify when to use ANSI sequences for italic text (default: never)" -n "not __fish_seen_subcommand_from cache"
36
36
37−complete -c {{PROJECT_EXECUTABLE}} -s l -l language -d "Set the language for syntax highlighting" -n "not __fish_seen_subcommand_from cache" -xa "(__{{PROJECT_EXECUTABLE}}_autocomplete_languages)"
37+complete -c {{PROJECT_EXECUTABLE}} -s l -l language -d "Set the language for syntax highlighting" -n "not __fish_seen_subcommand_from cache" -xa "(__{{PROJECT_EXECUTABLE}}_autocomplete_languages)"
38
38
39complete -c {{PROJECT_EXECUTABLE}} -s r -l line-range -x -d "<N:M> Only print the specified range of lines for each file" -n "not __fish_seen_subcommand_from cache"
39complete -c {{PROJECT_EXECUTABLE}} -s r -l line-range -x -d "<N:M> Only print the specified range of lines for each file" -n "not __fish_seen_subcommand_from cache"
40
40
@@ -56,7 +56,7 @@ complete -c {{PROJECT_EXECUTABLE}} -s P -d "Disable paging. Alias for '--paging=
56
56
57complete -c {{PROJECT_EXECUTABLE}} -s A -l show-all -d "Show non-printable characters like space/tab/newline" -n "not __fish_seen_subcommand_from cache"
57complete -c {{PROJECT_EXECUTABLE}} -s A -l show-all -d "Show non-printable characters like space/tab/newline" -n "not __fish_seen_subcommand_from cache"
58
58
59−complete -c {{PROJECT_EXECUTABLE}} -l style -xka "auto full plain changes header grid numbers" -d "Comma-separated list of style elements or presets to display with file contents" -n "not __fish_seen_subcommand_from cache"
59+complete -c {{PROJECT_EXECUTABLE}} -l style -xka "default auto full plain changes header header-filename header-filesize grid rule numbers snip" -d "Comma-separated list of style elements or presets to display with file contents" -n "not __fish_seen_subcommand_from cache"
60
60
61complete -c {{PROJECT_EXECUTABLE}} -l tabs -x -d "<T> Set the tab width to T spaces (width of 0 passes tabs through directly)" -n "not __fish_seen_subcommand_from cache"
61complete -c {{PROJECT_EXECUTABLE}} -l tabs -x -d "<T> Set the tab width to T spaces (width of 0 passes tabs through directly)" -n "not __fish_seen_subcommand_from cache"
62
62
assets/completions/bat.zsh.in+1−1
@@ -75,7 +75,7 @@ _{{PROJECT_EXECUTABLE}}_main() {
75 ;;
75 ;;
76
76
77 style)
77 style)
78− _values -s , 'style' auto full plain changes header grid numbers snip
78+ _values -s , 'style' default auto full plain changes header header-filename header-filesize grid rule numbers snip
79 ;;
79 ;;
80 esac
80 esac
81}
81}
assets/create.sh+14−8
@@ -5,7 +5,7 @@ ASSET_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5REPO_DIR="$ASSET_DIR/.."
5REPO_DIR="$ASSET_DIR/.."
6
6
7# Ensure submodules are initialized.
7# Ensure submodules are initialized.
8−function update_submodules() {
8+update_submodules() {
9 local submodule
9 local submodule
10 local submodule_prompt=unspecified
10 local submodule_prompt=unspecified
11 local submodule_path
11 local submodule_path
@@ -46,6 +46,7 @@ bat cache --clear
46# - Remove the JavaDoc patch once https://github.com/trishume/syntect/issues/222 has been fixed
46# - Remove the JavaDoc patch once https://github.com/trishume/syntect/issues/222 has been fixed
47# - Remove the C# patch once https://github.com/sublimehq/Packages/pull/2331 has been merged
47# - Remove the C# patch once https://github.com/sublimehq/Packages/pull/2331 has been merged
48
48
49+# Apply patches
49(
50(
50 cd "$ASSET_DIR"
51 cd "$ASSET_DIR"
51 for patch in patches/*.patch; do
52 for patch in patches/*.patch; do
@@ -53,11 +54,16 @@ bat cache --clear
53 done
54 done
54)
55)
55
56
56−bat cache --build --blank --source="$ASSET_DIR" --target="$ASSET_DIR"
57+reverse_patches() {
58+ (
59+ cd "$ASSET_DIR"
60+ for patch in patches/*.patch; do
61+ patch --strip=0 --reverse <"$patch"
62+ done
63+ )
64+}
57
65
58−(
66+# Make sure to always reverse patches, even if the `bat cache` command fails or aborts
59− cd "$ASSET_DIR"
67+trap reverse_patches EXIT
60− for patch in patches/*.patch; do
68+
61− patch --strip=0 --reverse < "$patch"
69+bat cache --build --blank --acknowledgements --source="$ASSET_DIR" --target="$ASSET_DIR"
62− done
63−)
assets/manual/bat.1.in+9−2
@@ -50,6 +50,8 @@ highlights lines 30 to 40
50highlights lines 1 to 40
50highlights lines 1 to 40
51.IP "\-\-highlight\-line 40:"
51.IP "\-\-highlight\-line 40:"
52highlights lines 40 to the end of the file
52highlights lines 40 to the end of the file
53+.IP "\-\-highlight\-line 30:+10"
54+highlights lines 30 to 40
53.RE
55.RE
54.HP
56.HP
55\fB\-\-file\-name\fR <name>...
57\fB\-\-file\-name\fR <name>...
@@ -116,6 +118,8 @@ which pager is used, see the '\-\-pager' option. Possible values: *auto*, never,
116Determine which pager is used. This option will override the PAGER and BAT_PAGER
118Determine which pager is used. This option will override the PAGER and BAT_PAGER
117environment variables. The default pager is 'less'. To control when the pager is used, see
119environment variables. The default pager is 'less'. To control when the pager is used, see
118the '\-\-paging' option. Example: '\-\-pager "less \fB\-RF\fR"'.
120the '\-\-paging' option. Example: '\-\-pager "less \fB\-RF\fR"'.
121+
122+Note: By default, if the pager is set to 'less' (and no command-line options are specified), 'bat' will pass the following command line options to the pager: '-R'/'--RAW-CONTROL-CHARS', '-F'/'--quit-if-one-screen' and '-X'/'--no-init'. The last option ('-X') is only used for 'less' versions older than 530. The '-R' option is needed to interpret ANSI colors correctly. The second option ('-F') instructs less to exit immediately if the output size is smaller than the vertical size of the terminal. This is convenient for small files because you do not have to press 'q' to quit the pager. The third option ('-X') is needed to fix a bug with the '--quit-if-one-screen' feature in old versions of 'less'. Unfortunately, it also breaks mouse-wheel support in 'less'. If you want to enable mouse-wheel scrolling on older versions of 'less', you can pass just '-R' (as in the example above, this will disable the quit-if-one-screen feature). For less 530 or newer, it should work out of the box.
119.HP
123.HP
120\fB\-m\fR, \fB\-\-map\-syntax\fR <glob-pattern:syntax-name>...
124\fB\-m\fR, \fB\-\-map\-syntax\fR <glob-pattern:syntax-name>...
121.IP
125.IP
@@ -142,7 +146,8 @@ Configure which elements (line numbers, file headers, grid borders, Git modifica
142of components to display (e.g. 'numbers,changes,grid') or a pre\-defined style ('full').
146of components to display (e.g. 'numbers,changes,grid') or a pre\-defined style ('full').
143To set a default style, add the '\-\-style=".."' option to the configuration file or
147To set a default style, add the '\-\-style=".."' option to the configuration file or
144export the BAT_STYLE environment variable (e.g.: export BAT_STYLE=".."). Possible
148export the BAT_STYLE environment variable (e.g.: export BAT_STYLE=".."). Possible
145−values: *full*, auto, plain, changes, header, grid, rule, numbers, snip.
149+values: *default*, full, auto, plain, changes, header, header-filename, header-filesize, grid,
150+rule, numbers, snip.
146.HP
151.HP
147\fB\-r\fR, \fB\-\-line\-range\fR <N:M>...
152\fB\-r\fR, \fB\-\-line\-range\fR <N:M>...
148.IP
153.IP
@@ -154,6 +159,8 @@ prints lines 30 to 40
154prints lines 1 to 40
159prints lines 1 to 40
155.IP "\-\-line\-range 40:"
160.IP "\-\-line\-range 40:"
156prints lines 40 to the end of the file
161prints lines 40 to the end of the file
162+.IP "\-\-line\-range 30:+10"
163+prints lines 30 to 40
157.RE
164.RE
158.HP
165.HP
159\fB\-L\fR, \fB\-\-list\-languages\fR
166\fB\-L\fR, \fB\-\-list\-languages\fR
@@ -218,7 +225,7 @@ git clone https://github.com/tellnobody1/sublime-purescript-syntax
218
225
219Once the cache is built, the new language will be visible in `\fB{{PROJECT_EXECUTABLE}} --list-languages\fR`.
226Once the cache is built, the new language will be visible in `\fB{{PROJECT_EXECUTABLE}} --list-languages\fR`.
220.br
227.br
221−If you ever want to remove the custom languages, you can clear the cache with `\fB{{PROJECT_EXECUTABLE}} cache --clear\fR`.
228+If you ever want to remove the custom languages, you can clear the cache with `\fB{{PROJECT_EXECUTABLE}} cache --clear\fR`.
222
229
223.SH "ADDING CUSTOM THEMES"
230.SH "ADDING CUSTOM THEMES"
224Similarly to custom languages, {{PROJECT_EXECUTABLE}} supports Sublime Text \fB.tmTheme\fR themes.
231Similarly to custom languages, {{PROJECT_EXECUTABLE}} supports Sublime Text \fB.tmTheme\fR themes.
assets/patches/MediaWiki.sublime-syntax.patchnew file+13
@@ -0,0 +1,13 @@
1+diff --git syntaxes/02_Extra/MediaWiki/MediawikiNG.sublime-syntax syntaxes/02_Extra/MediaWiki/MediawikiNG.sublime-syntax
2+index f542c9e..8eaf020 100644
3+--- syntaxes/02_Extra/MediaWiki/MediawikiNG.sublime-syntax
4++++ syntaxes/02_Extra/MediaWiki/MediawikiNG.sublime-syntax
5+@@ -1,7 +1,7 @@
6+ %YAML 1.2
7+ ---
8+ # http://www.sublimetext.com/docs/3/syntax.html
9+-name: Mediawiki NG
10++name: MediaWiki
11+ file_extensions: [mediawiki, wikipedia, wiki]
12+ scope: text.html.mediawiki
13+
assets/syntaxes.bin

Binary file not shown.

assets/syntaxes/02_Extra/Dart+1−1

Submodule changed.

assets/syntaxes/02_Extra/Dart.sublime-syntax+85−243
@@ -1,6 +1,6 @@
1%YAML 1.2
1%YAML 1.2
2---
2---
3−# http://www.sublimetext.com/docs/3/syntax.html
3+# http://www.sublimetext.com/docs/syntax.html
4name: Dart
4name: Dart
5file_extensions:
5file_extensions:
6 - dart
6 - dart
@@ -9,7 +9,7 @@ contexts:
9 main:
9 main:
10 - match: ^(#!.*)$
10 - match: ^(#!.*)$
11 scope: meta.preprocessor.script.dart
11 scope: meta.preprocessor.script.dart
12− - match: ^\s*\b(library|import|export|part of|part)\b
12+ - match: ^\w*\b(library|import|part of|part|export)\b
13 captures:
13 captures:
14 0: keyword.other.import.dart
14 0: keyword.other.import.dart
15 push:
15 push:
@@ -19,242 +19,114 @@ contexts:
19 0: punctuation.terminator.dart
19 0: punctuation.terminator.dart
20 pop: true
20 pop: true
21 - include: strings
21 - include: strings
22+ - include: comments
22− - match: \b(as|show|hide|deferred)\b
23+ - match: \b(as|show|hide)\b
23 scope: keyword.other.import.dart
24 scope: keyword.other.import.dart
24 - include: comments
25 - include: comments
25− - include: constants-and-special-vars
26+ - include: punctuation
26 - include: annotations
27 - include: annotations
27− - include: decl-typedef
28− - include: decl-class
29− - include: decl-enum
30− - include: decl-function
31 - include: keywords
28 - include: keywords
29+ - include: constants-and-special-vars
32 - include: strings
30 - include: strings
33 annotations:
31 annotations:
34− - match: '^(?:\s*)((@)([a-zA-Z0-9_]+))'
32+ - match: '@[a-zA-Z]+'
35− captures:
33+ scope: storage.type.annotation.dart
36− 1: annotation.dart
37− 2: entity.name.function.annotation.dart
38− 3: support.type.dart
39 comments:
34 comments:
40 - match: /\*\*/
35 - match: /\*\*/
41 scope: comment.block.empty.dart
36 scope: comment.block.empty.dart
42 captures:
37 captures:
43 0: punctuation.definition.comment.dart
38 0: punctuation.definition.comment.dart
39+ - include: comments-doc-oldschool
40+ - include: comments-doc
44 - include: comments-inline
41 - include: comments-inline
45− comments-inline:
42+ comments-block:
46 - match: /\*
43 - match: /\*
47 push:
44 push:
48 - meta_scope: comment.block.dart
45 - meta_scope: comment.block.dart
49 - match: \*/
46 - match: \*/
50 pop: true
47 pop: true
51− - include: scope:text.dart-doccomments
48+ - include: comments-block
49+ comments-doc:
52− - match: (///)
50+ - match: ///
53− captures:
54− 1: marker.dart
55 push:
51 push:
56− - meta_scope: comment.line.triple-slash.dart
52+ - meta_scope: comment.block.documentation.dart
57− - match: $
53+ - match: .*
58 pop: true
54 pop: true
59− - include: scope:text.dart-doccomments
55+ - include: dartdoc
56+ comments-doc-oldschool:
60− - match: (//)
57+ - match: /\*\*
61− captures:
62− 1: marker.dart
63 push:
58 push:
64− - meta_scope: comment.line.double-slash.dart
59+ - meta_scope: comment.block.documentation.dart
65− - match: $
60+ - match: \*/
66 pop: true
61 pop: true
67− - include: scope:text.dart-doccomments
62+ - include: comments-doc-oldschool
63+ - include: comments-block
64+ - include: dartdoc
65+ comments-inline:
66+ - include: comments-block
67+ - match: ((//).*)$
68+ captures:
69+ 1: comment.line.double-slash.dart
68 constants-and-special-vars:
70 constants-and-special-vars:
69− - match: \b(true|false|null)\b
71+ - match: (?<!\$)\b(true|false|null)\b(?!\$)
70 scope: constant.language.dart
72 scope: constant.language.dart
71− - match: \b(this|super)\b
73+ - match: (?<!\$)\b(this|super)\b(?!\$)
72 scope: variable.language.dart
74 scope: variable.language.dart
73− - match: '\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)\b'
75+ - match: '(?<!\$)\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)\b(?!\$)'
74 scope: constant.numeric.dart
76 scope: constant.numeric.dart
75− decl-class:
77+ - match: '(?<![a-zA-Z0-9_$])([_$]*[A-Z][a-zA-Z0-9_$]*|bool\b|num\b|int\b|double\b|dynamic\b)'
76− - match: \bclass\b
78+ scope: support.class.dart
79+ - match: '([_$]*[a-z][a-zA-Z0-9_$]*)(<|\(|\s+=>)'
77 captures:
80 captures:
78− 0: keyword.control.new.dart
81+ 1: entity.name.function.dart
79− push:
82+ dartdoc:
80− - meta_scope: meta.declaration.class.dart
81− - match: "(?={)"
82− pop: true
83− - include: keywords
84− - match: "[A-Za-z_][A-Za-z0-9_]*"
85− scope: class.name.dart
86− decl-enum:
87− - match: \benum\b
83+ - match: '(\[.*?\])'
88− captures:
89− 0: keyword.declaration.dart
90− push:
91− - meta_scope: meta.declaration.enum.dart
92− - match: "(?={)"
93− pop: true
94− - include: keywords
95− - match: "[A-Za-z_][A-Za-z0-9_]*"
96− scope: enum.name.dart
97− decl-function:
98− - match: ^\s*(?:\b(void|bool|num|int|double|dynamic|var|String|List|Map)\b)\s+(get)\s+(\w+)\s+(?==>)
99− comment: A getter with a primitive return type.
100− scope: meta.declaration.function.dart
101 captures:
84 captures:
102− 1: storage.type.primitive.dart
85+ 0: variable.name.source.dart
103− 2: keyword.declaration.dart
104− 3: function.name.dart
105− - match: ^\s*(?:\b(\w+)\b\s+)?(get)\s+(\w+)\s+(?==>)
106− comment: A getter with a user-defined return type or no return type.
107− scope: meta.declaration.function.dart
108− captures:
109− 1: type.user-defined.dart
110− 2: keyword.declaration.dart
111− 3: function.name.dart
112− - match: ^\s*(set)\s+(\w+)(?=\()
86+ - match: '^ {4,}(?![ \*]).*'
113− comment: A setter.
114− captures:
115− 1: keyword.declaration.dart
116− 2: function.name.dart
117− push:
118− - meta_scope: meta.declaration.function.dart
119− - match: \)
120− pop: true
121− - include: comments-inline
122− - include: decl-function-parameter
123− - include: strings
124− - include: keywords
125− - match: ^\s*(?:\b(void|bool|num|int|double|dynamic|var|String|List|Map)\b)\s+(\w+)(?=\()
126− comment: A function with a primitive return type.
127− captures:
128− 1: storage.type.primitive.dart
129− 2: function.name.dart
130− push:
131− - meta_scope: meta.declaration.function.dart
132− - match: \)
133− pop: true
134− - include: comments-inline
135− - include: decl-function-parameter
136− - include: strings
137− - include: keywords
138− - match: ^\s*(?:\b(return)\b)\s+(\w+)(?=\()
139− comment: A function invocation after 'return'
140− captures:
141− 1: keyword.control.dart
142− 2: function.name.dart
143− push:
144− - meta_scope: meta.invocation.function.dart
145− - match: \)
146− pop: true
147− - include: comments-inline
148− - include: decl-function-parameter
149− - include: strings
150− - include: keywords
151− - match: ^\s*\b(new)\b\s+(\w+)(?=\()
152− comment: A class instantiation after 'new'
153− captures:
154− 1: keyword.declaration.dart
155− 2: function.name.dart
156− push:
157− - meta_scope: meta.invocation.function.dart
158− - match: \)
159− pop: true
160− - include: comments-inline
161− - include: decl-function-parameter
162− - include: strings
163− - include: keywords
164− decl-function-parameter:
165− - include: constants-and-special-vars
166− - match: (?:\b(void|bool|num|int|double|dynamic|var|String|List|Map)\b)\s+(\w+)(?=\()
167− comment: A function with a primitive return type.
168− captures:
169− 1: storage.type.primitive.dart
170− 2: function.name.dart
171− push:
172− - meta_scope: meta.parameter.function.dart
173− - match: \)
174− pop: true
175− - include: decl-function-parameter
176− - include: strings
177− - include: keywords
178− - match: \b(new)\b\s+(\w+)(?=\()
179− comment: A class instantiation after 'new'
180 captures:
87 captures:
181− 1: keyword.declaration.dart
182− 2: function.name.dart
88+ 0: variable.name.source.dart
89+ - match: '```.*?$'
183 push:
90 push:
184− - meta_scope: meta.invocation.function.dart
91+ - meta_content_scope: variable.other.source.dart
185− - match: \)
92+ - match: '```'
186 pop: true
93 pop: true
187− - include: decl-function-parameter
188− - include: strings
189− - include: keywords
190− - match: (?:\b(\w+)\b)\s+(\w+)(?=\()
94+ - match: (`.*?`)
191− comment: A function with a user-defined return type.
192 captures:
95 captures:
193− 1: type.user-defined.dart
96+ 0: variable.other.source.dart
194− 2: function.name.dart
195− push:
196− - meta_scope: meta.parameter.function.dart
197− - match: \)
198− pop: true
199− - include: decl-function-parameter
200− - include: strings
201− - include: keywords
202− - match: (\w+)(?=\()
97+ - match: (`.*?`)
203− comment: A function with no return type.
204 captures:
98 captures:
205− 1: function.name.dart
99+ 0: variable.other.source.dart
206− push:
207− - meta_scope: meta.parameter.function.dart
208− - match: \)
100+ - match: (\* (( ).*))$
209− pop: true
210− - include: decl-function-parameter
211− - include: strings
212− - include: keywords
213− decl-typedef:
214− - match: typedef
215 captures:
101 captures:
216− 0: keyword.control.new.dart
102+ 2: variable.other.source.dart
217− push:
218− - meta_scope: meta.declaration.typedef.dart
219− - match: ;
220− captures:
221− 0: punctuation.terminator.dart
222− pop: true
223− - match: '(?:\b(void|bool|num|int|double|dynamic|var|String|List|Map)\b|([a-zA-Z_][a-zA-Z0-9_]*))\s+([a-zA-Z_][a-zA-Z0-9_]+)'
224− captures:
225− 1: storage.type.primitive.dart
226− 2: typedef.return.dart
227− 3: typedef.name.dart
228− - match: \(
103+ - match: (\* .*)$
229− push:
230− - meta_scope: typedef.params.dart
231− - match: \)
232− pop: true
233− - include: keywords
234 keywords:
104 keywords:
235− - match: \bassert\b
105+ - match: (?<!\$)\bas\b(?!\$)
236− scope: keyword.control.assert.dart
237− - match: \bas\b
238 scope: keyword.cast.dart
106 scope: keyword.cast.dart
239− - match: \b(try|catch|finally|throw|on|rethrow)\b
107+ - match: (?<!\$)\b(try|on|catch|finally|throw|rethrow)\b(?!\$)
240 scope: keyword.control.catch-exception.dart
108 scope: keyword.control.catch-exception.dart
241− - match: \s+\?\s+|\s+:\s+
242− scope: keyword.control.ternary.dart
243− - match: \b(break|case|continue|default|do|else|for|if|in|return|switch|while)\b
109+ - match: (?<!\$)\b(break|case|continue|default|do|else|for|if|in|return|switch|while)\b(?!\$)
244 scope: keyword.control.dart
110 scope: keyword.control.dart
245− - match: \b(async\*|async|await\*|await|yield)\b
111+ - match: (?<!\$)\b(sync(\*)?|async(\*)?|await|yield(\*)?)\b(?!\$)
246− scope: keyword.control.async.dart
112+ scope: keyword.control.dart
113+ - match: (?<!\$)\bassert\b(?!\$)
114+ scope: keyword.control.dart
247− - match: \b(new)\b
115+ - match: (?<!\$)\b(new)\b(?!\$)
248 scope: keyword.control.new.dart
116 scope: keyword.control.new.dart
249− - match: \b(abstract|extends|external|factory|implements|with|interface|get|native|operator|set|typedef)\b
117+ - match: (?<!\$)\b(abstract|class|enum|extends|external|factory|implements|get|mixin|native|operator|set|typedef|with|covariant)\b(?!\$)
250 scope: keyword.declaration.dart
118 scope: keyword.declaration.dart
251− - match: \b(is\!?)\b
119+ - match: (?<!\$)\b(is\!?)\b(?!\$)
252 scope: keyword.operator.dart
120 scope: keyword.operator.dart
121+ - match: '\?|:'
122+ scope: keyword.operator.ternary.dart
253 - match: (<<|>>>?|~|\^|\||&)
123 - match: (<<|>>>?|~|\^|\||&)
254 scope: keyword.operator.bitwise.dart
124 scope: keyword.operator.bitwise.dart
255 - match: ((&|\^|\||<<|>>>?)=)
125 - match: ((&|\^|\||<<|>>>?)=)
256 scope: keyword.operator.assignment.bitwise.dart
126 scope: keyword.operator.assignment.bitwise.dart
257− - match: (===?|!==?|<=?|>=?)
127+ - match: (=>)
128+ scope: keyword.operator.closure.dart
129+ - match: (==|!=|<=?|>=?)
258 scope: keyword.operator.comparison.dart
130 scope: keyword.operator.comparison.dart
259 - match: '(([+*/%-]|\~)=)'
131 - match: '(([+*/%-]|\~)=)'
260 scope: keyword.operator.assignment.arithmetic.dart
132 scope: keyword.operator.assignment.arithmetic.dart
@@ -266,56 +138,22 @@ contexts:
266 scope: keyword.operator.arithmetic.dart
138 scope: keyword.operator.arithmetic.dart
267 - match: (!|&&|\|\|)
139 - match: (!|&&|\|\|)
268 scope: keyword.operator.logical.dart
140 scope: keyword.operator.logical.dart
269− - match: ;
270− scope: punctuation.terminator.dart
271− - match: \b(static|final|const)\b
141+ - match: (?<!\$)\b(static|final|const)\b(?!\$)
272 scope: storage.modifier.dart
142 scope: storage.modifier.dart
273− - match: \b(?:void|bool|num|int|double|dynamic|var|String|List|Map)\b
143+ - match: (?<!\$)\b(?:void|var)\b(?!\$)
274 scope: storage.type.primitive.dart
144 scope: storage.type.primitive.dart
275− regexp:
145+ punctuation:
276− - match: '\\[^''"]'
146+ - match: ','
277− scope: constant.character.escaped.regex.dart
147+ scope: punctuation.comma.dart
278− - match: \(
148+ - match: ;
279− push:
149+ scope: punctuation.terminator.dart
280− - meta_content_scope: meta.capture.regex.dart
281− - match: \)
282− pop: true
283− - match: \?(:|=|!)
284− scope: ignore.capture.regex.dart
285− - match: \*|\+|\?|\.|\|
286− scope: keyword.other.regex.dart
287− - match: \^|\$
288− scope: keyword.other.regex.dart
289 - match: \.
150 - match: \.
290− scope: constant.other.regex.dart
151+ scope: punctuation.dot.dart
291− - match: '\[(\^)?'
292− captures:
293− 1: keyword.other.negation.regex.dart
294− push:
295− - meta_scope: constant.character.range.regex.dart
296− - match: '\]'
297− pop: true
298− - match: '\\[^"'']'
299− scope: constant.character.escaped.regex.dart
300− - match: '\{(?:\d+)?,(?:\d+)?\}'
301− scope: keyword.other.regex.dart
302 string-interp:
152 string-interp:
303− - match: '(\$)(\{)'
153+ - match: '\$((\w+)|\{([^{}]+)\})'
304 captures:
154 captures:
305− 1: keyword.other.dart
306− 2: keyword.other.dart
307− push:
308− - meta_scope: interpolation.dart
309− - meta_content_scope: source.dart
310− - match: '(\})'
311− captures:
312− 1: keyword.other.dart
313− pop: true
314− - include: main
315− - match: (\$)(\w+)
316− captures:
317− 1: keyword.other.dart
318 2: variable.parameter.dart
155 2: variable.parameter.dart
156+ 3: variable.parameter.dart
319 - match: \\.
157 - match: \\.
320 scope: constant.character.escape.dart
158 scope: constant.character.escape.dart
321 strings:
159 strings:
@@ -328,7 +166,7 @@ contexts:
328 - match: (?<!r)'''
166 - match: (?<!r)'''
329 push:
167 push:
330 - meta_scope: string.interpolated.triple.single.dart
168 - meta_scope: string.interpolated.triple.single.dart
331− - match: "'''(?!')"
169+ - match: '''''''(?!'')'
332 pop: true
170 pop: true
333 - include: string-interp
171 - include: string-interp
334 - match: r"""
172 - match: r"""
@@ -339,9 +177,9 @@ contexts:
339 - match: r'''
177 - match: r'''
340 push:
178 push:
341 - meta_scope: string.quoted.triple.single.dart
179 - meta_scope: string.quoted.triple.single.dart
342− - match: "'''(?!')"
180+ - match: '''''''(?!'')'
343 pop: true
181 pop: true
344− - match: (?<!\\|r)"
182+ - match: (?<!\|r)"
345 push:
183 push:
346 - meta_scope: string.interpolated.double.dart
184 - meta_scope: string.interpolated.double.dart
347 - match: '"'
185 - match: '"'
@@ -354,16 +192,20 @@ contexts:
354 - meta_scope: string.quoted.double.dart
192 - meta_scope: string.quoted.double.dart
355 - match: '"'
193 - match: '"'
356 pop: true
194 pop: true
357− - include: regexp
195+ - match: \n
196+ scope: invalid.string.newline
358 - match: (?<!\|r)'
197 - match: (?<!\|r)'
359 push:
198 push:
360 - meta_scope: string.interpolated.single.dart
199 - meta_scope: string.interpolated.single.dart
361 - match: "'"
200 - match: "'"
362 pop: true
201 pop: true
202+ - match: \n
203+ scope: invalid.string.newline
363 - include: string-interp
204 - include: string-interp
364 - match: r'
205 - match: r'
365 push:
206 push:
366 - meta_scope: string.quoted.single.dart
207 - meta_scope: string.quoted.single.dart
367 - match: "'"
208 - match: "'"
368 pop: true
209 pop: true
369− - include: regexp
210+ - match: \n
211+ scope: invalid.string.newline
assets/syntaxes/02_Extra/Fish+1−1

Submodule changed.

assets/syntaxes/02_Extra/GLSL+1−1

Submodule changed.

assets/syntaxes/02_Extra/GraphQL+1−1

Submodule changed.

assets/syntaxes/02_Extra/INI.sublime-syntax+2−2
@@ -5,8 +5,8 @@ name: INI
5file_extensions:
5file_extensions:
6 - ini
6 - ini
7 - INI
7 - INI
8− - inf
8+ - "inf"
9− - INF
9+ - "INF"
10 - reg
10 - reg
11 - REG
11 - REG
12 - lng
12 - lng
assets/syntaxes/02_Extra/Julia+1−1

Submodule changed.

assets/syntaxes/02_Extra/LESS+1−1

Submodule changed.

assets/syntaxes/02_Extra/LiveScriptnew file+1

Submodule changed.

assets/syntaxes/02_Extra/LiveScript.sublime-syntaxnew file+400
@@ -0,0 +1,400 @@
1+%YAML 1.2
2+---
3+# http://www.sublimetext.com/docs/3/syntax.html
4+name: LiveScript
5+comment: "LiveScript Syntax: version 1"
6+file_extensions:
7+ - ls
8+ - Slakefile
9+ - ls.erb
10+first_line_match: ^#!.*\bls
11+scope: source.livescript
12+contexts:
13+ main:
14+ - match: |-
15+ (?x)
16+ !?[~-]{1,2}>\*?
17+ |<[~-]{1,2}!?
18+ |\(\s* (?= instanceof[\s)]|and[\s)]|or[\s)]|is[\s)]|isnt[\s)]|in[\s)]|import[\s)]|import\ all[\s)] |\.|[-+/*%^&<>=|][\b\s)\w$]|\*\*|\%\%)
19+ | (?<=[\s(]instanceof|[\s(]and|[\s(]or|[\s(]is|[\s(]isnt|[\s(]in|[\s(]import|[\s(]import\ all|[\s(]do|\.|\*\*|\%\%|[\b\s(\w$][-+/*%^&<>=|]) \s*\)
20+ scope: storage.type.function.livescript
21+ - match: \/\*
22+ captures:
23+ 0: punctuation.definition.comment.livescript
24+ push:
25+ - meta_scope: comment.block.livescript
26+ - match: \*\/
27+ captures:
28+ 0: punctuation.definition.comment.livescript
29+ pop: true
30+ - match: '@\w*'
31+ scope: storage.type.annotation.livescriptscript
32+ - match: '(#)(?!\{).*$\n?'
33+ scope: comment.line.number-sign.livescript
34+ captures:
35+ 1: punctuation.definition.comment.livescript
36+ - match: '((?:!|~|!~|~!)?function\*?)\s+([$\w\-]*[$\w]+)'
37+ captures:
38+ 1: storage.type.function.livescript
39+ 2: entity.name.function.livescript
40+ - match: (new)\s+(\w+(?:\.\w*)*)
41+ captures:
42+ 1: keyword.operator.new.livescript
43+ 2: entity.name.type.instance.livescript
44+ - match: \b(package|private|protected|public|interface|enum|static)(?!-)\b
45+ scope: keyword.illegal.livescript
46+ - match: "'''"
47+ captures:
48+ 0: punctuation.definition.string.begin.livescript
49+ push:
50+ - meta_scope: string.quoted.heredoc.livescript
51+ - match: "'''"
52+ captures:
53+ 0: punctuation.definition.string.end.livescript
54+ pop: true
55+ - match: '"""'
56+ captures:
57+ 0: punctuation.definition.string.begin.livescript
58+ push:
59+ - meta_scope: string.quoted.double.heredoc.livescript
60+ - match: '"""'
61+ captures:
62+ 0: punctuation.definition.string.end.livescript
63+ pop: true
64+ - match: \\.
65+ scope: constant.character.escape.livescript
66+ - include: interpolated_livescript
67+ - match: "``"
68+ captures:
69+ 0: punctuation.definition.string.begin.livescript
70+ push:
71+ - meta_scope: string.quoted.script.livescript
72+ - match: "``"
73+ captures:
74+ 0: punctuation.definition.string.end.livescript
75+ pop: true
76+ - match: '\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)'
77+ scope: constant.character.escape.livescript
78+ - match: '<\['
79+ push:
80+ - meta_scope: string.array-literal.livescript
81+ - match: '\]>'
82+ pop: true
83+ - match: '/{2}(?![\s=/*+{}?]).*?[^\\]/[igmy]{0,4}(?![a-zA-Z0-9])/{2}'
84+ scope: string.regexp.livescript
85+ - match: '/{2}\n'
86+ push:
87+ - meta_scope: string.regexp.livescript
88+ - match: "/{2}[imgy]{0,4}"
89+ pop: true
90+ - include: embedded_spaced_comment
91+ - include: interpolated_livescript
92+ - match: "/{2}"
93+ push:
94+ - meta_scope: string.regexp.livescript
95+ - match: "/{2}[imgy]{0,4}"
96+ pop: true
97+ - match: '\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)'
98+ scope: constant.character.escape.livescript
99+ - include: interpolated_livescript
100+ - match: '/(?![\s=/*+{}?]).*?[^\\]/[igmy]{0,4}(?![a-zA-Z0-9])'
101+ scope: string.regexp.livescript
102+ - match: |-
103+ (?x)
104+ \b(?<![\.\$\-@])(
105+ instanceof|new|delete|typeof|and|or|is|isnt|not
106+ )(?!\-|\s*:)\b
107+ scope: keyword.operator.livescript
108+ - match: <\||\|>
109+ scope: keyword.operator.livescript
110+ - match: "=>"
111+ scope: keyword.control.livescript
112+ - match: |-
113+ (?x)
114+ \b(?<![\.\$\-@])(?:
115+ return|break|continue|throw
116+ |try|if|while|for|for\s+own|switch|unless|until
117+ |catch|finally|else|nobreak|case|default|fallthrough|when|otherwise|then
118+ |yield
119+ )(?!\-|\s*:)\b
120+ scope: keyword.control.livescript
121+ - match: |-
122+ (?x)
123+ and=|or=|%|&|\^|\*|\/|(?<![a-zA-Z$_])(\-)?\-(?!\-?>)|\+\+|\+|
124+ ~(?!~?>)|==|=|!=|<=|>=|<<=|>>=|
125+ >>>=|<>|<(?!\[)|(?<!\])>|(?<!\w)!(?!([~\-]+)?>)|&&|\.\.(\.)?|\s\.\s|\?|\|\||\:|\*=|(?<!\()/=|%=|\+=|\-=|\.=|&=
126+ |\^=
127+ scope: keyword.operator.livescript
128+ - match: |-
129+ (?x)
130+ \b(?<![\.\$\-@])(?:
131+ function
132+ )(?!\-|\s*:)\b
133+ scope: storage.type.function.livescript
134+ - match: |-
135+ (?x)
136+ \b(?<![\.\$\-@])(?:
137+ this|throw|then|try|typeof!?|til|to
138+ |continue|const|case|catch|class
139+ |in|instanceof|import|import\s+all|implements|if|is
140+ |default|delete|debugger|do
141+ |for|for\s+own|finally|function|from|fallthrough
142+ |super|switch
143+ |else|nobreak|extends|export|eval
144+ |and|arguments
145+ |new|not
146+ |unless|until
147+ |while|with|when
148+ |of|or|otherwise
149+ |let|var|loop
150+ |match
151+ |by|yield
152+ )(?!\-|\s*:)\b
153+ scope: keyword.other.livescript
154+ - match: '([a-zA-Z\$_](?:[\w$.-])*)\s*(?!\::)((:)|(=(?!>)))\s*(?!(\s*!?\s*\(.*\))?\s*(!?[~-]{1,2}>\*?))'
155+ captures:
156+ 1: variable.assignment.livescript
157+ 3: punctuation.separator.key-value, keyword.operator.livescript
158+ 4: keyword.operator.livescript
159+ - match: '(?<=\s|^)([\[\{])(?=.*?[\]\}]\s+[:=])'
160+ captures:
161+ 0: keyword.operator.livescript
162+ push:
163+ - meta_scope: meta.variable.assignment.destructured.livescript
164+ - match: '([\]\}]\s*[:=])'
165+ captures:
166+ 0: keyword.operator.livescript
167+ pop: true
168+ - include: variable_name
169+ - include: instance_variable
170+ - include: single_quoted_string
171+ - include: double_quoted_string
172+ - include: numeric
173+ - match: |-
174+ (?x)
175+ (\s*)
176+ (?=[a-zA-Z\$_])
177+ ([a-zA-Z\$_]([\w$.:-])*)\s*
178+ (?=[:=](\s*!?\s*\(.*\))?\s*(!?[~-]{1,2}>\*?))
179+ scope: meta.function.livescript
180+ captures:
181+ 2: entity.name.function.livescript
182+ 3: entity.name.function.livescript
183+ 4: variable.parameter.function.livescript
184+ 5: storage.type.function.livescript
185+ - match: \b(?<!\.)(true|on|yes)(?!\s*:)\b
186+ scope: constant.language.boolean.true.livescript
187+ - match: \b(?<!\.)(false|off|no)(?!\s*:)\b
188+ scope: constant.language.boolean.false.livescript
189+ - match: \b(?<!\.)(null|void)(?!\s*:)\b
190+ scope: constant.language.null.livescript
191+ - match: \b(?<!\.)(super|this|extends)(?!\s*:)\b
192+ scope: variable.language.livescript
193+ - match: '(class\b)\s+(@?[a-zA-Z$_][\w$.-]*)?(?:\s+(extends)\s+(@?[a-zA-Z$_][\w$.-]*))?'
194+ scope: meta.class.livescript
195+ captures:
196+ 1: storage.type.class.livescript
197+ 2: entity.name.type.class.livescript
198+ 3: keyword.control.inheritance.livescript
199+ 4: entity.other.inherited-class.livescript
200+ - match: \b(debugger|\\)\b
201+ scope: keyword.other.livescript
202+ - match: |-
203+ (?x)\b(
204+ Array|ArrayBuffer|Blob|Boolean|Date|document|event|Function|
205+ Int(8|16|32|64)Array|Math|Map|Number|
206+ Object|Proxy|RegExp|Set|String|WeakMap|
207+ window|Uint(8|16|32|64)Array|XMLHttpRequest
208+ )\b
209+ scope: support.class.livescript
210+ - match: \b(console)\b
211+ scope: entity.name.type.object.livescript
212+ - match: \b(Infinity|NaN|undefined)\b
213+ scope: constant.language.livescript
214+ - match: \;
215+ scope: punctuation.terminator.statement.livescript
216+ - match: ',[ |\t]*'
217+ scope: meta.delimiter.object.comma.livescript
218+ - match: \.
219+ scope: meta.delimiter.method.period.livescript
220+ - match: '\{|\}'
221+ scope: meta.brace.curly.livescript
222+ - match: \(|\)
223+ scope: meta.brace.round.livescript
224+ - match: '\[|\]\s*'
225+ scope: meta.brace.square.livescript
226+ - include: instance_variable
227+ - include: backslash_string
228+ - include: single_quoted_string
229+ - include: double_quoted_string
230+ - include: numeric
231+ - match: '()(@|@@|[$\w\-]*[$\w]+)\s*(`)'
232+ captures:
233+ 1: keyword.operator.livescript
234+ 2: meta.function-call.livescript
235+ 3: keyword.operator.livescript
236+ - match: "`"
237+ scope: keyword.operator.livescript
238+ - match: '()(@|@@|[$\w\-]*[$\w]+)(?:(\??\!)|[(])'
239+ captures:
240+ 1: keyword.operator.livescript
241+ 2: meta.function-call.livescript
242+ 3: keyword.operator.livescript
243+ - match: '(@|@@|[$\w\-]*[$\w]+)(\?)? (?!\s*(((by|of|and|or|with|when|unless|if|is|isnt|else|nobreak|for|from|not in|in|catch|til|to|then|import|extends|implements|instanceof)\b)|[=:.*\/+\-%\^<>][ =)]|[`}%*)]|/(?!.*?/)|&&|[.][^.]|=>|\/ +|\||\|\||\-\-|\+\+|\|>|<|\||$|\n|\#|/\*))'
244+ captures:
245+ 1: meta.function-call.livescript
246+ 2: keyword.operator.livescript
247+ - match: \| _
248+ scope: keyword.control.livescript
249+ - match: '\|(?![.])'
250+ scope: keyword.control.livescript
251+ - match: \|
252+ scope: keyword.operator.livescript
253+ - match: ((?<=console\.)(debug|warn|info|log|error|time(End|-end)|assert))\b
254+ scope: support.function.console.livescript
255+ - match: |-
256+ (?x)\b(
257+ decodeURI(Component)?|encodeURI(Component)?|eval|parse(Float|Int)|require
258+ )\b
259+ scope: support.function.livescript
260+ - match: |-
261+ (?x)(?<![.-])\b(
262+ map|filter|reject|partition|find|each|head|tail|last|initial|empty|
263+ values|keys|length|cons|append|join|reverse|fold(l|r)?1?|unfoldr|
264+ and(List|-list)|or(List|-list)|any|all|unique|sum|product|mean|compact|
265+ concat(Map|-map)?|maximum|minimum|scan(l|r)?1?|replicate|slice|apply|
266+ split(At|-at)?|take(While|-while)?|drop(While|-while)?|span|first|
267+ break(It|-it)|list(ToObj|-to-obj)|obj(ToFunc|-to-func)|
268+ pairs(ToObj|-to-obj)|obj(ToPairs|-to-pairs|ToLists|-to-lists)|
269+ zip(All|-all)?(With|-with)?|compose|curry|partial|flip|fix|
270+ sort(With|-with|By|-by)?|group(By|-by)|break(List|-list|Str|-str)|
271+ difference|intersection|union|average|flatten|chars|unchars|repeat|
272+ lines|unlines|words|unwords|max|min|negate|abs|signum|quot|rem|div|mod|
273+ recip|pi|tau|exp|sqrt|ln|pow|sin|cos|tan|asin|acos|atan|atan2|truncate|
274+ round|ceiling|floor|is(It|-it)NaN|even|odd|gcd|lcm|disabled__id
275+ )\b(?![.-])
276+ comment: |
277+ Generated by DOM query from http://gkz.github.com/prelude-ls/:
278+ [].slice
279+ .call(document.querySelectorAll(".nav-pills li a"))
280+ .map(function(_) {return _.innerText})
281+ .filter(function(_) {return _.trim() !== '})
282+ .slice(2)
283+ .join("|")
284+ scope: support.function.prelude.livescript
285+ - match: '(?x)(?<![.-])\b(that|it|e|_)\b'
286+ scope: support.function.semireserved.livescript
287+ - match: |-
288+ (?x)((?<=(\.|\]|\)))(
289+ apply|call|concat|every|filter|for(Each|-each)|
290+ from|has(Own|-own)(Property|-property)|index(Of|-of)|
291+ is(Prototype|-prototype)(Of|-of)|join|last(Index|-index)(Of|-of)|
292+ map|of|pop|property(Is|-is)(Enumerable|-enumerable)|push|
293+ reduce(Right|-right)?|reverse|shift|slice|some|sort|
294+ splice|to(Locale|-locale)?(String|-string)|unshift|valueOf
295+ ))\b(?!-)
296+ scope: support.function.method.array.livescript
297+ - match: |-
298+ (?x)((?<=Array\.)(
299+ isArray
300+ ))\b
301+ scope: support.function.static.array.livescript
302+ - match: |-
303+ (?x)((?<=Object\.)(
304+ create|define(Propert|-propert)(ies|y)|freeze|
305+ get(Own|-own)(Property|-property)(Descriptors?|Names)|
306+ get(Property|-property)(Descriptor|Names)|getPrototypeOf|
307+ is((Extensible|-extensible)|(Frozen|-frozen)|(Sealed|-sealed))?|
308+ keys|prevent(Extensions|-extensions)|seal
309+ ))\b
310+ scope: support.function.static.object.livescript
311+ - match: |-
312+ (?x)((?<=Math\.)(
313+ abs|acos|acosh|asin|asinh|atan|atan2|atanh|ceil|cos|cosh|exp|expm1|floor|
314+ hypot|log|log10|log1p|log2|max|min|pow|random|round|sign|sin|sinh|sqrt|
315+ tan|tanh|trunc
316+ ))\b
317+ scope: support.function.static.math.livescript
318+ - match: |-
319+ (?x)((?<=Number\.)(
320+ is(Finite|Integer|NaN)|to(Integer|-integer)
321+ ))\b
322+ scope: support.function.static.number.livescript
323+ - match: '[\$\w][\w-]*'
324+ scope: variable.other.livescript
325+ backslash_string:
326+ - match: '\\([\\)\s,\};\]])?'
327+ captures:
328+ 0: string.quoted.single.livescript
329+ push:
330+ - meta_content_scope: string.quoted.single.livescript
331+ - match: '([\\)\s,\};\]])'
332+ captures:
333+ 0: punctuation.definition.string.end.livescript
334+ pop: true
335+ constructor_variable:
336+ - match: '([a-zA-Z$_][\w$-]*)(@{2})([a-zA-Z$_][\w$-]*)?'
337+ scope: variable.other.readwrite.constructor.livescript
338+ double_quoted_string:
339+ - match: '"'
340+ captures:
341+ 0: punctuation.definition.string.begin.livescript
342+ push:
343+ - meta_scope: string.quoted.double.livescript
344+ - match: '"'
345+ captures:
346+ 0: punctuation.definition.string.end.livescript
347+ pop: true
348+ - match: '\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)'
349+ scope: constant.character.escape.livescript
350+ - include: interpolated_livescript
351+ embedded_comment:
352+ - match: (?<!\\)(#).*$\n
353+ scope: comment.line.number-sign.livescript
354+ captures:
355+ 1: punctuation.definition.comment.livescript
356+ embedded_spaced_comment:
357+ - match: (?<!\\)(#\s).*$\n
358+ scope: comment.line.number-sign.livescript
359+ captures:
360+ 1: punctuation.definition.comment.livescript
361+ instance_variable:
362+ - match: '(?<![$\w\-])(@)'
363+ scope: variable.other.readwrite.instance.livescript
364+ interpolated_livescript:
365+ - match: '\#\{'
366+ captures:
367+ 0: punctuation.section.embedded.livescript
368+ push:
369+ - meta_scope: source.livescript.embedded.source
370+ - match: '\}'
371+ captures:
372+ 0: punctuation.section.embedded.livescript
373+ pop: true
374+ - include: main
375+ - match: '\#'
376+ push:
377+ - meta_scope: source.livescript.embedded.source.simple
378+ - match: ""
379+ pop: true
380+ - include: main
381+ numeric:
382+ - match: '(?<![\$@a-zA-Z_])(([0-9]+r[0-9_]+)|((16r|0[xX])[0-9a-fA-F_]+)|([0-9]+(\.[0-9]+[0-9_]*)?(e[+\-]?[0-9_]+)?)[_a-zA-Z0-9]*)'
383+ scope: constant.numeric.livescript
384+ single_quoted_string:
385+ - match: "'"
386+ captures:
387+ 0: punctuation.definition.string.begin.livescript
388+ push:
389+ - meta_scope: string.quoted.single.livescript
390+ - match: "'"
391+ captures:
392+ 0: punctuation.definition.string.end.livescript
393+ pop: true
394+ - match: '\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)'
395+ scope: constant.character.escape.livescript
396+ variable_name:
397+ - match: '([a-zA-Z\$_][\w$-]*(\.\w+)*)(?!\-)'
398+ scope: variable.assignment.livescript
399+ captures:
400+ 1: variable.assignment.livescript
assets/syntaxes/02_Extra/MediaWikinew file+1

Submodule changed.

assets/syntaxes/02_Extra/Nginx+1−1

Submodule changed.

assets/syntaxes/02_Extra/Nim.sublime-syntax+1
@@ -5,6 +5,7 @@ name: Nim
5file_extensions:
5file_extensions:
6 - nim
6 - nim
7 - nims
7 - nims
8+ - nimble
8scope: source.nim
9scope: source.nim
9contexts:
10contexts:
10 main:
11 main:
assets/syntaxes/02_Extra/PowerShell+1−1

Submodule changed.

assets/syntaxes/02_Extra/PowerShell.sublime-syntax+58−48
@@ -24,7 +24,7 @@ contexts:
24 - include: commands
24 - include: commands
25 - include: commentLine
25 - include: commentLine
26 - include: variable
26 - include: variable
27− - include: interpolatedStringContent
27+ - include: subexpression
28 - include: function
28 - include: function
29 - include: attribute
29 - include: attribute
30 - include: UsingDirective
30 - include: UsingDirective
@@ -33,32 +33,38 @@ contexts:
33 - include: doubleQuotedString
33 - include: doubleQuotedString
34 - include: scriptblock
34 - include: scriptblock
35 - include: doubleQuotedStringEscapes
35 - include: doubleQuotedStringEscapes
36− - match: (?<!')'
36+ - match: '[''\x{2018}-\x{201B}]'
37 captures:
37 captures:
38 0: punctuation.definition.string.begin.powershell
38 0: punctuation.definition.string.begin.powershell
39 push:
39 push:
40 - meta_scope: string.quoted.single.powershell
40 - meta_scope: string.quoted.single.powershell
41− - match: "'(?!')"
41+ - match: '[''\x{2018}-\x{201B}]{2}'
42+ scope: constant.character.escape.powershell
43+ - match: '[''\x{2018}-\x{201B}]'
42 captures:
44 captures:
43 0: punctuation.definition.string.end.powershell
45 0: punctuation.definition.string.end.powershell
44 pop: true
46 pop: true
45− - match: "''"
46− scope: constant.character.escape.powershell
47− - match: \@"(?=$)
47+ - match: '(@["\x{201C}-\x{201E}])\s*$'
48+ captures:
49+ 1: punctuation.definition.string.begin.powershell
48 push:
50 push:
49 - meta_scope: string.quoted.double.heredoc.powershell
51 - meta_scope: string.quoted.double.heredoc.powershell
50− - match: ^"@
52+ - match: '^["\x{201C}-\x{201E}]@'
53+ captures:
54+ 0: punctuation.definition.string.end.powershell
51 pop: true
55 pop: true
52 - include: variableNoProperty
56 - include: variableNoProperty
53 - include: doubleQuotedStringEscapes
57 - include: doubleQuotedStringEscapes
54 - include: interpolation
58 - include: interpolation
55− - match: \@'(?=$)
59+ - match: '(@[''\x{2018}-\x{201B}])\s*$'
60+ captures:
61+ 1: punctuation.definition.string.begin.powershell
56 push:
62 push:
57 - meta_scope: string.quoted.single.heredoc.powershell
63 - meta_scope: string.quoted.single.heredoc.powershell
58− - match: ^'@
64+ - match: '^[''\x{2018}-\x{201B}]@'
65+ captures:
66+ 0: punctuation.definition.string.end.powershell
59 pop: true
67 pop: true
60− - match: "''"
61− scope: constant.character.escape.powershell
62 - include: numericConstant
68 - include: numericConstant
63 - match: (@)(\()
69 - match: (@)(\()
64 captures:
70 captures:
@@ -71,11 +77,12 @@ contexts:
71 0: punctuation.section.group.end.powershell
77 0: punctuation.section.group.end.powershell
72 pop: true
78 pop: true
73 - include: main
79 - include: main
74− - match: (\$)(\()
80+ - match: ((\$))(\()
75 comment: "TODO: move to repo; make recursive."
81 comment: "TODO: move to repo; make recursive."
76 captures:
82 captures:
77− 1: punctuation.definition.variable.powershell
83+ 1: keyword.other.substatement.powershell
84+ 2: punctuation.definition.subexpression.powershell
78− 2: punctuation.section.group.begin.powershell
85+ 3: punctuation.section.group.begin.powershell
79 push:
86 push:
80 - meta_scope: meta.group.complex.subexpression.powershell
87 - meta_scope: meta.group.complex.subexpression.powershell
81 - match: \)
88 - match: \)
@@ -85,7 +92,7 @@ contexts:
85 - include: main
92 - include: main
86 - match: '(\b(([A-Za-z0-9\-_\.]+)\.(?i:exe|com|cmd|bat))\b)'
93 - match: '(\b(([A-Za-z0-9\-_\.]+)\.(?i:exe|com|cmd|bat))\b)'
87 scope: support.function.powershell
94 scope: support.function.powershell
88− - match: (?<!\w|-|\.)((?i:begin|break|catch|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)
95+ - 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)
89 scope: keyword.control.powershell
96 scope: keyword.control.powershell
90 - match: '(?<!\w|-|[^\)]\.)((?i:(foreach|where)(?!-object))|%|\?)(?!\w)'
97 - match: '(?<!\w|-|[^\)]\.)((?i:(foreach|where)(?!-object))|%|\?)(?!\w)'
91 scope: keyword.control.powershell
98 scope: keyword.control.powershell
@@ -135,7 +142,7 @@ contexts:
135 - meta_scope: meta.requires.powershell
142 - meta_scope: meta.requires.powershell
136 - match: $
143 - match: $
137 pop: true
144 pop: true
138− - match: \-(?i:Modules|PSSnapin|RunAsAdministrator|ShellId|Version)
145+ - match: \-(?i:Modules|PSSnapin|RunAsAdministrator|ShellId|Version|Assembly|PSEdition)
139 scope: keyword.other.powershell
146 scope: keyword.other.powershell
140 - match: '(?<!-)\b\p{L}+|\d+(?:\.\d+)*'
147 - match: '(?<!-)\b\p{L}+|\d+(?:\.\d+)*'
141 scope: variable.parameter.powershell
148 scope: variable.parameter.powershell
@@ -187,51 +194,53 @@ contexts:
187 comment: Builtin cmdlets with reserved verbs
194 comment: Builtin cmdlets with reserved verbs
188 scope: support.function.powershell
195 scope: support.function.powershell
189 commentEmbeddedDocs:
196 commentEmbeddedDocs:
190− - match: ^(?i:(?:\s?|#)+(\.)(COMPONENT|DESCRIPTION|EXAMPLE|EXTERNALHELP|FORWARDHELPCATEGORY|FORWARDHELPTARGETNAME|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|REMOTEHELPRUNSPACE|ROLE|SYNOPSIS))
197+ - match: (?:^|\G)(?i:\s*(\.)(COMPONENT|DESCRIPTION|EXAMPLE|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|ROLE|SYNOPSIS))\s*$
198+ comment: these embedded doc keywords do not support arguments, must be the only thing on the line
191 scope: comment.documentation.embedded.powershell
199 scope: comment.documentation.embedded.powershell
192 captures:
200 captures:
193 1: constant.string.documentation.powershell
201 1: constant.string.documentation.powershell
194 2: keyword.operator.documentation.powershell
202 2: keyword.operator.documentation.powershell
195− - match: '(?i:\s?(\.)(PARAMETER|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP)\s+([a-z0-9-_]+))'
203+ - match: (?:^|\G)(?i:\s*(\.)(EXTERNALHELP|FORWARDHELP(?:CATEGORY|TARGETNAME)|PARAMETER|REMOTEHELPRUNSPACE))\s+(.+?)\s*$
204+ 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
196 scope: comment.documentation.embedded.powershell
205 scope: comment.documentation.embedded.powershell
197 captures:
206 captures:
198 1: constant.string.documentation.powershell
207 1: constant.string.documentation.powershell
199 2: keyword.operator.documentation.powershell
208 2: keyword.operator.documentation.powershell
200 3: keyword.operator.documentation.powershell
209 3: keyword.operator.documentation.powershell
201 commentLine:
210 commentLine:
202− - match: '(?<![`\\-])#'
211+ - match: '(?<![`\\-])(#)#*'
203 captures:
212 captures:
204− 0: punctuation.definition.comment.powershell
213+ 1: punctuation.definition.comment.powershell
205 push:
214 push:
206 - meta_scope: comment.line.powershell
215 - meta_scope: comment.line.powershell
207 - match: $\n?
216 - match: $\n?
208 captures:
217 captures:
209− 0: punctuation.definition.comment.powershell
218+ 1: punctuation.definition.comment.powershell
210 pop: true
219 pop: true
211 - include: commentEmbeddedDocs
220 - include: commentEmbeddedDocs
212 - include: RequiresDirective
221 - include: RequiresDirective
213 doubleQuotedString:
222 doubleQuotedString:
214− - match: (?<!(?<!`)")"
223+ - match: '["\x{201C}-\x{201E}]'
215 captures:
224 captures:
216 0: punctuation.definition.string.begin.powershell
225 0: punctuation.definition.string.begin.powershell
217 push:
226 push:
218 - meta_scope: string.quoted.double.powershell
227 - meta_scope: string.quoted.double.powershell
219− - match: '"(?!")'
220− captures:
221− 0: punctuation.definition.string.end.powershell
222− pop: true
223 - match: '(?i)\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,64}\b'
228 - match: '(?i)\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,64}\b'
224 - include: variableNoProperty
229 - include: variableNoProperty
225 - include: doubleQuotedStringEscapes
230 - include: doubleQuotedStringEscapes
231+ - match: '["\x{201C}-\x{201E}]{2}'
232+ scope: constant.character.escape.powershell
226 - include: interpolation
233 - include: interpolation
227 - match: '`\s*$'
234 - match: '`\s*$'
228 scope: keyword.other.powershell
235 scope: keyword.other.powershell
236+ - match: '["\x{201C}-\x{201E}]'
237+ captures:
238+ 0: punctuation.definition.string.end.powershell
239+ pop: true
229 doubleQuotedStringEscapes:
240 doubleQuotedStringEscapes:
230− - match: '`[`0abefnrtv"''$]'
241+ - match: '`[`0abefnrtv''"\x{2018}-\x{201E}$]'
231 scope: constant.character.escape.powershell
242 scope: constant.character.escape.powershell
232 - include: unicodeEscape
243 - include: unicodeEscape
233− - match: '""'
234− scope: constant.character.escape.powershell
235 function:
244 function:
236 - match: '^(?:\s*+)(?i)(function|filter|configuration|workflow)\s+(?:(global|local|script|private):)?((?:\p{L}|\d|_|-|\.)+)'
245 - match: '^(?:\s*+)(?i)(function|filter|configuration|workflow)\s+(?:(global|local|script|private):)?((?:\p{L}|\d|_|-|\.)+)'
237 captures:
246 captures:
@@ -263,33 +272,23 @@ contexts:
263 4: keyword.operator.assignment.powershell
272 4: keyword.operator.assignment.powershell
264 - include: scriptblock
273 - include: scriptblock
265 - include: main
274 - include: main
266− interpolatedStringContent:
267− - match: \(
268− captures:
269− 0: punctuation.section.group.begin.powershell
270− push:
271− - meta_content_scope: interpolated.simple.source.powershell
272− - match: \)
273− captures:
274− 0: punctuation.section.group.end.powershell
275− pop: true
276− - include: main
277− - include: interpolation
278− - include: interpolatedStringContent
279 interpolation:
275 interpolation:
280− - match: (\$)(\()
276+ - match: (((\$)))((\())
281 captures:
277 captures:
282− 1: punctuation.definition.variable.powershell
278+ 1: keyword.other.substatement.powershell
279+ 2: punctuation.definition.substatement.powershell
280+ 3: punctuation.section.embedded.substatement.begin.powershell
283− 2: punctuation.section.group.begin.powershell
281+ 4: punctuation.section.group.begin.powershell
282+ 5: punctuation.section.embedded.substatement.begin.powershell
284 push:
283 push:
284+ - meta_scope: meta.embedded.substatement.powershell
285 - meta_content_scope: interpolated.complex.source.powershell
285 - meta_content_scope: interpolated.complex.source.powershell
286− - match: \)
286+ - match: (\))
287 captures:
287 captures:
288 0: punctuation.section.group.end.powershell
288 0: punctuation.section.group.end.powershell
289+ 1: punctuation.section.embedded.substatement.end.powershell
289 pop: true
290 pop: true
290 - include: main
291 - include: main
291− - include: interpolation
292− - include: interpolatedStringContent
293 numericConstant:
292 numericConstant:
294 - 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'
293 - 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'
295 captures:
294 captures:
@@ -330,6 +329,17 @@ contexts:
330 0: punctuation.section.braces.end.powershell
329 0: punctuation.section.braces.end.powershell
331 pop: true
330 pop: true
332 - include: main
331 - include: main
332+ subexpression:
333+ - match: \(
334+ captures:
335+ 0: punctuation.section.group.begin.powershell
336+ push:
337+ - meta_scope: meta.group.simple.subexpression.powershell
338+ - match: \)
339+ captures:
340+ 0: punctuation.section.group.end.powershell
341+ pop: true
342+ - include: main
333 type:
343 type:
334 - match: '\['
344 - match: '\['
335 captures:
345 captures:
assets/syntaxes/02_Extra/Racketnew file+1

Submodule changed.

assets/syntaxes/02_Extra/Racket.sublime-syntaxnew file+52
@@ -0,0 +1,52 @@
1+%YAML 1.2
2+---
3+# http://www.sublimetext.com/docs/3/syntax.html
4+name: Racket
5+file_extensions:
6+ - rkt
7+scope: source.racket
8+contexts:
9+ main:
10+ - match: '[^\\](\"[^\"]*\")'
11+ captures:
12+ 1: string.quoted.double.source.racket
13+ - match: '\((define)\s+([a-zA-Z0-9_\-?\+^]+)\s*'
14+ scope: meta.variable.source.racket
15+ captures:
16+ 1: keyword.source.racket
17+ 2: entity.name.variable.source.racket
18+ - match: '\((define)\s+\(([a-zA-Z0-9_\-?\+^]+)\s*'
19+ scope: meta.function.source.racket
20+ captures:
21+ 1: keyword.source.racket
22+ 2: entity.name.function
23+ - match: '\((struct)\s+([a-zA-Z0-9_\-?\+^]+)\s+'
24+ scope: meta.struct.source.racket
25+ captures:
26+ 1: keyword.source.racket
27+ 2: entity.name.type
28+ - match: '[\s\(](if|lambda|cond|define|type-case|let|letrec|let!|\#lang|require|test|else|first|rest|define-type|define-type-alias|define-struct|not|local|error|lang)[\s\)]'
29+ scope: meta.keywords.source.racket
30+ captures:
31+ 1: keyword.source.racket
32+ - match: '[\s\(](true|false|empty|null)[\s\)]'
33+ captures:
34+ 1: constant.language.source.racket
35+ - match: '[\s\(\[\{](#t|#true|#f|#false)[\s\)\]\}]'
36+ captures:
37+ 1: constant.language.source.racket
38+ - match: '(#\\[a-zA-Z0-9_\-?\+\.\!\"]+)'
39+ captures:
40+ 1: constant.language.source.racket
41+ - match: '\b(0|([1-9][0-9_]*))\b'
42+ scope: constant.numeric.integer.source.racket
43+ - match: ;
44+ push:
45+ - meta_scope: comment.line.documentation.source.racket
46+ - match: $\n
47+ pop: true
48+ - match: '#\|'
49+ push:
50+ - meta_scope: comment.block.source.racket
51+ - match: '\|#'
52+ pop: true
assets/syntaxes/02_Extra/SCSS_Sass+1−1

Submodule changed.

assets/syntaxes/02_Extra/Slimnew file+1

Submodule changed.

assets/syntaxes/02_Extra/Slim.sublime-syntaxnew file+306
@@ -0,0 +1,306 @@
1+%YAML 1.2
2+---
3+# http://www.sublimetext.com/docs/syntax.html
4+name: Ruby Slim
5+file_extensions:
6+ - slim
7+ - skim
8+scope: text.slim
9+contexts:
10+ main:
11+ - match: ^(\s*)(ruby):$
12+ captures:
13+ 2: constant.language.name.ruby.filter.slim
14+ push:
15+ - meta_scope: text.ruby.filter.slim
16+ - match: ^(?!(\1\s)|\s*$)
17+ pop: true
18+ - include: scope:source.ruby
19+ - match: ^(\s*)(javascript):$
20+ captures:
21+ 2: constant.language.name.javascript.filter.slim
22+ push:
23+ - meta_scope: source.js.filter.slim
24+ - match: ^(?!(\1\s)|\s*$)
25+ pop: true
26+ - include: scope:source.js
27+ - match: ^(---)\s*\n
28+ captures:
29+ 1: storage.frontmatter.slim
30+ push:
31+ - meta_scope: source.yaml.meta.slim
32+ - match: ^(---)\s*\n
33+ captures:
34+ 1: storage.frontmatter.slim
35+ pop: true
36+ - include: scope:source.yaml
37+ - match: ^(\s*)(coffee):$
38+ captures:
39+ 2: constant.language.name.coffeescript.filter.slim
40+ push:
41+ - meta_scope: text.coffeescript.filter.slim
42+ - match: ^(?!(\1\s)|\s*$)
43+ pop: true
44+ - include: scope:source.coffee
45+ - match: ^(\s*)(markdown):$
46+ captures:
47+ 2: constant.language.name.markdown.filter.slim
48+ push:
49+ - meta_scope: text.markdown.filter.slim
50+ - match: ^(?!(\1\s)|\s*$)
51+ pop: true
52+ - include: scope:text.html.markdown
53+ - match: ^(\s*)(css):$
54+ captures:
55+ 2: constant.language.name.css.filter.slim
56+ push:
57+ - meta_scope: text.css.filter.slim
58+ - match: ^(?!(\1\s)|\s*$)
59+ pop: true
60+ - include: scope:source.css
61+ - match: ^(\s*)(sass):$
62+ captures:
63+ 2: constant.language.name.sass.filter.slim
64+ push:
65+ - meta_scope: text.sass.filter.slim
66+ - match: ^(?!(\1\s)|\s*$)
67+ pop: true
68+ - include: scope:source.sass
69+ - match: ^(\s*)(scss):$
70+ captures:
71+ 2: constant.language.name.scss.filter.slim
72+ push:
73+ - meta_scope: text.scss.filter.slim
74+ - match: ^(?!(\1\s)|\s*$)
75+ pop: true
76+ - include: scope:source.scss
77+ - match: ^(\s*)(less):$
78+ captures:
79+ 2: constant.language.name.less.filter.slim
80+ push:
81+ - meta_scope: text.less.filter.slim
82+ - match: ^(?!(\1\s)|\s*$)
83+ pop: true
84+ - include: scope:source.less
85+ - match: ^(\s*)(erb):$
86+ captures:
87+ 2: constant.language.name.erb.filter.slim
88+ push:
89+ - meta_scope: text.erb.filter.slim
90+ - match: ^(?!(\1\s)|\s*$)
91+ pop: true
92+ - include: scope:source.erb
93+ - match: ^(! )($|\s.*)
94+ scope: meta.prolog.slim
95+ captures:
96+ 1: punctuation.definition.prolog.slim
97+ - match: ^(\s*)(/)\s*.*$
98+ captures:
99+ 2: comment.line.slash.slim
100+ push:
101+ - meta_scope: comment.block.slim
102+ - match: ^(?!(\1\s)|\s*$)
103+ pop: true
104+ - match: ^\s*(?=-)
105+ push:
106+ - match: $
107+ pop: true
108+ - include: rubyline
109+ - match: (?==+|~)
110+ push:
111+ - match: $
112+ pop: true
113+ - include: rubyline
114+ - include: tag-attribute
115+ - include: embedded-ruby
116+ - match: ^(\s*)(\||')\s*
117+ comment: Verbatim text (can include HTML tags and copied lines)
118+ push:
119+ - match: ^(?!(\1\s)|\s*$)
120+ pop: true
121+ - include: scope:text.html.basic
122+ - include: embedded-ruby
123+ - match: '^\s*(\.|#|[-a-zA-Z0-9]+)([\w-]+)?'
124+ comment: '1 - dot OR hash OR any combination of word, number; 2 - OPTIONAL any combination of word, number, dash or underscore (following a . or'
125+ captures:
126+ 1: entity.name.tag.slim
127+ 2: entity.other.attribute-name.event.slim
128+ push:
129+ - meta_scope: meta.tag
130+ - match: '$|(?!\.|#|:|-|~|/|\}|\]|\*|\s?[\*\{])'
131+ captures:
132+ 1: entity.name.tag.slim
133+ 2: entity.other.attribute-name.event.slim
134+ pop: true
135+ - match: '(:[\w\d]+)+'
136+ comment: XML
137+ push:
138+ - meta_scope: entity.name.tag.slim
139+ - match: $|\s
140+ pop: true
141+ - match: '(:\s)(\.|#|[a-zA-Z0-9]+)([\w-]+)?'
142+ comment: Inline HTML / 1 - colon; 2 - dot OR hash OR any combination of word, number; 3 - OPTIONAL any combination of word, number, dash or underscore (following a . or
143+ captures:
144+ 1: punctuation.definition.tag.end.slim
145+ 2: entity.name.tag.slim
146+ 3: entity.other.attribute-name.event.slim
147+ push:
148+ - match: '$|(?!\.|#|=|-|~|/|\}|\]|\*|\s?[\*\{])'
149+ captures:
150+ 1: punctuation.definition.tag.end.slim
151+ 2: entity.name.tag.slim
152+ 3: entity.other.attribute-name.event.slim
153+ pop: true
154+ - include: root-class-id-tag
155+ - include: tag-attribute
156+ - match: '(\*\{)(?=.*\}|.*\|\s*$)'
157+ comment: Splat attributes
158+ captures:
159+ 1: punctuation.section.embedded.ruby
160+ push:
161+ - meta_scope: source.ruby.embedded.slim
162+ - match: '(\})|$|^(?!.*\|\s*$)'
163+ captures:
164+ 1: punctuation.section.embedded.ruby
165+ pop: true
166+ - include: embedded-ruby
167+ - include: root-class-id-tag
168+ - include: rubyline
169+ - match: /
170+ scope: punctuation.terminator.tag.slim
171+ - match: ^\s*(\\.)
172+ captures:
173+ 1: meta.escape.slim
174+ - match: ^\s*(?=\||')
175+ push:
176+ - match: $
177+ pop: true
178+ - include: embedded-ruby
179+ - include: scope:text.html.basic
180+ - match: '(?=<[\w\d\:]+)'
181+ comment: Inline and root-level HTML tags
182+ push:
183+ - match: $|\/\>
184+ pop: true
185+ - include: scope:text.html.basic
186+ continuation:
187+ - match: '([\\,])\s*\n'
188+ captures:
189+ 1: punctuation.separator.continuation.slim
190+ delimited-ruby-a:
191+ - match: '=\('
192+ push:
193+ - meta_scope: source.ruby.embedded.slim
194+ - match: \)(?=( \w|$))
195+ pop: true
196+ - include: scope:source.ruby.rails
197+ delimited-ruby-b:
198+ - match: '=\['
199+ push:
200+ - meta_scope: source.ruby.embedded.slim
201+ - match: '\](?=( \w|$))'
202+ pop: true
203+ - include: scope:source.ruby.rails
204+ delimited-ruby-c:
205+ - match: '=\{'
206+ push:
207+ - meta_scope: source.ruby.embedded.slim
208+ - match: '\}(?=( \w|$))'
209+ pop: true
210+ - include: scope:source.ruby.rails
211+ embedded-ruby:
212+ - match: '(?<!\\)#\{{1,2}'
213+ captures:
214+ 0: punctuation.section.embedded.ruby
215+ push:
216+ - meta_scope: source.ruby.embedded.html
217+ - match: '\}{1,2}'
218+ captures:
219+ 0: punctuation.section.embedded.ruby
220+ pop: true
221+ - include: scope:source.ruby.rails
222+ entities:
223+ - match: '(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)'
224+ scope: constant.character.entity.html
225+ captures:
226+ 1: punctuation.definition.entity.html
227+ 3: punctuation.definition.entity.html
228+ - match: '&'
229+ scope: invalid.illegal.bad-ampersand.html
230+ interpolated-ruby:
231+ - match: '=(?=\b)'
232+ push:
233+ - meta_scope: source.ruby.embedded.html
234+ - match: \s|\w$
235+ pop: true
236+ root-class-id-tag:
237+ - match: '(\.|#)([\w\d\-]+)'
238+ captures:
239+ 1: punctuation.separator.key-value.html
240+ 2: entity.other.attribute-name.html
241+ rubyline:
242+ - match: (==|=)(<>|><|<'|'<|<|>)?|-
243+ comment: Hack to thwart Sublime's Ruby highlighter. It thinks do without a variable continues the next line (this can be muted with a / at the end of the line). For things like yields, do is unnecessary without an argument, so this hack will suffice
244+ push:
245+ - meta_scope: meta.line.ruby.slim
246+ - meta_content_scope: source.ruby.embedded.slim
247+ - match: (do\s*\n$)|(?<!\\|,|,\n|\\\n)$
248+ captures:
249+ 1: keyword.control.start-block.ruby
250+ pop: true
251+ - match: '#.*$'
252+ comment: Hack to let ruby comments work in this context properly
253+ scope: comment.line.number-sign.ruby
254+ - include: continuation
255+ - include: scope:source.ruby.rails
256+ string-double-quoted:
257+ - match: (")(?=.*")
258+ captures:
259+ 0: punctuation.definition.string.begin.html
260+ push:
261+ - meta_scope: string.quoted.double.html
262+ - meta_content_scope: meta.toc-list.id.html
263+ - match: '"'
264+ captures:
265+ 0: punctuation.definition.string.end.html
266+ pop: true
267+ - include: embedded-ruby
268+ - include: entities
269+ string-single-quoted:
270+ - match: (')(?=.*')
271+ captures:
272+ 0: punctuation.definition.string.begin.html
273+ push:
274+ - meta_scope: string.quoted.single.html
275+ - meta_content_scope: meta.toc-list.id.html
276+ - match: "'"
277+ captures:
278+ 0: punctuation.definition.string.end.html
279+ pop: true
280+ - include: embedded-ruby
281+ - include: entities
282+ tag-attribute:
283+ - match: '([\w.#_-]+)(=)(?!\s)(true|false|nil)?(\s*\(|\{)?'
284+ captures:
285+ 1: entity.other.attribute-name.event.slim
286+ 2: punctuation.separator.key-value.html
287+ 3: constant.language.slim
288+ push:
289+ - meta_scope: meta.attribute-with-value.slim
290+ - match: '\}|\)|$'
291+ captures:
292+ 1: entity.other.attribute-name.event.slim
293+ 2: punctuation.separator.key-value.html
294+ 3: constant.language.slim
295+ pop: true
296+ - include: tag-stuff
297+ - include: string-double-quoted
298+ - include: string-single-quoted
299+ tag-stuff:
300+ - include: tag-attribute
301+ - include: interpolated-ruby
302+ - include: delimited-ruby-a
303+ - include: delimited-ruby-b
304+ - include: delimited-ruby-c
305+ - include: rubyline
306+ - include: embedded-ruby
assets/syntaxes/02_Extra/Stylus.sublime-syntax+2−2
@@ -197,7 +197,7 @@ contexts:
197 scope: entity.other.attribute-name.stylus
197 scope: entity.other.attribute-name.stylus
198 - match: |-
198 - match: |-
199 (?x) # multi-line regex definition mode
199 (?x) # multi-line regex definition mode
200− (?<=^|;|{)\s* # starts after begining of line, '{' or ';''
200+ (?<=^|;|{)\s* # starts after beginning of line, '{' or ';''
201 (?= # lookahead for
201 (?= # lookahead for
202 (
202 (
203 [a-zA-Z0-9_-] # then a letter
203 [a-zA-Z0-9_-] # then a letter
@@ -207,7 +207,7 @@ contexts:
207 (/\*.*?\*/) # comment
207 (/\*.*?\*/) # comment
208 )+
208 )+
209
209
210− \s*[:\s]\s* # value is separted by colon or space
210+ \s*[:\s]\s* # value is separated by colon or space
211
211
212 (?!(\s*\{)) # if there are only spaces afterwards
212 (?!(\s*\{)) # if there are only spaces afterwards
213
213
assets/syntaxes/02_Extra/SublimeJQnew file+1

Submodule changed.

assets/syntaxes/02_Extra/TOML+1−1

Submodule changed.

assets/syntaxes/02_Extra/TypeScript+1−1

Submodule changed.

assets/syntaxes/02_Extra/TypeScript.sublime-syntax+206−148
@@ -44,7 +44,7 @@ contexts:
44 - match: (?=$)
44 - match: (?=$)
45 pop: true
45 pop: true
46 access-modifier:
46 access-modifier:
47− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(abstract|public|protected|private|readonly|static|declare)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
47+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(abstract|declare|override|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
48 scope: storage.modifier.ts
48 scope: storage.modifier.ts
49 after-operator-block-as-object-literal:
49 after-operator-block-as-object-literal:
50 - match: '(?<!\+\+|--)(?<=[:=(,\[?+!>]|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^yield|[^\._$[:alnum:]]yield|^throw|[^\._$[:alnum:]]throw|^in|[^\._$[:alnum:]]in|^of|[^\._$[:alnum:]]of|^typeof|[^\._$[:alnum:]]typeof|&&|\|\||\*)\s*(\{)'
50 - match: '(?<!\+\+|--)(?<=[:=(,\[?+!>]|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^yield|[^\._$[:alnum:]]yield|^throw|[^\._$[:alnum:]]throw|^in|[^\._$[:alnum:]]in|^of|[^\._$[:alnum:]]of|^typeof|[^\._$[:alnum:]]typeof|&&|\|\||\*)\s*(\{)'
@@ -106,7 +106,7 @@ contexts:
106 (?=
106 (?=
107 # sure shot arrow functions even if => is on new line
107 # sure shot arrow functions even if => is on new line
108 (
108 (
109− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
109+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
110 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
110 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
111 (
111 (
112 ([)]\s*:) | # ():
112 ([)]\s*:) | # ():
@@ -116,9 +116,9 @@ contexts:
116
116
117 # arrow function possible to detect only with => on same line
117 # arrow function possible to detect only with => on same line
118 (
118 (
119− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
119+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
120− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
120+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
121− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
121+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
122 \s*=> # arrow operator
122 \s*=> # arrow operator
123 )
123 )
124 )
124 )
@@ -268,7 +268,7 @@ contexts:
268 - include: decorator
268 - include: decorator
269 - match: (?<=:)\s*
269 - match: (?<=:)\s*
270 push:
270 push:
271− - match: '(?=\s|[;),}\]:\-\+]|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
271+ - match: '(?=\s|[;),}\]:\-\+]|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
272 pop: true
272 pop: true
273 - include: expression
273 - include: expression
274 - include: method-declaration
274 - include: method-declaration
@@ -317,7 +317,12 @@ contexts:
317 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
317 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
318 scope: keyword.control.loop.ts
318 scope: keyword.control.loop.ts
319 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(return)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
319 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(return)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
320+ captures:
320− scope: keyword.control.flow.ts
321+ 0: keyword.control.flow.ts
322+ push:
323+ - match: '(?=[;}]|$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
324+ pop: true
325+ - include: expression
321 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
326 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
322 scope: keyword.control.switch.ts
327 scope: keyword.control.switch.ts
323 - include: if-statement
328 - include: if-statement
@@ -762,7 +767,7 @@ contexts:
762 4: keyword.control.default.ts
767 4: keyword.control.default.ts
763 push:
768 push:
764 - meta_scope: meta.export.default.ts
769 - meta_scope: meta.export.default.ts
765− - match: (?=$|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))
770+ - match: (?=$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))
766 pop: true
771 pop: true
767 - include: interface-declaration
772 - include: interface-declaration
768 - include: expression
773 - include: expression
@@ -772,7 +777,7 @@ contexts:
772 2: keyword.control.type.ts
777 2: keyword.control.type.ts
773 push:
778 push:
774 - meta_scope: meta.export.ts
779 - meta_scope: meta.export.ts
775− - match: (?=$|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))
780+ - match: (?=$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))
776 pop: true
781 pop: true
777 - include: import-export-declaration
782 - include: import-export-declaration
778 expression:
783 expression:
@@ -785,11 +790,11 @@ contexts:
785 - include: string
790 - include: string
786 - include: decorator
791 - include: decorator
787 - include: destructuring-parameter
792 - include: destructuring-parameter
788− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|protected|private|readonly)\s+(?=(public|protected|private|readonly)\s+)'
793+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|protected|private|readonly)\s+(?=(override|public|protected|private|readonly)\s+)'
789 captures:
794 captures:
790 1: storage.modifier.ts
795 1: storage.modifier.ts
791 - match: |-
796 - match: |-
792− (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*
797+ (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*
793 # function assignment |
798 # function assignment |
794 (=\s*(
799 (=\s*(
795 ((async\s+)?(
800 ((async\s+)?(
@@ -798,10 +803,10 @@ contexts:
798 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
803 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
799 )) |
804 )) |
800 ((async\s*)?(
805 ((async\s*)?(
801− ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
806+ ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
802 # sure shot arrow functions even if => is on new line
807 # sure shot arrow functions even if => is on new line
803 (
808 (
804− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
809+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
805 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
810 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
806 (
811 (
807 ([)]\s*:) | # ():
812 ([)]\s*:) | # ():
@@ -811,9 +816,9 @@ contexts:
811
816
812 # arrow function possible to detect only with => on same line
817 # arrow function possible to detect only with => on same line
813 (
818 (
814− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
819+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
815− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
820+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
816− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
821+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
817 \s*=> # arrow operator
822 \s*=> # arrow operator
818 )
823 )
819 ))
824 ))
@@ -831,18 +836,18 @@ contexts:
831 ))
836 ))
832 )) |
837 )) |
833 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
838 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
834− (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
839+ (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
835− (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
840+ (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
836 ((async\s+)?(
841 ((async\s+)?(
837 (function\s*[(<*]) |
842 (function\s*[(<*]) |
838 (function\s+) |
843 (function\s+) |
839 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
844 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
840 )) |
845 )) |
841 ((async\s*)?(
846 ((async\s*)?(
842− ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
847+ ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
843 # sure shot arrow functions even if => is on new line
848 # sure shot arrow functions even if => is on new line
844 (
849 (
845− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
850+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
846 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
851 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
847 (
852 (
848 ([)]\s*:) | # ():
853 ([)]\s*:) | # ():
@@ -852,9 +857,9 @@ contexts:
852
857
853 # arrow function possible to detect only with => on same line
858 # arrow function possible to detect only with => on same line
854 (
859 (
855− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
860+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
856− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
861+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
857− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
862+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
858 \s*=> # arrow operator
863 \s*=> # arrow operator
859 )
864 )
860 ))
865 ))
@@ -865,7 +870,7 @@ contexts:
865 3: entity.name.function.ts variable.language.this.ts
870 3: entity.name.function.ts variable.language.this.ts
866 4: entity.name.function.ts
871 4: entity.name.function.ts
867 5: keyword.operator.optional.ts
872 5: keyword.operator.optional.ts
868− - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*[:,]|$)'
873+ - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*[:,]|$)'
869 captures:
874 captures:
870 1: storage.modifier.ts
875 1: storage.modifier.ts
871 2: keyword.operator.rest.ts
876 2: keyword.operator.rest.ts
@@ -930,10 +935,11 @@ contexts:
930 scope: keyword.operator.comparison.ts
935 scope: keyword.operator.comparison.ts
931 - match: <=|>=|<>|<|>
936 - match: <=|>=|<>|<|>
932 scope: keyword.operator.relational.ts
937 scope: keyword.operator.relational.ts
933− - match: '(?<=[_$[:alnum:]])(\!)\s*(/)(?![/*])'
938+ - match: '(?<=[_$[:alnum:]])(\!)\s*(?:(/=)|(?:(/)(?![/*])))'
934 captures:
939 captures:
935 1: keyword.operator.logical.ts
940 1: keyword.operator.logical.ts
936− 2: keyword.operator.arithmetic.ts
941+ 2: keyword.operator.assignment.compound.ts
942+ 3: keyword.operator.arithmetic.ts
937 - match: \!|&&|\|\||\?\?
943 - match: \!|&&|\|\||\?\?
938 scope: keyword.operator.logical.ts
944 scope: keyword.operator.logical.ts
939 - match: \&|~|\^|\|
945 - match: \&|~|\^|\|
@@ -946,16 +952,18 @@ contexts:
946 scope: keyword.operator.increment.ts
952 scope: keyword.operator.increment.ts
947 - match: '%|\*|/|-|\+'
953 - match: '%|\*|/|-|\+'
948 scope: keyword.operator.arithmetic.ts
954 scope: keyword.operator.arithmetic.ts
949− - match: '(?<=[_$[:alnum:])\]])\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)+(/)(?![/*]))'
955+ - match: '(?<=[_$[:alnum:])\]])\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)+(?:(/=)|(?:(/)(?![/*]))))'
950 push:
956 push:
951− - match: '(/)(?!\*([^\*]|(\*[^\/]))*\*\/)'
957+ - match: '(?:(/=)|(?:(/)(?!\*([^\*]|(\*[^\/]))*\*\/)))'
952 captures:
958 captures:
953− 1: keyword.operator.arithmetic.ts
959+ 1: keyword.operator.assignment.compound.ts
960+ 2: keyword.operator.arithmetic.ts
954 pop: true
961 pop: true
955 - include: comment
962 - include: comment
956− - match: '(?<=[_$[:alnum:])\]])\s*(/)(?![/*])'
963+ - match: '(?<=[_$[:alnum:])\]])\s*(?:(/=)|(?:(/)(?![/*])))'
957 captures:
964 captures:
958− 1: keyword.operator.arithmetic.ts
965+ 1: keyword.operator.assignment.compound.ts
966+ 2: keyword.operator.arithmetic.ts
959 expressionPunctuations:
967 expressionPunctuations:
960 - include: punctuation-comma
968 - include: punctuation-comma
961 - include: punctuation-accessor
969 - include: punctuation-accessor
@@ -1021,10 +1029,10 @@ contexts:
1021 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1029 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1022 )) |
1030 )) |
1023 ((async\s*)?(
1031 ((async\s*)?(
1024− ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1032+ ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1025 # sure shot arrow functions even if => is on new line
1033 # sure shot arrow functions even if => is on new line
1026 (
1034 (
1027− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1035+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1028 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1036 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1029 (
1037 (
1030 ([)]\s*:) | # ():
1038 ([)]\s*:) | # ():
@@ -1034,9 +1042,9 @@ contexts:
1034
1042
1035 # arrow function possible to detect only with => on same line
1043 # arrow function possible to detect only with => on same line
1036 (
1044 (
1037− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1045+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1038− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1046+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1039− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1047+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1040 \s*=> # arrow operator
1048 \s*=> # arrow operator
1041 )
1049 )
1042 ))
1050 ))
@@ -1054,18 +1062,18 @@ contexts:
1054 ))
1062 ))
1055 )) |
1063 )) |
1056 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
1064 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
1057− (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
1065+ (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
1058− (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
1066+ (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
1059 ((async\s+)?(
1067 ((async\s+)?(
1060 (function\s*[(<*]) |
1068 (function\s*[(<*]) |
1061 (function\s+) |
1069 (function\s+) |
1062 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1070 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1063 )) |
1071 )) |
1064 ((async\s*)?(
1072 ((async\s*)?(
1065− ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1073+ ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1066 # sure shot arrow functions even if => is on new line
1074 # sure shot arrow functions even if => is on new line
1067 (
1075 (
1068− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1076+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1069 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1077 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1070 (
1078 (
1071 ([)]\s*:) | # ():
1079 ([)]\s*:) | # ():
@@ -1075,9 +1083,9 @@ contexts:
1075
1083
1076 # arrow function possible to detect only with => on same line
1084 # arrow function possible to detect only with => on same line
1077 (
1085 (
1078− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1086+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1079− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1087+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1080− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1088+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1081 \s*=> # arrow operator
1089 \s*=> # arrow operator
1082 )
1090 )
1083 ))
1091 ))
@@ -1118,18 +1126,19 @@ contexts:
1118 - include: type-parameters
1126 - include: type-parameters
1119 - include: function-parameters
1127 - include: function-parameters
1120 - include: return-type
1128 - include: return-type
1129+ - include: type-function-return-type
1121 - include: decl-block
1130 - include: decl-block
1122 - match: \*
1131 - match: \*
1123 scope: keyword.generator.asterisk.ts
1132 scope: keyword.generator.asterisk.ts
1124 function-call:
1133 function-call:
1125− - match: '(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))\s*(?:(\?\.\s*)|(\!))?((<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\())'
1134+ - match: '(?=(((([_$[: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*)?\())'
1126 push:
1135 push:
1127− - match: '(?<=\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))\s*(?:(\?\.\s*)|(\!))?((<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\())'
1136+ - match: '(?<=\))(?!(((([_$[: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*)?\())'
1128 pop: true
1137 pop: true
1129 - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))'
1138 - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))'
1130 push:
1139 push:
1131 - meta_scope: meta.function-call.ts
1140 - meta_scope: meta.function-call.ts
1132− - match: '(?=\s*(?:(\?\.\s*)|(\!))?((<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\())'
1141+ - match: '(?=\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*)?\())'
1133 pop: true
1142 pop: true
1134 - include: function-call-target
1143 - include: function-call-target
1135 - include: comment
1144 - include: comment
@@ -1169,7 +1178,7 @@ contexts:
1169 6: meta.definition.function.ts entity.name.function.ts
1178 6: meta.definition.function.ts entity.name.function.ts
1170 push:
1179 push:
1171 - meta_scope: meta.function.ts
1180 - meta_scope: meta.function.ts
1172− - match: '(?=;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|(?<=\})'
1181+ - match: '(?=;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|(?<=\})'
1173 pop: true
1182 pop: true
1174 - include: function-name
1183 - include: function-name
1175 - include: function-body
1184 - include: function-body
@@ -1221,10 +1230,10 @@ contexts:
1221 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1230 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1222 )) |
1231 )) |
1223 ((async\s*)?(
1232 ((async\s*)?(
1224− ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1233+ ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1225 # sure shot arrow functions even if => is on new line
1234 # sure shot arrow functions even if => is on new line
1226 (
1235 (
1227− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1236+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1228 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1237 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1229 (
1238 (
1230 ([)]\s*:) | # ():
1239 ([)]\s*:) | # ():
@@ -1234,9 +1243,9 @@ contexts:
1234
1243
1235 # arrow function possible to detect only with => on same line
1244 # arrow function possible to detect only with => on same line
1236 (
1245 (
1237− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1246+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1238− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1247+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1239− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1248+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1240 \s*=> # arrow operator
1249 \s*=> # arrow operator
1241 )
1250 )
1242 ))
1251 ))
@@ -1260,7 +1269,7 @@ contexts:
1260 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1269 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1261 scope: variable.other.readwrite.ts
1270 scope: variable.other.readwrite.ts
1262 if-statement:
1271 if-statement:
1263− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?=\bif\s*(\(([^\(\)]|(\([^\(\)]*\)))*\))\s*(?!\{))'
1272+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?=\bif\s*(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))\s*(?!\{))'
1264 push:
1273 push:
1265 - match: '(?=;|$|\})'
1274 - match: '(?=;|$|\})'
1266 pop: true
1275 pop: true
@@ -1275,12 +1284,12 @@ contexts:
1275 0: meta.brace.round.ts
1284 0: meta.brace.round.ts
1276 pop: true
1285 pop: true
1277 - include: expression
1286 - include: expression
1278− - match: '(?<=\))\s*\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
1287+ - match: '(?<=\))\s*\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/([dgimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
1279 captures:
1288 captures:
1280 0: punctuation.definition.string.begin.ts
1289 0: punctuation.definition.string.begin.ts
1281 push:
1290 push:
1282 - meta_scope: string.regexp.ts
1291 - meta_scope: string.regexp.ts
1283− - match: "(/)([gimsuy]*)"
1292+ - match: "(/)([dgimsuy]*)"
1284 captures:
1293 captures:
1285 1: punctuation.definition.string.end.ts
1294 1: punctuation.definition.string.end.ts
1286 2: keyword.other.ts
1295 2: keyword.other.ts
@@ -1414,6 +1423,9 @@ contexts:
1414 2: keyword.operator.type.modifier.ts
1423 2: keyword.operator.type.modifier.ts
1415 3: keyword.operator.optional.ts
1424 3: keyword.operator.optional.ts
1416 pop: true
1425 pop: true
1426+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+'
1427+ captures:
1428+ 1: keyword.control.as.ts
1417 - include: type
1429 - include: type
1418 inline-tags:
1430 inline-tags:
1419 - match: '(\[)[^\]]+(\])(?={@(?:link|linkcode|linkplain|tutorial))'
1431 - match: '(\[)[^\]]+(\])(?={@(?:link|linkcode|linkplain|tutorial))'
@@ -1504,25 +1516,27 @@ contexts:
1504 - include: this-literal
1516 - include: this-literal
1505 - include: super-literal
1517 - include: super-literal
1506 method-declaration:
1518 method-declaration:
1507− - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?\s*\b(constructor)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1519+ - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?\s*\b(constructor)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1508 captures:
1520 captures:
1509 1: storage.modifier.ts
1521 1: storage.modifier.ts
1510 2: storage.modifier.ts
1522 2: storage.modifier.ts
1511− 3: storage.modifier.async.ts
1523+ 3: storage.modifier.ts
1512− 4: storage.type.ts
1524+ 4: storage.modifier.async.ts
1525+ 5: storage.type.ts
1513 push:
1526 push:
1514 - meta_scope: meta.method.declaration.ts
1527 - meta_scope: meta.method.declaration.ts
1515 - match: '(?=\}|;|,|$)|(?<=\})'
1528 - match: '(?=\}|;|,|$)|(?<=\})'
1516 pop: true
1529 pop: true
1517 - include: method-declaration-name
1530 - include: method-declaration-name
1518 - include: function-body
1531 - include: function-body
1519− - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:(?:\s*\b(new)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|(?:(\*)\s*)?)(?=\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])'
1532+ - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:(?:\s*\b(new)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|(?:(\*)\s*)?)(?=\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])'
1520 captures:
1533 captures:
1521 1: storage.modifier.ts
1534 1: storage.modifier.ts
1522 2: storage.modifier.ts
1535 2: storage.modifier.ts
1523− 3: storage.modifier.async.ts
1536+ 3: storage.modifier.ts
1537+ 4: storage.modifier.async.ts
1524− 4: keyword.operator.new.ts
1538+ 5: keyword.operator.new.ts
1525− 5: keyword.generator.asterisk.ts
1539+ 6: keyword.generator.asterisk.ts
1526 push:
1540 push:
1527 - meta_scope: meta.method.declaration.ts
1541 - meta_scope: meta.method.declaration.ts
1528 - match: '(?=\}|;|,|$)|(?<=\})'
1542 - match: '(?=\}|;|,|$)|(?<=\})'
@@ -1530,7 +1544,7 @@ contexts:
1530 - include: method-declaration-name
1544 - include: method-declaration-name
1531 - include: function-body
1545 - include: function-body
1532 - match: |-
1546 - match: |-
1533− (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\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(?!\$))|((?<!\$)(?:
1547+ (?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(?!\$))|((?<!\$)(?:
1534 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1548 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1535 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1549 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1536 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1550 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
@@ -1539,13 +1553,14 @@ contexts:
1539 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1553 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1540 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1554 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1541 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1555 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1542− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1556+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1543 captures:
1557 captures:
1544 1: storage.modifier.ts
1558 1: storage.modifier.ts
1545 2: storage.modifier.ts
1559 2: storage.modifier.ts
1546− 3: storage.modifier.async.ts
1560+ 3: storage.modifier.ts
1561+ 4: storage.modifier.async.ts
1547− 4: storage.type.property.ts
1562+ 5: storage.type.property.ts
1548− 5: keyword.generator.asterisk.ts
1563+ 6: keyword.generator.asterisk.ts
1549 push:
1564 push:
1550 - meta_scope: meta.method.declaration.ts
1565 - meta_scope: meta.method.declaration.ts
1551 - match: '(?=\}|;|,|$)|(?<=\})'
1566 - match: '(?=\}|;|,|$)|(?<=\})'
@@ -1582,7 +1597,7 @@ contexts:
1582 3: storage.type.namespace.ts
1597 3: storage.type.namespace.ts
1583 push:
1598 push:
1584 - meta_scope: meta.namespace.declaration.ts
1599 - meta_scope: meta.namespace.declaration.ts
1585− - match: '(?<=\})|(?=;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
1600+ - match: '(?<=\})|(?=;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
1586 pop: true
1601 pop: true
1587 - include: comment
1602 - include: comment
1588 - include: string
1603 - include: string
@@ -1598,9 +1613,7 @@ contexts:
1598 - meta_scope: new.expr.ts
1613 - meta_scope: new.expr.ts
1599 - match: '(?<=\))|(?=[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))new(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1614 - match: '(?<=\))|(?=[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))new(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1600 pop: true
1615 pop: true
1601− - include: paren-expression
1616+ - include: expression
1602− - include: class-declaration
1603− - include: type
1604 null-literal:
1617 null-literal:
1605 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))null(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1618 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))null(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1606 scope: constant.language.null.ts
1619 scope: constant.language.null.ts
@@ -1781,7 +1794,7 @@ contexts:
1781 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1794 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1782 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1795 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1783 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1796 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1784− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1797+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1785 captures:
1798 captures:
1786 1: storage.modifier.async.ts
1799 1: storage.modifier.async.ts
1787 2: storage.type.property.ts
1800 2: storage.type.property.ts
@@ -1802,7 +1815,7 @@ contexts:
1802 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1815 (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1803 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1816 (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1804 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1817 (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1805− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1818+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1806 captures:
1819 captures:
1807 1: storage.modifier.async.ts
1820 1: storage.modifier.async.ts
1808 2: storage.type.property.ts
1821 2: storage.type.property.ts
@@ -1864,10 +1877,10 @@ contexts:
1864 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1877 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1865 )) |
1878 )) |
1866 ((async\s*)?(
1879 ((async\s*)?(
1867− ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1880+ ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1868 # sure shot arrow functions even if => is on new line
1881 # sure shot arrow functions even if => is on new line
1869 (
1882 (
1870− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1883+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1871 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1884 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1872 (
1885 (
1873 ([)]\s*:) | # ():
1886 ([)]\s*:) | # ():
@@ -1877,9 +1890,9 @@ contexts:
1877
1890
1878 # arrow function possible to detect only with => on same line
1891 # arrow function possible to detect only with => on same line
1879 (
1892 (
1880− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1893+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1881− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1894+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1882− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1895+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1883 \s*=> # arrow operator
1896 \s*=> # arrow operator
1884 )
1897 )
1885 ))
1898 ))
@@ -1930,7 +1943,7 @@ contexts:
1930 - meta_scope: meta.object.member.ts
1943 - meta_scope: meta.object.member.ts
1931 - match: '(?=,|\})'
1944 - match: '(?=,|\})'
1932 pop: true
1945 pop: true
1933− - match: '(?<=:)\s*(async)?(?=\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
1946+ - match: '(?<=:)\s*(async)?(?=\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
1934 captures:
1947 captures:
1935 1: storage.modifier.async.ts
1948 1: storage.modifier.async.ts
1936 push:
1949 push:
@@ -1946,7 +1959,7 @@ contexts:
1946 0: meta.brace.round.ts
1959 0: meta.brace.round.ts
1947 pop: true
1960 pop: true
1948 - include: expression-inside-possibly-arrow-parens
1961 - include: expression-inside-possibly-arrow-parens
1949− - match: '(?<=:)\s*(async)?\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
1962+ - match: '(?<=:)\s*(async)?\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
1950 captures:
1963 captures:
1951 1: storage.modifier.async.ts
1964 1: storage.modifier.async.ts
1952 2: meta.brace.round.ts
1965 2: meta.brace.round.ts
@@ -1963,7 +1976,7 @@ contexts:
1963 - match: (?<=\>)
1976 - match: (?<=\>)
1964 pop: true
1977 pop: true
1965 - include: type-parameters
1978 - include: type-parameters
1966− - match: '(?<=\>)\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
1979+ - match: '(?<=\>)\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
1967 captures:
1980 captures:
1968 1: meta.brace.round.ts
1981 1: meta.brace.round.ts
1969 push:
1982 push:
@@ -1997,11 +2010,11 @@ contexts:
1997 - include: destructuring-parameter-rest
2010 - include: destructuring-parameter-rest
1998 - include: variable-initializer
2011 - include: variable-initializer
1999 parameter-name:
2012 parameter-name:
2000− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|protected|private|readonly)\s+(?=(public|protected|private|readonly)\s+)'
2013+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|protected|private|readonly)\s+(?=(override|public|protected|private|readonly)\s+)'
2001 captures:
2014 captures:
2002 1: storage.modifier.ts
2015 1: storage.modifier.ts
2003 - match: |-
2016 - match: |-
2004− (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*
2017+ (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*
2005 # function assignment |
2018 # function assignment |
2006 (=\s*(
2019 (=\s*(
2007 ((async\s+)?(
2020 ((async\s+)?(
@@ -2010,10 +2023,10 @@ contexts:
2010 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2023 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2011 )) |
2024 )) |
2012 ((async\s*)?(
2025 ((async\s*)?(
2013− ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
2026+ ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
2014 # sure shot arrow functions even if => is on new line
2027 # sure shot arrow functions even if => is on new line
2015 (
2028 (
2016− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
2029+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
2017 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
2030 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
2018 (
2031 (
2019 ([)]\s*:) | # ():
2032 ([)]\s*:) | # ():
@@ -2023,9 +2036,9 @@ contexts:
2023
2036
2024 # arrow function possible to detect only with => on same line
2037 # arrow function possible to detect only with => on same line
2025 (
2038 (
2026− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
2039+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
2027− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
2040+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
2028− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
2041+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
2029 \s*=> # arrow operator
2042 \s*=> # arrow operator
2030 )
2043 )
2031 ))
2044 ))
@@ -2043,18 +2056,18 @@ contexts:
2043 ))
2056 ))
2044 )) |
2057 )) |
2045 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
2058 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
2046− (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
2059+ (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
2047− (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
2060+ (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
2048 ((async\s+)?(
2061 ((async\s+)?(
2049 (function\s*[(<*]) |
2062 (function\s*[(<*]) |
2050 (function\s+) |
2063 (function\s+) |
2051 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2064 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2052 )) |
2065 )) |
2053 ((async\s*)?(
2066 ((async\s*)?(
2054− ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
2067+ ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
2055 # sure shot arrow functions even if => is on new line
2068 # sure shot arrow functions even if => is on new line
2056 (
2069 (
2057− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
2070+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
2058 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
2071 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
2059 (
2072 (
2060 ([)]\s*:) | # ():
2073 ([)]\s*:) | # ():
@@ -2064,9 +2077,9 @@ contexts:
2064
2077
2065 # arrow function possible to detect only with => on same line
2078 # arrow function possible to detect only with => on same line
2066 (
2079 (
2067− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
2080+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
2068− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
2081+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
2069− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
2082+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
2070 \s*=> # arrow operator
2083 \s*=> # arrow operator
2071 )
2084 )
2072 ))
2085 ))
@@ -2077,7 +2090,7 @@ contexts:
2077 3: entity.name.function.ts variable.language.this.ts
2090 3: entity.name.function.ts variable.language.this.ts
2078 4: entity.name.function.ts
2091 4: entity.name.function.ts
2079 5: keyword.operator.optional.ts
2092 5: keyword.operator.optional.ts
2080− - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)'
2093+ - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)'
2081 captures:
2094 captures:
2082 1: storage.modifier.ts
2095 1: storage.modifier.ts
2083 2: keyword.operator.rest.ts
2096 2: keyword.operator.rest.ts
@@ -2137,14 +2150,14 @@ contexts:
2137 pop: true
2150 pop: true
2138 - include: expression
2151 - include: expression
2139 paren-expression-possibly-arrow:
2152 paren-expression-possibly-arrow:
2140− - match: '(?<=[(=,])\s*(async)?(?=\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
2153+ - match: '(?<=[(=,])\s*(async)?(?=\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
2141 captures:
2154 captures:
2142 1: storage.modifier.async.ts
2155 1: storage.modifier.async.ts
2143 push:
2156 push:
2144 - match: (?<=\))
2157 - match: (?<=\))
2145 pop: true
2158 pop: true
2146 - include: paren-expression-possibly-arrow-with-typeparameters
2159 - include: paren-expression-possibly-arrow-with-typeparameters
2147− - match: '(?<=[(=,]|=>|^return|[^\._$[:alnum:]]return)\s*(async)?(?=\s*((((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\()|(<))\s*$)'
2160+ - match: '(?<=[(=,]|=>|^return|[^\._$[:alnum:]]return)\s*(async)?(?=\s*((((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\()|(<))\s*$)'
2148 captures:
2161 captures:
2149 1: storage.modifier.async.ts
2162 1: storage.modifier.async.ts
2150 push:
2163 push:
@@ -2164,7 +2177,7 @@ contexts:
2164 pop: true
2177 pop: true
2165 - include: expression-inside-possibly-arrow-parens
2178 - include: expression-inside-possibly-arrow-parens
2166 possibly-arrow-return-type:
2179 possibly-arrow-return-type:
2167− - match: '(?<=\)|^)\s*(:)(?=\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*=>)'
2180+ - match: '(?<=\)|^)\s*(:)(?=\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*=>)'
2168 captures:
2181 captures:
2169 1: meta.arrow.ts meta.return.type.arrow.ts keyword.operator.type.annotation.ts
2182 1: meta.arrow.ts meta.return.type.arrow.ts keyword.operator.type.annotation.ts
2170 push:
2183 push:
@@ -2211,23 +2224,23 @@ contexts:
2211 pop: true
2224 pop: true
2212 - include: string-character-escape
2225 - include: string-character-escape
2213 regex:
2226 regex:
2214− - match: '(?<!\+\+|--|})(?<=[=(:,\[?+!]|^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case|=>|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[\()]|\\.|\[([^\]\\]|\\.)+\]|\(([^\)\\]|\\.)+\))+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
2227+ - match: '(?<!\+\+|--|})(?<=[=(:,\[?+!]|^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case|=>|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[\()]|\\.|\[([^\]\\]|\\.)+\]|\(([^\)\\]|\\.)+\))+\/([dgimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
2215 captures:
2228 captures:
2216 1: punctuation.definition.string.begin.ts
2229 1: punctuation.definition.string.begin.ts
2217 push:
2230 push:
2218 - meta_scope: string.regexp.ts
2231 - meta_scope: string.regexp.ts
2219− - match: "(/)([gimsuy]*)"
2232+ - match: "(/)([dgimsuy]*)"
2220 captures:
2233 captures:
2221 1: punctuation.definition.string.end.ts
2234 1: punctuation.definition.string.end.ts
2222 2: keyword.other.ts
2235 2: keyword.other.ts
2223 pop: true
2236 pop: true
2224 - include: regexp
2237 - include: regexp
2225− - match: '((?<![_$[:alnum:])\]]|\+\+|--|}|\*\/)|((?<=^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case))\s*)\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
2238+ - match: '((?<![_$[:alnum:])\]]|\+\+|--|}|\*\/)|((?<=^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case))\s*)\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/([dgimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
2226 captures:
2239 captures:
2227 0: punctuation.definition.string.begin.ts
2240 0: punctuation.definition.string.begin.ts
2228 push:
2241 push:
2229 - meta_scope: string.regexp.ts
2242 - meta_scope: string.regexp.ts
2230− - match: "(/)([gimsuy]*)"
2243+ - match: "(/)([dgimsuy]*)"
2231 captures:
2244 captures:
2232 1: punctuation.definition.string.end.ts
2245 1: punctuation.definition.string.end.ts
2233 2: keyword.other.ts
2246 2: keyword.other.ts
@@ -2430,7 +2443,7 @@ contexts:
2430 4: support.variable.property.target.ts
2443 4: support.variable.property.target.ts
2431 - match: |-
2444 - match: |-
2432 (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* (?:
2445 (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* (?:
2433− (?:(constructor|length|prototype|__proto__)\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\())
2446+ (?:(constructor|length|prototype|__proto__)\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\())
2434 |
2447 |
2435 (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\b(?!\$)))
2448 (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\b(?!\$)))
2436 captures:
2449 captures:
@@ -2536,7 +2549,7 @@ contexts:
2536 |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary
2549 |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary
2537 |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead
2550 |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead
2538 |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile
2551 |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile
2539− |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\()
2552+ |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\()
2540 captures:
2553 captures:
2541 1: punctuation.accessor.ts
2554 1: punctuation.accessor.ts
2542 2: punctuation.accessor.optional.ts
2555 2: punctuation.accessor.optional.ts
@@ -2703,20 +2716,34 @@ contexts:
2703 0: case-clause.expr.ts punctuation.definition.section.case-statement.ts
2716 0: case-clause.expr.ts punctuation.definition.section.case-statement.ts
2704 - include: statements
2717 - include: statements
2705 template:
2718 template:
2719+ - include: template-call
2720+ - match: "([_$[:alpha:]][_$[:alnum:]]*)?(`)"
2721+ captures:
2722+ 1: entity.name.function.tagged-template.ts
2723+ 2: punctuation.definition.string.template.begin.ts
2724+ push:
2725+ - meta_scope: string.template.ts
2726+ - match: "`"
2727+ captures:
2728+ 0: punctuation.definition.string.template.end.ts
2729+ pop: true
2730+ - include: template-substitution-element
2731+ - include: string-character-escape
2732+ template-call:
2706− - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)(<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?`)'
2733+ - match: '(?=(([_$[: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*)?`)'
2707 push:
2734 push:
2708 - meta_scope: string.template.ts
2735 - meta_scope: string.template.ts
2709 - match: (?=`)
2736 - match: (?=`)
2710 pop: true
2737 pop: true
2711 - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))'
2738 - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))'
2712 push:
2739 push:
2713− - match: '(?=(<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?`)'
2740+ - match: '(?=(<\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*)?`)'
2714 pop: true
2741 pop: true
2715 - include: support-function-call-identifiers
2742 - include: support-function-call-identifiers
2716 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
2743 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
2717 scope: entity.name.function.tagged-template.ts
2744 scope: entity.name.function.tagged-template.ts
2718 - include: type-arguments
2745 - include: type-arguments
2719− - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=(<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|awaited|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)`)'
2746+ - match: '([_$[: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*)`)'
2720 captures:
2747 captures:
2721 1: entity.name.function.tagged-template.ts
2748 1: entity.name.function.tagged-template.ts
2722 push:
2749 push:
@@ -2724,6 +2751,20 @@ contexts:
2724 - match: (?=`)
2751 - match: (?=`)
2725 pop: true
2752 pop: true
2726 - include: type-arguments
2753 - include: type-arguments
2754+ template-substitution-element:
2755+ - match: '\$\{'
2756+ captures:
2757+ 0: punctuation.definition.template-expression.begin.ts
2758+ push:
2759+ - meta_scope: meta.template.expression.ts
2760+ - meta_content_scope: meta.embedded.line.ts
2761+ - match: '\}'
2762+ captures:
2763+ 0: punctuation.definition.template-expression.end.ts
2764+ pop: true
2765+ - include: expression
2766+ template-type:
2767+ - include: template-call
2727 - match: "([_$[:alpha:]][_$[:alnum:]]*)?(`)"
2768 - match: "([_$[:alpha:]][_$[:alnum:]]*)?(`)"
2728 captures:
2769 captures:
2729 1: entity.name.function.tagged-template.ts
2770 1: entity.name.function.tagged-template.ts
@@ -2734,9 +2775,9 @@ contexts:
2734 captures:
2775 captures:
2735 0: punctuation.definition.string.template.end.ts
2776 0: punctuation.definition.string.template.end.ts
2736 pop: true
2777 pop: true
2737− - include: template-substitution-element
2778+ - include: template-type-substitution-element
2738 - include: string-character-escape
2779 - include: string-character-escape
2739− template-substitution-element:
2780+ template-type-substitution-element:
2740 - match: '\$\{'
2781 - match: '\$\{'
2741 captures:
2782 captures:
2742 0: punctuation.definition.template-expression.begin.ts
2783 0: punctuation.definition.template-expression.begin.ts
@@ -2747,7 +2788,7 @@ contexts:
2747 captures:
2788 captures:
2748 0: punctuation.definition.template-expression.end.ts
2789 0: punctuation.definition.template-expression.end.ts
2749 pop: true
2790 pop: true
2750− - include: expression
2791+ - include: type
2751 ternary-expression:
2792 ternary-expression:
2752 - match: '(?!\?\.\s*[^[:digit:]])(\?)(?!\?)'
2793 - match: '(?!\?\.\s*[^[:digit:]])(\?)(?!\?)'
2753 captures:
2794 captures:
@@ -2763,7 +2804,7 @@ contexts:
2763 scope: variable.language.this.ts
2804 scope: variable.language.this.ts
2764 type:
2805 type:
2765 - include: comment
2806 - include: comment
2766− - include: string
2807+ - include: type-string
2767 - include: numeric-literal
2808 - include: numeric-literal
2768 - include: type-primitive
2809 - include: type-primitive
2769 - include: type-builtin-literals
2810 - include: type-builtin-literals
@@ -2788,15 +2829,23 @@ contexts:
2788 4: entity.name.type.alias.ts
2829 4: entity.name.type.alias.ts
2789 push:
2830 push:
2790 - meta_scope: meta.type.declaration.ts
2831 - meta_scope: meta.type.declaration.ts
2791− - match: '(?=\}|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
2832+ - match: '(?=\}|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
2792 pop: true
2833 pop: true
2793 - include: comment
2834 - include: comment
2794 - include: type-parameters
2835 - include: type-parameters
2836+ - match: '(=)\s*(intrinsic)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2837+ captures:
2838+ 1: keyword.operator.assignment.ts
2839+ 2: keyword.control.intrinsic.ts
2840+ push:
2841+ - match: '(?=\}|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
2842+ pop: true
2843+ - include: type
2795 - match: (=)\s*
2844 - match: (=)\s*
2796 captures:
2845 captures:
2797 1: keyword.operator.assignment.ts
2846 1: keyword.operator.assignment.ts
2798 push:
2847 push:
2799− - match: '(?=\}|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
2848+ - match: '(?=\}|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
2800 pop: true
2849 pop: true
2801 - include: type
2850 - include: type
2802 type-annotation:
2851 type-annotation:
@@ -2854,17 +2903,19 @@ contexts:
2854 - include: type
2903 - include: type
2855 - include: type
2904 - include: type
2856 type-fn-type-parameters:
2905 type-fn-type-parameters:
2857− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\b(?=\s*\<)'
2906+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(new)\b(?=\s*\<)'
2858 captures:
2907 captures:
2859− 1: meta.type.constructor.ts keyword.control.new.ts
2908+ 1: meta.type.constructor.ts storage.modifier.ts
2909+ 2: meta.type.constructor.ts keyword.control.new.ts
2860 push:
2910 push:
2861 - match: (?<=>)
2911 - match: (?<=>)
2862 pop: true
2912 pop: true
2863 - include: comment
2913 - include: comment
2864 - include: type-parameters
2914 - include: type-parameters
2865− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\b\s*(?=\()'
2915+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(new)\b\s*(?=\()'
2866 captures:
2916 captures:
2917+ 1: storage.modifier.ts
2867− 1: keyword.control.new.ts
2918+ 2: keyword.control.new.ts
2868 push:
2919 push:
2869 - meta_scope: meta.type.constructor.ts
2920 - meta_scope: meta.type.constructor.ts
2870 - match: (?<=\))
2921 - match: (?<=\))
@@ -2993,8 +3044,6 @@ contexts:
2993 scope: keyword.operator.ternary.ts
3044 scope: keyword.operator.ternary.ts
2994 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))infer(?=\s+[_$[:alpha:]])'
3045 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))infer(?=\s+[_$[:alpha:]])'
2995 scope: keyword.operator.expression.infer.ts
3046 scope: keyword.operator.expression.infer.ts
2996− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))awaited(?=\s+[_$[:alpha:]])'
2997− scope: keyword.operator.expression.awaited.ts
2998 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))import(?=\s*\()'
3047 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))import(?=\s*\()'
2999 scope: keyword.operator.expression.import.ts
3048 scope: keyword.operator.expression.import.ts
3000 type-parameters:
3049 type-parameters:
@@ -3037,7 +3086,7 @@ contexts:
3037 ))
3086 ))
3038 )) |
3087 )) |
3039 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3088 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3040− (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))))
3089+ (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))))
3041 captures:
3090 captures:
3042 1: storage.modifier.ts
3091 1: storage.modifier.ts
3043 2: keyword.operator.rest.ts
3092 2: keyword.operator.rest.ts
@@ -3074,6 +3123,10 @@ contexts:
3074 type-primitive:
3123 type-primitive:
3075 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3124 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3076 scope: support.type.primitive.ts
3125 scope: support.type.primitive.ts
3126+ type-string:
3127+ - include: qstring-single
3128+ - include: qstring-double
3129+ - include: template-type
3077 type-tuple:
3130 type-tuple:
3078 - match: '\['
3131 - match: '\['
3079 captures:
3132 captures:
@@ -3095,7 +3148,12 @@ contexts:
3095 - include: punctuation-comma
3148 - include: punctuation-comma
3096 typeof-operator:
3149 typeof-operator:
3097 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))typeof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3150 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))typeof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3151+ captures:
3098− scope: keyword.operator.expression.typeof.ts
3152+ 0: keyword.operator.expression.typeof.ts
3153+ push:
3154+ - match: '(?=[,);}\]=>:&|{\?]|$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
3155+ pop: true
3156+ - include: expression
3099 undefined-literal:
3157 undefined-literal:
3100 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))undefined(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3158 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))undefined(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3101 scope: constant.language.undefined.ts
3159 scope: constant.language.undefined.ts
@@ -3103,7 +3161,7 @@ contexts:
3103 - match: '(?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))'
3161 - match: '(?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))'
3104 push:
3162 push:
3105 - meta_scope: meta.var.expr.ts
3163 - meta_scope: meta.var.expr.ts
3106− - match: '(?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|((?<!^let|[^\._$[:alnum:]]let|^var|[^\._$[:alnum:]]var)(?=\s*$)))'
3164+ - match: '(?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|((?<!^let|[^\._$[:alnum:]]let|^var|[^\._$[:alnum:]]var)(?=\s*$)))'
3107 pop: true
3165 pop: true
3108 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*'
3166 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*'
3109 captures:
3167 captures:
@@ -3136,7 +3194,7 @@ contexts:
3136 3: storage.type.ts
3194 3: storage.type.ts
3137 push:
3195 push:
3138 - meta_scope: meta.var.expr.ts
3196 - meta_scope: meta.var.expr.ts
3139− - match: '(?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|((?<!^const|[^\._$[:alnum:]]const)(?=\s*$)))'
3197+ - match: '(?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|((?<!^const|[^\._$[:alnum:]]const)(?=\s*$)))'
3140 pop: true
3198 pop: true
3141 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*'
3199 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*'
3142 captures:
3200 captures:
@@ -3173,10 +3231,10 @@ contexts:
3173 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3231 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3174 )) |
3232 )) |
3175 ((async\s*)?(
3233 ((async\s*)?(
3176− ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3234+ ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3177 # sure shot arrow functions even if => is on new line
3235 # sure shot arrow functions even if => is on new line
3178 (
3236 (
3179− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3237+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3180 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3238 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3181 (
3239 (
3182 ([)]\s*:) | # ():
3240 ([)]\s*:) | # ():
@@ -3186,9 +3244,9 @@ contexts:
3186
3244
3187 # arrow function possible to detect only with => on same line
3245 # arrow function possible to detect only with => on same line
3188 (
3246 (
3189− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3247+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3190− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3248+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3191− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3249+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3192 \s*=> # arrow operator
3250 \s*=> # arrow operator
3193 )
3251 )
3194 ))
3252 ))
@@ -3206,18 +3264,18 @@ contexts:
3206 ))
3264 ))
3207 )) |
3265 )) |
3208 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3266 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3209− (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
3267+ (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
3210− (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3268+ (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3211 ((async\s+)?(
3269 ((async\s+)?(
3212 (function\s*[(<*]) |
3270 (function\s*[(<*]) |
3213 (function\s+) |
3271 (function\s+) |
3214 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3272 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3215 )) |
3273 )) |
3216 ((async\s*)?(
3274 ((async\s*)?(
3217− ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3275+ ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3218 # sure shot arrow functions even if => is on new line
3276 # sure shot arrow functions even if => is on new line
3219 (
3277 (
3220− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3278+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3221 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3279 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3222 (
3280 (
3223 ([)]\s*:) | # ():
3281 ([)]\s*:) | # ():
@@ -3227,9 +3285,9 @@ contexts:
3227
3285
3228 # arrow function possible to detect only with => on same line
3286 # arrow function possible to detect only with => on same line
3229 (
3287 (
3230− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3288+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3231− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3289+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3232− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3290+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3233 \s*=> # arrow operator
3291 \s*=> # arrow operator
3234 )
3292 )
3235 ))
3293 ))
@@ -3260,10 +3318,10 @@ contexts:
3260 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3318 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3261 )) |
3319 )) |
3262 ((async\s*)?(
3320 ((async\s*)?(
3263− ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3321+ ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3264 # sure shot arrow functions even if => is on new line
3322 # sure shot arrow functions even if => is on new line
3265 (
3323 (
3266− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3324+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3267 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3325 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3268 (
3326 (
3269 ([)]\s*:) | # ():
3327 ([)]\s*:) | # ():
@@ -3273,9 +3331,9 @@ contexts:
3273
3331
3274 # arrow function possible to detect only with => on same line
3332 # arrow function possible to detect only with => on same line
3275 (
3333 (
3276− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3334+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3277− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3335+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3278− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3336+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3279 \s*=> # arrow operator
3337 \s*=> # arrow operator
3280 )
3338 )
3281 ))
3339 ))
@@ -3293,18 +3351,18 @@ contexts:
3293 ))
3351 ))
3294 )) |
3352 )) |
3295 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3353 (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3296− (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
3354+ (:\s*((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
3297− (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3355+ (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3298 ((async\s+)?(
3356 ((async\s+)?(
3299 (function\s*[(<*]) |
3357 (function\s*[(<*]) |
3300 (function\s+) |
3358 (function\s+) |
3301 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3359 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3302 )) |
3360 )) |
3303 ((async\s*)?(
3361 ((async\s*)?(
3304− ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3362+ ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3305 # sure shot arrow functions even if => is on new line
3363 # sure shot arrow functions even if => is on new line
3306 (
3364 (
3307− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3365+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3308 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3366 [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3309 (
3367 (
3310 ([)]\s*:) | # ():
3368 ([)]\s*:) | # ():
@@ -3314,9 +3372,9 @@ contexts:
3314
3372
3315 # arrow function possible to detect only with => on same line
3373 # arrow function possible to detect only with => on same line
3316 (
3374 (
3317− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3375+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3318− \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3376+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3319− (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3377+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3320 \s*=> # arrow operator
3378 \s*=> # arrow operator
3321 )
3379 )
3322 ))
3380 ))
assets/syntaxes/02_Extra/TypsecriptReact.sublime-syntax+896−477
@@ -9,10 +9,7 @@ contexts:
9 main:
9 main:
10 - include: directives
10 - include: directives
11 - include: statements
11 - include: statements
12− - match: \A(#!).*(?=$)
12+ - include: shebang
13− scope: comment.line.shebang.ts
14− captures:
15− 1: punctuation.definition.comment.ts
16 comment:
13 comment:
17 - match: /\*\*(?!/)
14 - match: /\*\*(?!/)
18 captures:
15 captures:
@@ -44,10 +41,10 @@ contexts:
44 5: punctuation.decorator.internaldeclaration.tsx
41 5: punctuation.decorator.internaldeclaration.tsx
45 push:
42 push:
46 - meta_content_scope: comment.line.double-slash.tsx
43 - meta_content_scope: comment.line.double-slash.tsx
47− - match: (?=^)
44+ - match: (?=$)
48 pop: true
45 pop: true
49 access-modifier:
46 access-modifier:
50− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(abstract|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
47+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(abstract|declare|override|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
51 scope: storage.modifier.tsx
48 scope: storage.modifier.tsx
52 after-operator-block-as-object-literal:
49 after-operator-block-as-object-literal:
53 - match: '(?<!\+\+|--)(?<=[:=(,\[?+!>]|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^yield|[^\._$[:alnum:]]yield|^throw|[^\._$[:alnum:]]throw|^in|[^\._$[:alnum:]]in|^of|[^\._$[:alnum:]]of|^typeof|[^\._$[:alnum:]]typeof|&&|\|\||\*)\s*(\{)'
50 - match: '(?<!\+\+|--)(?<=[:=(,\[?+!>]|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^yield|[^\._$[:alnum:]]yield|^throw|[^\._$[:alnum:]]throw|^in|[^\._$[:alnum:]]in|^of|[^\._$[:alnum:]]of|^typeof|[^\._$[:alnum:]]typeof|&&|\|\||\*)\s*(\{)'
@@ -109,8 +106,8 @@ contexts:
109 (?=
106 (?=
110 # sure shot arrow functions even if => is on new line
107 # sure shot arrow functions even if => is on new line
111 (
108 (
112− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
109+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
113− [(]\s*
110+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
114 (
111 (
115 ([)]\s*:) | # ():
112 ([)]\s*:) | # ():
116 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
113 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -121,9 +118,9 @@ contexts:
121 ) |
118 ) |
122 # arrow function possible to detect only with => on same line
119 # arrow function possible to detect only with => on same line
123 (
120 (
124− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
121+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
125− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
122+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
126− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
123+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
127 \s*=> # arrow operator
124 \s*=> # arrow operator
128 )
125 )
129 )
126 )
@@ -138,13 +135,15 @@ contexts:
138 - include: type-parameters
135 - include: type-parameters
139 - include: function-parameters
136 - include: function-parameters
140 - include: arrow-return-type
137 - include: arrow-return-type
138+ - include: possibly-arrow-return-type
141 - match: "=>"
139 - match: "=>"
142 captures:
140 captures:
143 0: storage.type.function.arrow.tsx
141 0: storage.type.function.arrow.tsx
144 push:
142 push:
145 - meta_scope: meta.arrow.tsx
143 - meta_scope: meta.arrow.tsx
146− - match: '(?<=\}|\S)(?<!=>)|((?!\{)(?=\S))'
144+ - match: '((?<=\}|\S)(?<!=>)|((?!\{)(?=\S)))(?!\/[\/\*])'
147 pop: true
145 pop: true
146+ - include: single-line-comment-consuming-line-ending
148 - include: decl-block
147 - include: decl-block
149 - include: expression
148 - include: expression
150 arrow-return-type:
149 arrow-return-type:
@@ -170,6 +169,8 @@ contexts:
170 binding-element:
169 binding-element:
171 - include: comment
170 - include: comment
172 - include: string
171 - include: string
172+ - include: numeric-literal
173+ - include: regex
173 - include: object-binding-pattern
174 - include: object-binding-pattern
174 - include: array-binding-pattern
175 - include: array-binding-pattern
175 - include: destructuring-variable-rest
176 - include: destructuring-variable-rest
@@ -177,6 +178,8 @@ contexts:
177 binding-element-const:
178 binding-element-const:
178 - include: comment
179 - include: comment
179 - include: string
180 - include: string
181+ - include: numeric-literal
182+ - include: regex
180 - include: object-binding-pattern-const
183 - include: object-binding-pattern-const
181 - include: array-binding-pattern-const
184 - include: array-binding-pattern-const
182 - include: destructuring-variable-rest-const
185 - include: destructuring-variable-rest-const
@@ -200,11 +203,12 @@ contexts:
200 cast:
203 cast:
201 - include: jsx
204 - include: jsx
202 class-declaration:
205 class-declaration:
203− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(export)\s+)?\b(?:(abstract)\s+)?\b(class)\b(?=\s+|/[/*])'
206+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(?:(abstract)\s+)?\b(class)\b(?=\s+|/[/*])'
204 captures:
207 captures:
205 1: keyword.control.export.tsx
208 1: keyword.control.export.tsx
206 2: storage.modifier.tsx
209 2: storage.modifier.tsx
210+ 3: storage.modifier.tsx
207− 3: storage.type.class.tsx
211+ 4: storage.type.class.tsx
208 push:
212 push:
209 - meta_scope: meta.class.tsx
213 - meta_scope: meta.class.tsx
210 - match: '(?<=\})'
214 - match: '(?<=\})'
@@ -219,9 +223,10 @@ contexts:
219 - include: type-parameters
223 - include: type-parameters
220 - include: class-or-interface-body
224 - include: class-or-interface-body
221 class-expression:
225 class-expression:
222− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(class)\b(?=\s+|[<{]|\/[\/*])'
226+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(class)\b(?=\s+|[<{]|\/[\/*])'
223 captures:
227 captures:
228+ 1: storage.modifier.tsx
224− 1: storage.type.class.tsx
229+ 2: storage.type.class.tsx
225 push:
230 push:
226 - meta_scope: meta.class.tsx
231 - meta_scope: meta.class.tsx
227 - match: '(?<=\})'
232 - match: '(?<=\})'
@@ -238,6 +243,11 @@ contexts:
238 pop: true
243 pop: true
239 - include: comment
244 - include: comment
240 - include: decorator
245 - include: decorator
246+ - match: (?<=:)\s*
247+ push:
248+ - match: '(?=\s|[;),}\]:\-\+]|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
249+ pop: true
250+ - include: expression
241 - include: method-declaration
251 - include: method-declaration
242 - include: indexer-declaration
252 - include: indexer-declaration
243 - include: field-declaration
253 - include: field-declaration
@@ -284,9 +294,15 @@ contexts:
284 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
294 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
285 scope: keyword.control.loop.tsx
295 scope: keyword.control.loop.tsx
286 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(return)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
296 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(return)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
297+ captures:
287− scope: keyword.control.flow.tsx
298+ 0: keyword.control.flow.tsx
299+ push:
300+ - match: '(?=[;}]|$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
301+ pop: true
302+ - include: expression
288 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
303 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
289 scope: keyword.control.switch.tsx
304 scope: keyword.control.switch.tsx
305+ - include: if-statement
290 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(else|if)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
306 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(else|if)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
291 scope: keyword.control.conditional.tsx
307 scope: keyword.control.conditional.tsx
292 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(with)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
308 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(with)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
@@ -295,8 +311,6 @@ contexts:
295 scope: keyword.control.tsx
311 scope: keyword.control.tsx
296 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(debugger)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
312 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(debugger)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
297 scope: keyword.other.debugger.tsx
313 scope: keyword.other.debugger.tsx
298− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(declare)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
299− scope: storage.modifier.tsx
300 decl-block:
314 decl-block:
301 - match: '\{'
315 - match: '\{'
302 captures:
316 captures:
@@ -320,6 +334,8 @@ contexts:
320 - include: import-equals-declaration
334 - include: import-equals-declaration
321 - include: import-declaration
335 - include: import-declaration
322 - include: export-declaration
336 - include: export-declaration
337+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(declare|export)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
338+ scope: storage.modifier.tsx
323 decorator:
339 decorator:
324 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))\@'
340 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))\@'
325 captures:
341 captures:
@@ -333,7 +349,7 @@ contexts:
333 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)'
349 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)'
334 push:
350 push:
335 - meta_scope: meta.object-binding-pattern-variable.tsx
351 - meta_scope: meta.object-binding-pattern-variable.tsx
336− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
352+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
337 pop: true
353 pop: true
338 - include: object-binding-pattern-const
354 - include: object-binding-pattern-const
339 - include: type-annotation
355 - include: type-annotation
@@ -341,15 +357,16 @@ contexts:
341 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)'
357 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)'
342 push:
358 push:
343 - meta_scope: meta.array-binding-pattern-variable.tsx
359 - meta_scope: meta.array-binding-pattern-variable.tsx
344− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
360+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
345 pop: true
361 pop: true
346 - include: array-binding-pattern-const
362 - include: array-binding-pattern-const
347 - include: type-annotation
363 - include: type-annotation
348 - include: comment
364 - include: comment
349 destructuring-parameter:
365 destructuring-parameter:
350− - match: '(?<!=|:)\s*(\{)'
366+ - match: '(?<!=|:)\s*(?:(\.\.\.)\s*)?(\{)'
351 captures:
367 captures:
368+ 1: keyword.operator.rest.tsx
352− 1: punctuation.definition.binding-pattern.object.tsx
369+ 2: punctuation.definition.binding-pattern.object.tsx
353 push:
370 push:
354 - meta_scope: meta.parameter.object-binding-pattern.tsx
371 - meta_scope: meta.parameter.object-binding-pattern.tsx
355 - match: '\}'
372 - match: '\}'
@@ -357,9 +374,10 @@ contexts:
357 0: punctuation.definition.binding-pattern.object.tsx
374 0: punctuation.definition.binding-pattern.object.tsx
358 pop: true
375 pop: true
359 - include: parameter-object-binding-element
376 - include: parameter-object-binding-element
360− - match: '(?<!=|:)\s*(\[)'
377+ - match: '(?<!=|:)\s*(?:(\.\.\.)\s*)?(\[)'
361 captures:
378 captures:
379+ 1: keyword.operator.rest.tsx
362− 1: punctuation.definition.binding-pattern.array.tsx
380+ 2: punctuation.definition.binding-pattern.array.tsx
363 push:
381 push:
364 - meta_scope: meta.paramter.array-binding-pattern.tsx
382 - meta_scope: meta.paramter.array-binding-pattern.tsx
365 - match: '\]'
383 - match: '\]'
@@ -377,7 +395,7 @@ contexts:
377 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)'
395 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)'
378 push:
396 push:
379 - meta_scope: meta.object-binding-pattern-variable.tsx
397 - meta_scope: meta.object-binding-pattern-variable.tsx
380− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
398+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
381 pop: true
399 pop: true
382 - include: object-binding-pattern
400 - include: object-binding-pattern
383 - include: type-annotation
401 - include: type-annotation
@@ -385,7 +403,7 @@ contexts:
385 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)'
403 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)'
386 push:
404 push:
387 - meta_scope: meta.array-binding-pattern-variable.tsx
405 - meta_scope: meta.array-binding-pattern-variable.tsx
388− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
406+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
389 pop: true
407 pop: true
390 - include: array-binding-pattern
408 - include: array-binding-pattern
391 - include: type-annotation
409 - include: type-annotation
@@ -401,12 +419,12 @@ contexts:
401 1: keyword.operator.rest.tsx
419 1: keyword.operator.rest.tsx
402 2: meta.definition.variable.tsx variable.other.constant.tsx
420 2: meta.definition.variable.tsx variable.other.constant.tsx
403 directives:
421 directives:
404− - match: '^(///)\s*(?=<(reference|amd-dependency|amd-module)(\s+(path|types|no-default-lib|lib|name)\s*=\s*((\''([^\''\\]|\\\''|\\)*\'')|(\"([^\"\\]|\\\"|\\)*\")))+\s*/>\s*$)'
422+ - match: '^(///)\s*(?=<(reference|amd-dependency|amd-module)(\s+(path|types|no-default-lib|lib|name)\s*=\s*((\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)))+\s*/>\s*$)'
405 captures:
423 captures:
406 1: punctuation.definition.comment.tsx
424 1: punctuation.definition.comment.tsx
407 push:
425 push:
408 - meta_scope: comment.line.triple-slash.directive.tsx
426 - meta_scope: comment.line.triple-slash.directive.tsx
409− - match: (?=^)
427+ - match: (?=$)
410 pop: true
428 pop: true
411 - match: (<)(reference|amd-dependency|amd-module)
429 - match: (<)(reference|amd-dependency|amd-module)
412 captures:
430 captures:
@@ -668,13 +686,18 @@ contexts:
668 captures:
686 captures:
669 1: punctuation.definition.block.tag.jsdoc
687 1: punctuation.definition.block.tag.jsdoc
670 - include: inline-tags
688 - include: inline-tags
689+ - match: '((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\s+)'
690+ captures:
691+ 1: storage.type.class.jsdoc
692+ 2: punctuation.definition.block.tag.jsdoc
671 enum-declaration:
693 enum-declaration:
672− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:\b(const)\s+)?\b(enum)\s+([_$[:alpha:]][_$[:alnum:]]*)'
694+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?(?:\b(const)\s+)?\b(enum)\s+([_$[:alpha:]][_$[:alnum:]]*)'
673 captures:
695 captures:
674 1: keyword.control.export.tsx
696 1: keyword.control.export.tsx
675 2: storage.modifier.tsx
697 2: storage.modifier.tsx
676− 3: storage.type.enum.tsx
698+ 3: storage.modifier.tsx
699+ 4: storage.type.enum.tsx
677− 4: entity.name.type.enum.tsx
700+ 5: entity.name.type.enum.tsx
678 push:
701 push:
679 - meta_scope: meta.enum.declaration.tsx
702 - meta_scope: meta.enum.declaration.tsx
680 - match: '(?<=\})'
703 - match: '(?<=\})'
@@ -697,7 +720,7 @@ contexts:
697 pop: true
720 pop: true
698 - include: comment
721 - include: comment
699 - include: variable-initializer
722 - include: variable-initializer
700− - match: '(?=((\''([^\''\\]|\\\''|\\)*\'')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\])))'
723+ - match: '(?=((\''([^\''\\]|\\.)*\'')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\])))'
701 push:
724 push:
702 - match: '(?=,|\}|$)'
725 - match: '(?=,|\}|$)'
703 pop: true
726 pop: true
@@ -713,22 +736,25 @@ contexts:
713 2: keyword.control.as.tsx
736 2: keyword.control.as.tsx
714 3: storage.type.namespace.tsx
737 3: storage.type.namespace.tsx
715 4: entity.name.type.module.tsx
738 4: entity.name.type.module.tsx
716− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:(?:\s*(=))|(?:\s+(default)(?=\s+)))'
739+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:\s+(type))?(?:(?:\s*(=))|(?:\s+(default)(?=\s+)))'
717 captures:
740 captures:
718 1: keyword.control.export.tsx
741 1: keyword.control.export.tsx
742+ 2: keyword.control.type.tsx
719− 2: keyword.operator.assignment.tsx
743+ 3: keyword.operator.assignment.tsx
720− 3: keyword.control.default.tsx
744+ 4: keyword.control.default.tsx
721 push:
745 push:
722 - meta_scope: meta.export.default.tsx
746 - meta_scope: meta.export.default.tsx
723− - match: (?=$|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)
747+ - match: (?=$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))
724 pop: true
748 pop: true
749+ - include: interface-declaration
725 - include: expression
750 - include: expression
726− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?!\s*:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
751+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:\s+(type))?\b(?!(\$)|(\s*:))((?=\s*[\{*])|((?=\s*[_$[:alpha:]][_$[:alnum:]]*(\s|,))(?!\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b)))'
727 captures:
752 captures:
728− 0: keyword.control.export.tsx
753+ 1: keyword.control.export.tsx
754+ 2: keyword.control.type.tsx
729 push:
755 push:
730 - meta_scope: meta.export.tsx
756 - meta_scope: meta.export.tsx
731− - match: (?=$|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)
757+ - match: (?=$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))
732 pop: true
758 pop: true
733 - include: import-export-declaration
759 - include: import-export-declaration
734 expression:
760 expression:
@@ -737,7 +763,105 @@ contexts:
737 - include: expressionPunctuations
763 - include: expressionPunctuations
738 expression-inside-possibly-arrow-parens:
764 expression-inside-possibly-arrow-parens:
739 - include: expressionWithoutIdentifiers
765 - include: expressionWithoutIdentifiers
740− - include: function-parameters-body
766+ - include: comment
767+ - include: string
768+ - include: decorator
769+ - include: destructuring-parameter
770+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|protected|private|readonly)\s+(?=(override|public|protected|private|readonly)\s+)'
771+ captures:
772+ 1: storage.modifier.tsx
773+ - match: |-
774+ (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*
775+ # function assignment |
776+ (=\s*(
777+ ((async\s+)?(
778+ (function\s*[(<*]) |
779+ (function\s+) |
780+ ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
781+ )) |
782+ ((async\s*)?(
783+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
784+ # sure shot arrow functions even if => is on new line
785+ (
786+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
787+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
788+ (
789+ ([)]\s*:) | # ():
790+ ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
791+ )
792+ ) |
793+ (
794+ [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
795+ ) |
796+ # arrow function possible to detect only with => on same line
797+ (
798+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
799+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
800+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
801+ \s*=> # arrow operator
802+ )
803+ ))
804+ )) |
805+ # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
806+ (:\s*(
807+ (<) |
808+ ([(]\s*(
809+ ([)]) |
810+ (\.\.\.) |
811+ ([_$[:alnum:]]+\s*(
812+ ([:,?=])|
813+ ([)]\s*=>)
814+ ))
815+ ))
816+ )) |
817+ (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
818+ (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
819+ (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
820+ ((async\s+)?(
821+ (function\s*[(<*]) |
822+ (function\s+) |
823+ ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
824+ )) |
825+ ((async\s*)?(
826+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
827+ # sure shot arrow functions even if => is on new line
828+ (
829+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
830+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
831+ (
832+ ([)]\s*:) | # ():
833+ ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
834+ )
835+ ) |
836+ (
837+ [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
838+ ) |
839+ # arrow function possible to detect only with => on same line
840+ (
841+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
842+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
843+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
844+ \s*=> # arrow operator
845+ )
846+ ))
847+ )))
848+ captures:
849+ 1: storage.modifier.tsx
850+ 2: keyword.operator.rest.tsx
851+ 3: entity.name.function.tsx variable.language.this.tsx
852+ 4: entity.name.function.tsx
853+ 5: keyword.operator.optional.tsx
854+ - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*[:,]|$)'
855+ captures:
856+ 1: storage.modifier.tsx
857+ 2: keyword.operator.rest.tsx
858+ 3: variable.parameter.tsx variable.language.this.tsx
859+ 4: variable.parameter.tsx
860+ 5: keyword.operator.optional.tsx
861+ - include: type-annotation
862+ - include: variable-initializer
863+ - match: ","
864+ scope: punctuation.separator.parameter.tsx
741 - include: identifiers
865 - include: identifiers
742 - include: expressionPunctuations
866 - include: expressionPunctuations
743 expression-operators:
867 expression-operators:
@@ -769,11 +893,15 @@ contexts:
769 - include: typeof-operator
893 - include: typeof-operator
770 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))void(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
894 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))void(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
771 scope: keyword.operator.expression.void.tsx
895 scope: keyword.operator.expression.void.tsx
896+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+(const)(?=\s*($|[;,:})\]]))'
897+ captures:
898+ 1: keyword.control.as.tsx
899+ 2: storage.modifier.tsx
772 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+'
900 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+'
773 captures:
901 captures:
774 1: keyword.control.as.tsx
902 1: keyword.control.as.tsx
775 push:
903 push:
776− - match: '(?=$|^|[;,:})\]]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+))'
904+ - match: '(?=^|[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+)|(\s+\<))'
777 pop: true
905 pop: true
778 - include: type
906 - include: type
779 - match: \.\.\.
907 - match: \.\.\.
@@ -788,7 +916,12 @@ contexts:
788 scope: keyword.operator.comparison.tsx
916 scope: keyword.operator.comparison.tsx
789 - match: <=|>=|<>|<|>
917 - match: <=|>=|<>|<|>
790 scope: keyword.operator.relational.tsx
918 scope: keyword.operator.relational.tsx
791− - match: \!|&&|\|\|
919+ - match: '(?<=[_$[:alnum:]])(\!)\s*(?:(/=)|(?:(/)(?![/*])))'
920+ captures:
921+ 1: keyword.operator.logical.tsx
922+ 2: keyword.operator.assignment.compound.tsx
923+ 3: keyword.operator.arithmetic.tsx
924+ - match: \!|&&|\|\||\?\?
792 scope: keyword.operator.logical.tsx
925 scope: keyword.operator.logical.tsx
793 - match: \&|~|\^|\|
926 - match: \&|~|\^|\|
794 scope: keyword.operator.bitwise.tsx
927 scope: keyword.operator.bitwise.tsx
@@ -800,9 +933,18 @@ contexts:
800 scope: keyword.operator.increment.tsx
933 scope: keyword.operator.increment.tsx
801 - match: '%|\*|/|-|\+'
934 - match: '%|\*|/|-|\+'
802 scope: keyword.operator.arithmetic.tsx
935 scope: keyword.operator.arithmetic.tsx
803− - match: '(?<=[_$[:alnum:])\]])\s*(/)(?![/*])'
936+ - match: '(?<=[_$[:alnum:])\]])\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)+(?:(/=)|(?:(/)(?![/*]))))'
937+ push:
938+ - match: '(?:(/=)|(?:(/)(?!\*([^\*]|(\*[^\/]))*\*\/)))'
939+ captures:
940+ 1: keyword.operator.assignment.compound.tsx
941+ 2: keyword.operator.arithmetic.tsx
942+ pop: true
943+ - include: comment
944+ - match: '(?<=[_$[:alnum:])\]])\s*(?:(/=)|(?:(/)(?![/*])))'
804 captures:
945 captures:
805− 1: keyword.operator.arithmetic.tsx
946+ 1: keyword.operator.assignment.compound.tsx
947+ 2: keyword.operator.arithmetic.tsx
806 expressionPunctuations:
948 expressionPunctuations:
807 - include: punctuation-comma
949 - include: punctuation-comma
808 - include: punctuation-accessor
950 - include: punctuation-accessor
@@ -810,7 +952,6 @@ contexts:
810 - include: jsx
952 - include: jsx
811 - include: string
953 - include: string
812 - include: regex
954 - include: regex
813− - include: template
814 - include: comment
955 - include: comment
815 - include: function-expression
956 - include: function-expression
816 - include: class-expression
957 - include: class-expression
@@ -828,143 +969,123 @@ contexts:
828 - include: paren-expression
969 - include: paren-expression
829 field-declaration:
970 field-declaration:
830 - match: |-
971 - match: |-
831− (?x)(?<!\()(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(readonly)\s+)?(?=\s*((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
972+ (?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(?!\$))|((?<!\$)(?:
832− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
973+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
833− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
974+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
834− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
975+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
835− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
976+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
836− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
977+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
837− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
978+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
838− (?:\B(\.)[0-9][0-9_]*\b)| # .1
979+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
839− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
980+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
840− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:))
981+ )(?!\$))|(\#?[_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|\}|$))
841 captures:
982 captures:
842 1: storage.modifier.tsx
983 1: storage.modifier.tsx
843 push:
984 push:
844 - meta_scope: meta.field.declaration.tsx
985 - meta_scope: meta.field.declaration.tsx
845 - match: |-
986 - match: |-
846− (?x)(?=\}|;|,|$|(^(?!\s*((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
987+ (?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(?!\$))|((?<!\$)(?:
847− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
988+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
848− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
989+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
849− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
990+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
850− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
991+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
851− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
992+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
852− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
993+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
853− (?:\B(\.)[0-9][0-9_]*\b)| # .1
994+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
854− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
995+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
855− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:))))|(?<=\})
996+ )(?!\$))|(\#?[_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|$))))|(?<=\})
856 pop: true
997 pop: true
857 - include: variable-initializer
998 - include: variable-initializer
999+ - include: type-annotation
1000+ - include: string
1001+ - include: array-literal
1002+ - include: numeric-literal
1003+ - include: comment
858 - match: |-
1004 - match: |-
859− (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
860− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
861− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
862− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
863− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
864− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
865− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
866− (?:\B(\.)[0-9][0-9_]*\b)| # .1
867− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
868− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:))
1005+ (?x)(\#?[_$[:alpha:]][_$[:alnum:]]*)(?:(\?)|(\!))?(?=\s*\s*
869− push:
870− - match: |-
871− (?x)(?=[};,=]|$|(^(?!\s*((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
872− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
873− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
874− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
875− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
876− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
877− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
878− (?:\B(\.)[0-9][0-9_]*\b)| # .1
879− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
880− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:))))|(?<=\})
881− pop: true
882− - include: type-annotation
883− - include: string
884− - include: array-literal
885− - include: numeric-literal
886− - include: comment
887− - match: |-
888− (?x)([_$[:alpha:]][_$[:alnum:]]*)(\?)?(?=(\?\s*)?\s*
889− # function assignment |
1006+ # function assignment |
890− (=\s*(
1007+ (=\s*(
891− ((async\s+)?(
1008+ ((async\s+)?(
892− (function\s*[(<*]) |
1009+ (function\s*[(<*]) |
893− (function\s+) |
1010+ (function\s+) |
894− ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1011+ ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
895− )) |
1012+ )) |
896− ((async\s*)?(
1013+ ((async\s*)?(
897− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
1014+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
898− # sure shot arrow functions even if => is on new line
1015+ # sure shot arrow functions even if => is on new line
899− (
1016+ (
900− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
1017+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
901− [(]\s*
1018+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
902− (
1019+ (
903− ([)]\s*:) | # ():
1020+ ([)]\s*:) | # ():
904− ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1021+ ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
905− )
1022+ )
906− ) |
1023+ ) |
907− (
1024+ (
908− [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
1025+ [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
909− ) |
1026+ ) |
910− # arrow function possible to detect only with => on same line
1027+ # arrow function possible to detect only with => on same line
911− (
1028+ (
912− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
1029+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
913− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
1030+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
914− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
1031+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
915− \s*=> # arrow operator
1032+ \s*=> # arrow operator
916− )
1033+ )
917− ))
1034+ ))
918− )) |
1035+ )) |
919− # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
1036+ # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
920− (:\s*(
1037+ (:\s*(
921− (<) |
1038+ (<) |
922− ([(]\s*(
1039+ ([(]\s*(
923− ([)]) |
1040+ ([)]) |
924− (\.\.\.) |
1041+ (\.\.\.) |
925− ([_$[:alnum:]]+\s*(
1042+ ([_$[:alnum:]]+\s*(
926− ([:,?=])|
1043+ ([:,?=])|
927− ([)]\s*=>)
1044+ ([)]\s*=>)
1045+ ))
928− ))
1046+ ))
929− ))
1047+ )) |
930− )) |
1048+ (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
931− (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) |
1049+ (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
932− (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
1050+ (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
933− ((async\s+)?(
1051+ ((async\s+)?(
934− (function\s*[(<*]) |
1052+ (function\s*[(<*]) |
935− (function\s+) |
1053+ (function\s+) |
936− ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1054+ ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
937− )) |
1055+ )) |
938− ((async\s*)?(
1056+ ((async\s*)?(
939− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
1057+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
940− # sure shot arrow functions even if => is on new line
1058+ # sure shot arrow functions even if => is on new line
941− (
1059+ (
942− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
1060+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
943− [(]\s*
1061+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
944− (
1062+ (
945− ([)]\s*:) | # ():
1063+ ([)]\s*:) | # ():
946− ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1064+ ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
947− )
1065+ )
948− ) |
1066+ ) |
949− (
1067+ (
950− [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
1068+ [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
951− ) |
1069+ ) |
952− # arrow function possible to detect only with => on same line
1070+ # arrow function possible to detect only with => on same line
953− (
1071+ (
954− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
1072+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
955− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
1073+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
956− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
1074+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
957− \s*=> # arrow operator
1075+ \s*=> # arrow operator
958− )
1076+ )
959− ))
1077+ ))
960− )))
1078+ )))
961− captures:
1079+ captures:
962− 1: meta.definition.property.tsx entity.name.function.tsx
1080+ 1: meta.definition.property.tsx entity.name.function.tsx
963− 2: keyword.operator.optional.tsx
1081+ 2: keyword.operator.optional.tsx
1082+ 3: keyword.operator.definiteassignment.tsx
964− - match: "[_$[:alpha:]][_$[:alnum:]]*"
1083+ - match: '\#?[_$[:alpha:]][_$[:alnum:]]*'
965− scope: meta.definition.property.tsx variable.object.property.tsx
1084+ scope: meta.definition.property.tsx variable.object.property.tsx
966− - match: \?
1085+ - match: \?
967− scope: keyword.operator.optional.tsx
1086+ scope: keyword.operator.optional.tsx
1087+ - match: \!
1088+ scope: keyword.operator.definiteassignment.tsx
968 for-loop:
1089 for-loop:
969 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))for(?=((\s+|(\s*\/\*([^\*]|(\*[^\/]))*\*\/\s*))await)?\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)?(\())'
1090 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))for(?=((\s+|(\s*\/\*([^\*]|(\*[^\/]))*\*\/\s*))await)?\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)?(\())'
970 captures:
1091 captures:
@@ -991,43 +1112,59 @@ contexts:
991 - include: type-parameters
1112 - include: type-parameters
992 - include: function-parameters
1113 - include: function-parameters
993 - include: return-type
1114 - include: return-type
1115+ - include: type-function-return-type
994 - include: decl-block
1116 - include: decl-block
995 - match: \*
1117 - match: \*
996 scope: keyword.generator.asterisk.tsx
1118 scope: keyword.generator.asterisk.tsx
997 function-call:
1119 function-call:
998− - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(\?\.\s*)?(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)?\()'
1120+ - match: '(?=(((([_$[: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*)?\())'
999 push:
1121 push:
1000− - match: '(?<=\))(?!(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(\?\.\s*)?(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)?\()'
1122+ - match: '(?<=\))(?!(((([_$[: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*)?\())'
1001 pop: true
1123 pop: true
1002− - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))'
1124+ - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))'
1003 push:
1125 push:
1004 - meta_scope: meta.function-call.tsx
1126 - meta_scope: meta.function-call.tsx
1005− - match: '(?=\s*(\?\.\s*)?(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)?\()'
1127+ - match: '(?=\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*)?\())'
1006 pop: true
1128 pop: true
1007− - include: literal
1129+ - include: function-call-target
1008− - include: support-objects
1009− - include: object-identifiers
1010− - include: punctuation-accessor
1011− - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))import(?=\s*[\(]\s*[\"\''\`]))'
1012− scope: keyword.operator.expression.import.tsx
1013− - match: "([_$[:alpha:]][_$[:alnum:]]*)"
1014− scope: entity.name.function.tsx
1015 - include: comment
1130 - include: comment
1016− - match: \?\.
1131+ - include: function-call-optionals
1017− scope: meta.function-call.tsx punctuation.accessor.optional.tsx
1018 - include: type-arguments
1132 - include: type-arguments
1019 - include: paren-expression
1133 - include: paren-expression
1134+ - match: '(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))(<\s*[\{\[\(]\s*$))'
1135+ push:
1136+ - match: '(?<=\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))(<\s*[\{\[\(]\s*$))'
1137+ pop: true
1138+ - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))'
1139+ push:
1140+ - meta_scope: meta.function-call.tsx
1141+ - match: '(?=(<\s*[\{\[\(]\s*$))'
1142+ pop: true
1143+ - include: function-call-target
1144+ - include: comment
1145+ - include: function-call-optionals
1146+ - include: type-arguments
1147+ function-call-optionals:
1148+ - match: \?\.
1149+ scope: meta.function-call.tsx punctuation.accessor.optional.tsx
1150+ - match: \!
1151+ scope: meta.function-call.tsx keyword.operator.definiteassignment.tsx
1152+ function-call-target:
1153+ - include: support-function-call-identifiers
1154+ - match: '(\#?[_$[:alpha:]][_$[:alnum:]]*)'
1155+ scope: entity.name.function.tsx
1020 function-declaration:
1156 function-declaration:
1021− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(export)\s+)?(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s*'
1157+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s*'
1022 captures:
1158 captures:
1023 1: keyword.control.export.tsx
1159 1: keyword.control.export.tsx
1024− 2: storage.modifier.async.tsx
1160+ 2: storage.modifier.tsx
1161+ 3: storage.modifier.async.tsx
1025− 3: storage.type.function.tsx
1162+ 4: storage.type.function.tsx
1026− 4: keyword.generator.asterisk.tsx
1163+ 5: keyword.generator.asterisk.tsx
1027− 5: meta.definition.function.tsx entity.name.function.tsx
1164+ 6: meta.definition.function.tsx entity.name.function.tsx
1028 push:
1165 push:
1029 - meta_scope: meta.function.tsx
1166 - meta_scope: meta.function.tsx
1030− - match: '(?=$|^|;)|(?<=\})'
1167+ - match: '(?=;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|(?<=\})'
1031 pop: true
1168 pop: true
1032 - include: function-name
1169 - include: function-name
1033 - include: function-body
1170 - include: function-body
@@ -1040,9 +1177,10 @@ contexts:
1040 4: meta.definition.function.tsx entity.name.function.tsx
1177 4: meta.definition.function.tsx entity.name.function.tsx
1041 push:
1178 push:
1042 - meta_scope: meta.function.expression.tsx
1179 - meta_scope: meta.function.expression.tsx
1043− - match: '(?<=\})'
1180+ - match: '(?=;)|(?<=\})'
1044 pop: true
1181 pop: true
1045 - include: function-name
1182 - include: function-name
1183+ - include: single-line-comment-consuming-line-ending
1046 - include: function-body
1184 - include: function-body
1047 function-name:
1185 function-name:
1048 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1186 - match: "[_$[:alpha:]][_$[:alnum:]]*"
@@ -1060,10 +1198,11 @@ contexts:
1060 - include: function-parameters-body
1198 - include: function-parameters-body
1061 function-parameters-body:
1199 function-parameters-body:
1062 - include: comment
1200 - include: comment
1201+ - include: string
1063 - include: decorator
1202 - include: decorator
1064 - include: destructuring-parameter
1203 - include: destructuring-parameter
1065 - include: parameter-name
1204 - include: parameter-name
1066− - include: type-annotation
1205+ - include: parameter-type-annotation
1067 - include: variable-initializer
1206 - include: variable-initializer
1068 - match: ","
1207 - match: ","
1069 scope: punctuation.separator.parameter.tsx
1208 scope: punctuation.separator.parameter.tsx
@@ -1077,11 +1216,11 @@ contexts:
1077 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1216 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1078 )) |
1217 )) |
1079 ((async\s*)?(
1218 ((async\s*)?(
1080− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
1219+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1081 # sure shot arrow functions even if => is on new line
1220 # sure shot arrow functions even if => is on new line
1082 (
1221 (
1083− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
1222+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1084− [(]\s*
1223+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1085 (
1224 (
1086 ([)]\s*:) | # ():
1225 ([)]\s*:) | # ():
1087 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1226 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -1092,9 +1231,9 @@ contexts:
1092 ) |
1231 ) |
1093 # arrow function possible to detect only with => on same line
1232 # arrow function possible to detect only with => on same line
1094 (
1233 (
1095− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
1234+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1096− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
1235+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1097− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
1236+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1098 \s*=> # arrow operator
1237 \s*=> # arrow operator
1099 )
1238 )
1100 ))
1239 ))
@@ -1103,12 +1242,12 @@ contexts:
1103 1: punctuation.accessor.tsx
1242 1: punctuation.accessor.tsx
1104 2: punctuation.accessor.optional.tsx
1243 2: punctuation.accessor.optional.tsx
1105 3: entity.name.function.tsx
1244 3: entity.name.function.tsx
1106− - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])'
1245+ - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])'
1107 captures:
1246 captures:
1108 1: punctuation.accessor.tsx
1247 1: punctuation.accessor.tsx
1109 2: punctuation.accessor.optional.tsx
1248 2: punctuation.accessor.optional.tsx
1110 3: variable.other.constant.property.tsx
1249 3: variable.other.constant.property.tsx
1111− - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*([_$[:alpha:]][_$[:alnum:]]*)'
1250+ - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(\#?[_$[:alpha:]][_$[:alnum:]]*)'
1112 captures:
1251 captures:
1113 1: punctuation.accessor.tsx
1252 1: punctuation.accessor.tsx
1114 2: punctuation.accessor.optional.tsx
1253 2: punctuation.accessor.optional.tsx
@@ -1117,15 +1256,46 @@ contexts:
1117 scope: variable.other.constant.tsx
1256 scope: variable.other.constant.tsx
1118 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1257 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1119 scope: variable.other.readwrite.tsx
1258 scope: variable.other.readwrite.tsx
1259+ if-statement:
1260+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?=\bif\s*(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))\s*(?!\{))'
1261+ push:
1262+ - match: '(?=;|$|\})'
1263+ pop: true
1264+ - include: comment
1265+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(if)\s*(\()'
1266+ captures:
1267+ 1: keyword.control.conditional.tsx
1268+ 2: meta.brace.round.tsx
1269+ push:
1270+ - match: \)
1271+ captures:
1272+ 0: meta.brace.round.tsx
1273+ pop: true
1274+ - include: expression
1275+ - match: '(?<=\))\s*\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/([dgimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
1276+ captures:
1277+ 0: punctuation.definition.string.begin.tsx
1278+ push:
1279+ - meta_scope: string.regexp.tsx
1280+ - match: "(/)([dgimsuy]*)"
1281+ captures:
1282+ 1: punctuation.definition.string.end.tsx
1283+ 2: keyword.other.tsx
1284+ pop: true
1285+ - include: regexp
1286+ - include: statements
1120 import-declaration:
1287 import-declaration:
1121− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(import)(?!\s*[:\(])(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1288+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type)(?!\s+from))?(?!\s*[:\(])(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1122 captures:
1289 captures:
1123 1: keyword.control.export.tsx
1290 1: keyword.control.export.tsx
1291+ 2: storage.modifier.tsx
1124− 2: keyword.control.import.tsx
1292+ 3: keyword.control.import.tsx
1293+ 4: keyword.control.type.tsx
1125 push:
1294 push:
1126 - meta_scope: meta.import.tsx
1295 - meta_scope: meta.import.tsx
1127 - match: '(?<!^import|[^\._$[:alnum:]]import)(?=;|$|^)'
1296 - match: '(?<!^import|[^\._$[:alnum:]]import)(?=;|$|^)'
1128 pop: true
1297 pop: true
1298+ - include: single-line-comment-consuming-line-ending
1129 - include: comment
1299 - include: comment
1130 - include: string
1300 - include: string
1131 - match: '(?<=^import|[^\._$[:alnum:]]import)(?!\s*["''])'
1301 - match: '(?<=^import|[^\._$[:alnum:]]import)(?!\s*["''])'
@@ -1137,14 +1307,16 @@ contexts:
1137 - include: import-export-declaration
1307 - include: import-export-declaration
1138 - include: import-export-declaration
1308 - include: import-export-declaration
1139 import-equals-declaration:
1309 import-equals-declaration:
1140− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(import)\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(require)\s*(\()'
1310+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type))?\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(require)\s*(\()'
1141 captures:
1311 captures:
1142 1: keyword.control.export.tsx
1312 1: keyword.control.export.tsx
1313+ 2: storage.modifier.tsx
1143− 2: keyword.control.import.tsx
1314+ 3: keyword.control.import.tsx
1315+ 4: keyword.control.type.tsx
1144− 3: variable.other.readwrite.alias.tsx
1316+ 5: variable.other.readwrite.alias.tsx
1145− 4: keyword.operator.assignment.tsx
1317+ 6: keyword.operator.assignment.tsx
1146− 5: keyword.control.require.tsx
1318+ 7: keyword.control.require.tsx
1147− 6: meta.brace.round.tsx
1319+ 8: meta.brace.round.tsx
1148 push:
1320 push:
1149 - meta_scope: meta.import-equals.external.tsx
1321 - meta_scope: meta.import-equals.external.tsx
1150 - match: \)
1322 - match: \)
@@ -1153,16 +1325,19 @@ contexts:
1153 pop: true
1325 pop: true
1154 - include: comment
1326 - include: comment
1155 - include: string
1327 - include: string
1156− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(import)\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(?!require\b)'
1328+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type))?\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(?!require\b)'
1157 captures:
1329 captures:
1158 1: keyword.control.export.tsx
1330 1: keyword.control.export.tsx
1331+ 2: storage.modifier.tsx
1159− 2: keyword.control.import.tsx
1332+ 3: keyword.control.import.tsx
1333+ 4: keyword.control.type.tsx
1160− 3: variable.other.readwrite.alias.tsx
1334+ 5: variable.other.readwrite.alias.tsx
1161− 4: keyword.operator.assignment.tsx
1335+ 6: keyword.operator.assignment.tsx
1162 push:
1336 push:
1163 - meta_scope: meta.import-equals.internal.tsx
1337 - meta_scope: meta.import-equals.internal.tsx
1164 - match: (?=;|$|^)
1338 - match: (?=;|$|^)
1165 pop: true
1339 pop: true
1340+ - include: single-line-comment-consuming-line-ending
1166 - include: comment
1341 - include: comment
1167 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
1342 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
1168 captures:
1343 captures:
@@ -1184,7 +1359,7 @@ contexts:
1184 - include: import-export-clause
1359 - include: import-export-clause
1185 import-export-clause:
1360 import-export-clause:
1186 - include: comment
1361 - include: comment
1187− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bdefault)|(\*)|(\b[_$[:alpha:]][_$[:alnum:]]*))\s+(as)\s+(?:(\bdefault(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|(\b[_$[:alpha:]][_$[:alnum:]]*))'
1362+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bdefault)|(\*)|(\b[_$[:alpha:]][_$[:alnum:]]*))\s+(as)\s+(?:(default(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|([_$[:alpha:]][_$[:alnum:]]*))'
1188 captures:
1363 captures:
1189 1: keyword.control.default.tsx
1364 1: keyword.control.default.tsx
1190 2: constant.language.import-export-all.tsx
1365 2: constant.language.import-export-all.tsx
@@ -1236,6 +1411,9 @@ contexts:
1236 2: keyword.operator.type.modifier.tsx
1411 2: keyword.operator.type.modifier.tsx
1237 3: keyword.operator.optional.tsx
1412 3: keyword.operator.optional.tsx
1238 pop: true
1413 pop: true
1414+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+'
1415+ captures:
1416+ 1: keyword.control.as.tsx
1239 - include: type
1417 - include: type
1240 inline-tags:
1418 inline-tags:
1241 - match: '(\[)[^\]]+(\])(?={@(?:link|linkcode|linkplain|tutorial))'
1419 - match: '(\[)[^\]]+(\])(?={@(?:link|linkcode|linkplain|tutorial))'
@@ -1267,15 +1445,16 @@ contexts:
1267 captures:
1445 captures:
1268 1: keyword.operator.expression.instanceof.tsx
1446 1: keyword.operator.expression.instanceof.tsx
1269 push:
1447 push:
1270− - match: '(?<=\))|(?=[;),}\]:?]|\|\||\&\&|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1448+ - match: '(?<=\))|(?=[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|(([\&\~\^\|]\s*)?[_$[:alpha:]][_$[:alnum:]]*\s+instanceof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1271 pop: true
1449 pop: true
1272 - include: type
1450 - include: type
1273 interface-declaration:
1451 interface-declaration:
1274− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(export)\s+)?\b(?:(abstract)\s+)?\b(interface)\b(?=\s+|/[/*])'
1452+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(?:(abstract)\s+)?\b(interface)\b(?=\s+|/[/*])'
1275 captures:
1453 captures:
1276 1: keyword.control.export.tsx
1454 1: keyword.control.export.tsx
1277 2: storage.modifier.tsx
1455 2: storage.modifier.tsx
1456+ 3: storage.modifier.tsx
1278− 3: storage.type.interface.tsx
1457+ 4: storage.type.interface.tsx
1279 push:
1458 push:
1280 - meta_scope: meta.interface.tsx
1459 - meta_scope: meta.interface.tsx
1281 - match: '(?<=\})'
1460 - match: '(?<=\})'
@@ -1323,7 +1502,7 @@ contexts:
1323 captures:
1502 captures:
1324 0: punctuation.section.embedded.begin.tsx
1503 0: punctuation.section.embedded.begin.tsx
1325 push:
1504 push:
1326− - meta_scope: meta.embedded.expression.tsx
1505+ - meta_content_scope: meta.embedded.expression.tsx
1327 - match: '\}'
1506 - match: '\}'
1328 captures:
1507 captures:
1329 0: punctuation.section.embedded.end.tsx
1508 0: punctuation.section.embedded.end.tsx
@@ -1352,10 +1531,10 @@ contexts:
1352 pop: true
1531 pop: true
1353 - include: jsx-entities
1532 - include: jsx-entities
1354 jsx-tag:
1533 jsx-tag:
1355− - match: '(?=(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))'
1534+ - match: '(?=(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))'
1356 push:
1535 push:
1357 - meta_scope: meta.tag.tsx
1536 - meta_scope: meta.tag.tsx
1358− - match: '(/>)|(?:(</)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1537+ - match: '(/>)|(?:(</)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1359 captures:
1538 captures:
1360 1: punctuation.definition.tag.end.tsx
1539 1: punctuation.definition.tag.end.tsx
1361 2: punctuation.definition.tag.begin.tsx
1540 2: punctuation.definition.tag.begin.tsx
@@ -1365,7 +1544,7 @@ contexts:
1365 6: support.class.component.tsx
1544 6: support.class.component.tsx
1366 7: punctuation.definition.tag.end.tsx
1545 7: punctuation.definition.tag.end.tsx
1367 pop: true
1546 pop: true
1368− - match: '(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>)'
1547+ - match: '(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>)'
1369 captures:
1548 captures:
1370 1: punctuation.definition.tag.begin.tsx
1549 1: punctuation.definition.tag.begin.tsx
1371 2: entity.name.tag.namespace.tsx
1550 2: entity.name.tag.namespace.tsx
@@ -1393,8 +1572,8 @@ contexts:
1393 - match: |-
1572 - match: |-
1394 (?x)
1573 (?x)
1395 \s*
1574 \s*
1396− (?:([_$[:alpha:]][-$[:alnum:].]*)(:))?
1575+ (?:([_$[:alpha:]][-_$[:alnum:].]*)(:))?
1397− ([_$[:alpha:]][-$[:alnum:]]*)
1576+ ([_$[:alpha:]][-_$[:alnum:]]*)
1398 (?=\s|=|/?>|/\*|//)
1577 (?=\s|=|/?>|/\*|//)
1399 captures:
1578 captures:
1400 1: entity.other.attribute-name.namespace.tsx
1579 1: entity.other.attribute-name.namespace.tsx
@@ -1419,15 +1598,15 @@ contexts:
1419 jsx-tag-in-expression:
1598 jsx-tag-in-expression:
1420 - match: |-
1599 - match: |-
1421 (?x)
1600 (?x)
1422− (?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*
1601+ (?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|\*\/|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*
1423 (?!<\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s+[^=>])|,)) # look ahead is not type parameter of arrow
1602 (?!<\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s+[^=>])|,)) # look ahead is not type parameter of arrow
1424− (?=(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))
1603+ (?=(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))
1425 push:
1604 push:
1426− - match: '(?!(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))'
1605+ - match: '(?!(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))'
1427 pop: true
1606 pop: true
1428 - include: jsx-tag
1607 - include: jsx-tag
1429 jsx-tag-without-attributes:
1608 jsx-tag-without-attributes:
1430− - match: '(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>)'
1609+ - match: '(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>)'
1431 captures:
1610 captures:
1432 1: punctuation.definition.tag.begin.tsx
1611 1: punctuation.definition.tag.begin.tsx
1433 2: entity.name.tag.namespace.tsx
1612 2: entity.name.tag.namespace.tsx
@@ -1438,7 +1617,7 @@ contexts:
1438 push:
1617 push:
1439 - meta_scope: meta.tag.without-attributes.tsx
1618 - meta_scope: meta.tag.without-attributes.tsx
1440 - meta_content_scope: meta.jsx.children.tsx
1619 - meta_content_scope: meta.jsx.children.tsx
1441− - match: '(</)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>)'
1620+ - match: '(</)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>)'
1442 captures:
1621 captures:
1443 1: punctuation.definition.tag.begin.tsx
1622 1: punctuation.definition.tag.begin.tsx
1444 2: entity.name.tag.namespace.tsx
1623 2: entity.name.tag.namespace.tsx
@@ -1449,9 +1628,9 @@ contexts:
1449 pop: true
1628 pop: true
1450 - include: jsx-children
1629 - include: jsx-children
1451 jsx-tag-without-attributes-in-expression:
1630 jsx-tag-without-attributes-in-expression:
1452− - match: '(?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*(?=(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1631+ - match: '(?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|\*\/|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*(?=(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1453 push:
1632 push:
1454− - match: '(?!(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1633+ - match: '(?!(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1455 pop: true
1634 pop: true
1456 - include: jsx-tag-without-attributes
1635 - include: jsx-tag-without-attributes
1457 label:
1636 label:
@@ -1477,25 +1656,27 @@ contexts:
1477 - include: this-literal
1656 - include: this-literal
1478 - include: super-literal
1657 - include: super-literal
1479 method-declaration:
1658 method-declaration:
1480− - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?\s*\b(constructor)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1659+ - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?\s*\b(constructor)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1481 captures:
1660 captures:
1482 1: storage.modifier.tsx
1661 1: storage.modifier.tsx
1483 2: storage.modifier.tsx
1662 2: storage.modifier.tsx
1484− 3: storage.modifier.async.tsx
1663+ 3: storage.modifier.tsx
1664+ 4: storage.modifier.async.tsx
1485− 4: storage.type.tsx
1665+ 5: storage.type.tsx
1486 push:
1666 push:
1487 - meta_scope: meta.method.declaration.tsx
1667 - meta_scope: meta.method.declaration.tsx
1488 - match: '(?=\}|;|,|$)|(?<=\})'
1668 - match: '(?=\}|;|,|$)|(?<=\})'
1489 pop: true
1669 pop: true
1490 - include: method-declaration-name
1670 - include: method-declaration-name
1491 - include: function-body
1671 - include: function-body
1492− - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:(?:\s*\b(new)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|(?:(\*)\s*)?)(?=\s*[\(\<])'
1672+ - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(override)\s+)?(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:(?:\s*\b(new)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|(?:(\*)\s*)?)(?=\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])'
1493 captures:
1673 captures:
1494 1: storage.modifier.tsx
1674 1: storage.modifier.tsx
1495 2: storage.modifier.tsx
1675 2: storage.modifier.tsx
1496− 3: storage.modifier.async.tsx
1676+ 3: storage.modifier.tsx
1677+ 4: storage.modifier.async.tsx
1497− 4: keyword.operator.new.tsx
1678+ 5: keyword.operator.new.tsx
1498− 5: keyword.generator.asterisk.tsx
1679+ 6: keyword.generator.asterisk.tsx
1499 push:
1680 push:
1500 - meta_scope: meta.method.declaration.tsx
1681 - meta_scope: meta.method.declaration.tsx
1501 - match: '(?=\}|;|,|$)|(?<=\})'
1682 - match: '(?=\}|;|,|$)|(?<=\})'
@@ -1503,22 +1684,23 @@ contexts:
1503 - include: method-declaration-name
1684 - include: method-declaration-name
1504 - include: function-body
1685 - include: function-body
1505 - match: |-
1686 - match: |-
1506− (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\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_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1687+ (?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(?!\$))|((?<!\$)(?:
1507− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1688+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1508− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1689+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1509− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1690+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1510− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1691+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1511− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1692+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1512− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1693+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1513− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1694+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1514− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1695+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1515− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*[\(\<])
1696+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1516 captures:
1697 captures:
1517 1: storage.modifier.tsx
1698 1: storage.modifier.tsx
1518 2: storage.modifier.tsx
1699 2: storage.modifier.tsx
1519− 3: storage.modifier.async.tsx
1700+ 3: storage.modifier.tsx
1701+ 4: storage.modifier.async.tsx
1520− 4: storage.type.property.tsx
1702+ 5: storage.type.property.tsx
1521− 5: keyword.generator.asterisk.tsx
1703+ 6: keyword.generator.asterisk.tsx
1522 push:
1704 push:
1523 - meta_scope: meta.method.declaration.tsx
1705 - meta_scope: meta.method.declaration.tsx
1524 - match: '(?=\}|;|,|$)|(?<=\})'
1706 - match: '(?=\}|;|,|$)|(?<=\})'
@@ -1527,16 +1709,16 @@ contexts:
1527 - include: function-body
1709 - include: function-body
1528 method-declaration-name:
1710 method-declaration-name:
1529 - match: |-
1711 - match: |-
1530− (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1712+ (?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(?!\$))|((?<!\$)(?:
1531− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1713+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1532− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1714+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1533− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1715+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1534− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1716+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1535− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1717+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1536− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1718+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1537− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1719+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1538− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1720+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1539− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??)\s*[\(\<])
1721+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??)\s*[\(\<])
1540 push:
1722 push:
1541 - match: (?=\(|\<)
1723 - match: (?=\(|\<)
1542 pop: true
1724 pop: true
@@ -1548,13 +1730,14 @@ contexts:
1548 - match: \?
1730 - match: \?
1549 scope: keyword.operator.optional.tsx
1731 scope: keyword.operator.optional.tsx
1550 namespace-declaration:
1732 namespace-declaration:
1551− - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(namespace|module)\s+(?=[_$[:alpha:]"''`]))'
1733+ - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(namespace|module)\s+(?=[_$[:alpha:]"''`]))'
1552 captures:
1734 captures:
1553 1: keyword.control.export.tsx
1735 1: keyword.control.export.tsx
1736+ 2: storage.modifier.tsx
1554− 2: storage.type.namespace.tsx
1737+ 3: storage.type.namespace.tsx
1555 push:
1738 push:
1556 - meta_scope: meta.namespace.declaration.tsx
1739 - meta_scope: meta.namespace.declaration.tsx
1557− - match: '(?<=\})|(?=;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)'
1740+ - match: '(?<=\})|(?=;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
1558 pop: true
1741 pop: true
1559 - include: comment
1742 - include: comment
1560 - include: string
1743 - include: string
@@ -1568,41 +1751,53 @@ contexts:
1568 1: keyword.operator.new.tsx
1751 1: keyword.operator.new.tsx
1569 push:
1752 push:
1570 - meta_scope: new.expr.tsx
1753 - meta_scope: new.expr.tsx
1571− - match: '(?<=\))|(?=[;),}\]:]|\|\||\&\&|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))new(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1754+ - match: '(?<=\))|(?=[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))new(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1572 pop: true
1755 pop: true
1573− - include: paren-expression
1756+ - include: expression
1574− - include: class-declaration
1575− - include: type
1576 null-literal:
1757 null-literal:
1577 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))null(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1758 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))null(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1578 scope: constant.language.null.tsx
1759 scope: constant.language.null.tsx
1579 numeric-literal:
1760 numeric-literal:
1580− - match: '\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$)'
1761+ - match: '\b(?<!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$)'
1581 scope: constant.numeric.hex.tsx
1762 scope: constant.numeric.hex.tsx
1763+ captures:
1764+ 1: storage.type.numeric.bigint.tsx
1582− - match: '\b(?<!\$)0(b|B)[01][01_]*\b(?!\$)'
1765+ - match: '\b(?<!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$)'
1583 scope: constant.numeric.binary.tsx
1766 scope: constant.numeric.binary.tsx
1767+ captures:
1768+ 1: storage.type.numeric.bigint.tsx
1584− - match: '\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$)'
1769+ - match: '\b(?<!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$)'
1585 scope: constant.numeric.octal.tsx
1770 scope: constant.numeric.octal.tsx
1771+ captures:
1772+ 1: storage.type.numeric.bigint.tsx
1586 - match: |-
1773 - match: |-
1587 (?x)
1774 (?x)
1588 (?<!\$)(?:
1775 (?<!\$)(?:
1589− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1776+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1590− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1777+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1591− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1778+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1592− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1779+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1593− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1780+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1594− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1781+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1595− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1782+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1596− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1783+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1597 )(?!\$)
1784 )(?!\$)
1598 captures:
1785 captures:
1599 0: constant.numeric.decimal.tsx
1786 0: constant.numeric.decimal.tsx
1600 1: meta.delimiter.decimal.period.tsx
1787 1: meta.delimiter.decimal.period.tsx
1601− 2: meta.delimiter.decimal.period.tsx
1788+ 2: storage.type.numeric.bigint.tsx
1602 3: meta.delimiter.decimal.period.tsx
1789 3: meta.delimiter.decimal.period.tsx
1603− 4: meta.delimiter.decimal.period.tsx
1790+ 4: storage.type.numeric.bigint.tsx
1604 5: meta.delimiter.decimal.period.tsx
1791 5: meta.delimiter.decimal.period.tsx
1792+ 6: storage.type.numeric.bigint.tsx
1793+ 7: storage.type.numeric.bigint.tsx
1794+ 8: meta.delimiter.decimal.period.tsx
1795+ 9: storage.type.numeric.bigint.tsx
1605− 6: meta.delimiter.decimal.period.tsx
1796+ 10: meta.delimiter.decimal.period.tsx
1797+ 11: storage.type.numeric.bigint.tsx
1798+ 12: meta.delimiter.decimal.period.tsx
1799+ 13: storage.type.numeric.bigint.tsx
1800+ 14: storage.type.numeric.bigint.tsx
1606 numericConstant-literal:
1801 numericConstant-literal:
1607 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))NaN(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1802 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))NaN(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1608 scope: constant.language.nan.tsx
1803 scope: constant.language.nan.tsx
@@ -1611,16 +1806,16 @@ contexts:
1611 object-binding-element:
1806 object-binding-element:
1612 - include: comment
1807 - include: comment
1613 - match: |-
1808 - match: |-
1614− (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1809+ (?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(?!\$))|((?<!\$)(?:
1615− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1810+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1616− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1811+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1617− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1812+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1618− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1813+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1619− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1814+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1620− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1815+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1621− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1816+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1622− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1817+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1623− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1818+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1624 push:
1819 push:
1625 - match: '(?=,|\})'
1820 - match: '(?=,|\})'
1626 pop: true
1821 pop: true
@@ -1633,16 +1828,16 @@ contexts:
1633 object-binding-element-const:
1828 object-binding-element-const:
1634 - include: comment
1829 - include: comment
1635 - match: |-
1830 - match: |-
1636− (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1831+ (?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(?!\$))|((?<!\$)(?:
1637− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1832+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1638− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1833+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1639− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1834+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1640− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1835+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1641− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1836+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1642− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1837+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1643− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1838+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1644− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1839+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1645− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1840+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1646 push:
1841 push:
1647 - match: '(?=,|\})'
1842 - match: '(?=,|\})'
1648 pop: true
1843 pop: true
@@ -1654,16 +1849,16 @@ contexts:
1654 - include: punctuation-comma
1849 - include: punctuation-comma
1655 object-binding-element-propertyName:
1850 object-binding-element-propertyName:
1656 - match: |-
1851 - match: |-
1657− (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1852+ (?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(?!\$))|((?<!\$)(?:
1658− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1853+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1659− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1854+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1660− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1855+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1661− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1856+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1662− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1857+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1663− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1858+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1664− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1859+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1665− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1860+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1666− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1861+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1667 push:
1862 push:
1668 - match: (:)
1863 - match: (:)
1669 captures:
1864 captures:
@@ -1701,9 +1896,9 @@ contexts:
1701 scope: support.class.tsx
1896 scope: support.class.tsx
1702 - match: |-
1897 - match: |-
1703 (?x)(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(?:
1898 (?x)(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(?:
1704− ([[:upper:]][_$[:digit:][:upper:]]*) |
1899+ (\#?[[:upper:]][_$[:digit:][:upper:]]*) |
1705− ([_$[:alpha:]][_$[:alnum:]]*)
1900+ (\#?[_$[:alpha:]][_$[:alnum:]]*)
1706− )(?=\s*\??\.\s*[_$[:alpha:]][_$[:alnum:]]*)
1901+ )(?=\s*\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*)
1707 captures:
1902 captures:
1708 1: punctuation.accessor.tsx
1903 1: punctuation.accessor.tsx
1709 2: punctuation.accessor.optional.tsx
1904 2: punctuation.accessor.optional.tsx
@@ -1713,7 +1908,7 @@ contexts:
1713 (?x)(?:
1908 (?x)(?:
1714 ([[:upper:]][_$[:digit:][:upper:]]*) |
1909 ([[:upper:]][_$[:digit:][:upper:]]*) |
1715 ([_$[:alpha:]][_$[:alnum:]]*)
1910 ([_$[:alpha:]][_$[:alnum:]]*)
1716− )(?=\s*\??\.\s*[_$[:alpha:]][_$[:alnum:]]*)
1911+ )(?=\s*\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*)
1717 captures:
1912 captures:
1718 1: variable.other.constant.object.tsx
1913 1: variable.other.constant.object.tsx
1719 2: variable.other.object.tsx
1914 2: variable.other.object.tsx
@@ -1730,16 +1925,16 @@ contexts:
1730 - include: object-member
1925 - include: object-member
1731 object-literal-method-declaration:
1926 object-literal-method-declaration:
1732 - match: |-
1927 - match: |-
1733− (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1928+ (?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(?!\$))|((?<!\$)(?:
1734− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1929+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1735− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1930+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1736− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1931+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1737− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1932+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1738− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1933+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1739− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1934+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1740− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1935+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1741− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1936+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1742− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*[\(\<])
1937+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1743 captures:
1938 captures:
1744 1: storage.modifier.async.tsx
1939 1: storage.modifier.async.tsx
1745 2: storage.type.property.tsx
1940 2: storage.type.property.tsx
@@ -1751,16 +1946,16 @@ contexts:
1751 - include: method-declaration-name
1946 - include: method-declaration-name
1752 - include: function-body
1947 - include: function-body
1753 - match: |-
1948 - match: |-
1754− (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1949+ (?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(?!\$))|((?<!\$)(?:
1755− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1950+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1756− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1951+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1757− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1952+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1758− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1953+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1759− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1954+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1760− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1955+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1761− (?:\B(\.)[0-9][0-9_]*\b)| # .1
1956+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1762− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1957+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1763− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*[\(\<])
1958+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])
1764 captures:
1959 captures:
1765 1: storage.modifier.async.tsx
1960 1: storage.modifier.async.tsx
1766 2: storage.type.property.tsx
1961 2: storage.type.property.tsx
@@ -1777,37 +1972,56 @@ contexts:
1777 - meta_scope: meta.object.member.tsx meta.object-literal.key.tsx
1972 - meta_scope: meta.object.member.tsx meta.object-literal.key.tsx
1778 - match: '(?=:)|((?<=[\]])(?=\s*[\(\<]))'
1973 - match: '(?=:)|((?<=[\]])(?=\s*[\(\<]))'
1779 pop: true
1974 pop: true
1975+ - include: comment
1780 - include: array-literal
1976 - include: array-literal
1781− - match: '(?=[\''\"])'
1977+ - match: '(?=[\''\"\`])'
1782 push:
1978 push:
1783 - meta_scope: meta.object.member.tsx meta.object-literal.key.tsx
1979 - meta_scope: meta.object.member.tsx meta.object-literal.key.tsx
1784− - match: '(?=:)|((?<=[\''\"])(?=\s*[\(\<]))'
1980+ - match: '(?=:)|((?<=[\''\"\`])(?=((\s*[\(\<,}])|(\s+(as)\s+))))'
1785 pop: true
1981 pop: true
1982+ - include: comment
1786 - include: string
1983 - include: string
1787− - match: '(?<=[\]\''\"])(?=\s*[\(\<])'
1984+ - match: |-
1985+ (?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(?!\$))|((?<!\$)(?:
1986+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
1987+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
1988+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
1989+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
1990+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
1991+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
1992+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
1993+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
1994+ )(?!\$)))
1995+ push:
1996+ - meta_scope: meta.object.member.tsx meta.object-literal.key.tsx
1997+ - match: '(?=:)|(?=\s*([\(\<,}])|(\s+as\s+))'
1998+ pop: true
1999+ - include: comment
2000+ - include: numeric-literal
2001+ - match: '(?<=[\]\''\"\`])(?=\s*[\(\<])'
1788 push:
2002 push:
1789 - meta_scope: meta.method.declaration.tsx
2003 - meta_scope: meta.method.declaration.tsx
1790 - match: '(?=\}|;|,)|(?<=\})'
2004 - match: '(?=\}|;|,)|(?<=\})'
1791 pop: true
2005 pop: true
1792 - include: function-body
2006 - include: function-body
1793− - match: '(?![_$[:alpha:]])([[:digit:]]+)\s*(?=:)'
2007+ - match: '(?![_$[:alpha:]])([[:digit:]]+)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:)'
1794 scope: meta.object.member.tsx
2008 scope: meta.object.member.tsx
1795 captures:
2009 captures:
1796 0: meta.object-literal.key.tsx
2010 0: meta.object-literal.key.tsx
1797 1: constant.numeric.decimal.tsx
2011 1: constant.numeric.decimal.tsx
1798 - match: |-
2012 - match: |-
1799− (?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\s*(?=:\s*(
2013+ (?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:(\s*\/\*([^\*]|(\*[^\/]))*\*\/)*\s*(
1800 ((async\s+)?(
2014 ((async\s+)?(
1801 (function\s*[(<*]) |
2015 (function\s*[(<*]) |
1802 (function\s+) |
2016 (function\s+) |
1803 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2017 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1804 )) |
2018 )) |
1805 ((async\s*)?(
2019 ((async\s*)?(
1806− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
2020+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1807 # sure shot arrow functions even if => is on new line
2021 # sure shot arrow functions even if => is on new line
1808 (
2022 (
1809− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
2023+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1810− [(]\s*
2024+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1811 (
2025 (
1812 ([)]\s*:) | # ():
2026 ([)]\s*:) | # ():
1813 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
2027 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -1818,9 +2032,9 @@ contexts:
1818 ) |
2032 ) |
1819 # arrow function possible to detect only with => on same line
2033 # arrow function possible to detect only with => on same line
1820 (
2034 (
1821− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
2035+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1822− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
2036+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1823− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
2037+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1824 \s*=> # arrow operator
2038 \s*=> # arrow operator
1825 )
2039 )
1826 ))
2040 ))
@@ -1829,7 +2043,7 @@ contexts:
1829 captures:
2043 captures:
1830 0: meta.object-literal.key.tsx
2044 0: meta.object-literal.key.tsx
1831 1: entity.name.function.tsx
2045 1: entity.name.function.tsx
1832− - match: '(?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=:)'
2046+ - match: '(?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:)'
1833 scope: meta.object.member.tsx
2047 scope: meta.object.member.tsx
1834 captures:
2048 captures:
1835 0: meta.object-literal.key.tsx
2049 0: meta.object-literal.key.tsx
@@ -1841,14 +2055,27 @@ contexts:
1841 - match: '(?=,|\})'
2055 - match: '(?=,|\})'
1842 pop: true
2056 pop: true
1843 - include: expression
2057 - include: expression
1844− - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=,|\}|$)'
2058+ - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=,|\}|$|\/\/|\/\*)'
1845 scope: meta.object.member.tsx
2059 scope: meta.object.member.tsx
1846 captures:
2060 captures:
1847 1: variable.other.readwrite.tsx
2061 1: variable.other.readwrite.tsx
2062+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+(const)(?=\s*([,}]|$))'
2063+ scope: meta.object.member.tsx
2064+ captures:
2065+ 1: keyword.control.as.tsx
2066+ 2: storage.modifier.tsx
2067+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+'
2068+ captures:
2069+ 1: keyword.control.as.tsx
2070+ push:
2071+ - meta_scope: meta.object.member.tsx
2072+ - match: '(?=[;),}\]:?\-\+\>]|\|\||\&\&|\!\=\=|$|^|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+))'
2073+ pop: true
2074+ - include: type
1848 - match: '(?=[_$[:alpha:]][_$[:alnum:]]*\s*=)'
2075 - match: '(?=[_$[:alpha:]][_$[:alnum:]]*\s*=)'
1849 push:
2076 push:
1850 - meta_scope: meta.object.member.tsx
2077 - meta_scope: meta.object.member.tsx
1851− - match: '(?=,|\}|$)'
2078+ - match: '(?=,|\}|$|\/\/|\/\*)'
1852 pop: true
2079 pop: true
1853 - include: expression
2080 - include: expression
1854 - match: ":"
2081 - match: ":"
@@ -1858,7 +2085,7 @@ contexts:
1858 - meta_scope: meta.object.member.tsx
2085 - meta_scope: meta.object.member.tsx
1859 - match: '(?=,|\})'
2086 - match: '(?=,|\})'
1860 pop: true
2087 pop: true
1861− - match: '(?<=:)\s*(async)?(?=\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)\(\s*([\{\[]\s*)?$)'
2088+ - match: '(?<=:)\s*(async)?(?=\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
1862 captures:
2089 captures:
1863 1: storage.modifier.async.tsx
2090 1: storage.modifier.async.tsx
1864 push:
2091 push:
@@ -1874,7 +2101,7 @@ contexts:
1874 0: meta.brace.round.tsx
2101 0: meta.brace.round.tsx
1875 pop: true
2102 pop: true
1876 - include: expression-inside-possibly-arrow-parens
2103 - include: expression-inside-possibly-arrow-parens
1877− - match: '(?<=:)\s*(async)?\s*(\()(?=\s*([\{\[]\s*)?$)'
2104+ - match: '(?<=:)\s*(async)?\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
1878 captures:
2105 captures:
1879 1: storage.modifier.async.tsx
2106 1: storage.modifier.async.tsx
1880 2: meta.brace.round.tsx
2107 2: meta.brace.round.tsx
@@ -1884,6 +2111,23 @@ contexts:
1884 0: meta.brace.round.tsx
2111 0: meta.brace.round.tsx
1885 pop: true
2112 pop: true
1886 - include: expression-inside-possibly-arrow-parens
2113 - include: expression-inside-possibly-arrow-parens
2114+ - match: (?<=:)\s*(async)?\s*(?=\<\s*$)
2115+ captures:
2116+ 1: storage.modifier.async.tsx
2117+ push:
2118+ - match: (?<=\>)
2119+ pop: true
2120+ - include: type-parameters
2121+ - match: '(?<=\>)\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
2122+ captures:
2123+ 1: meta.brace.round.tsx
2124+ push:
2125+ - match: \)
2126+ captures:
2127+ 0: meta.brace.round.tsx
2128+ pop: true
2129+ - include: expression-inside-possibly-arrow-parens
2130+ - include: possibly-arrow-return-type
1887 - include: expression
2131 - include: expression
1888 - include: punctuation-comma
2132 - include: punctuation-comma
1889 parameter-array-binding-pattern:
2133 parameter-array-binding-pattern:
@@ -1901,16 +2145,18 @@ contexts:
1901 parameter-binding-element:
2145 parameter-binding-element:
1902 - include: comment
2146 - include: comment
1903 - include: string
2147 - include: string
2148+ - include: numeric-literal
2149+ - include: regex
1904 - include: parameter-object-binding-pattern
2150 - include: parameter-object-binding-pattern
1905 - include: parameter-array-binding-pattern
2151 - include: parameter-array-binding-pattern
1906 - include: destructuring-parameter-rest
2152 - include: destructuring-parameter-rest
1907 - include: variable-initializer
2153 - include: variable-initializer
1908 parameter-name:
2154 parameter-name:
1909− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|protected|private|readonly)\s+(?=(public|protected|private|readonly)\s+)'
2155+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|protected|private|readonly)\s+(?=(override|public|protected|private|readonly)\s+)'
1910 captures:
2156 captures:
1911 1: storage.modifier.tsx
2157 1: storage.modifier.tsx
1912 - match: |-
2158 - match: |-
1913− (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*
2159+ (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*
1914 # function assignment |
2160 # function assignment |
1915 (=\s*(
2161 (=\s*(
1916 ((async\s+)?(
2162 ((async\s+)?(
@@ -1919,11 +2165,11 @@ contexts:
1919 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2165 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1920 )) |
2166 )) |
1921 ((async\s*)?(
2167 ((async\s*)?(
1922− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
2168+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1923 # sure shot arrow functions even if => is on new line
2169 # sure shot arrow functions even if => is on new line
1924 (
2170 (
1925− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
2171+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1926− [(]\s*
2172+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1927 (
2173 (
1928 ([)]\s*:) | # ():
2174 ([)]\s*:) | # ():
1929 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
2175 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -1934,9 +2180,9 @@ contexts:
1934 ) |
2180 ) |
1935 # arrow function possible to detect only with => on same line
2181 # arrow function possible to detect only with => on same line
1936 (
2182 (
1937− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
2183+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1938− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
2184+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1939− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
2185+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1940 \s*=> # arrow operator
2186 \s*=> # arrow operator
1941 )
2187 )
1942 ))
2188 ))
@@ -1953,19 +2199,20 @@ contexts:
1953 ))
2199 ))
1954 ))
2200 ))
1955 )) |
2201 )) |
1956− (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) |
2202+ (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
1957− (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
2203+ (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
2204+ (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
1958 ((async\s+)?(
2205 ((async\s+)?(
1959 (function\s*[(<*]) |
2206 (function\s*[(<*]) |
1960 (function\s+) |
2207 (function\s+) |
1961 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2208 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1962 )) |
2209 )) |
1963 ((async\s*)?(
2210 ((async\s*)?(
1964− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
2211+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
1965 # sure shot arrow functions even if => is on new line
2212 # sure shot arrow functions even if => is on new line
1966 (
2213 (
1967− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
2214+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
1968− [(]\s*
2215+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
1969 (
2216 (
1970 ([)]\s*:) | # ():
2217 ([)]\s*:) | # ():
1971 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
2218 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -1976,9 +2223,9 @@ contexts:
1976 ) |
2223 ) |
1977 # arrow function possible to detect only with => on same line
2224 # arrow function possible to detect only with => on same line
1978 (
2225 (
1979− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
2226+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
1980− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
2227+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
1981− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
2228+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
1982 \s*=> # arrow operator
2229 \s*=> # arrow operator
1983 )
2230 )
1984 ))
2231 ))
@@ -1989,7 +2236,7 @@ contexts:
1989 3: entity.name.function.tsx variable.language.this.tsx
2236 3: entity.name.function.tsx variable.language.this.tsx
1990 4: entity.name.function.tsx
2237 4: entity.name.function.tsx
1991 5: keyword.operator.optional.tsx
2238 5: keyword.operator.optional.tsx
1992− - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)'
2239+ - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(override|public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)'
1993 captures:
2240 captures:
1994 1: storage.modifier.tsx
2241 1: storage.modifier.tsx
1995 2: keyword.operator.rest.tsx
2242 2: keyword.operator.rest.tsx
@@ -1999,16 +2246,16 @@ contexts:
1999 parameter-object-binding-element:
2246 parameter-object-binding-element:
2000 - include: comment
2247 - include: comment
2001 - match: |-
2248 - match: |-
2002− (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
2249+ (?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(?!\$))|((?<!\$)(?:
2003− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
2250+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
2004− (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
2251+ (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
2005− (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
2252+ (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
2006− (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
2253+ (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
2007− (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
2254+ (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
2008− (?:\b[0-9][0-9_]*(\.)\B)| # 1.
2255+ (?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
2009− (?:\B(\.)[0-9][0-9_]*\b)| # .1
2256+ (?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
2010− (?:\b[0-9][0-9_]*\b(?!\.)) # 1
2257+ (?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
2011− )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
2258+ )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
2012 push:
2259 push:
2013 - match: '(?=,|\})'
2260 - match: '(?=,|\})'
2014 pop: true
2261 pop: true
@@ -2029,6 +2276,15 @@ contexts:
2029 0: punctuation.definition.binding-pattern.object.tsx
2276 0: punctuation.definition.binding-pattern.object.tsx
2030 pop: true
2277 pop: true
2031 - include: parameter-object-binding-element
2278 - include: parameter-object-binding-element
2279+ parameter-type-annotation:
2280+ - match: (:)
2281+ captures:
2282+ 1: keyword.operator.type.annotation.tsx
2283+ push:
2284+ - meta_scope: meta.type.annotation.tsx
2285+ - match: "(?=[,)])|(?==[^>])"
2286+ pop: true
2287+ - include: type
2032 paren-expression:
2288 paren-expression:
2033 - match: \(
2289 - match: \(
2034 captures:
2290 captures:
@@ -2040,14 +2296,14 @@ contexts:
2040 pop: true
2296 pop: true
2041 - include: expression
2297 - include: expression
2042 paren-expression-possibly-arrow:
2298 paren-expression-possibly-arrow:
2043− - match: '(?<=[(=,])\s*(async)?(?=\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*))?\(\s*[\{\[]\s*$)'
2299+ - match: '(?<=[(=,])\s*(async)?(?=\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
2044 captures:
2300 captures:
2045 1: storage.modifier.async.tsx
2301 1: storage.modifier.async.tsx
2046 push:
2302 push:
2047 - match: (?<=\))
2303 - match: (?<=\))
2048 pop: true
2304 pop: true
2049 - include: paren-expression-possibly-arrow-with-typeparameters
2305 - include: paren-expression-possibly-arrow-with-typeparameters
2050− - match: '(?<=[(=,]|=>)\s*(async)?(?=\s*((((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*))?\()|(<))\s*$)'
2306+ - match: '(?<=[(=,]|=>|^return|[^\._$[:alnum:]]return)\s*(async)?(?=\s*((((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\()|(<))\s*$)'
2051 captures:
2307 captures:
2052 1: storage.modifier.async.tsx
2308 1: storage.modifier.async.tsx
2053 push:
2309 push:
@@ -2067,7 +2323,7 @@ contexts:
2067 pop: true
2323 pop: true
2068 - include: expression-inside-possibly-arrow-parens
2324 - include: expression-inside-possibly-arrow-parens
2069 possibly-arrow-return-type:
2325 possibly-arrow-return-type:
2070− - match: '(?<=\))\s*(:)(?=\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+\s*=>)'
2326+ - match: '(?<=\)|^)\s*(:)(?=\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*=>)'
2071 captures:
2327 captures:
2072 1: meta.arrow.tsx meta.return.type.arrow.tsx keyword.operator.type.annotation.tsx
2328 1: meta.arrow.tsx meta.return.type.arrow.tsx keyword.operator.type.annotation.tsx
2073 push:
2329 push:
@@ -2114,23 +2370,23 @@ contexts:
2114 pop: true
2370 pop: true
2115 - include: string-character-escape
2371 - include: string-character-escape
2116 regex:
2372 regex:
2117− - match: '(?<!\+\+|--|})(?<=[=(:,\[?+!]|^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case|=>|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/[gimsuy]*(?!\s*[a-zA-Z0-9_$]))'
2373+ - match: '(?<!\+\+|--|})(?<=[=(:,\[?+!]|^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case|=>|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[\()]|\\.|\[([^\]\\]|\\.)+\]|\(([^\)\\]|\\.)+\))+\/([dgimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
2118 captures:
2374 captures:
2119 1: punctuation.definition.string.begin.tsx
2375 1: punctuation.definition.string.begin.tsx
2120 push:
2376 push:
2121 - meta_scope: string.regexp.tsx
2377 - meta_scope: string.regexp.tsx
2122− - match: "(/)([gimsuy]*)"
2378+ - match: "(/)([dgimsuy]*)"
2123 captures:
2379 captures:
2124 1: punctuation.definition.string.end.tsx
2380 1: punctuation.definition.string.end.tsx
2125 2: keyword.other.tsx
2381 2: keyword.other.tsx
2126 pop: true
2382 pop: true
2127 - include: regexp
2383 - include: regexp
2128− - match: '(?<![_$[:alnum:])\]]|\+\+|--|})\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/[gimsuy]*(?!\s*[a-zA-Z0-9_$]))'
2384+ - match: '((?<![_$[:alnum:])\]]|\+\+|--|}|\*\/)|((?<=^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case))\s*)\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/([dgimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
2129 captures:
2385 captures:
2130 0: punctuation.definition.string.begin.tsx
2386 0: punctuation.definition.string.begin.tsx
2131 push:
2387 push:
2132 - meta_scope: string.regexp.tsx
2388 - meta_scope: string.regexp.tsx
2133− - match: "(/)([gimsuy]*)"
2389+ - match: "(/)([dgimsuy]*)"
2134 captures:
2390 captures:
2135 1: punctuation.definition.string.end.tsx
2391 1: punctuation.definition.string.end.tsx
2136 2: keyword.other.tsx
2392 2: keyword.other.tsx
@@ -2230,10 +2486,24 @@ contexts:
2230 - include: type-object
2486 - include: type-object
2231 - include: type-predicate-operator
2487 - include: type-predicate-operator
2232 - include: type
2488 - include: type
2489+ shebang:
2490+ - match: \A(#!).*(?=$)
2491+ scope: comment.line.shebang.tsx
2492+ captures:
2493+ 1: punctuation.definition.comment.tsx
2494+ single-line-comment-consuming-line-ending:
2495+ - match: '(^[ \t]+)?((//)(?:\s*((@)internal)(?=\s|$))?)'
2496+ captures:
2497+ 1: punctuation.whitespace.comment.leading.tsx
2498+ 2: comment.line.double-slash.tsx
2499+ 3: punctuation.definition.comment.tsx
2500+ 4: storage.type.internaldeclaration.tsx
2501+ 5: punctuation.decorator.internaldeclaration.tsx
2502+ push:
2503+ - meta_content_scope: comment.line.double-slash.tsx
2504+ - match: (?=^)
2505+ pop: true
2233 statements:
2506 statements:
2234− - include: string
2235− - include: template
2236− - include: comment
2237 - include: declaration
2507 - include: declaration
2238 - include: control-statement
2508 - include: control-statement
2239 - include: after-operator-block-as-object-literal
2509 - include: after-operator-block-as-object-literal
@@ -2241,21 +2511,31 @@ contexts:
2241 - include: label
2511 - include: label
2242 - include: expression
2512 - include: expression
2243 - include: punctuation-semicolon
2513 - include: punctuation-semicolon
2514+ - include: string
2515+ - include: comment
2244 string:
2516 string:
2245 - include: qstring-single
2517 - include: qstring-single
2246 - include: qstring-double
2518 - include: qstring-double
2519+ - include: template
2247 string-character-escape:
2520 string-character-escape:
2248− - match: '\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)'
2521+ - 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]?|.|$)'
2249 scope: constant.character.escape.tsx
2522 scope: constant.character.escape.tsx
2250 super-literal:
2523 super-literal:
2251 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))super\b(?!\$)'
2524 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))super\b(?!\$)'
2252 scope: variable.language.super.tsx
2525 scope: variable.language.super.tsx
2526+ support-function-call-identifiers:
2527+ - include: literal
2528+ - include: support-objects
2529+ - include: object-identifiers
2530+ - include: punctuation-accessor
2531+ - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))import(?=\s*[\(]\s*[\"\''\`]))'
2532+ scope: keyword.operator.expression.import.tsx
2253 support-objects:
2533 support-objects:
2254 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(arguments)\b(?!\$)'
2534 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(arguments)\b(?!\$)'
2255 scope: variable.language.arguments.tsx
2535 scope: variable.language.arguments.tsx
2256 - match: |-
2536 - match: |-
2257− (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator
2537+ (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Array|ArrayBuffer|Atomics|BigInt|BigInt64Array|BigUint64Array|Boolean|DataView|Date|Float32Array
2258− |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Proxy
2538+ |Float64Array|Function|Generator|GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Proxy
2259 |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray
2539 |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray
2260 |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\b(?!\$)
2540 |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\b(?!\$)
2261 scope: support.class.builtin.tsx
2541 scope: support.class.builtin.tsx
@@ -2309,9 +2589,9 @@ contexts:
2309 4: support.variable.property.target.tsx
2589 4: support.variable.property.target.tsx
2310 - match: |-
2590 - match: |-
2311 (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* (?:
2591 (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* (?:
2312− (constructor|length|prototype|__proto__)
2592+ (?:(constructor|length|prototype|__proto__)\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\())
2313 |
2593 |
2314− (EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY))\b(?!\$)
2594+ (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\b(?!\$)))
2315 captures:
2595 captures:
2316 1: punctuation.accessor.tsx
2596 1: punctuation.accessor.tsx
2317 2: punctuation.accessor.optional.tsx
2597 2: punctuation.accessor.optional.tsx
@@ -2415,7 +2695,7 @@ contexts:
2415 |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary
2695 |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary
2416 |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead
2696 |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead
2417 |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile
2697 |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile
2418− |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?\()
2698+ |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\()
2419 captures:
2699 captures:
2420 1: punctuation.accessor.tsx
2700 1: punctuation.accessor.tsx
2421 2: punctuation.accessor.optional.tsx
2701 2: punctuation.accessor.optional.tsx
@@ -2539,6 +2819,7 @@ contexts:
2539 captures:
2819 captures:
2540 0: punctuation.definition.block.tsx
2820 0: punctuation.definition.block.tsx
2541 pop: true
2821 pop: true
2822+ - include: comment
2542 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(switch)\s*(\()'
2823 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(switch)\s*(\()'
2543 captures:
2824 captures:
2544 1: keyword.control.switch.tsx
2825 1: keyword.control.switch.tsx
@@ -2581,7 +2862,34 @@ contexts:
2581 0: case-clause.expr.tsx punctuation.definition.section.case-statement.tsx
2862 0: case-clause.expr.tsx punctuation.definition.section.case-statement.tsx
2582 - include: statements
2863 - include: statements
2583 template:
2864 template:
2584− - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)`)'
2865+ - include: template-call
2866+ - match: "([_$[:alpha:]][_$[:alnum:]]*)?(`)"
2867+ captures:
2868+ 1: entity.name.function.tagged-template.tsx
2869+ 2: punctuation.definition.string.template.begin.tsx
2870+ push:
2871+ - meta_scope: string.template.tsx
2872+ - match: "`"
2873+ captures:
2874+ 0: punctuation.definition.string.template.end.tsx
2875+ pop: true
2876+ - include: template-substitution-element
2877+ - include: string-character-escape
2878+ template-call:
2879+ - match: '(?=(([_$[: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*)?`)'
2880+ push:
2881+ - meta_scope: string.template.tsx
2882+ - match: (?=`)
2883+ pop: true
2884+ - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))'
2885+ push:
2886+ - match: '(?=(<\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*)?`)'
2887+ pop: true
2888+ - include: support-function-call-identifiers
2889+ - match: "([_$[:alpha:]][_$[:alnum:]]*)"
2890+ scope: entity.name.function.tagged-template.tsx
2891+ - include: type-arguments
2892+ - match: '([_$[: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*)`)'
2585 captures:
2893 captures:
2586 1: entity.name.function.tagged-template.tsx
2894 1: entity.name.function.tagged-template.tsx
2587 push:
2895 push:
@@ -2589,6 +2897,20 @@ contexts:
2589 - match: (?=`)
2897 - match: (?=`)
2590 pop: true
2898 pop: true
2591 - include: type-arguments
2899 - include: type-arguments
2900+ template-substitution-element:
2901+ - match: '\$\{'
2902+ captures:
2903+ 0: punctuation.definition.template-expression.begin.tsx
2904+ push:
2905+ - meta_scope: meta.template.expression.tsx
2906+ - meta_content_scope: meta.embedded.line.tsx
2907+ - match: '\}'
2908+ captures:
2909+ 0: punctuation.definition.template-expression.end.tsx
2910+ pop: true
2911+ - include: expression
2912+ template-type:
2913+ - include: template-call
2592 - match: "([_$[:alpha:]][_$[:alnum:]]*)?(`)"
2914 - match: "([_$[:alpha:]][_$[:alnum:]]*)?(`)"
2593 captures:
2915 captures:
2594 1: entity.name.function.tagged-template.tsx
2916 1: entity.name.function.tagged-template.tsx
@@ -2599,9 +2921,9 @@ contexts:
2599 captures:
2921 captures:
2600 0: punctuation.definition.string.template.end.tsx
2922 0: punctuation.definition.string.template.end.tsx
2601 pop: true
2923 pop: true
2602− - include: template-substitution-element
2924+ - include: template-type-substitution-element
2603 - include: string-character-escape
2925 - include: string-character-escape
2604− template-substitution-element:
2926+ template-type-substitution-element:
2605 - match: '\$\{'
2927 - match: '\$\{'
2606 captures:
2928 captures:
2607 0: punctuation.definition.template-expression.begin.tsx
2929 0: punctuation.definition.template-expression.begin.tsx
@@ -2612,9 +2934,9 @@ contexts:
2612 captures:
2934 captures:
2613 0: punctuation.definition.template-expression.end.tsx
2935 0: punctuation.definition.template-expression.end.tsx
2614 pop: true
2936 pop: true
2615− - include: expression
2937+ - include: type
2616 ternary-expression:
2938 ternary-expression:
2617− - match: '(?!\?\.\s*[^[:digit:]])(\?)'
2939+ - match: '(?!\?\.\s*[^[:digit:]])(\?)(?!\?)'
2618 captures:
2940 captures:
2619 1: keyword.operator.ternary.tsx
2941 1: keyword.operator.ternary.tsx
2620 push:
2942 push:
@@ -2628,7 +2950,7 @@ contexts:
2628 scope: variable.language.this.tsx
2950 scope: variable.language.this.tsx
2629 type:
2951 type:
2630 - include: comment
2952 - include: comment
2631− - include: string
2953+ - include: type-string
2632 - include: numeric-literal
2954 - include: numeric-literal
2633 - include: type-primitive
2955 - include: type-primitive
2634 - include: type-builtin-literals
2956 - include: type-builtin-literals
@@ -2640,24 +2962,36 @@ contexts:
2640 - include: type-fn-type-parameters
2962 - include: type-fn-type-parameters
2641 - include: type-paren-or-function-parameters
2963 - include: type-paren-or-function-parameters
2642 - include: type-function-return-type
2964 - include: type-function-return-type
2965+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(readonly)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*'
2966+ captures:
2967+ 1: storage.modifier.tsx
2643 - include: type-name
2968 - include: type-name
2644 type-alias-declaration:
2969 type-alias-declaration:
2645− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(type)\b\s+([_$[:alpha:]][_$[:alnum:]]*)\s*'
2970+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(type)\b\s+([_$[:alpha:]][_$[:alnum:]]*)\s*'
2646 captures:
2971 captures:
2647 1: keyword.control.export.tsx
2972 1: keyword.control.export.tsx
2648− 2: storage.type.type.tsx
2973+ 2: storage.modifier.tsx
2649− 3: entity.name.type.alias.tsx
2974+ 3: storage.type.type.tsx
2975+ 4: entity.name.type.alias.tsx
2650 push:
2976 push:
2651 - meta_scope: meta.type.declaration.tsx
2977 - meta_scope: meta.type.declaration.tsx
2652− - match: '(?=\}|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)'
2978+ - match: '(?=\}|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
2653 pop: true
2979 pop: true
2654 - include: comment
2980 - include: comment
2655 - include: type-parameters
2981 - include: type-parameters
2982+ - match: '(=)\s*(intrinsic)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2983+ captures:
2984+ 1: keyword.operator.assignment.tsx
2985+ 2: keyword.control.intrinsic.tsx
2986+ push:
2987+ - match: '(?=\}|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
2988+ pop: true
2989+ - include: type
2656 - match: (=)\s*
2990 - match: (=)\s*
2657 captures:
2991 captures:
2658 1: keyword.operator.assignment.tsx
2992 1: keyword.operator.assignment.tsx
2659 push:
2993 push:
2660− - match: '(?=\}|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)'
2994+ - match: '(?=\}|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
2661 pop: true
2995 pop: true
2662 - include: type
2996 - include: type
2663 type-annotation:
2997 type-annotation:
@@ -2687,8 +3021,13 @@ contexts:
2687 captures:
3021 captures:
2688 0: punctuation.definition.typeparameters.end.tsx
3022 0: punctuation.definition.typeparameters.end.tsx
2689 pop: true
3023 pop: true
2690− - include: type
3024+ - include: type-arguments-body
2691− - include: punctuation-comma
3025+ type-arguments-body:
3026+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(_)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3027+ captures:
3028+ 0: keyword.operator.type.tsx
3029+ - include: type
3030+ - include: punctuation-comma
2692 type-builtin-literals:
3031 type-builtin-literals:
2693 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3032 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2694 scope: support.type.builtin.tsx
3033 scope: support.type.builtin.tsx
@@ -2710,13 +3049,19 @@ contexts:
2710 - include: type
3049 - include: type
2711 - include: type
3050 - include: type
2712 type-fn-type-parameters:
3051 type-fn-type-parameters:
2713− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\b(?=\s*\<)'
3052+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(new)\b(?=\s*\<)'
2714− scope: meta.type.constructor.tsx
2715 captures:
3053 captures:
2716− 1: keyword.control.new.tsx
3054+ 1: meta.type.constructor.tsx storage.modifier.tsx
2717− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\b\s*(?=\()'
3055+ 2: meta.type.constructor.tsx keyword.control.new.tsx
3056+ push:
3057+ - match: (?<=>)
3058+ pop: true
3059+ - include: comment
3060+ - include: type-parameters
3061+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(abstract)\s+)?(new)\b\s*(?=\()'
2718 captures:
3062 captures:
2719− 1: keyword.control.new.tsx
3063+ 1: storage.modifier.tsx
3064+ 2: keyword.control.new.tsx
2720 push:
3065 push:
2721 - meta_scope: meta.type.constructor.tsx
3066 - meta_scope: meta.type.constructor.tsx
2722 - match: (?<=\))
3067 - match: (?<=\))
@@ -2767,6 +3112,30 @@ contexts:
2767 - include: type-predicate-operator
3112 - include: type-predicate-operator
2768 - include: type
3113 - include: type
2769 type-name:
3114 type-name:
3115+ - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(<)'
3116+ captures:
3117+ 1: entity.name.type.module.tsx
3118+ 2: punctuation.accessor.tsx
3119+ 3: punctuation.accessor.optional.tsx
3120+ 4: meta.type.parameters.tsx punctuation.definition.typeparameters.begin.tsx
3121+ push:
3122+ - meta_content_scope: meta.type.parameters.tsx
3123+ - match: (>)
3124+ captures:
3125+ 1: meta.type.parameters.tsx punctuation.definition.typeparameters.end.tsx
3126+ pop: true
3127+ - include: type-arguments-body
3128+ - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(<)'
3129+ captures:
3130+ 1: entity.name.type.tsx
3131+ 2: meta.type.parameters.tsx punctuation.definition.typeparameters.begin.tsx
3132+ push:
3133+ - meta_content_scope: meta.type.parameters.tsx
3134+ - match: (>)
3135+ captures:
3136+ 1: meta.type.parameters.tsx punctuation.definition.typeparameters.end.tsx
3137+ pop: true
3138+ - include: type-arguments-body
2770 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
3139 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
2771 captures:
3140 captures:
2772 1: entity.name.type.module.tsx
3141 1: entity.name.type.module.tsx
@@ -2802,18 +3171,16 @@ contexts:
2802 - include: type
3171 - include: type
2803 type-operators:
3172 type-operators:
2804 - include: typeof-operator
3173 - include: typeof-operator
2805− - match: '(?:([&|])|(=(?!>)))(?=\s*\{)'
3174+ - match: '([&|])(?=\s*\{)'
2806 captures:
3175 captures:
2807− 1: keyword.operator.type.tsx
3176+ 0: keyword.operator.type.tsx
2808− 2: keyword.operator.assignment.tsx
2809 push:
3177 push:
2810 - match: '(?<=\})'
3178 - match: '(?<=\})'
2811 pop: true
3179 pop: true
2812 - include: type-object
3180 - include: type-object
2813− - match: "([&|])|(=(?!>))"
3181+ - match: "[&|]"
2814 captures:
3182 captures:
2815− 1: keyword.operator.type.tsx
3183+ 0: keyword.operator.type.tsx
2816− 2: keyword.operator.assignment.tsx
2817 push:
3184 push:
2818 - match: (?=\S)
3185 - match: (?=\S)
2819 pop: true
3186 pop: true
@@ -2840,6 +3207,8 @@ contexts:
2840 scope: storage.modifier.tsx
3207 scope: storage.modifier.tsx
2841 - include: type
3208 - include: type
2842 - include: punctuation-comma
3209 - include: punctuation-comma
3210+ - match: (=)(?!>)
3211+ scope: keyword.operator.assignment.tsx
2843 type-paren-or-function-parameters:
3212 type-paren-or-function-parameters:
2844 - match: \(
3213 - match: \(
2845 captures:
3214 captures:
@@ -2850,7 +3219,6 @@ contexts:
2850 captures:
3219 captures:
2851 0: meta.brace.round.tsx
3220 0: meta.brace.round.tsx
2852 pop: true
3221 pop: true
2853− - include: destructuring-parameter
2854 - match: |-
3222 - match: |-
2855 (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s*(\??)(?=\s*(:\s*(
3223 (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s*(\??)(?=\s*(:\s*(
2856 (<) |
3224 (<) |
@@ -2863,7 +3231,8 @@ contexts:
2863 ))
3231 ))
2864 ))
3232 ))
2865 )) |
3233 )) |
2866− (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))))
3234+ (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3235+ (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))))
2867 captures:
3236 captures:
2868 1: storage.modifier.tsx
3237 1: storage.modifier.tsx
2869 2: keyword.operator.rest.tsx
3238 2: keyword.operator.rest.tsx
@@ -2882,11 +3251,28 @@ contexts:
2882 scope: punctuation.separator.parameter.tsx
3251 scope: punctuation.separator.parameter.tsx
2883 - include: type
3252 - include: type
2884 type-predicate-operator:
3253 type-predicate-operator:
3254+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(asserts)\s+)?(?!asserts)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s(is)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3255+ captures:
3256+ 1: keyword.operator.type.asserts.tsx
3257+ 2: variable.parameter.tsx variable.language.this.tsx
3258+ 3: variable.parameter.tsx
3259+ 4: keyword.operator.expression.is.tsx
3260+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(asserts)\s+(?!is)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3261+ captures:
3262+ 1: keyword.operator.type.asserts.tsx
3263+ 2: variable.parameter.tsx variable.language.this.tsx
3264+ 3: variable.parameter.tsx
3265+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))asserts(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3266+ scope: keyword.operator.type.asserts.tsx
2885 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))is(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3267 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))is(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2886 scope: keyword.operator.expression.is.tsx
3268 scope: keyword.operator.expression.is.tsx
2887 type-primitive:
3269 type-primitive:
2888− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(string|number|boolean|symbol|any|void|never)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3270+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2889 scope: support.type.primitive.tsx
3271 scope: support.type.primitive.tsx
3272+ type-string:
3273+ - include: qstring-single
3274+ - include: qstring-double
3275+ - include: template-type
2890 type-tuple:
3276 type-tuple:
2891 - match: '\['
3277 - match: '\['
2892 captures:
3278 captures:
@@ -2897,56 +3283,84 @@ contexts:
2897 captures:
3283 captures:
2898 0: meta.brace.square.tsx
3284 0: meta.brace.square.tsx
2899 pop: true
3285 pop: true
3286+ - match: \.\.\.
3287+ scope: keyword.operator.rest.tsx
3288+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))([_$[:alpha:]][_$[:alnum:]]*)\s*(\?)?\s*(:)'
3289+ captures:
3290+ 1: entity.name.label.tsx
3291+ 2: keyword.operator.optional.tsx
3292+ 3: punctuation.separator.label.tsx
2900 - include: type
3293 - include: type
2901 - include: punctuation-comma
3294 - include: punctuation-comma
2902 typeof-operator:
3295 typeof-operator:
2903 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))typeof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3296 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))typeof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2904− scope: keyword.operator.expression.typeof.tsx
3297+ captures:
3298+ 0: keyword.operator.expression.typeof.tsx
3299+ push:
3300+ - match: '(?=[,);}\]=>:&|{\?]|$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))'
3301+ pop: true
3302+ - include: expression
2905 undefined-literal:
3303 undefined-literal:
2906 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))undefined(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3304 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))undefined(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2907 scope: constant.language.undefined.tsx
3305 scope: constant.language.undefined.tsx
2908 var-expr:
3306 var-expr:
2909− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3307+ - match: '(?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))'
2910− captures:
2911− 1: keyword.control.export.tsx
2912− 2: storage.type.tsx
2913 push:
3308 push:
2914 - meta_scope: meta.var.expr.tsx
3309 - meta_scope: meta.var.expr.tsx
2915− - match: '((?=;|}|(\s+(of|in)\s+)|^\s*$|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)|((?<=\S)(?<!^let|[^\._$[:alnum:]]let|^var|[^\._$[:alnum:]]var)(?=\s*$)))'
3310+ - match: '(?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|((?<!^let|[^\._$[:alnum:]]let|^var|[^\._$[:alnum:]]var)(?=\s*$)))'
2916 pop: true
3311 pop: true
3312+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*'
3313+ captures:
3314+ 1: keyword.control.export.tsx
3315+ 2: storage.modifier.tsx
3316+ 3: storage.type.tsx
3317+ push:
3318+ - match: (?=\S)
3319+ pop: true
2917 - include: destructuring-variable
3320 - include: destructuring-variable
2918 - include: var-single-variable
3321 - include: var-single-variable
2919 - include: variable-initializer
3322 - include: variable-initializer
2920 - include: comment
3323 - include: comment
2921− - match: (,)\s*(?!\S)
3324+ - match: (,)\s*((?!\S)|(?=\/\/))
2922 captures:
3325 captures:
2923 1: punctuation.separator.comma.tsx
3326 1: punctuation.separator.comma.tsx
2924 push:
3327 push:
2925− - match: '(?<!,)(((?==|;|}|(\s+(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))'
3328+ - match: '(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))'
2926 pop: true
3329 pop: true
3330+ - include: single-line-comment-consuming-line-ending
2927 - include: comment
3331 - include: comment
2928 - include: destructuring-variable
3332 - include: destructuring-variable
2929 - include: var-single-variable
3333 - include: var-single-variable
2930 - include: punctuation-comma
3334 - include: punctuation-comma
2931 - include: punctuation-comma
3335 - include: punctuation-comma
2932− - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
3336+ - match: '(?=(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))'
2933 captures:
3337 captures:
2934 1: keyword.control.export.tsx
3338 1: keyword.control.export.tsx
2935− 2: storage.type.tsx
3339+ 2: storage.modifier.tsx
3340+ 3: storage.type.tsx
2936 push:
3341 push:
2937 - meta_scope: meta.var.expr.tsx
3342 - meta_scope: meta.var.expr.tsx
2938− - match: '((?=;|}|(\s+(of|in)\s+)|^\s*$|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)|((?<=\S)(?<!^const|[^\._$[:alnum:]]const)(?=\s*$)))'
3343+ - match: '(?!(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|((?<!^const|[^\._$[:alnum:]]const)(?=\s*$)))'
2939 pop: true
3344 pop: true
3345+ - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*'
3346+ captures:
3347+ 1: keyword.control.export.tsx
3348+ 2: storage.modifier.tsx
3349+ 3: storage.type.tsx
3350+ push:
3351+ - match: (?=\S)
3352+ pop: true
2940 - include: destructuring-const
3353 - include: destructuring-const
2941 - include: var-single-const
3354 - include: var-single-const
2942 - include: variable-initializer
3355 - include: variable-initializer
2943 - include: comment
3356 - include: comment
2944− - match: (,)\s*(?!\S)
3357+ - match: (,)\s*((?!\S)|(?=\/\/))
2945 captures:
3358 captures:
2946 1: punctuation.separator.comma.tsx
3359 1: punctuation.separator.comma.tsx
2947 push:
3360 push:
2948− - match: '(?<!,)(((?==|;|}|(\s+(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))'
3361+ - match: '(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))'
2949 pop: true
3362 pop: true
3363+ - include: single-line-comment-consuming-line-ending
2950 - include: comment
3364 - include: comment
2951 - include: destructuring-const
3365 - include: destructuring-const
2952 - include: var-single-const
3366 - include: var-single-const
@@ -2963,11 +3377,11 @@ contexts:
2963 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3377 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2964 )) |
3378 )) |
2965 ((async\s*)?(
3379 ((async\s*)?(
2966− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
3380+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
2967 # sure shot arrow functions even if => is on new line
3381 # sure shot arrow functions even if => is on new line
2968 (
3382 (
2969− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
3383+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
2970− [(]\s*
3384+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
2971 (
3385 (
2972 ([)]\s*:) | # ():
3386 ([)]\s*:) | # ():
2973 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3387 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -2978,9 +3392,9 @@ contexts:
2978 ) |
3392 ) |
2979 # arrow function possible to detect only with => on same line
3393 # arrow function possible to detect only with => on same line
2980 (
3394 (
2981− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
3395+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
2982− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3396+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
2983− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
3397+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
2984 \s*=> # arrow operator
3398 \s*=> # arrow operator
2985 )
3399 )
2986 ))
3400 ))
@@ -2997,19 +3411,20 @@ contexts:
2997 ))
3411 ))
2998 ))
3412 ))
2999 )) |
3413 )) |
3000− (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) |
3414+ (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3001− (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3415+ (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
3416+ (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3002 ((async\s+)?(
3417 ((async\s+)?(
3003 (function\s*[(<*]) |
3418 (function\s*[(<*]) |
3004 (function\s+) |
3419 (function\s+) |
3005 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3420 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3006 )) |
3421 )) |
3007 ((async\s*)?(
3422 ((async\s*)?(
3008− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
3423+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3009 # sure shot arrow functions even if => is on new line
3424 # sure shot arrow functions even if => is on new line
3010 (
3425 (
3011− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
3426+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3012− [(]\s*
3427+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3013 (
3428 (
3014 ([)]\s*:) | # ():
3429 ([)]\s*:) | # ():
3015 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3430 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -3020,9 +3435,9 @@ contexts:
3020 ) |
3435 ) |
3021 # arrow function possible to detect only with => on same line
3436 # arrow function possible to detect only with => on same line
3022 (
3437 (
3023− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
3438+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3024− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3439+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3025− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
3440+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3026 \s*=> # arrow operator
3441 \s*=> # arrow operator
3027 )
3442 )
3028 ))
3443 ))
@@ -3031,7 +3446,7 @@ contexts:
3031 1: meta.definition.variable.tsx variable.other.constant.tsx entity.name.function.tsx
3446 1: meta.definition.variable.tsx variable.other.constant.tsx entity.name.function.tsx
3032 push:
3447 push:
3033 - meta_scope: meta.var-single-variable.expr.tsx
3448 - meta_scope: meta.var-single-variable.expr.tsx
3034− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3449+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3035 pop: true
3450 pop: true
3036 - include: var-single-variable-type-annotation
3451 - include: var-single-variable-type-annotation
3037 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
3452 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
@@ -3039,12 +3454,12 @@ contexts:
3039 1: meta.definition.variable.tsx variable.other.constant.tsx
3454 1: meta.definition.variable.tsx variable.other.constant.tsx
3040 push:
3455 push:
3041 - meta_scope: meta.var-single-variable.expr.tsx
3456 - meta_scope: meta.var-single-variable.expr.tsx
3042− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3457+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3043 pop: true
3458 pop: true
3044 - include: var-single-variable-type-annotation
3459 - include: var-single-variable-type-annotation
3045 var-single-variable:
3460 var-single-variable:
3046 - match: |-
3461 - match: |-
3047− (?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\s*
3462+ (?x)([_$[:alpha:]][_$[:alnum:]]*)(\!)?(?=\s*
3048 # function assignment |
3463 # function assignment |
3049 (=\s*(
3464 (=\s*(
3050 ((async\s+)?(
3465 ((async\s+)?(
@@ -3053,11 +3468,11 @@ contexts:
3053 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3468 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3054 )) |
3469 )) |
3055 ((async\s*)?(
3470 ((async\s*)?(
3056− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
3471+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3057 # sure shot arrow functions even if => is on new line
3472 # sure shot arrow functions even if => is on new line
3058 (
3473 (
3059− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
3474+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3060− [(]\s*
3475+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3061 (
3476 (
3062 ([)]\s*:) | # ():
3477 ([)]\s*:) | # ():
3063 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3478 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -3068,9 +3483,9 @@ contexts:
3068 ) |
3483 ) |
3069 # arrow function possible to detect only with => on same line
3484 # arrow function possible to detect only with => on same line
3070 (
3485 (
3071− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
3486+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3072− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3487+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3073− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
3488+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3074 \s*=> # arrow operator
3489 \s*=> # arrow operator
3075 )
3490 )
3076 ))
3491 ))
@@ -3087,19 +3502,20 @@ contexts:
3087 ))
3502 ))
3088 ))
3503 ))
3089 )) |
3504 )) |
3090− (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) |
3505+ (:\s*(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Function(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))) |
3091− (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3506+ (:\s*((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) |
3507+ (:\s*(=>|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3092 ((async\s+)?(
3508 ((async\s+)?(
3093 (function\s*[(<*]) |
3509 (function\s*[(<*]) |
3094 (function\s+) |
3510 (function\s+) |
3095 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3511 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3096 )) |
3512 )) |
3097 ((async\s*)?(
3513 ((async\s*)?(
3098− ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
3514+ ((<\s*$)|([\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) |
3099 # sure shot arrow functions even if => is on new line
3515 # sure shot arrow functions even if => is on new line
3100 (
3516 (
3101− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
3517+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?
3102− [(]\s*
3518+ [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
3103 (
3519 (
3104 ([)]\s*:) | # ():
3520 ([)]\s*:) | # ():
3105 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3521 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
@@ -3110,34 +3526,37 @@ contexts:
3110 ) |
3526 ) |
3111 # arrow function possible to detect only with => on same line
3527 # arrow function possible to detect only with => on same line
3112 (
3528 (
3113− (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
3529+ (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters
3114− \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3530+ \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{([^\{\}]|\{[^\{\}]*\})*\}))*\})|(\[([^\[\]]|(\[([^\[\]]|\[[^\[\]]*\])*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()\'\"\`]|(\(([^\(\)]|(\(([^\(\)]|\([^\(\)]*\))*\)))*\))|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`))*)?\) # parameters
3115− (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
3531+ (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<([^<>]|\<[^<>]+\>)+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
3116 \s*=> # arrow operator
3532 \s*=> # arrow operator
3117 )
3533 )
3118 ))
3534 ))
3119 )))
3535 )))
3120 captures:
3536 captures:
3121 1: meta.definition.variable.tsx entity.name.function.tsx
3537 1: meta.definition.variable.tsx entity.name.function.tsx
3538+ 2: keyword.operator.definiteassignment.tsx
3122 push:
3539 push:
3123 - meta_scope: meta.var-single-variable.expr.tsx
3540 - meta_scope: meta.var-single-variable.expr.tsx
3124− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3541+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3125 pop: true
3542 pop: true
3126 - include: var-single-variable-type-annotation
3543 - include: var-single-variable-type-annotation
3127− - match: "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
3544+ - match: '([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\!)?'
3128 captures:
3545 captures:
3129 1: meta.definition.variable.tsx variable.other.constant.tsx
3546 1: meta.definition.variable.tsx variable.other.constant.tsx
3547+ 2: keyword.operator.definiteassignment.tsx
3130 push:
3548 push:
3131 - meta_scope: meta.var-single-variable.expr.tsx
3549 - meta_scope: meta.var-single-variable.expr.tsx
3132− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3550+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3133 pop: true
3551 pop: true
3134 - include: var-single-variable-type-annotation
3552 - include: var-single-variable-type-annotation
3135− - match: "([_$[:alpha:]][_$[:alnum:]]*)"
3553+ - match: '([_$[:alpha:]][_$[:alnum:]]*)(\!)?'
3136 captures:
3554 captures:
3137 1: meta.definition.variable.tsx variable.other.readwrite.tsx
3555 1: meta.definition.variable.tsx variable.other.readwrite.tsx
3556+ 2: keyword.operator.definiteassignment.tsx
3138 push:
3557 push:
3139 - meta_scope: meta.var-single-variable.expr.tsx
3558 - meta_scope: meta.var-single-variable.expr.tsx
3140− - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3559+ - match: '(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3141 pop: true
3560 pop: true
3142 - include: var-single-variable-type-annotation
3561 - include: var-single-variable-type-annotation
3143 var-single-variable-type-annotation:
3562 var-single-variable-type-annotation:
@@ -3145,17 +3564,17 @@ contexts:
3145 - include: string
3564 - include: string
3146 - include: comment
3565 - include: comment
3147 variable-initializer:
3566 variable-initializer:
3148− - match: (?<!=|!)(=)(?!=)(?=\s*\S)
3567+ - match: (?<!=|!)(=)(?!=)(?=\s*\S)(?!\s*.*=>\s*$)
3149 captures:
3568 captures:
3150 1: keyword.operator.assignment.tsx
3569 1: keyword.operator.assignment.tsx
3151 push:
3570 push:
3152− - match: '(?=$|^|[,);}\]])'
3571+ - match: '(?=$|^|[,);}\]]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))'
3153 pop: true
3572 pop: true
3154 - include: expression
3573 - include: expression
3155 - match: (?<!=|!)(=)(?!=)
3574 - match: (?<!=|!)(=)(?!=)
3156 captures:
3575 captures:
3157 1: keyword.operator.assignment.tsx
3576 1: keyword.operator.assignment.tsx
3158 push:
3577 push:
3159− - match: '(?=[,);}\]])|(?=^\s*$)|(?<=\S)(?<!=)(?=\s*$)'
3578+ - match: '(?=[,);}\]]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(of|in)\s+))|(?=^\s*$)|(?<=\S)(?<!=)(?=\s*$)'
3160 pop: true
3579 pop: true
3161 - include: expression
3580 - include: expression
assets/syntaxes/02_Extra/VimL+1−1

Submodule changed.

assets/syntaxes/02_Extra/Zig+1−1

Submodule changed.

assets/syntaxes/02_Extra/cmd-helpnew file+1

Submodule changed.

assets/syntaxes/02_Extra/log.sublime-syntax+30−6
@@ -6,6 +6,7 @@ file_extensions:
6scope: text.log
6scope: text.log
7variables:
7variables:
8 ipv4_part: (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)
8 ipv4_part: (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)
9+ hours_minutes_seconds: (?:[01]\d|2[0-3]):(?:[0-5]\d):(?:[0-5]\d)
9contexts:
10contexts:
10 main:
11 main:
11 - match: (\w+)(=)
12 - match: (\w+)(=)
@@ -17,11 +18,10 @@ contexts:
17 captures:
18 captures:
18 1: punctuation.definition.string.begin.log
19 1: punctuation.definition.string.begin.log
19 3: punctuation.definition.string.end.log
20 3: punctuation.definition.string.end.log
20− - match: (")([^"]*)(")
21+ - match: \"
21− scope: string.quoted.double.log
22 captures:
22 captures:
23 1: punctuation.definition.string.begin.log
23 1: punctuation.definition.string.begin.log
24− 3: punctuation.definition.string.end.log
24+ push: double_quoted_string
25 - include: dates
25 - include: dates
26 - include: ip_addresses
26 - include: ip_addresses
27 - include: numbers
27 - include: numbers
@@ -29,19 +29,34 @@ contexts:
29 scope: markup.error.log
29 scope: markup.error.log
30 - match: \b(?i:warn(?:ing)?)\b
30 - match: \b(?i:warn(?:ing)?)\b
31 scope: markup.warning.log
31 scope: markup.warning.log
32+ - match: \b(?i:debug)\b
33+ scope: markup.info.log
32 #- include: scope:text.html.markdown#autolink-inet
34 #- include: scope:text.html.markdown#autolink-inet
33 - match: \b\w+:/{2,3}
35 - match: \b\w+:/{2,3}
34 scope: markup.underline.link.scheme.log
36 scope: markup.underline.link.scheme.log
35 push: url-host
37 push: url-host
36 dates:
38 dates:
37− - match: \b\d{4}-\d{2}-\d{2}\b
39+ - match: \b\d{4}-\d{2}-\d{2}(?=\b|T)
38 scope: meta.date.log meta.number.integer.decimal.log constant.numeric.value.log
40 scope: meta.date.log meta.number.integer.decimal.log constant.numeric.value.log
39− - match: \b\d{4}/\d{2}/\d{2}\b
41+ push: maybe_date_time_separator
42+ - match: \b\d{4}/\d{2}/\d{2}(?=\b|T)
40 scope: meta.date.log meta.number.integer.decimal.log constant.numeric.value.log
43 scope: meta.date.log meta.number.integer.decimal.log constant.numeric.value.log
41− - match: \b(?:[01]\d|2[0-3]):(?:[0-5]\d):(?:[0-5]\d)(?:(\.)\d{3})?\b
44+ push: maybe_date_time_separator
45+ - match: \b(?={{hours_minutes_seconds}})
46+ push: time
47+ time:
48+ - match: (?:{{hours_minutes_seconds}})(?:(\.)\d{3})?\b
42 scope: meta.time.log meta.number.integer.decimal.log constant.numeric.value.log
49 scope: meta.time.log meta.number.integer.decimal.log constant.numeric.value.log
43 captures:
50 captures:
44 1: punctuation.separator.decimal.log
51 1: punctuation.separator.decimal.log
52+ - match: ''
53+ pop: true
54+ maybe_date_time_separator:
55+ - match: T(?={{hours_minutes_seconds}})
56+ scope: meta.date.log meta.time.log keyword.other.log
57+ set: time
58+ - match: ''
59+ pop: true
45 ip_addresses:
60 ip_addresses:
46 - match: \b(?=(?:{{ipv4_part}}\.){3}{{ipv4_part}}\b)
61 - match: \b(?=(?:{{ipv4_part}}\.){3}{{ipv4_part}}\b)
47 push:
62 push:
@@ -114,3 +129,12 @@ contexts:
114 scope: markup.underline.link.path.log
129 scope: markup.underline.link.path.log
115 - match: ''
130 - match: ''
116 pop: true
131 pop: true
132+ double_quoted_string:
133+ - meta_scope: string.quoted.double.log
134+ - match: \\"
135+ scope: constant.character.escape.log
136+ - match: \\n
137+ scope: constant.character.escape.log
138+ - match: \"
139+ scope: punctuation.definition.string.end.log
140+ pop: true
assets/syntaxes/02_Extra/requirementstxtdeleted−1

Submodule changed.

assets/syntaxes/02_Extra/requirementstxt.sublime-syntaxdeleted−19
@@ -1,19 +0,0 @@
1−%YAML 1.2
2−---
3−# http://www.sublimetext.com/docs/3/syntax.html
4−name: requirements.txt
5−file_extensions:
6− - requirements.txt
7−scope: source.requirementstxt
8−contexts:
9− main:
10− - match: (#).*$\n?
11− scope: comment.line.requirementstxt
12− captures:
13− 1: punctuation.definition.comment.requirementstxt
14− - match: '(?i)^[a-z0-9_\-\.]+'
15− scope: string.package_name.requirementstxt
16− - match: (?i)==|<|<=|>=|>
17− scope: keyword.operator.logical.punctuation.requirementstxt
18− - match: '(?i)\d+\.[\da-z\-_\.]*'
19− scope: constant.numeric.verions.requirementstxt
assets/syntaxes/02_Extra/ssh-config+1−1

Submodule changed.

assets/syntaxes/02_Extra/syslog.sublime-syntax+2−2
@@ -16,11 +16,11 @@ contexts:
16 - match: ^
16 - match: ^
17 push: text
17 push: text
18 loghost:
18 loghost:
19− - match: '[\w-]+'
19+ - match: '[\w:.-]+'
20 scope: entity.other.attribute-name.loghost.syslog
20 scope: entity.other.attribute-name.loghost.syslog
21 set: process
21 set: process
22 process:
22 process:
23− - match: ([\w-]+)(?:(\[)(\d+)(\]))?(:)
23+ - match: ([\w.-]+)(?:(\[)(\d+)(\]))?([ :])
24 captures:
24 captures:
25 1: support.function.process.syslog
25 1: support.function.process.syslog
26 2: punctuation.separator.pid.begin.syslog
26 2: punctuation.separator.pid.begin.syslog
assets/themes.bin

Binary file not shown.

build.rs+5
@@ -64,6 +64,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
64 "assets/completions/bat.fish.in",
64 "assets/completions/bat.fish.in",
65 out_dir.join("assets/completions/bat.fish"),
65 out_dir.join("assets/completions/bat.fish"),
66 )?;
66 )?;
67+ template(
68+ &variables,
69+ "assets/completions/_bat.ps1.in",
70+ out_dir.join("assets/completions/_bat.ps1"),
71+ )?;
67 template(
72 template(
68 &variables,
73 &variables,
69 "assets/completions/bat.zsh.in",
74 "assets/completions/bat.zsh.in",
doc/README-ja.md+11−8
@@ -1,7 +1,6 @@
1<p align="center">
1<p align="center">
2 <img src="logo-header.svg" alt="bat - a cat clone with wings"><br>
2 <img src="logo-header.svg" alt="bat - a cat clone with wings"><br>
3− <a href="https://travis-ci.org/sharkdp/bat"><img src="https://travis-ci.org/sharkdp/bat.svg?branch=master" alt="Build Status"></a>
3+ <a href="https://github.com/sharkdp/bat/actions?query=workflow%3ACICD"><img src="https://github.com/sharkdp/bat/workflows/CICD/badge.svg" alt="Build Status"></a>
4− <a href="https://ci.appveyor.com/project/sharkdp/bat"><img src="https://ci.appveyor.com/api/projects/status/cptsmtbiwbnr2vhf?svg=true"></a>
5 <img src="https://img.shields.io/crates/l/bat.svg" alt="license">
4 <img src="https://img.shields.io/crates/l/bat.svg" alt="license">
6 <a href="https://crates.io/crates/bat"><img src="https://img.shields.io/crates/v/bat.svg?colorB=319e8c" alt="Version info"></a><br>
5 <a href="https://crates.io/crates/bat"><img src="https://img.shields.io/crates/v/bat.svg?colorB=319e8c" alt="Version info"></a><br>
7 シンタックスハイライトとGitとの連携機能付きの <i>cat(1)</i> クローン。
6 シンタックスハイライトとGitとの連携機能付きの <i>cat(1)</i> クローン。
@@ -12,8 +11,12 @@
12 <a href="#使い方">使い方</a> •
11 <a href="#使い方">使い方</a> •
13 <a href="#インストール">インストール</a> •
12 <a href="#インストール">インストール</a> •
14 <a href="#カスタマイズ">カスタマイズ</a> •
13 <a href="#カスタマイズ">カスタマイズ</a> •
15− <a href="#プロジェクトの目標と既存の類似したOSS">プロジェクトの目標と既存の類似したOSS</a> •
14+ <a href="#プロジェクトの目標と既存の類似したOSS">プロジェクトの目標と既存の類似したOSS</a><br>
16− 翻訳 [<a href="https://github.com/chinanf-boy/bat-zh">中文</a>][<a href="README-ja.md">日本語</a>][<a href="README-ko.md">한국어</a>]
15+ [<a href="../README.md">English</a>]
16+ [<a href="README-zh.md">中文</a>]
17+ [日本語]
18+ [<a href="README-ko.md">한국어</a>]
19+ [<a href="README-ru.md">Русский</a>]
17</p>
20</p>
18
21
19### シンタックスハイライト
22### シンタックスハイライト
@@ -178,7 +181,7 @@ man 2 select
178
181
179## インストール
182## インストール
180
183
181−[![Packaging status](https://repology.org/badge/vertical-allrepos/bat.svg)](https://repology.org/project/bat/versions)
184+[![Packaging status](https://repology.org/badge/vertical-allrepos/bat-cat.svg)](https://repology.org/project/bat-cat/versions)
182
185
183### On Ubuntu (`apt` を使用)
186### On Ubuntu (`apt` を使用)
184*... や他のDebianベースのLinuxディストリビューション*
187*... や他のDebianベースのLinuxディストリビューション*
@@ -202,7 +205,7 @@ ln -s /usr/bin/batcat ~/.local/bin/bat
202batの最新リリースを実行する場合、または Ubuntu/Debian の古いバージョンを使用している場合は、[release page](https://github.com/sharkdp/bat/releases) から最新の `.deb` パッケージをダウンロードし、
205batの最新リリースを実行する場合、または Ubuntu/Debian の古いバージョンを使用している場合は、[release page](https://github.com/sharkdp/bat/releases) から最新の `.deb` パッケージをダウンロードし、
203次の方法でインストールします:
206次の方法でインストールします:
204```bash
207```bash
205−sudo dpkg -i bat_0.18.2_amd64.deb # adapt version number and architecture
208+sudo dpkg -i bat_0.18.3_amd64.deb # adapt version number and architecture
206```
209```
207
210
208### On Alpine Linux
211### On Alpine Linux
@@ -363,7 +366,7 @@ ansible-galaxy install aeimer.install_bat
363### From source
366### From source
364
367
365
368
366−`bat` をソースからビルドしたいならば、Rust 1.36 以上の環境が必要です。
369+`bat` をソースからビルドしたいならば、Rust 1.51 以上の環境が必要です。
367`cargo` を使用してビルドすることができます:
370`cargo` を使用してビルドすることができます:
368
371
369```bash
372```bash
@@ -522,7 +525,7 @@ export BAT_CONFIG_PATH="/path/to/bat.conf"
522# Use italic text on the terminal (not supported on all terminals)
525# Use italic text on the terminal (not supported on all terminals)
523--italic-text=always
526--italic-text=always
524
527
525−# Use C++ syntax for .ino files
528+# Use C++ syntax for Arduino .ino files
526--map-syntax "*.ino:C++"
529--map-syntax "*.ino:C++"
527
530
528# Use ".gitignore"-style highlighting for ".ignore" files
531# Use ".gitignore"-style highlighting for ".ignore" files
doc/README-ko.md+23−7
@@ -1,5 +1,5 @@
1<p align="center">
1<p align="center">
2− <img src="../doc/logo-header.svg" alt="bat - a cat clone with wings"><br>
2+ <img src="logo-header.svg" alt="bat - a cat clone with wings"><br>
3 <a href="https://github.com/sharkdp/bat/actions?query=workflow%3ACICD"><img src="https://github.com/sharkdp/bat/workflows/CICD/badge.svg" alt="Build Status"></a>
3 <a href="https://github.com/sharkdp/bat/actions?query=workflow%3ACICD"><img src="https://github.com/sharkdp/bat/workflows/CICD/badge.svg" alt="Build Status"></a>
4 <img src="https://img.shields.io/crates/l/bat.svg" alt="license">
4 <img src="https://img.shields.io/crates/l/bat.svg" alt="license">
5 <a href="https://crates.io/crates/bat"><img src="https://img.shields.io/crates/v/bat.svg?colorB=319e8c" alt="Version info"></a><br>
5 <a href="https://crates.io/crates/bat"><img src="https://img.shields.io/crates/v/bat.svg?colorB=319e8c" alt="Version info"></a><br>
@@ -11,8 +11,12 @@
11 <a href="#사용법">사용법</a> •
11 <a href="#사용법">사용법</a> •
12 <a href="#설치">설치</a> •
12 <a href="#설치">설치</a> •
13 <a href="#사용자화">사용자화</a> •
13 <a href="#사용자화">사용자화</a> •
14− <a href="#프로젝트-목표와-대안들">프로젝트 목표와 대안들</a> •
14+ <a href="#프로젝트-목표와-대안들">프로젝트 목표와 대안들</a><br>
15− [<a href="https://github.com/chinanf-boy/bat-zh">中文</a>] [<a href="../doc/README-ja.md">日本語</a>] [<a href="../doc/README-ko.md">한국어</a>] [<a href="../doc/README-ru.md">Русский</a>]
15+ [<a href="../README.md">English</a>]
16+ [<a href="README-zh.md">中文</a>]
17+ [<a href="README-ja.md">日本語</a>]
18+ [한국어]
19+ [<a href="README-ru.md">Русский</a>]
16</p>
20</p>
17
21
18### 문법 강조
22### 문법 강조
@@ -218,7 +222,7 @@ man 2 select
218`bat`은 [Ubuntu](https://packages.ubuntu.com/eoan/bat)와
222`bat`은 [Ubuntu](https://packages.ubuntu.com/eoan/bat)와
219[Debian](https://packages.debian.org/sid/bat) 패키지 배포 과정에 도입되는 중이며,
223[Debian](https://packages.debian.org/sid/bat) 패키지 배포 과정에 도입되는 중이며,
220Eoan 19.10 버전의 Ubuntu에서부터 제공됩니다.
224Eoan 19.10 버전의 Ubuntu에서부터 제공됩니다.
221−현재 Debain에서는 불안정한 "Sid" 브랜치에서만 `bat`이 제공됩니다.
225+현재 Debian에서는 불안정한 "Sid" 브랜치에서만 `bat`이 제공됩니다.
222
226
223만약 충분히 최신 버전의 Ubuntu/Debian이 설치되어 있다면 간단히 다음을 실행하세요:
227만약 충분히 최신 버전의 Ubuntu/Debian이 설치되어 있다면 간단히 다음을 실행하세요:
224
228
@@ -244,7 +248,7 @@ ln -s /usr/bin/batcat ~/.local/bin/bat
244다음과 같이 `.deb` 패키지를 받아 설치하세요:
248다음과 같이 `.deb` 패키지를 받아 설치하세요:
245
249
246```bash
250```bash
247−sudo dpkg -i bat_0.18.2_amd64.deb # adapt version number and architecture
251+sudo dpkg -i bat_0.18.3_amd64.deb # adapt version number and architecture
248```
252```
249
253
250### Alpine Linux에서
254### Alpine Linux에서
@@ -279,6 +283,14 @@ pacman -S bat
279dnf install bat
283dnf install bat
280```
284```
281
285
286+### Funtoo Linux에서
287+
288+dev-kit을 통해 [`bat` 패키지](https://github.com/funtoo/dev-kit/tree/1.4-release/sys-apps/bat)를 설치할 수 있습니다:
289+
290+```bash
291+emerge sys-apps/bat
292+```
293+
282### Gentoo Linux에서
294### Gentoo Linux에서
283
295
284공식 소스를 통해
296공식 소스를 통해
@@ -404,7 +416,7 @@ scoop install bat
404
416
405### 소스에서
417### 소스에서
406
418
407−`bat`의 소스를 빌드하기 위해서는, Rust 1.45 이상이 필요합니다.
419+`bat`의 소스를 빌드하기 위해서는, Rust 1.51 이상이 필요합니다.
408`cargo`를 이용해 전부 빌드할 수 있습니다:
420`cargo`를 이용해 전부 빌드할 수 있습니다:
409
421
410```bash
422```bash
@@ -663,7 +675,7 @@ bat --generate-config-file
663# 터미널에서 이탤릭체 쓰기 (일부 터미널에서 미지원)
675# 터미널에서 이탤릭체 쓰기 (일부 터미널에서 미지원)
664--italic-text=always
676--italic-text=always
665
677
666−# .ino 파일에 C++ 문법 쓰기
678+# Arduino .ino 파일에 C++ 문법 쓰기
667--map-syntax "*.ino:C++"
679--map-syntax "*.ino:C++"
668```
680```
669
681
@@ -797,6 +809,10 @@ cargo install --locked --force
797- [keith-hall](https://github.com/keith-hall)
809- [keith-hall](https://github.com/keith-hall)
798- [Enselic](https://github.com/Enselic)
810- [Enselic](https://github.com/Enselic)
799
811
812+## 보안 취약점
813+
814+만약 `bat`의 취약점을 발견하였다면, [David Peter](https://david-peter.de/)에게 메일로 연락주시기 바랍니다.
815+
800## 프로젝트 목표와 대안들
816## 프로젝트 목표와 대안들
801
817
802`bat`은 다음과 같은 목표를 달성하려고 합니다:
818`bat`은 다음과 같은 목표를 달성하려고 합니다:
doc/README-ru.md+15−12
@@ -1,7 +1,6 @@
1<p align="center">
1<p align="center">
2− <img src="doc/logo-header.svg" alt="bat - a cat clone with wings"><br>
2+ <img src="logo-header.svg" alt="bat - a cat clone with wings"><br>
3− <a href="https://travis-ci.org/sharkdp/bat"><img src="https://travis-ci.org/sharkdp/bat.svg?branch=master" alt="Build Status"></a>
3+ <a href="https://github.com/sharkdp/bat/actions?query=workflow%3ACICD"><img src="https://github.com/sharkdp/bat/workflows/CICD/badge.svg" alt="Build Status"></a>
4− <a href="https://ci.appveyor.com/project/sharkdp/bat"><img src="https://ci.appveyor.com/api/projects/status/cptsmtbiwbnr2vhf/branch/master?svg=true"></a>
5 <img src="https://img.shields.io/crates/l/bat.svg" alt="license">
4 <img src="https://img.shields.io/crates/l/bat.svg" alt="license">
6 <a href="https://crates.io/crates/bat"><img src="https://img.shields.io/crates/v/bat.svg?colorB=319e8c" alt="Version info"></a><br>
5 <a href="https://crates.io/crates/bat"><img src="https://img.shields.io/crates/v/bat.svg?colorB=319e8c" alt="Version info"></a><br>
7 Клон утилиты <i>cat(1)</i> с поддержкой выделения синтаксиса и Git
6 Клон утилиты <i>cat(1)</i> с поддержкой выделения синтаксиса и Git
@@ -12,8 +11,12 @@
12 <a href="#как-использовать">Использование</a> •
11 <a href="#как-использовать">Использование</a> •
13 <a href="#установка">Установка</a> •
12 <a href="#установка">Установка</a> •
14 <a href="#кастомизация">Кастомизация</a> •
13 <a href="#кастомизация">Кастомизация</a> •
15− <a href="#цели-и-альтернативы">Цели и альтернативы </a> •
14+ <a href="#цели-и-альтернативы">Цели и альтернативы </a><br>
16− Перевод [<a href="https://github.com/chinanf-boy/bat-zh">中文</a>][<a href="doc/README-ja.md">日本語</a>][<a href="doc/README-ko.md">한국어</a>][<a href="doc/README-ru.md">Русский</a>]
15+ [<a href="../README.md">English]
16+ [<a href="README-zh.md">中文</a>]
17+ [<a href="README-ja.md">日本語</a>]
18+ [<a href="README-ko.md">한국어</a>]
19+ [Русский]
17</p>
20</p>
18
21
19### Выделение синтаксиса
22### Выделение синтаксиса
@@ -157,7 +160,7 @@ man 2 select
157
160
158## Установка
161## Установка
159
162
160−[![Packaging status](https://repology.org/badge/vertical-allrepos/bat.svg)](https://repology.org/project/bat/versions)
163+[![Packaging status](https://repology.org/badge/vertical-allrepos/bat-cat.svg)](https://repology.org/project/bat-cat/versions)
161
164
162### Ubuntu (с помощью `apt`)
165### Ubuntu (с помощью `apt`)
163*... и другие дистрибутивы основанные на Debian.*
166*... и другие дистрибутивы основанные на Debian.*
@@ -185,7 +188,7 @@ ln -s /usr/bin/batcat ~/.local/bin/bat
185[release page](https://github.com/sharkdp/bat/releases) и установить так:
188[release page](https://github.com/sharkdp/bat/releases) и установить так:
186
189
187```bash
190```bash
188−sudo dpkg -i bat_0.18.2_amd64.deb # измените архитектуру и версию
191+sudo dpkg -i bat_0.18.3_amd64.deb # измените архитектуру и версию
189```
192```
190
193
191### Alpine Linux
194### Alpine Linux
@@ -341,7 +344,7 @@ ansible-galaxy install aeimer.install_bat
341
344
342### Из исходников
345### Из исходников
343
346
344−Если вы желаете установить `bat` из исходников, вам понадобится Rust 1.45 или выше. После этого используйте `cargo`, чтобы все скомпилировать:
347+Если вы желаете установить `bat` из исходников, вам понадобится Rust 1.51 или выше. После этого используйте `cargo`, чтобы все скомпилировать:
345
348
346```bash
349```bash
347cargo install --locked bat
350cargo install --locked bat
@@ -434,11 +437,11 @@ export BAT_PAGER="less -RF"
434 `-R`/`--RAW-CONTROL-CHARS`,
437 `-R`/`--RAW-CONTROL-CHARS`,
435`-F`/`--quit-if-one-screen` и `-X`/`--no-init`. Последний флаг(`-X`) используется только для `less`, чья версия раньше 530.
438`-F`/`--quit-if-one-screen` и `-X`/`--no-init`. Последний флаг(`-X`) используется только для `less`, чья версия раньше 530.
436
439
437−Флаг `-R` нужен чтобы корректно воспроизвести ANSI цвета. Второй флаг (`-F`) говорит
440+Флаг `-R` нужен чтобы корректно воспроизвести ANSI цвета. Второй флаг (`-F`) говорит
438`less` чтобы тот сразу же завершился, если размер вывода меньше чем вертикальный размер терминала.
441`less` чтобы тот сразу же завершился, если размер вывода меньше чем вертикальный размер терминала.
439Это удобно для небольших файлов, так как вам не надо каждый раз нажимать `q`, чтобы выйти из пейджера. Третий флаг (`-X`) нужен для того, чтобы исправить баг с `--quit-if-one-screen` в старых версиях `less`. К сожалению, это блокирует возможность использования колеса мышки.
442Это удобно для небольших файлов, так как вам не надо каждый раз нажимать `q`, чтобы выйти из пейджера. Третий флаг (`-X`) нужен для того, чтобы исправить баг с `--quit-if-one-screen` в старых версиях `less`. К сожалению, это блокирует возможность использования колеса мышки.
440
443
441−Если вы хотите все же его включить, вы можете добавить флаг `-R`.
444+Если вы хотите все же его включить, вы можете добавить флаг `-R`.
442Для `less` новее чем 530 оно должно работать из коробки.
445Для `less` новее чем 530 оно должно работать из коробки.
443
446
444### Темная тема
447### Темная тема
@@ -481,7 +484,7 @@ bat --generate-config-file
481# Использовать курсив (поддерживается не всеми терминалами)
484# Использовать курсив (поддерживается не всеми терминалами)
482--italic-text=always
485--italic-text=always
483
486
484−# Использовать синтаксис C++ для всех .ino файлов
487+# Использовать синтаксис C++ для всех Arduino .ino файлов
485--map-syntax "*.ino:C++"
488--map-syntax "*.ino:C++"
486
489
487# Использовать синтаксик Git Ignore для всех файлов .ignore
490# Использовать синтаксик Git Ignore для всех файлов .ignore
@@ -499,7 +502,7 @@ Windows поддерживает только очень простой пейд
499### Цвета
502### Цвета
500
503
501Windows 10 поддерживает цвета и в `conhost.exe` (Command Prompt), и в PowerShell начиная с версии Windows
504Windows 10 поддерживает цвета и в `conhost.exe` (Command Prompt), и в PowerShell начиная с версии Windows
502−[v1511](https://ru.wikipedia.org/wiki/Windows_10#Обновления и поддержка), так же как и в bash. На ранних версиях Windows вы можете использовать
505+[v1511](https://ru.wikipedia.org/wiki/Windows_10#Обновления и поддержка), так же как и в bash. На ранних версиях Windows вы можете использовать
503[Cmder](http://cmder.net/), в котором есть [ConEmu](https://conemu.github.io/).
506[Cmder](http://cmder.net/), в котором есть [ConEmu](https://conemu.github.io/).
504
507
505**Внимание:** Версия `less` в Git и MSYS2 воспроизводит цвета некорректно. Если у вас нет других пейджеров, мы можете отключить использование пейджеров с помощью флага `--paging=never`
508**Внимание:** Версия `less` в Git и MSYS2 воспроизводит цвета некорректно. Если у вас нет других пейджеров, мы можете отключить использование пейджеров с помощью флага `--paging=never`
doc/README-zh.mdnew file+678
@@ -0,0 +1,678 @@
1+<p align="center">
2+ <img src="logo-header.svg" alt="bat - a cat clone with wings"><br>
3+ <a href="https://github.com/sharkdp/bat/actions?query=workflow%3ACICD"><img src="https://github.com/sharkdp/bat/workflows/CICD/badge.svg" alt="Build Status"></a>
4+ <img src="https://img.shields.io/crates/l/bat.svg" alt="license">
5+ <a href="https://crates.io/crates/bat"><img src="https://img.shields.io/crates/v/bat.svg?colorB=319e8c" alt="Version info"></a><br>
6+ 类似 <i>cat(1)</i>,但带有 git 集成和语法高亮.
7+</p>
8+
9+<p align="center">
10+ <a href="#语法高亮">主要功能</a> •
11+ <a href="#如何使用">使用方法</a> •
12+ <a href="#安装">安装</a> •
13+ <a href="#自定义">自定义</a> •
14+ <a href="#project-goals-and-alternatives">项目目标和替代方案</a><br>
15+ [<a href="../README.md">English</a>]
16+ [中文]
17+ [<a href="README-ja.md">日本語</a>]
18+ [<a href="README-ko.md">한국어</a>]
19+ [<a href="README-ru.md">Русский</a>]
20+</p>
21+
22+### 语法高亮
23+
24+`bat` 对大部分编程语言和标记语言提供语法高亮:
25+
26+![Syntax highlighting example](https://imgur.com/rGsdnDe.png)
27+
28+### Git 集成
29+
30+`bat` 能从 git 中获取文件的修改并展示在边栏(见下图):
31+
32+![Git integration example](https://i.imgur.com/2lSW4RE.png)
33+
34+### 不可打印(non-printable)字符可视化
35+
36+添加`-A`/`--show-all`参数可以文件文件中的不可打印字符:
37+
38+![Non-printable character example](https://i.imgur.com/WndGp9H.png)
39+
40+### 自动分页
41+
42+`bat`会在一般情况下将大于屏幕可显示范围的内容输出到分页器(pager, e.g. `less`)。
43+
44+你可以在调用时添加`--paging=never`参数来使`bat`不使用分页器(就像`cat`一样)。如果你想要用为`cat`使用`bat`别名,可以在 shell 配置文件(shell configuration)中添加`alias cat='bat --paging=never'`。
45+
46+#### 智能输出
47+
48+`bat`能够在设置了分页器选项的同时进行管道:wink:。
49+当`bat`检测到当前环境为非可交互终端或管道时(例如使用`bat`并将内容用管道输出到文件),`bat`会像`cat`一样,一次输出文件内容为纯文本且无视`--paging`参数。
50+
51+## 如何使用
52+
53+在终端中查看一个文件
54+
55+```bash
56+> bat README.md
57+```
58+
59+一次性展示多个文件
60+
61+```bash
62+> bat src/*.rs
63+```
64+
65+从`stdin`读入流,自动为内容添加语法高亮(前提是输入内容的语言可以被正确识别,通常根据内容第一行的 shebang 标记,形如`#!bin/sh`)
66+
67+```bash
68+> curl -s https://sh.rustup.rs | bat
69+```
70+
71+显式指定`stdin`输入的语言
72+
73+```bash
74+> yaml2json .travis.yml | json_pp | bat -l json
75+```
76+
77+显示不可打印字符
78+
79+```bash
80+> bat -A /etc/hosts
81+```
82+
83+与`cat`的兼容性
84+
85+```bash
86+bat > note.md # 创建一个空文件
87+
88+bat header.md content.md footer.md > document.md
89+
90+bat -n main.rs # 只显示行号
91+
92+bat f - g # 输出 f,接着是标准输入流,最后 g
93+```
94+
95+### 第三方工具交互
96+
97+#### `fzf`
98+
99+你可以使用`bat`作为`fzf`的预览器。这需要在`bat`后添加`--color=always`选项,以及`--line-range` 选项来限制大文件的加载次数。
100+
101+```bash
102+fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'
103+```
104+
105+更多信息请参阅[`fzf`的说明](https://github.com/junegunn/fzf#preview-window)。
106+
107+#### `find` 或 `fd`
108+
109+你可以使用`find`的`-exec`选项来用`bat`预览搜索结果:
110+
111+```bash
112+find … -exec bat {} +
113+```
114+
115+亦或者在用`fd`时添加`-X`/`--exec-batch`选项:
116+
117+```bash
118+fd … -X bat
119+```
120+
121+#### `ripgrep`
122+
123+`bat`也能用`batgrep`来显示`ripgrep`的搜索结果。
124+
125+```bash
126+batgrep needle src/
127+```
128+
129+#### `tail -f`
130+
131+当与`tail -f`一起使用,`bat`可以持续监视文件内容并为其添加语法高亮。
132+
133+```bash
134+tail -f /var/log/pacman.log | bat --paging=never -l log
135+```
136+
137+注意:这项功能需要在关闭分页时使用,同时要手动指定输入的内容语法(通过`-l log`)。
138+
139+#### `git`
140+
141+`bat`也能直接接受来自`git show`的输出并为其添加语法高亮(当然也需要手动指定语法):
142+
143+```bash
144+git show v0.6.0:src/main.rs | bat -l rs
145+```
146+
147+#### `git diff`
148+
149+`bat`也可以和`git diff`一起使用:
150+
151+```bash
152+batdiff() {
153+ git diff --name-only --diff-filter=d | xargs bat --diff
154+}
155+```
156+
157+该功能也作为一个独立工具提供,你可以在[`bat-extras`](https://github.com/eth-p/bat-extras)中找到`batdiff`。
158+
159+如果你想了解更多 git 和 diff 的信息,参阅[`delta`](https://github.com/dandavison/delta)。
160+
161+#### `xclip`
162+
163+当需要拷贝文件内容时,行号以及 git 标记会影响输出,此时可以使用`-p`/`--plain`参数来把纯文本传递给`xclip`。
164+
165+```bash
166+bat main.cpp | xclip
167+```
168+
169+`bat`会检测输出是否是管道重定向来决定是否使用纯文本输出。
170+
171+#### `man`
172+
173+`bat`也能给`man`的输出上色。这需要设置`MANPAGER`环境变量:
174+
175+```bash
176+export MANPAGER="sh -c 'col -bx | bat -l man -p'"
177+man 2 select
178+```
179+
180+(如果你使用的是 Debian 或者 Ubuntu,使用`batcat`替换`bat`)
181+
182+如果你遇到格式化问题,设置`MANROFFOPT="-c"`也许会有帮助。
183+
184+`batman`能提供类似功能——作为一个独立的命令。
185+
186+注意:[man page 语法](assets/syntaxes/02_Extra/Manpage.sublime-syntax) 还需要完善。在使用特定的`man`实现时该功能[无法正常工作](https://github.com/sharkdp/bat/issues/1145)。
187+
188+#### `prettier` / `shfmt` / `rustfmt`
189+
190+`prettybat`脚本能够格式化代码并用`bat`输出。
191+
192+## 安装
193+
194+[![Packaging status](https://repology.org/badge/vertical-allrepos/bat-cat.svg)](https://repology.org/project/bat-cat/versions)
195+
196+### Ubuntu (使用 `apt`)
197+
198+*... 以及其他基于 Debian的发行版.*
199+
200+`bat` 要求的版本: [Ubuntu 高于 20.04 ("Focal")](https://packages.ubuntu.com/search?keywords=bat&exact=1) 和 [Debian 高于 August 2021 (Debian 11 - "Bullseye")](https://packages.debian.org/bullseye/bat).
201+
202+当你的发行版满足条件那么直接在终端运执行:
203+
204+```bash
205+sudo apt install bat
206+```
207+
208+重要:如果你通过这种方法安装`bat`,请留意你所安装的可执行文件是否为`batcat`(由[其他包的可执行文件名冲突](https://github.com/sharkdp/bat/issues/982)造成)。你可以创建一个`bat -> batcat`的符号链接(symlink)或别名来避免因为可执行文件不同带来的问题并与其他发行版保持一致性。
209+
210+```bash
211+mkdir -p ~/.local/bin
212+ln -s /usr/bin/batcat ~/.local/bin/bat
213+```
214+
215+### Ubuntu (使用`.deb`包)
216+
217+*... 以及其他基于 Debian的发行版.*
218+
219+如果你无法使用上一种方法安装,或需要用最新版的`bat`,你可以从[release 页面](https://github.com/sharkdp/bat/releases)下载最新的`.deb`包并通过下述方法安装:
220+
221+```bash
222+sudo dpkg -i bat_0.18.3_amd64.deb # adapt version number and architecture
223+```
224+
225+### Alpine Linux
226+
227+你可以用下面下列命令从官方源中安装[`bat 包`](https://pkgs.alpinelinux.org/packages?name=bat):
228+
229+```bash
230+apk add bat
231+```
232+
233+### Arch Linux
234+
235+你可以用下面下列命令从官方源中安装[`bat`包](https://www.archlinux.org/packages/community/x86_64/bat/):
236+
237+```bash
238+pacman -S bat
239+```
240+
241+### Fedora
242+
243+你可以使用下列命令从官方[Fedora Modular](https://docs.fedoraproject.org/en-US/modularity/using-modules/)仓库安装[`bat` 包](https://koji.fedoraproject.org/koji/packageinfo?packageID=27506):
244+
245+```bash
246+dnf install bat
247+```
248+
249+### Funtoo Linux
250+
251+你可以从 dev-kit 中安装[`bat` 包](https://github.com/funtoo/dev-kit/tree/1.4-release/sys-apps/bat):
252+
253+```bash
254+emerge sys-apps/bat
255+```
256+
257+### Gentoo Linux
258+
259+你可以使用下列命令从官方源中安装 [`bat` 包](https://packages.gentoo.org/packages/sys-apps/bat):
260+
261+
262+```bash
263+emerge sys-apps/bat
264+```
265+
266+### Void Linux
267+
268+你可以用 xbps-install 安装`bat`:
269+
270+```bash
271+xbps-install -S bat
272+```
273+
274+### Termux:
275+
276+你可以用 pkg 安装`bat:
277+
278+```bash
279+pkg install bat
280+```
281+
282+### FreeBSD
283+
284+你可以用 pkg 来安装一份预编译的[`bat` 包](https://www.freshports.org/textproc/bat):
285+
286+```bash
287+pkg install bat
288+```
289+
290+或从 FreeBSD ports 自己编译一份:
291+
292+```bash
293+cd /usr/ports/textproc/bat
294+make install
295+```
296+
297+### OpenBSD
298+
299+你可以用`pkg——add`安装`bat`包
300+
301+```bash
302+pkg_add bat
303+```
304+
305+### 通过 nix
306+
307+你可以用[nix 包管理器](https://nixos.org/nix)安装`bat`:
308+
309+```bash
310+nix-env -i bat
311+```
312+
313+### openSUSE
314+
315+你可以用 zypper 安装`bat`:
316+
317+```bash
318+zypper install bat
319+```
320+
321+### 通过 snap
322+
323+目前还没有推荐的 snap 包可用。可以使用其他现存的包但不会受到官方支持且可能会遇到[问题](https://github.com/sharkdp/bat/issues/1519)。
324+
325+### macOS (或 Linux) 通过 Homebrew
326+
327+你可以用 [Homebrew on MacOS](https://formulae.brew.sh/formula/bat) 或者 [Homebrew on Linux](https://formulae.brew.sh/formula-linux/bat) 安装`bat`:
328+
329+```bash
330+brew install bat
331+```
332+
333+### macOS 通过 MacPorts
334+
335+或用 [MacPorts](https://ports.macports.org/port/bat/summary) 安装`bat`:
336+
337+```bash
338+port install bat
339+```
340+
341+### Windows
342+
343+在 Windows 上具有多种安装`bat`的方法。若你已完成安装,记得看看 ["在 Windows 上使用`bat`"](#在-Windows-中使用-bat) 。
344+
345+#### 前置条件
346+
347+你必须已安装 [Visual C++ Redistributable](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) 包。
348+
349+#### 使用 Chocolatey
350+
351+你可以用[Chocolatey](https://chocolatey.org/packages/Bat) 安装`bat`:
352+
353+```bash
354+choco install bat
355+```
356+
357+#### 使用 Scoop
358+
359+你可以用 [scoop](https://scoop.sh/) 安装`bat`:
360+
361+```bash
362+scoop install bat
363+```
364+
365+#### 使用预编译二进制版本
366+
367+直接从 [Release 发布页](https://github.com/sharkdp/bat/releases) 下载已经编译好的二进制包,前提是你安装了 [Visual C++ Redistributable](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) 包。
368+
369+### 使用二进制版本
370+
371+在 [Release 发布页](https://github.com/sharkdp/bat/releases) 中可以找到为多种架构构建的`bat`版本和静态编译的二进制文件(文件名带有`musl`)。
372+
373+### 从源码编译
374+
375+如果你想要自己构建`bat`,那么你需要安装有高于1.51版本的 Rust。
376+
377+使用以下命令编译。
378+
379+```bash
380+cargo install --locked bat
381+```
382+
383+注意:man page或 shell 自动补全所需要的额外文件无法通过该方法安装。但你可以在`cargo`的生成目录找到这些文件(`build`目录下)。
384+
385+## 自定义
386+
387+### 语法高亮主题
388+
389+使用 `bat --list-themes` 一份语法高亮主题的清单,然后用`--theme=TwoDark`来指定主题为`TwoDark`,也可以通过设置`BAT_THEME`环境变量来选定主题。把`export BAT_THEME="TwoDark"`添加到 shell 的启动脚本(shell startup file)来取得永久效果。或者使用`bat`的[配置文件](#c配置文件)
390+
391+若想要查看所有主题在一个文件上的显示效果可以用一下命令(需要安装`fzf`):
392+
393+```bash
394+bat --list-themes | fzf --preview="bat --theme={} --color=always /path/to/file"
395+```
396+
397+`bat`在默认情况下能够在黑色主题背景下获得较好的效果,如果你的终端使用亮色背景,可以试试`GitHub`或`OneHalfLight`。想要添加自定义主题可以参考[添加主题](#添加主题)。
398+
399+### 8-bit 主题
400+
401+`bat` 自带三个 [8-bit 色彩](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 主题:
402+
403+- `ansi` 适应于大部分终端。它使用 3-bit 色彩:黑红绿黄蓝洋红靛青白。
404+- `base16`专为 [base16](https://github.com/chriskempson/base16) 终端设计。它使用 4-bit 色彩(带有亮度的 3-bit 色彩)。根据 [base16 styling guidelines](https://github.com/chriskempson/base16/blob/master/styling.md) 制作。
405+- `base16-25`专为 [base16-shell](https://github.com/chriskempson/base16-shell) 设计。它把部分亮色替换为 8-bit 色彩。请不要直接使用该主题,除非你清楚你的256色终端是否使用 base16-shell。
406+
407+尽管这些主题具有诸多限制,但具有一些 truecolor 主题不具有的三个优点:
408+
409+- 享有最佳兼容性。并不是所有终端工具都支持高于 3-bit 的色彩。
410+- 适应终端主题。
411+- 视觉上和其他的终端工具更协调。
412+
413+### 输出样式
414+
415+你可以用`--style`参数来控制`bat`输出的样式。使用`--style=numbers,chanegs`可以只开启 Git 修改和行号显示而不添加其他内容。`BAT_STYLE`环境变量具有相同功能。
416+
417+### 添加新的语言和语法
418+
419+当现有的`bat`不支持某个语言或语法时你可以自己添加。
420+
421+`bat`使用`syntect`库来支持语法高亮,该库使用 [Sublime Text `.sublime-syntax` 语法文件](https://www.sublimetext.com/docs/3/syntax.html)和主题。而后者中的大部分可以在 [Package Control](https://packagecontrol.io/) 找到。
422+
423+当你找到一份语法文件,按照下列方法:
424+
425+1. 创建包含语法描述文件的目录:
426+
427+ ```bash
428+ mkdir -p "$(bat --config-dir)/syntaxes"
429+ cd "$(bat --config-dir)/syntaxes"
430+
431+ # Put new '.sublime-syntax' language definition files
432+ # in this folder (or its subdirectories), for example:
433+ git clone https://github.com/tellnobody1/sublime-purescript-syntax
434+ ```
435+
436+2. 调用下面指令把文件转换为二进制缓存:
437+
438+ ```bash
439+ bat cache --build
440+ ```
441+
442+3. 最后用`bat --list-languages`来检查新的语法是否被成功导入。如果想要回滚到最初状态,执行:
443+
444+ ```bash
445+ bat cache --clear
446+ ```
447+
448+4. 如果你觉得`bat`有必要自带该语法支持,请在阅读[指导](doc/assets.md)后向仓库提交 [Syntax Request](https://github.com/sharkdp/bat/issues/new?labels=syntax-request&template=syntax_request.md)。
449+
450+### 添加主题
451+
452+类似添加语法支持,第一步也是创建一个带有语法高亮的目录
453+
454+```bash
455+mkdir -p "$(bat --config-dir)/themes"
456+cd "$(bat --config-dir)/themes"
457+
458+# 下载一个主题
459+git clone https://github.com/greggb/sublime-snazzy
460+
461+# 更新二进制缓存
462+bat cache --build
463+```
464+
465+然后用`bat --list-themes`检查添加是否成功。
466+
467+### 添加或修改文件关联
468+
469+你可以用`--map-syntax`参数添加或修改文件名模板。它需要一个类似`pattern:syntax`的参数来指定,其中`pattern`是 glob 文件匹配模板,`syntax`则是支持的语法的完整名(使用`bat --list-languages`来查看获取一份清单)。
470+
471+注意:方便起见,你可能需要把参数添加到配置文件,而不是每次都在命令行中传递该参数。
472+
473+以下展示了把“INI”关联到具有`.conf`扩展名的文件
474+
475+```bash
476+--map-syntax='*.conf:INI'
477+```
478+
479+把`.ignore`文件与“Git Ignore”关联
480+
481+```bash
482+--map-syntax='.ignore:Git Ignore'
483+```
484+
485+把`/etc/apache2`内的`.conf`文件关联到“Apache Conf”语法(`bat`已默认绑定)
486+
487+```bash
488+--map-syntax='/etc/apache2/**/*.conf:Apache Conf'
489+```
490+
491+### 使用自定义分页器
492+
493+`bat`默认使用`PAGER`环境变量定义的分页器,如果没有定义则使用`less`。`bat`提供了`BAT_PAGER`环境变量来专为`bat`选择分页器(优先级高于`PAGER`)。
494+
495+注意:当`PAGER`设置为`more`或`most`时,`bat`会使用`less`来代替以确保能提供色彩支持。
496+
497+```bash
498+export BAT_PAGER="less -RF"
499+```
500+
501+除了使用环境变量来改变`bat`使用的的分页器,也可以在配置文件中提供`--pager`参数。
502+
503+注意:`bat`会把部分命令行参数直接传递给分页器:`-R`/`--RAW-CONTROL-CHARS`,`-F`/`--quit-if-one-screen`以及`-X`/`--no-init`(该参数仅适用于高于530版本的`less`)。其中`-R` 参数需要在解释 ANSI 标准颜色时起作用。`-F`则指示`less`在输出内容的垂直尺寸小于终端尺寸时立即退出。当文件内容可以在一个屏幕里完全显示时,就不需要按`q`键退出阅读模式,很方便就是了。`-X`则能修复`-F`在`less`的老版本中的一些bug(代价是不支持鼠标滚轮,但可以用`-R`来取消`quit-if-one-screen`功能。)。
504+
505+### 缩进
506+
507+`bat` 使用四个空格宽的制表符,而不受分页器影响,同时也可以用`--tabs`参数来自定义。
508+
509+注意:通过其他方法针对分页器的制表符设置不会生效(例如通过`bat`的`--pager`参数传递或`less`使用的`LESS`环境变量)。因为在输出提交给分页器之前,内容中的制表符就已经被`bat`替换为了特定长度的空格以避免由于边栏导致的缩进问题。你可以用给`bat`传递`--tabs=0`参数来取消该设定并让分页器自己处理制表符。
510+
511+### 暗色模式
512+
513+如果你用的 macOS 处于暗色模式,你可以为`bat`启用基于系统主题的主题。如下所示操作会让`bat`在系统处于亮色模式时加载`GitHub`主题和暗色模式时加载`default`主题。
514+
515+```bash
516+alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo default || echo GitHub)"
517+```
518+
519+## 配置文件
520+
521+```bash
522+bat --config-file
523+```
524+
525+你也可以用`BAT_CONFIG_PATH`来为`bat`指定自定义位置的配置文件:
526+
527+```bash
528+export BAT_CONFIG_PATH="/path/to/bat.conf"
529+```
530+
531+使用`--generate-config-file`参数调用`bat`会在指定位置生成一份默认的`bat`配置文件:
532+
533+```bash
534+bat --generate-config-file
535+```
536+
537+### 格式
538+
539+配置文件其实是一份按行分割的命令行参数列表。你可以用`bat --help`来查看所有可用的参数和适用的值。配置文件中`#`打头的行会被视为注释而不生效。
540+
541+以下是一份示例:
542+
543+```bash
544+# 设置主题为 TwoDark
545+--theme="TwoDark"
546+
547+# 显示行号和 Git 修改信息, 但没有边框
548+--style="numbers,changes,header"
549+
550+# 在终端中以斜体输出文本(不是所有终端都支持)
551+--italic-text=always
552+
553+# 使用 C++ 语法来给 Ardiuno 的 .ino 文件提供高亮
554+--map-syntax "*.ino:C++"
555+```
556+
557+## 在 Windows 中使用 `bat`
558+
559+`bat` 在 Windows 上开箱即用,除了部分功能需要额外配置。
560+
561+### 前置条件
562+
563+你需要先安装 [Visual C++ Redistributable](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) 包。
564+
565+### 分页
566+
567+Windows 只有一个提供有限功能的分页器,你可以从[这里下载](http://www.greenwoodsoftware.com/less/download.html)或用 [Chocolatey 安装](https://chocolatey.org/packages/Less) Windows 版本的`less`。第一种方法需要你把它所在目录加入`PATH`环境变量或[定义分页器变量](#使用自定义分页器)
568+
569+### 色彩
570+
571+Windows 10 从 [v1511](https://en.wikipedia.org/wiki/Windows_10_version_history#Version_1511_(November_Update)) 开始 shell(`conhost.exe`,命令提示符或 Powershell)原生支持色彩。在早些版本的 Windows 中你可以用第三方终端如 [Cmder](http://cmder.net/) (使用[ConEmu](https://conemu.github.io/))。
572+
573+注意:Git 和 MSYS 版本的 `less` 没法正确在 Windows 表达色彩。如果你没有安装其他分页器,你可以直接用`--paging=never`或设置`BAT_PAGER`为空字符串来关闭分页功能。
574+
575+### Cygwin
576+
577+Windows 上的`bat`原生不支持 Cygwin' unix-style 路径(`/cygdrive/*`)。当传递一个绝对 cygwin 路径作为参数值时,`bat`会产生`The system cannot find the path specified. (os error 3)`的错误。你可以`.bash_profile`文件中添加以下函数来解决这个问题。
578+
579+```bash
580+bat() {
581+ local index
582+ local args=("$@")
583+ for index in $(seq 0 ${#args[@]}) ; do
584+ case "${args[index]}" in
585+ -*) continue;;
586+ *) [ -e "${args[index]}" ] && args[index]="$(cygpath --windows "${args[index]}")";;
587+ esac
588+ done
589+ command bat "${args[@]}"
590+}
591+```
592+
593+## 疑难解答
594+
595+### 输出内容含糊不清
596+
597+当输入文件包含颜色代码和其他 ANSI 转义符号时,`bat`会产生错误的语法高亮和文本,导致输出看起来令人无法理解。当你需要输出该文件时,请使用`--color=never --wrap=never`参数来关闭上色和文字包裹。
598+
599+### 终端与色彩
600+
601+`bat`会区分支持 truecolor 和不支持 truecolor 的终端。但是大部分语法高亮主题都是用了没有为 8-bit 色彩支持的颜色,因此强烈推荐使用一个支持 24-bit 色彩的终端(`terminator`,`konsole`,`iTerm2`...),或使用一个 [8-bit 主题](#8-bit-主题)来限制一些颜色。查看[这篇文章使用自定义分页器](https://gist.github.com/XVilka/8346728)了解更多支持 truecolor 的终端。你需要定义`COLORTERM`变量为`truecolor`或`24bit`来确保`bat`能够识别终端的对颜色的支持,否则会使用 8 bit 模式。
602+
603+### 行号和边框很难看清
604+
605+试试其他主题,说不定能有所改善(用`bat --list-themes`查看主题列表)。
606+
607+### 文件编码
608+
609+`bat`原生支持 UTF-8 和 UTF-16。至于其他文件你可能需要在使用`bat`之前先把编码转换到UTF-8。
610+
611+这里展示了使用`iconv`来把 Latin-1(ISO-8859-1) 编码的 PHP 文件转换到 UTF-8:
612+
613+```bash
614+iconv -f ISO-8859-1 -t UTF-8 my-file.php | bat
615+```
616+
617+注意: 当`bat`无法识别语言时你可能会需要`-l`/`--language`参数。
618+
619+## Development
620+
621+```bash
622+# Recursive clone to retrieve all submodules
623+git clone --recursive https://github.com/sharkdp/bat
624+
625+# Build (debug version)
626+cd bat
627+cargo build --bins
628+
629+# Run unit tests and integration tests
630+cargo test
631+
632+# Install (release version)
633+cargo install --path . --locked
634+
635+# Build a bat binary with modified syntaxes and themes
636+bash assets/create.sh
637+cargo install --path . --locked --force
638+```
639+
640+If you want to build an application that uses `bat`s pretty-printing
641+features as a library, check out the [the API documentation](https://docs.rs/bat/).
642+Note that you have to use either `regex-onig` or `regex-fancy` as a feature
643+when you depend on `bat` as a library.
644+
645+## Contributing
646+
647+Take a look at the [`CONTRIBUTING.md`](CONTRIBUTING.md) guide.
648+
649+## Maintainers
650+
651+- [sharkdp](https://github.com/sharkdp)
652+- [eth-p](https://github.com/eth-p)
653+- [keith-hall](https://github.com/keith-hall)
654+- [Enselic](https://github.com/Enselic)
655+
656+## Security vulnerabilities
657+
658+Please contact [David Peter](https://david-peter.de/) via email if you want to report a vulnerability in `bat`.
659+
660+## Project goals and alternatives
661+
662+`bat` tries to achieve the following goals:
663+
664+- Provide beautiful, advanced syntax highlighting
665+- Integrate with Git to show file modifications
666+- Be a drop-in replacement for (POSIX) `cat`
667+- Offer a user-friendly command-line interface
668+
669+There are a lot of alternatives, if you are looking for similar programs. See
670+[this document](doc/alternatives.md) for a comparison.
671+
672+## License
673+
674+Copyright (c) 2018-2021 [bat-developers](https://github.com/sharkdp/bat).
675+
676+`bat` is made available under the terms of either the MIT License or the Apache License 2.0, at your option.
677+
678+See the [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) files for license details.
doc/alternatives.md+39
@@ -22,3 +22,42 @@ request.
22Some other alternatives that are also related, but not yet included in the table:
22Some other alternatives that are also related, but not yet included in the table:
23- [lesspipe](https://github.com/wofr06/lesspipe)
23- [lesspipe](https://github.com/wofr06/lesspipe)
24- [vimpager](https://github.com/rkitover/vimpager)
24- [vimpager](https://github.com/rkitover/vimpager)
25+
26+## Benchmarks
27+
28+The benchmarks above have been created with this script:
29+```bash
30+#!/usr/bin/env bash
31+
32+cd "$(dirname "${BASH_SOURCE[0]}")" || exit
33+
34+if ! command -v hyperfine > /dev/null 2>&1; then
35+ echo "'hyperfine' does not seem to be installed."
36+ echo "You can get it here: https://github.com/sharkdp/hyperfine"
37+ exit 1
38+fi
39+
40+SRC="test-src/jquery-3.3.1.js"
41+
42+
43+cmd_bat="bat --style=full --color=always --paging=never '$SRC'"
44+cmd_bat_simple="bat --plain --wrap=never --tabs=0 --color=always --paging=never '$SRC'"
45+cmd_pygmentize="pygmentize -g '$SRC'"
46+cmd_highlight="highlight -O truecolor '$SRC'"
47+cmd_ccat="ccat --color=always '$SRC'"
48+cmd_source_highlight="source-highlight --failsafe --infer-lang -f esc -i '$SRC'"
49+cmd_hicat="hicat '$SRC'"
50+cmd_coderay="coderay '$SRC'"
51+cmd_rouge="rougify '$SRC'"
52+
53+hyperfine --warmup 3 \
54+ "$cmd_bat" \
55+ "$cmd_bat_simple" \
56+ "$cmd_pygmentize" \
57+ "$cmd_highlight" \
58+ "$cmd_ccat" \
59+ "$cmd_source_highlight" \
60+ "$cmd_hicat" \
61+ "$cmd_coderay" \
62+ "$cmd_rouge" \
63+```
doc/assets.md+1−1
@@ -71,7 +71,7 @@ themes (`bat cache --clear`).
71
71
72## Criteria for inclusion of new syntaxes
72## Criteria for inclusion of new syntaxes
73
73
74−* More than 10,000 downloads on packagecontrol.io/
74+* More than 10,000 downloads at [Package Control](https://packagecontrol.io)
75
75
76### Manual modifications
76### Manual modifications
77
77
doc/release-checklist.mdnew file+73
@@ -0,0 +1,73 @@
1+# Release checklist
2+
3+## Version bump
4+
5+- [ ] Update version in `Cargo.toml`. Run `cargo build` to update `Cargo.lock`.
6+ Make sure to `git add` the `Cargo.lock` changes as well.
7+- [ ] Find the current min. supported Rust version by running
8+ `grep '^\s*MIN_SUPPORTED_RUST_VERSION' .github/workflows/CICD.yml`.
9+- [ ] Update the version and the min. supported Rust version in `README.md` and
10+ `doc/README-*.md`. Check with
11+ `git grep -i -e 'rust.*1\.' -e '1\..*rust' | grep README | grep -v tests/`.
12+- [ ] Update `CHANGELOG.md`. Introduce a section for the new release.
13+
14+## Update syntaxes and themes (build assets)
15+
16+- [ ] Install the latest master version (`cargo clean && cargo install --locked -f --path .`) and make
17+ sure that it is available on the `PATH` (`bat --version` should show the
18+ new version).
19+- [ ] Run `assets/create.sh` and check in the binary asset files.
20+
21+## Documentation
22+
23+- [ ] Review `-h`, `--help`, and the `man` page. All of these are shown in
24+ the output of the CI job called *Documentation*, so look there.
25+ The CI workflow corresponding to the tip of the master branch is a good place to look.
26+
27+## Pre-release checks
28+
29+- [ ] Push all changes and wait for CI to succeed (before continuing with the
30+ next section).
31+- [ ] Optional: manually test the new features and command-line options. To do
32+ this, install the latest `bat` version again (to include the new syntaxes
33+ and themes).
34+- [ ] Run `cargo publish --dry-run` to make sure that it will
35+ succeed later (after creating the GitHub release).
36+
37+## Release
38+
39+- [ ] Create a tag and push it: `git tag vX.Y.Z; git push origin tag vX.Y.Z`.
40+ This will trigger the deployment via GitHub Actions.
41+ REMINDER: If your `origin` is a fork, don't forget to push to e.g. `upstream` instead!
42+- [ ] Go to https://github.com/sharkdp/bat/releases/new to create the new
43+ release. Select the new tag and also use it as the release title. For the
44+ release notes, copy the corresponding section from `CHANGELOG.md` and
45+ possibly add additional remarks for package maintainers.
46+ Publish the release.
47+- [ ] Check if the binary deployment works (archives and Debian packages should
48+ appear when the CI run for the Git tag has finished).
49+- [ ] Publish to crates.io by running `cargo publish` in a *clean* repository.
50+ The safest way to do this is to clone a fresh copy.
51+
52+## Post-release
53+
54+- [ ] Prepare a new "unreleased" section at the top of `CHANGELOG.md`.
55+ Put this at the top:
56+
57+```
58+# unreleased
59+
60+## Features
61+
62+## Bugfixes
63+
64+## Other
65+
66+## Syntaxes
67+
68+## Themes
69+
70+## `bat` as a library
71+
72+
73+```
doc/sponsors.mdnew file+14
@@ -0,0 +1,14 @@
1+## Sponsors
2+
3+`bat` development is sponsored by many individuals and companies. Thank you very much!
4+
5+Please note, that being sponsored does not affect the individuality of the `bat`
6+project or affect the maintainers' actions in any way.
7+We remain impartial and continue to assess pull requests solely on merit - the
8+features added, bugs solved, and effect on the overall complexity of the code.
9+No issue will have a different priority based on sponsorship status of the
10+reporter.
11+
12+Contributions from anybody are most welcomed, please see our [`CONTRIBUTING.md`](../CONTRIBUTING.md) guide.
13+
14+If you want to see our biggest sponsors, check the top of [`README.md`](../README.md#sponsors).
doc/sponsors/workos-logo-white-bg.svgnew file+11
@@ -0,0 +1,11 @@
1+<svg width="1354" height="420" viewBox="0 0 1354 420" fill="none" xmlns="http://www.w3.org/2000/svg">
2+<rect width="1354" height="420" rx="20" fill="white"/>
3+<path d="M434.751 133.122H466.637L489.595 227.729C493.852 245.585 494.697 256.219 494.697 256.219H495.128C495.128 256.219 496.61 245.808 500.867 227.729L522.757 133.122H558.9L582.066 227.729C586.53 246.223 587.598 256.219 587.598 256.219H588.236C588.236 256.219 588.666 246.223 592.907 227.729L615.02 133.122H646.907L606.523 288.313H571.017L546.576 194.344C541.474 173.936 541.044 164.801 541.044 164.801H540.614C540.614 164.801 540.183 173.936 535.512 194.344L512.553 288.313H475.996L434.751 133.122Z" fill="black"/>
4+<path d="M641.583 231.934C641.583 196.428 664.541 173.47 699.202 173.47C733.639 173.47 756.597 196.428 756.597 231.934C756.597 267.647 733.639 290.828 699.202 290.828C664.557 290.812 641.583 267.647 641.583 231.934ZM726.832 231.934C726.832 208.976 715.783 195.998 699.202 195.998C681.346 195.998 671.349 210.458 671.349 231.934C671.349 255.323 682.398 268.284 699.202 268.284C717.058 268.284 726.832 253.824 726.832 231.934Z" fill="black"/>
5+<path d="M770.836 175.21H799.103V196.048H799.741C804.635 185.207 816.322 174.365 836.299 174.365C839.695 174.365 841.831 174.796 843.314 175.21V203.478H842.469C842.469 203.478 839.918 202.633 832.903 202.633C811.013 202.633 799.103 215.594 799.103 239.828V288.295H770.836V175.21Z" fill="black"/>
6+<path d="M856.5 133.122H884.767V182.865C884.767 212.2 884.336 217.509 884.336 217.509H884.767L926.857 175.212H962.139L912.843 224.11L970.031 288.313H936.646L895.401 241.536L884.767 251.946V288.297H856.5V133.122Z" fill="black"/>
7+<path d="M970.444 211.285C970.444 163.455 1000.21 131.569 1044.85 131.569C1089.49 131.569 1119.26 163.455 1119.26 211.285C1119.26 259.114 1089.49 291.001 1044.85 291.001C1000.21 291.001 970.444 259.114 970.444 211.285ZM1088.42 211.285C1088.42 178.761 1071 156.855 1044.84 156.855C1018.67 156.855 1001.26 178.761 1001.26 211.285C1001.26 243.809 1018.69 265.715 1044.84 265.715C1070.98 265.715 1088.42 243.809 1088.42 211.285Z" fill="black"/>
8+<path d="M1130.08 236.656H1162.4C1162.4 254.943 1174.95 265.146 1194.08 265.146C1210.23 265.146 1221.29 257.063 1221.29 245.584C1221.29 232.622 1212.79 229.21 1185.79 223.901C1161.12 219.007 1134.98 210.716 1134.98 178.399C1134.98 151.408 1157.93 131 1193.01 131C1229.57 131 1252.11 150.132 1252.11 179.037H1219.79C1219.79 165.007 1208.95 156.286 1193.01 156.286C1176.86 156.286 1166.86 164.146 1166.86 175.625C1166.86 187.742 1173.88 192.413 1195.56 196.878C1227.65 203.685 1254.02 207.288 1254.02 243.001C1254.02 271.3 1229.36 290.432 1193.01 290.432C1156.02 290.432 1130.08 268.957 1130.08 236.656Z" fill="black"/>
9+<path d="M100 210C100 214.824 101.269 219.647 103.723 223.793L148.231 300.878C152.8 308.747 159.739 315.178 168.369 318.055C185.377 323.724 202.977 316.447 211.354 301.893L222.1 283.278L179.708 210L224.47 132.408L235.216 113.792C238.431 108.208 242.747 103.638 247.824 100H243.17H178.777C166.677 100 155.508 106.431 149.5 116.923L103.723 196.208C101.269 200.354 100 205.177 100 210Z" fill="#6363F1"/>
10+<path d="M353.847 210C353.847 205.177 352.578 200.353 350.124 196.207L305.024 118.107C296.647 103.638 279.047 96.3608 262.039 101.945C253.409 104.822 246.47 111.253 241.901 119.122L231.747 136.638L274.139 210L229.378 287.592L218.632 306.208C215.416 311.708 211.101 316.362 206.024 320H210.678H275.07C287.17 320 298.34 313.569 304.347 303.077L350.124 223.792C352.578 219.646 353.847 214.823 353.847 210Z" fill="#6363F1"/>
11+</svg>
rustfmt.tomlnew file+1
@@ -0,0 +1 @@
1+# Defaults are used
src/assets.rs+320−293
@@ -1,193 +1,147 @@
1−use std::collections::BTreeMap;
2use std::ffi::OsStr;
1use std::ffi::OsStr;
3use std::fs;
2use std::fs;
4−use std::path::{Path, PathBuf};
3+use std::path::Path;
5
4
6−use lazycell::LazyCell;
5+use once_cell::unsync::OnceCell;
7
6
8−use syntect::dumps::{dump_to_file, from_binary, from_reader};
7+use syntect::highlighting::Theme;
9−use syntect::highlighting::{Theme, ThemeSet};
8+use syntect::parsing::{SyntaxReference, SyntaxSet};
10−use syntect::parsing::{SyntaxReference, SyntaxSet, SyntaxSetBuilder};
11
9
12use path_abs::PathAbs;
10use path_abs::PathAbs;
13
11
14−use crate::assets_metadata::AssetsMetadata;
15−use crate::bat_warning;
16use crate::error::*;
12use crate::error::*;
17−use crate::input::{InputReader, OpenedInput, OpenedInputKind};
13+use crate::input::{InputReader, OpenedInput};
18−use crate::syntax_mapping::{MappingTarget, SyntaxMapping};
14+use crate::syntax_mapping::ignored_suffixes::IgnoredSuffixes;
15+use crate::syntax_mapping::MappingTarget;
16+use crate::{bat_warning, SyntaxMapping};
17+
18+use lazy_theme_set::LazyThemeSet;
19+
20+use serialized_syntax_set::*;
21+
22+#[cfg(feature = "build-assets")]
23+pub use crate::assets::build_assets::*;
24+
25+pub(crate) mod assets_metadata;
26+#[cfg(feature = "build-assets")]
27+mod build_assets;
28+mod lazy_theme_set;
29+mod serialized_syntax_set;
19
30
20#[derive(Debug)]
31#[derive(Debug)]
21pub struct HighlightingAssets {
32pub struct HighlightingAssets {
22− syntax_set_cell: LazyCell<SyntaxSet>,
33+ syntax_set_cell: OnceCell<SyntaxSet>,
23− serialized_syntax_set: Option<SerializedSyntaxSet>,
34+ serialized_syntax_set: SerializedSyntaxSet,
24− theme_set: ThemeSet,
35+
36+ theme_set: LazyThemeSet,
25 fallback_theme: Option<&'static str>,
37 fallback_theme: Option<&'static str>,
26}
38}
27
39
28−const IGNORED_SUFFIXES: [&str; 10] = [
40+#[derive(Debug)]
29− // Editor etc backups
41+pub struct SyntaxReferenceInSet<'a> {
30− "~",
42+ pub syntax: &'a SyntaxReference,
31− ".bak",
43+ pub syntax_set: &'a SyntaxSet,
32− ".old",
44+}
33− ".orig",
34− // Debian and derivatives apt/dpkg backups
35− ".dpkg-dist",
36− ".dpkg-old",
37− // Red Hat and derivatives rpm backups
38− ".rpmnew",
39− ".rpmorig",
40− ".rpmsave",
41− // Build system input/template files
42− ".in",
43−];
44
45
45−impl HighlightingAssets {
46+/// Lazy-loaded syntaxes are already compressed, and we don't want to compress
46− fn new(
47+/// already compressed data.
47− syntax_set: Option<SyntaxSet>,
48+pub(crate) const COMPRESS_SYNTAXES: bool = false;
48− serialized_syntax_set: Option<SerializedSyntaxSet>,
49+
49− theme_set: ThemeSet,
50+/// We don't want to compress our [LazyThemeSet] since the lazy-loaded themes
50− ) -> Self {
51+/// within it are already compressed, and compressing another time just makes
51− assert!(syntax_set.is_some() || serialized_syntax_set.is_some());
52+/// performance suffer
52−
53+pub(crate) const COMPRESS_THEMES: bool = false;
53− let syntax_set_cell = LazyCell::new();
54+
54− if let Some(syntax_set) = syntax_set {
55+/// Compress for size of ~40 kB instead of ~200 kB without much difference in
55− syntax_set_cell.fill(syntax_set).expect("can never fail");
56+/// performance due to lazy-loading
56− }
57+pub(crate) const COMPRESS_LAZY_THEMES: bool = true;
58+
59+/// Compress for size of ~10 kB instead of ~120 kB
60+pub(crate) const COMPRESS_ACKNOWLEDGEMENTS: bool = true;
57
61
62+impl HighlightingAssets {
63+ fn new(serialized_syntax_set: SerializedSyntaxSet, theme_set: LazyThemeSet) -> Self {
58 HighlightingAssets {
64 HighlightingAssets {
59− syntax_set_cell,
65+ syntax_set_cell: OnceCell::new(),
60 serialized_syntax_set,
66 serialized_syntax_set,
61 theme_set,
67 theme_set,
62 fallback_theme: None,
68 fallback_theme: None,
63 }
69 }
64 }
70 }
65
71
72+ /// The default theme.
73+ ///
74+ /// ### Windows and Linux
75+ ///
76+ /// Windows and most Linux distributions has a dark terminal theme by
77+ /// default. On these platforms, this function always returns a theme that
78+ /// looks good on a dark background.
79+ ///
80+ /// ### macOS
81+ ///
82+ /// On macOS the default terminal background is light, but it is common that
83+ /// Dark Mode is active, which makes the terminal background dark. On this
84+ /// platform, the default theme depends on
85+ /// ```bash
86+ /// defaults read -globalDomain AppleInterfaceStyle
87+ /// ````
88+ /// To avoid the overhead of the check on macOS, simply specify a theme
89+ /// explicitly via `--theme`, `BAT_THEME`, or `~/.config/bat`.
90+ ///
91+ /// See <https://github.com/sharkdp/bat/issues/1746> and
92+ /// <https://github.com/sharkdp/bat/issues/1928> for more context.
66 pub fn default_theme() -> &'static str {
93 pub fn default_theme() -> &'static str {
67− "Monokai Extended"
94+ #[cfg(not(target_os = "macos"))]
68− }
95+ {
69−
96+ Self::default_dark_theme()
70− pub fn from_files(source_dir: &Path, include_integrated_assets: bool) -> Result<Self> {
71− let mut theme_set = if include_integrated_assets {
72− get_integrated_themeset()
73− } else {
74− ThemeSet {
75− themes: BTreeMap::new(),
76− }
77− };
78−
79− let theme_dir = source_dir.join("themes");
80− if theme_dir.exists() {
81− let res = theme_set.add_from_folder(&theme_dir);
82− if let Err(err) = res {
83− println!(
84− "Failed to load one or more themes from '{}' (reason: '{}')",
85− theme_dir.to_string_lossy(),
86− err,
87− );
88− }
89− } else {
90− println!(
91− "No themes were found in '{}', using the default set",
92− theme_dir.to_string_lossy()
93− );
94− }
95−
96− let mut syntax_set_builder = if !include_integrated_assets {
97− let mut builder = SyntaxSetBuilder::new();
98− builder.add_plain_text_syntax();
99− builder
100− } else {
101− get_integrated_syntaxset().into_builder()
102− };
103−
104− let syntax_dir = source_dir.join("syntaxes");
105− if syntax_dir.exists() {
106− syntax_set_builder.add_from_folder(syntax_dir, true)?;
107− } else {
108− println!(
109− "No syntaxes were found in '{}', using the default set.",
110− syntax_dir.to_string_lossy()
111− );
112− }
113−
114− if std::env::var("BAT_PRINT_SYNTAX_DEPENDENCIES").is_ok() {
115− // To trigger this code, run:
116− // BAT_PRINT_SYNTAX_DEPENDENCIES=1 cargo run -- cache --build --source assets --blank --target /tmp
117− crate::syntax_dependencies::print_syntax_dependencies(&syntax_set_builder);
118 }
97 }
119−
98+ #[cfg(target_os = "macos")]
120− let syntax_set = syntax_set_builder.build();
99+ {
121− let missing_contexts = syntax_set.find_unlinked_contexts();
100+ if macos_dark_mode_active() {
122− if !missing_contexts.is_empty() {
101+ Self::default_dark_theme()
123− println!("Some referenced contexts could not be found!");
102+ } else {
124− for context in missing_contexts {
103+ Self::default_light_theme()
125− println!("- {}", context);
126 }
104 }
127 }
105 }
106+ }
107+
108+ /**
109+ * The default theme that looks good on a dark background.
110+ */
111+ fn default_dark_theme() -> &'static str {
112+ "Monokai Extended"
113+ }
128
114
129− Ok(HighlightingAssets::new(Some(syntax_set), None, theme_set))
115+ /**
116+ * The default theme that looks good on a light background.
117+ */
118+ #[cfg(target_os = "macos")]
119+ fn default_light_theme() -> &'static str {
120+ "Monokai Extended Light"
130 }
121 }
131
122
132 pub fn from_cache(cache_path: &Path) -> Result<Self> {
123 pub fn from_cache(cache_path: &Path) -> Result<Self> {
133 Ok(HighlightingAssets::new(
124 Ok(HighlightingAssets::new(
134− None,
125+ SerializedSyntaxSet::FromFile(cache_path.join("syntaxes.bin")),
135− Some(SerializedSyntaxSet::FromFile(
126+ asset_from_cache(&cache_path.join("themes.bin"), "theme set", COMPRESS_THEMES)?,
136− cache_path.join("syntaxes.bin"),
137− )),
138− asset_from_cache(&cache_path.join("themes.bin"), "theme set")?,
139 ))
127 ))
140 }
128 }
141
129
142 pub fn from_binary() -> Self {
130 pub fn from_binary() -> Self {
143 HighlightingAssets::new(
131 HighlightingAssets::new(
144− None,
132+ SerializedSyntaxSet::FromBinary(get_serialized_integrated_syntaxset()),
145− Some(SerializedSyntaxSet::FromBinary(
146− get_serialized_integrated_syntaxset(),
147− )),
148 get_integrated_themeset(),
133 get_integrated_themeset(),
149 )
134 )
150 }
135 }
151
136
152− pub fn save_to_cache(&self, target_dir: &Path, current_version: &str) -> Result<()> {
153− let _ = fs::create_dir_all(target_dir);
154− asset_to_cache(
155− self.get_theme_set(),
156− &target_dir.join("themes.bin"),
157− "theme set",
158− )?;
159− asset_to_cache(
160− self.get_syntax_set()?,
161− &target_dir.join("syntaxes.bin"),
162− "syntax set",
163− )?;
164−
165− print!(
166− "Writing metadata to folder {} ... ",
167− target_dir.to_string_lossy()
168− );
169− AssetsMetadata::new(current_version).save_to_folder(target_dir)?;
170− println!("okay");
171−
172− Ok(())
173− }
174−
175 pub fn set_fallback_theme(&mut self, theme: &'static str) {
137 pub fn set_fallback_theme(&mut self, theme: &'static str) {
176 self.fallback_theme = Some(theme);
138 self.fallback_theme = Some(theme);
177 }
139 }
178
140
179− pub(crate) fn get_syntax_set(&self) -> Result<&SyntaxSet> {
141+ /// Return the collection of syntect syntax definitions.
180− if !self.syntax_set_cell.filled() {
142+ pub fn get_syntax_set(&self) -> Result<&SyntaxSet> {
181− self.syntax_set_cell.fill(
143+ self.syntax_set_cell
182− self.serialized_syntax_set
144+ .get_or_try_init(|| self.serialized_syntax_set.deserialize())
183− .as_ref()
184− .expect("a dev forgot to setup serialized_syntax_set, please report to https://github.com/sharkdp/bat/issues")
185− .deserialize()?
186− ).unwrap();
187− }
188−
189− // It is safe to .unwrap() because we just made sure it was .filled()
190− Ok(self.syntax_set_cell.borrow().unwrap())
191 }
145 }
192
146
193 /// Use [Self::get_syntaxes] instead
147 /// Use [Self::get_syntaxes] instead
@@ -202,43 +156,88 @@ impl HighlightingAssets {
202 Ok(self.get_syntax_set()?.syntaxes())
156 Ok(self.get_syntax_set()?.syntaxes())
203 }
157 }
204
158
205− fn get_theme_set(&self) -> &ThemeSet {
159+ fn get_theme_set(&self) -> &LazyThemeSet {
206 &self.theme_set
160 &self.theme_set
207 }
161 }
208
162
209 pub fn themes(&self) -> impl Iterator<Item = &str> {
163 pub fn themes(&self) -> impl Iterator<Item = &str> {
210− self.get_theme_set().themes.keys().map(|s| s.as_ref())
164+ self.get_theme_set().themes()
211 }
165 }
212
166
213− /// Use [Self::get_syntax_for_file_name] instead
167+ /// Use [Self::get_syntax_for_path] instead
214 #[deprecated]
168 #[deprecated]
215 pub fn syntax_for_file_name(
169 pub fn syntax_for_file_name(
216 &self,
170 &self,
217 file_name: impl AsRef<Path>,
171 file_name: impl AsRef<Path>,
218 mapping: &SyntaxMapping,
172 mapping: &SyntaxMapping,
219 ) -> Option<&SyntaxReference> {
173 ) -> Option<&SyntaxReference> {
220− self.get_syntax_for_file_name(file_name, mapping).expect(
174+ self.get_syntax_for_path(file_name, mapping)
221− ".syntax_for_file_name() is deprecated, use .get_syntax_for_file_name() instead",
175+ .ok()
222− )
176+ .map(|syntax_in_set| syntax_in_set.syntax)
223− }
177+ }
224−
178+
225− pub fn get_syntax_for_file_name(
179+ /// Detect the syntax based on, in order:
180+ /// 1. Syntax mappings with [MappingTarget::MapTo] and [MappingTarget::MapToUnknown]
181+ /// (e.g. `/etc/profile` -> `Bourne Again Shell (bash)`)
182+ /// 2. The file name (e.g. `Dockerfile`)
183+ /// 3. Syntax mappings with [MappingTarget::MapExtensionToUnknown]
184+ /// (e.g. `*.conf`)
185+ /// 4. The file name extension (e.g. `.rs`)
186+ ///
187+ /// When detecting syntax based on syntax mappings, the full path is taken
188+ /// into account. When detecting syntax based on file name, no regard is
189+ /// taken to the path of the file. Only the file name itself matters. When
190+ /// detecting syntax based on file name extension, only the file name
191+ /// extension itself matters.
192+ ///
193+ /// Returns [Error::UndetectedSyntax] if it was not possible detect syntax
194+ /// based on path/file name/extension (or if the path was mapped to
195+ /// [MappingTarget::MapToUnknown] or [MappingTarget::MapExtensionToUnknown]).
196+ /// In this case it is appropriate to fall back to other methods to detect
197+ /// syntax. Such as using the contents of the first line of the file.
198+ ///
199+ /// Returns [Error::UnknownSyntax] if a syntax mapping exist, but the mapped
200+ /// syntax does not exist.
201+ pub fn get_syntax_for_path(
226 &self,
202 &self,
227− file_name: impl AsRef<Path>,
203+ path: impl AsRef<Path>,
228 mapping: &SyntaxMapping,
204 mapping: &SyntaxMapping,
229− ) -> Result<Option<&SyntaxReference>> {
205+ ) -> Result<SyntaxReferenceInSet> {
230− let file_name = file_name.as_ref();
206+ let path = path.as_ref();
231− Ok(match mapping.get_syntax_for(file_name) {
207+
232− Some(MappingTarget::MapToUnknown) => None,
208+ let syntax_match = mapping.get_syntax_for(path);
233− Some(MappingTarget::MapTo(syntax_name)) => {
209+
234− self.get_syntax_set()?.find_syntax_by_name(syntax_name)
210+ if let Some(MappingTarget::MapToUnknown) = syntax_match {
211+ return Err(Error::UndetectedSyntax(path.to_string_lossy().into()));
212+ }
213+
214+ if let Some(MappingTarget::MapTo(syntax_name)) = syntax_match {
215+ return self
216+ .find_syntax_by_name(syntax_name)?
217+ .ok_or_else(|| Error::UnknownSyntax(syntax_name.to_owned()));
218+ }
219+
220+ let file_name = path.file_name().unwrap_or_default();
221+
222+ match (
223+ self.get_syntax_for_file_name(file_name, &mapping.ignored_suffixes)?,
224+ syntax_match,
225+ ) {
226+ (Some(syntax), _) => Ok(syntax),
227+
228+ (_, Some(MappingTarget::MapExtensionToUnknown)) => {
229+ Err(Error::UndetectedSyntax(path.to_string_lossy().into()))
235 }
230 }
236− None => self.get_extension_syntax(file_name.as_os_str())?,
231+
237− })
232+ _ => self
233+ .get_syntax_for_file_extension(file_name, &mapping.ignored_suffixes)?
234+ .ok_or_else(|| Error::UndetectedSyntax(path.to_string_lossy().into())),
235+ }
238 }
236 }
239
237
240− pub(crate) fn get_theme(&self, theme: &str) -> &Theme {
238+ /// Look up a syntect theme by name.
241− match self.get_theme_set().themes.get(theme) {
239+ pub fn get_theme(&self, theme: &str) -> &Theme {
240+ match self.get_theme_set().get(theme) {
242 Some(theme) => theme,
241 Some(theme) => theme,
243 None => {
242 None => {
244 if theme == "ansi-light" || theme == "ansi-dark" {
243 if theme == "ansi-light" || theme == "ansi-dark" {
@@ -248,8 +247,9 @@ impl HighlightingAssets {
248 if !theme.is_empty() {
247 if !theme.is_empty() {
249 bat_warning!("Unknown theme '{}', using default.", theme)
248 bat_warning!("Unknown theme '{}', using default.", theme)
250 }
249 }
251− &self.get_theme_set().themes
250+ self.get_theme_set()
252− [self.fallback_theme.unwrap_or_else(|| Self::default_theme())]
251+ .get(self.fallback_theme.unwrap_or_else(Self::default_theme))
252+ .expect("something is very wrong if the default theme is missing")
253 }
253 }
254 }
254 }
255 }
255 }
@@ -259,172 +259,154 @@ impl HighlightingAssets {
259 language: Option<&str>,
259 language: Option<&str>,
260 input: &mut OpenedInput,
260 input: &mut OpenedInput,
261 mapping: &SyntaxMapping,
261 mapping: &SyntaxMapping,
262− ) -> Result<&SyntaxReference> {
262+ ) -> Result<SyntaxReferenceInSet> {
263 if let Some(language) = language {
263 if let Some(language) = language {
264− self.get_syntax_set()?
264+ let syntax_set = self.get_syntax_set()?;
265+ return syntax_set
265 .find_syntax_by_token(language)
266 .find_syntax_by_token(language)
266− .ok_or_else(|| ErrorKind::UnknownSyntax(language.to_owned()).into())
267+ .map(|syntax| SyntaxReferenceInSet { syntax, syntax_set })
268+ .ok_or_else(|| Error::UnknownSyntax(language.to_owned()));
269+ }
270+
271+ let path = input.path();
272+ let path_syntax = if let Some(path) = path {
273+ self.get_syntax_for_path(
274+ PathAbs::new(path).map_or_else(|_| path.to_owned(), |p| p.as_path().to_path_buf()),
275+ mapping,
276+ )
267 } else {
277 } else {
268− let line_syntax = self.get_first_line_syntax(&mut input.reader)?;
278+ Err(Error::UndetectedSyntax("[unknown]".into()))
269−
279+ };
270− // Get the path of the file:
280+
271− // If this was set by the metadata, that will take priority.
281+ match path_syntax {
272− // If it wasn't, it will use the real file path (if available).
282+ // If a path wasn't provided, or if path based syntax detection
273− let path_str =
283+ // above failed, we fall back to first-line syntax detection.
274− input
284+ Err(Error::UndetectedSyntax(path)) => self
275− .metadata
285+ .get_first_line_syntax(&mut input.reader)?
276− .user_provided_name
286+ .ok_or(Error::UndetectedSyntax(path)),
277− .as_ref()
287+ _ => path_syntax,
278− .or_else(|| match input.kind {
279− OpenedInputKind::OrdinaryFile(ref path) => Some(path),
280− _ => None,
281− });
282−
283− if let Some(path_str) = path_str {
284− // If a path was provided, we try and detect the syntax based on extension mappings.
285− let path = Path::new(path_str);
286− let absolute_path = PathAbs::new(path)
287− .ok()
288− .map(|p| p.as_path().to_path_buf())
289− .unwrap_or_else(|| path.to_owned());
290−
291− match mapping.get_syntax_for(absolute_path) {
292− Some(MappingTarget::MapToUnknown) => line_syntax.ok_or_else(|| {
293− ErrorKind::UndetectedSyntax(path.to_string_lossy().into()).into()
294− }),
295−
296− Some(MappingTarget::MapTo(syntax_name)) => self
297− .get_syntax_set()?
298− .find_syntax_by_name(syntax_name)
299− .ok_or_else(|| ErrorKind::UnknownSyntax(syntax_name.to_owned()).into()),
300−
301− None => {
302− let file_name = path.file_name().unwrap_or_default();
303− self.get_extension_syntax(file_name)?
304− .or(line_syntax)
305− .ok_or_else(|| {
306− ErrorKind::UndetectedSyntax(path.to_string_lossy().into()).into()
307− })
308− }
309− }
310− } else {
311− // If a path wasn't provided, we fall back to the detect first-line syntax.
312− line_syntax.ok_or_else(|| ErrorKind::UndetectedSyntax("[unknown]".into()).into())
313− }
314 }
288 }
315 }
289 }
316
290
317− fn get_extension_syntax(&self, file_name: &OsStr) -> Result<Option<&SyntaxReference>> {
291+ pub(crate) fn find_syntax_by_name(
318− let mut syntax = self.find_syntax_by_file_name(file_name)?;
292+ &self,
319− if syntax.is_none() {
293+ syntax_name: &str,
320− syntax = self.find_syntax_by_file_name_extension(file_name)?;
294+ ) -> Result<Option<SyntaxReferenceInSet>> {
321− }
295+ let syntax_set = self.get_syntax_set()?;
322− if syntax.is_none() {
296+ Ok(syntax_set
323− syntax = self.get_extension_syntax_with_stripped_suffix(file_name)?;
297+ .find_syntax_by_name(syntax_name)
324− }
298+ .map(|syntax| SyntaxReferenceInSet { syntax, syntax_set }))
325− Ok(syntax)
326 }
299 }
327
300
328− fn find_syntax_by_file_name(&self, file_name: &OsStr) -> Result<Option<&SyntaxReference>> {
301+ fn find_syntax_by_extension(&self, e: Option<&OsStr>) -> Result<Option<SyntaxReferenceInSet>> {
329− Ok(self
302+ let syntax_set = self.get_syntax_set()?;
330− .get_syntax_set()?
303+ let extension = e.and_then(|x| x.to_str()).unwrap_or_default();
331− .find_syntax_by_extension(file_name.to_str().unwrap_or_default()))
304+ Ok(syntax_set
305+ .find_syntax_by_extension(extension)
306+ .map(|syntax| SyntaxReferenceInSet { syntax, syntax_set }))
332 }
307 }
333
308
334− fn find_syntax_by_file_name_extension(
309+ fn get_syntax_for_file_name(
335 &self,
310 &self,
336 file_name: &OsStr,
311 file_name: &OsStr,
337− ) -> Result<Option<&SyntaxReference>> {
312+ ignored_suffixes: &IgnoredSuffixes,
338− let file_path = Path::new(file_name);
313+ ) -> Result<Option<SyntaxReferenceInSet>> {
339− Ok(self.get_syntax_set()?.find_syntax_by_extension(
314+ let mut syntax = self.find_syntax_by_extension(Some(file_name))?;
340− file_path
315+ if syntax.is_none() {
341− .extension()
316+ syntax =
342− .and_then(|x| x.to_str())
317+ ignored_suffixes.try_with_stripped_suffix(file_name, |stripped_file_name| {
343− .unwrap_or_default(),
318+ // Note: recursion
344− ))
319+ self.get_syntax_for_file_name(stripped_file_name, ignored_suffixes)
320+ })?;
321+ }
322+ Ok(syntax)
345 }
323 }
346
324
347− /// If we find an ignored suffix on the file name, e.g. '~', we strip it and
325+ fn get_syntax_for_file_extension(
348− /// then try again to find a syntax without it. Note that we do this recursively.
349− fn get_extension_syntax_with_stripped_suffix(
350 &self,
326 &self,
351 file_name: &OsStr,
327 file_name: &OsStr,
352− ) -> Result<Option<&SyntaxReference>> {
328+ ignored_suffixes: &IgnoredSuffixes,
353− let file_path = Path::new(file_name);
329+ ) -> Result<Option<SyntaxReferenceInSet>> {
354− let mut syntax = None;
330+ let mut syntax = self.find_syntax_by_extension(Path::new(file_name).extension())?;
355− if let Some(file_str) = file_path.to_str() {
331+ if syntax.is_none() {
356− for suffix in IGNORED_SUFFIXES.iter() {
332+ syntax =
357− if let Some(stripped_filename) = file_str.strip_suffix(suffix) {
333+ ignored_suffixes.try_with_stripped_suffix(file_name, |stripped_file_name| {
358− syntax = self.get_extension_syntax(OsStr::new(stripped_filename))?;
334+ // Note: recursion
359− break;
335+ self.get_syntax_for_file_extension(stripped_file_name, ignored_suffixes)
360− }
336+ })?;
361− }
362 }
337 }
363 Ok(syntax)
338 Ok(syntax)
364 }
339 }
365
340
366− fn get_first_line_syntax(&self, reader: &mut InputReader) -> Result<Option<&SyntaxReference>> {
341+ fn get_first_line_syntax(
342+ &self,
343+ reader: &mut InputReader,
344+ ) -> Result<Option<SyntaxReferenceInSet>> {
367 let syntax_set = self.get_syntax_set()?;
345 let syntax_set = self.get_syntax_set()?;
368 Ok(String::from_utf8(reader.first_line.clone())
346 Ok(String::from_utf8(reader.first_line.clone())
369 .ok()
347 .ok()
370− .and_then(|l| syntax_set.find_syntax_by_first_line(&l)))
348+ .and_then(|l| syntax_set.find_syntax_by_first_line(&l))
349+ .map(|syntax| SyntaxReferenceInSet { syntax, syntax_set }))
371 }
350 }
372}
351}
373
352
374−/// A SyntaxSet in serialized form, i.e. bincoded and flate2 compressed.
353+pub(crate) fn get_serialized_integrated_syntaxset() -> &'static [u8] {
375−/// We keep it in this format since we want to load it lazily.
354+ include_bytes!("../assets/syntaxes.bin")
376−#[derive(Debug)]
377−enum SerializedSyntaxSet {
378− /// The data comes from a user-generated cache file.
379− FromFile(PathBuf),
380−
381− /// The data to use is embedded into the bat binary.
382− FromBinary(&'static [u8]),
383}
355}
384
356
385−impl SerializedSyntaxSet {
357+pub(crate) fn get_integrated_themeset() -> LazyThemeSet {
386− fn deserialize(&self) -> Result<SyntaxSet> {
358+ from_binary(include_bytes!("../assets/themes.bin"), COMPRESS_THEMES)
387− match self {
388− SerializedSyntaxSet::FromBinary(data) => Ok(from_binary(data)),
389− SerializedSyntaxSet::FromFile(ref path) => asset_from_cache(&path, "syntax set"),
390− }
391− }
392}
359}
393
360
394−fn get_serialized_integrated_syntaxset() -> &'static [u8] {
361+pub fn get_acknowledgements() -> String {
395− include_bytes!("../assets/syntaxes.bin")
362+ from_binary(
363+ include_bytes!("../assets/acknowledgements.bin"),
364+ COMPRESS_ACKNOWLEDGEMENTS,
365+ )
396}
366}
397
367
398−fn get_integrated_syntaxset() -> SyntaxSet {
368+pub(crate) fn from_binary<T: serde::de::DeserializeOwned>(v: &[u8], compressed: bool) -> T {
399− from_binary(get_serialized_integrated_syntaxset())
369+ asset_from_contents(v, "n/a", compressed)
370+ .expect("data integrated in binary is never faulty, but make sure `compressed` is in sync!")
400}
371}
401
372
402−fn get_integrated_themeset() -> ThemeSet {
373+fn asset_from_contents<T: serde::de::DeserializeOwned>(
403− from_binary(include_bytes!("../assets/themes.bin"))
374+ contents: &[u8],
375+ description: &str,
376+ compressed: bool,
377+) -> Result<T> {
378+ if compressed {
379+ bincode::deserialize_from(flate2::read::ZlibDecoder::new(contents))
380+ } else {
381+ bincode::deserialize_from(contents)
382+ }
383+ .map_err(|_| format!("Could not parse {}", description).into())
404}
384}
405
385
406−fn asset_to_cache<T: serde::Serialize>(asset: &T, path: &Path, description: &str) -> Result<()> {
386+fn asset_from_cache<T: serde::de::DeserializeOwned>(
407− print!("Writing {} to {} ... ", description, path.to_string_lossy());
387+ path: &Path,
408− dump_to_file(asset, &path).chain_err(|| {
388+ description: &str,
389+ compressed: bool,
390+) -> Result<T> {
391+ let contents = fs::read(path).map_err(|_| {
409 format!(
392 format!(
410− "Could not save {} to {}",
393+ "Could not load cached {} '{}'",
411 description,
394 description,
412 path.to_string_lossy()
395 path.to_string_lossy()
413 )
396 )
414 })?;
397 })?;
415− println!("okay");
398+ asset_from_contents(&contents[..], description, compressed)
416− Ok(())
399+ .map_err(|_| format!("Could not parse cached {}", description).into())
417}
400}
418
401
419−fn asset_from_cache<T: serde::de::DeserializeOwned>(path: &Path, description: &str) -> Result<T> {
402+#[cfg(target_os = "macos")]
420− let contents = fs::read(path).chain_err(|| {
403+fn macos_dark_mode_active() -> bool {
421− format!(
404+ let mut defaults_cmd = std::process::Command::new("defaults");
422− "Could not load cached {} '{}'",
405+ defaults_cmd.args(&["read", "-globalDomain", "AppleInterfaceStyle"]);
423− description,
406+ match defaults_cmd.output() {
424− path.to_string_lossy()
407+ Ok(output) => output.stdout == b"Dark\n",
425− )
408+ Err(_) => true,
426− })?;
409+ }
427− from_reader(&contents[..]).chain_err(|| format!("Could not parse cached {}", description))
428}
410}
429
411
430#[cfg(test)]
412#[cfg(test)]
@@ -462,7 +444,7 @@ mod tests {
462 ) -> String {
444 ) -> String {
463 self.assets
445 self.assets
464 .get_syntax(language, input, mapping)
446 .get_syntax(language, input, mapping)
465− .map(|syntax| syntax.name.clone())
447+ .map(|syntax_in_set| syntax_in_set.syntax.name.clone())
466 .unwrap_or_else(|_| "!no syntax!".to_owned())
448 .unwrap_or_else(|_| "!no syntax!".to_owned())
467 }
449 }
468
450
@@ -621,13 +603,58 @@ mod tests {
621 }
603 }
622
604
623 #[test]
605 #[test]
624− fn syntax_detection_is_case_sensitive() {
606+ fn syntax_detection_with_extension_mapping_to_unknown() {
625 let mut test = SyntaxDetectionTest::new();
607 let mut test = SyntaxDetectionTest::new();
626
608
627− assert_ne!(test.syntax_for_file("README.MD"), "Markdown");
609+ // Normally, a CMakeLists.txt file shall use the CMake syntax, even if it is
610+ // a bash script in disguise
611+ assert_eq!(
612+ test.syntax_for_file_with_content("CMakeLists.txt", "#!/bin/bash"),
613+ "CMake"
614+ );
615+
616+ // Other .txt files shall use the Plain Text syntax
617+ assert_eq!(
618+ test.syntax_for_file_with_content("some-other.txt", "#!/bin/bash"),
619+ "Plain Text"
620+ );
621+
622+ // If we setup MapExtensionToUnknown on *.txt, the match on the full
623+ // file name of "CMakeLists.txt" shall have higher prio, and CMake shall
624+ // still be used for it
625+ test.syntax_mapping
626+ .insert("*.txt", MappingTarget::MapExtensionToUnknown)
627+ .ok();
628+ assert_eq!(
629+ test.syntax_for_file_with_content("CMakeLists.txt", "#!/bin/bash"),
630+ "CMake"
631+ );
632+
633+ // However, for *other* files with a .txt extension, first-line fallback
634+ // shall now be used
635+ assert_eq!(
636+ test.syntax_for_file_with_content("some-other.txt", "#!/bin/bash"),
637+ "Bourne Again Shell (bash)"
638+ );
639+ }
640+
641+ #[test]
642+ fn syntax_detection_is_case_insensitive() {
643+ let mut test = SyntaxDetectionTest::new();
644+
645+ assert_eq!(test.syntax_for_file("README.md"), "Markdown");
646+ assert_eq!(test.syntax_for_file("README.mD"), "Markdown");
647+ assert_eq!(test.syntax_for_file("README.Md"), "Markdown");
648+ assert_eq!(test.syntax_for_file("README.MD"), "Markdown");
649+
650+ // Adding a mapping for "MD" in addition to "md" should not break the mapping
628 test.syntax_mapping
651 test.syntax_mapping
629 .insert("*.MD", MappingTarget::MapTo("Markdown"))
652 .insert("*.MD", MappingTarget::MapTo("Markdown"))
630 .ok();
653 .ok();
654+
655+ assert_eq!(test.syntax_for_file("README.md"), "Markdown");
656+ assert_eq!(test.syntax_for_file("README.mD"), "Markdown");
657+ assert_eq!(test.syntax_for_file("README.Md"), "Markdown");
631 assert_eq!(test.syntax_for_file("README.MD"), "Markdown");
658 assert_eq!(test.syntax_for_file("README.MD"), "Markdown");
632 }
659 }
633
660
src/assets_metadata.rs → src/assets/assets_metadata.rsrenamed+10−9
@@ -16,6 +16,7 @@ pub struct AssetsMetadata {
16const FILENAME: &str = "metadata.yaml";
16const FILENAME: &str = "metadata.yaml";
17
17
18impl AssetsMetadata {
18impl AssetsMetadata {
19+ #[cfg(feature = "build-assets")]
19 pub(crate) fn new(current_version: &str) -> AssetsMetadata {
20 pub(crate) fn new(current_version: &str) -> AssetsMetadata {
20 AssetsMetadata {
21 AssetsMetadata {
21 bat_version: Some(current_version.to_owned()),
22 bat_version: Some(current_version.to_owned()),
@@ -23,6 +24,7 @@ impl AssetsMetadata {
23 }
24 }
24 }
25 }
25
26
27+ #[cfg(feature = "build-assets")]
26 pub(crate) fn save_to_folder(&self, path: &Path) -> Result<()> {
28 pub(crate) fn save_to_folder(&self, path: &Path) -> Result<()> {
27 let file = File::create(path.join(FILENAME))?;
29 let file = File::create(path.join(FILENAME))?;
28 serde_yaml::to_writer(file, self)?;
30 serde_yaml::to_writer(file, self)?;
@@ -50,16 +52,15 @@ impl AssetsMetadata {
50 pub fn load_from_folder(path: &Path) -> Result<Option<Self>> {
52 pub fn load_from_folder(path: &Path) -> Result<Option<Self>> {
51 match Self::try_load_from_folder(path) {
53 match Self::try_load_from_folder(path) {
52 Ok(metadata) => Ok(Some(metadata)),
54 Ok(metadata) => Ok(Some(metadata)),
53− Err(e) => match e.kind() {
55+ Err(e) => {
54− ErrorKind::SerdeYamlError(_) => Err(e),
56+ if let Error::SerdeYamlError(_) = e {
55− _ => {
57+ Err(e)
56− if path.join("syntaxes.bin").exists() || path.join("themes.bin").exists() {
58+ } else if path.join("syntaxes.bin").exists() || path.join("themes.bin").exists() {
57− Ok(Some(Self::default()))
59+ Ok(Some(Self::default()))
58− } else {
60+ } else {
59− Ok(None)
61+ Ok(None)
60− }
61 }
62 }
62− },
63+ }
63 }
64 }
64 }
65 }
65
66
src/assets/build_assets.rsnew file+176
@@ -0,0 +1,176 @@
1+use std::convert::TryInto;
2+use std::path::Path;
3+
4+use syntect::highlighting::ThemeSet;
5+use syntect::parsing::{SyntaxSet, SyntaxSetBuilder};
6+
7+use crate::assets::*;
8+use acknowledgements::build_acknowledgements;
9+
10+mod acknowledgements;
11+
12+pub fn build(
13+ source_dir: &Path,
14+ include_integrated_assets: bool,
15+ include_acknowledgements: bool,
16+ target_dir: &Path,
17+ current_version: &str,
18+) -> Result<()> {
19+ let theme_set = build_theme_set(source_dir, include_integrated_assets)?;
20+
21+ let syntax_set_builder = build_syntax_set_builder(source_dir, include_integrated_assets)?;
22+
23+ let syntax_set = syntax_set_builder.build();
24+
25+ let acknowledgements = build_acknowledgements(source_dir, include_acknowledgements)?;
26+
27+ print_unlinked_contexts(&syntax_set);
28+
29+ write_assets(
30+ &theme_set,
31+ &syntax_set,
32+ &acknowledgements,
33+ target_dir,
34+ current_version,
35+ )
36+}
37+
38+fn build_theme_set(source_dir: &Path, include_integrated_assets: bool) -> Result<LazyThemeSet> {
39+ let mut theme_set = if include_integrated_assets {
40+ crate::assets::get_integrated_themeset().try_into()?
41+ } else {
42+ ThemeSet::new()
43+ };
44+
45+ let theme_dir = source_dir.join("themes");
46+ if theme_dir.exists() {
47+ let res = theme_set.add_from_folder(&theme_dir);
48+ if let Err(err) = res {
49+ println!(
50+ "Failed to load one or more themes from '{}' (reason: '{}')",
51+ theme_dir.to_string_lossy(),
52+ err,
53+ );
54+ }
55+ } else {
56+ println!(
57+ "No themes were found in '{}', using the default set",
58+ theme_dir.to_string_lossy()
59+ );
60+ }
61+
62+ theme_set.try_into()
63+}
64+
65+fn build_syntax_set_builder(
66+ source_dir: &Path,
67+ include_integrated_assets: bool,
68+) -> Result<SyntaxSetBuilder> {
69+ let mut syntax_set_builder = if !include_integrated_assets {
70+ let mut builder = syntect::parsing::SyntaxSetBuilder::new();
71+ builder.add_plain_text_syntax();
72+ builder
73+ } else {
74+ from_binary::<SyntaxSet>(get_serialized_integrated_syntaxset(), COMPRESS_SYNTAXES)
75+ .into_builder()
76+ };
77+
78+ let syntax_dir = source_dir.join("syntaxes");
79+ if syntax_dir.exists() {
80+ syntax_set_builder.add_from_folder(syntax_dir, true)?;
81+ } else {
82+ println!(
83+ "No syntaxes were found in '{}', using the default set.",
84+ syntax_dir.to_string_lossy()
85+ );
86+ }
87+
88+ Ok(syntax_set_builder)
89+}
90+
91+fn print_unlinked_contexts(syntax_set: &SyntaxSet) {
92+ let missing_contexts = syntax_set.find_unlinked_contexts();
93+ if !missing_contexts.is_empty() {
94+ println!("Some referenced contexts could not be found!");
95+ for context in missing_contexts {
96+ println!("- {}", context);
97+ }
98+ }
99+}
100+
101+fn write_assets(
102+ theme_set: &LazyThemeSet,
103+ syntax_set: &SyntaxSet,
104+ acknowledgements: &Option<String>,
105+ target_dir: &Path,
106+ current_version: &str,
107+) -> Result<()> {
108+ let _ = std::fs::create_dir_all(target_dir);
109+ asset_to_cache(
110+ theme_set,
111+ &target_dir.join("themes.bin"),
112+ "theme set",
113+ COMPRESS_THEMES,
114+ )?;
115+ asset_to_cache(
116+ syntax_set,
117+ &target_dir.join("syntaxes.bin"),
118+ "syntax set",
119+ COMPRESS_SYNTAXES,
120+ )?;
121+
122+ if let Some(acknowledgements) = acknowledgements {
123+ asset_to_cache(
124+ acknowledgements,
125+ &target_dir.join("acknowledgements.bin"),
126+ "acknowledgements",
127+ COMPRESS_ACKNOWLEDGEMENTS,
128+ )?;
129+ }
130+
131+ print!(
132+ "Writing metadata to folder {} ... ",
133+ target_dir.to_string_lossy()
134+ );
135+ crate::assets_metadata::AssetsMetadata::new(current_version).save_to_folder(target_dir)?;
136+ println!("okay");
137+
138+ Ok(())
139+}
140+
141+pub(crate) fn asset_to_contents<T: serde::Serialize>(
142+ asset: &T,
143+ description: &str,
144+ compressed: bool,
145+) -> Result<Vec<u8>> {
146+ let mut contents = vec![];
147+ if compressed {
148+ bincode::serialize_into(
149+ flate2::write::ZlibEncoder::new(&mut contents, flate2::Compression::best()),
150+ asset,
151+ )
152+ } else {
153+ bincode::serialize_into(&mut contents, asset)
154+ }
155+ .map_err(|_| format!("Could not serialize {}", description))?;
156+ Ok(contents)
157+}
158+
159+fn asset_to_cache<T: serde::Serialize>(
160+ asset: &T,
161+ path: &Path,
162+ description: &str,
163+ compressed: bool,
164+) -> Result<()> {
165+ print!("Writing {} to {} ... ", description, path.to_string_lossy());
166+ let contents = asset_to_contents(asset, description, compressed)?;
167+ std::fs::write(path, &contents[..]).map_err(|_| {
168+ format!(
169+ "Could not save {} to {}",
170+ description,
171+ path.to_string_lossy()
172+ )
173+ })?;
174+ println!("okay");
175+ Ok(())
176+}
src/assets/build_assets/acknowledgements.rsnew file+222
@@ -0,0 +1,222 @@
1+use std::fs::read_to_string;
2+use std::path::{Path, PathBuf};
3+
4+use walkdir::DirEntry;
5+
6+use crate::error::*;
7+
8+struct PathAndStem {
9+ path: PathBuf,
10+ stem: String,
11+ relative_path: String,
12+}
13+
14+/// Looks for LICENSE and NOTICE files in `source_dir`, does some rudimentary
15+/// analysis, and compiles them together in a single string that is meant to be
16+/// used in the output to `--acknowledgements`
17+pub fn build_acknowledgements(
18+ source_dir: &Path,
19+ include_acknowledgements: bool,
20+) -> Result<Option<String>> {
21+ if !include_acknowledgements {
22+ return Ok(None);
23+ }
24+
25+ let mut acknowledgements = format!("{}\n\n", include_str!("../../../NOTICE"));
26+
27+ // Sort entries so the order is stable over time
28+ let entries = walkdir::WalkDir::new(source_dir).sort_by(|a, b| a.path().cmp(b.path()));
29+ for path_and_stem in entries
30+ .into_iter()
31+ .flatten()
32+ .flat_map(|entry| to_path_and_stem(source_dir, entry))
33+ {
34+ if let Some(license_text) = handle_file(&path_and_stem)? {
35+ append_to_acknowledgements(
36+ &mut acknowledgements,
37+ &path_and_stem.relative_path,
38+ &license_text,
39+ )
40+ }
41+ }
42+
43+ Ok(Some(acknowledgements))
44+}
45+
46+fn to_path_and_stem(source_dir: &Path, entry: DirEntry) -> Option<PathAndStem> {
47+ let path = entry.path();
48+
49+ Some(PathAndStem {
50+ path: path.to_owned(),
51+ stem: path.file_stem().map(|s| s.to_string_lossy().to_string())?,
52+ relative_path: path
53+ .strip_prefix(source_dir)
54+ .map(|p| p.to_string_lossy().to_string())
55+ .ok()?,
56+ })
57+}
58+
59+fn handle_file(path_and_stem: &PathAndStem) -> Result<Option<String>> {
60+ if path_and_stem.stem == "NOTICE" {
61+ handle_notice(&path_and_stem.path)
62+ } else if path_and_stem.stem.to_ascii_uppercase() == "LICENSE" {
63+ handle_license(&path_and_stem.path)
64+ } else {
65+ Ok(None)
66+ }
67+}
68+
69+fn handle_notice(path: &Path) -> Result<Option<String>> {
70+ // Assume NOTICE as defined by Apache License 2.0. These must be part of acknowledgements.
71+ Ok(Some(read_to_string(path)?))
72+}
73+
74+fn handle_license(path: &Path) -> Result<Option<String>> {
75+ let license_text = read_to_string(path)?;
76+
77+ if include_license_in_acknowledgments(&license_text) {
78+ Ok(Some(license_text))
79+ } else if license_not_needed_in_acknowledgements(&license_text) {
80+ Ok(None)
81+ } else {
82+ Err(format!("ERROR: License is of unknown type: {:?}", path).into())
83+ }
84+}
85+
86+fn include_license_in_acknowledgments(license_text: &str) -> bool {
87+ let markers = vec![
88+ // MIT
89+ "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
90+
91+ // BSD
92+ "Redistributions in binary form must reproduce the above copyright notice,",
93+
94+ // Apache 2.0
95+ "Apache License Version 2.0, January 2004 http://www.apache.org/licenses/",
96+ "Licensed under the Apache License, Version 2.0 (the \"License\");",
97+ ];
98+
99+ license_contains_marker(license_text, &markers)
100+}
101+
102+fn license_not_needed_in_acknowledgements(license_text: &str) -> bool {
103+ let markers = vec![
104+ // Public domain
105+ "This is free and unencumbered software released into the public domain.",
106+
107+ // Public domain with stronger wording than above
108+ "DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE",
109+
110+ // Special license of assets/syntaxes/01_Packages/LICENSE
111+ "Permission to copy, use, modify, sell and distribute this software is granted. This software is provided \"as is\" without express or implied warranty, and with no claim as to its suitability for any purpose."
112+ ];
113+
114+ license_contains_marker(license_text, &markers)
115+}
116+
117+fn license_contains_marker(license_text: &str, markers: &[&str]) -> bool {
118+ let normalized_license_text = normalize_license_text(license_text);
119+ markers.iter().any(|m| normalized_license_text.contains(m))
120+}
121+
122+fn append_to_acknowledgements(
123+ acknowledgements: &mut String,
124+ relative_path: &str,
125+ license_text: &str,
126+) {
127+ acknowledgements.push_str(&format!("## {}\n\n{}", relative_path, license_text));
128+
129+ // Make sure the last char is a newline to not mess up formatting later
130+ if acknowledgements
131+ .chars()
132+ .last()
133+ .expect("acknowledgements is not the empty string")
134+ != '\n'
135+ {
136+ acknowledgements.push('\n');
137+ }
138+
139+ // Add two more newlines to make it easy to distinguish where this text ends
140+ // and the next starts
141+ acknowledgements.push_str("\n\n");
142+}
143+
144+/// Replaces newlines with a space character, and replaces multiple spaces with one space.
145+/// This makes the text easier to analyze.
146+fn normalize_license_text(license_text: &str) -> String {
147+ use regex::Regex;
148+
149+ let whitespace_and_newlines = Regex::new(r"\s").unwrap();
150+ let as_single_line = whitespace_and_newlines.replace_all(license_text, " ");
151+
152+ let many_spaces = Regex::new(" +").unwrap();
153+ many_spaces.replace_all(&as_single_line, " ").to_string()
154+}
155+
156+#[cfg(test)]
157+mod tests {
158+ #[cfg(test)]
159+ use super::*;
160+
161+ #[test]
162+ fn test_normalize_license_text() {
163+ let license_text = "This is a license text with these terms:
164+ * Complicated multi-line
165+ term with indentation";
166+
167+ assert_eq!(
168+ "This is a license text with these terms: * Complicated multi-line term with indentation".to_owned(),
169+ normalize_license_text(license_text),
170+ );
171+ }
172+
173+ #[test]
174+ fn test_normalize_license_text_with_windows_line_endings() {
175+ let license_text = "This license text includes windows line endings\r
176+and we need to handle that.";
177+
178+ assert_eq!(
179+ "This license text includes windows line endings and we need to handle that."
180+ .to_owned(),
181+ normalize_license_text(license_text),
182+ );
183+ }
184+
185+ #[test]
186+ fn test_append_to_acknowledgements_adds_newline_if_missing() {
187+ let mut acknowledgements = "preamble\n\n\n".to_owned();
188+
189+ append_to_acknowledgements(&mut acknowledgements, "some/path", "line without newline");
190+ assert_eq!(
191+ "preamble
192+
193+
194+## some/path
195+
196+line without newline
197+
198+
199+",
200+ acknowledgements
201+ );
202+
203+ append_to_acknowledgements(&mut acknowledgements, "another/path", "line with newline\n");
204+ assert_eq!(
205+ "preamble
206+
207+
208+## some/path
209+
210+line without newline
211+
212+
213+## another/path
214+
215+line with newline
216+
217+
218+",
219+ acknowledgements
220+ );
221+ }
222+}
src/assets/lazy_theme_set.rsnew file+104
@@ -0,0 +1,104 @@
1+use super::*;
2+
3+use std::collections::BTreeMap;
4+use std::convert::TryFrom;
5+
6+use serde::Deserialize;
7+use serde::Serialize;
8+
9+use once_cell::unsync::OnceCell;
10+
11+use syntect::highlighting::{Theme, ThemeSet};
12+
13+/// Same structure as a [`syntect::highlighting::ThemeSet`] but with themes
14+/// stored in raw serialized form, and deserialized on demand.
15+#[derive(Debug, Default, Serialize, Deserialize)]
16+pub struct LazyThemeSet {
17+ /// This is a [`BTreeMap`] because that's what [`syntect::highlighting::ThemeSet`] uses
18+ themes: BTreeMap<String, LazyTheme>,
19+}
20+
21+/// Stores raw serialized data for a theme with methods to lazily deserialize
22+/// (load) the theme.
23+#[derive(Debug, Serialize, Deserialize)]
24+struct LazyTheme {
25+ serialized: Vec<u8>,
26+
27+ #[serde(skip, default = "OnceCell::new")]
28+ deserialized: OnceCell<syntect::highlighting::Theme>,
29+}
30+
31+impl LazyThemeSet {
32+ /// Lazily load the given theme
33+ pub fn get(&self, name: &str) -> Option<&Theme> {
34+ self.themes.get(name).and_then(|lazy_theme| {
35+ lazy_theme
36+ .deserialized
37+ .get_or_try_init(|| lazy_theme.deserialize())
38+ .ok()
39+ })
40+ }
41+
42+ /// Returns the name of all themes.
43+ pub fn themes(&self) -> impl Iterator<Item = &str> {
44+ self.themes.keys().map(|name| name.as_ref())
45+ }
46+}
47+
48+impl LazyTheme {
49+ fn deserialize(&self) -> Result<Theme> {
50+ asset_from_contents(
51+ &self.serialized[..],
52+ "lazy-loaded theme",
53+ COMPRESS_LAZY_THEMES,
54+ )
55+ }
56+}
57+
58+impl TryFrom<LazyThemeSet> for ThemeSet {
59+ type Error = Error;
60+
61+ /// Since the user might want to add custom themes to bat, we need a way to
62+ /// convert from a `LazyThemeSet` to a regular [`ThemeSet`] so that more
63+ /// themes can be added. This function does that pretty straight-forward
64+ /// conversion.
65+ fn try_from(lazy_theme_set: LazyThemeSet) -> Result<Self> {
66+ let mut theme_set = ThemeSet::default();
67+
68+ for (name, lazy_theme) in lazy_theme_set.themes {
69+ theme_set.themes.insert(name, lazy_theme.deserialize()?);
70+ }
71+
72+ Ok(theme_set)
73+ }
74+}
75+
76+#[cfg(feature = "build-assets")]
77+impl TryFrom<ThemeSet> for LazyThemeSet {
78+ type Error = Error;
79+
80+ /// To collect themes, a [`ThemeSet`] is needed. Once all desired themes
81+ /// have been added, we need a way to convert that into [`LazyThemeSet`] so
82+ /// that themes can be lazy-loaded later. This function does that
83+ /// conversion.
84+ fn try_from(theme_set: ThemeSet) -> Result<Self> {
85+ let mut lazy_theme_set = LazyThemeSet::default();
86+
87+ for (name, theme) in theme_set.themes {
88+ // All we have to do is to serialize the theme
89+ let lazy_theme = LazyTheme {
90+ serialized: crate::assets::build_assets::asset_to_contents(
91+ &theme,
92+ &format!("theme {}", name),
93+ COMPRESS_LAZY_THEMES,
94+ )?,
95+ deserialized: OnceCell::new(),
96+ };
97+
98+ // Ok done, now we can add it
99+ lazy_theme_set.themes.insert(name, lazy_theme);
100+ }
101+
102+ Ok(lazy_theme_set)
103+ }
104+}
src/assets/serialized_syntax_set.rsnew file+27
@@ -0,0 +1,27 @@
1+use std::path::PathBuf;
2+
3+use syntect::parsing::SyntaxSet;
4+
5+use super::*;
6+
7+/// A SyntaxSet in serialized form, i.e. bincoded and flate2 compressed.
8+/// We keep it in this format since we want to load it lazily.
9+#[derive(Debug)]
10+pub enum SerializedSyntaxSet {
11+ /// The data comes from a user-generated cache file.
12+ FromFile(PathBuf),
13+
14+ /// The data to use is embedded into the bat binary.
15+ FromBinary(&'static [u8]),
16+}
17+
18+impl SerializedSyntaxSet {
19+ pub fn deserialize(&self) -> Result<SyntaxSet> {
20+ match self {
21+ SerializedSyntaxSet::FromBinary(data) => Ok(from_binary(data, COMPRESS_SYNTAXES)),
22+ SerializedSyntaxSet::FromFile(ref path) => {
23+ asset_from_cache(path, "syntax set", COMPRESS_SYNTAXES)
24+ }
25+ }
26+ }
27+}
src/bin/bat/app.rs+9−3
@@ -62,7 +62,7 @@ impl App {
62 // Read arguments from bats config file
62 // Read arguments from bats config file
63 let mut args = get_args_from_env_var()
63 let mut args = get_args_from_env_var()
64 .unwrap_or_else(get_args_from_config_file)
64 .unwrap_or_else(get_args_from_config_file)
65− .chain_err(|| "Could not parse configuration file")?;
65+ .map_err(|_| "Could not parse configuration file")?;
66
66
67 // Put the zero-th CLI argument (program name) first
67 // Put the zero-th CLI argument (program name) first
68 args.insert(0, cli_args.next().unwrap());
68 args.insert(0, cli_args.next().unwrap());
@@ -107,6 +107,12 @@ impl App {
107
107
108 let mut syntax_mapping = SyntaxMapping::builtin();
108 let mut syntax_mapping = SyntaxMapping::builtin();
109
109
110+ if let Some(values) = self.matches.values_of("ignored-suffix") {
111+ for suffix in values {
112+ syntax_mapping.insert_ignored_suffix(suffix);
113+ }
114+ }
115+
110 if let Some(values) = self.matches.values_of("map-syntax") {
116 if let Some(values) = self.matches.values_of("map-syntax") {
111 for from_to in values {
117 for from_to in values {
112 let parts: Vec<_> = from_to.split(':').collect();
118 let parts: Vec<_> = from_to.split(':').collect();
@@ -301,7 +307,7 @@ impl App {
301 .map(|style_str| {
307 .map(|style_str| {
302 style_str
308 style_str
303 .split(',')
309 .split(',')
304− .map(|x| StyleComponent::from_str(&x))
310+ .map(StyleComponent::from_str)
305 .collect::<Result<Vec<StyleComponent>>>()
311 .collect::<Result<Vec<StyleComponent>>>()
306 })
312 })
307 .transpose()?;
313 .transpose()?;
@@ -316,7 +322,7 @@ impl App {
316 .collect::<Vec<_>>()
322 .collect::<Vec<_>>()
317 })
323 })
318 .or(env_style_components)
324 .or(env_style_components)
319− .unwrap_or_else(|| vec![StyleComponent::Full])
325+ .unwrap_or_else(|| vec![StyleComponent::Default])
320 .into_iter()
326 .into_iter()
321 .map(|style| style.components(self.interactive_output))
327 .map(|style| style.components(self.interactive_output))
322 .fold(HashSet::new(), |mut acc, components| {
328 .fold(HashSet::new(), |mut acc, components| {
src/bin/bat/assets.rs+13−4
@@ -1,5 +1,6 @@
1use std::borrow::Cow;
1use std::borrow::Cow;
2use std::fs;
2use std::fs;
3+use std::io;
3
4
4use clap::crate_version;
5use clap::crate_version;
5
6
@@ -25,7 +26,7 @@ pub fn clear_assets() {
25
26
26pub fn assets_from_cache_or_binary(use_custom_assets: bool) -> Result<HighlightingAssets> {
27pub fn assets_from_cache_or_binary(use_custom_assets: bool) -> Result<HighlightingAssets> {
27 let cache_dir = PROJECT_DIRS.cache_dir();
28 let cache_dir = PROJECT_DIRS.cache_dir();
28− if let Some(metadata) = AssetsMetadata::load_from_folder(&cache_dir)? {
29+ if let Some(metadata) = AssetsMetadata::load_from_folder(cache_dir)? {
29 if !metadata.is_compatible_with(crate_version!()) {
30 if !metadata.is_compatible_with(crate_version!()) {
30 return Err(format!(
31 return Err(format!(
31 "The binary caches for the user-customized syntaxes and themes \
32 "The binary caches for the user-customized syntaxes and themes \
@@ -42,7 +43,7 @@ pub fn assets_from_cache_or_binary(use_custom_assets: bool) -> Result<Highlighti
42 }
43 }
43
44
44 let custom_assets = if use_custom_assets {
45 let custom_assets = if use_custom_assets {
45− HighlightingAssets::from_cache(&cache_dir).ok()
46+ HighlightingAssets::from_cache(cache_dir).ok()
46 } else {
47 } else {
47 None
48 None
48 };
49 };
@@ -51,6 +52,14 @@ pub fn assets_from_cache_or_binary(use_custom_assets: bool) -> Result<Highlighti
51
52
52fn clear_asset(filename: &str, description: &str) {
53fn clear_asset(filename: &str, description: &str) {
53 print!("Clearing {} ... ", description);
54 print!("Clearing {} ... ", description);
54− fs::remove_file(PROJECT_DIRS.cache_dir().join(filename)).ok();
55+ let path = PROJECT_DIRS.cache_dir().join(filename);
55− println!("okay");
56+ match fs::remove_file(&path) {
57+ Err(err) if err.kind() == io::ErrorKind::NotFound => {
58+ println!("skipped (not present)");
59+ }
60+ Err(err) => {
61+ println!("could not remove the cache file {:?}: {}", &path, err);
62+ }
63+ Ok(_) => println!("okay"),
64+ }
56}
65}
src/bin/bat/clap_app.rs+64−11
@@ -1,7 +1,21 @@
1use clap::{crate_name, crate_version, App as ClapApp, AppSettings, Arg, ArgGroup, SubCommand};
1use clap::{crate_name, crate_version, App as ClapApp, AppSettings, Arg, ArgGroup, SubCommand};
2+use once_cell::sync::Lazy;
2use std::env;
3use std::env;
3use std::path::Path;
4use std::path::Path;
4
5
6+static VERSION: Lazy<String> = Lazy::new(|| {
7+ #[cfg(feature = "bugreport")]
8+ let git_version = bugreport::git_version!(fallback = "");
9+ #[cfg(not(feature = "bugreport"))]
10+ let git_version = "";
11+
12+ if git_version.is_empty() {
13+ crate_version!().to_string()
14+ } else {
15+ format!("{} ({})", crate_version!(), git_version)
16+ }
17+});
18+
5pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
19pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
6 let clap_color_setting = if interactive_output && env::var_os("NO_COLOR").is_none() {
20 let clap_color_setting = if interactive_output && env::var_os("NO_COLOR").is_none() {
7 AppSettings::ColoredHelp
21 AppSettings::ColoredHelp
@@ -10,7 +24,7 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
10 };
24 };
11
25
12 let mut app = ClapApp::new(crate_name!())
26 let mut app = ClapApp::new(crate_name!())
13− .version(crate_version!())
27+ .version(VERSION.as_str())
14 .global_setting(clap_color_setting)
28 .global_setting(clap_color_setting)
15 .global_setting(AppSettings::DeriveDisplayOrder)
29 .global_setting(AppSettings::DeriveDisplayOrder)
16 .global_setting(AppSettings::UnifiedHelpMessage)
30 .global_setting(AppSettings::UnifiedHelpMessage)
@@ -95,7 +109,8 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
95 '--highlight-line 40' highlights line 40\n \
109 '--highlight-line 40' highlights line 40\n \
96 '--highlight-line 30:40' highlights lines 30 to 40\n \
110 '--highlight-line 30:40' highlights lines 30 to 40\n \
97 '--highlight-line :40' highlights lines 1 to 40\n \
111 '--highlight-line :40' highlights lines 1 to 40\n \
98− '--highlight-line 40:' highlights lines 40 to the end of the file",
112+ '--highlight-line 40:' highlights lines 40 to the end of the file\n \
113+ '--highlight-line 30:+10' highlights lines 30 to 40",
99 ),
114 ),
100 )
115 )
101 .arg(
116 .arg(
@@ -294,6 +309,7 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
294 .arg(
309 .arg(
295 Arg::with_name("no-paging")
310 Arg::with_name("no-paging")
296 .short("P")
311 .short("P")
312+ .long("no-paging")
297 .alias("no-pager")
313 .alias("no-pager")
298 .overrides_with("no-paging")
314 .overrides_with("no-paging")
299 .hidden(true)
315 .hidden(true)
@@ -333,6 +349,18 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
333 )
349 )
334 .takes_value(true),
350 .takes_value(true),
335 )
351 )
352+ .arg(
353+ Arg::with_name("ignored-suffix")
354+ .number_of_values(1)
355+ .multiple(true)
356+ .takes_value(true)
357+ .long("ignored-suffix")
358+ .hidden_short_help(true)
359+ .help(
360+ "Ignore extension. For example:\n \
361+ 'bat --ignored-suffix \".dev\" my_file.json.dev' will use JSON syntax, and ignore '.dev'"
362+ )
363+ )
336 .arg(
364 .arg(
337 Arg::with_name("theme")
365 Arg::with_name("theme")
338 .long("theme")
366 .long("theme")
@@ -368,11 +396,20 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
368 .validator(|val| {
396 .validator(|val| {
369 let mut invalid_vals = val.split(',').filter(|style| {
397 let mut invalid_vals = val.split(',').filter(|style| {
370 !&[
398 !&[
371− "auto", "full", "plain", "header", "grid", "rule", "numbers", "snip",
399+ "auto",
400+ "full",
401+ "default",
402+ "plain",
403+ "header",
404+ "header-filename",
405+ "header-filesize",
406+ "grid",
407+ "rule",
408+ "numbers",
409+ "snip",
372 #[cfg(feature = "git")]
410 #[cfg(feature = "git")]
373− "changes",
411+ "changes",
374− ]
412+ ].contains(style)
375− .contains(style)
376 });
413 });
377
414
378 if let Some(invalid) = invalid_vals.next() {
415 if let Some(invalid) = invalid_vals.next() {
@@ -383,7 +420,7 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
383 })
420 })
384 .help(
421 .help(
385 "Comma-separated list of style elements to display \
422 "Comma-separated list of style elements to display \
386− (*auto*, full, plain, changes, header, grid, rule, numbers, snip).",
423+ (*default*, auto, full, plain, changes, header, header-filename, header-filesize, grid, rule, numbers, snip).",
387 )
424 )
388 .long_help(
425 .long_help(
389 "Configure which elements (line numbers, file headers, grid \
426 "Configure which elements (line numbers, file headers, grid \
@@ -394,11 +431,14 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
394 '--style=\"..\"' option to the configuration file or export the \
431 '--style=\"..\"' option to the configuration file or export the \
395 BAT_STYLE environment variable (e.g.: export BAT_STYLE=\"..\").\n\n\
432 BAT_STYLE environment variable (e.g.: export BAT_STYLE=\"..\").\n\n\
396 Possible values:\n\n \
433 Possible values:\n\n \
397− * full: enables all available components (default).\n \
434+ * default: enables recommended style components (default).\n \
398− * auto: same as 'full', unless the output is piped.\n \
435+ * full: enables all available components.\n \
436+ * auto: same as 'default', unless the output is piped.\n \
399 * plain: disables all available components.\n \
437 * plain: disables all available components.\n \
400 * changes: show Git modification markers.\n \
438 * changes: show Git modification markers.\n \
401− * header: show filenames before the content.\n \
439+ * header: alias for 'header-filename'.\n \
440+ * header-filename: show filenames before the content.\n \
441+ * header-filesize: show file sizes before the content.\n \
402 * grid: vertical/horizontal lines to separate side bar\n \
442 * grid: vertical/horizontal lines to separate side bar\n \
403 and the header from the content.\n \
443 and the header from the content.\n \
404 * rule: horizontal lines to delimit files.\n \
444 * rule: horizontal lines to delimit files.\n \
@@ -422,7 +462,8 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
422 '--line-range 30:40' prints lines 30 to 40\n \
462 '--line-range 30:40' prints lines 30 to 40\n \
423 '--line-range :40' prints lines 1 to 40\n \
463 '--line-range :40' prints lines 1 to 40\n \
424 '--line-range 40:' prints lines 40 to the end of the file\n \
464 '--line-range 40:' prints lines 40 to the end of the file\n \
425− '--line-range 40' only prints line 40",
465+ '--line-range 40' only prints line 40\n \
466+ '--line-range 30:+10' prints lines 30 to 40",
426 ),
467 ),
427 )
468 )
428 .arg(
469 .arg(
@@ -491,6 +532,12 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
491 .hidden_short_help(true)
532 .hidden_short_help(true)
492 .help("Show diagnostic information for bug reports.")
533 .help("Show diagnostic information for bug reports.")
493 )
534 )
535+ .arg(
536+ Arg::with_name("acknowledgements")
537+ .long("acknowledgements")
538+ .hidden_short_help(true)
539+ .help("Show acknowledgements."),
540+ )
494 .help_message("Print this help message.")
541 .help_message("Print this help message.")
495 .version_message("Show version information.");
542 .version_message("Show version information.");
496
543
@@ -549,6 +596,12 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
549 "Create completely new syntax and theme sets \
596 "Create completely new syntax and theme sets \
550 (instead of appending to the default sets).",
597 (instead of appending to the default sets).",
551 ),
598 ),
599+ )
600+ .arg(
601+ Arg::with_name("acknowledgements")
602+ .long("acknowledgements")
603+ .requires("build")
604+ .help("Build acknowledgements.bin."),
552 ),
605 ),
553 )
606 )
554 }
607 }
src/bin/bat/config.rs+3−3
@@ -64,7 +64,7 @@ pub fn generate_config_file() -> bat::error::Result<()> {
64#--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse"
64#--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse"
65
65
66# Syntax mappings: map a certain filename pattern to a language.
66# Syntax mappings: map a certain filename pattern to a language.
67−# Example 1: use the C++ syntax for .ino files
67+# Example 1: use the C++ syntax for Arduino .ino files
68# Example 2: Use ".gitignore"-style highlighting for ".ignore" files
68# Example 2: Use ".gitignore"-style highlighting for ".ignore" files
69#--map-syntax "*.ino:C++"
69#--map-syntax "*.ino:C++"
70#--map-syntax ".ignore:Git Ignore"
70#--map-syntax ".ignore:Git Ignore"
@@ -91,7 +91,7 @@ pub fn get_args_from_config_file() -> Result<Vec<OsString>, shell_words::ParseEr
91 .ok()
91 .ok()
92 .map(|content| get_args_from_str(&content))
92 .map(|content| get_args_from_str(&content))
93 .transpose()?
93 .transpose()?
94− .unwrap_or_else(Vec::new))
94+ .unwrap_or_default())
95}
95}
96
96
97pub fn get_args_from_env_var() -> Option<Result<Vec<OsString>, shell_words::ParseError>> {
97pub fn get_args_from_env_var() -> Option<Result<Vec<OsString>, shell_words::ParseError>> {
@@ -104,7 +104,7 @@ fn get_args_from_str(content: &str) -> Result<Vec<OsString>, shell_words::ParseE
104 .map(|line| line.trim())
104 .map(|line| line.trim())
105 .filter(|line| !line.is_empty())
105 .filter(|line| !line.is_empty())
106 .filter(|line| !line.starts_with('#'))
106 .filter(|line| !line.starts_with('#'))
107− .map(|line| shell_words::split(line))
107+ .map(shell_words::split)
108 .collect::<Result<Vec<_>, _>>()?;
108 .collect::<Result<Vec<_>, _>>()?;
109
109
110 Ok(args_per_line
110 Ok(args_per_line
src/bin/bat/directories.rs+21−15
@@ -1,11 +1,12 @@
1use std::env;
1use std::env;
2use std::path::{Path, PathBuf};
2use std::path::{Path, PathBuf};
3
3
4−use lazy_static::lazy_static;
4+use once_cell::sync::Lazy;
5
5
6/// Wrapper for 'dirs' that treats MacOS more like Linux, by following the XDG specification.
6/// Wrapper for 'dirs' that treats MacOS more like Linux, by following the XDG specification.
7−/// This means that the `XDG_CACHE_HOME` and `XDG_CONFIG_HOME` environment variables are
7+/// The `XDG_CACHE_HOME` environment variable is checked first. `BAT_CONFIG_DIR`
8−/// checked first. The fallback directories are `~/.cache/bat` and `~/.config/bat`, respectively.
8+/// is then checked before the `XDG_CONFIG_HOME` environment variable.
9+/// The fallback directories are `~/.cache/bat` and `~/.config/bat`, respectively.
9pub struct BatProjectDirs {
10pub struct BatProjectDirs {
10 cache_dir: PathBuf,
11 cache_dir: PathBuf,
11 config_dir: PathBuf,
12 config_dir: PathBuf,
@@ -15,16 +16,23 @@ impl BatProjectDirs {
15 fn new() -> Option<BatProjectDirs> {
16 fn new() -> Option<BatProjectDirs> {
16 let cache_dir = BatProjectDirs::get_cache_dir()?;
17 let cache_dir = BatProjectDirs::get_cache_dir()?;
17
18
18− #[cfg(target_os = "macos")]
19+ // Checks whether or not $BAT_CONFIG_DIR exists. If it doesn't, set our config dir
19− let config_dir_op = env::var_os("XDG_CONFIG_HOME")
20+ // to our system's default configuration home.
20− .map(PathBuf::from)
21+ let config_dir =
21− .filter(|p| p.is_absolute())
22+ if let Some(config_dir_op) = env::var_os("BAT_CONFIG_DIR").map(PathBuf::from) {
22− .or_else(|| dirs_next::home_dir().map(|d| d.join(".config")));
23+ config_dir_op
24+ } else {
25+ #[cfg(target_os = "macos")]
26+ let config_dir_op = env::var_os("XDG_CONFIG_HOME")
27+ .map(PathBuf::from)
28+ .filter(|p| p.is_absolute())
29+ .or_else(|| dirs_next::home_dir().map(|d| d.join(".config")));
23
30
24− #[cfg(not(target_os = "macos"))]
31+ #[cfg(not(target_os = "macos"))]
25− let config_dir_op = dirs_next::config_dir();
32+ let config_dir_op = dirs_next::config_dir();
26
33
27− let config_dir = config_dir_op.map(|d| d.join("bat"))?;
34+ config_dir_op.map(|d| d.join("bat"))?
35+ };
28
36
29 Some(BatProjectDirs {
37 Some(BatProjectDirs {
30 cache_dir,
38 cache_dir,
@@ -60,7 +68,5 @@ impl BatProjectDirs {
60 }
68 }
61}
69}
62
70
63−lazy_static! {
71+pub static PROJECT_DIRS: Lazy<BatProjectDirs> =
64− pub static ref PROJECT_DIRS: BatProjectDirs =
72+ Lazy::new(|| BatProjectDirs::new().expect("Could not get home directory"));
65− BatProjectDirs::new().expect("Could not get home directory");
66−}
src/bin/bat/main.rs+98−76
@@ -1,5 +1,4 @@
1−// `error_chain!` can recurse deeply
1+#![deny(unsafe_code)]
2−#![recursion_limit = "1024"]
3
2
4mod app;
3mod app;
5mod assets;
4mod assets;
@@ -23,12 +22,10 @@ use crate::{
23};
22};
24
23
25use assets::{assets_from_cache_or_binary, cache_dir, clear_assets, config_dir};
24use assets::{assets_from_cache_or_binary, cache_dir, clear_assets, config_dir};
26−use clap::crate_version;
27use directories::PROJECT_DIRS;
25use directories::PROJECT_DIRS;
28use globset::GlobMatcher;
26use globset::GlobMatcher;
29
27
30use bat::{
28use bat::{
31− assets::HighlightingAssets,
32 config::Config,
29 config::Config,
33 controller::Controller,
30 controller::Controller,
34 error::*,
31 error::*,
@@ -39,21 +36,32 @@ use bat::{
39
36
40const THEME_PREVIEW_DATA: &[u8] = include_bytes!("../../../assets/theme_preview.rs");
37const THEME_PREVIEW_DATA: &[u8] = include_bytes!("../../../assets/theme_preview.rs");
41
38
39+#[cfg(feature = "build-assets")]
40+fn build_assets(matches: &clap::ArgMatches) -> Result<()> {
41+ let source_dir = matches
42+ .value_of("source")
43+ .map(Path::new)
44+ .unwrap_or_else(|| PROJECT_DIRS.config_dir());
45+ let target_dir = matches
46+ .value_of("target")
47+ .map(Path::new)
48+ .unwrap_or_else(|| PROJECT_DIRS.cache_dir());
49+
50+ bat::assets::build(
51+ source_dir,
52+ !matches.is_present("blank"),
53+ matches.is_present("acknowledgements"),
54+ target_dir,
55+ clap::crate_version!(),
56+ )
57+}
58+
42fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> {
59fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> {
43 if matches.is_present("build") {
60 if matches.is_present("build") {
44− let source_dir = matches
61+ #[cfg(feature = "build-assets")]
45− .value_of("source")
62+ build_assets(matches)?;
46− .map(Path::new)
63+ #[cfg(not(feature = "build-assets"))]
47− .unwrap_or_else(|| PROJECT_DIRS.config_dir());
64+ println!("bat has been built without the 'build-assets' feature. The 'cache --build' option is not available.");
48− let target_dir = matches
49− .value_of("target")
50− .map(Path::new)
51− .unwrap_or_else(|| PROJECT_DIRS.cache_dir());
52−
53− let blank = matches.is_present("blank");
54−
55− let assets = HighlightingAssets::from_files(source_dir, !blank)?;
56− assets.save_to_cache(target_dir, crate_version!())?;
57 } else if matches.is_present("clear") {
65 } else if matches.is_present("clear") {
58 clear_assets();
66 clear_assets();
59 }
67 }
@@ -66,12 +74,9 @@ fn get_syntax_mapping_to_paths<'a>(
66) -> HashMap<&'a str, Vec<String>> {
74) -> HashMap<&'a str, Vec<String>> {
67 let mut map = HashMap::new();
75 let mut map = HashMap::new();
68 for mapping in mappings {
76 for mapping in mappings {
69− match mapping {
77+ if let (matcher, MappingTarget::MapTo(s)) = mapping {
70− (_, MappingTarget::MapToUnknown) => {}
78+ let globs = map.entry(*s).or_insert_with(Vec::new);
71− (matcher, MappingTarget::MapTo(s)) => {
79+ globs.push(matcher.glob().glob().into());
72− let globs = map.entry(*s).or_insert_with(Vec::new);
73− globs.push(matcher.glob().glob().into());
74− }
75 }
80 }
76 }
81 }
77 map
82 map
@@ -89,7 +94,7 @@ pub fn get_languages(config: &Config) -> Result<String> {
89 .collect::<Vec<_>>();
94 .collect::<Vec<_>>();
90
95
91 // Handling of file-extension conflicts, see issue #1076
96 // Handling of file-extension conflicts, see issue #1076
92− for lang in languages.iter_mut() {
97+ for lang in &mut languages {
93 let lang_name = lang.name.clone();
98 let lang_name = lang.name.clone();
94 lang.file_extensions.retain(|extension| {
99 lang.file_extensions.retain(|extension| {
95 // The 'extension' variable is not certainly a real extension.
100 // The 'extension' variable is not certainly a real extension.
@@ -98,17 +103,12 @@ pub fn get_languages(config: &Config) -> Result<String> {
98 // Also skip if the 'extension' contains another real extension, likely
103 // Also skip if the 'extension' contains another real extension, likely
99 // that is a full match file name like 'CMakeLists.txt' and 'Cargo.lock'
104 // that is a full match file name like 'CMakeLists.txt' and 'Cargo.lock'
100 if extension.starts_with('.') || Path::new(extension).extension().is_some() {
105 if extension.starts_with('.') || Path::new(extension).extension().is_some() {
101− true
106+ return true;
102− } else {
103− let test_file = Path::new("test").with_extension(extension);
104− let syntax = assets
105− .get_syntax_for_file_name(test_file, &config.syntax_mapping)
106− .unwrap(); // safe since .get_syntaxes() above worked
107− match syntax {
108− Some(syntax) => syntax.name == lang_name,
109− None => false,
110− }
111 }
107 }
108+
109+ let test_file = Path::new("test").with_extension(extension);
110+ let syntax_in_set = assets.get_syntax_for_path(test_file, &config.syntax_mapping);
111+ matches!(syntax_in_set, Ok(syntax_in_set) if syntax_in_set.syntax.name == lang_name)
112 });
112 });
113 }
113 }
114
114
@@ -116,7 +116,7 @@ pub fn get_languages(config: &Config) -> Result<String> {
116
116
117 let configured_languages = get_syntax_mapping_to_paths(config.syntax_mapping.mappings());
117 let configured_languages = get_syntax_mapping_to_paths(config.syntax_mapping.mappings());
118
118
119− for lang in languages.iter_mut() {
119+ for lang in &mut languages {
120 if let Some(additional_paths) = configured_languages.get(lang.name.as_str()) {
120 if let Some(additional_paths) = configured_languages.get(lang.name.as_str()) {
121 lang.file_extensions
121 lang.file_extensions
122 .extend(additional_paths.iter().cloned());
122 .extend(additional_paths.iter().cloned());
@@ -220,56 +220,75 @@ pub fn list_themes(cfg: &Config) -> Result<()> {
220
220
221fn run_controller(inputs: Vec<Input>, config: &Config) -> Result<bool> {
221fn run_controller(inputs: Vec<Input>, config: &Config) -> Result<bool> {
222 let assets = assets_from_cache_or_binary(config.use_custom_assets)?;
222 let assets = assets_from_cache_or_binary(config.use_custom_assets)?;
223− let controller = Controller::new(&config, &assets);
223+ let controller = Controller::new(config, &assets);
224 controller.run(inputs)
224 controller.run(inputs)
225}
225}
226
226
227+#[cfg(feature = "bugreport")]
228+fn invoke_bugreport(app: &App) {
229+ use bugreport::{bugreport, collector::*, format::Markdown};
230+ let pager = bat::config::get_pager_executable(app.matches.value_of("pager"))
231+ .unwrap_or_else(|| "less".to_owned()); // FIXME: Avoid non-canonical path to "less".
232+
233+ let mut custom_assets_metadata = PROJECT_DIRS.cache_dir().to_path_buf();
234+ custom_assets_metadata.push("metadata.yaml");
235+
236+ let mut report = bugreport!()
237+ .info(SoftwareVersion::default())
238+ .info(OperatingSystem::default())
239+ .info(CommandLine::default())
240+ .info(EnvironmentVariables::list(&[
241+ "SHELL",
242+ "PAGER",
243+ "LESS",
244+ "LANG",
245+ "LC_ALL",
246+ "BAT_PAGER",
247+ "BAT_CACHE_PATH",
248+ "BAT_CONFIG_PATH",
249+ "BAT_OPTS",
250+ "BAT_STYLE",
251+ "BAT_TABS",
252+ "BAT_THEME",
253+ "XDG_CONFIG_HOME",
254+ "XDG_CACHE_HOME",
255+ "COLORTERM",
256+ "NO_COLOR",
257+ "MANPAGER",
258+ ]))
259+ .info(FileContent::new("Config file", config_file()))
260+ .info(FileContent::new(
261+ "Custom assets metadata",
262+ custom_assets_metadata,
263+ ))
264+ .info(DirectoryEntries::new(
265+ "Custom assets",
266+ PROJECT_DIRS.cache_dir(),
267+ ))
268+ .info(CompileTimeInformation::default());
269+
270+ #[cfg(feature = "paging")]
271+ if let Ok(resolved_path) = grep_cli::resolve_binary(pager) {
272+ report = report.info(CommandOutput::new(
273+ "Less version",
274+ resolved_path,
275+ &["--version"],
276+ ))
277+ };
278+
279+ report.print::<Markdown>();
280+}
281+
227/// Returns `Err(..)` upon fatal errors. Otherwise, returns `Ok(true)` on full success and
282/// Returns `Err(..)` upon fatal errors. Otherwise, returns `Ok(true)` on full success and
228/// `Ok(false)` if any intermediate errors occurred (were printed).
283/// `Ok(false)` if any intermediate errors occurred (were printed).
229fn run() -> Result<bool> {
284fn run() -> Result<bool> {
230 let app = App::new()?;
285 let app = App::new()?;
231
286
232 if app.matches.is_present("diagnostic") {
287 if app.matches.is_present("diagnostic") {
233− use bugreport::{bugreport, collector::*, format::Markdown};
288+ #[cfg(feature = "bugreport")]
234− let pager = bat::config::get_pager_executable(app.matches.value_of("pager"))
289+ invoke_bugreport(&app);
235− .unwrap_or_else(|| "less".to_owned()); // FIXME: Avoid non-canonical path to "less".
290+ #[cfg(not(feature = "bugreport"))]
236−
291+ println!("bat has been built without the 'bugreport' feature. The '--diagnostic' option is not available.");
237− let report = bugreport!()
238− .info(SoftwareVersion::default())
239− .info(OperatingSystem::default())
240− .info(CommandLine::default())
241− .info(EnvironmentVariables::list(&[
242− "SHELL",
243− "PAGER",
244− "LESS",
245− "BAT_PAGER",
246− "BAT_CACHE_PATH",
247− "BAT_CONFIG_PATH",
248− "BAT_OPTS",
249− "BAT_STYLE",
250− "BAT_TABS",
251− "BAT_THEME",
252− "XDG_CONFIG_HOME",
253− "XDG_CACHE_HOME",
254− "COLORTERM",
255− "NO_COLOR",
256− "MANPAGER",
257− ]))
258− .info(FileContent::new("Config file", config_file()))
259− .info(CompileTimeInformation::default());
260−
261− let mut report = if let Ok(resolved_path) = grep_cli::resolve_binary(pager) {
262− report.info(CommandOutput::new(
263− "Less version",
264− resolved_path,
265− &["--version"],
266− ))
267− } else {
268− report
269− };
270−
271− report.print::<Markdown>();
272−
273 return Ok(true);
292 return Ok(true);
274 }
293 }
275
294
@@ -316,6 +335,9 @@ fn run() -> Result<bool> {
316 } else if app.matches.is_present("cache-dir") {
335 } else if app.matches.is_present("cache-dir") {
317 writeln!(io::stdout(), "{}", cache_dir())?;
336 writeln!(io::stdout(), "{}", cache_dir())?;
318 Ok(true)
337 Ok(true)
338+ } else if app.matches.is_present("acknowledgements") {
339+ writeln!(io::stdout(), "{}", bat::assets::get_acknowledgements())?;
340+ Ok(true)
319 } else {
341 } else {
320 run_controller(inputs, &config)
342 run_controller(inputs, &config)
321 }
343 }
src/config.rs+5−6
@@ -88,13 +88,12 @@ pub struct Config<'a> {
88 pub use_custom_assets: bool,
88 pub use_custom_assets: bool,
89}
89}
90
90
91−#[cfg(all(feature = "application", feature = "paging"))]
91+#[cfg(all(feature = "minimal-application", feature = "paging"))]
92pub fn get_pager_executable(config_pager: Option<&str>) -> Option<String> {
92pub fn get_pager_executable(config_pager: Option<&str>) -> Option<String> {
93− if let Ok(Some(pager)) = crate::pager::get_pager(config_pager) {
93+ crate::pager::get_pager(config_pager)
94− Some(pager.bin)
94+ .ok()
95− } else {
95+ .flatten()
96− None
96+ .map(|pager| pager.bin)
97− }
98}
97}
99
98
100#[test]
99#[test]
src/controller.rs+81−74
@@ -1,4 +1,4 @@
1−use std::io::{self, Write};
1+use std::io::{self, BufRead, Write};
2
2
3use crate::assets::HighlightingAssets;
3use crate::assets::HighlightingAssets;
4use crate::config::{Config, VisibleLines};
4use crate::config::{Config, VisibleLines};
@@ -14,7 +14,7 @@ use crate::output::OutputType;
14use crate::paging::PagingMode;
14use crate::paging::PagingMode;
15use crate::printer::{InteractivePrinter, Printer, SimplePrinter};
15use crate::printer::{InteractivePrinter, Printer, SimplePrinter};
16
16
17−use clircle::Clircle;
17+use clircle::{Clircle, Identifier};
18
18
19pub struct Controller<'a> {
19pub struct Controller<'a> {
20 config: &'a Config<'a>,
20 config: &'a Config<'a>,
@@ -45,7 +45,7 @@ impl<'b> Controller<'b> {
45 // Do not launch the pager if NONE of the input files exist
45 // Do not launch the pager if NONE of the input files exist
46 let mut paging_mode = self.config.paging_mode;
46 let mut paging_mode = self.config.paging_mode;
47 if self.config.paging_mode != PagingMode::Never {
47 if self.config.paging_mode != PagingMode::Never {
48− let call_pager = inputs.iter().any(|ref input| {
48+ let call_pager = inputs.iter().any(|input| {
49 if let InputKind::OrdinaryFile(ref path) = input.kind {
49 if let InputKind::OrdinaryFile(ref path) = input.kind {
50 Path::new(path).exists()
50 Path::new(path).exists()
51 } else {
51 } else {
@@ -76,83 +76,89 @@ impl<'b> Controller<'b> {
76
76
77 let writer = output_type.handle()?;
77 let writer = output_type.handle()?;
78 let mut no_errors: bool = true;
78 let mut no_errors: bool = true;
79−
80 let stderr = io::stderr();
79 let stderr = io::stderr();
81− let print_error = |error: &Error, write: &mut dyn Write| {
82− if attached_to_pager {
83− handle_error(error, write);
84− } else {
85− handle_error(error, &mut stderr.lock());
86− }
87− };
88
80
89 for (index, input) in inputs.into_iter().enumerate() {
81 for (index, input) in inputs.into_iter().enumerate() {
90− match input.open(io::stdin().lock(), stdout_identifier.as_ref()) {
82+ let identifier = stdout_identifier.as_ref();
91− Err(error) => {
83+ let is_first = index == 0;
92− print_error(&error, writer);
84+ let result = if input.is_stdin() {
93− no_errors = false;
85+ self.print_input(input, writer, io::stdin().lock(), identifier, is_first)
86+ } else {
87+ // Use dummy stdin since stdin is actually not used (#1902)
88+ self.print_input(input, writer, io::empty(), identifier, is_first)
89+ };
90+ if let Err(error) = result {
91+ if attached_to_pager {
92+ handle_error(&error, writer);
93+ } else {
94+ handle_error(&error, &mut stderr.lock());
94 }
95 }
95− Ok(mut opened_input) => {
96+ no_errors = false;
96− #[cfg(feature = "git")]
97+ }
97− let line_changes = if self.config.visible_lines.diff_mode()
98+ }
98− || (!self.config.loop_through && self.config.style_components.changes())
99− {
100− match opened_input.kind {
101− crate::input::OpenedInputKind::OrdinaryFile(ref path) => {
102− let diff = get_git_diff(path);
103−
104− // Skip files without Git modifications
105− if self.config.visible_lines.diff_mode()
106− && diff
107− .as_ref()
108− .map(|changes| changes.is_empty())
109− .unwrap_or(false)
110− {
111− continue;
112− }
113−
114− diff
115− }
116− _ if self.config.visible_lines.diff_mode() => {
117− // Skip non-file inputs in diff mode
118− continue;
119− }
120− _ => None,
121− }
122− } else {
123− None
124− };
125
99
126− let mut printer: Box<dyn Printer> = if self.config.loop_through {
100+ Ok(no_errors)
127− Box::new(SimplePrinter::new(&self.config))
101+ }
128− } else {
102+
129− Box::new(InteractivePrinter::new(
103+ fn print_input<R: BufRead>(
130− &self.config,
104+ &self,
131− &self.assets,
105+ input: Input,
132− &mut opened_input,
106+ writer: &mut dyn Write,
133− #[cfg(feature = "git")]
107+ stdin: R,
134− &line_changes,
108+ stdout_identifier: Option<&Identifier>,
135− )?)
109+ is_first: bool,
136− };
110+ ) -> Result<()> {
137−
111+ let mut opened_input = input.open(stdin, stdout_identifier)?;
138− let result = self.print_file(
112+ #[cfg(feature = "git")]
139− &mut *printer,
113+ let line_changes = if self.config.visible_lines.diff_mode()
140− writer,
114+ || (!self.config.loop_through && self.config.style_components.changes())
141− &mut opened_input,
115+ {
142− index != 0,
116+ match opened_input.kind {
143− #[cfg(feature = "git")]
117+ crate::input::OpenedInputKind::OrdinaryFile(ref path) => {
144− &line_changes,
118+ let diff = get_git_diff(path);
145− );
119+
146−
120+ // Skip files without Git modifications
147− if let Err(error) = result {
121+ if self.config.visible_lines.diff_mode()
148− print_error(&error, writer);
122+ && diff
149− no_errors = false;
123+ .as_ref()
124+ .map(|changes| changes.is_empty())
125+ .unwrap_or(false)
126+ {
127+ return Ok(());
150 }
128 }
129+
130+ diff
131+ }
132+ _ if self.config.visible_lines.diff_mode() => {
133+ // Skip non-file inputs in diff mode
134+ return Ok(());
151 }
135 }
136+ _ => None,
152 }
137 }
153− }
138+ } else {
139+ None
140+ };
154
141
155− Ok(no_errors)
142+ let mut printer: Box<dyn Printer> = if self.config.loop_through {
143+ Box::new(SimplePrinter::new(self.config))
144+ } else {
145+ Box::new(InteractivePrinter::new(
146+ self.config,
147+ self.assets,
148+ &mut opened_input,
149+ #[cfg(feature = "git")]
150+ &line_changes,
151+ )?)
152+ };
153+
154+ self.print_file(
155+ &mut *printer,
156+ writer,
157+ &mut opened_input,
158+ !is_first,
159+ #[cfg(feature = "git")]
160+ &line_changes,
161+ )
156 }
162 }
157
163
158 fn print_file(
164 fn print_file(
@@ -175,9 +181,10 @@ impl<'b> Controller<'b> {
175 let mut line_ranges: Vec<LineRange> = vec![];
181 let mut line_ranges: Vec<LineRange> = vec![];
176
182
177 if let Some(line_changes) = line_changes {
183 if let Some(line_changes) = line_changes {
178− for line in line_changes.keys() {
184+ for &line in line_changes.keys() {
179− let line = *line as usize;
185+ let line = line as usize;
180− line_ranges.push(LineRange::new(line - context, line + context));
186+ line_ranges
187+ .push(LineRange::new(line.saturating_sub(context), line + context));
181 }
188 }
182 }
189 }
183
190
src/error.rs+39−26
@@ -1,42 +1,55 @@
1−use error_chain::error_chain;
2use std::io::Write;
1use std::io::Write;
2+use thiserror::Error;
3
3
4−error_chain! {
4+#[derive(Error, Debug)]
5− foreign_links {
5+#[non_exhaustive]
6− Clap(::clap::Error) #[cfg(feature = "application")];
6+pub enum Error {
7− Io(::std::io::Error);
7+ #[error(transparent)]
8− SyntectError(::syntect::LoadingError);
8+ Io(#[from] ::std::io::Error),
9− ParseIntError(::std::num::ParseIntError);
9+ #[error(transparent)]
10− GlobParsingError(::globset::Error);
10+ SyntectError(#[from] ::syntect::Error),
11− SerdeYamlError(::serde_yaml::Error);
11+ #[error(transparent)]
12+ SyntectLoadingError(#[from] ::syntect::LoadingError),
13+ #[error(transparent)]
14+ ParseIntError(#[from] ::std::num::ParseIntError),
15+ #[error(transparent)]
16+ GlobParsingError(#[from] ::globset::Error),
17+ #[error(transparent)]
18+ SerdeYamlError(#[from] ::serde_yaml::Error),
19+ #[error("unable to detect syntax for {0}")]
20+ UndetectedSyntax(String),
21+ #[error("unknown syntax: '{0}'")]
22+ UnknownSyntax(String),
23+ #[error("Unknown style '{0}'")]
24+ UnknownStyle(String),
25+ #[error("Use of bat as a pager is disallowed in order to avoid infinite recursion problems")]
26+ InvalidPagerValueBat,
27+ #[error("{0}")]
28+ Msg(String),
29+}
30+
31+impl From<&'static str> for Error {
32+ fn from(s: &'static str) -> Self {
33+ Error::Msg(s.to_owned())
12 }
34 }
35+}
13
36
14− errors {
37+impl From<String> for Error {
15− UndetectedSyntax(input: String) {
38+ fn from(s: String) -> Self {
16− description("unable to detect syntax"),
39+ Error::Msg(s)
17− display("unable to detect syntax for {}", input)
18− }
19− UnknownSyntax(name: String) {
20− description("unknown syntax"),
21− display("unknown syntax: '{}'", name)
22− }
23− InvalidPagerValueBat {
24− description("invalid value `bat` for pager property"),
25− display("Use of bat as a pager is disallowed in order to avoid infinite recursion problems")
26− }
27 }
40 }
28}
41}
29
42
43+pub type Result<T> = std::result::Result<T, Error>;
44+
30pub fn default_error_handler(error: &Error, output: &mut dyn Write) {
45pub fn default_error_handler(error: &Error, output: &mut dyn Write) {
31 use ansi_term::Colour::Red;
46 use ansi_term::Colour::Red;
32
47
33 match error {
48 match error {
34− Error(ErrorKind::Io(ref io_error), _)
49+ Error::Io(ref io_error) if io_error.kind() == ::std::io::ErrorKind::BrokenPipe => {
35− if io_error.kind() == ::std::io::ErrorKind::BrokenPipe =>
36− {
37 ::std::process::exit(0);
50 ::std::process::exit(0);
38 }
51 }
39− Error(ErrorKind::SerdeYamlError(_), _) => {
52+ Error::SerdeYamlError(_) => {
40 writeln!(
53 writeln!(
41 output,
54 output,
42 "{}: Error while parsing metadata.yaml file: {}",
55 "{}: Error while parsing metadata.yaml file: {}",
src/input.rs+34−12
@@ -1,4 +1,5 @@
1use std::convert::TryFrom;
1use std::convert::TryFrom;
2+use std::fs;
2use std::fs::File;
3use std::fs::File;
3use std::io::{self, BufRead, BufReader, Read};
4use std::io::{self, BufRead, BufReader, Read};
4use std::path::{Path, PathBuf};
5use std::path::{Path, PathBuf};
@@ -50,8 +51,8 @@ impl InputDescription {
50 }
51 }
51
52
52 pub fn title(&self) -> &String {
53 pub fn title(&self) -> &String {
53− match self.title.as_ref() {
54+ match &self.title {
54− Some(ref title) => title,
55+ Some(title) => title,
55 None => &self.name,
56 None => &self.name,
56 }
57 }
57 }
58 }
@@ -87,6 +88,7 @@ impl<'a> InputKind<'a> {
87#[derive(Clone, Default)]
88#[derive(Clone, Default)]
88pub(crate) struct InputMetadata {
89pub(crate) struct InputMetadata {
89 pub(crate) user_provided_name: Option<PathBuf>,
90 pub(crate) user_provided_name: Option<PathBuf>,
91+ pub(crate) size: Option<u64>,
90}
92}
91
93
92pub struct Input<'a> {
94pub struct Input<'a> {
@@ -108,6 +110,21 @@ pub(crate) struct OpenedInput<'a> {
108 pub(crate) description: InputDescription,
110 pub(crate) description: InputDescription,
109}
111}
110
112
113+impl OpenedInput<'_> {
114+ /// Get the path of the file:
115+ /// If this was set by the metadata, that will take priority.
116+ /// If it wasn't, it will use the real file path (if available).
117+ pub(crate) fn path(&self) -> Option<&PathBuf> {
118+ self.metadata
119+ .user_provided_name
120+ .as_ref()
121+ .or(match self.kind {
122+ OpenedInputKind::OrdinaryFile(ref path) => Some(path),
123+ _ => None,
124+ })
125+ }
126+}
127+
111impl<'a> Input<'a> {
128impl<'a> Input<'a> {
112 pub fn ordinary_file(path: impl AsRef<Path>) -> Self {
129 pub fn ordinary_file(path: impl AsRef<Path>) -> Self {
113 Self::_ordinary_file(path.as_ref())
130 Self::_ordinary_file(path.as_ref())
@@ -115,9 +132,14 @@ impl<'a> Input<'a> {
115
132
116 fn _ordinary_file(path: &Path) -> Self {
133 fn _ordinary_file(path: &Path) -> Self {
117 let kind = InputKind::OrdinaryFile(path.to_path_buf());
134 let kind = InputKind::OrdinaryFile(path.to_path_buf());
135+ let metadata = InputMetadata {
136+ size: fs::metadata(path).map(|m| m.len()).ok(),
137+ ..InputMetadata::default()
138+ };
139+
118 Input {
140 Input {
119 description: kind.description(),
141 description: kind.description(),
120− metadata: InputMetadata::default(),
142+ metadata,
121 kind,
143 kind,
122 }
144 }
123 }
145 }
@@ -256,18 +278,18 @@ impl<'a> InputReader<'a> {
256 }
278 }
257
279
258 pub(crate) fn read_line(&mut self, buf: &mut Vec<u8>) -> io::Result<bool> {
280 pub(crate) fn read_line(&mut self, buf: &mut Vec<u8>) -> io::Result<bool> {
259− if self.first_line.is_empty() {
281+ if !self.first_line.is_empty() {
260− let res = self.inner.read_until(b'\n', buf).map(|size| size > 0)?;
282+ buf.append(&mut self.first_line);
283+ return Ok(true);
284+ }
261
285
262− if self.content_type == Some(ContentType::UTF_16LE) {
286+ let res = self.inner.read_until(b'\n', buf).map(|size| size > 0)?;
263− self.inner.read_until(0x00, buf).ok();
264− }
265
287
266− Ok(res)
288+ if self.content_type == Some(ContentType::UTF_16LE) {
267− } else {
289+ let _ = self.inner.read_until(0x00, buf);
268− buf.append(&mut self.first_line);
269− Ok(true)
270 }
290 }
291+
292+ Ok(res)
271 }
293 }
272}
294}
273
295
src/less.rs+64−13
@@ -3,20 +3,37 @@
3use std::ffi::OsStr;
3use std::ffi::OsStr;
4use std::process::Command;
4use std::process::Command;
5
5
6−pub fn retrieve_less_version(less_path: &dyn AsRef<OsStr>) -> Option<usize> {
6+#[derive(Debug, PartialEq)]
7+pub enum LessVersion {
8+ Less(usize),
9+ BusyBox,
10+}
11+
12+pub fn retrieve_less_version(less_path: &dyn AsRef<OsStr>) -> Option<LessVersion> {
7 let resolved_path = grep_cli::resolve_binary(less_path.as_ref()).ok()?;
13 let resolved_path = grep_cli::resolve_binary(less_path.as_ref()).ok()?;
8
14
9 let cmd = Command::new(resolved_path).arg("--version").output().ok()?;
15 let cmd = Command::new(resolved_path).arg("--version").output().ok()?;
10− parse_less_version(&cmd.stdout)
16+ if cmd.status.success() {
17+ parse_less_version(&cmd.stdout)
18+ } else {
19+ parse_less_version_busybox(&cmd.stderr)
20+ }
11}
21}
12
22
13−fn parse_less_version(output: &[u8]) -> Option<usize> {
23+fn parse_less_version(output: &[u8]) -> Option<LessVersion> {
14− if output.starts_with(b"less ") {
24+ if !output.starts_with(b"less ") {
15− let version = std::str::from_utf8(&output[5..]).ok()?;
25+ return None;
16− let end = version.find(|c: char| !c.is_ascii_digit())?;
26+ }
17− version[..end].parse::<usize>().ok()
27+
18− } else {
28+ let version = std::str::from_utf8(&output[5..]).ok()?;
19− None
29+ let end = version.find(|c: char| !c.is_ascii_digit())?;
30+ Some(LessVersion::Less(version[..end].parse::<usize>().ok()?))
31+}
32+
33+fn parse_less_version_busybox(output: &[u8]) -> Option<LessVersion> {
34+ match std::str::from_utf8(output) {
35+ Ok(version) if version.contains("BusyBox ") => Some(LessVersion::BusyBox),
36+ _ => None,
20 }
37 }
21}
38}
22
39
@@ -30,7 +47,7 @@ For information about the terms of redistribution,
30see the file named README in the less distribution.
47see the file named README in the less distribution.
31Homepage: http://www.greenwoodsoftware.com/less";
48Homepage: http://www.greenwoodsoftware.com/less";
32
49
33− assert_eq!(Some(487), parse_less_version(output));
50+ assert_eq!(Some(LessVersion::Less(487)), parse_less_version(output));
34}
51}
35
52
36#[test]
53#[test]
@@ -43,7 +60,7 @@ For information about the terms of redistribution,
43see the file named README in the less distribution.
60see the file named README in the less distribution.
44Homepage: http://www.greenwoodsoftware.com/less";
61Homepage: http://www.greenwoodsoftware.com/less";
45
62
46− assert_eq!(Some(529), parse_less_version(output));
63+ assert_eq!(Some(LessVersion::Less(529)), parse_less_version(output));
47}
64}
48
65
49#[test]
66#[test]
@@ -56,7 +73,7 @@ For information about the terms of redistribution,
56see the file named README in the less distribution.
73see the file named README in the less distribution.
57Home page: http://www.greenwoodsoftware.com/less";
74Home page: http://www.greenwoodsoftware.com/less";
58
75
59− assert_eq!(Some(551), parse_less_version(output));
76+ assert_eq!(Some(LessVersion::Less(551)), parse_less_version(output));
60}
77}
61
78
62#[test]
79#[test]
@@ -69,7 +86,7 @@ For information about the terms of redistribution,
69see the file named README in the less distribution.
86see the file named README in the less distribution.
70Home page: https://greenwoodsoftware.com/less";
87Home page: https://greenwoodsoftware.com/less";
71
88
72− assert_eq!(Some(581), parse_less_version(output));
89+ assert_eq!(Some(LessVersion::Less(581)), parse_less_version(output));
73}
90}
74
91
75#[test]
92#[test]
@@ -77,4 +94,38 @@ fn test_parse_less_version_wrong_program() {
77 let output = b"more from util-linux 2.34";
94 let output = b"more from util-linux 2.34";
78
95
79 assert_eq!(None, parse_less_version(output));
96 assert_eq!(None, parse_less_version(output));
97+ assert_eq!(None, parse_less_version_busybox(output));
98+}
99+
100+#[test]
101+fn test_parse_less_version_busybox() {
102+ let output = b"pkg/less: unrecognized option '--version'
103+BusyBox v1.35.0 (2022-04-21 10:38:11 EDT) multi-call binary.
104+
105+Usage: less [-EFIMmNSRh~] [FILE]...
106+
107+View FILE (or stdin) one screenful at a time
108+
109+ -E Quit once the end of a file is reached
110+ -F Quit if entire file fits on first screen
111+ -I Ignore case in all searches
112+ -M,-m Display status line with line numbers
113+ and percentage through the file
114+ -N Prefix line number to each line
115+ -S Truncate long lines
116+ -R Remove color escape codes in input
117+ -~ Suppress ~s displayed past EOF";
118+
119+ assert_eq!(
120+ Some(LessVersion::BusyBox),
121+ parse_less_version_busybox(output)
122+ );
123+}
124+
125+#[test]
126+fn test_parse_less_version_invalid_utf_8() {
127+ let output = b"\xff";
128+
129+ assert_eq!(None, parse_less_version(output));
130+ assert_eq!(None, parse_less_version_busybox(output));
80}
131}
src/lib.rs+6−2
@@ -19,10 +19,14 @@
19//! .unwrap();
19//! .unwrap();
20//! ```
20//! ```
21
21
22+#![deny(unsafe_code)]
23+
22mod macros;
24mod macros;
23
25
24pub mod assets;
26pub mod assets;
25−pub mod assets_metadata;
27+pub mod assets_metadata {
28+ pub use super::assets::assets_metadata::*;
29+}
26pub mod config;
30pub mod config;
27pub mod controller;
31pub mod controller;
28mod decorations;
32mod decorations;
@@ -40,9 +44,9 @@ mod preprocessor;
40mod pretty_printer;
44mod pretty_printer;
41pub(crate) mod printer;
45pub(crate) mod printer;
42pub mod style;
46pub mod style;
43−mod syntax_dependencies;
44pub(crate) mod syntax_mapping;
47pub(crate) mod syntax_mapping;
45mod terminal;
48mod terminal;
49+mod vscreen;
46pub(crate) mod wrapping;
50pub(crate) mod wrapping;
47
51
48pub use pretty_printer::{Input, PrettyPrinter};
52pub use pretty_printer::{Input, PrettyPrinter};
src/line_range.rs+69−1
@@ -47,7 +47,28 @@ impl LineRange {
47 }
47 }
48 2 => {
48 2 => {
49 new_range.lower = line_numbers[0].parse()?;
49 new_range.lower = line_numbers[0].parse()?;
50− new_range.upper = line_numbers[1].parse()?;
50+ let first_byte = line_numbers[1].bytes().next();
51+
52+ new_range.upper = if first_byte == Some(b'+') {
53+ let more_lines = &line_numbers[1][1..]
54+ .parse()
55+ .map_err(|_| "Invalid character after +")?;
56+ new_range.lower + more_lines
57+ } else if first_byte == Some(b'-') {
58+ // this will prevent values like "-+5" even though "+5" is valid integer
59+ if line_numbers[1][1..].bytes().next() == Some(b'+') {
60+ return Err("Invalid character after -".into());
61+ }
62+ let prior_lines = &line_numbers[1][1..]
63+ .parse()
64+ .map_err(|_| "Invalid character after -")?;
65+ let prev_lower = new_range.lower;
66+ new_range.lower = new_range.lower.saturating_sub(*prior_lines);
67+ prev_lower
68+ } else {
69+ line_numbers[1].parse()?
70+ };
71+
51 Ok(new_range)
72 Ok(new_range)
52 }
73 }
53 _ => Err(
74 _ => Err(
@@ -100,6 +121,53 @@ fn test_parse_fail() {
100 assert!(range.is_err());
121 assert!(range.is_err());
101}
122}
102
123
124+#[test]
125+fn test_parse_plus() {
126+ let range = LineRange::from("40:+10").expect("Shouldn't fail on test!");
127+ assert_eq!(40, range.lower);
128+ assert_eq!(50, range.upper);
129+}
130+
131+#[test]
132+fn test_parse_plus_fail() {
133+ let range = LineRange::from("40:+z");
134+ assert!(range.is_err());
135+ let range = LineRange::from("40:+-10");
136+ assert!(range.is_err());
137+ let range = LineRange::from("40:+");
138+ assert!(range.is_err());
139+}
140+
141+#[test]
142+fn test_parse_minus_success() {
143+ let range = LineRange::from("40:-10").expect("Shouldn't fail on test!");
144+ assert_eq!(30, range.lower);
145+ assert_eq!(40, range.upper);
146+}
147+
148+#[test]
149+fn test_parse_minus_edge_cases_success() {
150+ let range = LineRange::from("5:-4").expect("Shouldn't fail on test!");
151+ assert_eq!(1, range.lower);
152+ assert_eq!(5, range.upper);
153+ let range = LineRange::from("5:-5").expect("Shouldn't fail on test!");
154+ assert_eq!(0, range.lower);
155+ assert_eq!(5, range.upper);
156+ let range = LineRange::from("5:-100").expect("Shouldn't fail on test!");
157+ assert_eq!(0, range.lower);
158+ assert_eq!(5, range.upper);
159+}
160+
161+#[test]
162+fn test_parse_minus_fail() {
163+ let range = LineRange::from("40:-z");
164+ assert!(range.is_err());
165+ let range = LineRange::from("40:-+10");
166+ assert!(range.is_err());
167+ let range = LineRange::from("40:-");
168+ assert!(range.is_err());
169+}
170+
103#[derive(Copy, Clone, Debug, PartialEq)]
171#[derive(Copy, Clone, Debug, PartialEq)]
104pub enum RangeCheckResult {
172pub enum RangeCheckResult {
105 // Within one of the given ranges
173 // Within one of the given ranges
src/output.rs+10−8
@@ -4,7 +4,7 @@ use std::process::Child;
4
4
5use crate::error::*;
5use crate::error::*;
6#[cfg(feature = "paging")]
6#[cfg(feature = "paging")]
7−use crate::less::retrieve_less_version;
7+use crate::less::{retrieve_less_version, LessVersion};
8#[cfg(feature = "paging")]
8#[cfg(feature = "paging")]
9use crate::paging::PagingMode;
9use crate::paging::PagingMode;
10#[cfg(feature = "paging")]
10#[cfg(feature = "paging")]
@@ -52,7 +52,7 @@ impl OutputType {
52 use std::process::{Command, Stdio};
52 use std::process::{Command, Stdio};
53
53
54 let pager_opt =
54 let pager_opt =
55− pager::get_pager(pager_from_config).chain_err(|| "Could not parse pager command.")?;
55+ pager::get_pager(pager_from_config).map_err(|_| "Could not parse pager command.")?;
56
56
57 let pager = match pager_opt {
57 let pager = match pager_opt {
58 Some(pager) => pager,
58 Some(pager) => pager,
@@ -60,7 +60,7 @@ impl OutputType {
60 };
60 };
61
61
62 if pager.kind == PagerKind::Bat {
62 if pager.kind == PagerKind::Bat {
63− return Err(ErrorKind::InvalidPagerValueBat.into());
63+ return Err(Error::InvalidPagerValueBat);
64 }
64 }
65
65
66 let resolved_path = match grep_cli::resolve_binary(&pager.bin) {
66 let resolved_path = match grep_cli::resolve_binary(&pager.bin) {
@@ -83,13 +83,13 @@ impl OutputType {
83 let replace_arguments_to_less = pager.source == PagerSource::EnvVarPager;
83 let replace_arguments_to_less = pager.source == PagerSource::EnvVarPager;
84
84
85 if args.is_empty() || replace_arguments_to_less {
85 if args.is_empty() || replace_arguments_to_less {
86− p.arg("--RAW-CONTROL-CHARS");
86+ p.arg("-R"); // Short version of --RAW-CONTROL-CHARS for maximum compatibility
87 if single_screen_action == SingleScreenAction::Quit {
87 if single_screen_action == SingleScreenAction::Quit {
88− p.arg("--quit-if-one-screen");
88+ p.arg("-F"); // Short version of --quit-if-one-screen for compatibility
89 }
89 }
90
90
91 if wrapping_mode == WrappingMode::NoWrapping(true) {
91 if wrapping_mode == WrappingMode::NoWrapping(true) {
92− p.arg("--chop-long-lines");
92+ p.arg("-S"); // Short version of --chop-long-lines for compatibility
93 }
93 }
94
94
95 // Passing '--no-init' fixes a bug with '--quit-if-one-screen' in older
95 // Passing '--no-init' fixes a bug with '--quit-if-one-screen' in older
@@ -103,7 +103,9 @@ impl OutputType {
103 None => {
103 None => {
104 p.arg("--no-init");
104 p.arg("--no-init");
105 }
105 }
106− Some(version) if (version < 530 || (cfg!(windows) && version < 558)) => {
106+ Some(LessVersion::Less(version))
107+ if (version < 530 || (cfg!(windows) && version < 558)) =>
108+ {
107 p.arg("--no-init");
109 p.arg("--no-init");
108 }
110 }
109 _ => {}
111 _ => {}
@@ -142,7 +144,7 @@ impl OutputType {
142 OutputType::Pager(ref mut command) => command
144 OutputType::Pager(ref mut command) => command
143 .stdin
145 .stdin
144 .as_mut()
146 .as_mut()
145− .chain_err(|| "Could not open stdin for pager")?,
147+ .ok_or("Could not open stdin for pager")?,
146 OutputType::Stdout(ref mut handle) => handle,
148 OutputType::Stdout(ref mut handle) => handle,
147 })
149 })
148 }
150 }
src/preprocessor.rs+10−3
@@ -53,26 +53,33 @@ pub fn replace_nonprintable(input: &[u8], tab_width: usize) -> String {
53 let tab_width = if tab_width == 0 { 4 } else { tab_width };
53 let tab_width = if tab_width == 0 { 4 } else { tab_width };
54
54
55 let mut idx = 0;
55 let mut idx = 0;
56+ let mut line_idx = 0;
56 let len = input.len();
57 let len = input.len();
57 while idx < len {
58 while idx < len {
58 if let Some((chr, skip_ahead)) = try_parse_utf8_char(&input[idx..]) {
59 if let Some((chr, skip_ahead)) = try_parse_utf8_char(&input[idx..]) {
59 idx += skip_ahead;
60 idx += skip_ahead;
61+ line_idx += 1;
60
62
61 match chr {
63 match chr {
62 // space
64 // space
63 ' ' => output.push('·'),
65 ' ' => output.push('·'),
64 // tab
66 // tab
65 '\t' => {
67 '\t' => {
66− if tab_width == 1 {
68+ let tab_stop = tab_width - ((line_idx - 1) % tab_width);
69+ line_idx = 0;
70+ if tab_stop == 1 {
67 output.push('↹');
71 output.push('↹');
68 } else {
72 } else {
69 output.push('├');
73 output.push('├');
70− output.push_str(&"─".repeat(tab_width - 2));
74+ output.push_str(&"─".repeat(tab_stop - 2));
71 output.push('┤');
75 output.push('┤');
72 }
76 }
73 }
77 }
74 // line feed
78 // line feed
75− '\x0A' => output.push_str("␊\x0A"),
79+ '\x0A' => {
80+ output.push_str("␊\x0A");
81+ line_idx = 0;
82+ }
76 // carriage return
83 // carriage return
77 '\x0D' => output.push('␍'),
84 '\x0D' => output.push('␍'),
78 // null
85 // null
src/pretty_printer.rs+6
@@ -164,6 +164,12 @@ impl<'a> PrettyPrinter<'a> {
164 self
164 self
165 }
165 }
166
166
167+ /// Whether to print binary content or nonprintable characters (default: no)
168+ pub fn show_nonprintable(&mut self, yes: bool) -> &mut Self {
169+ self.config.show_nonprintable = yes;
170+ self
171+ }
172+
167 /// Whether to show "snip" markers between visible line ranges (default: no)
173 /// Whether to show "snip" markers between visible line ranges (default: no)
168 pub fn snip(&mut self, yes: bool) -> &mut Self {
174 pub fn snip(&mut self, yes: bool) -> &mut Self {
169 self.active_style_components.snip = yes;
175 self.active_style_components.snip = yes;
src/printer.rs+200−134
@@ -4,6 +4,8 @@ use std::vec::Vec;
4use ansi_term::Colour::{Fixed, Green, Red, Yellow};
4use ansi_term::Colour::{Fixed, Green, Red, Yellow};
5use ansi_term::Style;
5use ansi_term::Style;
6
6
7+use bytesize::ByteSize;
8+
7use console::AnsiCodeIterator;
9use console::AnsiCodeIterator;
8
10
9use syntect::easy::HighlightLines;
11use syntect::easy::HighlightLines;
@@ -18,7 +20,7 @@ use encoding::{DecoderTrap, Encoding};
18
20
19use unicode_width::UnicodeWidthChar;
21use unicode_width::UnicodeWidthChar;
20
22
21−use crate::assets::HighlightingAssets;
23+use crate::assets::{HighlightingAssets, SyntaxReferenceInSet};
22use crate::config::Config;
24use crate::config::Config;
23#[cfg(feature = "git")]
25#[cfg(feature = "git")]
24use crate::decorations::LineChangesDecoration;
26use crate::decorations::LineChangesDecoration;
@@ -29,7 +31,9 @@ use crate::error::*;
29use crate::input::OpenedInput;
31use crate::input::OpenedInput;
30use crate::line_range::RangeCheckResult;
32use crate::line_range::RangeCheckResult;
31use crate::preprocessor::{expand_tabs, replace_nonprintable};
33use crate::preprocessor::{expand_tabs, replace_nonprintable};
34+use crate::style::StyleComponent;
32use crate::terminal::{as_terminal_escaped, to_ansi_color};
35use crate::terminal::{as_terminal_escaped, to_ansi_color};
36+use crate::vscreen::AnsiStyle;
33use crate::wrapping::WrappingMode;
37use crate::wrapping::WrappingMode;
34
38
35pub(crate) trait Printer {
39pub(crate) trait Printer {
@@ -99,17 +103,30 @@ impl<'a> Printer for SimplePrinter<'a> {
99 }
103 }
100}
104}
101
105
106+struct HighlighterFromSet<'a> {
107+ highlighter: HighlightLines<'a>,
108+ syntax_set: &'a SyntaxSet,
109+}
110+
111+impl<'a> HighlighterFromSet<'a> {
112+ fn new(syntax_in_set: SyntaxReferenceInSet<'a>, theme: &'a Theme) -> Self {
113+ Self {
114+ highlighter: HighlightLines::new(syntax_in_set.syntax, theme),
115+ syntax_set: syntax_in_set.syntax_set,
116+ }
117+ }
118+}
119+
102pub(crate) struct InteractivePrinter<'a> {
120pub(crate) struct InteractivePrinter<'a> {
103 colors: Colors,
121 colors: Colors,
104 config: &'a Config<'a>,
122 config: &'a Config<'a>,
105 decorations: Vec<Box<dyn Decoration>>,
123 decorations: Vec<Box<dyn Decoration>>,
106 panel_width: usize,
124 panel_width: usize,
107− ansi_prefix_sgr: String,
125+ ansi_style: AnsiStyle,
108 content_type: Option<ContentType>,
126 content_type: Option<ContentType>,
109 #[cfg(feature = "git")]
127 #[cfg(feature = "git")]
110 pub line_changes: &'a Option<LineChanges>,
128 pub line_changes: &'a Option<LineChanges>,
111− highlighter: Option<HighlightLines<'a>>,
129+ highlighter_from_set: Option<HighlighterFromSet<'a>>,
112− syntax_set: &'a SyntaxSet,
113 background_color_highlight: Option<Color>,
130 background_color_highlight: Option<Color>,
114}
131}
115
132
@@ -163,7 +180,7 @@ impl<'a> InteractivePrinter<'a> {
163 panel_width = 0;
180 panel_width = 0;
164 }
181 }
165
182
166− let highlighter = if input
183+ let highlighter_from_set = if input
167 .reader
184 .reader
168 .content_type
185 .content_type
169 .map_or(false, |c| c.is_binary() && !config.show_nonprintable)
186 .map_or(false, |c| c.is_binary() && !config.show_nonprintable)
@@ -171,15 +188,16 @@ impl<'a> InteractivePrinter<'a> {
171 None
188 None
172 } else {
189 } else {
173 // Determine the type of syntax for highlighting
190 // Determine the type of syntax for highlighting
174− let syntax = match assets.get_syntax(config.language, input, &config.syntax_mapping) {
191+ let syntax_in_set =
175− Ok(syntax) => syntax,
192+ match assets.get_syntax(config.language, input, &config.syntax_mapping) {
176− Err(Error(ErrorKind::UndetectedSyntax(_), _)) => {
193+ Ok(syntax_in_set) => syntax_in_set,
177− assets.get_syntax_set()?.find_syntax_plain_text()
194+ Err(Error::UndetectedSyntax(_)) => assets
178− }
195+ .find_syntax_by_name("Plain Text")?
179− Err(e) => return Err(e),
196+ .expect("A plain text syntax is available"),
180− };
197+ Err(e) => return Err(e),
198+ };
181
199
182− Some(HighlightLines::new(syntax, theme))
200+ Some(HighlighterFromSet::new(syntax_in_set, theme))
183 };
201 };
184
202
185 Ok(InteractivePrinter {
203 Ok(InteractivePrinter {
@@ -188,11 +206,10 @@ impl<'a> InteractivePrinter<'a> {
188 config,
206 config,
189 decorations,
207 decorations,
190 content_type: input.reader.content_type,
208 content_type: input.reader.content_type,
191− ansi_prefix_sgr: String::new(),
209+ ansi_style: AnsiStyle::new(),
192 #[cfg(feature = "git")]
210 #[cfg(feature = "git")]
193 line_changes,
211 line_changes,
194− highlighter,
212+ highlighter_from_set,
195− syntax_set: assets.get_syntax_set()?,
196 background_color_highlight,
213 background_color_highlight,
197 })
214 })
198 }
215 }
@@ -220,29 +237,44 @@ impl<'a> InteractivePrinter<'a> {
220
237
221 fn create_fake_panel(&self, text: &str) -> String {
238 fn create_fake_panel(&self, text: &str) -> String {
222 if self.panel_width == 0 {
239 if self.panel_width == 0 {
223− "".to_string()
240+ return "".to_string();
241+ }
242+
243+ let text_truncated: String = text.chars().take(self.panel_width - 1).collect();
244+ let text_filled: String = format!(
245+ "{}{}",
246+ text_truncated,
247+ " ".repeat(self.panel_width - 1 - text_truncated.len())
248+ );
249+ if self.config.style_components.grid() {
250+ format!("{} │ ", text_filled)
224 } else {
251 } else {
225− let text_truncated: String = text.chars().take(self.panel_width - 1).collect();
252+ text_filled
226− let text_filled: String = format!(
253+ }
254+ }
255+
256+ fn print_header_component_indent(&mut self, handle: &mut dyn Write) -> std::io::Result<()> {
257+ if self.config.style_components.grid() {
258+ write!(
259+ handle,
227 "{}{}",
260 "{}{}",
228− text_truncated,
261+ " ".repeat(self.panel_width),
229− " ".repeat(self.panel_width - 1 - text_truncated.len())
262+ self.colors
230− );
263+ .grid
231− if self.config.style_components.grid() {
264+ .paint(if self.panel_width > 0 { "│ " } else { "" }),
232− format!("{} │ ", text_filled)
265+ )
233− } else {
266+ } else {
234− text_filled
267+ write!(handle, "{}", " ".repeat(self.panel_width))
235− }
236 }
268 }
237 }
269 }
238
270
239 fn preprocess(&self, text: &str, cursor: &mut usize) -> String {
271 fn preprocess(&self, text: &str, cursor: &mut usize) -> String {
240 if self.config.tab_width > 0 {
272 if self.config.tab_width > 0 {
241− expand_tabs(text, self.config.tab_width, cursor)
273+ return expand_tabs(text, self.config.tab_width, cursor);
242− } else {
243− *cursor += text.len();
244− text.to_string()
245 }
274 }
275+
276+ *cursor += text.len();
277+ text.to_string()
246 }
278 }
247}
279}
248
280
@@ -273,25 +305,6 @@ impl<'a> Printer for InteractivePrinter<'a> {
273 return Ok(());
305 return Ok(());
274 }
306 }
275
307
276− if self.config.style_components.grid() {
277− self.print_horizontal_line(handle, '┬')?;
278−
279− write!(
280− handle,
281− "{}{}",
282− " ".repeat(self.panel_width),
283− self.colors
284− .grid
285− .paint(if self.panel_width > 0 { "│ " } else { "" }),
286− )?;
287− } else {
288− // Only pad space between files, if we haven't already drawn a horizontal rule
289− if add_header_padding && !self.config.style_components.rule() {
290− writeln!(handle)?;
291− }
292− write!(handle, "{}", " ".repeat(self.panel_width))?;
293− }
294−
295 let mode = match self.content_type {
308 let mode = match self.content_type {
296 Some(ContentType::BINARY) => " <BINARY>",
309 Some(ContentType::BINARY) => " <BINARY>",
297 Some(ContentType::UTF_16LE) => " <UTF-16LE>",
310 Some(ContentType::UTF_16LE) => " <UTF-16LE>",
@@ -301,17 +314,60 @@ impl<'a> Printer for InteractivePrinter<'a> {
301 };
314 };
302
315
303 let description = &input.description;
316 let description = &input.description;
317+ let metadata = &input.metadata;
318+
319+ // We use this iterator to have a deterministic order for
320+ // header components. HashSet has arbitrary order, but Vec is ordered.
321+ let header_components: Vec<StyleComponent> = [
322+ (
323+ StyleComponent::HeaderFilename,
324+ self.config.style_components.header_filename(),
325+ ),
326+ (
327+ StyleComponent::HeaderFilesize,
328+ self.config.style_components.header_filesize(),
329+ ),
330+ ]
331+ .iter()
332+ .filter(|(_, is_enabled)| *is_enabled)
333+ .map(|(component, _)| *component)
334+ .collect();
335+
336+ // Print the cornering grid before the first header component
337+ if self.config.style_components.grid() {
338+ self.print_horizontal_line(handle, '┬')?;
339+ } else {
340+ // Only pad space between files, if we haven't already drawn a horizontal rule
341+ if add_header_padding && !self.config.style_components.rule() {
342+ writeln!(handle)?;
343+ }
344+ }
304
345
305− writeln!(
346+ header_components.iter().try_for_each(|component| {
306− handle,
347+ self.print_header_component_indent(handle)?;
307− "{}{}{}",
348+
308− description
349+ match component {
309− .kind()
350+ StyleComponent::HeaderFilename => writeln!(
310− .map(|kind| format!("{}: ", kind))
351+ handle,
311− .unwrap_or_else(|| "".into()),
352+ "{}{}{}",
312− self.colors.filename.paint(description.title()),
353+ description
313− mode
354+ .kind()
314− )?;
355+ .map(|kind| format!("{}: ", kind))
356+ .unwrap_or_else(|| "".into()),
357+ self.colors.header_value.paint(description.title()),
358+ mode
359+ ),
360+
361+ StyleComponent::HeaderFilesize => {
362+ let bsize = metadata
363+ .size
364+ .map(|s| format!("{}", ByteSize(s)))
365+ .unwrap_or_else(|| "-".into());
366+ writeln!(handle, "Size: {}", self.colors.header_value.paint(bsize))
367+ }
368+ _ => Ok(()),
369+ }
370+ })?;
315
371
316 if self.config.style_components.grid() {
372 if self.config.style_components.grid() {
317 if self.content_type.map_or(false, |c| c.is_text()) || self.config.show_nonprintable {
373 if self.content_type.map_or(false, |c| c.is_text()) || self.config.show_nonprintable {
@@ -366,30 +422,44 @@ impl<'a> Printer for InteractivePrinter<'a> {
366 line_buffer: &[u8],
422 line_buffer: &[u8],
367 ) -> Result<()> {
423 ) -> Result<()> {
368 let line = if self.config.show_nonprintable {
424 let line = if self.config.show_nonprintable {
369− replace_nonprintable(&line_buffer, self.config.tab_width)
425+ replace_nonprintable(line_buffer, self.config.tab_width)
370 } else {
426 } else {
371 match self.content_type {
427 match self.content_type {
372 Some(ContentType::BINARY) | None => {
428 Some(ContentType::BINARY) | None => {
373 return Ok(());
429 return Ok(());
374 }
430 }
375 Some(ContentType::UTF_16LE) => UTF_16LE
431 Some(ContentType::UTF_16LE) => UTF_16LE
376− .decode(&line_buffer, DecoderTrap::Replace)
432+ .decode(line_buffer, DecoderTrap::Replace)
377 .map_err(|_| "Invalid UTF-16LE")?,
433 .map_err(|_| "Invalid UTF-16LE")?,
378 Some(ContentType::UTF_16BE) => UTF_16BE
434 Some(ContentType::UTF_16BE) => UTF_16BE
379− .decode(&line_buffer, DecoderTrap::Replace)
435+ .decode(line_buffer, DecoderTrap::Replace)
380 .map_err(|_| "Invalid UTF-16BE")?,
436 .map_err(|_| "Invalid UTF-16BE")?,
381− _ => String::from_utf8_lossy(&line_buffer).to_string(),
437+ _ => String::from_utf8_lossy(line_buffer).to_string(),
382 }
438 }
383 };
439 };
384
440
385 let regions = {
441 let regions = {
386− let highlighter = match self.highlighter {
442+ let highlighter_from_set = match self.highlighter_from_set {
387− Some(ref mut highlighter) => highlighter,
443+ Some(ref mut highlighter_from_set) => highlighter_from_set,
388 _ => {
444 _ => {
389 return Ok(());
445 return Ok(());
390 }
446 }
391 };
447 };
392− highlighter.highlight(line.as_ref(), self.syntax_set)
448+
449+ // skip syntax highlighting on long lines
450+ let too_long = line.len() > 1024 * 16;
451+
452+ let for_highlighting: &str = if too_long { "\n" } else { &line };
453+
454+ let mut highlighted_line = highlighter_from_set
455+ .highlighter
456+ .highlight_line(for_highlighting, highlighter_from_set.syntax_set)?;
457+
458+ if too_long {
459+ highlighted_line[0].1 = &line;
460+ }
461+
462+ highlighted_line
393 };
463 };
394
464
395 if out_of_range {
465 if out_of_range {
@@ -405,6 +475,10 @@ impl<'a> Printer for InteractivePrinter<'a> {
405 let highlight_this_line =
475 let highlight_this_line =
406 self.config.highlighted_lines.0.check(line_number) == RangeCheckResult::InRange;
476 self.config.highlighted_lines.0.check(line_number) == RangeCheckResult::InRange;
407
477
478+ if highlight_this_line && self.config.theme == "ansi" {
479+ self.ansi_style.update("^[4m");
480+ }
481+
408 let background_color = self
482 let background_color = self
409 .background_color_highlight
483 .background_color_highlight
410 .filter(|_| highlight_this_line);
484 .filter(|_| highlight_this_line);
@@ -414,8 +488,7 @@ impl<'a> Printer for InteractivePrinter<'a> {
414 let decorations = self
488 let decorations = self
415 .decorations
489 .decorations
416 .iter()
490 .iter()
417− .map(|ref d| d.generate(line_number, false, self))
491+ .map(|d| d.generate(line_number, false, self));
418− .collect::<Vec<_>>();
419
492
420 for deco in decorations {
493 for deco in decorations {
421 write!(handle, "{} ", deco.text)?;
494 write!(handle, "{} ", deco.text)?;
@@ -429,36 +502,52 @@ impl<'a> Printer for InteractivePrinter<'a> {
429 let colored_output = self.config.colored_output;
502 let colored_output = self.config.colored_output;
430 let italics = self.config.use_italic_text;
503 let italics = self.config.use_italic_text;
431
504
432− for &(style, region) in regions.iter() {
505+ for &(style, region) in &regions {
433− let text = &*self.preprocess(region, &mut cursor_total);
506+ let ansi_iterator = AnsiCodeIterator::new(region);
434− let text_trimmed = text.trim_end_matches(|c| c == '\r' || c == '\n');
507+ for chunk in ansi_iterator {
435− write!(
508+ match chunk {
436− handle,
509+ // ANSI escape passthrough.
437− "{}",
510+ (ansi, true) => {
438− as_terminal_escaped(
511+ self.ansi_style.update(ansi);
439− style,
512+ write!(handle, "{}", ansi)?;
440− text_trimmed,
513+ }
441− true_color,
514+
442− colored_output,
515+ // Regular text.
443− italics,
516+ (text, false) => {
444− background_color
517+ let text = &*self.preprocess(text, &mut cursor_total);
445− )
518+ let text_trimmed = text.trim_end_matches(|c| c == '\r' || c == '\n');
446− )?;
519+
520+ write!(
521+ handle,
522+ "{}",
523+ as_terminal_escaped(
524+ style,
525+ &format!("{}{}", self.ansi_style, text_trimmed),
526+ true_color,
527+ colored_output,
528+ italics,
529+ background_color
530+ )
531+ )?;
447
532
448− if text.len() != text_trimmed.len() {
533+ if text.len() != text_trimmed.len() {
449− if let Some(background_color) = background_color {
534+ if let Some(background_color) = background_color {
450− let ansi_style = Style {
535+ let ansi_style = Style {
451− background: to_ansi_color(background_color, true_color),
536+ background: to_ansi_color(background_color, true_color),
452− ..Default::default()
537+ ..Default::default()
453− };
538+ };
454− let width = if cursor_total <= cursor_max {
539+
455− cursor_max - cursor_total + 1
540+ let width = if cursor_total <= cursor_max {
456− } else {
541+ cursor_max - cursor_total + 1
457− 0
542+ } else {
458− };
543+ 0
459− write!(handle, "{}", ansi_style.paint(" ".repeat(width)))?;
544+ };
545+ write!(handle, "{}", ansi_style.paint(" ".repeat(width)))?;
546+ }
547+ write!(handle, "{}", &text[text_trimmed.len()..])?;
548+ }
549+ }
460 }
550 }
461− write!(handle, "{}", &text[text_trimmed.len()..])?;
462 }
551 }
463 }
552 }
464
553
@@ -466,33 +555,14 @@ impl<'a> Printer for InteractivePrinter<'a> {
466 writeln!(handle)?;
555 writeln!(handle)?;
467 }
556 }
468 } else {
557 } else {
469− for &(style, region) in regions.iter() {
558+ for &(style, region) in &regions {
470 let ansi_iterator = AnsiCodeIterator::new(region);
559 let ansi_iterator = AnsiCodeIterator::new(region);
471− let mut ansi_prefix: String = String::new();
472 for chunk in ansi_iterator {
560 for chunk in ansi_iterator {
473 match chunk {
561 match chunk {
474 // ANSI escape passthrough.
562 // ANSI escape passthrough.
475− (text, true) => {
563+ (ansi, true) => {
476− let is_ansi_csi = text.starts_with("\x1B[");
564+ self.ansi_style.update(ansi);
477−
565+ write!(handle, "{}", ansi)?;
478− if is_ansi_csi && text.ends_with('m') {
479− // It's an ANSI SGR sequence.
480− // We should be mostly safe to just append these together.
481− ansi_prefix.push_str(text);
482− if text == "\x1B[0m" {
483− self.ansi_prefix_sgr = "\x1B[0m".to_owned();
484− } else {
485− self.ansi_prefix_sgr.push_str(text);
486− }
487− } else if is_ansi_csi {
488− // It's a regular CSI sequence.
489− // We should be mostly safe to just append these together.
490− ansi_prefix.push_str(text);
491− } else {
492− // It's probably a VT100 code.
493− // Passing it through is the safest bet.
494− write!(handle, "{}", text)?;
495− }
496 }
566 }
497
567
498 // Regular text.
568 // Regular text.
@@ -525,7 +595,7 @@ impl<'a> Printer for InteractivePrinter<'a> {
525 "{} ",
595 "{} ",
526 self.decorations
596 self.decorations
527 .iter()
597 .iter()
528− .map(|ref d| d
598+ .map(|d| d
529 .generate(line_number, true, self)
599 .generate(line_number, true, self)
530 .text)
600 .text)
531 .collect::<Vec<String>>()
601 .collect::<Vec<String>>()
@@ -542,10 +612,7 @@ impl<'a> Printer for InteractivePrinter<'a> {
542 "{}\n{}",
612 "{}\n{}",
543 as_terminal_escaped(
613 as_terminal_escaped(
544 style,
614 style,
545− &*format!(
615+ &*format!("{}{}", self.ansi_style, line_buf),
546− "{}{}{}",
547− self.ansi_prefix_sgr, ansi_prefix, line_buf
548− ),
549 self.config.true_color,
616 self.config.true_color,
550 self.config.colored_output,
617 self.config.colored_output,
551 self.config.use_italic_text,
618 self.config.use_italic_text,
@@ -571,19 +638,13 @@ impl<'a> Printer for InteractivePrinter<'a> {
571 "{}",
638 "{}",
572 as_terminal_escaped(
639 as_terminal_escaped(
573 style,
640 style,
574− &*format!(
641+ &*format!("{}{}", self.ansi_style, line_buf),
575− "{}{}{}",
576− self.ansi_prefix_sgr, ansi_prefix, line_buf
577− ),
578 self.config.true_color,
642 self.config.true_color,
579 self.config.colored_output,
643 self.config.colored_output,
580 self.config.use_italic_text,
644 self.config.use_italic_text,
581 background_color
645 background_color
582 )
646 )
583 )?;
647 )?;
584−
585− // Clear the ANSI prefix buffer.
586− ansi_prefix.clear();
587 }
648 }
588 }
649 }
589 }
650 }
@@ -604,6 +665,11 @@ impl<'a> Printer for InteractivePrinter<'a> {
604 writeln!(handle)?;
665 writeln!(handle)?;
605 }
666 }
606
667
668+ if highlight_this_line && self.config.theme == "ansi" {
669+ self.ansi_style.update("^[24m");
670+ write!(handle, "\x1B[24m")?;
671+ }
672+
607 Ok(())
673 Ok(())
608 }
674 }
609}
675}
@@ -614,7 +680,7 @@ const DEFAULT_GUTTER_COLOR: u8 = 238;
614pub struct Colors {
680pub struct Colors {
615 pub grid: Style,
681 pub grid: Style,
616 pub rule: Style,
682 pub rule: Style,
617− pub filename: Style,
683+ pub header_value: Style,
618 pub git_added: Style,
684 pub git_added: Style,
619 pub git_removed: Style,
685 pub git_removed: Style,
620 pub git_modified: Style,
686 pub git_modified: Style,
@@ -643,7 +709,7 @@ impl Colors {
643 Colors {
709 Colors {
644 grid: gutter_style,
710 grid: gutter_style,
645 rule: gutter_style,
711 rule: gutter_style,
646− filename: Style::new().bold(),
712+ header_value: Style::new().bold(),
647 git_added: Green.normal(),
713 git_added: Green.normal(),
648 git_removed: Red.normal(),
714 git_removed: Red.normal(),
649 git_modified: Yellow.normal(),
715 git_modified: Yellow.normal(),
src/style.rs+30−4
@@ -3,6 +3,7 @@ use std::str::FromStr;
3
3
4use crate::error::*;
4use crate::error::*;
5
5
6+#[non_exhaustive]
6#[derive(Debug, Eq, PartialEq, Copy, Clone, Hash)]
7#[derive(Debug, Eq, PartialEq, Copy, Clone, Hash)]
7pub enum StyleComponent {
8pub enum StyleComponent {
8 Auto,
9 Auto,
@@ -11,9 +12,12 @@ pub enum StyleComponent {
11 Grid,
12 Grid,
12 Rule,
13 Rule,
13 Header,
14 Header,
15+ HeaderFilename,
16+ HeaderFilesize,
14 LineNumbers,
17 LineNumbers,
15 Snip,
18 Snip,
16 Full,
19 Full,
20+ Default,
17 Plain,
21 Plain,
18}
22}
19
23
@@ -22,7 +26,7 @@ impl StyleComponent {
22 match self {
26 match self {
23 StyleComponent::Auto => {
27 StyleComponent::Auto => {
24 if interactive_terminal {
28 if interactive_terminal {
25− StyleComponent::Full.components(interactive_terminal)
29+ StyleComponent::Default.components(interactive_terminal)
26 } else {
30 } else {
27 StyleComponent::Plain.components(interactive_terminal)
31 StyleComponent::Plain.components(interactive_terminal)
28 }
32 }
@@ -31,14 +35,25 @@ impl StyleComponent {
31 StyleComponent::Changes => &[StyleComponent::Changes],
35 StyleComponent::Changes => &[StyleComponent::Changes],
32 StyleComponent::Grid => &[StyleComponent::Grid],
36 StyleComponent::Grid => &[StyleComponent::Grid],
33 StyleComponent::Rule => &[StyleComponent::Rule],
37 StyleComponent::Rule => &[StyleComponent::Rule],
34− StyleComponent::Header => &[StyleComponent::Header],
38+ StyleComponent::Header => &[StyleComponent::HeaderFilename],
39+ StyleComponent::HeaderFilename => &[StyleComponent::HeaderFilename],
40+ StyleComponent::HeaderFilesize => &[StyleComponent::HeaderFilesize],
35 StyleComponent::LineNumbers => &[StyleComponent::LineNumbers],
41 StyleComponent::LineNumbers => &[StyleComponent::LineNumbers],
36 StyleComponent::Snip => &[StyleComponent::Snip],
42 StyleComponent::Snip => &[StyleComponent::Snip],
37 StyleComponent::Full => &[
43 StyleComponent::Full => &[
38 #[cfg(feature = "git")]
44 #[cfg(feature = "git")]
39 StyleComponent::Changes,
45 StyleComponent::Changes,
40 StyleComponent::Grid,
46 StyleComponent::Grid,
41− StyleComponent::Header,
47+ StyleComponent::HeaderFilename,
48+ StyleComponent::HeaderFilesize,
49+ StyleComponent::LineNumbers,
50+ StyleComponent::Snip,
51+ ],
52+ StyleComponent::Default => &[
53+ #[cfg(feature = "git")]
54+ StyleComponent::Changes,
55+ StyleComponent::Grid,
56+ StyleComponent::HeaderFilename,
42 StyleComponent::LineNumbers,
57 StyleComponent::LineNumbers,
43 StyleComponent::Snip,
58 StyleComponent::Snip,
44 ],
59 ],
@@ -58,9 +73,12 @@ impl FromStr for StyleComponent {
58 "grid" => Ok(StyleComponent::Grid),
73 "grid" => Ok(StyleComponent::Grid),
59 "rule" => Ok(StyleComponent::Rule),
74 "rule" => Ok(StyleComponent::Rule),
60 "header" => Ok(StyleComponent::Header),
75 "header" => Ok(StyleComponent::Header),
76+ "header-filename" => Ok(StyleComponent::HeaderFilename),
77+ "header-filesize" => Ok(StyleComponent::HeaderFilesize),
61 "numbers" => Ok(StyleComponent::LineNumbers),
78 "numbers" => Ok(StyleComponent::LineNumbers),
62 "snip" => Ok(StyleComponent::Snip),
79 "snip" => Ok(StyleComponent::Snip),
63 "full" => Ok(StyleComponent::Full),
80 "full" => Ok(StyleComponent::Full),
81+ "default" => Ok(StyleComponent::Default),
64 "plain" => Ok(StyleComponent::Plain),
82 "plain" => Ok(StyleComponent::Plain),
65 _ => Err(format!("Unknown style '{}'", s).into()),
83 _ => Err(format!("Unknown style '{}'", s).into()),
66 }
84 }
@@ -89,7 +107,15 @@ impl StyleComponents {
89 }
107 }
90
108
91 pub fn header(&self) -> bool {
109 pub fn header(&self) -> bool {
92− self.0.contains(&StyleComponent::Header)
110+ self.header_filename() || self.header_filesize()
111+ }
112+
113+ pub fn header_filename(&self) -> bool {
114+ self.0.contains(&StyleComponent::HeaderFilename)
115+ }
116+
117+ pub fn header_filesize(&self) -> bool {
118+ self.0.contains(&StyleComponent::HeaderFilesize)
93 }
119 }
94
120
95 pub fn numbers(&self) -> bool {
121 pub fn numbers(&self) -> bool {
src/syntax_dependencies.rsdeleted−184
@@ -1,184 +0,0 @@
1−use std::collections::HashMap;
2−use syntect::parsing::syntax_definition::{
3− ContextReference, MatchOperation, MatchPattern, Pattern, SyntaxDefinition,
4−};
5−use syntect::parsing::{Scope, SyntaxSet, SyntaxSetBuilder};
6−
7−type SyntaxName = String;
8−
9−/// Used to look up what dependencies a given [SyntaxDefinition] has
10−type SyntaxToDependencies = HashMap<SyntaxName, Vec<Dependency>>;
11−
12−/// Used to look up which [SyntaxDefinition] corresponds to a given [Dependency]
13−type DependencyToSyntax<'a> = HashMap<Dependency, &'a SyntaxDefinition>;
14−
15−/// Represents a dependency on an external `.sublime-syntax` file.
16−#[derive(Debug, Eq, PartialEq, Clone, Hash)]
17−enum Dependency {
18− /// By name. Example YAML: `include: C.sublime-syntax`
19− ByName(String),
20−
21− /// By scope. Example YAML: `embed: scope:source.c`
22− ByScope(Scope),
23−}
24−
25−/// Generates independent [SyntaxSet]s after analyzing dependencies between syntaxes
26−/// in a [SyntaxSetBuilder], and then prints the reults.
27−pub(crate) fn print_syntax_dependencies(syntax_set_builder: &SyntaxSetBuilder) {
28− println!("Constructing independent SyntaxSets...");
29− let independent_syntax_sets = build_independent_syntax_sets(syntax_set_builder);
30−
31− println!("Independent SyntaxSets:");
32− for syntax_set in independent_syntax_sets {
33− let names = syntax_set
34− .syntaxes()
35− .iter()
36− .map(|syntax| &syntax.name)
37− .collect::<Vec<_>>();
38− println!("{:?}", names);
39− }
40−}
41−
42−/// Analyzes dependencies between syntaxes in a [SyntaxSetBuilder].
43−/// From that, it builds independent [SyntaxSet]s.
44−fn build_independent_syntax_sets(
45− syntax_set_builder: &'_ SyntaxSetBuilder,
46−) -> impl Iterator<Item = SyntaxSet> + '_ {
47− let syntaxes = syntax_set_builder.syntaxes();
48−
49− // Build the data structures we need for dependency resolution
50− let (syntax_to_dependencies, dependency_to_syntax) = generate_maps(syntaxes);
51−
52− // Create one independent SyntaxSet from each (non-hidden) SyntaxDefinition
53− syntaxes.iter().filter_map(move |syntax| {
54− if syntax.hidden {
55− return None;
56− }
57−
58− let mut builder = SyntaxSetDependencyBuilder::new();
59− builder.add_with_dependencies(syntax, &syntax_to_dependencies, &dependency_to_syntax);
60− Some(builder.build())
61− })
62−}
63−
64−/// In order to analyze dependencies, we need two key pieces of data.
65−/// First, when we have a [Dependency], we need to know what [SyntaxDefinition] that
66−/// corresponds to. Second, when we have a [SyntaxDefinition], we need to know
67−/// what dependencies it has. This functions generates that data for each syntax.
68−fn generate_maps(syntaxes: &[SyntaxDefinition]) -> (SyntaxToDependencies, DependencyToSyntax) {
69− let mut syntax_to_dependencies = HashMap::new();
70− let mut dependency_to_syntax = HashMap::new();
71−
72− for syntax in syntaxes {
73− syntax_to_dependencies.insert(syntax.name.clone(), dependencies_for_syntax(syntax));
74−
75− dependency_to_syntax.insert(Dependency::ByName(syntax.name.clone()), syntax);
76− dependency_to_syntax.insert(Dependency::ByScope(syntax.scope), syntax);
77− }
78−
79− (syntax_to_dependencies, dependency_to_syntax)
80−}
81−
82−/// Gets what external dependencies a given [SyntaxDefinition] has.
83−/// An external dependency is another `.sublime-syntax` file.
84−/// It does that by looking for variants of the following YAML patterns:
85−/// - `include: C.sublime-syntax`
86−/// - `embed: scope:source.c`
87−fn dependencies_for_syntax(syntax: &SyntaxDefinition) -> Vec<Dependency> {
88− let mut dependencies: Vec<Dependency> = syntax
89− .contexts
90− .values()
91− .flat_map(|context| &context.patterns)
92− .flat_map(dependencies_from_pattern)
93− .collect();
94−
95− // No need to track a dependency more than once
96− dependencies.dedup();
97−
98− dependencies
99−}
100−
101−fn dependencies_from_pattern(pattern: &Pattern) -> Vec<Dependency> {
102− match *pattern {
103− Pattern::Match(MatchPattern {
104− operation: MatchOperation::Push(ref context_references),
105− ..
106− }) => context_references
107− .iter()
108− .map(dependency_from_context_reference)
109− .collect(),
110− Pattern::Include(ref context_reference) => {
111− vec![dependency_from_context_reference(context_reference)]
112− }
113− _ => vec![],
114− }
115− .into_iter()
116− .flatten()
117− .collect()
118−}
119−
120−fn dependency_from_context_reference(context_reference: &ContextReference) -> Option<Dependency> {
121− match &context_reference {
122− ContextReference::File { ref name, .. } => Some(Dependency::ByName(name.clone())),
123− ContextReference::ByScope { ref scope, .. } => Some(Dependency::ByScope(*scope)),
124− _ => None,
125− }
126−}
127−
128−/// Helper to construct a [SyntaxSetBuilder] that contains only [SyntaxDefinition]s
129−/// that have dependencies among them.
130−struct SyntaxSetDependencyBuilder {
131− syntax_set_builder: SyntaxSetBuilder,
132−}
133−
134−impl SyntaxSetDependencyBuilder {
135− fn new() -> Self {
136− SyntaxSetDependencyBuilder {
137− syntax_set_builder: SyntaxSetBuilder::new(),
138− }
139− }
140−
141− /// Add a [SyntaxDefinition] to the underlying [SyntaxSetBuilder].
142− /// Also resolve any dependencies it has and add those [SyntaxDefinition]s too.
143− /// This is a recursive process.
144− fn add_with_dependencies(
145− &mut self,
146− syntax: &SyntaxDefinition,
147− syntax_to_dependencies: &SyntaxToDependencies,
148− dependency_to_syntax: &DependencyToSyntax,
149− ) {
150− let name = &syntax.name;
151− if self.is_syntax_already_added(name) {
152− return;
153− }
154−
155− self.syntax_set_builder.add(syntax.clone());
156−
157− let dependencies = syntax_to_dependencies.get(name);
158− if dependencies.is_none() {
159− eprintln!("ERROR: Unknown dependencies for {}", name);
160− return;
161− }
162−
163− for dependency in dependencies.unwrap() {
164− if let Some(syntax_definition_dependency) = dependency_to_syntax.get(dependency) {
165− self.add_with_dependencies(
166− syntax_definition_dependency,
167− syntax_to_dependencies,
168− dependency_to_syntax,
169− )
170− }
171− }
172− }
173−
174− fn is_syntax_already_added(&self, name: &str) -> bool {
175− self.syntax_set_builder
176− .syntaxes()
177− .iter()
178− .any(|syntax| syntax.name == name)
179− }
180−
181− fn build(self) -> SyntaxSet {
182− self.syntax_set_builder.build()
183− }
184−}
src/syntax_mapping.rs+50−13
@@ -1,18 +1,36 @@
1use std::path::Path;
1use std::path::Path;
2
2
3use crate::error::Result;
3use crate::error::Result;
4+use ignored_suffixes::IgnoredSuffixes;
4
5
5use globset::{Candidate, GlobBuilder, GlobMatcher};
6use globset::{Candidate, GlobBuilder, GlobMatcher};
6
7
8+pub mod ignored_suffixes;
9+
7#[derive(Debug, Clone, Copy, PartialEq)]
10#[derive(Debug, Clone, Copy, PartialEq)]
11+#[non_exhaustive]
8pub enum MappingTarget<'a> {
12pub enum MappingTarget<'a> {
13+ /// For mapping a path to a specific syntax.
9 MapTo(&'a str),
14 MapTo(&'a str),
15+
16+ /// For mapping a path (typically an extension-less file name) to an unknown
17+ /// syntax. This typically means later using the contents of the first line
18+ /// of the file to determine what syntax to use.
10 MapToUnknown,
19 MapToUnknown,
20+
21+ /// For mapping a file extension (e.g. `*.conf`) to an unknown syntax. This
22+ /// typically means later using the contents of the first line of the file
23+ /// to determine what syntax to use. However, if a syntax handles a file
24+ /// name that happens to have the given file extension (e.g. `resolv.conf`),
25+ /// then that association will have higher precedence, and the mapping will
26+ /// be ignored.
27+ MapExtensionToUnknown,
11}
28}
12
29
13#[derive(Debug, Clone, Default)]
30#[derive(Debug, Clone, Default)]
14pub struct SyntaxMapping<'a> {
31pub struct SyntaxMapping<'a> {
15 mappings: Vec<(GlobMatcher, MappingTarget<'a>)>,
32 mappings: Vec<(GlobMatcher, MappingTarget<'a>)>,
33+ pub(crate) ignored_suffixes: IgnoredSuffixes<'a>,
16}
34}
17
35
18impl<'a> SyntaxMapping<'a> {
36impl<'a> SyntaxMapping<'a> {
@@ -23,6 +41,9 @@ impl<'a> SyntaxMapping<'a> {
23 pub fn builtin() -> SyntaxMapping<'a> {
41 pub fn builtin() -> SyntaxMapping<'a> {
24 let mut mapping = Self::empty();
42 let mut mapping = Self::empty();
25 mapping.insert("*.h", MappingTarget::MapTo("C++")).unwrap();
43 mapping.insert("*.h", MappingTarget::MapTo("C++")).unwrap();
44+ mapping
45+ .insert(".clang-format", MappingTarget::MapTo("YAML"))
46+ .unwrap();
26 mapping.insert("*.fs", MappingTarget::MapTo("F#")).unwrap();
47 mapping.insert("*.fs", MappingTarget::MapTo("F#")).unwrap();
27 mapping
48 mapping
28 .insert("build", MappingTarget::MapToUnknown)
49 .insert("build", MappingTarget::MapToUnknown)
@@ -54,12 +75,7 @@ impl<'a> SyntaxMapping<'a> {
54 // Nginx and Apache syntax files both want to style all ".conf" files
75 // Nginx and Apache syntax files both want to style all ".conf" files
55 // see #1131 and #1137
76 // see #1131 and #1137
56 mapping
77 mapping
57− .insert("*.conf", MappingTarget::MapToUnknown)
78+ .insert("*.conf", MappingTarget::MapExtensionToUnknown)
58− .unwrap();
59−
60− // Re-insert a mapping for resolv.conf, see #1510
61− mapping
62− .insert("resolv.conf", MappingTarget::MapTo("resolv"))
63 .unwrap();
79 .unwrap();
64
80
65 for glob in &[
81 for glob in &[
@@ -81,7 +97,7 @@ impl<'a> SyntaxMapping<'a> {
81 .unwrap();
97 .unwrap();
82 }
98 }
83
99
84− for glob in [
100+ for glob in &[
85 "**/systemd/**/*.conf",
101 "**/systemd/**/*.conf",
86 "**/systemd/**/*.example",
102 "**/systemd/**/*.example",
87 "*.automount",
103 "*.automount",
@@ -100,19 +116,36 @@ impl<'a> SyntaxMapping<'a> {
100 "*.swap",
116 "*.swap",
101 "*.target",
117 "*.target",
102 "*.timer",
118 "*.timer",
103− ]
119+ ] {
104− .iter()
105− {
106 mapping.insert(glob, MappingTarget::MapTo("INI")).unwrap();
120 mapping.insert(glob, MappingTarget::MapTo("INI")).unwrap();
107 }
121 }
108
122
123+ // unix mail spool
124+ for glob in &["/var/spool/mail/*", "/var/mail/*"] {
125+ mapping.insert(glob, MappingTarget::MapTo("Email")).unwrap()
126+ }
127+
109 // pacman hooks
128 // pacman hooks
110 mapping
129 mapping
111 .insert("*.hook", MappingTarget::MapTo("INI"))
130 .insert("*.hook", MappingTarget::MapTo("INI"))
112 .unwrap();
131 .unwrap();
113
132
114− if let Some(xdg_config_home) = std::env::var_os("XDG_CONFIG_HOME") {
133+ // Global git config files rooted in `$XDG_CONFIG_HOME/git/` or `$HOME/.config/git/`
115− let git_config_path = Path::new(&xdg_config_home).join("git");
134+ // See e.g. https://git-scm.com/docs/git-config#FILES
135+ if let Some(xdg_config_home) =
136+ std::env::var_os("XDG_CONFIG_HOME").filter(|val| !val.is_empty())
137+ {
138+ insert_git_config_global(&mut mapping, &xdg_config_home);
139+ }
140+ if let Some(default_config_home) = std::env::var_os("HOME")
141+ .filter(|val| !val.is_empty())
142+ .map(|home| Path::new(&home).join(".config"))
143+ {
144+ insert_git_config_global(&mut mapping, &default_config_home);
145+ }
146+
147+ fn insert_git_config_global(mapping: &mut SyntaxMapping, config_home: impl AsRef<Path>) {
148+ let git_config_path = config_home.as_ref().join("git");
116
149
117 mapping
150 mapping
118 .insert(
151 .insert(
@@ -153,7 +186,7 @@ impl<'a> SyntaxMapping<'a> {
153 }
186 }
154
187
155 pub(crate) fn get_syntax_for(&self, path: impl AsRef<Path>) -> Option<MappingTarget<'a>> {
188 pub(crate) fn get_syntax_for(&self, path: impl AsRef<Path>) -> Option<MappingTarget<'a>> {
156− let candidate = Candidate::new(path.as_ref());
189+ let candidate = Candidate::new(&path);
157 let candidate_filename = path.as_ref().file_name().map(Candidate::new);
190 let candidate_filename = path.as_ref().file_name().map(Candidate::new);
158 for (ref glob, ref syntax) in self.mappings.iter().rev() {
191 for (ref glob, ref syntax) in self.mappings.iter().rev() {
159 if glob.is_match_candidate(&candidate)
192 if glob.is_match_candidate(&candidate)
@@ -166,6 +199,10 @@ impl<'a> SyntaxMapping<'a> {
166 }
199 }
167 None
200 None
168 }
201 }
202+
203+ pub fn insert_ignored_suffix(&mut self, suffix: &'a str) {
204+ self.ignored_suffixes.add_suffix(suffix);
205+ }
169}
206}
170
207
171#[test]
208#[test]
src/syntax_mapping/ignored_suffixes.rsnew file+107
@@ -0,0 +1,107 @@
1+use std::ffi::OsStr;
2+use std::fmt::Debug;
3+use std::path::Path;
4+
5+use crate::error::*;
6+
7+#[derive(Debug, Clone)]
8+pub struct IgnoredSuffixes<'a> {
9+ values: Vec<&'a str>,
10+}
11+
12+impl Default for IgnoredSuffixes<'_> {
13+ fn default() -> Self {
14+ Self {
15+ values: vec![
16+ // Editor etc backups
17+ "~",
18+ ".bak",
19+ ".old",
20+ ".orig",
21+ // Debian and derivatives apt/dpkg/ucf backups
22+ ".dpkg-dist",
23+ ".dpkg-old",
24+ ".ucf-dist",
25+ ".ucf-new",
26+ ".ucf-old",
27+ // Red Hat and derivatives rpm backups
28+ ".rpmnew",
29+ ".rpmorig",
30+ ".rpmsave",
31+ // Build system input/template files
32+ ".in",
33+ ],
34+ }
35+ }
36+}
37+
38+impl<'a> IgnoredSuffixes<'a> {
39+ pub fn add_suffix(&mut self, suffix: &'a str) {
40+ self.values.push(suffix)
41+ }
42+
43+ pub fn strip_suffix(&self, file_name: &'a str) -> Option<&'a str> {
44+ for suffix in self.values.iter() {
45+ if let Some(stripped_file_name) = file_name.strip_suffix(suffix) {
46+ return Some(stripped_file_name);
47+ }
48+ }
49+ None
50+ }
51+
52+ /// If we find an ignored suffix on the file name, e.g. '~', we strip it and
53+ /// then try again without it.
54+ pub fn try_with_stripped_suffix<T, F>(&self, file_name: &'a OsStr, func: F) -> Result<Option<T>>
55+ where
56+ F: Fn(&'a OsStr) -> Result<Option<T>>,
57+ {
58+ if let Some(file_str) = Path::new(file_name).to_str() {
59+ if let Some(stripped_file_name) = self.strip_suffix(file_str) {
60+ return func(OsStr::new(stripped_file_name));
61+ }
62+ }
63+ Ok(None)
64+ }
65+}
66+
67+#[test]
68+fn internal_suffixes() {
69+ let ignored_suffixes = IgnoredSuffixes::default();
70+
71+ let file_names = ignored_suffixes
72+ .values
73+ .iter()
74+ .map(|suffix| format!("test.json{}", suffix));
75+ for file_name_str in file_names {
76+ let file_name = OsStr::new(&file_name_str);
77+ let expected_stripped_file_name = OsStr::new("test.json");
78+ let stripped_file_name = ignored_suffixes
79+ .try_with_stripped_suffix(file_name, |stripped_file_name| Ok(Some(stripped_file_name)));
80+ assert_eq!(
81+ expected_stripped_file_name,
82+ stripped_file_name.unwrap().unwrap()
83+ );
84+ }
85+}
86+
87+#[test]
88+fn external_suffixes() {
89+ let mut ignored_suffixes = IgnoredSuffixes::default();
90+ ignored_suffixes.add_suffix(".development");
91+ ignored_suffixes.add_suffix(".production");
92+
93+ let file_names = ignored_suffixes
94+ .values
95+ .iter()
96+ .map(|suffix| format!("test.json{}", suffix));
97+ for file_name_str in file_names {
98+ let file_name = OsStr::new(&file_name_str);
99+ let expected_stripped_file_name = OsStr::new("test.json");
100+ let stripped_file_name = ignored_suffixes
101+ .try_with_stripped_suffix(file_name, |stripped_file_name| Ok(Some(stripped_file_name)));
102+ assert_eq!(
103+ expected_stripped_file_name,
104+ stripped_file_name.unwrap().unwrap()
105+ );
106+ }
107+}
src/vscreen.rsnew file+212
@@ -0,0 +1,212 @@
1+use std::fmt::{Display, Formatter};
2+
3+// Wrapper to avoid unnecessary branching when input doesn't have ANSI escape sequences.
4+pub struct AnsiStyle {
5+ attributes: Option<Attributes>,
6+}
7+
8+impl AnsiStyle {
9+ pub fn new() -> Self {
10+ AnsiStyle { attributes: None }
11+ }
12+
13+ pub fn update(&mut self, sequence: &str) -> bool {
14+ match &mut self.attributes {
15+ Some(a) => a.update(sequence),
16+ None => {
17+ self.attributes = Some(Attributes::new());
18+ self.attributes.as_mut().unwrap().update(sequence)
19+ }
20+ }
21+ }
22+}
23+
24+impl Display for AnsiStyle {
25+ fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
26+ match self.attributes {
27+ Some(ref a) => a.fmt(f),
28+ None => Ok(()),
29+ }
30+ }
31+}
32+
33+struct Attributes {
34+ foreground: String,
35+ background: String,
36+ underlined: String,
37+
38+ /// The character set to use.
39+ /// REGEX: `\^[()][AB0-3]`
40+ charset: String,
41+
42+ /// A buffer for unknown sequences.
43+ unknown_buffer: String,
44+
45+ /// ON: ^[1m
46+ /// OFF: ^[22m
47+ bold: String,
48+
49+ /// ON: ^[2m
50+ /// OFF: ^[22m
51+ dim: String,
52+
53+ /// ON: ^[4m
54+ /// OFF: ^[24m
55+ underline: String,
56+
57+ /// ON: ^[3m
58+ /// OFF: ^[23m
59+ italic: String,
60+
61+ /// ON: ^[9m
62+ /// OFF: ^[29m
63+ strike: String,
64+}
65+
66+impl Attributes {
67+ pub fn new() -> Self {
68+ Attributes {
69+ foreground: "".to_owned(),
70+ background: "".to_owned(),
71+ underlined: "".to_owned(),
72+ charset: "".to_owned(),
73+ unknown_buffer: "".to_owned(),
74+ bold: "".to_owned(),
75+ dim: "".to_owned(),
76+ underline: "".to_owned(),
77+ italic: "".to_owned(),
78+ strike: "".to_owned(),
79+ }
80+ }
81+
82+ /// Update the attributes with an escape sequence.
83+ /// Returns `false` if the sequence is unsupported.
84+ pub fn update(&mut self, sequence: &str) -> bool {
85+ let mut chars = sequence.char_indices().skip(1);
86+
87+ if let Some((_, t)) = chars.next() {
88+ match t {
89+ '(' => self.update_with_charset('(', chars.map(|(_, c)| c)),
90+ ')' => self.update_with_charset(')', chars.map(|(_, c)| c)),
91+ '[' => {
92+ if let Some((i, last)) = chars.last() {
93+ // SAFETY: Always starts with ^[ and ends with m.
94+ self.update_with_csi(last, &sequence[2..i])
95+ } else {
96+ false
97+ }
98+ }
99+ _ => self.update_with_unsupported(sequence),
100+ }
101+ } else {
102+ false
103+ }
104+ }
105+
106+ fn sgr_reset(&mut self) {
107+ self.foreground.clear();
108+ self.background.clear();
109+ self.underlined.clear();
110+ self.bold.clear();
111+ self.dim.clear();
112+ self.underline.clear();
113+ self.italic.clear();
114+ self.strike.clear();
115+ }
116+
117+ fn update_with_sgr(&mut self, parameters: &str) -> bool {
118+ let mut iter = parameters
119+ .split(';')
120+ .map(|p| if p.is_empty() { "0" } else { p })
121+ .map(|p| p.parse::<u16>())
122+ .map(|p| p.unwrap_or(0)); // Treat errors as 0.
123+
124+ while let Some(p) = iter.next() {
125+ match p {
126+ 0 => self.sgr_reset(),
127+ 1 => self.bold = format!("\x1B[{}m", parameters),
128+ 2 => self.dim = format!("\x1B[{}m", parameters),
129+ 3 => self.italic = format!("\x1B[{}m", parameters),
130+ 4 => self.underline = format!("\x1B[{}m", parameters),
131+ 23 => self.italic.clear(),
132+ 24 => self.underline.clear(),
133+ 22 => {
134+ self.bold.clear();
135+ self.dim.clear();
136+ }
137+ 30..=39 => self.foreground = Self::parse_color(p, &mut iter),
138+ 40..=49 => self.background = Self::parse_color(p, &mut iter),
139+ 58..=59 => self.underlined = Self::parse_color(p, &mut iter),
140+ 90..=97 => self.foreground = Self::parse_color(p, &mut iter),
141+ 100..=107 => self.foreground = Self::parse_color(p, &mut iter),
142+ _ => {
143+ // Unsupported SGR sequence.
144+ // Be compatible and pretend one just wasn't was provided.
145+ }
146+ }
147+ }
148+
149+ true
150+ }
151+
152+ fn update_with_csi(&mut self, finalizer: char, sequence: &str) -> bool {
153+ if finalizer == 'm' {
154+ self.update_with_sgr(sequence)
155+ } else {
156+ false
157+ }
158+ }
159+
160+ fn update_with_unsupported(&mut self, sequence: &str) -> bool {
161+ self.unknown_buffer.push_str(sequence);
162+ false
163+ }
164+
165+ fn update_with_charset(&mut self, kind: char, set: impl Iterator<Item = char>) -> bool {
166+ self.charset = format!("\x1B{}{}", kind, set.take(1).collect::<String>());
167+ true
168+ }
169+
170+ fn parse_color(color: u16, parameters: &mut dyn Iterator<Item = u16>) -> String {
171+ match color % 10 {
172+ 8 => match parameters.next() {
173+ Some(5) /* 256-color */ => format!("\x1B[{};5;{}m", color, join(";", 1, parameters)),
174+ Some(2) /* 24-bit color */ => format!("\x1B[{};2;{}m", color, join(";", 3, parameters)),
175+ Some(c) => format!("\x1B[{};{}m", color, c),
176+ _ => "".to_owned(),
177+ },
178+ 9 => "".to_owned(),
179+ _ => format!("\x1B[{}m", color),
180+ }
181+ }
182+}
183+
184+impl Display for Attributes {
185+ fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
186+ write!(
187+ f,
188+ "{}{}{}{}{}{}{}{}{}",
189+ self.foreground,
190+ self.background,
191+ self.underlined,
192+ self.charset,
193+ self.bold,
194+ self.dim,
195+ self.underline,
196+ self.italic,
197+ self.strike,
198+ )
199+ }
200+}
201+
202+fn join(
203+ delimiter: &str,
204+ limit: usize,
205+ iterator: &mut dyn Iterator<Item = impl ToString>,
206+) -> String {
207+ iterator
208+ .take(limit)
209+ .map(|i| i.to_string())
210+ .collect::<Vec<String>>()
211+ .join(delimiter)
212+}
tests/benchmarks/.gitignorenew file+1
@@ -0,0 +1 @@
1+/benchmark-results
tests/benchmarks/comparison.shdeleted−33
@@ -1,33 +0,0 @@
1−#!/usr/bin/env bash
2−
3−cd "$(dirname "${BASH_SOURCE[0]}")" || exit
4−
5−if ! command -v hyperfine > /dev/null 2>&1; then
6− echo "'hyperfine' does not seem to be installed."
7− echo "You can get it here: https://github.com/sharkdp/hyperfine"
8− exit 1
9−fi
10−
11−SRC="test-src/jquery-3.3.1.js"
12−
13−
14−cmd_bat="bat --style=full --color=always --paging=never '$SRC'"
15−cmd_bat_simple="bat --plain --wrap=never --tabs=0 --color=always --paging=never '$SRC'"
16−cmd_pygmentize="pygmentize -g '$SRC'"
17−cmd_highlight="highlight -O truecolor '$SRC'"
18−cmd_ccat="ccat --color=always '$SRC'"
19−cmd_source_highlight="source-highlight --failsafe --infer-lang -f esc -i '$SRC'"
20−cmd_hicat="hicat '$SRC'"
21−cmd_coderay="coderay '$SRC'"
22−cmd_rouge="rougify '$SRC'"
23−
24−hyperfine --warmup 3 \
25− "$cmd_bat" \
26− "$cmd_bat_simple" \
27− "$cmd_pygmentize" \
28− "$cmd_highlight" \
29− "$cmd_ccat" \
30− "$cmd_source_highlight" \
31− "$cmd_hicat" \
32− "$cmd_coderay" \
33− "$cmd_rouge" \
tests/benchmarks/highlighting-speed-src/grep-output-ansi-sequences.txtnew file+2272
@@ -0,0 +1,2272 @@
1+.github/ISSUE_TEMPLATE/syntax_request.md:3:about: Request adding a new syntax to bat.
2+.github/ISSUE_TEMPLATE/syntax_request.md:14:Bat supports locally-installed language definitions. See the link below:
3+.github/ISSUE_TEMPLATE/syntax_request.md:16:https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions
4+.github/ISSUE_TEMPLATE/question.md:3:about: Ask a question about 'bat'.
5+.github/ISSUE_TEMPLATE/bug_report.md:21:**How did you install `bat`?**
6+.github/ISSUE_TEMPLATE/bug_report.md:27:**bat version and environment**
7+.github/ISSUE_TEMPLATE/bug_report.md:31:in which you're running bat. To do this, run the full `bat` command that demonstrates
8+.github/ISSUE_TEMPLATE/bug_report.md:34: bat [other options and arguments…] --diagnostic
9+.github/ISSUE_TEMPLATE/bug_report.md:40:If you are running bat 0.17.1 or older (where --diagnostic is not available), please
10+.github/ISSUE_TEMPLATE/bug_report.md:43: https://github.com/sharkdp/bat/blob/master/diagnostics/info.sh
11+.github/ISSUE_TEMPLATE/bug_report.md:46:are on Windows, please let us know your bat version and your Windows version.
12+.github/workflows/CICD.yml:69: - name: Build and install bat
13+.github/workflows/CICD.yml:76: - name: Build and install bat with updated assets
14+.github/workflows/CICD.yml:94: run: bat --list-languages
15+.github/workflows/CICD.yml:96: run: bat --list-themes
16+.github/workflows/CICD.yml:235: - name: Run bat
17+.github/workflows/CICD.yml:242: - name: Show diagnostics (bat --diagnostic)
18+.github/workflows/CICD.yml:302: cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/manual/bat.1 "$ARCHIVE_DIR"
19+.github/workflows/CICD.yml:308: cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.bash "$ARCHIVE_DIR/autocomplete/${{ env.PROJECT_NAME }}.bash"
20+.github/workflows/CICD.yml:309: cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.fish "$ARCHIVE_DIR/autocomplete/${{ env.PROJECT_NAME }}.fish"
21+.github/workflows/CICD.yml:310: cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/_bat.ps1 "$ARCHIVE_DIR/autocomplete/_${{ env.PROJECT_NAME }}.ps1"
22+.github/workflows/CICD.yml:311: cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.zsh "$ARCHIVE_DIR/autocomplete/${{ env.PROJECT_NAME }}.zsh"
23+.github/workflows/CICD.yml:355: install -Dm644 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/manual/bat.1 "${DPKG_DIR}/usr/share/man/man1/${{ env.PROJECT_NAME }}.1"
24+.github/workflows/CICD.yml:359: install -Dm644 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.bash "${DPKG_DIR}/usr/share/bash-completion/completions/${{ env.PROJECT_NAME }}"
25+.github/workflows/CICD.yml:360: install -Dm644 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.fish "${DPKG_DIR}/usr/share/fish/vendor_completions.d/${{ env.PROJECT_NAME }}.fish"
26+.github/workflows/CICD.yml:361: install -Dm644 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.zsh "${DPKG_DIR}/usr/share/zsh/vendor-completions/_${{ env.PROJECT_NAME }}"
27+README.md:2: <img src="doc/logo-header.svg" alt="bat - a cat clone with wings"><br>
28+README.md:3: <a href="https://github.com/sharkdp/bat/actions?query=workflow%3ACICD"><img src="https://github.com/sharkdp/bat/workflows/CICD/badge.svg" alt="Build Status"></a>
29+README.md:4: <img src="https://img.shields.io/crates/l/bat.svg" alt="license">
30+README.md:5: <a href="https://crates.io/crates/bat"><img src="https://img.shields.io/crates/v/bat.svg?colorB=319e8c" alt="Version info"></a><br>
31+README.md:16: [<a href="https://github.com/chinanf-boy/bat-zh">中文</a>]
32+README.md:24:`bat` supports syntax highlighting for a large number of programming and markup
33+README.md:31:`bat` communicates with `git` to show modifications with respect to the index
34+README.md:45:By default, `bat` pipes its own output to a pager (e.g. `less`) if the output is too large for one screen.
35+README.md:46:If you would rather `bat` work like `cat` all the time (never page output), you can set `--paging=never` as an option, either on the command line or in your configuration file.
36+README.md:47:If you intend to alias `cat` to `bat` in your shell configuration, you can use `alias cat='bat --paging=never'` to preserve the default behavior.
37+README.md:51:Even with a pager set, you can still use `bat` to concatenate files :wink:.
38+README.md:52:Whenever `bat` detects a non-interactive terminal (i.e. when you pipe into another process or into a file), `bat` will act as a drop-in replacement for `cat` and fall back to printing the plain file contents, regardless of the `--pager` option's value.
39+README.md:59:> bat README.md
40+README.md:65:> bat src/*.rs
41+README.md:73:> curl -s https://sh.rustup.rs | bat
42+README.md:79:> yaml2json .travis.yml | json_pp | bat -l json
43+README.md:84:> bat -A /etc/hosts
44+README.md:90:bat > note.md # quickly create a new file
45+README.md:92:bat header.md content.md footer.md > document.md
46+README.md:94:bat -n main.rs # show line numbers (only)
47+README.md:96:bat f - g # output 'f', then stdin, then 'g'.
48+README.md:103:You can use `bat` as a previewer for [`fzf`](https://github.com/junegunn/fzf). To do this,
49+README.md:104:use `bat`s `--color=always` option to force colorized output. You can also use `--line-range`
50+README.md:108:fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'
51+README.md:115:You can use the `-exec` option of `find` to preview all search results with `bat`:
52+README.md:118:find … -exec bat {} +
53+README.md:121:If you happen to use [`fd`](https://github.com/sharkdp/fd), you can use the `-X`/`--exec-batch` option to do the same:
54+README.md:124:fd … -X bat
55+README.md:129:With [`batgrep`](https://github.com/eth-p/bat-extras/blob/master/doc/batgrep.md), `bat` can be used as the printer for [`ripgrep`](https://github.com/BurntSushi/ripgrep) search results.
56+README.md:132:batgrep needle src/
57+README.md:137:`bat` can be combined with `tail -f` to continuously monitor a given file with syntax highlighting.
58+README.md:140:tail -f /var/log/pacman.log | bat --paging=never -l log
59+README.md:148:You can combine `bat` with `git show` to view an older version of a given file with proper syntax
60+README.md:152:git show v0.6.0:src/main.rs | bat -l rs
61+README.md:157:You can combine `bat` with `git diff` to view lines around code changes with proper syntax
62+README.md:160:batdiff() {
63+README.md:161: git diff --name-only --diff-filter=d | xargs bat --diff
64+README.md:164:If you prefer to use this as a separate tool, check out `batdiff` in [`bat-extras`](https://github.com/eth-p/bat-extras).
65+README.md:170:The line numbers and Git modification markers in the output of `bat` can make it hard to copy
66+README.md:171:the contents of a file. To prevent this, you can call `bat` with the `-p`/`--plain` option or
67+README.md:174:bat main.cpp | xclip
68+README.md:176:`bat` will detect that the output is being redirected and print the plain file contents.
69+README.md:180:`bat` can be used as a colorizing pager for `man`, by setting the
70+README.md:184:export MANPAGER="sh -c 'col -bx | bat -l man -p'"
71+README.md:187:(replace `bat` with `batcat` if you are on Debian or Ubuntu)
72+README.md:192:If you prefer to have this bundled in a new command, you can also use [`batman`](https://github.com/eth-p/bat-extras/blob/master/doc/batman.md).
73+README.md:196:Also, note that this will [not work](https://github.com/sharkdp/bat/issues/1145) with Mandocs `man` implementation.
74+README.md:200:The [`prettybat`](https://github.com/eth-p/bat-extras/blob/master/doc/prettybat.md) script is a wrapper that will format code and print it with `bat`.
75+README.md:205:[![Packaging status](https://repology.org/badge/vertical-allrepos/bat-cat.svg)](https://repology.org/project/bat-cat/versions)
76+README.md:210:`bat` is available on [Ubuntu since 20.04 ("Focal")](https://packages.ubuntu.com/search?keywords=bat&exact=1) and [Debian since August 2021 (Debian 11 - "Bullseye")](https://packages.debian.org/bullseye/bat).
77+README.md:215:sudo apt install bat
78+README.md:218:**Important**: If you install `bat` this way, please note that the executable may be installed as `batcat` instead of `bat` (due to [a name
79+README.md:219:clash with another package](https://github.com/sharkdp/bat/issues/982)). You can set up a `bat -> batcat` symlink or alias to prevent any issues that may come up because of this and to be consistent with other distributions:
80+README.md:222:ln -s /usr/bin/batcat ~/.local/bin/bat
81+README.md:229:the most recent release of `bat`, download the latest `.deb` package from the
82+README.md:230:[release page](https://github.com/sharkdp/bat/releases) and install it via:
83+README.md:233:sudo dpkg -i bat_0.18.3_amd64.deb # adapt version number and architecture
84+README.md:238:You can install [the `bat` package](https://pkgs.alpinelinux.org/packages?name=bat)
85+README.md:242:apk add bat
86+README.md:247:You can install [the `bat` package](https://www.archlinux.org/packages/community/x86_64/bat/)
87+README.md:251:pacman -S bat
88+README.md:256:You can install [the `bat` package](https://koji.fedoraproject.org/koji/packageinfo?packageID=27506) from the official [Fedora Modular](https://docs.fedoraproject.org/en-US/modularity/using-modules/) repository.
89+README.md:259:dnf install bat
90+README.md:264:You can install [the `bat` package](https://github.com/funtoo/dev-kit/tree/1.4-release/sys-apps/bat) from dev-kit.
91+README.md:267:emerge sys-apps/bat
92+README.md:272:You can install [the `bat` package](https://packages.gentoo.org/packages/sys-apps/bat)
93+README.md:276:emerge sys-apps/bat
94+README.md:281:You can install `bat` via xbps-install:
95+README.md:283:xbps-install -S bat
96+README.md:288:You can install `bat` via pkg:
97+README.md:290:pkg install bat
98+README.md:295:You can install a precompiled [`bat` package](https://www.freshports.org/textproc/bat) with pkg:
99+README.md:298:pkg install bat
100+README.md:304:cd /usr/ports/textproc/bat
101+README.md:310:You can install `bat` package using [`pkg_add(1)`](https://man.openbsd.org/pkg_add.1):
102+README.md:313:pkg_add bat
103+README.md:318:You can install `bat` using the [nix package manager](https://nixos.org/nix):
104+README.md:321:nix-env -i bat
105+README.md:326:You can install `bat` with zypper:
106+README.md:329:zypper install bat
107+README.md:335:Existing packages may be available, but are not officially supported and may contain [issues](https://github.com/sharkdp/bat/issues/1519).
108+README.md:339:You can install `bat` with [Homebrew on MacOS](https://formulae.brew.sh/formula/bat) or [Homebrew on Linux](https://formulae.brew.sh/formula-linux/bat):
109+README.md:342:brew install bat
110+README.md:347:Or install `bat` with [MacPorts](https://ports.macports.org/port/bat/summary):
111+README.md:350:port install bat
112+README.md:355:There are a few options to install `bat` on Windows. Once you have installed `bat`,
113+README.md:356:take a look at the ["Using `bat` on Windows"](#using-bat-on-windows) section.
114+README.md:364:You can install `bat` via [Chocolatey](https://chocolatey.org/packages/Bat):
115+README.md:366:choco install bat
116+README.md:371:You can install `bat` via [scoop](https://scoop.sh/):
117+README.md:373:scoop install bat
118+README.md:378:You can download prebuilt binaries from the [Release page](https://github.com/sharkdp/bat/releases),
119+README.md:384:Check out the [Release page](https://github.com/sharkdp/bat/releases) for
120+README.md:385:prebuilt versions of `bat` for many different architectures. Statically-linked
121+README.md:390:If you want to build `bat` from source, you need Rust 1.46 or
122+README.md:394:cargo install --locked bat
123+README.md:404:Use `bat --list-themes` to get a list of all available themes for syntax
124+README.md:405:highlighting. To select the `TwoDark` theme, call `bat` with the
125+README.md:406:`--theme=TwoDark` option or set the `BAT_THEME` environment variable to
126+README.md:407:`TwoDark`. Use `export BAT_THEME="TwoDark"` in your shell's startup file to
127+README.md:408:make the change permanent. Alternatively, use `bat`s
128+README.md:409:[configuration file](https://github.com/sharkdp/bat#configuration-file).
129+README.md:414:bat --list-themes | fzf --preview="bat --theme={} --color=always /path/to/file"
130+README.md:417:`bat` looks good on a dark background by default. However, if your terminal uses a
131+README.md:420:['Adding new themes' section below](https://github.com/sharkdp/bat#adding-new-themes).
132+README.md:424:`bat` has three themes that always use [8-bit colors](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors),
133+README.md:444:You can use the `--style` option to control the appearance of `bat`s output.
134+README.md:446:and line numbers but no grid and no file header. Set the `BAT_STYLE` environment
135+README.md:447:variable to make these changes permanent or use `bat`s
136+README.md:448:[configuration file](https://github.com/sharkdp/bat#configuration-file).
137+README.md:452:Should you find that a particular syntax is not available within `bat`, you can follow these
138+README.md:453:instructions to easily add new syntaxes to your current `bat` installation.
139+README.md:455:`bat` uses the excellent [`syntect`](https://github.com/trishume/syntect/)
140+README.md:466: mkdir -p "$(bat --config-dir)/syntaxes"
141+README.md:467: cd "$(bat --config-dir)/syntaxes"
142+README.md:477: bat cache --build
143+README.md:480:3. Finally, use `bat --list-languages` to check if the new languages are available.
144+README.md:485: bat cache --clear
145+README.md:488:4. If you think that a specific syntax should be included in `bat` by default, please
146+README.md:490: instructions [here](doc/assets.md): [Open Syntax Request](https://github.com/sharkdp/bat/issues/new?labels=syntax-request&template=syntax_request.md).
147+README.md:498:mkdir -p "$(bat --config-dir)/themes"
148+README.md:499:cd "$(bat --config-dir)/themes"
149+README.md:505:bat cache --build
150+README.md:508:Finally, use `bat --list-themes` to check if the new themes are available.
151+README.md:516:(use `bat --list-languages` for an overview).
152+README.md:518:Note: You probably want to use this option as an entry in `bat`s configuration file instead
153+README.md:539:`bat` uses the pager that is specified in the `PAGER` environment variable. If this variable is not
154+README.md:541:`PAGER` variable or set the `BAT_PAGER` environment variable to override what is specified in
155+README.md:544:**Note**: If `PAGER` is `more` or `most`, `bat` will silently use `less` instead to ensure support for colors.
156+README.md:547:`PAGER`/`BAT_PAGER` variables:
157+README.md:550:export BAT_PAGER="less -RF"
158+README.md:553:Instead of using environment variables, you can also use `bat`s [configuration file](https://github.com/sharkdp/bat#configuration-file) to configure the pager (`--pager` option).
159+README.md:556:`bat` will pass the following command line options to the pager: `-R`/`--RAW-CONTROL-CHARS`,
160+README.md:572:`bat` expands tabs to 4 spaces by itself, not relying on the pager. To change this, simply add the
161+README.md:575:**Note**: Defining tab stops for the pager (via the `--pager` argument by `bat`, or via the `LESS`
162+README.md:578:sidebar. Calling `bat` with `--tabs=0` will override it and let tabs be consumed by the pager.
163+README.md:582:If you make use of the dark mode feature in macOS, you might want to configure `bat` to use a different
164+README.md:587:alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo default || echo GitHub)"
165+README.md:593:`bat` can also be customized with a configuration file. The location of the file is dependent
166+README.md:596:bat --config-file
167+README.md:599:Alternatively, you can use the `BAT_CONFIG_PATH` environment variable to point `bat` to a
168+README.md:602:export BAT_CONFIG_PATH="/path/to/bat.conf"
169+README.md:607:bat --generate-config-file
170+README.md:612:The configuration file is a simple list of command line arguments. Use `bat --help` to see a full list of possible options and values. In addition, you can add comments by prepending a line with the `#` character.
171+README.md:629:## Using `bat` on Windows
172+README.md:631:`bat` mostly works out-of-the-box on Windows, but a few features may need extra configuration.
173+README.md:653:or by setting `BAT_PAGER` to an empty string.
174+README.md:657:`bat` on Windows does not natively support Cygwin's unix-style paths (`/cygdrive/*`). When passed an absolute cygwin path as an argument, `bat` will encounter the following error: `The system cannot find the path specified. (os error 3)`
175+README.md:662:bat() {
176+README.md:671: command bat "${args[@]}"
177+README.md:679:If an input file contains color codes or other ANSI escape sequences, `bat` will have problems
178+README.md:682:passing the `--color=never --wrap=never` options to `bat`.
179+README.md:686:`bat` handles terminals *with* and *without* truecolor support. However, the colors in most syntax
180+README.md:694:`24bit`. Otherwise, `bat` will not be able to determine whether or not 24-bit escape sequences
181+README.md:699:Please try a different theme (see `bat --list-themes` for a list). The `OneHalfDark` and
182+README.md:704:`bat` natively supports UTF-8 as well as UTF-16. For every other file encoding, you may need to
183+README.md:709:iconv -f ISO-8859-1 -t UTF-8 my-file.php | bat
184+README.md:712:by `bat`.
185+README.md:718:git clone --recursive https://github.com/sharkdp/bat
186+README.md:721:cd bat
187+README.md:730:# Build a bat binary with modified syntaxes and themes
188+README.md:735:If you want to build an application that uses `bat`s pretty-printing
189+README.md:736:features as a library, check out the [the API documentation](https://docs.rs/bat/).
190+README.md:738:when you depend on `bat` as a library.
191+README.md:753:Please contact [David Peter](https://david-peter.de/) via email if you want to report a vulnerability in `bat`.
192+README.md:757:`bat` tries to achieve the following goals:
193+README.md:768:Copyright (c) 2018-2021 [bat-developers](https://github.com/sharkdp/bat).
194+README.md:770:`bat` is made available under the terms of either the MIT License or the Apache License 2.0, at your option.
195+.gitmodules:198: url = https://github.com/ArmandPhilippot/coldark-bat.git
196+.gitmodules:202: branch = bat-source
197+examples/list_syntaxes_and_themes.rs:1:/// A simple program that prints its own source code using the bat library
198+examples/list_syntaxes_and_themes.rs:2:use bat::PrettyPrinter;
199+examples/inputs.rs:3:use bat::{Input, PrettyPrinter};
200+examples/yaml.rs:2:use bat::{Input, PrettyPrinter};
201+examples/advanced.rs:1:/// A program that prints its own source code using the bat library
202+examples/advanced.rs:2:use bat::{PagingMode, PrettyPrinter, WrappingMode};
203+examples/cat.rs:1:/// A very simple colorized `cat` clone, using `bat` as a library.
204+examples/cat.rs:2:/// See `src/bin/bat` for the full `bat` application.
205+examples/cat.rs:3:use bat::PrettyPrinter;
206+examples/simple.rs:1:/// A simple program that prints its own source code using the bat library
207+examples/simple.rs:2:use bat::PrettyPrinter;
208+.gitignore:5:/assets/completions/bat.bash
209+.gitignore:6:/assets/completions/bat.fish
210+.gitignore:7:/assets/completions/bat.zsh
211+.gitignore:8:/assets/manual/bat.1
212+src/input.rs:12:/// This tells bat how to refer to the input.
213+src/error.rs:22: #[error("Use of bat as a pager is disallowed in order to avoid infinite recursion problems")]
214+src/error.rs:23: InvalidPagerValueBat,
215+src/error.rs:53: Red.paint("[bat error]"),
216+src/error.rs:59: writeln!(output, "{}: {}", Red.paint("[bat error]"), error).ok();
217+src/lib.rs:1://! `bat` is a library to print syntax highlighted content.
218+src/lib.rs:13://! use bat::PrettyPrinter;
219+src/macros.rs:2:macro_rules! bat_warning {
220+src/macros.rs:5: eprintln!("{}: {}", Yellow.paint("[bat warning]"), format!($($arg)*));
221+src/syntax_mapping.rs:52: "**/bat/config",
222+src/pager.rs:10: /// From the env var BAT_PAGER
223+src/pager.rs:11: EnvVarBatPager,
224+src/pager.rs:23: /// bat
225+src/pager.rs:24: Bat,
226+src/pager.rs:48: Some("bat") => PagerKind::Bat,
227+src/pager.rs:86: let bat_pager = env::var("BAT_PAGER");
228+src/pager.rs:89: let (cmd, source) = match (config_pager, &bat_pager, &pager) {
229+src/pager.rs:91: (_, Ok(bat_pager), _) => (bat_pager.as_str(), PagerSource::EnvVarBatPager),
230+src/pager.rs:105: // If PAGER=bat, silently use 'less' instead to prevent
231+src/pager.rs:107: // Never silently use 'less' if BAT_PAGER or --pager has been
232+src/pager.rs:109: matches!(kind, PagerKind::More | PagerKind::Most | PagerKind::Bat)
233+src/assets.rs:16:use crate::{bat_warning, SyntaxMapping};
234+src/assets.rs:218: bat_warning!("Theme '{}' is deprecated, using 'ansi' instead.", theme);
235+src/assets.rs:222: bat_warning!("Unknown theme '{}', using default.", theme)
236+src/printer.rs:278: (but will be present if the output of 'bat' is piped). You can use 'bat -A' \
237+src/printer.rs:280: Yellow.paint("[bat warning]"),
238+src/output.rs:62: if pager.kind == PagerKind::Bat {
239+src/output.rs:63: return Err(Error::InvalidPagerValueBat);
240+src/output.rs:78: // ANSI color sequences printed by bat. If someone has set PAGER="less -F", we
241+src/output.rs:81: // We only do this for PAGER (as it is not specific to 'bat'), not for BAT_PAGER
242+src/output.rs:82: // or bats '--pager' command line option.
243+src/bin/bat/input.rs:1:use bat::input::Input;
244+src/bin/bat/config.rs:10: env::var("BAT_CONFIG_PATH")
245+src/bin/bat/config.rs:16:pub fn generate_config_file() -> bat::error::Result<()> {
246+src/bin/bat/config.rs:46: let default_config = r#"# This is `bat`s configuration file. Each line either contains a comment or
247+src/bin/bat/config.rs:47:# a command-line option that you want to pass to `bat` by default. You can
248+src/bin/bat/config.rs:48:# run `bat --help` to get a list of all possible configuration options.
249+src/bin/bat/config.rs:50:# Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes`
250+src/bin/bat/config.rs:62:# enable mouse scrolling support in `bat` when running inside tmux. This might
251+src/bin/bat/config.rs:98: env::var("BAT_OPTS").ok().map(|s| get_args_from_str(&s))
252+src/bin/bat/directories.rs:7:/// The `XDG_CACHE_HOME` environment variable is checked first. `BAT_CONFIG_DIR`
253+src/bin/bat/directories.rs:9:/// The fallback directories are `~/.cache/bat` and `~/.config/bat`, respectively.
254+src/bin/bat/directories.rs:10:pub struct BatProjectDirs {
255+src/bin/bat/directories.rs:15:impl BatProjectDirs {
256+src/bin/bat/directories.rs:16: fn new() -> Option<BatProjectDirs> {
257+src/bin/bat/directories.rs:17: let cache_dir = BatProjectDirs::get_cache_dir()?;
258+src/bin/bat/directories.rs:19: // Checks whether or not $BAT_CONFIG_DIR exists. If it doesn't, set our config dir
259+src/bin/bat/directories.rs:22: if let Some(config_dir_op) = env::var_os("BAT_CONFIG_DIR").map(PathBuf::from) {
260+src/bin/bat/directories.rs:34: config_dir_op.map(|d| d.join("bat"))?
261+src/bin/bat/directories.rs:37: Some(BatProjectDirs {
262+src/bin/bat/directories.rs:44: // on all OS prefer BAT_CACHE_PATH if set
263+src/bin/bat/directories.rs:45: let cache_dir_op = env::var_os("BAT_CACHE_PATH").map(PathBuf::from);
264+src/bin/bat/directories.rs:59: cache_dir_op.map(|d| d.join("bat"))
265+src/bin/bat/directories.rs:72: pub static ref PROJECT_DIRS: BatProjectDirs =
266+src/bin/bat/directories.rs:73: BatProjectDirs::new().expect("Could not get home directory");
267+src/bin/bat/app.rs:17:use bat::{
268+src/bin/bat/app.rs:19: bat_warning,
269+src/bin/bat/app.rs:56: // Skip the arguments in bats config file
270+src/bin/bat/app.rs:62: // Read arguments from bats config file
271+src/bin/bat/app.rs:191: .or_else(|| env::var("BAT_TABS").ok())
272+src/bin/bat/app.rs:204: .or_else(|| env::var("BAT_THEME").ok())
273+src/bin/bat/app.rs:305: let env_style_components: Option<Vec<StyleComponent>> = env::var("BAT_STYLE")
274+src/bin/bat/app.rs:336: bat_warning!("Style 'rule' is a subset of style 'grid', 'rule' will not be visible.");
275+src/bin/bat/assets.rs:9:use bat::assets::HighlightingAssets;
276+src/bin/bat/assets.rs:10:use bat::assets_metadata::AssetsMetadata;
277+src/bin/bat/assets.rs:11:use bat::error::*;
278+src/bin/bat/assets.rs:34: in '{}' are not compatible with this version of bat ({}). To solve this, \
279+src/bin/bat/assets.rs:35: either rebuild the cache (bat cache --build) or remove \
280+src/bin/bat/assets.rs:36: the custom syntaxes/themes (bat cache --clear).\n\
281+src/bin/bat/assets.rs:38: https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions",
282+src/bin/bat/main.rs:28:use bat::{
283+src/bin/bat/main.rs:52: bat::assets::build(source_dir, !blank, target_dir, clap::crate_version!())
284+src/bin/bat/main.rs:60: println!("bat has been built without the 'build-assets' feature. The 'cache --build' option is not available.");
285+src/bin/bat/main.rs:207: and are added to the cache with `bat cache --build`. \
286+src/bin/bat/main.rs:209: https://github.com/sharkdp/bat#adding-new-themes",
287+src/bin/bat/main.rs:230: let pager = bat::config::get_pager_executable(app.matches.value_of("pager"))
288+src/bin/bat/main.rs:243: "BAT_PAGER",
289+src/bin/bat/main.rs:244: "BAT_CACHE_PATH",
290+src/bin/bat/main.rs:245: "BAT_CONFIG_PATH",
291+src/bin/bat/main.rs:246: "BAT_OPTS",
292+src/bin/bat/main.rs:247: "BAT_STYLE",
293+src/bin/bat/main.rs:248: "BAT_TABS",
294+src/bin/bat/main.rs:249: "BAT_THEME",
295+src/bin/bat/main.rs:280: println!("bat has been built without the 'bugreport' feature. The '--diagnostic' option is not available.");
296+src/bin/bat/clap_app.rs:43: "Note: `bat -h` prints a short and concise overview while `bat --help` gives all \
297+src/bin/bat/clap_app.rs:127: data to bat from STDIN when bat does not otherwise know \
298+src/bin/bat/clap_app.rs:290: if the output of bat is piped to another program, but you want \
299+src/bin/bat/clap_app.rs:306: set BAT_PAGER to an empty string. To control which pager is used, see the \
300+src/bin/bat/clap_app.rs:330: PAGER and BAT_PAGER environment variables. The default pager is 'less'. \
301+src/bin/bat/clap_app.rs:363: BAT_THEME environment variable (e.g.: export \
302+src/bin/bat/clap_app.rs:364: BAT_THEME=\"...\").",
303+src/bin/bat/clap_app.rs:412: BAT_STYLE environment variable (e.g.: export BAT_STYLE=\"..\").\n\n\
304+src/bin/bat/clap_app.rs:497: .help("Show bat's configuration directory."),
305+src/bin/bat/clap_app.rs:503: .help("Show bat's cache directory."),
306+src/bin/bat/clap_app.rs:521: 'bat --ignored-suffix \".dev\" my_file.json.dev' will use JSON syntax, and ignore '.dev'"
307+src/bin/bat/clap_app.rs:528: // enable the 'bat cache' subcommand.
308+src/assets/serialized_syntax_set.rs:14: /// The data to use is embedded into the bat binary.
309+src/assets/build_assets.rs:246: if std::env::var("BAT_PRINT_SYNTAX_DEPENDENCIES").is_ok() {
310+src/assets/build_assets.rs:248: // BAT_PRINT_SYNTAX_DEPENDENCIES=1 cargo run -- cache --build --source assets --blank --target /tmp
311+src/assets/build_assets.rs:342:/// BAT_SYNTAX_DEPENDENCIES_TO_GRAPHVIZ_DOT_FILE=/tmp/bat-syntax-dependencies.dot cargo run -- cache --build --source assets --blank --target /tmp
312+src/assets/build_assets.rs:343:/// dot /tmp/bat-syntax-dependencies.dot -Tpng -o /tmp/bat-syntax-dependencies.png
313+src/assets/build_assets.rs:344:/// open /tmp/bat-syntax-dependencies.png
314+src/assets/build_assets.rs:350: if let Ok(dot_file_path) = std::env::var("BAT_SYNTAX_DEPENDENCIES_TO_GRAPHVIZ_DOT_FILE") {
315+src/assets/build_assets.rs:424: if std::env::var("BAT_INCLUDE_SYNTAX_DEPENDENTS").is_ok() {
316+src/assets/assets_metadata.rs:12: bat_version: Option<String>,
317+src/assets/assets_metadata.rs:22: bat_version: Some(current_version.to_owned()),
318+src/assets/assets_metadata.rs:48: /// => assume that these were created by an old version of bat and return
319+src/assets/assets_metadata.rs:69: Version::parse(current_version).expect("bat follows semantic versioning");
320+src/assets/assets_metadata.rs:71: .bat_version
321+src/assets/build_assets/graphviz_utils.rs:30: writeln!(dot_file, "digraph BatSyntaxDependencies {{")?;
322+build.rs:2:// For more details, see https://github.com/sharkdp/bat/issues/372
323+build.rs:4:// For bat-as-a-library, no build script is required. The build script is for
324+build.rs:5:// the manpage and completions, which are only relevant to the bat application.
325+build.rs:17: let project_name = option_env!("PROJECT_NAME").unwrap_or("bat");
326+build.rs:54: "assets/manual/bat.1.in",
327+build.rs:55: out_dir.join("assets/manual/bat.1"),
328+build.rs:59: "assets/completions/bat.bash.in",
329+build.rs:60: out_dir.join("assets/completions/bat.bash"),
330+build.rs:64: "assets/completions/bat.fish.in",
331+build.rs:65: out_dir.join("assets/completions/bat.fish"),
332+build.rs:69: "assets/completions/_bat.ps1.in",
333+build.rs:70: out_dir.join("assets/completions/_bat.ps1"),
334+build.rs:74: "assets/completions/bat.zsh.in",
335+build.rs:75: out_dir.join("assets/completions/bat.zsh"),
336+build.rs:89:// const BIN_NAME: &str = "bat";
337+.git/info/refs:21:b41fb0df6cf831081754c27a4c33227c166eee69 refs/heads/bat-0.16-updates
338+.git/info/refs:22:b5a40d0866e6a190fbee095ac104fdc6ec168d0a refs/heads/bat-0.18.2-release
339+.git/info/refs:23:fa0d448cd3e652ffd3c5caa4caa4bdbe2973241c refs/heads/bat-config-file
340+.git/info/refs:24:27516c6f26dc1319dc2516e7caf1aafbe8d30aa0 refs/heads/bat-diagnostic-option
341+.git/info/refs:25:cd501edcbded4dc344e0a0478472b0a4819c2251 refs/heads/bat-diff
342+.git/info/refs:26:d77742b2e425cd76e2ca90a75efba4205e280859 refs/heads/bat-diff-fixes
343+.git/info/refs:215:f1f8807a38052c8138c6f8d1b3bf125e30588712 refs/remotes/origin/bat-v0.18.3-candidate
344+.git/FETCH_HEAD:1:619cf6e6d6641dbb913dddd56907a54c6a9f6ce6 branch 'master' of https://github.com/sharkdp/bat
345+.git/FETCH_HEAD:2:8244eb8ef88cc1b64d27991d6a5c7c69586b8a13 not-for-merge branch 'ci-experiment' of https://github.com/sharkdp/bat
346+.git/FETCH_HEAD:3:271842d87c816cb80dc0a1c48eefee99c9439db6 not-for-merge branch 'create_highlighted_versions-wrong-path-repro' of https://github.com/sharkdp/bat
347+.git/FETCH_HEAD:4:c42ec074ea6accdc38b8d9278bc3810343e2d1a3 not-for-merge branch 'dependabot/submodules/assets/syntaxes/02_Extra/PowerShell-742f0b5' of https://github.com/sharkdp/bat
348+.git/FETCH_HEAD:5:fb9c30b1f7ff648d8aa8fb35a8ff669513c8e91f not-for-merge branch 'dependabot/submodules/assets/syntaxes/02_Extra/SCSS_Sass-d3d9404' of https://github.com/sharkdp/bat
349+.git/FETCH_HEAD:6:179d905bb92eee7272cf6fbb38db88f9294df94a not-for-merge branch 'dependabot/submodules/assets/syntaxes/02_Extra/TypeScript-ba45efd' of https://github.com/sharkdp/bat
350+.git/FETCH_HEAD:7:b146958ecbb8c8c926159509ca7fb32a8573f897 not-for-merge branch 'release-v0.18.3' of https://github.com/sharkdp/bat
351+.git/logs/HEAD:14:a946f3ae23e7d6d9aa6361c034e9b62859b4dbff e92e13cd4332196617df7a07bc6c55d1fd4834bb David Peter <mail@david-peter.de> 1631038809 +0200 rebase (continue) (pick): Use BAT_CONFIG_DIR and BAT_CACHE_PATH
352+.git/modules/assets/themes/Coldark/FETCH_HEAD:1:e44750b2a9629dd12d8ed3ad9fd50c77232170b9 not-for-merge branch 'master' of https://github.com/ArmandPhilippot/coldark-bat
353+.git/modules/assets/themes/Coldark/logs/refs/heads/master:1:0000000000000000000000000000000000000000 b4a1c74d8d5bdd136ec530e5905b810272472545 sharkdp <davidpeter@web.de> 1603543180 +0200 clone: from https://github.com/ArmandPhilippot/coldark-bat.git
354+.git/modules/assets/themes/Coldark/logs/refs/remotes/origin/HEAD:1:0000000000000000000000000000000000000000 b4a1c74d8d5bdd136ec530e5905b810272472545 sharkdp <davidpeter@web.de> 1603543180 +0200 clone: from https://github.com/ArmandPhilippot/coldark-bat.git
355+.git/modules/assets/themes/Coldark/logs/HEAD:1:0000000000000000000000000000000000000000 b4a1c74d8d5bdd136ec530e5905b810272472545 sharkdp <davidpeter@web.de> 1603543180 +0200 clone: from https://github.com/ArmandPhilippot/coldark-bat.git
356+.git/modules/assets/themes/Coldark/config:8: url = https://github.com/ArmandPhilippot/coldark-bat.git
357+.git/modules/assets/themes/gruvbox/FETCH_HEAD:1:64c47250e54298b91e2cf8d401320009aba9f991 not-for-merge branch 'bat-source' of https://github.com/subnut/gruvbox-tmTheme
358+.git/packed-refs:22:b41fb0df6cf831081754c27a4c33227c166eee69 refs/heads/bat-0.16-updates
359+.git/packed-refs:23:b5a40d0866e6a190fbee095ac104fdc6ec168d0a refs/heads/bat-0.18.2-release
360+.git/packed-refs:24:fa0d448cd3e652ffd3c5caa4caa4bdbe2973241c refs/heads/bat-config-file
361+.git/packed-refs:25:27516c6f26dc1319dc2516e7caf1aafbe8d30aa0 refs/heads/bat-diagnostic-option
362+.git/packed-refs:26:cd501edcbded4dc344e0a0478472b0a4819c2251 refs/heads/bat-diff
363+.git/packed-refs:27:d77742b2e425cd76e2ca90a75efba4205e280859 refs/heads/bat-diff-fixes
364+.git/packed-refs:216:f1f8807a38052c8138c6f8d1b3bf125e30588712 refs/remotes/origin/bat-v0.18.3-candidate
365+.git/config:7: url = https://github.com/sharkdp/bat.git
366+.git/config:13: slug = sharkdp/bat
367+.git/config:143:[branch "bat-config-file"]
368+.git/config:145: merge = refs/heads/bat-config-file
369+.git/config:176:[branch "bat-diff"]
370+.git/config:178: merge = refs/heads/bat-diff
371+.git/config:228: remote = git@github.com:lavifb/bat.git
372+.git/config:231: url = https://github.com/lavifb/bat
373+.git/config:234: remote = git@github.com:majecty/bat.git
374+.git/config:237: url = https://github.com/majecty/bat
375+.git/config:246: remote = git@github.com:reidwagner/bat.git
376+.git/config:315: remote = git@github.com:hrlmartins/bat.git
377+.git/config:369: remote = git@github.com:fvictorio/bat.git
378+.git/config:378: remote = git@github.com:eth-p/bat.git
379+.git/config:387: remote = git@github.com:Kogia-sima/bat.git
380+.git/config:426: remote = git@github.com:neuronull/bat.git
381+.git/config:429: remote = git@github.com:jmick414/bat.git
382+.git/config:435: remote = git@github.com:dtolnay/bat.git
383+.git/config:441: remote = git@github.com:eth-p/bat.git
384+.git/config:444: remote = git@github.com:neuronull/bat.git
385+.git/config:482:[branch "bat-diff-fixes"]
386+.git/config:484: merge = refs/heads/bat-diff-fixes
387+.git/config:486: remote = git@github.com:lzutao/bat.git
388+.git/config:507: remote = git@github.com:eth-p/bat.git
389+.git/config:510: remote = git@github.com:eth-p/bat.git
390+.git/config:513: remote = git@github.com:kopecs/bat.git
391+.git/config:516: remote = git@github.com:eth-p/bat.git
392+.git/config:540: remote = git@github.com:rxt1077/bat.git
393+.git/config:558: remote = git@github.com:alexnovak/bat.git
394+.git/config:561: remote = git@github.com:guidocella/bat.git
395+.git/config:564: remote = git@github.com:gsomix/bat.git
396+.git/config:567: remote = git@github.com:caioalonso/bat.git
397+.git/config:579: remote = git@github.com:mk12/bat.git
398+.git/config:585: remote = git@github.com:kjmph/bat.git
399+.git/config:591: remote = git@github.com:Kienyew/bat.git
400+.git/config:603: remote = git@github.com:alexanderkarlis/bat.git
401+.git/config:609: remote = git@github.com:ahmedelgabri/bat.git
402+.git/config:615: remote = git@github.com:Kienyew/bat.git
403+.git/config:618: remote = git@github.com:eth-p/bat.git
404+.git/config:620:[branch "bat-0.16-updates"]
405+.git/config:622: merge = refs/heads/bat-0.16-updates
406+.git/config:624: remote = git@github.com:henil/bat.git
407+.git/config:627: remote = git@github.com:AkshatGadhwal/bat.git
408+.git/config:633: remote = git@github.com:loganintech/bat.git
409+.git/config:639: remote = git@github.com:mzegar/bat.git
410+.git/config:642: remote = git@github.com:AkshatGadhwal/bat.git
411+.git/config:645: remote = git@github.com:AkshatGadhwal/bat.git
412+.git/config:651: remote = git@github.com:jacobmischka/bat.git
413+.git/config:657: url = https://github.com/forkeith/bat.git
414+.git/config:660: remote = git@github.com:ArmandPhilippot/bat.git
415+.git/config:664: url = https://github.com/ArmandPhilippot/coldark-bat.git
416+.git/config:666: remote = git@github.com:adrian-rivera/bat.git
417+.git/config:669: remote = git@github.com:eth-p/bat.git
418+.git/config:681: remote = git@github.com:MarcoIeni/bat.git
419+.git/config:690: remote = git@github.com:Enselic/bat.git
420+.git/config:696: remote = git@github.com:stku1985/bat.git
421+.git/config:699: remote = git@github.com:mk12/bat.git
422+.git/config:702: remote = git@github.com:j0hnmeow/bat.git
423+.git/config:708: remote = git@github.com:Enselic/bat.git
424+.git/config:713:[branch "bat-diagnostic-option"]
425+.git/config:715: merge = refs/heads/bat-diagnostic-option
426+.git/config:717: url = https://github.com/niklasmohrin/bat.git
427+.git/config:723: remote = git@github.com:paulsmith/bat.git
428+.git/config:735: remote = git@github.com:Enselic/bat.git
429+.git/config:762: remote = git@github.com:Enselic/bat.git
430+.git/config:771: remote = git@github.com:brightly-salty/bat.git
431+.git/config:774: remote = git@github.com:eth-p/bat.git
432+.git/config:804: remote = git@github.com:matklad/bat.git
433+.git/config:827:[branch "bat-0.18.2-release"]
434+.git/config:829: merge = refs/heads/bat-0.18.2-release
435+.git/config:831: remote = git@github.com:Enselic/bat.git
436+.git/config:834: remote = git@github.com:steffahn/bat.git
437+.git/config:837: remote = git@github.com:SarveshMD/bat.git
438+.git/config:840: remote = git@github.com:Enselic/bat.git
439+.git/config:852: remote = git@github.com:Enselic/bat.git
440+.git/config:861: remote = git@github.com:bojan88/bat.git
441+.git/config:870: remote = git@github.com:Enselic/bat.git
442+.git/config:882: remote = git@github.com:Enselic/bat.git
443+CHANGELOG.md:6:- `$BAT_CONFIG_DIR` is now a recognized environment variable. It has precedence over `$XDG_CONFIG_HOME`, see #1727 (@billrisher)
444+CHANGELOG.md:25:- Include git hash in `bat -V` and `bat --version` output if present. See #1921 (@Enselic)
445+CHANGELOG.md:42:## `bat` as a library
446+CHANGELOG.md:45:- Remove `HighlightingAssets::from_files` and `HighlightingAssets::save_to_cache`. Instead of calling the former and then the latter you now make a single call to `bat::assets::build`. See #1802 (@Enselic)
447+CHANGELOG.md:67:- Fix for a security vulnerability on Windows. Prior to this release, `bat` would execute programs called `less`/`less.exe` from the current working directory (instead of the one from `PATH`) with priority. An attacker might be able to use this by placing a malicious program in a shared directory where the user would execute `bat`. `bat` users on Windows are advised to upgrade to this version. See #1724 and #1472 (@Ry0taK).
448+CHANGELOG.md:92:- The `LESS` environment variable is now included in `bat --diagnostic`, see #1589 (@Enselic)
449+CHANGELOG.md:98:- Replaced "Advanced CSV" with a custom CSV syntax definition written especially for `bat`; see #1574 (@keith-hall)
450+CHANGELOG.md:112:- Use a pager when `bat --list-languages` is called, see #1394 (@stku1985)
451+CHANGELOG.md:117:- Only print themes hint in interactive mode (`bat --list-themes`), see #1439 (@rsteube)
452+CHANGELOG.md:122:- If `PAGER` (but not `BAT_PAGER` or `--pager`) is `more` or `most`, silently use `less` instead to ensure support for colors, see #1063 (@Enselic)
453+CHANGELOG.md:123:- If `PAGER` is `bat`, silently use `less` to prevent recursion. For `BAT_PAGER` or `--pager`, exit with error, see #1413 (@Enselic)
454+CHANGELOG.md:125:- `BAT_CONFIG_PATH` ignored by `bat` if non-existent, see #1550 (@sharkdp)
455+CHANGELOG.md:147:## `bat` as a library
456+CHANGELOG.md:160:- Running `bat` without arguments fails ("output file is also an input"), see #1396
457+CHANGELOG.md:168:- Pass `-S` ("chop long lines") to `less` if `--wrap=never` is set in `bat`, see #1255 (@gahag)
458+CHANGELOG.md:173:- Throw an error when `bat` is being used as `pager`, see #1343 (@adrian-rivera)
459+CHANGELOG.md:225:## `bat` as a library
460+CHANGELOG.md:246:- Cannot run `bat` with relative paths, see #1022
461+CHANGELOG.md:247:- bat mishighlights Users that start with digits in SSH config, see #984
462+CHANGELOG.md:268:- bat now prints an error if an invalid syntax is specified via `-l` or `--map-syntax`, see #1004 (@eth-p)
463+CHANGELOG.md:270:## `bat` as a library
464+CHANGELOG.md:276:- Compilation problems with `onig_sys` on various platforms have been resolved by upgrading to `syntect 4.2`, which includes a new `onig` version that allows to build `onig_sys` without the `bindgen` dependency. This removes the need for `libclang(-dev)` to be installed to compile `bat`. Package maintainers might want to remove `clang` as a build dependency. See #650 for more details.
465+CHANGELOG.md:284: Users suffering from #865 ("no color for bat in ssh from a Windows client") can use the `ansi-dark` and `ansi-light` themes from now on.
466+CHANGELOG.md:303:- Performance improvements when using custom caches (via `bat cache --build`): the `bat` startup time should now be twice as fast (@lzutao).
467+CHANGELOG.md:309:## `bat` as a library
468+CHANGELOG.md:320: in the header. This is useful when piping input into `bat`. See #654 and #892 (@neuronull).
469+CHANGELOG.md:336:- When saving/reading user-provided syntaxes or themes, `bat` will now maintain a
470+CHANGELOG.md:337: `metadata.yaml` file which includes information about the `bat` version which was
471+CHANGELOG.md:342:## `bat` as a library
472+CHANGELOG.md:346: API is still available (basically everything that is not in the root `bat`
473+CHANGELOG.md:349: Note that this should still be considered a "beta" release of `bat`-as-a-library.
474+CHANGELOG.md:354: everything required by `bat` the application. When depending on bat as a library, downstream
475+CHANGELOG.md:358: bat = { version = "0.14", default-features = false }
476+CHANGELOG.md:371:## `bat` as a library
477+CHANGELOG.md:373:Beginning with this release, `bat` can be used as a library (#423).
478+CHANGELOG.md:378:- Second attempt, complete restructuring of the `bat` crate, see #679 (@DrSensor)
479+CHANGELOG.md:383:That being said, you can start using it! See the example programs in [`examples/`](https://github.com/sharkdp/bat/tree/master/examples).
480+CHANGELOG.md:385:You can see the API documentation here: https://docs.rs/bat/
481+CHANGELOG.md:390: users need to update their bat config files (`bat --config-file`), if they have any `--map-syntax` settings
482+CHANGELOG.md:407:- `BAT_CACHE_PATH` can be used to place cached `bat` assets in a non-standard path, see #829 (@neuronull)
483+CHANGELOG.md:413:- 'bat cache' still takes precedence over existing files, see #666 (@sharkdp)
484+CHANGELOG.md:425:- Enabled LTO, making `bat` about 10% faster, see #719 (@bolinfest, @sharkdp)
485+CHANGELOG.md:426:- Suggestions non how to configure `bat` for MacOS dark mode, see README (@jerguslejko)
486+CHANGELOG.md:427:- Extended ["Integration with other tools"](https://github.com/sharkdp/bat#integration-with-other-tools) section (@eth-p)
487+CHANGELOG.md:428:- Updated [instrutions on how to use `bat` as a `man`-pager](https://github.com/sharkdp/bat#man), see #652, see #667 (@sharkdp)
488+CHANGELOG.md:456:- `bat` is now in the official Ubuntu and Debian repositories, see #323 and #705 (@MarcoFalke)
489+CHANGELOG.md:457:- `bat` can now be installed via MacPorts, see #675 (@bn3t)
490+CHANGELOG.md:476:- Binary file content can now be viewed with `bat -A`, see #623, #640 (@pjsier and @sharkdp)
491+CHANGELOG.md:477:- `bat` can now be used as a man pager. Take a look at the README and #523 for more details.
492+CHANGELOG.md:506:- `bat` is now in the official Gentoo repositories, see #588 (@toku-sa-n)
493+CHANGELOG.md:507:- `bat` is now in the official Alpine Linux repositories, see #586 (@5paceToast)
494+CHANGELOG.md:508:- `bat` is in the official Fedora repositories, see #610 (@ignatenkobrain)
495+CHANGELOG.md:534:- New ["Integration with other tools"](https://github.com/sharkdp/bat#integration-with-other-tools) section in the README.
496+CHANGELOG.md:544:- `bat` is now available on Chocolatey, see #541 (@rasmuskriest)
497+CHANGELOG.md:554:- **Change the default configuration directory on macOS** to `~/.config/bat`, see #442 (@lavifb). If you are on macOS, you need to copy your configuration directory from the previous place (`~/Library/Preferences/bat`) to the new place (`~/.config/bat`).
498+CHANGELOG.md:559:- Rename `bat cache --init` to `bat cache --build`, see #498
499+CHANGELOG.md:560:- Move the `--config-dir` and `--cache-dir` options from `bat cache` to `bat` and hide them from the help text.
500+CHANGELOG.md:596:- Added `BAT_CONFIG_PATH` environment variable to set a non-default path for `bat`s configuration file, see #375 (@deg4uss3r)
501+CHANGELOG.md:618:- Avoid endless recursion when `PAGER="bat"`, see #383 (@rodorgas)
502+CHANGELOG.md:622:- `bat` is now available on openSUSE, see #405 (@dmarcoux)
503+CHANGELOG.md:651: The configuration file path can be accessed via `bat --config-file`. On Linux,
504+CHANGELOG.md:652: it is stored in `~/.config/bat/config`.
505+CHANGELOG.md:654:- Support for the `BAT_OPTS` environment variable with the same format as specified
506+CHANGELOG.md:664: bat --map-syntax .config:json ...
507+CHANGELOG.md:667: The option can be use multiple times. Note that you can easily make these mappings permanent by using bats new configuration file.
508+CHANGELOG.md:671:- Support pager command-line arguments in `PAGER` and `BAT_PAGER`, see #352 (@Foxboron)
509+CHANGELOG.md:689:- Bat Panics on Haskell Source Code, see #314
510+CHANGELOG.md:695:- Updated documentation on how to configure `bat`s pager
511+CHANGELOG.md:703:- `bat` is now available via [Termux](https://termux.com/), see #341 (@fornwall)
512+CHANGELOG.md:705:- `bat` is now available via [nix](https://nixos.org/nix), see #344 (@mgttlinger)
513+CHANGELOG.md:707:- `bat` is now available via [Docker](https://hub.docker.com/r/danlynn/bat/), see #331 (@danlynn)
514+CHANGELOG.md:717:- Bat Panics on Haskell Source Code, see #314
515+CHANGELOG.md:730: `--tabs` command-line option or the `BAT_TABS` environment variable. The
516+CHANGELOG.md:733:- Added support for the `BAT_STYLE` environment variable, see #208 (@ms2300)
517+CHANGELOG.md:764:- Added README section about "`bat` on Windows" (@Aankhen)
518+CHANGELOG.md:772:- Fixed panic when running `bat --list-languages | head`, see #232 (@mchlrhw)
519+CHANGELOG.md:786:- Major refactorings, enabling some progress on #150. In non-interactive mode, `bat` will now copy input bytes 1:1.
520+CHANGELOG.md:792:- New themes in `$BAT_CONFIG_DIR/themes` are now loaded *in addition* to
521+CHANGELOG.md:798:* Using `bat cache --init` leads to duplicated syntaxes, see #206
522+CHANGELOG.md:811:- The syntax highlighting theme can now be controlled by the `BAT_THEME` environment variable, see [README](https://github.com/sharkdp/bat#highlighting-theme) and #177 (@mandx)
523+CHANGELOG.md:812:- The `PAGER` and `BAT_PAGER` environment variables can be used to control the pager that `bat` uses, see #158 and the [new README section](https://github.com/sharkdp/bat#using-a-different-pager)
524+CHANGELOG.md:818:- The customization of syntax sets and theme sets is now separated. Syntax definitions are now loaded *in addition* to the ones that are stored in the `bat` binary by default. Please refer to these new sections in the README: [Adding new syntaxes](https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions), [Adding new themes](https://github.com/sharkdp/bat#adding-new-themes), also see #172
525+CHANGELOG.md:830:- `bat` is now in the official [Arch package repositories](https://www.archlinux.org/packages/community/x86_64/bat/).
526+CHANGELOG.md:839:- Fix problem with `cargo test` when `bat` is not checked out in a Git repository, see #161
527+CHANGELOG.md:874:- [Comparison with alternative projects](https://github.com/sharkdp/bat/blob/master/doc/alternatives.md).
528+CHANGELOG.md:875:- New "bat" logo in the README, see #119 (@jraulhernandezi)
529+CHANGELOG.md:895: `bat cache`. See `bat cache -h` for all available commands.
530+CHANGELOG.md:900:* Process substitution can now be used with bat (`bat <(echo a) <(echo b)`), see #80
531+CHANGELOG.md:912:- Added a new statically linked version of bat (`..-musl-..`)
532+CONTRIBUTING.md:3:Thank you for considering to contribute to `bat`!
533+CONTRIBUTING.md:9:If your contribution changes the behavior of `bat` (as opposed to a typo-fix
534+CONTRIBUTING.md:12:therefore helps to get your changes into a new `bat` release faster.
535+CONTRIBUTING.md:28:Please check out the [Development](https://github.com/sharkdp/bat#development)
536+CONTRIBUTING.md:35:[feature request ticket](https://github.com/sharkdp/bat/issues/new?assignees=&labels=feature-request&template=feature_request.md)
537+CONTRIBUTING.md:42:the [Customization](https://github.com/sharkdp/bat#customization) section
538+CONTRIBUTING.md:47:[documentation](https://github.com/sharkdp/bat/blob/master/doc/assets.md)
539+Cargo.toml:5:homepage = "https://github.com/sharkdp/bat"
540+Cargo.toml:7:name = "bat"
541+Cargo.toml:8:repository = "https://github.com/sharkdp/bat"
542+Cargo.toml:16:# Feature required for bat the application. Should be disabled when depending on
543+Cargo.toml:17:# bat as a library.
544+Cargo.toml:40:# You need to use one of these if you depend on bat as a library:
545+doc/fzf-preview.sh:6: bat \
546+doc/preview.sh:47:bat --color always \
547+doc/assets.md:3:Should you find that a particular syntax is not available within `bat` and think it should be included in `bat` by default, you can follow the instructions outlined below.
548+doc/assets.md:5:`bat` uses the excellent [syntect](https://github.com/trishume/syntect) library to highlight source
549+doc/assets.md:20:3. Run the `assets/create.sh` script. It calls `bat cache --build` to parse all available
550+doc/assets.md:23:4. Re-compile `bat`. At compilation time, the `syntaxes.bin` file will be stored inside the
551+doc/assets.md:24: `bat` binary.
552+doc/assets.md:26:5. Use `bat --list-languages` to check if the new languages are available.
553+doc/assets.md:31: file. A new binary cache file will be created once before every new release of `bat`. This
554+doc/assets.md:36:`bat` has a set of syntax highlighting regression tests in `tests/syntax-tests`. The main idea is
555+doc/assets.md:38:for some language is suddenly not working anymore or (2) `bat` suddenly crashes for some input (due
556+doc/assets.md:43:1. Make sure that you are running the **latest version of `bat`** and that `bat` is available on
557+doc/assets.md:45: your version of `bat` already has the new syntax builtin.
558+doc/assets.md:50: be `test.rb` (adapt extension) but can also be adapted if that is necessary in order for `bat` to
559+doc/assets.md:53: under the respective license and that the license is compatible with `bat`s license. If it
560+doc/assets.md:62:6. Use `cat` or `bat --language=txt` to display the content of this file and make sure that the
561+doc/assets.md:70:themes (`bat cache --clear`).
562+doc/README-ja.md:2: <img src="logo-header.svg" alt="bat - a cat clone with wings"><br>
563+doc/README-ja.md:3: <a href="https://github.com/sharkdp/bat/actions?query=workflow%3ACICD"><img src="https://github.com/sharkdp/bat/workflows/CICD/badge.svg" alt="Build Status"></a>
564+doc/README-ja.md:4: <img src="https://img.shields.io/crates/l/bat.svg" alt="license">
565+doc/README-ja.md:5: <a href="https://crates.io/crates/bat"><img src="https://img.shields.io/crates/v/bat.svg?colorB=319e8c" alt="Version info"></a><br>
566+doc/README-ja.md:16: [<a href="https://github.com/chinanf-boy/bat-zh">中文</a>]
567+doc/README-ja.md:24:`bat` は多くのプログラミング言語やマークアップ言語の
568+doc/README-ja.md:31:`bat` は `git` とも連携しており、差分を表現する記号が表示されます
569+doc/README-ja.md:45:出力が1つの画面に対して大きすぎる場合、`bat` は自身の出力をページャー(例えば `less`) にパイプで繋げます。
570+doc/README-ja.md:50:`bat` は非対話型のターミナルを検出すると(すなわち他のプロセスにパイプしたりファイル出力していると)、
571+doc/README-ja.md:51:`bat` は `cat` の完全互換として振る舞い、
572+doc/README-ja.md:59:> bat README.md
573+doc/README-ja.md:65:> bat src/*.rs
574+doc/README-ja.md:73:> curl -s https://sh.rustup.rs | bat
575+doc/README-ja.md:79:> yaml2json .travis.yml | json_pp | bat -l json
576+doc/README-ja.md:84:> bat -A /etc/hosts
577+doc/README-ja.md:87:`cat` の代わりに `bat` を使用する際の例:
578+doc/README-ja.md:90:bat > note.md # quickly create a new file
579+doc/README-ja.md:92:bat header.md content.md footer.md > document.md
580+doc/README-ja.md:94:bat -n main.rs # show line numbers (only)
581+doc/README-ja.md:96:bat f - g # output 'f', then stdin, then 'g'.
582+doc/README-ja.md:103:[`fzf`](https://github.com/junegunn/fzf) のプレビューウィンドウに `bat` を使用できます。
583+doc/README-ja.md:104:その場合、`bat` の `--color=always` オプションを用いてカラー出力を強制しなければなりません。
584+doc/README-ja.md:107:fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'
585+doc/README-ja.md:114:`find` の `-exec` オプションを使用して、`bat` ですべての検索結果をプレビューできます:
586+doc/README-ja.md:116:find … -exec bat {} +
587+doc/README-ja.md:119:[`fd`](https://github.com/sharkdp/fd) を使用している場合は、`-X` /`-exec-batch` オプションを使用して同じことを行うことができます:
588+doc/README-ja.md:121:fd … -X bat
589+doc/README-ja.md:126:[`batgrep`](https://github.com/eth-p/bat-extras/blob/master/doc/batgrep.md) では、[`ripgrep`](https://github.com/BurntSushi/ripgrep) 検索結果のプリンターとして `bat` を使用できます。
590+doc/README-ja.md:129:batgrep needle src/
591+doc/README-ja.md:134:`bat` を `tail -f` と組み合わせて、構文強調表示を使用して特定のファイルを継続的に監視できます。
592+doc/README-ja.md:136:tail -f /var/log/pacman.log | bat --paging=never -l log
593+doc/README-ja.md:142:`bat` を `git show` と組み合わせて、
594+doc/README-ja.md:145:git show v0.6.0:src/main.rs | bat -l rs
595+doc/README-ja.md:152:`bat` の出力の行番号と Git 変更マーカーにより、ファイルの内容をコピーするのが難しくなる場合があります。
596+doc/README-ja.md:153:これを防ぐには、`-p` / `-plain` オプションを使用して `bat` を呼び出すか、
597+doc/README-ja.md:156:bat main.cpp | xclip
598+doc/README-ja.md:158:`bat` は出力がリダイレクトされていることを検出し、プレーンファイルの内容を出力します。
599+doc/README-ja.md:162:`bat` は `MANPAGER` 環境変数を設定することにより、
600+doc/README-ja.md:166:export MANPAGER="sh -c 'col -bx | bat -l man -p'"
601+doc/README-ja.md:173:これを新しいコマンドにバンドルしたい場合は [`batman`](https://github.com/eth-p/bat-extras/blob/master/doc/batman.md) も使用できます。
602+doc/README-ja.md:179:[`prettybat`](https://github.com/eth-p/bat-extras/blob/master/doc/prettybat.md) スクリプトは、コードをフォーマットし、`bat` で印刷するラッパーです。
603+doc/README-ja.md:184:[![Packaging status](https://repology.org/badge/vertical-allrepos/bat.svg)](https://repology.org/project/bat/versions)
604+doc/README-ja.md:189:Ubuntu Eoan 19.10 または Debian 不安定版 sid 以降の [the Ubuntu `bat` package](https://packages.ubuntu.com/eoan/bat) または [the Debian `bat` package](https://packages.debian.org/sid/bat) からインストールできます:
605+doc/README-ja.md:192:apt install bat
606+doc/README-ja.md:195:`apt` を使用して `bat` をインストールした場合、実行可能ファイルの名前が `bat` ではなく `batcat` になることがあります([他のパッケージとの名前衝突のため](https://github.com/sharkdp/bat/issues/982))。`bat -> batcat` のシンボリックリンクまたはエイリアスを設定することで、実行可能ファイル名が異なることによる問題の発生を防ぎ、他のディストリビューションと一貫性を保てます。
607+doc/README-ja.md:199:ln -s /usr/bin/batcat ~/.local/bin/bat
608+doc/README-ja.md:205:batの最新リリースを実行する場合、または Ubuntu/Debian の古いバージョンを使用している場合は、[release page](https://github.com/sharkdp/bat/releases) から最新の `.deb` パッケージをダウンロードし、
609+doc/README-ja.md:208:sudo dpkg -i bat_0.18.3_amd64.deb # adapt version number and architecture
610+doc/README-ja.md:214:公式のソースから [`bat` package](https://pkgs.alpinelinux.org/packages?name=bat) をインストールできます:
611+doc/README-ja.md:217:apk add bat
612+doc/README-ja.md:222:[Arch Linuxの公式リソース](https://www.archlinux.org/packages/community/x86_64/bat/)
613+doc/README-ja.md:226:pacman -S bat
614+doc/README-ja.md:231:公式の [Fedora Modular](https://docs.fedoraproject.org/en-US/modularity/using-modules/) リポジトリから [the `bat` package](https://koji.fedoraproject.org/koji/packageinfo?packageID=27506) をインストールできます。
615+doc/README-ja.md:234:dnf install bat
616+doc/README-ja.md:240:[the `bat` package](https://packages.gentoo.org/packages/sys-apps/bat) をインストールできます。
617+doc/README-ja.md:243:emerge sys-apps/bat
618+doc/README-ja.md:248:xbps-install経由で `bat` をインストールできます。
619+doc/README-ja.md:250:xbps-install -S bat
620+doc/README-ja.md:255:pkg を使用してプリコンパイルされた [`bat` package](https://www.freshports.org/textproc/bat) をインストールできます:
621+doc/README-ja.md:258:pkg install bat
622+doc/README-ja.md:264:cd /usr/ports/textproc/bat
623+doc/README-ja.md:270:`bat` を [nix package manager](https://nixos.org/nix) 経由でインストールすることができます:
624+doc/README-ja.md:273:nix-env -i bat
625+doc/README-ja.md:278:`bat` をzypperでインストールすることができます:
626+doc/README-ja.md:281:zypper install bat
627+doc/README-ja.md:286:[Homebrew](http://braumeister.org/formula/bat)で `bat` をインストールできます:
628+doc/README-ja.md:289:brew install bat
629+doc/README-ja.md:292:または [MacPorts](https://ports.macports.org/port/bat/summary) で `bat` をインストールします:
630+doc/README-ja.md:295:port install bat
631+doc/README-ja.md:300:Windowsにbatをインストールするいくつかのオプションがあります。
632+doc/README-ja.md:301:batをインストールしたら [Windowsでのbatの使用](#windows-での-bat-の利用) セクションをご覧ください。
633+doc/README-ja.md:305:[Chocolatey](https://chocolatey.org/packages/Bat) から `bat` をインストールできます:
634+doc/README-ja.md:307:choco install bat
635+doc/README-ja.md:312:[scoop](https://scoop.sh/) から `bat` をインストールできます:
636+doc/README-ja.md:314:scoop install bat
637+doc/README-ja.md:321:[リリースページ](https://github.com/sharkdp/bat/releases) からビルド済みのバイナリをダウンロードできます。
638+doc/README-ja.md:327:コンテナ内で `bat` を使いたい方のために [Docker image](https://hub.docker.com/r/danlynn/bat/) が用意されています:
639+doc/README-ja.md:329:docker pull danlynn/bat
640+doc/README-ja.md:330:alias bat='docker run -it --rm -e BAT_THEME -e BAT_STYLE -e BAT_TABS -v "$(pwd):/myapp" danlynn/bat'
641+doc/README-ja.md:339:ansible-galaxy install aeimer.install_bat
642+doc/README-ja.md:344:# Playbook to install bat
643+doc/README-ja.md:347: - aeimer.install_bat
644+doc/README-ja.md:350:- [Ansible Galaxy](https://galaxy.ansible.com/aeimer/install_bat)
645+doc/README-ja.md:351:- [GitHub](https://github.com/aeimer/ansible-install-bat)
646+doc/README-ja.md:364:多くの異なるアーキテクチャのためのプレビルドバージョンを[リリースページ](https://github.com/sharkdp/bat/releases)からチェックしてみてください。静的にリンクされている多くのバイナリも利用できます: ファイル名に `musl` を含むアーカイブを探してみてください。
647+doc/README-ja.md:369:`bat` をソースからビルドしたいならば、Rust 1.36 以上の環境が必要です。
648+doc/README-ja.md:373:cargo install --locked bat
649+doc/README-ja.md:382:`bat --list-themes` を使うと現在利用可能なシンタックスハイライトのテーマを入手できます。
650+doc/README-ja.md:384:`--theme=TwoDark` オプションをつけるか `BAT_THEME` という環境変数に
651+doc/README-ja.md:385:`TwoDark` を代入する必要があります。 シェルの起動ファイルに `export BAT_THEME="TwoDark"`
652+doc/README-ja.md:386:と定義すればその設定が変わることはないでしょう。あるいは、 `bat` の
653+doc/README-ja.md:392:bat --list-themes | fzf --preview="bat --theme={} --color=always /path/to/file"
654+doc/README-ja.md:395:`bat` はデフォルトだと黒い背景色のターミナルに適しています。
655+doc/README-ja.md:402:`--style` を使うことで `bat` の表示の見た目を変更することができます。
656+doc/README-ja.md:405:環境変数に `BAT_STYLE` を定義するとこれらの設定を永続的に使用することができます。
657+doc/README-ja.md:410:`bat` はシンタックスハイライトのための [`syntect`](https://github.com/trishume/syntect/)
658+doc/README-ja.md:418:mkdir -p "$(bat --config-dir)/syntaxes"
659+doc/README-ja.md:419:cd "$(bat --config-dir)/syntaxes"
660+doc/README-ja.md:429:bat cache --build
661+doc/README-ja.md:432:最後に `bat --list-languages` と入力すると新しい言語が利用可能かどうかチェックします。
662+doc/README-ja.md:437:bat cache --clear
663+doc/README-ja.md:446:mkdir -p "$(bat --config-dir)/themes"
664+doc/README-ja.md:447:cd "$(bat --config-dir)/themes"
665+doc/README-ja.md:453:bat cache --build
666+doc/README-ja.md:456:最後に、 `bat --list-themes` で新しいテーマが利用可能かチェックします
667+doc/README-ja.md:460:`bat` は環境変数 `PAGER` に使用するページャーを明記します。
668+doc/README-ja.md:463:または、`PAGER` を上書きする環境変数として `BAT_PAGER` を定義することも可能です。
669+doc/README-ja.md:466:`PAGER`/`BAT_PAGER` 環境変数を定義してください:
670+doc/README-ja.md:469:export BAT_PAGER="less -RF"
671+doc/README-ja.md:472:環境変数を利用する代わりに、 `bat` の [設定ファイル](#設定ファイル) を使用して設定も可能です(`--pager` オプション)
672+doc/README-ja.md:475:`bat` はページャーの以下のコマンドラインオプション を受け付けるでしょう:
673+doc/README-ja.md:491:macOSでダークモード機能を使用する場合、OSテーマに基づいて異なるテーマを使用するように `bat` を構成することができます。
674+doc/README-ja.md:496:alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo default || echo GitHub)"
675+doc/README-ja.md:501:`bat` は設定ファイルでカスタマイズすることが可能です。ファイルの場所はOSに依存します。
676+doc/README-ja.md:504:bat --config-file
677+doc/README-ja.md:507:または、`BAT_CONFIG_PATH` 環境変数を使用して、`bat` が
678+doc/README-ja.md:510:export BAT_CONFIG_PATH="/path/to/bat.conf"
679+doc/README-ja.md:515:この設定ファイルはコマンドライン引数の単純なリストです。 `bat --help` を利用すると、利用可能なオプションとその値を閲覧することができます。さらに、`#` でコメント文を加えることができます。
680+doc/README-ja.md:535:## Windows での `bat` の利用
681+doc/README-ja.md:537:Windows 上で `bat` はほとんど動作しますが、いくつかの機能は設定を必要をする場合があります。
682+doc/README-ja.md:555:`BAT_PAGER` に空文字を設定することでページングを完全に無効にできます。
683+doc/README-ja.md:559:Windows上の `bat` は Cygwin のunix風のpath(`/cygdrive/*`)をネイティブサポートしていません。絶対的なcygwinパスを引数として受けたときに、 `bat` は以下のエラーを返すでしょう: `The system cannot find the path specified. (os error 3)`
684+doc/README-ja.md:564:bat() {
685+doc/README-ja.md:573: command bat "${args[@]}"
686+doc/README-ja.md:581:`bat` はターミナルがトゥルーカラーをサポートしている/していないに関係なくサポートします。
687+doc/README-ja.md:588:`24bit` のどちらかを代入してください。さもなければ、`bat` はどの色を使うのか決定することができません。または、24-bit エスケープシーケンスがサポートされません
688+doc/README-ja.md:593:異なるテーマを試してみてください(`bat --list-themes` でテーマを閲覧できます)。
689+doc/README-ja.md:598:`bat` は UTF-16 と同様に UTF-8 をネイティブにサポートします。
690+doc/README-ja.md:603:iconv -f ISO-8859-1 -t UTF-8 my-file.php | bat
691+doc/README-ja.md:605:注: `bat` が構文を自動検出できない場合は
692+doc/README-ja.md:612:git clone --recursive https://github.com/sharkdp/bat
693+doc/README-ja.md:615:cd bat
694+doc/README-ja.md:624:# Build a bat binary with modified syntaxes and themes
695+doc/README-ja.md:636:`bat` は以下の目標を達成しようと試みています:
696+doc/README-ja.md:647:Copyright (c) 2018-2021 [bat-developers](https://github.com/sharkdp/bat).
697+doc/README-ja.md:649:`bat` は MIT License 及び Apache License 2.0 の両方の条件の下で配布されています。
698+doc/README-ko.md:2: <img src="logo-header.svg" alt="bat - a cat clone with wings"><br>
699+doc/README-ko.md:3: <a href="https://github.com/sharkdp/bat/actions?query=workflow%3ACICD"><img src="https://github.com/sharkdp/bat/workflows/CICD/badge.svg" alt="Build Status"></a>
700+doc/README-ko.md:4: <img src="https://img.shields.io/crates/l/bat.svg" alt="license">
701+doc/README-ko.md:5: <a href="https://crates.io/crates/bat"><img src="https://img.shields.io/crates/v/bat.svg?colorB=319e8c" alt="Version info"></a><br>
702+doc/README-ko.md:16: [<a href="https://github.com/chinanf-boy/bat-zh">中文</a>]
703+doc/README-ko.md:24:`bat`은 다양한 프로그래밍 및 마크업 언어의 문법 강조(syntax highlighting) 기능을
704+doc/README-ko.md:31:`bat`은 `git`을 통해 인덱스와 함께 변경분을 표시합니다
705+doc/README-ko.md:44:`bat`은 기본적으로 한 화면에 비해 출력이 큰 경우 `less`와 같은 페이저(pager)로
706+doc/README-ko.md:46:만약 `bat`을 언제나 `cat`처럼 작동하게 하려면 (출력을 페이지하지 않기),
707+doc/README-ko.md:48:셸(shell) 설정에서 `cat`을 `bat`의 alias로 사용하려면,
708+doc/README-ko.md:49:`alias cat='bat --paging=never'`를 써서 기본 행동을 유지할 수 있습니다.
709+doc/README-ko.md:53:페이저(pager)를 사용하더라도 `bat`은 파일들을 연결(concatenate)할 수 있습니다
710+doc/README-ko.md:55:`bat`이 비대화형(non-interactive) 터미널(예를 들어, 다른 프로세스나 파일에
711+doc/README-ko.md:56:연결(pipe)한 경우)을 감지하면, `bat`은 `--pager` 옵션의 값과 상관없이 `cat`과
712+doc/README-ko.md:64:> bat README.md
713+doc/README-ko.md:70:> bat src/*.rs
714+doc/README-ko.md:78:> curl -s https://sh.rustup.rs | bat
715+doc/README-ko.md:84:> yaml2json .travis.yml | json_pp | bat -l json
716+doc/README-ko.md:89:> bat -A /etc/hosts
717+doc/README-ko.md:95:bat > note.md # quickly create a new file
718+doc/README-ko.md:97:bat header.md content.md footer.md > document.md
719+doc/README-ko.md:99:bat -n main.rs # show line numbers (only)
720+doc/README-ko.md:101:bat f - g # output 'f', then stdin, then 'g'.
721+doc/README-ko.md:108:`bat`을 [`fzf`](https://github.com/junegunn/fzf)의 프리뷰로 쓸 수 있습니다.
722+doc/README-ko.md:109:이를 위해서는 `bat`의 `--color=always` 옵션으로 항상 컬러 출력이 나오게 해야
723+doc/README-ko.md:113:fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'
724+doc/README-ko.md:120:`find`의 `-exec` 옵션을 사용하여 모든 검색 결과를 `bat`로 미리 볼 수 있습니다:
725+doc/README-ko.md:122:find … -exec bat {} +
726+doc/README-ko.md:125:[`fd`](https://github.com/sharkdp/fd)를 사용하는 경우, `-X`/`--exec-batch`
727+doc/README-ko.md:128:fd … -X bat
728+doc/README-ko.md:133:[`batgrep`](https://github.com/eth-p/bat-extras/blob/master/doc/batgrep.md)을
729+doc/README-ko.md:134:통해 `bat`로 [`ripgrep`](https://github.com/BurntSushi/ripgrep)의 검색 결과를
730+doc/README-ko.md:138:batgrep needle src/
731+doc/README-ko.md:143:`bat`와 `tail -f`를 함께 사용하여 주어진 파일을 문법 강조하며 지속적으로
732+doc/README-ko.md:146:tail -f /var/log/pacman.log | bat --paging=never -l log
733+doc/README-ko.md:154:`bat`과 `git show`를 함께 사용하여 주어진 파일의 이전 버전을 올바른 문법 강조로
734+doc/README-ko.md:157:git show v0.6.0:src/main.rs | bat -l rs
735+doc/README-ko.md:162:`bat`과 `git diff`를 함께 사용하여 수정된 코드 주위의 줄들을 올바른 문법 강조로
736+doc/README-ko.md:165:batdiff() {
737+doc/README-ko.md:166: git diff --name-only --diff-filter=d | xargs bat --diff
738+doc/README-ko.md:170:[`bat-extras`](https://github.com/eth-p/bat-extras)의 `batdiff`를 확인해 보세요.
739+doc/README-ko.md:177:`bat` 출력에 줄 번호와 Git 수정 내역이 포함되어서 파일의 내용을 복사하기
740+doc/README-ko.md:179:이 경우에는 `bat`의 `-p`/`--plain` 옵션을 사용하거나 간단히 `xclip`으로 출력을
741+doc/README-ko.md:182:bat main.cpp | xclip
742+doc/README-ko.md:184:`bat`는 출력이 우회되고 있다는 것을 감지하여 파일 내용 그대로를 출력합니다.
743+doc/README-ko.md:188:`MANPAGER` 환경 변수 설정을 통해 `bat`을 `man`의 컬러 페이저(pager)로 쓸 수
744+doc/README-ko.md:192:export MANPAGER="sh -c 'col -bx | bat -l man -p'"
745+doc/README-ko.md:195:(Debian이나 Ubuntu를 사용한다면 `bat`을 `batcat`으로 치환하세요.)
746+doc/README-ko.md:200:[`batman`](https://github.com/eth-p/bat-extras/blob/master/doc/batman.md)을 쓸
747+doc/README-ko.md:207:[작동하지 않습니다](https://github.com/sharkdp/bat/issues/1145).
748+doc/README-ko.md:211:[`prettybat`](https://github.com/eth-p/bat-extras/blob/master/doc/prettybat.md)
749+doc/README-ko.md:212:스크립트는 코드를 포맷하고 `bat`으로 출력하는 래퍼(wrapper)입니다.
750+doc/README-ko.md:217:[![Packaging status](https://repology.org/badge/vertical-allrepos/bat-cat.svg)](https://repology.org/project/bat-cat/versions)
751+doc/README-ko.md:222:`bat`은 [Ubuntu](https://packages.ubuntu.com/eoan/bat)와
752+doc/README-ko.md:223:[Debian](https://packages.debian.org/sid/bat) 패키지 배포 과정에 도입되는 중이며,
753+doc/README-ko.md:225:현재 Debain에서는 불안정한 "Sid" 브랜치에서만 `bat`이 제공됩니다.
754+doc/README-ko.md:230:apt install bat
755+doc/README-ko.md:233:**중요**: 만약 `bat`을 이와 같이 설치한다면, ([다른 패키지와의 이름
756+doc/README-ko.md:234:충돌](https://github.com/sharkdp/bat/issues/982)로 인하여) `bat` 대신에
757+doc/README-ko.md:235:`batcat`이라는 이름의 실행 파일로 설치될 수 있음을 참고하세요.
758+doc/README-ko.md:236:이에 따른 문제들과 다른 배포판들과의 일관성을 위하여 `bat -> batcat` symlink
759+doc/README-ko.md:240:ln -s /usr/bin/batcat ~/.local/bin/bat
760+doc/README-ko.md:247:`bat`을 원한다면, [릴리즈 페이지](https://github.com/sharkdp/bat/releases)에서
761+doc/README-ko.md:251:sudo dpkg -i bat_0.18.3_amd64.deb # adapt version number and architecture
762+doc/README-ko.md:257:[`bat` 패키지](https://pkgs.alpinelinux.org/packages?name=bat)를 설치할 수
763+doc/README-ko.md:261:apk add bat
764+doc/README-ko.md:267:[`bat` 패키지](https://www.archlinux.org/packages/community/x86_64/bat/)를
765+doc/README-ko.md:271:pacman -S bat
766+doc/README-ko.md:279:[`bat` 패키지](https://koji.fedoraproject.org/koji/packageinfo?packageID=27506)를
767+doc/README-ko.md:283:dnf install bat
768+doc/README-ko.md:288:dev-kit을 통해 [`bat` 패키지](https://github.com/funtoo/dev-kit/tree/1.4-release/sys-apps/bat)를 설치할 수 있습니다:
769+doc/README-ko.md:291:emerge sys-apps/bat
770+doc/README-ko.md:297:[`bat` 패키지](https://packages.gentoo.org/packages/sys-apps/bat)를 설치할 수
771+doc/README-ko.md:301:emerge sys-apps/bat
772+doc/README-ko.md:306:xbps-install을 이용해 `bat`을 설치할 수 있습니다:
773+doc/README-ko.md:308:xbps-install -S bat
774+doc/README-ko.md:313:pkg를 이용해 `bat`을 설치할 수 있습니다:
775+doc/README-ko.md:315:pkg install bat
776+doc/README-ko.md:321:[`bat` 패키지](https://www.freshports.org/textproc/bat)를 설치할 수 있습니다:
777+doc/README-ko.md:324:pkg install bat
778+doc/README-ko.md:330:cd /usr/ports/textproc/bat
779+doc/README-ko.md:336:[nix package manager](https://nixos.org/nix)를 이용해 `bat`을 설치할 수
780+doc/README-ko.md:340:nix-env -i bat
781+doc/README-ko.md:345:zypper를 이용해 `bat`을 설치할 수 있습니다:
782+doc/README-ko.md:348:zypper install bat
783+doc/README-ko.md:355:[문제](https://github.com/sharkdp/bat/issues/1519)가 있을 수 있습니다.
784+doc/README-ko.md:360:[macOS의 Homebrew](https://formulae.brew.sh/formula/bat) 또는
785+doc/README-ko.md:361:[Linux의 Homebrew](https://formulae.brew.sh/formula-linux/bat)를 이용하여
786+doc/README-ko.md:362:`bat`을 설치할 수 있습니다.
787+doc/README-ko.md:365:brew install bat
788+doc/README-ko.md:370:[MacPorts](https://ports.macports.org/port/bat/summary)를 이용하여 `bat`을
789+doc/README-ko.md:374:port install bat
790+doc/README-ko.md:379:Windows에서 `bat`을 설치할 수 있는 몇 가지 옵션들이 있습니다.
791+doc/README-ko.md:380:먼저 `bat`을 설치한 후,
792+doc/README-ko.md:381:["Windows에서 `bat` 사용하기"](#windows에서-bat-사용하기) 섹션을 살펴보세요.
793+doc/README-ko.md:390:[Chocolatey](https://chocolatey.org/packages/Bat)를 이용해 `bat`을 설치할 수
794+doc/README-ko.md:393:choco install bat
795+doc/README-ko.md:398:[scoop](https://scoop.sh/)을 이용해 `bat`을 설치할 수 있습니다:
796+doc/README-ko.md:400:scoop install bat
797+doc/README-ko.md:405:[릴리즈 페이지](https://github.com/sharkdp/bat/releases)에서 사전 빌드된
798+doc/README-ko.md:413:[릴리즈 페이지](https://github.com/sharkdp/bat/releases)에서 다양한 아키텍처를
799+doc/README-ko.md:419:`bat`의 소스를 빌드하기 위해서는, Rust 1.46 이상이 필요합니다.
800+doc/README-ko.md:423:cargo install --locked bat
801+doc/README-ko.md:435:`bat --list-themes`을 사용하여 사용 가능한 문법 강조 테마들의 목록을 확인할 수
802+doc/README-ko.md:437:`TwoDark` 테마를 선택하려면, `--theme=TwoDark` 옵션과 함께 `bat`을 사용하거나
803+doc/README-ko.md:438:`BAT_THEME` 환경 변수를 `TwoDark`로 설정하세요.
804+doc/README-ko.md:439:셸 시작 파일에 `export BAT_THEME="TwoDark"` 를 정의해 영구적으로 설정할 수
805+doc/README-ko.md:441:이 밖에 `bat`의 [설정 파일](#설정-파일)을 이용할 수 있습니다.
806+doc/README-ko.md:447:bat --list-themes | fzf --preview="bat --theme={} --color=always /path/to/file"
807+doc/README-ko.md:450:`bat`은 기본적으로 어두운 배경에 적합합니다.
808+doc/README-ko.md:458:`bat`은 트루컬러 지원이 되더라도 항상
809+doc/README-ko.md:478:- 만약 터미널 테마를 바꾼다면, 이미 화면 상의 `bat`의 출력도 이에 맞추어
810+doc/README-ko.md:483:`--style` 옵션을 이용하면 `bat`의 출력 모양을 조절할 수 있습니다.
811+doc/README-ko.md:486:`BAT_STYLE` 환경 변수를 정의하여 이러한 수정을 영구적으로 하거나 `bat`의
812+doc/README-ko.md:491:만약 `bat`에서 특정 문법이 지원되지 않을 경우, 다음의 절차를 통해 현재 `bat`
813+doc/README-ko.md:494:`bat`은 문법 강조를 위해 훌륭한
814+doc/README-ko.md:506: mkdir -p "$(bat --config-dir)/syntaxes"
815+doc/README-ko.md:507: cd "$(bat --config-dir)/syntaxes"
816+doc/README-ko.md:517: bat cache --build
817+doc/README-ko.md:520:3. 마지막으로, `bat --list-languages`로 새로 추가한 언어가 사용 가능한지
818+doc/README-ko.md:526: bat cache --clear
819+doc/README-ko.md:529:4. 만약 특정 문법이 `bat`에 기본적으로 포함되어 있어야 한다고 생각한다면, 방침과
820+doc/README-ko.md:531: 주세요: [문법 요청하기](https://github.com/sharkdp/bat/issues/new?labels=syntax-request&template=syntax_request.md).
821+doc/README-ko.md:539:mkdir -p "$(bat --config-dir)/themes"
822+doc/README-ko.md:540:cd "$(bat --config-dir)/themes"
823+doc/README-ko.md:546:bat cache --build
824+doc/README-ko.md:549:마지막으로 `bat --list-themes`을 통해 새로 추가한 테마들이 사용 가능한지
825+doc/README-ko.md:559:(`bat --list-languages`를 통해 개요를 확인하세요).
826+doc/README-ko.md:561:참고: 이 옵션은 커맨드 라인에 넘겨 주는 것보다는 `bat`의 설정 파일에 넣는 것이
827+doc/README-ko.md:584:`bat`은 환경 변수 `PAGER`에 명시된 페이저를 사용합니다.
828+doc/README-ko.md:586:만약 다른 페이저를 사용하고 싶다면, `PAGER` 변수를 수정하거나 `BAT_PAGER` 환경
829+doc/README-ko.md:589:만약 커맨드라인 인수들을 페이저에게 넘겨 주려면, `PAGER`/`BAT_PAGER` 변수로
830+doc/README-ko.md:593:export BAT_PAGER="less -RF"
831+doc/README-ko.md:596:환경 변수를 사용하는 대신, `bat`의 [설정 파일](#설정-파일)로 페이저를 설정할
832+doc/README-ko.md:600:옵션이 지정되어 있지 않다면), `bat`은 다음 옵션들을 페이저로 넘겨줍니다:
833+doc/README-ko.md:619:`bat`은 페이저에 의존하지 않고 탭을 4 스페이스로 확장합니다.
834+doc/README-ko.md:623:**참고**: (`bat`의 `--pager` 인자 혹은 `less`의 `LESS` 환경 변수를 통해)
835+doc/README-ko.md:627:`bat`을 `--tabs=0`과 함께 호출하면 이를 오버라이드하여 페이저가 탭을 처리하게
836+doc/README-ko.md:632:macOS에서 다크 모드를 사용하고 있다면, `bat`가 OS 테마에 따라 다른 테마를
837+doc/README-ko.md:638:alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo default || echo GitHub)"
838+doc/README-ko.md:643:`bat`는 설정 파일로도 사용자화 할 수 있습니다.
839+doc/README-ko.md:647:bat --config-file
840+doc/README-ko.md:650:또는, `BAT_CONFIG_PATH` 환경 변수를 사용하여 `bat`가 설정 파일의 기본 경로
841+doc/README-ko.md:653:export BAT_CONFIG_PATH="/path/to/bat.conf"
842+doc/README-ko.md:658:bat --generate-config-file
843+doc/README-ko.md:664:`bat --help`로 가능한 모든 옵션과 값들을 확인하세요.
844+doc/README-ko.md:682:## Windows에서 `bat` 사용하기
845+doc/README-ko.md:684:`bat`는 대부분의 경우 Windows에서 기본적으로 잘 작동하지만, 일부 기능은 추가적인
846+doc/README-ko.md:715:`BAT_PAGER`을 빈 문자열로 설정하여 페이징을 완전히 비활성화 할 수 있습니다.
847+doc/README-ko.md:719:Windows에서의 `bat`은 기본적으로 Cygwin의 unix 스타일 경로(`/cygdrive/*`)를
848+doc/README-ko.md:721:Cygwin 절대 경로를 인자로 받았을 때, `bat`은 다음과 같은 오류를 반환합니다:
849+doc/README-ko.md:728:bat() {
850+doc/README-ko.md:737: command bat "${args[@]}"
851+doc/README-ko.md:745:`bat`은 터미널의 트루컬러 지원 여부와 상관 없이 동작합니다.
852+doc/README-ko.md:754:그렇지 않을 경우, `bat`은 24비트 확장열(escape sequence)이 지원되는지 여부를
853+doc/README-ko.md:759:다른 테마를 사용해 보세요 (`bat --list-themes`에서 목록을 볼 수 있습니다).
854+doc/README-ko.md:764:`bat`은 기본적으로 UTF-8과 UTF-16을 지원합니다.
855+doc/README-ko.md:770:iconv -f ISO-8859-1 -t UTF-8 my-file.php | bat
856+doc/README-ko.md:772:참고: `bat`으로 문법 자동 감지가 되지 않는 경우에는 `-l`/`--language` 옵션을
857+doc/README-ko.md:779:git clone --recursive https://github.com/sharkdp/bat
858+doc/README-ko.md:782:cd bat
859+doc/README-ko.md:791:# 수정된 문법과 테마가 적용된 bat 바이너리 빌드
860+doc/README-ko.md:796:`bat`의 pretty-printing 기능을 라이브러리로 사용하는 애플리케이션을 만들고
861+doc/README-ko.md:797:싶다면, [API 문서](https://docs.rs/bat/)를 살펴보세요.
862+doc/README-ko.md:798:참고로 `bat`에 라이브러리로써 의존한다면, `regex-onig`나 `regex-fancy`를
863+doc/README-ko.md:814:만약 `bat`의 취약점을 발견하였다면, [David Peter](https://david-peter.de/)에게 메일로 연락주시기 바랍니다.
864+doc/README-ko.md:818:`bat`은 다음과 같은 목표를 달성하려고 합니다:
865+doc/README-ko.md:829:Copyright (c) 2018-2021 [bat-developers](https://github.com/sharkdp/bat).
866+doc/README-ko.md:831:`bat`는 여러분의 선택에 따라 MIT 라이센스 또는 Apache 라이센스 2.0의 조건에 따라
867+doc/alternatives.md:3:The following table tries to give an overview *from `bat`s perspective*, i.e. we only compare
868+doc/alternatives.md:4:categories which are relevant for `bat`. Some of these projects have completely different goals and
869+doc/alternatives.md:5:if you are not looking for a program like `bat`, this comparison might not be for you.
870+doc/alternatives.md:7:| | bat | [pygments](http://pygments.org/) | [highlight](http://www.andre-simon.de/doku/highlight/highlight.php) | [ccat](https://github.com/jingweno/ccat) | [source-highlight](https://www.gnu.org/software/src-highlite/) | [hicat](https://github.com/rstacruz/hicat) | [coderay](https://github.com/rubychan/coderay) | [rouge](https://github.com/jneen/rouge) |
871+doc/alternatives.md:9:| Drop-in `cat` replacement | :heavy_check_mark: [*](https://github.com/sharkdp/bat/issues/134) | :x: | :x: | (:heavy_check_mark:) | :x: | :x: [*](https://github.com/rstacruz/hicat/issues/6) | :x: | :x: |
872+doc/alternatives.md:43:cmd_bat="bat --style=full --color=always --paging=never '$SRC'"
873+doc/alternatives.md:44:cmd_bat_simple="bat --plain --wrap=never --tabs=0 --color=always --paging=never '$SRC'"
874+doc/alternatives.md:54: "$cmd_bat" \
875+doc/alternatives.md:55: "$cmd_bat_simple" \
876+doc/README-ru.md:2: <img src="logo-header.svg" alt="bat - a cat clone with wings"><br>
877+doc/README-ru.md:3: <a href="https://github.com/sharkdp/bat/actions?query=workflow%3ACICD"><img src="https://github.com/sharkdp/bat/workflows/CICD/badge.svg" alt="Build Status"></a>
878+doc/README-ru.md:4: <img src="https://img.shields.io/crates/l/bat.svg" alt="license">
879+doc/README-ru.md:5: <a href="https://crates.io/crates/bat"><img src="https://img.shields.io/crates/v/bat.svg?colorB=319e8c" alt="Version info"></a><br>
880+doc/README-ru.md:16: [<a href="https://github.com/chinanf-boy/bat-zh">中文</a>]
881+doc/README-ru.md:24:`bat` поддерживает выделение синтаксиса для огромного количества языков программирования и разметки:
882+doc/README-ru.md:29:`bat` использует `git`, чтобы показать изменения в коде
883+doc/README-ru.md:42:`bat` умеет перенаправлять вывод в `less`, если вывод не помещается на экране полностью.
884+doc/README-ru.md:47:`bat` обнаружит неинтерактивный терминал (например, когда вы перенаправляете вывод в файл или процесс), он будет работать как утилита `cat` и выведет содержимое файлов как обычный текст (без подсветки синтаксиса).
885+doc/README-ru.md:54:> bat README.md
886+doc/README-ru.md:60:> bat src/*.rs
887+doc/README-ru.md:66:> curl -s https://sh.rustup.rs | bat
888+doc/README-ru.md:72:> yaml2json .travis.yml | json_pp | bat -l json
889+doc/README-ru.md:77:> bat -A /etc/hosts
890+doc/README-ru.md:83:bat > note.md # мгновенно создаем новый файл
891+doc/README-ru.md:85:bat header.md content.md footer.md > document.md
892+doc/README-ru.md:87:bat -n main.rs # показываем только количество строк
893+doc/README-ru.md:89:bat f - g # выводит 'f' в stdin, а потом 'g'.
894+doc/README-ru.md:96:Вы можете использовать флаг `-exec` в `find`, чтобы посмотреть превью всех файлов в `bat`
895+doc/README-ru.md:98:find … -exec bat {} +
896+doc/README-ru.md:101:Если вы используете [`fd`](https://github.com/sharkdp/fd), применяйте для этого флаг `-X`/`--exec-batch`:
897+doc/README-ru.md:103:fd … -X bat
898+doc/README-ru.md:108:С помощью [`batgrep`](https://github.com/eth-p/bat-extras/blob/master/doc/batgrep.md), `bat` может быть использован для вывода результата запроса [`ripgrep`](https://github.com/BurntSushi/ripgrep)
899+doc/README-ru.md:111:batgrep needle src/
900+doc/README-ru.md:116:`bat` может быть использован вместе с `tail -f`, чтобы выводить содержимое файла с подсветкой синтаксиса в реальном времени.
901+doc/README-ru.md:118:tail -f /var/log/pacman.log | bat --paging=never -l log
902+doc/README-ru.md:124:Вы можете использовать `bat` с `git show`, чтобы просмотреть старую версию файла с выделением синтаксиса:
903+doc/README-ru.md:126:git show v0.6.0:src/main.rs | bat -l rs
904+doc/README-ru.md:136:bat main.cpp | xclip
905+doc/README-ru.md:138:`bat` обнаружит перенаправление вывода и выведет обычный текст без выделения синтаксиса.
906+doc/README-ru.md:142:`bat` может быть использован в виде выделения цвета для `man`, для этого установите переменную окружения
907+doc/README-ru.md:146:export MANPAGER="sh -c 'col -bx | bat -l man -p'"
908+doc/README-ru.md:152:Если вы хотите сделать этой одной командой, вы можете использовать [`batman`](https://github.com/eth-p/bat-extras/blob/master/doc/batman.md).
909+doc/README-ru.md:158:[`Prettybat`](https://github.com/eth-p/bat-extras/blob/master/doc/prettybat.md) — скрипт, который форматирует код и выводит его с помощью `bat`.
910+doc/README-ru.md:163:[![Packaging status](https://repology.org/badge/vertical-allrepos/bat.svg)](https://repology.org/project/bat/versions)
911+doc/README-ru.md:168:`bat` есть в репозиториях [Ubuntu](https://packages.ubuntu.com/eoan/bat) и
912+doc/README-ru.md:169:[Debian](https://packages.debian.org/sid/bat) и доступен начиная с Ubuntu Eoan 19.10. На Debian `bat` пока что доступен только с нестабильной веткой "Sid".
913+doc/README-ru.md:171:Если ваша версия Ubuntu/Debian достаточно новая, вы можете установить `bat` так:
914+doc/README-ru.md:174:apt install bat
915+doc/README-ru.md:177:Если вы установили `bat` таким образом, то бинарный файл может быть установлен как `batcat` вместо `bat` (из-за [конфликта имени с другим пакетом](https://github.com/sharkdp/bat/issues/982)). Вы можете сделать симлинк или алиас `bat -> batcat`, чтобы предотвратить подобные проблемы и в других дистрибутивах.
916+doc/README-ru.md:181:ln -s /usr/bin/batcat ~/.local/bin/bat
917+doc/README-ru.md:187:Если пакет еще недоступен в вашем Ubuntu/Debian дистрибутиве или вы хотите установить самую последнюю версию `bat`, то вы можете скачать самый последний `deb`-пакет отсюда:
918+doc/README-ru.md:188:[release page](https://github.com/sharkdp/bat/releases) и установить так:
919+doc/README-ru.md:191:sudo dpkg -i bat_0.18.3_amd64.deb # измените архитектуру и версию
920+doc/README-ru.md:196:Вы можете установить [`bat`](https://pkgs.alpinelinux.org/packages?name=bat) из официальных источников:
921+doc/README-ru.md:199:apk add bat
922+doc/README-ru.md:204:Вы можете установить [`bat`](https://www.archlinux.org/packages/community/x86_64/bat/) из официального источника:
923+doc/README-ru.md:207:pacman -S bat
924+doc/README-ru.md:212:Вы можете установить [`bat`](https://koji.fedoraproject.org/koji/packageinfo?packageID=27506) из официального репозитория [Fedora Modular](https://docs.fedoraproject.org/en-US/modularity/using-modules/).
925+doc/README-ru.md:215:dnf install bat
926+doc/README-ru.md:220:Вы можете установить [`bat`](https://packages.gentoo.org/packages/sys-apps/bat) из официальных источников:
927+doc/README-ru.md:223:emerge sys-apps/bat
928+doc/README-ru.md:228:Вы можете установить `bat` с помощью `xbps-install`:
929+doc/README-ru.md:230:xbps-install -S bat
930+doc/README-ru.md:235:Вы можете установить [`bat`](https://www.freshports.org/textproc/bat) с помощью `pkg`:
931+doc/README-ru.md:238:pkg install bat
932+doc/README-ru.md:244:cd /usr/ports/textproc/bat
933+doc/README-ru.md:250:Вы можете установить `bat`, используя [nix package manager](https://nixos.org/nix):
934+doc/README-ru.md:253:nix-env -i bat
935+doc/README-ru.md:258:Вы можете установить `bat` с помощью `zypper`:
936+doc/README-ru.md:261:zypper install bat
937+doc/README-ru.md:266:Вы можете установить `bat` с помощью [Homebrew](http://braumeister.org/formula/bat):
938+doc/README-ru.md:269:brew install bat
939+doc/README-ru.md:272:Или же установить его с помощью [MacPorts](https://ports.macports.org/port/bat/summary):
940+doc/README-ru.md:275:port install bat
941+doc/README-ru.md:280:Есть несколько способов установить `bat`. Как только вы установили его, посмотрите на секцию ["Использование `bat` в Windows"](#using-bat-on-windows).
942+doc/README-ru.md:284:Вы можете установить `bat` с помощью [Chocolatey](https://chocolatey.org/packages/Bat):
943+doc/README-ru.md:286:choco install bat
944+doc/README-ru.md:291:Вы можете установить `bat` с помощью [scoop](https://scoop.sh/):
945+doc/README-ru.md:293:scoop install bat
946+doc/README-ru.md:300:Их вы можете скачать на [странице релизов](https://github.com/sharkdp/bat/releases).
947+doc/README-ru.md:306:Вы можете использовать [Docker image](https://hub.docker.com/r/danlynn/bat/), чтобы запустить `bat` в контейнере:
948+doc/README-ru.md:308:docker pull danlynn/bat
949+doc/README-ru.md:309:alias bat='docker run -it --rm -e BAT_THEME -e BAT_STYLE -e BAT_TABS -v "$(pwd):/myapp" danlynn/bat'
950+doc/README-ru.md:314:Вы можете установить `bat` с [Ansible](https://www.ansible.com/):
951+doc/README-ru.md:318:ansible-galaxy install aeimer.install_bat
952+doc/README-ru.md:323:# Playbook для установки bat
953+doc/README-ru.md:326: - aeimer.install_bat
954+doc/README-ru.md:329:- [Ansible Galaxy](https://galaxy.ansible.com/aeimer/install_bat)
955+doc/README-ru.md:330:- [GitHub](https://github.com/aeimer/ansible-install-bat)
956+doc/README-ru.md:342:Перейдите на [страницу релизов](https://github.com/sharkdp/bat/releases) для
957+doc/README-ru.md:343:скомпилированных файлов `bat` для различных платформ. Бинарные файлы со статической связкой так же доступны: выбирайте архив с `musl` в имени.
958+doc/README-ru.md:347:Если вы желаете установить `bat` из исходников, вам понадобится Rust 1.46 или выше. После этого используйте `cargo`, чтобы все скомпилировать:
959+doc/README-ru.md:350:cargo install --locked bat
960+doc/README-ru.md:357:Используйте `bat --list-themes`, чтобы вывести список всех доступных тем. Для выбора темы `TwoDark` используйте `bat` с флагом
961+doc/README-ru.md:358:`--theme=TwoDark` или выставьте переменную окружения `BAT_THEME` в `TwoDark`. Используйте `export BAT_THEME="TwoDark"` в конфигурационном файле вашей оболочки, чтобы изменить ее навсегда. Или же используйте [конфигурационный файл](https://github.com/sharkdp/bat#configuration-file) `bat`.
962+doc/README-ru.md:362:bat --list-themes | fzf --preview="bat --theme={} --color=always /путь/к/файлу"
963+doc/README-ru.md:365:`bat` отлично смотрится на темном фоне. Однако если ваш терминал использует светлую тему, то такие темы как `GitHub` или `OneHalfLight` будут смотреться куда лучше!
964+doc/README-ru.md:366:Вы также можете использовать новую тему, для этого перейдите [в раздел добавления тем](https://github.com/sharkdp/bat#добавление-новых-тем).
965+doc/README-ru.md:370:Вы можете использовать флаг `--style`, чтобы изменять внешний вид вывода в `bat`.
966+doc/README-ru.md:371:Например, вы можете использовать `--style=numbers,changes`, чтобы показать только количество строк и изменений в Git. Установите переменную окружения `BAT_STYLE` чтобы изменить это навсегда, или используйте [конфиг файл](https://github.com/sharkdp/bat#configuration-file) `bat`.
967+doc/README-ru.md:375:`bat` использует [`syntect`](https://github.com/trishume/syntect/) для выделения синтаксиса. `syntect` может читать
968+doc/README-ru.md:382:mkdir -p "$(bat --config-dir)/syntaxes"
969+doc/README-ru.md:383:cd "$(bat --config-dir)/syntaxes"
970+doc/README-ru.md:393:bat cache --build
971+doc/README-ru.md:396:Теперь вы можете использовать `bat --list-languages`, чтобы проверить, доступны ли новые языки.
972+doc/README-ru.md:401:bat cache --clear
973+doc/README-ru.md:410:mkdir -p "$(bat --config-dir)/themes"
974+doc/README-ru.md:411:cd "$(bat --config-dir)/themes"
975+doc/README-ru.md:417:bat cache --build
976+doc/README-ru.md:420:Теперь используйте `bat --list-themes`, чтобы проверить доступность новых тем.
977+doc/README-ru.md:424:`bat` использует пейджер, указанный в переменной окружения `PAGER`. Если она не задана, то используется `less`.
978+doc/README-ru.md:425:Если вы желаете использовать другой пейджер, вы можете либо изменить переменную `PAGER`, либо `BAT_PAGER` чтобы перезаписать то, что указано в `PAGER`.
979+doc/README-ru.md:430:export BAT_PAGER="less -RF"
980+doc/README-ru.md:433:Так же вы можете использовать [файл конфигурации](https://github.com/sharkdp/bat#configuration-file) `bat` (флаг `--pager`).
981+doc/README-ru.md:436:`bat` задаст следующие флаги для пейджера:
982+doc/README-ru.md:449:Если вы используете темный режим в macOS, возможно вы захотите чтобы `bat` использовал другую тему, основанную на теме вашей ОС. Следующий сниппет использует тему `default`, когда у вас включен темный режим, и тему `GitHub`, когда включен светлый.
983+doc/README-ru.md:452:alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo default || echo GitHub)"
984+doc/README-ru.md:457:`bat` также может быть кастомизирован с помощью файла конфигурации. Его местоположение зависит от вашей ОС: чтобы посмотреть его путь, введите
985+doc/README-ru.md:459:bat --config-file
986+doc/README-ru.md:462:Также вы можете установить переменную окружения `BAT_CONFIG_PATH`, чтобы изменить путь к файлу конфигурации.
987+doc/README-ru.md:464:export BAT_CONFIG_PATH="/path/to/bat.conf"
988+doc/README-ru.md:469:bat --generate-config-file
989+doc/README-ru.md:474:Файл конфигурации - это всего лишь набор аргументов. Введите `bat --help`, чтобы просмотреть список всех возможных флагов и аргументов. Также вы можете закомментировать строку с помощью `#`.
990+doc/README-ru.md:494:## Использование `bat` в Windows
991+doc/README-ru.md:496:`bat` полностью работоспособен "из коробки", но для некоторых возможностей могут понадобиться дополнительные настройки.
992+doc/README-ru.md:509:или установить `BAT_PAGER` равным пустой строке.
993+doc/README-ru.md:513:Из коробки `bat` не поддерживает пути в стиле Unix (`/cygdrive/*`). Когда указан абсолютный путь cygwin, `bat` выдаст следующую ошибку: `The system cannot find the path specified. (os error 3)`
994+doc/README-ru.md:518:bat() {
995+doc/README-ru.md:527: command bat "${args[@]}"
996+doc/README-ru.md:535:`bat` поддерживает терминалы *с* и *без* поддержки truecolor. Однако подсветка синтаксиса не оптимизирована для терминалов с 8-битными цветами, и рекомендуется использовать терминалы с поддержкой 24-битных цветов (`terminator`, `konsole`, `iTerm2`, ...).
997+doc/README-ru.md:539:`24bit`. Иначе `bat` не сможет определить поддержку 24-битных цветов (и будет использовать 8-битные).
998+doc/README-ru.md:543:Используйте другую тему (`bat --list-themes` выведет список всех установленных тем). Темы `OneHalfDark` и
999+doc/README-ru.md:548:`bat` поддерживает UTF-8 и UTF-16. Файлы в других кодировках, возможно, придётся перекодировать, так как кодировка может быть распознана неверно. Используйте `iconv`.
1000+doc/README-ru.md:551:iconv -f ISO-8859-1 -t UTF-8 my-file.php | bat
1001+doc/README-ru.md:553:Внимание: вам может понадобится флаг `-l`/`--language`, если `bat` не сможет автоматически определить синтаксис.
1002+doc/README-ru.md:559:git clone --recursive https://github.com/sharkdp/bat
1003+doc/README-ru.md:562:cd bat
1004+doc/README-ru.md:571:# Компилирование исполняего файла bat с другим синтаксисом и темами
1005+doc/README-ru.md:583:Цели проекта `bat`:
1006+doc/README-ru.md:590:Есть очень много альтернатив `bat`. Смотрите [этот документ](doc/alternatives.md) для сравнения.
1007+doc/README-ru.md:593:Copyright (c) 2018-2021 [Разработчики bat](https://github.com/sharkdp/bat).
1008+doc/README-ru.md:595:`bat` распостраняется под лицензями MIT License и Apache License 2.0 (на выбор пользователя).
1009+doc/release-checklist.md:5:See this page for a good overview: https://deps.rs/repo/github/sharkdp/bat
1010+doc/release-checklist.md:27: sure that it is available on the `PATH` (`bat --version` should show the
1011+doc/release-checklist.md:41: this, install the latest `bat` version again (to include the new synaxes
1012+doc/release-checklist.md:50:- [ ] Go to https://github.com/sharkdp/bat/releases/new to create the new
1013+Cargo.lock:85:name = "bat"
1014+LICENSE-MIT:1:Copyright (c) 2018-2021 bat-developers (https://github.com/sharkdp/bat).
1015+assets/themes/Coldark/README.md:5:# Coldark - Bat
1016+assets/themes/Coldark/README.md:7:![GitHub License](https://img.shields.io/github/license/ArmandPhilippot/coldark-bat?colorA=111b27&color=d0dae7&logo=Github&logoColor=e3eaf2&style=for-the-badge) ![GitHub package.json version](https://img.shields.io/github/package-json/v/ArmandPhilippot/coldark-bat?colorA=111b27&color=d0dae7&logo=Github&logoColor=e3eaf2&style=for-the-badge)
1017+assets/themes/Coldark/README.md:15:This Coldark version is designed for [bat](https://github.com/sharkdp/bat) command.
1018+assets/themes/Coldark/README.md:21:The `bat` version uses almost the same colors as [VS code version](https://github.com/ArmandPhilippot/coldark-vscode). The scopes seems a little different and a little less complete, hence the difference.
1019+assets/themes/Coldark/README.md:69:1. Install `bat` (on Manjaro: `pacman -S bat`)
1020+assets/themes/Coldark/README.md:70:2. Create themes folder: `mkdir -p "$(bat --config-dir)/themes"`
1021+assets/themes/Coldark/README.md:71:3. Go inside this new folder: `cd "$(bat --config-dir)/themes"`
1022+assets/themes/Coldark/README.md:72:4. Clone this repo: `git clone https://github.com/ArmandPhilippot/coldark-bat`
1023+assets/themes/Coldark/README.md:73:5. Update the binary cache: `bat cache --build`
1024+assets/themes/Coldark/README.md:75:Then, if you use `bat --list-themes`, you should see the themes.
1025+assets/themes/Coldark/README.md:77:Coldark Bat is now present in [bat repo](https://github.com/sharkdp/bat). It may be present in the list of themes in a future version without having to install it manually.
1026+assets/themes/Coldark/README.md:81:To select one of the Coldark themes, call `bat` with the `--theme=Coldark-Cold` (or `--theme=Coldark-Dark`) option or set the `BAT_THEME` environment variable to `Coldark-Cold` (or `Coldark-Dark`). Use `export BAT_THEME="Coldark-Cold"` (or `export BAT_THEME="Coldark-Dark"`) in your shell's startup file to make the change permanent.
1027+assets/themes/Coldark/README.md:91:| [![Coldark Cold PHP](./assets/coldark-cold-bat-php.jpg)](./assets/coldark-cold-bat-php.jpg) | [![Coldark Cold Markdown](./assets/coldark-cold-bat-markdown.jpg)](./assets/coldark-cold-bat-markdown.jpg) |
1028+assets/themes/Coldark/README.md:97:| [![Coldark Dark PHP](./assets/coldark-dark-bat-php.jpg)](./assets/coldark-dark-bat-php.jpg) | [![Coldark Dark Markdown](./assets/coldark-dark-bat-markdown.jpg)](./assets/coldark-dark-bat-markdown.jpg) |
1029+assets/themes/Coldark/README.md:101:This project is open source and available under the [MIT License](https://github.com/ArmandPhilippot/coldark-bat/blob/master/LICENSE).
1030+assets/themes/Coldark/Coldark-Cold.tmTheme:6: Project: Coldark Bat
1031+assets/themes/Coldark/Coldark-Cold.tmTheme:7: Repository: https://github.com/ArmandPhilippot/coldark-bat
1032+assets/themes/Coldark/package.json:2: "name": "coldark-bat",
1033+assets/themes/Coldark/package.json:15: "homepage": "https://github.com/ArmandPhilippot/coldark-bat#readme",
1034+assets/themes/Coldark/package.json:18: "url": "https://github.com/ArmandPhilippot/coldark-bat"
1035+assets/themes/Coldark/package.json:21: "url": "https://github.com/ArmandPhilippot/coldark-bat/issues"
1036+assets/themes/Coldark/CHANGELOG.md:10:## [v1.0.5](https://github.com/ArmandPhilippot/coldark-bat/compare/v1.0.4...v1.0.5)
1037+assets/themes/Coldark/CHANGELOG.md:19:- fix: change red color for both versions [`93ee1f3`](https://github.com/ArmandPhilippot/coldark-bat/commit/93ee1f3fb5e08ecf66baee03dd3900c0abcdc1e9)
1038+assets/themes/Coldark/CHANGELOG.md:21:## [v1.0.4](https://github.com/ArmandPhilippot/coldark-bat/compare/v1.0.3...v1.0.4) - 2020-10-28
1039+assets/themes/Coldark/CHANGELOG.md:25:- Update Coldark Colors / Complete Markdown syntax highlighting [`a355b1d`](https://github.com/ArmandPhilippot/coldark-bat/commit/a355b1d75611d12d322dd47f2ea7799b663a7738)
1040+assets/themes/Coldark/CHANGELOG.md:26:- Update colors, logo, banner & add some screenshots [`0b13521`](https://github.com/ArmandPhilippot/coldark-bat/commit/0b13521b6018c04d00304121bcf47fe04fa266ee)
1041+assets/themes/Coldark/CHANGELOG.md:27:- build: update auto-changelog command [`2cd0f6e`](https://github.com/ArmandPhilippot/coldark-bat/commit/2cd0f6ea22280c892b564348aab72a45f7b28223)
1042+assets/themes/Coldark/CHANGELOG.md:29:## [v1.0.3](https://github.com/ArmandPhilippot/coldark-bat/compare/v1.0.2...v1.0.3) - 2020-10-19
1043+assets/themes/Coldark/CHANGELOG.md:33:- fix: color for pseudo-class/element in CSS [`1fada34`](https://github.com/ArmandPhilippot/coldark-bat/commit/1fada3494ae545fd186b1cb6c7d98c5860bcbcfe)
1044+assets/themes/Coldark/CHANGELOG.md:35:## [v1.0.2](https://github.com/ArmandPhilippot/coldark-bat/compare/v1.0.1...v1.0.2) - 2020-10-18
1045+assets/themes/Coldark/CHANGELOG.md:39:- fix: update scopes to be up to date with VS Code theme [`e92f6a7`](https://github.com/ArmandPhilippot/coldark-bat/commit/e92f6a7d7832d269cdec0754a198a589a4567a00)
1046+assets/themes/Coldark/CHANGELOG.md:41:## [v1.0.1](https://github.com/ArmandPhilippot/coldark-bat/compare/v1.0.0...v1.0.1) - 2020-10-17
1047+assets/themes/Coldark/CHANGELOG.md:45:- docs: fix export command [`0439c73`](https://github.com/ArmandPhilippot/coldark-bat/commit/0439c73d4af9c6a3254467dc7c6a758796f78267)
1048+assets/themes/Coldark/CHANGELOG.md:51:- feat: Coldark for bat command [`18fa11d`](https://github.com/ArmandPhilippot/coldark-bat/commit/18fa11d259bd4c1b5d3278b1ef91dbf8a13e5ee1)
1049+assets/themes/Coldark/CHANGELOG.md:52:- Initial commit [`80b7c34`](https://github.com/ArmandPhilippot/coldark-bat/commit/80b7c34079e11ae69fdd94d5839305fedd9fe847)
1050+assets/themes/Coldark/CHANGELOG.md:53:- docs: add README [`e904c4d`](https://github.com/ArmandPhilippot/coldark-bat/commit/e904c4d78e3ff7653b25a6215441ad643408aedf)
1051+assets/themes/Coldark/Coldark-Dark.tmTheme:6: Project: Coldark Bat
1052+assets/themes/Coldark/Coldark-Dark.tmTheme:7: Repository: https://github.com/ArmandPhilippot/coldark-bat
1053+assets/themes/Solarized/samples/test.md:26: a verbatim or "code" block
1054+assets/themes/onehalf/README.md:43: - [x] [bat](https://github.com/sharkdp/bat)
1055+assets/themes/base16.tmTheme:8: the bat theme base16-256 instead.
1056+assets/themes/ansi.tmTheme:26: Explicitly set the gutter color since bat falls back to a
1057+assets/themes/DarkNeon/Mou/Dark Neon Eighties.txt:77:VERBATIM
1058+assets/themes/DarkNeon/Mou/Dark Neon.txt:77:VERBATIM
1059+assets/themes/DarkNeon/Mou/Dark Neon Light.txt:77:VERBATIM
1060+assets/themes/TwoDark/icons/Prefs/icon_script.tmPreferences:6: <string>source.dosbatch, source.shell</string>
1061+assets/themes/TwoDark/src/svg/gfx_quick-panel-row-selected.svg:60:pQxTwpjGFbAti4KEppoxavUgB0Kt5geqNtU3yigwdL9zPN5DHw0QItval6DB1kZEzQTiJdJEmU3x
1062+assets/themes/gruvbox/README.md:4:This branch is being used as a submodule in [bat](https://github.com/sharkdp/bat) for the _gruvbox_ family of themes
1063+assets/themes/gruvbox/gruvbox-dark.tmTheme:259: <string>entity.name.val.declaration, entity.name.variable, meta.definition.variable, storage.type.variable, support.type.custom-property, support.type.variable-name, variable, variable.interpolation variable, variable.other.interpolation variable, variable.parameter.dosbatch, variable.parameter.output.function.matlab, variable.parameter.sass</string>
1064+assets/themes/gruvbox/gruvbox-light.tmTheme:259: <string>entity.name.val.declaration, entity.name.variable, meta.definition.variable, storage.type.variable, support.type.custom-property, support.type.variable-name, variable, variable.interpolation variable, variable.other.interpolation variable, variable.parameter.dosbatch, variable.parameter.output.function.matlab, variable.parameter.sass</string>
1065+assets/syntaxes/02_Extra/Slim/Demo/demo.slim:152:/ Verbatim
1066+assets/syntaxes/02_Extra/Slim/Demo/demo.slim:163: 'Verbatim text with space after
1067+assets/syntaxes/02_Extra/Slim/Syntaxes/Ruby Slim.YAML-tmLanguage:130: comment: Verbatim text (can include HTML tags and copied lines)
1068+assets/syntaxes/02_Extra/Slim/Syntaxes/Ruby Slim.tmLanguage:326: <string>Verbatim text (can include HTML tags and copied lines)</string>
1069+assets/syntaxes/02_Extra/LLVM/README.md:2:LLVM syntax highlighting definitions based on [LLVM.tmBundle](https://github.com/whitequark/LLVM.tmBundle) created by [whitequark](https://github.com/whitequark) for [bat](https://github.com/sharkdp/bat).
1070+assets/syntaxes/02_Extra/Puppet/Puppet.sublime-build:8: "cmd": ["puppet.bat", "parser", "validate", "--color=false", "$file" ]
1071+assets/syntaxes/02_Extra/Slim.sublime-syntax:117: comment: Verbatim text (can include HTML tags and copied lines)
1072+assets/syntaxes/02_Extra/Assembly (x86_64).sublime-syntax:463: - match: '(?i)\bat\b'
1073+assets/syntaxes/02_Extra/HTML (Twig).sublime-syntax:377: - match: '(?<=(?:[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)(\()'
1074+assets/syntaxes/02_Extra/HTML (Twig).sublime-syntax:479: - 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)
1075+assets/syntaxes/02_Extra/TypsecriptReact.sublime-syntax:2325: |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule
1076+assets/syntaxes/02_Extra/TypeScript/tsserver/typingsInstaller.js:3584: // The advantage of this approach is its simplicity. For the case of batch compilation,
1077+assets/syntaxes/02_Extra/TypeScript/tsserver/typingsInstaller.js:37221: // Literal files are always included verbatim. An "include" or "exclude" specification cannot
1078+assets/syntaxes/02_Extra/TypeScript/tsserver/typingsInstaller.js:48035: var verbatimTargetName = ts.unescapeLeadingUnderscores(target.escapedName);
1079+assets/syntaxes/02_Extra/TypeScript/tsserver/typingsInstaller.js:48036: if (verbatimTargetName === "export=" /* ExportEquals */ && (compilerOptions.esModuleInterop || compilerOptions.allowSyntheticDefaultImports)) {
1080+assets/syntaxes/02_Extra/TypeScript/tsserver/typingsInstaller.js:48038: verbatimTargetName = "default" /* Default */;
1081+assets/syntaxes/02_Extra/TypeScript/tsserver/typingsInstaller.js:48040: var targetName = getInternalSymbolName(target, verbatimTargetName);
1082+assets/syntaxes/02_Extra/TypeScript/tsserver/typingsInstaller.js:48085: ts.factory.createImportSpecifier(localName !== verbatimTargetName ? ts.factory.createIdentifier(verbatimTargetName) : undefined, ts.factory.createIdentifier(localName))
1083+assets/syntaxes/02_Extra/TypeScript/tsserver/typingsInstaller.js:48094: serializeExportSpecifier(ts.unescapeLeadingUnderscores(symbol.escapedName), specifier ? verbatimTargetName : targetName, specifier && ts.isStringLiteralLike(specifier) ? ts.factory.createStringLiteral(specifier.text) : undefined);
1084+assets/syntaxes/02_Extra/TypeScript/tsserver/typingsInstaller.js:98916: // If he number will be printed verbatim and it doesn't already contain a dot, add one
1085+assets/syntaxes/02_Extra/TypeScript/tsserver/typingsInstaller.js:101096: * If `optimistic` is set, the first instance will use 'baseName' verbatim instead of 'baseName_1'
1086+assets/syntaxes/02_Extra/TypeScript/tsserver/typingsInstaller.js:105964: // Get next batch of affected files
1087+assets/syntaxes/02_Extra/TypeScript/tsserver/typingsInstaller.js:108618: // Upon detecting a file change, wait for 250ms and then perform a recompilation. This gives batch
1088+assets/syntaxes/02_Extra/TypeScript/tsserver/tsc.js:39425: var verbatimTargetName = ts.unescapeLeadingUnderscores(target.escapedName);
1089+assets/syntaxes/02_Extra/TypeScript/tsserver/tsc.js:39426: if (verbatimTargetName === "export=" && (compilerOptions.esModuleInterop || compilerOptions.allowSyntheticDefaultImports)) {
1090+assets/syntaxes/02_Extra/TypeScript/tsserver/tsc.js:39427: verbatimTargetName = "default";
1091+assets/syntaxes/02_Extra/TypeScript/tsserver/tsc.js:39429: var targetName = getInternalSymbolName(target, verbatimTargetName);
1092+assets/syntaxes/02_Extra/TypeScript/tsserver/tsc.js:39452: ts.factory.createImportSpecifier(localName !== verbatimTargetName ? ts.factory.createIdentifier(verbatimTargetName) : undefined, ts.factory.createIdentifier(localName))
1093+assets/syntaxes/02_Extra/TypeScript/tsserver/tsc.js:39457: serializeExportSpecifier(ts.unescapeLeadingUnderscores(symbol.escapedName), specifier ? verbatimTargetName : targetName, specifier && ts.isStringLiteralLike(specifier) ? ts.factory.createStringLiteral(specifier.text) : undefined);
1094+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserver.js:3595: // The advantage of this approach is its simplicity. For the case of batch compilation,
1095+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserver.js:37232: // Literal files are always included verbatim. An "include" or "exclude" specification cannot
1096+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserver.js:48046: var verbatimTargetName = ts.unescapeLeadingUnderscores(target.escapedName);
1097+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserver.js:48047: if (verbatimTargetName === "export=" /* ExportEquals */ && (compilerOptions.esModuleInterop || compilerOptions.allowSyntheticDefaultImports)) {
1098+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserver.js:48049: verbatimTargetName = "default" /* Default */;
1099+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserver.js:48051: var targetName = getInternalSymbolName(target, verbatimTargetName);
1100+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserver.js:48096: ts.factory.createImportSpecifier(localName !== verbatimTargetName ? ts.factory.createIdentifier(verbatimTargetName) : undefined, ts.factory.createIdentifier(localName))
1101+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserver.js:48105: serializeExportSpecifier(ts.unescapeLeadingUnderscores(symbol.escapedName), specifier ? verbatimTargetName : targetName, specifier && ts.isStringLiteralLike(specifier) ? ts.factory.createStringLiteral(specifier.text) : undefined);
1102+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserver.js:98927: // If he number will be printed verbatim and it doesn't already contain a dot, add one
1103+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserver.js:101107: * If `optimistic` is set, the first instance will use 'baseName' verbatim instead of 'baseName_1'
1104+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserver.js:105975: // Get next batch of affected files
1105+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserver.js:108629: // Upon detecting a file change, wait for 250ms and then perform a recompilation. This gives batch
1106+assets/syntaxes/02_Extra/TypeScript/tsserver/typescriptServices.js:3789: // The advantage of this approach is its simplicity. For the case of batch compilation,
1107+assets/syntaxes/02_Extra/TypeScript/tsserver/typescriptServices.js:37426: // Literal files are always included verbatim. An "include" or "exclude" specification cannot
1108+assets/syntaxes/02_Extra/TypeScript/tsserver/typescriptServices.js:48240: var verbatimTargetName = ts.unescapeLeadingUnderscores(target.escapedName);
1109+assets/syntaxes/02_Extra/TypeScript/tsserver/typescriptServices.js:48241: if (verbatimTargetName === "export=" /* ExportEquals */ && (compilerOptions.esModuleInterop || compilerOptions.allowSyntheticDefaultImports)) {
1110+assets/syntaxes/02_Extra/TypeScript/tsserver/typescriptServices.js:48243: verbatimTargetName = "default" /* Default */;
1111+assets/syntaxes/02_Extra/TypeScript/tsserver/typescriptServices.js:48245: var targetName = getInternalSymbolName(target, verbatimTargetName);
1112+assets/syntaxes/02_Extra/TypeScript/tsserver/typescriptServices.js:48290: ts.factory.createImportSpecifier(localName !== verbatimTargetName ? ts.factory.createIdentifier(verbatimTargetName) : undefined, ts.factory.createIdentifier(localName))
1113+assets/syntaxes/02_Extra/TypeScript/tsserver/typescriptServices.js:48299: serializeExportSpecifier(ts.unescapeLeadingUnderscores(symbol.escapedName), specifier ? verbatimTargetName : targetName, specifier && ts.isStringLiteralLike(specifier) ? ts.factory.createStringLiteral(specifier.text) : undefined);
1114+assets/syntaxes/02_Extra/TypeScript/tsserver/typescriptServices.js:99121: // If he number will be printed verbatim and it doesn't already contain a dot, add one
1115+assets/syntaxes/02_Extra/TypeScript/tsserver/typescriptServices.js:101301: * If `optimistic` is set, the first instance will use 'baseName' verbatim instead of 'baseName_1'
1116+assets/syntaxes/02_Extra/TypeScript/tsserver/typescriptServices.js:106169: // Get next batch of affected files
1117+assets/syntaxes/02_Extra/TypeScript/tsserver/typescriptServices.js:108823: // Upon detecting a file change, wait for 250ms and then perform a recompilation. This gives batch
1118+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserverlibrary.js:3789: // The advantage of this approach is its simplicity. For the case of batch compilation,
1119+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserverlibrary.js:37426: // Literal files are always included verbatim. An "include" or "exclude" specification cannot
1120+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserverlibrary.js:48240: var verbatimTargetName = ts.unescapeLeadingUnderscores(target.escapedName);
1121+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserverlibrary.js:48241: if (verbatimTargetName === "export=" /* ExportEquals */ && (compilerOptions.esModuleInterop || compilerOptions.allowSyntheticDefaultImports)) {
1122+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserverlibrary.js:48243: verbatimTargetName = "default" /* Default */;
1123+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserverlibrary.js:48245: var targetName = getInternalSymbolName(target, verbatimTargetName);
1124+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserverlibrary.js:48290: ts.factory.createImportSpecifier(localName !== verbatimTargetName ? ts.factory.createIdentifier(verbatimTargetName) : undefined, ts.factory.createIdentifier(localName))
1125+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserverlibrary.js:48299: serializeExportSpecifier(ts.unescapeLeadingUnderscores(symbol.escapedName), specifier ? verbatimTargetName : targetName, specifier && ts.isStringLiteralLike(specifier) ? ts.factory.createStringLiteral(specifier.text) : undefined);
1126+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserverlibrary.js:99121: // If he number will be printed verbatim and it doesn't already contain a dot, add one
1127+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserverlibrary.js:101301: * If `optimistic` is set, the first instance will use 'baseName' verbatim instead of 'baseName_1'
1128+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserverlibrary.js:106169: // Get next batch of affected files
1129+assets/syntaxes/02_Extra/TypeScript/tsserver/tsserverlibrary.js:108823: // Upon detecting a file change, wait for 250ms and then perform a recompilation. This gives batch
1130+assets/syntaxes/02_Extra/TypeScript/tsserver/typescript.js:3789: // The advantage of this approach is its simplicity. For the case of batch compilation,
1131+assets/syntaxes/02_Extra/TypeScript/tsserver/typescript.js:37426: // Literal files are always included verbatim. An "include" or "exclude" specification cannot
1132+assets/syntaxes/02_Extra/TypeScript/tsserver/typescript.js:48240: var verbatimTargetName = ts.unescapeLeadingUnderscores(target.escapedName);
1133+assets/syntaxes/02_Extra/TypeScript/tsserver/typescript.js:48241: if (verbatimTargetName === "export=" /* ExportEquals */ && (compilerOptions.esModuleInterop || compilerOptions.allowSyntheticDefaultImports)) {
1134+assets/syntaxes/02_Extra/TypeScript/tsserver/typescript.js:48243: verbatimTargetName = "default" /* Default */;
1135+assets/syntaxes/02_Extra/TypeScript/tsserver/typescript.js:48245: var targetName = getInternalSymbolName(target, verbatimTargetName);
1136+assets/syntaxes/02_Extra/TypeScript/tsserver/typescript.js:48290: ts.factory.createImportSpecifier(localName !== verbatimTargetName ? ts.factory.createIdentifier(verbatimTargetName) : undefined, ts.factory.createIdentifier(localName))
1137+assets/syntaxes/02_Extra/TypeScript/tsserver/typescript.js:48299: serializeExportSpecifier(ts.unescapeLeadingUnderscores(symbol.escapedName), specifier ? verbatimTargetName : targetName, specifier && ts.isStringLiteralLike(specifier) ? ts.factory.createStringLiteral(specifier.text) : undefined);
1138+assets/syntaxes/02_Extra/TypeScript/tsserver/typescript.js:99121: // If he number will be printed verbatim and it doesn't already contain a dot, add one
1139+assets/syntaxes/02_Extra/TypeScript/tsserver/typescript.js:101301: * If `optimistic` is set, the first instance will use 'baseName' verbatim instead of 'baseName_1'
1140+assets/syntaxes/02_Extra/TypeScript/tsserver/typescript.js:106169: // Get next batch of affected files
1141+assets/syntaxes/02_Extra/TypeScript/tsserver/typescript.js:108823: // Upon detecting a file change, wait for 250ms and then perform a recompilation. This gives batch
1142+assets/syntaxes/02_Extra/TypeScript/tsserver/lib.scripthost.d.ts:161: * Gets/sets the script mode - interactive(true) or batch(false).
1143+assets/syntaxes/02_Extra/TypeScript/TypeScript.tmLanguage:6080: |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule
1144+assets/syntaxes/02_Extra/TypeScript/TypeScriptReact.tmLanguage:6026: |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule
1145+assets/syntaxes/02_Extra/Org mode/README.org:25:- [X] =Verbatim=
1146+assets/syntaxes/02_Extra/PowerShell/examples/test.ps1:281:a.bat
1147+assets/syntaxes/02_Extra/PowerShell/examples/test.ps1:282:aa.bat
1148+assets/syntaxes/02_Extra/PowerShell/examples/test.ps1:283:aaa.bat
1149+assets/syntaxes/02_Extra/PowerShell/examples/test.ps1:284:aaaa.bat
1150+assets/syntaxes/02_Extra/PowerShell/PowerShellSyntax.tmLanguage:255: <string>(\b(([A-Za-z0-9\-_\.]+)\.(?i:exe|com|cmd|bat))\b)</string>
1151+assets/syntaxes/02_Extra/PowerShell/PowerShellSyntax.tmLanguage:503: <string>(?:(\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</string>
1152+assets/syntaxes/02_Extra/ssh-config/src/options.yaml:54: BatchMode:
1153+assets/syntaxes/02_Extra/ssh-config/SSH Config.sublime-syntax:215: BatchMode|CanonicalizeFallbackLocal|CheckHostIP|Compression|
1154+assets/syntaxes/02_Extra/ssh-config/Support/SSH Config.sublime-completions:41: "trigger": "BatchMode",
1155+assets/syntaxes/02_Extra/ssh-config/Support/SSH Config.sublime-completions:42: "contents": "BatchMode",
1156+assets/syntaxes/02_Extra/ssh-config/Support/SSH Config.sublime-completions:47: "trigger": "batchmode",
1157+assets/syntaxes/02_Extra/ssh-config/Support/SSH Config.sublime-completions:48: "contents": "BatchMode ${0:{ yes | no \\}}",
1158+assets/syntaxes/02_Extra/http-request-response/README.md:3:It was originally designed for use in https://github.com/sharkdp/bat, so it is not using any Sublime Text 4 features, as https://github.com/trishume/syntect does not support them yet. So this package should work in Sublime Text 3 also.
1159+assets/syntaxes/02_Extra/http-request-response/docs/CONTRIBUTING.md:9:If you are not a Sublime Text user, and are contributing to improve a tool that uses the `syntect` Rust library, such as `bat`,
1160+assets/syntaxes/02_Extra/Crystal/Crystal.tmLanguage:353: <string>\b(initialize|new|loop|include|extend|raise|getter|setter|property|class_getter|class_setter|class_property|describe|context|it|with|delegate|def_hash|def_equals|def_equals_and_hash|forward_missing_to|record|assert_responds_to|spawn|annotation|verbatim)\b[!?]?</string>
1161+assets/syntaxes/02_Extra/Lean/README.md:22:* Batch file execution
1162+assets/syntaxes/02_Extra/Lean/README.md:178:* `lean.batchExecute` (Lean: Batch Execute File): execute the current file using Lean (bound to <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>r</kbd> by default)
1163+assets/syntaxes/02_Extra/Lean/README.md:287:* Properly set working directory when executing in batch mode.
1164+assets/syntaxes/02_Extra/Lean/src/batch.ts:6:let batchOutputChannel: OutputChannel;
1165+assets/syntaxes/02_Extra/Lean/src/batch.ts:8:export function batchExecuteFile(
1166+assets/syntaxes/02_Extra/Lean/src/batch.ts:13: batchOutputChannel = batchOutputChannel ||
1167+assets/syntaxes/02_Extra/Lean/src/batch.ts:14: window.createOutputChannel('Lean: Batch File Output');
1168+assets/syntaxes/02_Extra/Lean/src/batch.ts:23: batchOutputChannel.clear();
1169+assets/syntaxes/02_Extra/Lean/src/batch.ts:26: batchOutputChannel.appendLine(line);
1170+assets/syntaxes/02_Extra/Lean/src/batch.ts:30: batchOutputChannel.appendLine(line);
1171+assets/syntaxes/02_Extra/Lean/src/batch.ts:37: batchOutputChannel.show(true);
1172+assets/syntaxes/02_Extra/Lean/src/extension.ts:3:import { batchExecuteFile } from './batch';
1173+assets/syntaxes/02_Extra/Lean/src/extension.ts:67: commands.registerTextEditorCommand('lean.batchExecute',
1174+assets/syntaxes/02_Extra/Lean/src/extension.ts:68: (editor, edit, args) => { batchExecuteFile(server, editor, edit, args); }),
1175+assets/syntaxes/02_Extra/Lean/package.json:281: "command": "lean.batchExecute",
1176+assets/syntaxes/02_Extra/Lean/package.json:283: "title": "Batch Execute File",
1177+assets/syntaxes/02_Extra/Lean/package.json:350: "command": "lean.batchExecute",
1178+assets/syntaxes/02_Extra/Lean/package.json:373: "command": "lean.batchExecute",
1179+assets/syntaxes/02_Extra/Lean/syntaxes/lean-markdown.json:571: "fenced_code_block_dosbatch": {
1180+assets/syntaxes/02_Extra/Lean/syntaxes/lean-markdown.json:572: "begin": "(^)(\\s*)(`{3,}|~{3,})\\s*(?i:(bat|batch)((\\s+|:|\\{)[^`~]*)?$)",
1181+assets/syntaxes/02_Extra/Lean/syntaxes/lean-markdown.json:595: "contentName": "meta.embedded.block.dosbatch",
1182+assets/syntaxes/02_Extra/Lean/syntaxes/lean-markdown.json:598: "include": "source.batchfile"
1183+assets/syntaxes/02_Extra/Lean/syntaxes/lean-markdown.json:1774: "include": "#fenced_code_block_dosbatch"
1184+assets/syntaxes/02_Extra/Lean/syntaxes/lean.json:21: { "match": "\\battribute\\b\\s*\\[[^\\]]*\\]", "name": "storage.modifier.lean" },
1185+assets/syntaxes/02_Extra/Lean/package-lock.json:1946: "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
1186+assets/syntaxes/02_Extra/Lean/package-lock.json:4288: "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
1187+assets/syntaxes/02_Extra/Lean/package-lock.json:7099: "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
1188+assets/syntaxes/02_Extra/Lean/package-lock.json:9705: "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
1189+assets/syntaxes/02_Extra/Lean/package-lock.json:11662: "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
1190+assets/syntaxes/02_Extra/Lean/package-lock.json:14054: "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
1191+assets/syntaxes/02_Extra/CMake/CMakeCommands.yml:4:add_custom_command: [OUTPUT, COMMAND, ARGS, MAIN_DEPENDENCY, DEPENDS, BYPRODUCTS, IMPLICIT_DEPENDS, WORKING_DIRECTORY, COMMENT, DEPFILE, VERBATIM, APPEND, USES_TERMINAL COMMAND_EXPAND_LISTS, TARGET, PRE_BUILD, PRE_LINK, POST_BUILD]
1192+assets/syntaxes/02_Extra/CMake/CMakeCommands.yml:5:add_custom_target: [ALL, COMMAND, DEPENDS, BYPRODUCTS, WORKING_DIRECTORY, COMMENT, VERBATIM, USES_TERMINAL, COMMAND_EXPAND_LISTS, SOURCES]
1193+assets/syntaxes/02_Extra/CMake/CMakeVariables.sublime-completions:1:{"completions":[{"contents":"ANDROID","trigger":"ANDROID\tbuiltin variable"},{"contents":"APPLE","trigger":"APPLE\tbuiltin variable"},{"contents":"BORLAND","trigger":"BORLAND\tbuiltin variable"},{"contents":"BUILD_SHARED_LIBS","trigger":"BUILD_SHARED_LIBS\tbuiltin variable"},{"contents":"CACHE","trigger":"CACHE\tbuiltin variable"},{"contents":"CMAKE_ABSOLUTE_DESTINATION_FILES","trigger":"CMAKE_ABSOLUTE_DESTINATION_FILES\tbuiltin variable"},{"contents":"CMAKE_AIX_EXPORT_ALL_SYMBOLS","trigger":"CMAKE_AIX_EXPORT_ALL_SYMBOLS\tbuiltin variable"},{"contents":"CMAKE_ANDROID_ANT_ADDITIONAL_OPTIONS","trigger":"CMAKE_ANDROID_ANT_ADDITIONAL_OPTIONS\tbuiltin variable"},{"contents":"CMAKE_ANDROID_API","trigger":"CMAKE_ANDROID_API\tbuiltin variable"},{"contents":"CMAKE_ANDROID_API_MIN","trigger":"CMAKE_ANDROID_API_MIN\tbuiltin variable"},{"contents":"CMAKE_ANDROID_ARCH","trigger":"CMAKE_ANDROID_ARCH\tbuiltin variable"},{"contents":"CMAKE_ANDROID_ARCH_ABI","trigger":"CMAKE_ANDROID_ARCH_ABI\tbuiltin variable"},{"contents":"CMAKE_ANDROID_ARM_MODE","trigger":"CMAKE_ANDROID_ARM_MODE\tbuiltin variable"},{"contents":"CMAKE_ANDROID_ARM_NEON","trigger":"CMAKE_ANDROID_ARM_NEON\tbuiltin variable"},{"contents":"CMAKE_ANDROID_ASSETS_DIRECTORIES","trigger":"CMAKE_ANDROID_ASSETS_DIRECTORIES\tbuiltin variable"},{"contents":"CMAKE_ANDROID_GUI","trigger":"CMAKE_ANDROID_GUI\tbuiltin variable"},{"contents":"CMAKE_ANDROID_JAR_DEPENDENCIES","trigger":"CMAKE_ANDROID_JAR_DEPENDENCIES\tbuiltin variable"},{"contents":"CMAKE_ANDROID_JAR_DIRECTORIES","trigger":"CMAKE_ANDROID_JAR_DIRECTORIES\tbuiltin variable"},{"contents":"CMAKE_ANDROID_JAVA_SOURCE_DIR","trigger":"CMAKE_ANDROID_JAVA_SOURCE_DIR\tbuiltin variable"},{"contents":"CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES","trigger":"CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES\tbuiltin variable"},{"contents":"CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES","trigger":"CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES\tbuiltin variable"},{"contents":"CMAKE_ANDROID_NDK","trigger":"CMAKE_ANDROID_NDK\tbuiltin variable"},{"contents":"CMAKE_ANDROID_NDK_DEPRECATED_HEADERS","trigger":"CMAKE_ANDROID_NDK_DEPRECATED_HEADERS\tbuiltin variable"},{"contents":"CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG","trigger":"CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG\tbuiltin variable"},{"contents":"CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION","trigger":"CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION\tbuiltin variable"},{"contents":"CMAKE_ANDROID_PROCESS_MAX","trigger":"CMAKE_ANDROID_PROCESS_MAX\tbuiltin variable"},{"contents":"CMAKE_ANDROID_PROGUARD","trigger":"CMAKE_ANDROID_PROGUARD\tbuiltin variable"},{"contents":"CMAKE_ANDROID_PROGUARD_CONFIG_PATH","trigger":"CMAKE_ANDROID_PROGUARD_CONFIG_PATH\tbuiltin variable"},{"contents":"CMAKE_ANDROID_SECURE_PROPS_PATH","trigger":"CMAKE_ANDROID_SECURE_PROPS_PATH\tbuiltin variable"},{"contents":"CMAKE_ANDROID_SKIP_ANT_STEP","trigger":"CMAKE_ANDROID_SKIP_ANT_STEP\tbuiltin variable"},{"contents":"CMAKE_ANDROID_STANDALONE_TOOLCHAIN","trigger":"CMAKE_ANDROID_STANDALONE_TOOLCHAIN\tbuiltin variable"},{"contents":"CMAKE_ANDROID_STL_TYPE","trigger":"CMAKE_ANDROID_STL_TYPE\tbuiltin variable"},{"contents":"CMAKE_APPBUNDLE_PATH","trigger":"CMAKE_APPBUNDLE_PATH\tbuiltin variable"},{"contents":"CMAKE_APPLE_SILICON_PROCESSOR","trigger":"CMAKE_APPLE_SILICON_PROCESSOR\tbuiltin variable"},{"contents":"CMAKE_AR","trigger":"CMAKE_AR\tbuiltin variable"},{"contents":"CMAKE_ARCHIVE_OUTPUT_DIRECTORY","trigger":"CMAKE_ARCHIVE_OUTPUT_DIRECTORY\tbuiltin variable"},{"contents":"CMAKE_ARGC","trigger":"CMAKE_ARGC\tbuiltin variable"},{"contents":"CMAKE_ARGV0","trigger":"CMAKE_ARGV0\tbuiltin variable"},{"contents":"CMAKE_AUTOGEN_ORIGIN_DEPENDS","trigger":"CMAKE_AUTOGEN_ORIGIN_DEPENDS\tbuiltin variable"},{"contents":"CMAKE_AUTOGEN_PARALLEL","trigger":"CMAKE_AUTOGEN_PARALLEL\tbuiltin variable"},{"contents":"CMAKE_AUTOGEN_VERBOSE","trigger":"CMAKE_AUTOGEN_VERBOSE\tbuiltin variable"},{"contents":"CMAKE_AUTOMOC","trigger":"CMAKE_AUTOMOC\tbuiltin variable"},{"contents":"CMAKE_AUTOMOC_COMPILER_PREDEFINES","trigger":"CMAKE_AUTOMOC_COMPILER_PREDEFINES\tbuiltin variable"},{"contents":"CMAKE_AUTOMOC_DEPEND_FILTERS","trigger":"CMAKE_AUTOMOC_DEPEND_FILTERS\tbuiltin variable"},{"contents":"CMAKE_AUTOMOC_MACRO_NAMES","trigger":"CMAKE_AUTOMOC_MACRO_NAMES\tbuiltin variable"},{"contents":"CMAKE_AUTOMOC_MOC_OPTIONS","trigger":"CMAKE_AUTOMOC_MOC_OPTIONS\tbuiltin variable"},{"contents":"CMAKE_AUTOMOC_PATH_PREFIX","trigger":"CMAKE_AUTOMOC_PATH_PREFIX\tbuiltin variable"},{"contents":"CMAKE_AUTOMOC_RELAXED_MODE","trigger":"CMAKE_AUTOMOC_RELAXED_MODE\tbuiltin variable"},{"contents":"CMAKE_AUTORCC","trigger":"CMAKE_AUTORCC\tbuiltin variable"},{"contents":"CMAKE_AUTORCC_OPTIONS","trigger":"CMAKE_AUTORCC_OPTIONS\tbuiltin variable"},{"contents":"CMAKE_AUTOUIC","trigger":"CMAKE_AUTOUIC\tbuiltin variable"},{"contents":"CMAKE_AUTOUIC_OPTIONS","trigger":"CMAKE_AUTOUIC_OPTIONS\tbuiltin variable"},{"contents":"CMAKE_AUTOUIC_SEARCH_PATHS","trigger":"CMAKE_AUTOUIC_SEARCH_PATHS\tbuiltin variable"},{"contents":"CMAKE_BACKWARDS_COMPATIBILITY","trigger":"CMAKE_BACKWARDS_COMPATIBILITY\tbuiltin variable"},{"contents":"CMAKE_BINARY_DIR","trigger":"CMAKE_BINARY_DIR\tbuiltin variable"},{"contents":"CMAKE_BUILD_RPATH","trigger":"CMAKE_BUILD_RPATH\tbuiltin variable"},{"contents":"CMAKE_BUILD_RPATH_USE_ORIGIN","trigger":"CMAKE_BUILD_RPATH_USE_ORIGIN\tbuiltin variable"},{"contents":"CMAKE_BUILD_TOOL","trigger":"CMAKE_BUILD_TOOL\tbuiltin variable"},{"contents":"CMAKE_BUILD_TYPE","trigger":"CMAKE_BUILD_TYPE\tbuiltin variable"},{"contents":"CMAKE_BUILD_WITH_INSTALL_NAME_DIR","trigger":"CMAKE_BUILD_WITH_INSTALL_NAME_DIR\tbuiltin variable"},{"contents":"CMAKE_BUILD_WITH_INSTALL_RPATH","trigger":"CMAKE_BUILD_WITH_INSTALL_RPATH\tbuiltin variable"},{"contents":"CMAKE_CACHEFILE_DIR","trigger":"CMAKE_CACHEFILE_DIR\tbuiltin variable"},{"contents":"CMAKE_CACHE_MAJOR_VERSION","trigger":"CMAKE_CACHE_MAJOR_VERSION\tbuiltin variable"},{"contents":"CMAKE_CACHE_MINOR_VERSION","trigger":"CMAKE_CACHE_MINOR_VERSION\tbuiltin variable"},{"contents":"CMAKE_CACHE_PATCH_VERSION","trigger":"CMAKE_CACHE_PATCH_VERSION\tbuiltin variable"},{"contents":"CMAKE_CFG_INTDIR","trigger":"CMAKE_CFG_INTDIR\tbuiltin variable"},{"contents":"CMAKE_CLANG_VFS_OVERLAY","trigger":"CMAKE_CLANG_VFS_OVERLAY\tbuiltin variable"},{"contents":"CMAKE_CL_64","trigger":"CMAKE_CL_64\tbuiltin variable"},{"contents":"CMAKE_CODEBLOCKS_COMPILER_ID","trigger":"CMAKE_CODEBLOCKS_COMPILER_ID\tbuiltin variable"},{"contents":"CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES","trigger":"CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES\tbuiltin variable"},{"contents":"CMAKE_CODELITE_USE_TARGETS","trigger":"CMAKE_CODELITE_USE_TARGETS\tbuiltin variable"},{"contents":"CMAKE_COLOR_MAKEFILE","trigger":"CMAKE_COLOR_MAKEFILE\tbuiltin variable"},{"contents":"CMAKE_COMMAND","trigger":"CMAKE_COMMAND\tbuiltin variable"},{"contents":"CMAKE_COMPILER_2005","trigger":"CMAKE_COMPILER_2005\tbuiltin variable"},{"contents":"CMAKE_COMPILER_IS_GNUCC","trigger":"CMAKE_COMPILER_IS_GNUCC\tbuiltin variable"},{"contents":"CMAKE_COMPILER_IS_GNUCXX","trigger":"CMAKE_COMPILER_IS_GNUCXX\tbuiltin variable"},{"contents":"CMAKE_COMPILER_IS_GNUG77","trigger":"CMAKE_COMPILER_IS_GNUG77\tbuiltin variable"},{"contents":"CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY","trigger":"CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY\tbuiltin variable"},{"contents":"CMAKE_CONFIGURATION_TYPES","trigger":"CMAKE_CONFIGURATION_TYPES\tbuiltin variable"},{"contents":"CMAKE_CPACK_COMMAND","trigger":"CMAKE_CPACK_COMMAND\tbuiltin variable"},{"contents":"CMAKE_CROSSCOMPILING","trigger":"CMAKE_CROSSCOMPILING\tbuiltin variable"},{"contents":"CMAKE_CROSSCOMPILING_EMULATOR","trigger":"CMAKE_CROSSCOMPILING_EMULATOR\tbuiltin variable"},{"contents":"CMAKE_CROSS_CONFIGS","trigger":"CMAKE_CROSS_CONFIGS\tbuiltin variable"},{"contents":"CMAKE_CTEST_ARGUMENTS","trigger":"CMAKE_CTEST_ARGUMENTS\tbuiltin variable"},{"contents":"CMAKE_CTEST_COMMAND","trigger":"CMAKE_CTEST_COMMAND\tbuiltin variable"},{"contents":"CMAKE_CUDA_ARCHITECTURES","trigger":"CMAKE_CUDA_ARCHITECTURES\tbuiltin variable"},{"contents":"CMAKE_CUDA_COMPILE_FEATURES","trigger":"CMAKE_CUDA_COMPILE_FEATURES\tbuiltin variable"},{"contents":"CMAKE_CUDA_EXTENSIONS","trigger":"CMAKE_CUDA_EXTENSIONS\tbuiltin variable"},{"contents":"CMAKE_CUDA_HOST_COMPILER","trigger":"CMAKE_CUDA_HOST_COMPILER\tbuiltin variable"},{"contents":"CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS","trigger":"CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS\tbuiltin variable"},{"contents":"CMAKE_CUDA_RUNTIME_LIBRARY","trigger":"CMAKE_CUDA_RUNTIME_LIBRARY\tbuiltin variable"},{"contents":"CMAKE_CUDA_SEPARABLE_COMPILATION","trigger":"CMAKE_CUDA_SEPARABLE_COMPILATION\tbuiltin variable"},{"contents":"CMAKE_CUDA_STANDARD","trigger":"CMAKE_CUDA_STANDARD\tbuiltin variable"},{"contents":"CMAKE_CUDA_STANDARD_REQUIRED","trigger":"CMAKE_CUDA_STANDARD_REQUIRED\tbuiltin variable"},{"contents":"CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES","trigger":"CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES\tbuiltin variable"},{"contents":"CMAKE_CURRENT_BINARY_DIR","trigger":"CMAKE_CURRENT_BINARY_DIR\tbuiltin variable"},{"contents":"CMAKE_CURRENT_FUNCTION","trigger":"CMAKE_CURRENT_FUNCTION\tbuiltin variable"},{"contents":"CMAKE_CURRENT_FUNCTION_LIST_DIR","trigger":"CMAKE_CURRENT_FUNCTION_LIST_DIR\tbuiltin variable"},{"contents":"CMAKE_CURRENT_FUNCTION_LIST_FILE","trigger":"CMAKE_CURRENT_FUNCTION_LIST_FILE\tbuiltin variable"},{"contents":"CMAKE_CURRENT_FUNCTION_LIST_LINE","trigger":"CMAKE_CURRENT_FUNCTION_LIST_LINE\tbuiltin variable"},{"contents":"CMAKE_CURRENT_LIST_DIR","trigger":"CMAKE_CURRENT_LIST_DIR\tbuiltin variable"},{"contents":"CMAKE_CURRENT_LIST_FILE","trigger":"CMAKE_CURRENT_LIST_FILE\tbuiltin variable"},{"contents":"CMAKE_CURRENT_LIST_LINE","trigger":"CMAKE_CURRENT_LIST_LINE\tbuiltin variable"},{"contents":"CMAKE_CURRENT_SOURCE_DIR","trigger":"CMAKE_CURRENT_SOURCE_DIR\tbuiltin variable"},{"contents":"CMAKE_CXX_COMPILE_FEATURES","trigger":"CMAKE_CXX_COMPILE_FEATURES\tbuiltin variable"},{"contents":"CMAKE_CXX_EXTENSIONS","trigger":"CMAKE_CXX_EXTENSIONS\tbuiltin variable"},{"contents":"CMAKE_CXX_STANDARD","trigger":"CMAKE_CXX_STANDARD\tbuiltin variable"},{"contents":"CMAKE_CXX_STANDARD_REQUIRED","trigger":"CMAKE_CXX_STANDARD_REQUIRED\tbuiltin variable"},{"contents":"CMAKE_C_COMPILE_FEATURES","trigger":"CMAKE_C_COMPILE_FEATURES\tbuiltin variable"},{"contents":"CMAKE_C_EXTENSIONS","trigger":"CMAKE_C_EXTENSIONS\tbuiltin variable"},{"contents":"CMAKE_C_STANDARD","trigger":"CMAKE_C_STANDARD\tbuiltin variable"},{"contents":"CMAKE_C_STANDARD_REQUIRED","trigger":"CMAKE_C_STANDARD_REQUIRED\tbuiltin variable"},{"contents":"CMAKE_DEBUG_POSTFIX","trigger":"CMAKE_DEBUG_POSTFIX\tbuiltin variable"},{"contents":"CMAKE_DEBUG_TARGET_PROPERTIES","trigger":"CMAKE_DEBUG_TARGET_PROPERTIES\tbuiltin variable"},{"contents":"CMAKE_DEFAULT_BUILD_TYPE","trigger":"CMAKE_DEFAULT_BUILD_TYPE\tbuiltin variable"},{"contents":"CMAKE_DEFAULT_CONFIGS","trigger":"CMAKE_DEFAULT_CONFIGS\tbuiltin variable"},{"contents":"CMAKE_DEPENDS_IN_PROJECT_ONLY","trigger":"CMAKE_DEPENDS_IN_PROJECT_ONLY\tbuiltin variable"},{"contents":"CMAKE_DIRECTORY_LABELS","trigger":"CMAKE_DIRECTORY_LABELS\tbuiltin variable"},{"contents":"CMAKE_DISABLE_PRECOMPILE_HEADERS","trigger":"CMAKE_DISABLE_PRECOMPILE_HEADERS\tbuiltin variable"},{"contents":"CMAKE_DL_LIBS","trigger":"CMAKE_DL_LIBS\tbuiltin variable"},{"contents":"CMAKE_DOTNET_TARGET_FRAMEWORK","trigger":"CMAKE_DOTNET_TARGET_FRAMEWORK\tbuiltin variable"},{"contents":"CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION","trigger":"CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION\tbuiltin variable"},{"contents":"CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES","trigger":"CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES\tbuiltin variable"},{"contents":"CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT","trigger":"CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT\tbuiltin variable"},{"contents":"CMAKE_ECLIPSE_MAKE_ARGUMENTS","trigger":"CMAKE_ECLIPSE_MAKE_ARGUMENTS\tbuiltin variable"},{"contents":"CMAKE_ECLIPSE_RESOURCE_ENCODING","trigger":"CMAKE_ECLIPSE_RESOURCE_ENCODING\tbuiltin variable"},{"contents":"CMAKE_ECLIPSE_VERSION","trigger":"CMAKE_ECLIPSE_VERSION\tbuiltin variable"},{"contents":"CMAKE_EDIT_COMMAND","trigger":"CMAKE_EDIT_COMMAND\tbuiltin variable"},{"contents":"CMAKE_ENABLE_EXPORTS","trigger":"CMAKE_ENABLE_EXPORTS\tbuiltin variable"},{"contents":"CMAKE_ERROR_DEPRECATED","trigger":"CMAKE_ERROR_DEPRECATED\tbuiltin variable"},{"contents":"CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION","trigger":"CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION\tbuiltin variable"},{"contents":"CMAKE_EXECUTABLE_SUFFIX","trigger":"CMAKE_EXECUTABLE_SUFFIX\tbuiltin variable"},{"contents":"CMAKE_EXECUTE_PROCESS_COMMAND_ECHO","trigger":"CMAKE_EXECUTE_PROCESS_COMMAND_ECHO\tbuiltin variable"},{"contents":"CMAKE_EXE_LINKER_FLAGS","trigger":"CMAKE_EXE_LINKER_FLAGS\tbuiltin variable"},{"contents":"CMAKE_EXE_LINKER_FLAGS_INIT","trigger":"CMAKE_EXE_LINKER_FLAGS_INIT\tbuiltin variable"},{"contents":"CMAKE_EXPORT_COMPILE_COMMANDS","trigger":"CMAKE_EXPORT_COMPILE_COMMANDS\tbuiltin variable"},{"contents":"CMAKE_EXPORT_NO_PACKAGE_REGISTRY","trigger":"CMAKE_EXPORT_NO_PACKAGE_REGISTRY\tbuiltin variable"},{"contents":"CMAKE_EXPORT_PACKAGE_REGISTRY","trigger":"CMAKE_EXPORT_PACKAGE_REGISTRY\tbuiltin variable"},{"contents":"CMAKE_EXTRA_GENERATOR","trigger":"CMAKE_EXTRA_GENERATOR\tbuiltin variable"},{"contents":"CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES","trigger":"CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES\tbuiltin variable"},{"contents":"CMAKE_FIND_APPBUNDLE","trigger":"CMAKE_FIND_APPBUNDLE\tbuiltin variable"},{"contents":"CMAKE_FIND_DEBUG_MODE","trigger":"CMAKE_FIND_DEBUG_MODE\tbuiltin variable"},{"contents":"CMAKE_FIND_FRAMEWORK","trigger":"CMAKE_FIND_FRAMEWORK\tbuiltin variable"},{"contents":"CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX","trigger":"CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX\tbuiltin variable"},{"contents":"CMAKE_FIND_LIBRARY_PREFIXES","trigger":"CMAKE_FIND_LIBRARY_PREFIXES\tbuiltin variable"},{"contents":"CMAKE_FIND_LIBRARY_SUFFIXES","trigger":"CMAKE_FIND_LIBRARY_SUFFIXES\tbuiltin variable"},{"contents":"CMAKE_FIND_NO_INSTALL_PREFIX","trigger":"CMAKE_FIND_NO_INSTALL_PREFIX\tbuiltin variable"},{"contents":"CMAKE_FIND_PACKAGE_NAME","trigger":"CMAKE_FIND_PACKAGE_NAME\tbuiltin variable"},{"contents":"CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY","trigger":"CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY\tbuiltin variable"},{"contents":"CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY","trigger":"CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY\tbuiltin variable"},{"contents":"CMAKE_FIND_PACKAGE_PREFER_CONFIG","trigger":"CMAKE_FIND_PACKAGE_PREFER_CONFIG\tbuiltin variable"},{"contents":"CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS","trigger":"CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS\tbuiltin variable"},{"contents":"CMAKE_FIND_PACKAGE_SORT_DIRECTION","trigger":"CMAKE_FIND_PACKAGE_SORT_DIRECTION\tbuiltin variable"},{"contents":"CMAKE_FIND_PACKAGE_SORT_ORDER","trigger":"CMAKE_FIND_PACKAGE_SORT_ORDER\tbuiltin variable"},{"contents":"CMAKE_FIND_PACKAGE_WARN_NO_MODULE","trigger":"CMAKE_FIND_PACKAGE_WARN_NO_MODULE\tbuiltin variable"},{"contents":"CMAKE_FIND_ROOT_PATH","trigger":"CMAKE_FIND_ROOT_PATH\tbuiltin variable"},{"contents":"CMAKE_FIND_ROOT_PATH_MODE_INCLUDE","trigger":"CMAKE_FIND_ROOT_PATH_MODE_INCLUDE\tbuiltin variable"},{"contents":"CMAKE_FIND_ROOT_PATH_MODE_LIBRARY","trigger":"CMAKE_FIND_ROOT_PATH_MODE_LIBRARY\tbuiltin variable"},{"contents":"CMAKE_FIND_ROOT_PATH_MODE_PACKAGE","trigger":"CMAKE_FIND_ROOT_PATH_MODE_PACKAGE\tbuiltin variable"},{"contents":"CMAKE_FIND_ROOT_PATH_MODE_PROGRAM","trigger":"CMAKE_FIND_ROOT_PATH_MODE_PROGRAM\tbuiltin variable"},{"contents":"CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH","trigger":"CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH\tbuiltin variable"},{"contents":"CMAKE_FIND_USE_CMAKE_PATH","trigger":"CMAKE_FIND_USE_CMAKE_PATH\tbuiltin variable"},{"contents":"CMAKE_FIND_USE_CMAKE_SYSTEM_PATH","trigger":"CMAKE_FIND_USE_CMAKE_SYSTEM_PATH\tbuiltin variable"},{"contents":"CMAKE_FIND_USE_PACKAGE_REGISTRY","trigger":"CMAKE_FIND_USE_PACKAGE_REGISTRY\tbuiltin variable"},{"contents":"CMAKE_FIND_USE_PACKAGE_ROOT_PATH","trigger":"CMAKE_FIND_USE_PACKAGE_ROOT_PATH\tbuiltin variable"},{"contents":"CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH","trigger":"CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH\tbuiltin variable"},{"contents":"CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY","trigger":"CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY\tbuiltin variable"},{"contents":"CMAKE_FOLDER","trigger":"CMAKE_FOLDER\tbuiltin variable"},{"contents":"CMAKE_FRAMEWORK","trigger":"CMAKE_FRAMEWORK\tbuiltin variable"},{"contents":"CMAKE_FRAMEWORK_PATH","trigger":"CMAKE_FRAMEWORK_PATH\tbuiltin variable"},{"contents":"CMAKE_Fortran_FORMAT","trigger":"CMAKE_Fortran_FORMAT\tbuiltin variable"},{"contents":"CMAKE_Fortran_MODDIR_DEFAULT","trigger":"CMAKE_Fortran_MODDIR_DEFAULT\tbuiltin variable"},{"contents":"CMAKE_Fortran_MODDIR_FLAG","trigger":"CMAKE_Fortran_MODDIR_FLAG\tbuiltin variable"},{"contents":"CMAKE_Fortran_MODOUT_FLAG","trigger":"CMAKE_Fortran_MODOUT_FLAG\tbuiltin variable"},{"contents":"CMAKE_Fortran_MODULE_DIRECTORY","trigger":"CMAKE_Fortran_MODULE_DIRECTORY\tbuiltin variable"},{"contents":"CMAKE_Fortran_PREPROCESS","trigger":"CMAKE_Fortran_PREPROCESS\tbuiltin variable"},{"contents":"CMAKE_GENERATOR","trigger":"CMAKE_GENERATOR\tbuiltin variable"},{"contents":"CMAKE_GENERATOR_INSTANCE","trigger":"CMAKE_GENERATOR_INSTANCE\tbuiltin variable"},{"contents":"CMAKE_GENERATOR_PLATFORM","trigger":"CMAKE_GENERATOR_PLATFORM\tbuiltin variable"},{"contents":"CMAKE_GENERATOR_TOOLSET","trigger":"CMAKE_GENERATOR_TOOLSET\tbuiltin variable"},{"contents":"CMAKE_GHS_NO_SOURCE_GROUP_FILE","trigger":"CMAKE_GHS_NO_SOURCE_GROUP_FILE\tbuiltin variable"},{"contents":"CMAKE_GLOBAL_AUTOGEN_TARGET","trigger":"CMAKE_GLOBAL_AUTOGEN_TARGET\tbuiltin variable"},{"contents":"CMAKE_GLOBAL_AUTOGEN_TARGET_NAME","trigger":"CMAKE_GLOBAL_AUTOGEN_TARGET_NAME\tbuiltin variable"},{"contents":"CMAKE_GLOBAL_AUTORCC_TARGET","trigger":"CMAKE_GLOBAL_AUTORCC_TARGET\tbuiltin variable"},{"contents":"CMAKE_GLOBAL_AUTORCC_TARGET_NAME","trigger":"CMAKE_GLOBAL_AUTORCC_TARGET_NAME\tbuiltin variable"},{"contents":"CMAKE_GNUtoMS","trigger":"CMAKE_GNUtoMS\tbuiltin variable"},{"contents":"CMAKE_HOME_DIRECTORY","trigger":"CMAKE_HOME_DIRECTORY\tbuiltin variable"},{"contents":"CMAKE_HOST_APPLE","trigger":"CMAKE_HOST_APPLE\tbuiltin variable"},{"contents":"CMAKE_HOST_SOLARIS","trigger":"CMAKE_HOST_SOLARIS\tbuiltin variable"},{"contents":"CMAKE_HOST_SYSTEM","trigger":"CMAKE_HOST_SYSTEM\tbuiltin variable"},{"contents":"CMAKE_HOST_SYSTEM_NAME","trigger":"CMAKE_HOST_SYSTEM_NAME\tbuiltin variable"},{"contents":"CMAKE_HOST_SYSTEM_PROCESSOR","trigger":"CMAKE_HOST_SYSTEM_PROCESSOR\tbuiltin variable"},{"contents":"CMAKE_HOST_SYSTEM_VERSION","trigger":"CMAKE_HOST_SYSTEM_VERSION\tbuiltin variable"},{"contents":"CMAKE_HOST_UNIX","trigger":"CMAKE_HOST_UNIX\tbuiltin variable"},{"contents":"CMAKE_HOST_WIN32","trigger":"CMAKE_HOST_WIN32\tbuiltin variable"},{"contents":"CMAKE_IGNORE_PATH","trigger":"CMAKE_IGNORE_PATH\tbuiltin variable"},{"contents":"CMAKE_IMPORT_LIBRARY_PREFIX","trigger":"CMAKE_IMPORT_LIBRARY_PREFIX\tbuiltin variable"},{"contents":"CMAKE_IMPORT_LIBRARY_SUFFIX","trigger":"CMAKE_IMPORT_LIBRARY_SUFFIX\tbuiltin variable"},{"contents":"CMAKE_INCLUDE_CURRENT_DIR","trigger":"CMAKE_INCLUDE_CURRENT_DIR\tbuiltin variable"},{"contents":"CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE","trigger":"CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE\tbuiltin variable"},{"contents":"CMAKE_INCLUDE_DIRECTORIES_BEFORE","trigger":"CMAKE_INCLUDE_DIRECTORIES_BEFORE\tbuiltin variable"},{"contents":"CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE","trigger":"CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE\tbuiltin variable"},{"contents":"CMAKE_INCLUDE_PATH","trigger":"CMAKE_INCLUDE_PATH\tbuiltin variable"},{"contents":"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME","trigger":"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME\tbuiltin variable"},{"contents":"CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS","trigger":"CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS\tbuiltin variable"},{"contents":"CMAKE_INSTALL_MESSAGE","trigger":"CMAKE_INSTALL_MESSAGE\tbuiltin variable"},{"contents":"CMAKE_INSTALL_NAME_DIR","trigger":"CMAKE_INSTALL_NAME_DIR\tbuiltin variable"},{"contents":"CMAKE_INSTALL_PREFIX","trigger":"CMAKE_INSTALL_PREFIX\tbuiltin variable"},{"contents":"CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT","trigger":"CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT\tbuiltin variable"},{"contents":"CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH","trigger":"CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH\tbuiltin variable"},{"contents":"CMAKE_INSTALL_RPATH","trigger":"CMAKE_INSTALL_RPATH\tbuiltin variable"},{"contents":"CMAKE_INSTALL_RPATH_USE_LINK_PATH","trigger":"CMAKE_INSTALL_RPATH_USE_LINK_PATH\tbuiltin variable"},{"contents":"CMAKE_INTERNAL_PLATFORM_ABI","trigger":"CMAKE_INTERNAL_PLATFORM_ABI\tbuiltin variable"},{"contents":"CMAKE_INTERPROCEDURAL_OPTIMIZATION","trigger":"CMAKE_INTERPROCEDURAL_OPTIMIZATION\tbuiltin variable"},{"contents":"CMAKE_IOS_INSTALL_COMBINED","trigger":"CMAKE_IOS_INSTALL_COMBINED\tbuiltin variable"},{"contents":"CMAKE_ISPC_HEADER_DIRECTORY","trigger":"CMAKE_ISPC_HEADER_DIRECTORY\tbuiltin variable"},{"contents":"CMAKE_ISPC_HEADER_SUFFIX","trigger":"CMAKE_ISPC_HEADER_SUFFIX\tbuiltin variable"},{"contents":"CMAKE_ISPC_INSTRUCTION_SETS","trigger":"CMAKE_ISPC_INSTRUCTION_SETS\tbuiltin variable"},{"contents":"CMAKE_JOB_POOLS","trigger":"CMAKE_JOB_POOLS\tbuiltin variable"},{"contents":"CMAKE_JOB_POOL_COMPILE","trigger":"CMAKE_JOB_POOL_COMPILE\tbuiltin variable"},{"contents":"CMAKE_JOB_POOL_LINK","trigger":"CMAKE_JOB_POOL_LINK\tbuiltin variable"},{"contents":"CMAKE_JOB_POOL_PRECOMPILE_HEADER","trigger":"CMAKE_JOB_POOL_PRECOMPILE_HEADER\tbuiltin variable"},{"contents":"CMAKE_LIBRARY_ARCHITECTURE","trigger":"CMAKE_LIBRARY_ARCHITECTURE\tbuiltin variable"},{"contents":"CMAKE_LIBRARY_ARCHITECTURE_REGEX","trigger":"CMAKE_LIBRARY_ARCHITECTURE_REGEX\tbuiltin variable"},{"contents":"CMAKE_LIBRARY_OUTPUT_DIRECTORY","trigger":"CMAKE_LIBRARY_OUTPUT_DIRECTORY\tbuiltin variable"},{"contents":"CMAKE_LIBRARY_PATH","trigger":"CMAKE_LIBRARY_PATH\tbuiltin variable"},{"contents":"CMAKE_LIBRARY_PATH_FLAG","trigger":"CMAKE_LIBRARY_PATH_FLAG\tbuiltin variable"},{"contents":"CMAKE_LINK_DEF_FILE_FLAG","trigger":"CMAKE_LINK_DEF_FILE_FLAG\tbuiltin variable"},{"contents":"CMAKE_LINK_DEPENDS_NO_SHARED","trigger":"CMAKE_LINK_DEPENDS_NO_SHARED\tbuiltin variable"},{"contents":"CMAKE_LINK_DIRECTORIES_BEFORE","trigger":"CMAKE_LINK_DIRECTORIES_BEFORE\tbuiltin variable"},{"contents":"CMAKE_LINK_INTERFACE_LIBRARIES","trigger":"CMAKE_LINK_INTERFACE_LIBRARIES\tbuiltin variable"},{"contents":"CMAKE_LINK_LIBRARY_FILE_FLAG","trigger":"CMAKE_LINK_LIBRARY_FILE_FLAG\tbuiltin variable"},{"contents":"CMAKE_LINK_LIBRARY_FLAG","trigger":"CMAKE_LINK_LIBRARY_FLAG\tbuiltin variable"},{"contents":"CMAKE_LINK_LIBRARY_SUFFIX","trigger":"CMAKE_LINK_LIBRARY_SUFFIX\tbuiltin variable"},{"contents":"CMAKE_LINK_SEARCH_END_STATIC","trigger":"CMAKE_LINK_SEARCH_END_STATIC\tbuiltin variable"},{"contents":"CMAKE_LINK_SEARCH_START_STATIC","trigger":"CMAKE_LINK_SEARCH_START_STATIC\tbuiltin variable"},{"contents":"CMAKE_LINK_WHAT_YOU_USE","trigger":"CMAKE_LINK_WHAT_YOU_USE\tbuiltin variable"},{"contents":"CMAKE_MACOSX_BUNDLE","trigger":"CMAKE_MACOSX_BUNDLE\tbuiltin variable"},{"contents":"CMAKE_MACOSX_RPATH","trigger":"CMAKE_MACOSX_RPATH\tbuiltin variable"},{"contents":"CMAKE_MAJOR_VERSION","trigger":"CMAKE_MAJOR_VERSION\tbuiltin variable"},{"contents":"CMAKE_MAKE_PROGRAM","trigger":"CMAKE_MAKE_PROGRAM\tbuiltin variable"},{"contents":"CMAKE_MATCH_COUNT","trigger":"CMAKE_MATCH_COUNT\tbuiltin variable"},{"contents":"CMAKE_MAXIMUM_RECURSION_DEPTH","trigger":"CMAKE_MAXIMUM_RECURSION_DEPTH\tbuiltin variable"},{"contents":"CMAKE_MESSAGE_CONTEXT","trigger":"CMAKE_MESSAGE_CONTEXT\tbuiltin variable"},{"contents":"CMAKE_MESSAGE_CONTEXT_SHOW","trigger":"CMAKE_MESSAGE_CONTEXT_SHOW\tbuiltin variable"},{"contents":"CMAKE_MESSAGE_INDENT","trigger":"CMAKE_MESSAGE_INDENT\tbuiltin variable"},{"contents":"CMAKE_MESSAGE_LOG_LEVEL","trigger":"CMAKE_MESSAGE_LOG_LEVEL\tbuiltin variable"},{"contents":"CMAKE_MFC_FLAG","trigger":"CMAKE_MFC_FLAG\tbuiltin variable"},{"contents":"CMAKE_MINIMUM_REQUIRED_VERSION","trigger":"CMAKE_MINIMUM_REQUIRED_VERSION\tbuiltin variable"},{"contents":"CMAKE_MINOR_VERSION","trigger":"CMAKE_MINOR_VERSION\tbuiltin variable"},{"contents":"CMAKE_MODULE_LINKER_FLAGS","trigger":"CMAKE_MODULE_LINKER_FLAGS\tbuiltin variable"},{"contents":"CMAKE_MODULE_LINKER_FLAGS_INIT","trigger":"CMAKE_MODULE_LINKER_FLAGS_INIT\tbuiltin variable"},{"contents":"CMAKE_MODULE_PATH","trigger":"CMAKE_MODULE_PATH\tbuiltin variable"},{"contents":"CMAKE_MSVCIDE_RUN_PATH","trigger":"CMAKE_MSVCIDE_RUN_PATH\tbuiltin variable"},{"contents":"CMAKE_MSVC_RUNTIME_LIBRARY","trigger":"CMAKE_MSVC_RUNTIME_LIBRARY\tbuiltin variable"},{"contents":"CMAKE_NETRC","trigger":"CMAKE_NETRC\tbuiltin variable"},{"contents":"CMAKE_NETRC_FILE","trigger":"CMAKE_NETRC_FILE\tbuiltin variable"},{"contents":"CMAKE_NINJA_OUTPUT_PATH_PREFIX","trigger":"CMAKE_NINJA_OUTPUT_PATH_PREFIX\tbuiltin variable"},{"contents":"CMAKE_NOT_USING_CONFIG_FLAGS","trigger":"CMAKE_NOT_USING_CONFIG_FLAGS\tbuiltin variable"},{"contents":"CMAKE_NO_BUILTIN_CHRPATH","trigger":"CMAKE_NO_BUILTIN_CHRPATH\tbuiltin variable"},{"contents":"CMAKE_NO_SYSTEM_FROM_IMPORTED","trigger":"CMAKE_NO_SYSTEM_FROM_IMPORTED\tbuiltin variable"},{"contents":"CMAKE_OBJCXX_EXTENSIONS","trigger":"CMAKE_OBJCXX_EXTENSIONS\tbuiltin variable"},{"contents":"CMAKE_OBJCXX_STANDARD","trigger":"CMAKE_OBJCXX_STANDARD\tbuiltin variable"},{"contents":"CMAKE_OBJCXX_STANDARD_REQUIRED","trigger":"CMAKE_OBJCXX_STANDARD_REQUIRED\tbuiltin variable"},{"contents":"CMAKE_OBJC_EXTENSIONS","trigger":"CMAKE_OBJC_EXTENSIONS\tbuiltin variable"},{"contents":"CMAKE_OBJC_STANDARD","trigger":"CMAKE_OBJC_STANDARD\tbuiltin variable"},{"contents":"CMAKE_OBJC_STANDARD_REQUIRED","trigger":"CMAKE_OBJC_STANDARD_REQUIRED\tbuiltin variable"},{"contents":"CMAKE_OBJECT_PATH_MAX","trigger":"CMAKE_OBJECT_PATH_MAX\tbuiltin variable"},{"contents":"CMAKE_OPTIMIZE_DEPENDENCIES","trigger":"CMAKE_OPTIMIZE_DEPENDENCIES\tbuiltin variable"},{"contents":"CMAKE_OSX_ARCHITECTURES","trigger":"CMAKE_OSX_ARCHITECTURES\tbuiltin variable"},{"contents":"CMAKE_OSX_DEPLOYMENT_TARGET","trigger":"CMAKE_OSX_DEPLOYMENT_TARGET\tbuiltin variable"},{"contents":"CMAKE_OSX_SYSROOT","trigger":"CMAKE_OSX_SYSROOT\tbuiltin variable"},{"contents":"CMAKE_PARENT_LIST_FILE","trigger":"CMAKE_PARENT_LIST_FILE\tbuiltin variable"},{"contents":"CMAKE_PATCH_VERSION","trigger":"CMAKE_PATCH_VERSION\tbuiltin variable"},{"contents":"CMAKE_PCH_INSTANTIATE_TEMPLATES","trigger":"CMAKE_PCH_INSTANTIATE_TEMPLATES\tbuiltin variable"},{"contents":"CMAKE_PCH_WARN_INVALID","trigger":"CMAKE_PCH_WARN_INVALID\tbuiltin variable"},{"contents":"CMAKE_PDB_OUTPUT_DIRECTORY","trigger":"CMAKE_PDB_OUTPUT_DIRECTORY\tbuiltin variable"},{"contents":"CMAKE_POSITION_INDEPENDENT_CODE","trigger":"CMAKE_POSITION_INDEPENDENT_CODE\tbuiltin variable"},{"contents":"CMAKE_PREFIX_PATH","trigger":"CMAKE_PREFIX_PATH\tbuiltin variable"},{"contents":"CMAKE_PROGRAM_PATH","trigger":"CMAKE_PROGRAM_PATH\tbuiltin variable"},{"contents":"CMAKE_PROJECT_DESCRIPTION","trigger":"CMAKE_PROJECT_DESCRIPTION\tbuiltin variable"},{"contents":"CMAKE_PROJECT_HOMEPAGE_URL","trigger":"CMAKE_PROJECT_HOMEPAGE_URL\tbuiltin variable"},{"contents":"CMAKE_PROJECT_INCLUDE","trigger":"CMAKE_PROJECT_INCLUDE\tbuiltin variable"},{"contents":"CMAKE_PROJECT_INCLUDE_BEFORE","trigger":"CMAKE_PROJECT_INCLUDE_BEFORE\tbuiltin variable"},{"contents":"CMAKE_PROJECT_NAME","trigger":"CMAKE_PROJECT_NAME\tbuiltin variable"},{"contents":"CMAKE_PROJECT_VERSION","trigger":"CMAKE_PROJECT_VERSION\tbuiltin variable"},{"contents":"CMAKE_PROJECT_VERSION_MAJOR","trigger":"CMAKE_PROJECT_VERSION_MAJOR\tbuiltin variable"},{"contents":"CMAKE_PROJECT_VERSION_MINOR","trigger":"CMAKE_PROJECT_VERSION_MINOR\tbuiltin variable"},{"contents":"CMAKE_PROJECT_VERSION_PATCH","trigger":"CMAKE_PROJECT_VERSION_PATCH\tbuiltin variable"},{"contents":"CMAKE_PROJECT_VERSION_TWEAK","trigger":"CMAKE_PROJECT_VERSION_TWEAK\tbuiltin variable"},{"contents":"CMAKE_RANLIB","trigger":"CMAKE_RANLIB\tbuiltin variable"},{"contents":"CMAKE_ROOT","trigger":"CMAKE_ROOT\tbuiltin variable"},{"contents":"CMAKE_RULE_MESSAGES","trigger":"CMAKE_RULE_MESSAGES\tbuiltin variable"},{"contents":"CMAKE_RUNTIME_OUTPUT_DIRECTORY","trigger":"CMAKE_RUNTIME_OUTPUT_DIRECTORY\tbuiltin variable"},{"contents":"CMAKE_SCRIPT_MODE_FILE","trigger":"CMAKE_SCRIPT_MODE_FILE\tbuiltin variable"},{"contents":"CMAKE_SHARED_LIBRARY_PREFIX","trigger":"CMAKE_SHARED_LIBRARY_PREFIX\tbuiltin variable"},{"contents":"CMAKE_SHARED_LIBRARY_SUFFIX","trigger":"CMAKE_SHARED_LIBRARY_SUFFIX\tbuiltin variable"},{"contents":"CMAKE_SHARED_LINKER_FLAGS","trigger":"CMAKE_SHARED_LINKER_FLAGS\tbuiltin variable"},{"contents":"CMAKE_SHARED_LINKER_FLAGS_INIT","trigger":"CMAKE_SHARED_LINKER_FLAGS_INIT\tbuiltin variable"},{"contents":"CMAKE_SHARED_MODULE_PREFIX","trigger":"CMAKE_SHARED_MODULE_PREFIX\tbuiltin variable"},{"contents":"CMAKE_SHARED_MODULE_SUFFIX","trigger":"CMAKE_SHARED_MODULE_SUFFIX\tbuiltin variable"},{"contents":"CMAKE_SIZEOF_VOID_P","trigger":"CMAKE_SIZEOF_VOID_P\tbuiltin variable"},{"contents":"CMAKE_SKIP_BUILD_RPATH","trigger":"CMAKE_SKIP_BUILD_RPATH\tbuiltin variable"},{"contents":"CMAKE_SKIP_INSTALL_ALL_DEPENDENCY","trigger":"CMAKE_SKIP_INSTALL_ALL_DEPENDENCY\tbuiltin variable"},{"contents":"CMAKE_SKIP_INSTALL_RPATH","trigger":"CMAKE_SKIP_INSTALL_RPATH\tbuiltin variable"},{"contents":"CMAKE_SKIP_INSTALL_RULES","trigger":"CMAKE_SKIP_INSTALL_RULES\tbuiltin variable"},{"contents":"CMAKE_SKIP_RPATH","trigger":"CMAKE_SKIP_RPATH\tbuiltin variable"},{"contents":"CMAKE_SOURCE_DIR","trigger":"CMAKE_SOURCE_DIR\tbuiltin variable"},{"contents":"CMAKE_STAGING_PREFIX","trigger":"CMAKE_STAGING_PREFIX\tbuiltin variable"},{"contents":"CMAKE_STATIC_LIBRARY_PREFIX","trigger":"CMAKE_STATIC_LIBRARY_PREFIX\tbuiltin variable"},{"contents":"CMAKE_STATIC_LIBRARY_SUFFIX","trigger":"CMAKE_STATIC_LIBRARY_SUFFIX\tbuiltin variable"},{"contents":"CMAKE_STATIC_LINKER_FLAGS","trigger":"CMAKE_STATIC_LINKER_FLAGS\tbuiltin variable"},{"contents":"CMAKE_STATIC_LINKER_FLAGS_INIT","trigger":"CMAKE_STATIC_LINKER_FLAGS_INIT\tbuiltin variable"},{"contents":"CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS","trigger":"CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS\tbuiltin variable"},{"contents":"CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE","trigger":"CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE\tbuiltin variable"},{"contents":"CMAKE_SUPPRESS_REGENERATION","trigger":"CMAKE_SUPPRESS_REGENERATION\tbuiltin variable"},{"contents":"CMAKE_SYSROOT","trigger":"CMAKE_SYSROOT\tbuiltin variable"},{"contents":"CMAKE_SYSROOT_COMPILE","trigger":"CMAKE_SYSROOT_COMPILE\tbuiltin variable"},{"contents":"CMAKE_SYSROOT_LINK","trigger":"CMAKE_SYSROOT_LINK\tbuiltin variable"},{"contents":"CMAKE_SYSTEM","trigger":"CMAKE_SYSTEM\tbuiltin variable"},{"contents":"CMAKE_SYSTEM_APPBUNDLE_PATH","trigger":"CMAKE_SYSTEM_APPBUNDLE_PATH\tbuiltin variable"},{"contents":"CMAKE_SYSTEM_FRAMEWORK_PATH","trigger":"CMAKE_SYSTEM_FRAMEWORK_PATH\tbuiltin variable"},{"contents":"CMAKE_SYSTEM_IGNORE_PATH","trigger":"CMAKE_SYSTEM_IGNORE_PATH\tbuiltin variable"},{"contents":"CMAKE_SYSTEM_INCLUDE_PATH","trigger":"CMAKE_SYSTEM_INCLUDE_PATH\tbuiltin variable"},{"contents":"CMAKE_SYSTEM_LIBRARY_PATH","trigger":"CMAKE_SYSTEM_LIBRARY_PATH\tbuiltin variable"},{"contents":"CMAKE_SYSTEM_NAME","trigger":"CMAKE_SYSTEM_NAME\tbuiltin variable"},{"contents":"CMAKE_SYSTEM_PREFIX_PATH","trigger":"CMAKE_SYSTEM_PREFIX_PATH\tbuiltin variable"},{"contents":"CMAKE_SYSTEM_PROCESSOR","trigger":"CMAKE_SYSTEM_PROCESSOR\tbuiltin variable"},{"contents":"CMAKE_SYSTEM_PROGRAM_PATH","trigger":"CMAKE_SYSTEM_PROGRAM_PATH\tbuiltin variable"},{"contents":"CMAKE_SYSTEM_VERSION","trigger":"CMAKE_SYSTEM_VERSION\tbuiltin variable"},{"contents":"CMAKE_Swift_LANGUAGE_VERSION","trigger":"CMAKE_Swift_LANGUAGE_VERSION\tbuiltin variable"},{"contents":"CMAKE_Swift_MODULE_DIRECTORY","trigger":"CMAKE_Swift_MODULE_DIRECTORY\tbuiltin variable"},{"contents":"CMAKE_Swift_NUM_THREADS","trigger":"CMAKE_Swift_NUM_THREADS\tbuiltin variable"},{"contents":"CMAKE_TOOLCHAIN_FILE","trigger":"CMAKE_TOOLCHAIN_FILE\tbuiltin variable"},{"contents":"CMAKE_TRY_COMPILE_CONFIGURATION","trigger":"CMAKE_TRY_COMPILE_CONFIGURATION\tbuiltin variable"},{"contents":"CMAKE_TRY_COMPILE_PLATFORM_VARIABLES","trigger":"CMAKE_TRY_COMPILE_PLATFORM_VARIABLES\tbuiltin variable"},{"contents":"CMAKE_TRY_COMPILE_TARGET_TYPE","trigger":"CMAKE_TRY_COMPILE_TARGET_TYPE\tbuiltin variable"},{"contents":"CMAKE_TWEAK_VERSION","trigger":"CMAKE_TWEAK_VERSION\tbuiltin variable"},{"contents":"CMAKE_UNITY_BUILD","trigger":"CMAKE_UNITY_BUILD\tbuiltin variable"},{"contents":"CMAKE_UNITY_BUILD_BATCH_SIZE","trigger":"CMAKE_UNITY_BUILD_BATCH_SIZE\tbuiltin variable"},{"contents":"CMAKE_USER_MAKE_RULES_OVERRIDE","trigger":"CMAKE_USER_MAKE_RULES_OVERRIDE\tbuiltin variable"},{"contents":"CMAKE_USE_RELATIVE_PATHS","trigger":"CMAKE_USE_RELATIVE_PATHS\tbuiltin variable"},{"contents":"CMAKE_VERBOSE_MAKEFILE","trigger":"CMAKE_VERBOSE_MAKEFILE\tbuiltin variable"},{"contents":"CMAKE_VERSION","trigger":"CMAKE_VERSION\tbuiltin variable"},{"contents":"CMAKE_VISIBILITY_INLINES_HIDDEN","trigger":"CMAKE_VISIBILITY_INLINES_HIDDEN\tbuiltin variable"},{"contents":"CMAKE_VS_DEVENV_COMMAND","trigger":"CMAKE_VS_DEVENV_COMMAND\tbuiltin variable"},{"contents":"CMAKE_VS_GLOBALS","trigger":"CMAKE_VS_GLOBALS\tbuiltin variable"},{"contents":"CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD","trigger":"CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD\tbuiltin variable"},{"contents":"CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD","trigger":"CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD\tbuiltin variable"},{"contents":"CMAKE_VS_INTEL_Fortran_PROJECT_VERSION","trigger":"CMAKE_VS_INTEL_Fortran_PROJECT_VERSION\tbuiltin variable"},{"contents":"CMAKE_VS_JUST_MY_CODE_DEBUGGING","trigger":"CMAKE_VS_JUST_MY_CODE_DEBUGGING\tbuiltin variable"},{"contents":"CMAKE_VS_MSBUILD_COMMAND","trigger":"CMAKE_VS_MSBUILD_COMMAND\tbuiltin variable"},{"contents":"CMAKE_VS_NsightTegra_VERSION","trigger":"CMAKE_VS_NsightTegra_VERSION\tbuiltin variable"},{"contents":"CMAKE_VS_PLATFORM_NAME","trigger":"CMAKE_VS_PLATFORM_NAME\tbuiltin variable"},{"contents":"CMAKE_VS_PLATFORM_NAME_DEFAULT","trigger":"CMAKE_VS_PLATFORM_NAME_DEFAULT\tbuiltin variable"},{"contents":"CMAKE_VS_PLATFORM_TOOLSET","trigger":"CMAKE_VS_PLATFORM_TOOLSET\tbuiltin variable"},{"contents":"CMAKE_VS_PLATFORM_TOOLSET_CUDA","trigger":"CMAKE_VS_PLATFORM_TOOLSET_CUDA\tbuiltin variable"},{"contents":"CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR","trigger":"CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR\tbuiltin variable"},{"contents":"CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE","trigger":"CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE\tbuiltin variable"},{"contents":"CMAKE_VS_PLATFORM_TOOLSET_VERSION","trigger":"CMAKE_VS_PLATFORM_TOOLSET_VERSION\tbuiltin variable"},{"contents":"CMAKE_VS_SDK_EXCLUDE_DIRECTORIES","trigger":"CMAKE_VS_SDK_EXCLUDE_DIRECTORIES\tbuiltin variable"},{"contents":"CMAKE_VS_SDK_EXECUTABLE_DIRECTORIES","trigger":"CMAKE_VS_SDK_EXECUTABLE_DIRECTORIES\tbuiltin variable"},{"contents":"CMAKE_VS_SDK_INCLUDE_DIRECTORIES","trigger":"CMAKE_VS_SDK_INCLUDE_DIRECTORIES\tbuiltin variable"},{"contents":"CMAKE_VS_SDK_LIBRARY_DIRECTORIES","trigger":"CMAKE_VS_SDK_LIBRARY_DIRECTORIES\tbuiltin variable"},{"contents":"CMAKE_VS_SDK_LIBRARY_WINRT_DIRECTORIES","trigger":"CMAKE_VS_SDK_LIBRARY_WINRT_DIRECTORIES\tbuiltin variable"},{"contents":"CMAKE_VS_SDK_REFERENCE_DIRECTORIES","trigger":"CMAKE_VS_SDK_REFERENCE_DIRECTORIES\tbuiltin variable"},{"contents":"CMAKE_VS_SDK_SOURCE_DIRECTORIES","trigger":"CMAKE_VS_SDK_SOURCE_DIRECTORIES\tbuiltin variable"},{"contents":"CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION","trigger":"CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION\tbuiltin variable"},{"contents":"CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM","trigger":"CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM\tbuiltin variable"},{"contents":"CMAKE_VS_WINRT_BY_DEFAULT","trigger":"CMAKE_VS_WINRT_BY_DEFAULT\tbuiltin variable"},{"contents":"CMAKE_WARN_DEPRECATED","trigger":"CMAKE_WARN_DEPRECATED\tbuiltin variable"},{"contents":"CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION","trigger":"CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION\tbuiltin variable"},{"contents":"CMAKE_WIN32_EXECUTABLE","trigger":"CMAKE_WIN32_EXECUTABLE\tbuiltin variable"},{"contents":"CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS","trigger":"CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS\tbuiltin variable"},{"contents":"CMAKE_XCODE_BUILD_SYSTEM","trigger":"CMAKE_XCODE_BUILD_SYSTEM\tbuiltin variable"},{"contents":"CMAKE_XCODE_GENERATE_SCHEME","trigger":"CMAKE_XCODE_GENERATE_SCHEME\tbuiltin variable"},{"contents":"CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY","trigger":"CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY\tbuiltin variable"},{"contents":"CMAKE_XCODE_LINK_BUILD_PHASE_MODE","trigger":"CMAKE_XCODE_LINK_BUILD_PHASE_MODE\tbuiltin variable"},{"contents":"CMAKE_XCODE_PLATFORM_TOOLSET","trigger":"CMAKE_XCODE_PLATFORM_TOOLSET\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER","trigger":"CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN","trigger":"CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING","trigger":"CMAKE_XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER","trigger":"CMAKE_XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS","trigger":"CMAKE_XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE","trigger":"CMAKE_XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_ENVIRONMENT","trigger":"CMAKE_XCODE_SCHEME_ENVIRONMENT\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_GUARD_MALLOC","trigger":"CMAKE_XCODE_SCHEME_GUARD_MALLOC\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP","trigger":"CMAKE_XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_MALLOC_GUARD_EDGES","trigger":"CMAKE_XCODE_SCHEME_MALLOC_GUARD_EDGES\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_MALLOC_SCRIBBLE","trigger":"CMAKE_XCODE_SCHEME_MALLOC_SCRIBBLE\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_MALLOC_STACK","trigger":"CMAKE_XCODE_SCHEME_MALLOC_STACK\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_THREAD_SANITIZER","trigger":"CMAKE_XCODE_SCHEME_THREAD_SANITIZER\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_THREAD_SANITIZER_STOP","trigger":"CMAKE_XCODE_SCHEME_THREAD_SANITIZER_STOP\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER","trigger":"CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP","trigger":"CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_WORKING_DIRECTORY","trigger":"CMAKE_XCODE_SCHEME_WORKING_DIRECTORY\tbuiltin variable"},{"contents":"CMAKE_XCODE_SCHEME_ZOMBIE_OBJECTS","trigger":"CMAKE_XCODE_SCHEME_ZOMBIE_OBJECTS\tbuiltin variable"},{"contents":"CPACK_ABSOLUTE_DESTINATION_FILES","trigger":"CPACK_ABSOLUTE_DESTINATION_FILES\tbuiltin variable"},{"contents":"CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY","trigger":"CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY\tbuiltin variable"},{"contents":"CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION","trigger":"CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION\tbuiltin variable"},{"contents":"CPACK_INCLUDE_TOPLEVEL_DIRECTORY","trigger":"CPACK_INCLUDE_TOPLEVEL_DIRECTORY\tbuiltin variable"},{"contents":"CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS","trigger":"CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS\tbuiltin variable"},{"contents":"CPACK_PACKAGING_INSTALL_PREFIX","trigger":"CPACK_PACKAGING_INSTALL_PREFIX\tbuiltin variable"},{"contents":"CPACK_SET_DESTDIR","trigger":"CPACK_SET_DESTDIR\tbuiltin variable"},{"contents":"CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION","trigger":"CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION\tbuiltin variable"},{"contents":"CTEST_BINARY_DIRECTORY","trigger":"CTEST_BINARY_DIRECTORY\tbuiltin variable"},{"contents":"CTEST_BUILD_COMMAND","trigger":"CTEST_BUILD_COMMAND\tbuiltin variable"},{"contents":"CTEST_BUILD_NAME","trigger":"CTEST_BUILD_NAME\tbuiltin variable"},{"contents":"CTEST_BZR_COMMAND","trigger":"CTEST_BZR_COMMAND\tbuiltin variable"},{"contents":"CTEST_BZR_UPDATE_OPTIONS","trigger":"CTEST_BZR_UPDATE_OPTIONS\tbuiltin variable"},{"contents":"CTEST_CHANGE_ID","trigger":"CTEST_CHANGE_ID\tbuiltin variable"},{"contents":"CTEST_CHECKOUT_COMMAND","trigger":"CTEST_CHECKOUT_COMMAND\tbuiltin variable"},{"contents":"CTEST_CONFIGURATION_TYPE","trigger":"CTEST_CONFIGURATION_TYPE\tbuiltin variable"},{"contents":"CTEST_CONFIGURE_COMMAND","trigger":"CTEST_CONFIGURE_COMMAND\tbuiltin variable"},{"contents":"CTEST_COVERAGE_COMMAND","trigger":"CTEST_COVERAGE_COMMAND\tbuiltin variable"},{"contents":"CTEST_COVERAGE_EXTRA_FLAGS","trigger":"CTEST_COVERAGE_EXTRA_FLAGS\tbuiltin variable"},{"contents":"CTEST_CURL_OPTIONS","trigger":"CTEST_CURL_OPTIONS\tbuiltin variable"},{"contents":"CTEST_CUSTOM_COVERAGE_EXCLUDE","trigger":"CTEST_CUSTOM_COVERAGE_EXCLUDE\tbuiltin variable"},{"contents":"CTEST_CUSTOM_ERROR_EXCEPTION","trigger":"CTEST_CUSTOM_ERROR_EXCEPTION\tbuiltin variable"},{"contents":"CTEST_CUSTOM_ERROR_MATCH","trigger":"CTEST_CUSTOM_ERROR_MATCH\tbuiltin variable"},{"contents":"CTEST_CUSTOM_ERROR_POST_CONTEXT","trigger":"CTEST_CUSTOM_ERROR_POST_CONTEXT\tbuiltin variable"},{"contents":"CTEST_CUSTOM_ERROR_PRE_CONTEXT","trigger":"CTEST_CUSTOM_ERROR_PRE_CONTEXT\tbuiltin variable"},{"contents":"CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE","trigger":"CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE\tbuiltin variable"},{"contents":"CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS","trigger":"CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS\tbuiltin variable"},{"contents":"CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS","trigger":"CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS\tbuiltin variable"},{"contents":"CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE","trigger":"CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE\tbuiltin variable"},{"contents":"CTEST_CUSTOM_MEMCHECK_IGNORE","trigger":"CTEST_CUSTOM_MEMCHECK_IGNORE\tbuiltin variable"},{"contents":"CTEST_CUSTOM_POST_MEMCHECK","trigger":"CTEST_CUSTOM_POST_MEMCHECK\tbuiltin variable"},{"contents":"CTEST_CUSTOM_POST_TEST","trigger":"CTEST_CUSTOM_POST_TEST\tbuiltin variable"},{"contents":"CTEST_CUSTOM_PRE_MEMCHECK","trigger":"CTEST_CUSTOM_PRE_MEMCHECK\tbuiltin variable"},{"contents":"CTEST_CUSTOM_PRE_TEST","trigger":"CTEST_CUSTOM_PRE_TEST\tbuiltin variable"},{"contents":"CTEST_CUSTOM_TESTS_IGNORE","trigger":"CTEST_CUSTOM_TESTS_IGNORE\tbuiltin variable"},{"contents":"CTEST_CUSTOM_WARNING_EXCEPTION","trigger":"CTEST_CUSTOM_WARNING_EXCEPTION\tbuiltin variable"},{"contents":"CTEST_CUSTOM_WARNING_MATCH","trigger":"CTEST_CUSTOM_WARNING_MATCH\tbuiltin variable"},{"contents":"CTEST_CVS_CHECKOUT","trigger":"CTEST_CVS_CHECKOUT\tbuiltin variable"},{"contents":"CTEST_CVS_COMMAND","trigger":"CTEST_CVS_COMMAND\tbuiltin variable"},{"contents":"CTEST_CVS_UPDATE_OPTIONS","trigger":"CTEST_CVS_UPDATE_OPTIONS\tbuiltin variable"},{"contents":"CTEST_DROP_LOCATION","trigger":"CTEST_DROP_LOCATION\tbuiltin variable"},{"contents":"CTEST_DROP_METHOD","trigger":"CTEST_DROP_METHOD\tbuiltin variable"},{"contents":"CTEST_DROP_SITE","trigger":"CTEST_DROP_SITE\tbuiltin variable"},{"contents":"CTEST_DROP_SITE_CDASH","trigger":"CTEST_DROP_SITE_CDASH\tbuiltin variable"},{"contents":"CTEST_DROP_SITE_PASSWORD","trigger":"CTEST_DROP_SITE_PASSWORD\tbuiltin variable"},{"contents":"CTEST_DROP_SITE_USER","trigger":"CTEST_DROP_SITE_USER\tbuiltin variable"},{"contents":"CTEST_EXTRA_COVERAGE_GLOB","trigger":"CTEST_EXTRA_COVERAGE_GLOB\tbuiltin variable"},{"contents":"CTEST_GIT_COMMAND","trigger":"CTEST_GIT_COMMAND\tbuiltin variable"},{"contents":"CTEST_GIT_INIT_SUBMODULES","trigger":"CTEST_GIT_INIT_SUBMODULES\tbuiltin variable"},{"contents":"CTEST_GIT_UPDATE_CUSTOM","trigger":"CTEST_GIT_UPDATE_CUSTOM\tbuiltin variable"},{"contents":"CTEST_GIT_UPDATE_OPTIONS","trigger":"CTEST_GIT_UPDATE_OPTIONS\tbuiltin variable"},{"contents":"CTEST_HG_COMMAND","trigger":"CTEST_HG_COMMAND\tbuiltin variable"},{"contents":"CTEST_HG_UPDATE_OPTIONS","trigger":"CTEST_HG_UPDATE_OPTIONS\tbuiltin variable"},{"contents":"CTEST_LABELS_FOR_SUBPROJECTS","trigger":"CTEST_LABELS_FOR_SUBPROJECTS\tbuiltin variable"},{"contents":"CTEST_MEMORYCHECK_COMMAND","trigger":"CTEST_MEMORYCHECK_COMMAND\tbuiltin variable"},{"contents":"CTEST_MEMORYCHECK_COMMAND_OPTIONS","trigger":"CTEST_MEMORYCHECK_COMMAND_OPTIONS\tbuiltin variable"},{"contents":"CTEST_MEMORYCHECK_SANITIZER_OPTIONS","trigger":"CTEST_MEMORYCHECK_SANITIZER_OPTIONS\tbuiltin variable"},{"contents":"CTEST_MEMORYCHECK_SUPPRESSIONS_FILE","trigger":"CTEST_MEMORYCHECK_SUPPRESSIONS_FILE\tbuiltin variable"},{"contents":"CTEST_MEMORYCHECK_TYPE","trigger":"CTEST_MEMORYCHECK_TYPE\tbuiltin variable"},{"contents":"CTEST_NIGHTLY_START_TIME","trigger":"CTEST_NIGHTLY_START_TIME\tbuiltin variable"},{"contents":"CTEST_P4_CLIENT","trigger":"CTEST_P4_CLIENT\tbuiltin variable"},{"contents":"CTEST_P4_COMMAND","trigger":"CTEST_P4_COMMAND\tbuiltin variable"},{"contents":"CTEST_P4_OPTIONS","trigger":"CTEST_P4_OPTIONS\tbuiltin variable"},{"contents":"CTEST_P4_UPDATE_OPTIONS","trigger":"CTEST_P4_UPDATE_OPTIONS\tbuiltin variable"},{"contents":"CTEST_RESOURCE_SPEC_FILE","trigger":"CTEST_RESOURCE_SPEC_FILE\tbuiltin variable"},{"contents":"CTEST_RUN_CURRENT_SCRIPT","trigger":"CTEST_RUN_CURRENT_SCRIPT\tbuiltin variable"},{"contents":"CTEST_SCP_COMMAND","trigger":"CTEST_SCP_COMMAND\tbuiltin variable"},{"contents":"CTEST_SITE","trigger":"CTEST_SITE\tbuiltin variable"},{"contents":"CTEST_SOURCE_DIRECTORY","trigger":"CTEST_SOURCE_DIRECTORY\tbuiltin variable"},{"contents":"CTEST_SUBMIT_URL","trigger":"CTEST_SUBMIT_URL\tbuiltin variable"},{"contents":"CTEST_SVN_COMMAND","trigger":"CTEST_SVN_COMMAND\tbuiltin variable"},{"contents":"CTEST_SVN_OPTIONS","trigger":"CTEST_SVN_OPTIONS\tbuiltin variable"},{"contents":"CTEST_SVN_UPDATE_OPTIONS","trigger":"CTEST_SVN_UPDATE_OPTIONS\tbuiltin variable"},{"contents":"CTEST_TEST_LOAD","trigger":"CTEST_TEST_LOAD\tbuiltin variable"},{"contents":"CTEST_TEST_TIMEOUT","trigger":"CTEST_TEST_TIMEOUT\tbuiltin variable"},{"contents":"CTEST_TRIGGER_SITE","trigger":"CTEST_TRIGGER_SITE\tbuiltin variable"},{"contents":"CTEST_UPDATE_COMMAND","trigger":"CTEST_UPDATE_COMMAND\tbuiltin variable"},{"contents":"CTEST_UPDATE_OPTIONS","trigger":"CTEST_UPDATE_OPTIONS\tbuiltin variable"},{"contents":"CTEST_UPDATE_VERSION_ONLY","trigger":"CTEST_UPDATE_VERSION_ONLY\tbuiltin variable"},{"contents":"CTEST_UPDATE_VERSION_OVERRIDE","trigger":"CTEST_UPDATE_VERSION_OVERRIDE\tbuiltin variable"},{"contents":"CTEST_USE_LAUNCHERS","trigger":"CTEST_USE_LAUNCHERS\tbuiltin variable"},{"contents":"CYGWIN","trigger":"CYGWIN\tbuiltin variable"},{"contents":"ENV","trigger":"ENV\tbuiltin variable"},{"contents":"EXECUTABLE_OUTPUT_PATH","trigger":"EXECUTABLE_OUTPUT_PATH\tbuiltin variable"},{"contents":"GHS-MULTI","trigger":"GHS-MULTI\tbuiltin variable"},{"contents":"IOS","trigger":"IOS\tbuiltin variable"},{"contents":"LIBRARY_OUTPUT_PATH","trigger":"LIBRARY_OUTPUT_PATH\tbuiltin variable"},{"contents":"MINGW","trigger":"MINGW\tbuiltin variable"},{"contents":"MSVC","trigger":"MSVC\tbuiltin variable"},{"contents":"MSVC10","trigger":"MSVC10\tbuiltin variable"},{"contents":"MSVC11","trigger":"MSVC11\tbuiltin variable"},{"contents":"MSVC12","trigger":"MSVC12\tbuiltin variable"},{"contents":"MSVC14","trigger":"MSVC14\tbuiltin variable"},{"contents":"MSVC60","trigger":"MSVC60\tbuiltin variable"},{"contents":"MSVC70","trigger":"MSVC70\tbuiltin variable"},{"contents":"MSVC71","trigger":"MSVC71\tbuiltin variable"},{"contents":"MSVC80","trigger":"MSVC80\tbuiltin variable"},{"contents":"MSVC90","trigger":"MSVC90\tbuiltin variable"},{"contents":"MSVC_IDE","trigger":"MSVC_IDE\tbuiltin variable"},{"contents":"MSVC_TOOLSET_VERSION","trigger":"MSVC_TOOLSET_VERSION\tbuiltin variable"},{"contents":"MSVC_VERSION","trigger":"MSVC_VERSION\tbuiltin variable"},{"contents":"MSYS","trigger":"MSYS\tbuiltin variable"},{"contents":"PROJECT_BINARY_DIR","trigger":"PROJECT_BINARY_DIR\tbuiltin variable"},{"contents":"PROJECT_DESCRIPTION","trigger":"PROJECT_DESCRIPTION\tbuiltin variable"},{"contents":"PROJECT_HOMEPAGE_URL","trigger":"PROJECT_HOMEPAGE_URL\tbuiltin variable"},{"contents":"PROJECT_NAME","trigger":"PROJECT_NAME\tbuiltin variable"},{"contents":"PROJECT_SOURCE_DIR","trigger":"PROJECT_SOURCE_DIR\tbuiltin variable"},{"contents":"PROJECT_VERSION","trigger":"PROJECT_VERSION\tbuiltin variable"},{"contents":"PROJECT_VERSION_MAJOR","trigger":"PROJECT_VERSION_MAJOR\tbuiltin variable"},{"contents":"PROJECT_VERSION_MINOR","trigger":"PROJECT_VERSION_MINOR\tbuiltin variable"},{"contents":"PROJECT_VERSION_PATCH","trigger":"PROJECT_VERSION_PATCH\tbuiltin variable"},{"contents":"PROJECT_VERSION_TWEAK","trigger":"PROJECT_VERSION_TWEAK\tbuiltin variable"},{"contents":"UNIX","trigger":"UNIX\tbuiltin variable"},{"contents":"WIN32","trigger":"WIN32\tbuiltin variable"},{"contents":"WINCE","trigger":"WINCE\tbuiltin variable"},{"contents":"WINDOWS_PHONE","trigger":"WINDOWS_PHONE\tbuiltin variable"},{"contents":"WINDOWS_STORE","trigger":"WINDOWS_STORE\tbuiltin variable"},{"contents":"XCODE","trigger":"XCODE\tbuiltin variable"},{"contents":"XCODE_VERSION","trigger":"XCODE_VERSION\tbuiltin variable"}],"scope":"variable.other.readwrite.cmake"}
1194+assets/syntaxes/02_Extra/CMake/CMakeCommands.sublime-syntax:30: - match: \bVERBATIM\b
1195+assets/syntaxes/02_Extra/CMake/CMakeCommands.sublime-syntax:31: scope: variable.parameter.VERBATIM.cmake
1196+assets/syntaxes/02_Extra/CMake/CMakeCommands.sublime-syntax:59: - match: \bVERBATIM\b
1197+assets/syntaxes/02_Extra/CMake/CMakeCommands.sublime-syntax:60: scope: variable.parameter.VERBATIM.cmake
1198+assets/syntaxes/02_Extra/SCSS_Sass/Syntaxes/Sass.sublime-syntax:1830: - match: '\bat\b'
1199+assets/syntaxes/02_Extra/Elixir/builds/Elixir - mix format $file.sublime-build:6: "cmd": ["mix.bat", "format", "$file", "--dot-formatter", "$folder/.formatter.exs"],
1200+assets/syntaxes/02_Extra/Elixir/builds/Elixir - elixir $file.sublime-build:6: "cmd": ["elixir.bat", "$file_name"]
1201+assets/syntaxes/02_Extra/Lean.sublime-syntax:23: - match: '\battribute\b\s*\[[^\]]*\]'
1202+assets/syntaxes/02_Extra/PowerShell.sublime-syntax:86: - match: '(\b(([A-Za-z0-9\-_\.]+)\.(?i:exe|com|cmd|bat))\b)'
1203+assets/syntaxes/02_Extra/PowerShell.sublime-syntax:174: - 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'
1204+assets/syntaxes/02_Extra/MediaWiki/MediawikiNG.sublime-syntax:129: - meta_content_scope: meta.environment.embedded.dosbatch.mediawiki source.dosbatch.embedded
1205+assets/syntaxes/02_Extra/MediaWiki/MediawikiNG.sublime-syntax:132: - include: scope:source.dosbatch
1206+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.lin.x64/Crypto/Util/RFC1751.py:125: "BAN", "BAR", "BAT", "BAY", "BE", "BED", "BEE", "BEG", "BEN", "BET",
1207+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.lin.x64/Crypto/Util/RFC1751.py:189: "BARN", "BARR", "BASE", "BASH", "BASK", "BASS", "BATE", "BATH",
1208+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.lin.x64/Crypto/SelfTest/Signature/test_vectors/wycheproof/ecdsa_test.json:12177: "keyPem" : "-----BEGIN PUBLIC KEY-----\nMGowFAYHKoZIzj0CAQYJKyQDAwIIAQEJA1IABHJlM+Jnc6xyChFbAt6JrBWWZnfi\nObfFd6HBW4ECex/rc+ZzYB4hGqkqzLWFvAbMJ0thyeYUdG7dJI0czPjYsatLwVzF\njN8RYGXOl2fyoyI9\n-----END PUBLIC KEY-----",
1209+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.lin.x64/Crypto/SelfTest/Signature/test_vectors/wycheproof/ecdsa_test.json:13141: "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHowFAYHKoZIzj0CAQYJKyQDAwIIAQELA2IABATZ1KYtbrAgc+c4seQ5zs1UQAMZ\nEfRRkOtgYqM1NfxSabz8JdSvwdrg662UjXcy2AKa836Jo86n3ziwIPYkkG/KbZRO\nFIaFP+jlupz7otdKhS7Fh9Rv5JkXw2RBjvfspQ==\n-----END PUBLIC KEY-----",
1210+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.lin.x64/Crypto/SelfTest/Signature/test_vectors/wycheproof/ecdsa_secp256r1_sha256_test.json:2410: "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE3q0Rx6WzloYvIZdNxHUvre/5lO/p\nu9BatBN2XqgLbh8d4/BkDorG7c+Jz/U8QOJlu5QHijQ3Nt8HqgMY/H/h/w==\n-----END PUBLIC KEY-----",
1211+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.lin.x64/Crypto/SelfTest/PublicKey/test_import_RSA.py:444:MIIEcjCCAlqgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQGEwJVUzEL
1212+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.win.x64/Crypto/Util/RFC1751.py:125: "BAN", "BAR", "BAT", "BAY", "BE", "BED", "BEE", "BEG", "BEN", "BET",
1213+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.win.x64/Crypto/Util/RFC1751.py:189: "BARN", "BARR", "BASE", "BASH", "BASK", "BASS", "BATE", "BATH",
1214+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.win.x64/Crypto/SelfTest/Signature/test_vectors/wycheproof/ecdsa_test.json:12177: "keyPem" : "-----BEGIN PUBLIC KEY-----\nMGowFAYHKoZIzj0CAQYJKyQDAwIIAQEJA1IABHJlM+Jnc6xyChFbAt6JrBWWZnfi\nObfFd6HBW4ECex/rc+ZzYB4hGqkqzLWFvAbMJ0thyeYUdG7dJI0czPjYsatLwVzF\njN8RYGXOl2fyoyI9\n-----END PUBLIC KEY-----",
1215+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.win.x64/Crypto/SelfTest/Signature/test_vectors/wycheproof/ecdsa_test.json:13141: "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHowFAYHKoZIzj0CAQYJKyQDAwIIAQELA2IABATZ1KYtbrAgc+c4seQ5zs1UQAMZ\nEfRRkOtgYqM1NfxSabz8JdSvwdrg662UjXcy2AKa836Jo86n3ziwIPYkkG/KbZRO\nFIaFP+jlupz7otdKhS7Fh9Rv5JkXw2RBjvfspQ==\n-----END PUBLIC KEY-----",
1216+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.win.x64/Crypto/SelfTest/Signature/test_vectors/wycheproof/ecdsa_secp256r1_sha256_test.json:2410: "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE3q0Rx6WzloYvIZdNxHUvre/5lO/p\nu9BatBN2XqgLbh8d4/BkDorG7c+Jz/U8QOJlu5QHijQ3Nt8HqgMY/H/h/w==\n-----END PUBLIC KEY-----",
1217+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.win.x64/Crypto/SelfTest/PublicKey/test_import_RSA.py:444:MIIEcjCCAlqgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQGEwJVUzEL
1218+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.osx.x64/Crypto/Util/RFC1751.py:125: "BAN", "BAR", "BAT", "BAY", "BE", "BED", "BEE", "BEG", "BEN", "BET",
1219+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.osx.x64/Crypto/Util/RFC1751.py:189: "BARN", "BARR", "BASE", "BASH", "BASK", "BASS", "BATE", "BATH",
1220+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.osx.x64/Crypto/SelfTest/Signature/test_vectors/wycheproof/ecdsa_test.json:12177: "keyPem" : "-----BEGIN PUBLIC KEY-----\nMGowFAYHKoZIzj0CAQYJKyQDAwIIAQEJA1IABHJlM+Jnc6xyChFbAt6JrBWWZnfi\nObfFd6HBW4ECex/rc+ZzYB4hGqkqzLWFvAbMJ0thyeYUdG7dJI0czPjYsatLwVzF\njN8RYGXOl2fyoyI9\n-----END PUBLIC KEY-----",
1221+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.osx.x64/Crypto/SelfTest/Signature/test_vectors/wycheproof/ecdsa_test.json:13141: "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHowFAYHKoZIzj0CAQYJKyQDAwIIAQELA2IABATZ1KYtbrAgc+c4seQ5zs1UQAMZ\nEfRRkOtgYqM1NfxSabz8JdSvwdrg662UjXcy2AKa836Jo86n3ziwIPYkkG/KbZRO\nFIaFP+jlupz7otdKhS7Fh9Rv5JkXw2RBjvfspQ==\n-----END PUBLIC KEY-----",
1222+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.osx.x64/Crypto/SelfTest/Signature/test_vectors/wycheproof/ecdsa_secp256r1_sha256_test.json:2410: "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE3q0Rx6WzloYvIZdNxHUvre/5lO/p\nu9BatBN2XqgLbh8d4/BkDorG7c+Jz/U8QOJlu5QHijQ3Nt8HqgMY/H/h/w==\n-----END PUBLIC KEY-----",
1223+assets/syntaxes/02_Extra/MediaWiki/lib/Crypto.osx.x64/Crypto/SelfTest/PublicKey/test_import_RSA.py:444:MIIEcjCCAlqgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQGEwJVUzEL
1224+assets/syntaxes/02_Extra/Julia/julia_unicode/emoji_symbols.py:69: ("\\:battery:", u"🔋"),
1225+assets/syntaxes/02_Extra/Julia/julia_unicode/emoji_symbols.py:576: ("\\:tanabata_tree:", u"🎋"),
1226+assets/syntaxes/02_Extra/Julia/julia_unicode/emoji_symbols.py:729: ("\\:bath:", u"🛀"),
1227+assets/syntaxes/02_Extra/Julia/julia_unicode/emoji_symbols.py:804: ("\\:bathtub:", u"🛁"),
1228+assets/syntaxes/02_Extra/Crystal.sublime-syntax:136: - match: '\b(initialize|new|loop|include|extend|raise|getter|setter|property|class_getter|class_setter|class_property|describe|context|it|with|delegate|def_hash|def_equals|def_equals_and_hash|forward_missing_to|record|assert_responds_to|spawn|annotation|verbatim)\b[!?]?'
1229+assets/syntaxes/02_Extra/Dart/docgen.py:30: cmd = ["docgen.bat", "--no-include-sdk", path]
1230+assets/syntaxes/02_Extra/Dart/docgen.py:58: cmd = ["docgen.bat", "--no-include-sdk", "--serve", path]
1231+assets/syntaxes/02_Extra/Dart/lib/sdk.py:177: return self.get_bin_tool('pub', '.bat')
1232+assets/syntaxes/02_Extra/Dart/lib/sdk.py:183: return self.get_bin_tool('dart2js', '.bat')
1233+assets/syntaxes/02_Extra/Dart/lib/sdk.py:189: return self.get_bin_tool('dartanalyzer', '.bat')
1234+assets/syntaxes/02_Extra/Dart/lib/sdk.py:195: return self.get_bin_tool('docgen', '.bat')
1235+assets/syntaxes/02_Extra/Dart/lib/sdk.py:247: self.path = SDK().get_bin_tool('dartfmt', '.bat')
1236+assets/syntaxes/02_Extra/Dart/sublime_plugin_lib/path.py:142: Useful to add .exe to @original, .bat, etc if ST is running on Windows.
1237+assets/syntaxes/02_Extra/Dart/sublime_plugin_lib/path.py:186: """ Useful to add .exe, .bat, etc. to @original if ST is running on
1238+assets/syntaxes/02_Extra/Dart/Support/Dart.sublime-build:19: "cmd": ["dart2js.bat", "--minify", "-o$file.js", "$file"]
1239+assets/syntaxes/02_Extra/Dart/Support/Dart - Pubspec.sublime-build:21: "cmd": ["pub.bat", "upgrade"]
1240+assets/syntaxes/02_Extra/Dart/Support/Dart - Pubspec.sublime-build:36: "cmd": ["pub.bat", "version"]
1241+assets/syntaxes/02_Extra/LESS/Syntaxes/LESS.sublime-syntax:1709: - match: '\bat\b'
1242+assets/syntaxes/02_Extra/Email/README.md:15::mouse: Using [bat](https://github.com/sharkdp/bat) *(bat is a cat clone with syntax highlighting and Git integration)*
1243+assets/syntaxes/02_Extra/Email/README.md:16:![bat](https://raw.githubusercontent.com/mariozaizar/email.sublime-syntax/master/demo/bat.png)
1244+assets/syntaxes/02_Extra/Email/link_bat.sh:3:# We use bat to verify the sintax. bat is a cat clone with syntax highlighting
1245+assets/syntaxes/02_Extra/Email/link_bat.sh:4:# and Git integration. bat uses syntect library for syntax highlighting which
1246+assets/syntaxes/02_Extra/Email/link_bat.sh:7:# https://github.com/sharkdp/bat
1247+assets/syntaxes/02_Extra/Email/link_bat.sh:9:bat --version || brew install bat # Mac OS only
1248+assets/syntaxes/02_Extra/Email/link_bat.sh:11:BAT_PATH=$(bat --config-dir)
1249+assets/syntaxes/02_Extra/Email/link_bat.sh:13:mkdir -p "$BAT_PATH/syntaxes"
1250+assets/syntaxes/02_Extra/Email/link_bat.sh:14:mkdir -p "$BAT_PATH/themes"
1251+assets/syntaxes/02_Extra/Email/link_bat.sh:16:INSTALL_PATH=${BAT_PATH}/syntaxes
1252+assets/syntaxes/02_Extra/Email/link_bat.sh:19:bat cache --build
1253+assets/syntaxes/02_Extra/Email/link_bat.sh:20:bat --list-languages | grep "Email"
1254+assets/syntaxes/02_Extra/Email/link_bat.sh:22:bat demo/email.eml
1255+assets/syntaxes/02_Extra/TypeScript.sublime-syntax:2446: |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule
1256+assets/syntaxes/02_Extra/HTML (Twig)/Preferences/Indentation.tmPreferences:22: ^\s*\{%-?\s(end(?:autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)|(else))(?:(?!%\}).)*\s-?%\}
1257+assets/syntaxes/02_Extra/HTML (Twig)/Preferences/Indentation.tmPreferences:36: ^\s*\{%-?\s(autoescape|block|embed|filter|for|if|else|macro|raw|sandbox|set|spaceless|trans|verbatim)(?:(?!%\}).)*\s-?%\}(?!.*\{%-?\send\1)
1258+assets/syntaxes/02_Extra/HTML (Twig)/Preferences/Folding.tmPreferences:16: |\{%\s+(autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)
1259+assets/syntaxes/02_Extra/HTML (Twig)/Preferences/Folding.tmPreferences:23: |\{%\s+end(autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)
1260+assets/syntaxes/02_Extra/HTML (Twig)/Snippets/verbatim.tmSnippet:6: <string>{% verbatim %}
1261+assets/syntaxes/02_Extra/HTML (Twig)/Snippets/verbatim.tmSnippet:8:{% endverbatim %}</string>
1262+assets/syntaxes/02_Extra/HTML (Twig)/Snippets/verbatim.tmSnippet:10: <string>verbatim</string>
1263+assets/syntaxes/02_Extra/HTML (Twig)/Snippets/verbatim.tmSnippet:14: <string>verbatim</string>
1264+assets/syntaxes/02_Extra/HTML (Twig)/Syntaxes/HTML (Twig).tmLanguage:1374: <string>(?&lt;=\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)</string>
1265+assets/syntaxes/02_Extra/HTML (Twig)/Syntaxes/HTML (Twig).tmLanguage:1590: <string>(?&lt;=(?:[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)(\()</string>
1266+assets/syntaxes/02_Extra/requirementstxt/LICENSE:5: Everyone is permitted to copy and distribute verbatim copies
1267+assets/syntaxes/02_Extra/requirementstxt/LICENSE:195: 4. Conveying Verbatim Copies.
1268+assets/syntaxes/02_Extra/requirementstxt/LICENSE:197: You may convey verbatim copies of the Program's source code as you
1269+assets/syntaxes/01_Packages/Batch File/Symbol List.tmPreferences:7: <string>source.dosbatch entity.name.label - meta.function-call</string>
1270+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:4:name: Batch File
1271+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:6: - bat
1272+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:8:scope: source.dosbatch
1273+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:31: scope: keyword.control.statement.dosbatch
1274+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:34: 1: keyword.control.statement.dosbatch
1275+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:35: 2: punctuation.separator.dosbatch
1276+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:36: 3: keyword.control.flow.return.dosbatch
1277+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:37: 4: meta.function-call.dosbatch variable.function.dosbatch
1278+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:40: 1: keyword.control.conditional.dosbatch
1279+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:41: 2: keyword.operator.logical.dosbatch
1280+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:42: 3: keyword.other.dosbatch
1281+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:44: scope: keyword.control.conditional.dosbatch
1282+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:46: scope: keyword.control.repeat.dosbatch
1283+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:50: scope: keyword.command.dosbatch
1284+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:60: scope: keyword.command.dosbatch
1285+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:64: scope: keyword.command.dosbatch
1286+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:74: 1: punctuation.definition.string.begin.dosbatch
1287+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:75: 2: variable.other.readwrite.dosbatch
1288+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:76: 3: keyword.operator.assignment.dosbatch
1289+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:78: - meta_scope: string.quoted.double.dosbatch
1290+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:80: scope: punctuation.definition.string.end.dosbatch
1291+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:88: 1: variable.other.readwrite.dosbatch
1292+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:89: 2: keyword.operator.assignment.dosbatch
1293+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:91: - meta_content_scope: string.unquoted.dosbatch
1294+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:96: scope: punctuation.definition.string.begin.dosbatch
1295+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:98: - meta_scope: string.quoted.double.dosbatch
1296+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:101: scope: punctuation.definition.string.end.dosbatch
1297+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:108: scope: variable.other.readwrite.dosbatch
1298+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:112: - meta_content_scope: meta.expression.set.dosbatch
1299+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:120: 1: variable.other.readwrite.dosbatch
1300+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:121: 2: keyword.operator.assignment.dosbatch
1301+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:123: - meta_scope: meta.prompt.set.dosbatch
1302+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:132: scope: comment.line.ignored.dosbatch
1303+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:135: - meta_content_scope: string.unquoted.dosbatch
1304+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:145: scope: punctuation.section.group.begin.dosbatch
1305+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:148: scope: punctuation.definition.string.begin.dosbatch
1306+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:153: - meta_scope: meta.group.dosbatch
1307+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:155: scope: punctuation.section.group.end.dosbatch
1308+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:158: scope: punctuation.definition.string.begin.dosbatch
1309+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:164: scope: keyword.operator.assignment.augmented.dosbatch
1310+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:167: 1: constant.character.escape.dosbatch
1311+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:168: 2: keyword.operator.assignment.augmented.dosbatch
1312+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:170: scope: keyword.operator.arithmetic.dosbatch
1313+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:173: 1: constant.character.escape.dosbatch
1314+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:174: 2: keyword.operator.arithmetic.dosbatch
1315+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:176: scope: keyword.operator.assignment.dosbatch
1316+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:180: scope: keyword.operator.assignment.augmented.dosbatch
1317+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:182: scope: keyword.operator.arithmetic.dosbatch
1318+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:186: - meta_scope: string.quoted.double.dosbatch
1319+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:190: scope: punctuation.definition.string.end.dosbatch
1320+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:193: scope: punctuation.section.group.begin.dosbatch
1321+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:195: - meta_scope: meta.group.dosbatch
1322+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:202: - meta_scope: meta.group.dosbatch
1323+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:204: scope: punctuation.section.group.end.dosbatch
1324+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:207: scope: punctuation.definition.string.end.dosbatch
1325+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:214: - meta_scope: string.quoted.double.dosbatch meta.group.dosbatch
1326+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:216: scope: punctuation.section.group.begin.dosbatch
1327+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:219: scope: punctuation.section.group.end.dosbatch
1328+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:227: scope: keyword.operator.logical.dosbatch
1329+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:233: scope: variable.other.readwrite.dosbatch
1330+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:238: scope: variable.parameter.dosbatch
1331+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:240: 1: punctuation.definition.variable.dosbatch
1332+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:242: scope: variable.language.dosbatch
1333+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:244: 1: punctuation.definition.variable.begin.dosbatch
1334+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:245: 2: punctuation.definition.variable.end.dosbatch
1335+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:252: scope: punctuation.definition.variable.begin.dosbatch
1336+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:254: - meta_scope: variable.other.readwrite.dosbatch
1337+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:257: 1: punctuation.definition.variable.end.dosbatch
1338+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:261: scope: punctuation.separator.dosbatch
1339+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:263: - meta_content_scope: meta.variable.substring.dosbatch
1340+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:269: scope: punctuation.separator.dosbatch
1341+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:271: - meta_content_scope: meta.variable.substitution.dosbatch
1342+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:276: scope: punctuation.separator.dosbatch
1343+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:282: scope: string.unquoted.dosbatch
1344+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:287: scope: punctuation.definition.variable.begin.dosbatch
1345+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:289: - meta_scope: variable.other.readwrite.dosbatch
1346+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:292: 1: punctuation.definition.variable.end.dosbatch
1347+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:296: scope: punctuation.separator.dosbatch
1348+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:298: - meta_content_scope: meta.variable.substring.dosbatch
1349+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:304: scope: punctuation.separator.dosbatch
1350+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:306: - meta_content_scope: meta.variable.substitution.dosbatch
1351+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:312: scope: punctuation.separator.dosbatch
1352+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:318: scope: string.unquoted.dosbatch
1353+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:322: scope: string.unquoted.dosbatch
1354+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:326: scope: constant.numeric.dosbatch
1355+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:331: scope: punctuation.separator.dosbatch
1356+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:335: scope: constant.numeric.integer.hexadecimal.dosbatch
1357+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:337: 1: punctuation.definition.numeric.hexadecimal.dosbatch
1358+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:339: scope: constant.numeric.integer.octal.dosbatch
1359+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:341: 1: punctuation.definition.numeric.octal.dosbatch
1360+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:343: scope: constant.numeric.integer.decimal.dosbatch
1361+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:347: scope: constant.language.dosbatch
1362+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:351: scope: keyword.operator.at.dosbatch
1363+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:353: scope: keyword.operator.comparison.dosbatch
1364+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:355: scope: keyword.operator.logical.dosbatch
1365+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:357: scope: keyword.operator.conditional.dosbatch
1366+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:359: scope: keyword.operator.pipe.dosbatch
1367+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:361: scope: keyword.operator.redirection.dosbatch
1368+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:366: 1: punctuation.separator.dosbatch
1369+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:367: 2: entity.name.label.dosbatch
1370+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:372: 1: keyword.operator.conditional.dosbatch
1371+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:375: scope: comment.line.rem.dosbatch
1372+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:378: scope: punctuation.definition.comment.dosbatch
1373+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:380: - meta_scope: comment.line.colon.dosbatch
1374+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:386: scope: keyword.command.rem.dosbatch
1375+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:390: - meta_content_scope: comment.line.rem.dosbatch
1376+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:392: scope: comment.line.rem.dosbatch
1377+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:395: scope: invalid.illegal.unexpected-character.dosbatch
1378+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:399: scope: punctuation.definition.string.begin.dosbatch
1379+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:401: - meta_scope: string.quoted.double.dosbatch
1380+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:404: 1: punctuation.definition.string.end.dosbatch
1381+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:405: 2: invalid.illegal.newline.dosbatch
1382+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:412: scope: punctuation.section.group.begin.dosbatch
1383+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:414: - meta_scope: meta.group.dosbatch
1384+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:416: scope: punctuation.section.group.end.dosbatch
1385+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:419: scope: punctuation.separator.dosbatch
1386+assets/syntaxes/01_Packages/Batch File/Batch File.sublime-syntax:424: scope: constant.character.escape.dosbatch
1387+assets/syntaxes/01_Packages/Batch File/Comments.tmPreferences:7: <string>source.dosbatch</string>
1388+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:1::: SYNTAX TEST "Packages/Batch File/Batch File.sublime-syntax"
1389+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:4::: ^^^ keyword.command.rem.dosbatch
1390+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:5::: ^^^^^^^^^^^^^^^^ comment.line.rem.dosbatch
1391+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:6::: ^ invalid.illegal.unexpected-character.dosbatch
1392+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:7::: ^ invalid.illegal.unexpected-character.dosbatch
1393+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:8::: ^ invalid.illegal.unexpected-character.dosbatch
1394+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:12::: ^^^^^^^^^^^^^ - comment.line.rem.dosbatch
1395+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:19::: ^^ punctuation.definition.comment.dosbatch
1396+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:20::: ^^^^^^^^^^ comment.line.colon.dosbatch
1397+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:23::: ^^ punctuation.definition.comment.dosbatch
1398+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:26::: ^^ punctuation.definition.comment.dosbatch
1399+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:29::: ^^ punctuation.definition.comment.dosbatch
1400+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:32::: ^^ punctuation.definition.comment.dosbatch
1401+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:35::: ^^ punctuation.definition.comment.dosbatch
1402+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:46::: ^ keyword.operator.conditional.dosbatch
1403+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:47::: ^^ punctuation.definition.comment.dosbatch
1404+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:48::: ^^^^^^^^^^^^ comment.line.colon.dosbatch
1405+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:51:::^^ punctuation.definition.comment.dosbatch
1406+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:52:::^^^^^^^^^^^^^^^^^^^^^^ comment.line.colon.dosbatch
1407+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:55::: ^ punctuation.definition.string.begin.dosbatch
1408+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:56::: ^^^^^ string.quoted.double.dosbatch
1409+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:57::: ^ punctuation.definition.string.end.dosbatch
1410+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:60::: ^ invalid.illegal.newline.dosbatch
1411+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:63::: ^ keyword.operator.at.dosbatch
1412+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:66::: ^ - keyword.operator.at.dosbatch
1413+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:69::: ^^^^ keyword.control.statement.dosbatch
1414+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:70::: ^ punctuation.separator.dosbatch
1415+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:71::: ^^^ keyword.control.flow.return.dosbatch
1416+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:74::: ^^^^ keyword.control.statement.dosbatch
1417+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:75::: ^ punctuation.separator.dosbatch
1418+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:76::: ^^^ meta.function-call.dosbatch variable.function.dosbatch
1419+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:79::: ^^^^ keyword.control.statement.dosbatch
1420+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:80::: ^ punctuation.separator.dosbatch
1421+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:81::: ^^^ meta.function-call.dosbatch variable.function.dosbatch
1422+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:85::: ^^^^ keyword.command.dosbatch
1423+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:86::: ^ keyword.operator.redirection.dosbatch
1424+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:89::: ^^ keyword.operator.redirection.dosbatch
1425+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:93::: ^ keyword.operator.redirection.dosbatch
1426+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:94::: ^^ keyword.operator.redirection.dosbatch
1427+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:97::: ^^ keyword.operator.conditional.dosbatch
1428+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:98::: ^^ keyword.operator.conditional.dosbatch
1429+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:99::: ^ keyword.operator.conditional.dosbatch
1430+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:103::: ^^ keyword.control.conditional.dosbatch
1431+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:104::: ^^^ keyword.operator.comparison.dosbatch
1432+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:107::: ^^ keyword.control.conditional.dosbatch
1433+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:108::: ^^^ keyword.operator.logical.dosbatch
1434+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:109::: ^^^ keyword.operator.comparison.dosbatch
1435+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:113::: ^^ keyword.control.conditional.dosbatch
1436+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:114::: ^^^^^^^^^^^^ variable.language.dosbatch
1437+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:115::: ^ punctuation.definition.variable.begin.dosbatch
1438+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:116::: ^ variable.language.dosbatch punctuation.definition.variable.end.dosbatch
1439+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:119::: ^^ keyword.control.conditional.dosbatch
1440+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:120::: ^^ keyword.operator.comparison.dosbatch
1441+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:123::: ^^^ keyword.control.repeat.dosbatch
1442+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:124::: ^ constant.numeric.integer.decimal.dosbatch
1443+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:127::: ^ keyword.operator.pipe.dosbatch
1444+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:130:::^ punctuation.separator.dosbatch
1445+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:131::: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ entity.name.label.dosbatch
1446+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:134:::^ punctuation.separator.dosbatch
1447+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:135::: ^^^ entity.name.label.dosbatch
1448+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:138::: ^ punctuation.definition.variable.dosbatch
1449+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:139::: ^^ variable.parameter.dosbatch
1450+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:140::: ^ punctuation.definition.variable.dosbatch
1451+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:141::: ^^ variable.parameter.dosbatch
1452+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:142::: ^ punctuation.definition.variable.dosbatch
1453+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:143::: ^^^^^^^^^^^ variable.parameter.dosbatch
1454+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:144::: ^ punctuation.definition.variable.dosbatch
1455+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:145::: ^^^ variable.parameter.dosbatch
1456+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:148::: ^ punctuation.definition.variable.begin.dosbatch
1457+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:149::: ^^^^^^^^^^ variable.other.readwrite.dosbatch
1458+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:150::: ^ punctuation.definition.variable.end.dosbatch
1459+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:151::: ^ punctuation.definition.variable.begin.dosbatch
1460+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:152::: ^^^^^^^^^^ variable.other.readwrite.dosbatch
1461+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:153::: ^ punctuation.definition.variable.end.dosbatch
1462+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:156::: ^^^^^^^^^^^^^^^ variable.other.readwrite.dosbatch
1463+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:157::: ^ punctuation.definition.variable.begin.dosbatch
1464+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:158::: ^ punctuation.separator.dosbatch
1465+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:159::: ^^^^^^^^^ meta.variable.substitution.dosbatch
1466+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:160::: ^^^^ string.unquoted.dosbatch
1467+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:161::: ^ punctuation.separator.dosbatch
1468+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:162::: ^^^^ string.unquoted.dosbatch
1469+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:163::: ^ punctuation.definition.variable.end.dosbatch
1470+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:164::: ^^^^^^^^^^^^^^^ variable.other.readwrite.dosbatch
1471+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:165::: ^ punctuation.definition.variable.begin.dosbatch
1472+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:166::: ^ punctuation.separator.dosbatch
1473+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:167::: ^^^^^^^^^ meta.variable.substitution.dosbatch
1474+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:168::: ^^^^ string.unquoted.dosbatch
1475+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:169::: ^ punctuation.separator.dosbatch
1476+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:170::: ^^^^ string.unquoted.dosbatch
1477+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:171::: ^ punctuation.definition.variable.end.dosbatch
1478+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:175::: ^^^^^^^^^^^^^^ variable.other.readwrite.dosbatch
1479+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:176::: ^ punctuation.definition.variable.begin.dosbatch
1480+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:177::: ^^ punctuation.separator.dosbatch
1481+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:178::: ^^^^ meta.variable.substring.dosbatch
1482+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:179::: ^ constant.numeric.dosbatch
1483+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:180::: ^ punctuation.separator.dosbatch
1484+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:181::: ^^ constant.numeric.dosbatch
1485+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:182::: ^ punctuation.definition.variable.end.dosbatch
1486+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:183::: ^^^^^^^^^^^^^^ variable.other.readwrite.dosbatch
1487+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:184::: ^ punctuation.definition.variable.begin.dosbatch
1488+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:185::: ^^ punctuation.separator.dosbatch
1489+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:186::: ^^^^ meta.variable.substring.dosbatch
1490+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:187::: ^ constant.numeric.dosbatch
1491+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:188::: ^ punctuation.separator.dosbatch
1492+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:189::: ^^ constant.numeric.dosbatch
1493+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:190::: ^ punctuation.definition.variable.end.dosbatch
1494+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:193::: ^^^^^^^ variable.other.readwrite.dosbatch
1495+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:194::: ^ punctuation.definition.variable.begin.dosbatch
1496+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:195::: ^^ punctuation.separator.dosbatch
1497+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:196::: ^^ meta.variable.substring.dosbatch
1498+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:197::: ^^ constant.numeric.dosbatch
1499+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:198::: ^ punctuation.definition.variable.end.dosbatch
1500+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:199::: ^^^^^^^ variable.other.readwrite.dosbatch
1501+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:200::: ^ punctuation.definition.variable.begin.dosbatch
1502+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:201::: ^^ punctuation.separator.dosbatch
1503+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:202::: ^^ meta.variable.substring.dosbatch
1504+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:203::: ^^ constant.numeric.dosbatch
1505+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:204::: ^ punctuation.definition.variable.end.dosbatch
1506+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:207::: ^^^^^^^^^^^^^^^^^^^^^ variable.other.readwrite.dosbatch
1507+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:208::: ^ punctuation.definition.variable.begin.dosbatch
1508+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:209::: ^^^^^ meta.variable.substitution.dosbatch variable.other.readwrite.dosbatch
1509+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:210::: ^ meta.variable.substitution.dosbatch punctuation.definition.variable.begin.dosbatch
1510+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:211::: ^ meta.variable.substitution.dosbatch punctuation.definition.variable.end.dosbatch
1511+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:212::: ^ meta.variable.substitution.dosbatch punctuation.definition.variable.begin.dosbatch
1512+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:213::: ^^^^^^^^^^^ meta.variable.substitution.dosbatch variable.other.readwrite.dosbatch
1513+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:214::: ^^^^ meta.variable.substitution.dosbatch meta.variable.substring.dosbatch
1514+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:215::: ^ meta.variable.substitution.dosbatch punctuation.definition.variable.end.dosbatch
1515+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:216::: ^^ meta.variable.substitution.dosbatch constant.numeric.dosbatch
1516+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:217::: ^ punctuation.definition.variable.end.dosbatch
1517+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:220::: ^^^^^^^^^^^^^^^^^^^ variable.other.readwrite.dosbatch
1518+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:221::: ^ punctuation.definition.variable.begin.dosbatch
1519+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:222::: ^ meta.variable.substitution.dosbatch punctuation.definition.variable.begin.dosbatch
1520+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:223::: ^^^^^^^^^^^ meta.variable.substitution.dosbatch variable.other.readwrite.dosbatch
1521+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:224::: ^^^^ meta.variable.substitution.dosbatch meta.variable.substring.dosbatch
1522+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:225::: ^ meta.variable.substitution.dosbatch punctuation.definition.variable.end.dosbatch
1523+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:226::: ^^ meta.variable.substitution.dosbatch constant.numeric.dosbatch
1524+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:227::: ^ punctuation.definition.variable.end.dosbatch
1525+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:230::: ^^^^^^^^^^^^ - variable.other.readwrite.dosbatch
1526+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:231::: ^^^ - keyword.operator.logical.dosbatch
1527+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:234::: ^^^^^^^^^^^^ - variable.other.readwrite.dosbatch
1528+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:235::: ^^^ - keyword.operator.logical.dosbatch
1529+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:239::: ^^^ constant.numeric.integer.octal.dosbatch
1530+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:240::: ^ punctuation.definition.numeric.octal.dosbatch
1531+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:241::: ^^^^ constant.numeric.integer.hexadecimal.dosbatch
1532+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:242::: ^^ punctuation.definition.numeric.hexadecimal.dosbatch
1533+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:243::: ^^ constant.numeric.integer.decimal.dosbatch
1534+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:247::: ^^ constant.character.escape.dosbatch
1535+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:248::: ^^^ constant.character.escape.dosbatch
1536+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:249::: ^^ constant.character.escape.dosbatch
1537+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:253::: ^^^^^^^^^ meta.expression.set.dosbatch
1538+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:254::: ^^^ keyword.operator.assignment.augmented.dosbatch
1539+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:257::: ^^ keyword.operator.assignment.augmented.dosbatch
1540+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:260::: ^^ keyword.operator.assignment.augmented.dosbatch
1541+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:263::: ^^ keyword.operator.assignment.augmented.dosbatch
1542+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:266::: ^^ keyword.operator.assignment.augmented.dosbatch
1543+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:269::: ^^ keyword.operator.assignment.augmented.dosbatch
1544+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:272::: ^^^ keyword.operator.assignment.augmented.dosbatch
1545+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:275::: ^ keyword.operator.assignment.dosbatch
1546+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:276::: ^ keyword.operator.logical.dosbatch
1547+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:279::: ^^^^^ meta.group.dosbatch
1548+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:280::: ^ punctuation.section.group.begin.dosbatch
1549+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:281::: ^ punctuation.section.group.end.dosbatch
1550+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:282::: ^ keyword.operator.assignment.dosbatch
1551+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:283::: ^ keyword.operator.arithmetic.dosbatch
1552+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:284::: ^ keyword.operator.arithmetic.dosbatch
1553+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:287::: ^ keyword.operator.assignment.dosbatch
1554+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:288::: ^ punctuation.separator.dosbatch
1555+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:289::: ^ keyword.operator.assignment.dosbatch
1556+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:290::: ^ keyword.operator.arithmetic.dosbatch
1557+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:293::: ^ keyword.operator.assignment.dosbatch
1558+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:294::: ^^ keyword.operator.arithmetic.dosbatch
1559+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:297::: ^ keyword.operator.assignment.dosbatch
1560+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:298::: ^^ keyword.operator.arithmetic.dosbatch
1561+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:301::: ^ keyword.operator.assignment.dosbatch
1562+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:302::: ^^ keyword.operator.arithmetic.dosbatch
1563+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:305::: ^ keyword.operator.assignment.dosbatch
1564+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:306::: ^ keyword.operator.arithmetic.dosbatch
1565+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:309::: ^ keyword.operator.assignment.dosbatch
1566+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:310::: ^ keyword.operator.arithmetic.dosbatch
1567+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:313::: ^ keyword.operator.assignment.dosbatch
1568+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:314::: ^ keyword.operator.arithmetic.dosbatch
1569+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:317::: ^^ keyword.operator.assignment.augmented.dosbatch
1570+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:320::: ^ keyword.operator.assignment.dosbatch
1571+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:321::: ^ keyword.operator.arithmetic.dosbatch
1572+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:324::: ^ keyword.operator.assignment.dosbatch
1573+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:325::: ^ keyword.operator.arithmetic.dosbatch
1574+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:328::: ^ keyword.operator.assignment.dosbatch
1575+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:329::: ^ keyword.operator.arithmetic.dosbatch
1576+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:332::: ^ keyword.operator.assignment.dosbatch
1577+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:333::: ^ keyword.operator.arithmetic.dosbatch
1578+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:336::: ^ keyword.operator.assignment.dosbatch
1579+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:337::: ^ keyword.operator.arithmetic.dosbatch
1580+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:340::: ^^^ keyword.operator.assignment.augmented.dosbatch
1581+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:343::: ^^ keyword.operator.assignment.augmented.dosbatch
1582+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:346::: ^ keyword.operator.assignment.dosbatch
1583+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:347::: ^ keyword.operator.arithmetic.dosbatch
1584+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:348::: ^ punctuation.separator.dosbatch
1585+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:349::: ^ keyword.operator.assignment.dosbatch
1586+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:350::: ^ keyword.operator.arithmetic.dosbatch
1587+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:436::: ^^^^^^^^^^^ variable.other.readwrite.dosbatch
1588+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:444::: ^^^^^^^^^^^ string.quoted.double.dosbatch
1589+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:445::: ^^ constant.character.escape.dosbatch
1590+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:446::: ^ - constant.character.escape.dosbatch
1591+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:447::: ^^ constant.character.escape.dosbatch
1592+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:448::: ^ - constant.character.escape.dosbatch
1593+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:449::: ^^ constant.character.escape.dosbatch
1594+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:450::: ^ - constant.character.escape.dosbatch
1595+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:454::: ^^^^ - variable.other.readwrite.dosbatch
1596+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:455::: ^^^^^ variable.other.readwrite.dosbatch
1597+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:456::: ^ keyword.operator.assignment.dosbatch
1598+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:457::: ^ keyword.operator.redirection.dosbatch
1599+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:459::: ^ punctuation.definition.variable.begin.dosbatch
1600+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:460::: ^^^^^^^ variable.other.readwrite.dosbatch
1601+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:461::: ^ punctuation.definition.variable.end.dosbatch
1602+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:464::: ^^^^ - variable.other.readwrite.dosbatch
1603+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:465::: ^^^^^ variable.other.readwrite.dosbatch
1604+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:466::: ^ keyword.operator.assignment.dosbatch
1605+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:467::: ^^^^^^^^^^^^^ meta.prompt.set.dosbatch string.unquoted - variable.other.readwrite.dosbatch
1606+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:468::: ^ - meta.prompt.set.dosbatch
1607+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:470::: ^^^^ - variable.other.readwrite.dosbatch
1608+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:471::: ^^^^^ variable.other.readwrite.dosbatch
1609+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:472::: ^ keyword.operator.assignment.dosbatch
1610+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:473::: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.prompt.set.dosbatch string.unquoted - variable.other.readwrite.dosbatch - comment
1611+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:474::: ^ - meta.prompt.set.dosbatch
1612+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:476::: ^^^^ - variable.other.readwrite.dosbatch
1613+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:477::: ^^^^^ variable.other.readwrite.dosbatch
1614+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:478::: ^ keyword.operator.assignment.dosbatch
1615+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:479::: ^ - meta.prompt.set.dosbatch
1616+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:493::: ^^^^^^ variable.other.readwrite.dosbatch
1617+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:494::: ^^^^^^ variable.other.readwrite.dosbatch
1618+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:498::: ^^^^ variable.other.readwrite.dosbatch
1619+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:499::: ^ keyword.operator.assignment.dosbatch
1620+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:500::: ^ punctuation.definition.string.begin.dosbatch
1621+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:501::: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double.dosbatch
1622+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:502::: ^^^^^^^^^ variable.other.readwrite.dosbatch
1623+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:503::: ^^ constant.character.escape.dosbatch
1624+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:504::: ^ punctuation.definition.string.end.dosbatch
1625+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:505::: ^^^ string.unquoted.dosbatch
1626+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:508:::^^^^^^ keyword.command.dosbatch
1627+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:510::: ^^^^ - variable.other.readwrite.dosbatch
1628+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:511::: ^^^^^^^ variable.other.readwrite.dosbatch
1629+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:512::: ^ keyword.operator.assignment.dosbatch
1630+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:513::: ^ punctuation.definition.string.begin.dosbatch
1631+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:514::: ^^^^^^^^^^^^^^^^^^^^^^^^^ meta.prompt.set.dosbatch string.quoted
1632+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:515::: ^ punctuation.definition.string.end.dosbatch
1633+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:516::: ^ keyword.operator.conditional.dosbatch - meta.prompt.set.dosbatch - string
1634+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:517::: ^^^^ keyword.command.dosbatch
1635+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:518::: ^^^^^^^^^ variable.other.readwrite.dosbatch
1636+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:520:::^^^^^^ keyword.command.dosbatch
1637+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:542::: ^^^^ - variable.other.readwrite.dosbatch
1638+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:543::: ^^^^^ variable.other.readwrite.dosbatch
1639+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:544::: ^ keyword.operator.assignment.dosbatch - variable.other.readwrite.dosbatch
1640+assets/syntaxes/01_Packages/Batch File/syntax_test_batch_file.bat:545::: ^^^^^^^^^^^^^^^^ meta.prompt.set.dosbatch string.quoted - variable.other.readwrite.dosbatch - comment
1641+assets/syntaxes/01_Packages/CSS/CSS.sublime-syntax:1257: - match: '\bat\b'
1642+assets/syntaxes/01_Packages/C#/tests/syntax_test_Strings.cs:35:var verbatim_singleline = @"foo";
1643+assets/syntaxes/01_Packages/C#/tests/syntax_test_Strings.cs:37:var verbatim_singleline_interpolated_none = $@"foo bar";
1644+assets/syntaxes/01_Packages/C#/tests/syntax_test_Strings.cs:39:var verbatim_singleline_interpolated_yes = $@"foo {bar} foo";
1645+assets/syntaxes/01_Packages/C#/tests/syntax_test_Strings.cs:42:var verbatim_multiline = @"foo bar
1646+assets/syntaxes/01_Packages/C#/tests/syntax_test_Strings.cs:45:var verbatim_multiline_interpolated_none = $@"foo bar
1647+assets/syntaxes/01_Packages/C#/tests/syntax_test_Strings.cs:48:var verbatim_multiline_interpolated_yes = $@"foo {bar}
1648+assets/syntaxes/01_Packages/C#/tests/syntax_test_GeneralStructure.cs:344: case BLBodyBattleLibrary.ContextType.TapUp:
1649+assets/syntaxes/01_Packages/C#/tests/syntax_test_Generics.cs:57:string verbatim = @"This is a test "" of a verbatim string literal - C:\User";
1650+assets/syntaxes/01_Packages/C#/tests/syntax_test_c#.cs:35:string verbatim = @"This is a test "" of a verbatim string literal - C:\User";
1651+assets/syntaxes/01_Packages/PHP/PHP.sublime-completions:2082: { "trigger": "mssql_fetch_batch", "contents": "mssql_fetch_batch(${1:result})" },
1652+assets/syntaxes/01_Packages/PHP/PHP Source.sublime-syntax:407: # verbatim and the indexer should find the name in the original source
1653+assets/syntaxes/01_Packages/PHP/PHP Source.sublime-syntax:447: # verbatim and the indexer should find the name in the original source
1654+assets/syntaxes/01_Packages/PHP/PHP Source.sublime-syntax:2082: mssql_bind | mssql_close | mssql_connect | mssql_data_seek | mssql_execute | mssql_fetch_array | mssql_fetch_assoc | mssql_fetch_batch |
1655+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:29: - include: verbatim
1656+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:311: verbatim:
1657+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:312: - match: '((\\)begin)(\{)\s*((?:[vV]erbatim|alltt)\*?)\s*(\})'
1658+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:321: - meta_scope: meta.environment.verbatim.verbatim.latex
1659+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:322: - meta_content_scope: markup.raw.verbatim.latex
1660+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:541: - meta_scope: meta.environment.verbatim.verb.latex
1661+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:777: - meta_scope: meta.environment.verbatim.lstinline.latex
1662+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:784: - meta_content_scope: meta.environment.verbatim.lstinline.latex markup.raw.verb.latex
1663+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:786: scope: meta.environment.verbatim.lstinline.latex punctuation.definition.group.brace.end.latex
1664+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:792: - meta_content_scope: meta.environment.verbatim.lstinline.latex markup.raw.verb.latex
1665+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:794: scope: meta.environment.verbatim.lstinline.latex punctuation.definition.verb.latex
1666+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:806: - meta_scope: meta.environment.verbatim.lstlisting.latex
1667+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:938: - meta_scope: meta.environment.verbatim.minted.latex
1668+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1146: - meta_scope: meta.environment.verbatim.minted.latex
1669+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1149: scope: meta.environment.verbatim.minted.latex
1670+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1157: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.c.latex source.c.embedded
1671+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1163: scope: meta.environment.verbatim.minted.latex
1672+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1171: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.c++.latex source.c++.embedded
1673+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1177: scope: meta.environment.verbatim.minted.latex
1674+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1185: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.diff.latex source.diff.embedded
1675+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1191: scope: meta.environment.verbatim.minted.latex
1676+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1199: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.go.latex source.go.embedded
1677+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1205: scope: meta.environment.verbatim.minted.latex
1678+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1213: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.haskell.latex source.haskell.embedded
1679+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1219: scope: meta.environment.verbatim.minted.latex
1680+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1227: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.html.latex text.html.embedded
1681+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1233: scope: meta.environment.verbatim.minted.latex
1682+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1241: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.java.latex source.java.embedded
1683+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1247: scope: meta.environment.verbatim.minted.latex
1684+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1255: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.js.latex source.js.embedded
1685+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1261: scope: meta.environment.verbatim.minted.latex
1686+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1269: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.json.latex source.json.embedded
1687+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1275: scope: meta.environment.verbatim.minted.latex
1688+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1283: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.latex.latex text.tex.latex.embedded
1689+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1289: scope: meta.environment.verbatim.minted.latex
1690+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1297: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.lisp.latex source.lisp.embedded
1691+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1303: scope: meta.environment.verbatim.minted.latex
1692+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1311: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.lua.latex source.lua.embedded
1693+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1317: scope: meta.environment.verbatim.minted.latex
1694+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1325: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.objc.latex source.objc.embedded
1695+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1331: scope: meta.environment.verbatim.minted.latex
1696+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1339: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.objc++.latex source.objc++.embedded
1697+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1345: scope: meta.environment.verbatim.minted.latex
1698+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1353: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.perl.latex source.perl.embedded
1699+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1359: scope: meta.environment.verbatim.minted.latex
1700+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1367: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.php.latex source.php.embedded
1701+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1373: scope: meta.environment.verbatim.minted.latex
1702+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1381: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.python.latex source.python.embedded
1703+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1387: scope: meta.environment.verbatim.minted.latex
1704+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1395: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.r.latex source.r.embedded
1705+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1401: scope: meta.environment.verbatim.minted.latex
1706+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1409: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.ruby.latex source.ruby.embedded
1707+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1415: scope: meta.environment.verbatim.minted.latex
1708+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1423: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.shell.latex source.shell.embedded
1709+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1429: scope: meta.environment.verbatim.minted.latex
1710+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1437: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.sql.latex source.sql.embedded
1711+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1443: scope: meta.environment.verbatim.minted.latex
1712+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1451: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.xml.latex text.xml.embedded
1713+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1457: scope: meta.environment.verbatim.minted.latex
1714+assets/syntaxes/01_Packages/LaTeX/LaTeX.sublime-syntax:1465: embed_scope: meta.environment.verbatim.minted.latex meta.environment.embedded.yaml.latex source.yaml.embedded
1715+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:261:% VERBATIM
1716+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:267:% ^ meta.environment.verbatim.verb.latex
1717+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:271:% ^ meta.environment.verbatim.verb.latex
1718+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:274:% ^^^^^^^^^^^^^^ meta.environment.verbatim.verb.latex
1719+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:277:% <- - meta.environment.verbatim.verb.latex
1720+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:279:\begin{verbatim}
1721+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:282:The \emph{verbatim} environment sets everything in verbatim.
1722+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:283:% <- meta.environment.verbatim.verbatim.latex
1723+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:284:% ^ markup.raw.verbatim.latex
1724+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:290:\end{verbatim}
1725+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:397:% <- meta.environment.verbatim.lstlisting.latex
1726+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:407:% <- meta.environment.verbatim.lstlisting.latex
1727+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:415:% <- meta.environment.verbatim.lstlisting.latex
1728+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:423:% ^^^^^^^^^^^^^^^^^^^^^ meta.environment.verbatim.lstinline.latex
1729+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:428:% ^ - meta.environment.verbatim.lstinline.latex
1730+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:431:% ^^^^^^^^^^^^^^^^^^^^^ meta.environment.verbatim.lstinline.latex
1731+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:433:% ^ - meta.environment.verbatim.lstinline.latex
1732+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:443:% <- meta.environment.verbatim.minted.latex
1733+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:451:% ^ meta.environment.verbatim.minted.latex
1734+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:459:% ^ meta.environment.verbatim.minted.latex
1735+assets/syntaxes/01_Packages/LaTeX/syntax_test_latex.tex:464:% ^ meta.environment.verbatim.minted.latex
1736+assets/syntaxes/01_Packages/Java/Ant.sublime-build:10: "cmd": ["ant.bat"]
1737+assets/syntaxes/01_Packages/Matlab/Matlab.sublime-syntax:325: - match: \b(zerom|zero22pi|zdatam-ui|zdatam|wrapToPi|wrapTo360|wrapTo2Pi|wrapTo180|worldmap|worldfilewrite|worldfileread|westof|vmap0ui|vmap0rhead|vmap0read|vmap0data|vinvtran|viewshed|vfwdtran|vec2mtx|utmzoneui|utmzone|utmgeoid|usgsdems|usgsdem|usgs24kdem|usamap|updategeostruct|unwrapMultipart|unitstr|unitsratio|undotrim|undoclip|uimaptbx|trimdata|trimcart|trackui|trackg|track2|track1|track|toRadians|toDegrees|tissot|timezone|timedim|time2str|tightmap|tigerp|tigermif|tgrline|textm|tbase|tagm-ui|tagm|symbolm|surfm|surflsrm|surflm|surfdist|surfacem|str2angle|stem3m|stdm|stdist|spzerom|spcread|smoothlong|sm2rad|sm2nm|sm2km|sm2deg|sizem|showm-ui|showm|showaxes|shapewrite|shaperead|shapeinfo|shaderel|setpostn|setm|setltln|seedm|sectorg|sec2hr|sec2hms|sec2hm|sdtsinfo|sdtsdemread|scxsc|scirclui|scircleg|scircle2|scircle1|scatterm|scaleruler|satbath|rsphere|roundn|rotatetext|rotatem|rootlayr|rhxrh|restack|resizem|removeExtraNanSeparators|refvec2mat|refmat2vec|reducem|reckon|readmtx|readfk5|readfields|rcurve|rad2sm|rad2nm|rad2km|rad2dms|rad2dm|rad2deg|quiverm|quiver3m|qrydata|putpole|projlist|projinv|projfwd|project|previewmap|polyxpoly|polysplit|polymerge|polyjoin|polycut|polybool|poly2fv|poly2cw|poly2ccw|polcmap|plotm|plot3m|plabel|pixcenters|pix2map|pix2latlon|pcolorm|patchm|patchesm|parallelui|paperscale|panzoom|originui|org2pol|onem|npi2pi|northarrow|nm2sm|nm2rad|nm2km|nm2deg|newpole|neworig|navfix|nanm|nanclip|namem|n2ecc|mobjects|mlayers|mlabelzero22pi|mlabel|minvtran|minaxis|mfwdtran|meshm|meshlsrm|meshgrat|meridianfwd|meridianarc|meanm|mdistort|mat2hms|mat2dms|mapview|maptrims|maptrimp|maptriml|maptrim|maptool|mapshow|maps|mapprofile|mapoutline|maplist|mapbbox|map2pix|makesymbolspec|makerefmat|makemapped|makedbfspec|makeattribspec|majaxis|lv2ecef|ltln2val|los2|linem|linecirc|limitm|lightmui|lightm|legs|lcolorbar|latlon2pix|kmlwrite|km2sm|km2rad|km2nm|km2deg|ispolycw|ismapped|ismap|isShapeMultipart|intrplon|intrplat|interpm|inputm|ind2rgb8|imbedm|hr2sec|hr2hms|hr2hm|hms2sec|hms2mat|hms2hr|hms2hm|histr|hista|hidem-ui|hidem|handlem-ui|handlem|gtopo30s|gtopo30|gtextm|gshhs|grn2eqa|gridm|grid2image|grepfields|gradientm|globedems|globedem|getworldfilename|getseeds|getm|geotiffread|geotiffinfo|geotiff2mstruct|geoshow|geoloc2grid|geodetic2geocentricLat|geodetic2ecef|geocentric2geodeticLat|gcxsc|gcxgc|gcwaypts|gcpmap|gcm|gc2sc|fromRadians|fromDegrees|framem|flatearthpoly|flat2ecc|fipsname|findm|filterm|fillm|fill3m|extractm|extractfield|etopo5|etopo|eqa2grn|epsm|encodem|ellipse1|elevation|egm96geoid|ecef2lv|ecef2geodetic|ecc2n|ecc2flat|eastof|dteds|dted|driftvel|driftcorr|dreckon|dms2rad|dms2mat|dms2dm|dms2degrees|dms2deg|dm2degrees|distortcalc|distdim|distance|dist2str|displaym|departure|demdataui|demcmap|degrees2dms|degrees2dm|deg2sm|deg2rad|deg2nm|deg2km|deg2dms|deg2dm|defaultm|dcwrhead|dcwread|dcwgaz|dcwdata|daspectm|crossfix|convertlat|contourm|contourfm|contourcmap|contour3m|cometm|comet3m|combntns|colorui|colorm|cmapui|clrmenu|closePolygonParts|clmo-ui|clmo|clma|clipdata|clegendm|clabelm|circcirc|changem|cart2grn|camupm|camtargm|camposm|bufferm|azimuth|axesscale|axesmui|axesm|axes2ecc|avhrrlambert|avhrrgoode|areaquad|areamat|areaint|arcgridread|antipode|angledim|angl2str|almanac)\b
1738+assets/syntaxes/01_Packages/RestructuredText/reStructuredText.sublime-syntax:41: comment: verbatim blocks
1739+assets/syntaxes/01_Packages/RestructuredText/syntax_test_restructuredtext.rst:95:Verbatim tests
1740+assets/syntaxes/01_Packages/RestructuredText/syntax_test_restructuredtext.rst:100: Verbatim
1741+assets/syntaxes/01_Packages/RestructuredText/syntax_test_restructuredtext.rst:105: Verbatim
1742+assets/syntaxes/01_Packages/RestructuredText/syntax_test_restructuredtext.rst:112: Verbatim
1743+assets/syntaxes/01_Packages/RestructuredText/syntax_test_restructuredtext.rst:114: Also Verbatim
1744+assets/syntaxes/01_Packages/RestructuredText/syntax_test_restructuredtext.rst:119: Verbatim
1745+assets/syntaxes/01_Packages/RestructuredText/syntax_test_restructuredtext.rst:121: Also Verbatim
1746+assets/syntaxes/01_Packages/RestructuredText/syntax_test_restructuredtext.rst:127: Verbatim
1747+assets/syntaxes/01_Packages/RestructuredText/syntax_test_restructuredtext.rst:129:Not verbatim
1748+assets/syntaxes/01_Packages/Go/Indents/GoIndent.tmPreferences:4:batch-reindent real-world code without wrecking it. As such, these rules are
1749+assets/syntaxes/01_Packages/Go/Indents/GoIndent.tmPreferences:5:optimized for convenience while typing, not for batch reindentation.
1750+assets/syntaxes/01_Packages/YAML/YAML.sublime-syntax:64: c_ns_tag_property: |- # c-verbatim-tag | c-ns-shorthand-tag | c-non-specific-tag
1751+assets/manual/bat.1.in:113:\fB-P\fR. To disable the pager permanently, set BAT_PAGER to an empty string. To control
1752+assets/manual/bat.1.in:118:Determine which pager is used. This option will override the PAGER and BAT_PAGER
1753+assets/manual/bat.1.in:134:export the BAT_THEME environment variable (e.g.: export BAT_THEME="...").
1754+assets/manual/bat.1.in:146:export the BAT_STYLE environment variable (e.g.: export BAT_STYLE=".."). Possible
1755+assets/manual/bat.1.in:194:Alternatively, you can use the BAT_CONFIG_PATH environment variable to point {{PROJECT_EXECUTABLE}} to a non-default
1756+assets/manual/bat.1.in:235:\fBhttps://github.com/sharkdp/bat\fR
1757+assets/completions/bat.bash.in:5:_bat() {
1758+assets/completions/bat.bash.in:88:} && complete -F _bat {{PROJECT_EXECUTABLE}}
1759+assets/completions/_bat.ps1.in:64: [CompletionResult]::new('--config-dir', 'config-dir', [CompletionResultType]::ParameterName, 'Show bat''s configuration directory.')
1760+assets/completions/_bat.ps1.in:65: [CompletionResult]::new('--cache-dir', 'cache-dir', [CompletionResultType]::ParameterName, 'Show bat''s cache directory.')
1761+assets/completions/bat.zsh.in:49: '(: --config-dir)'--config-dir'[Show bat'"'"'s configuration directory]'
1762+assets/completions/bat.zsh.in:52: '(: --cache-dir)'--cache-dir'[Show bat'"'"'s cache directory]'
1763+assets/create.sh:43:bat cache --clear
1764+assets/create.sh:56:bat cache --build --blank --source="$ASSET_DIR" --target="$ASSET_DIR"
1765+assets/metadata.yaml:2:bat_version: 0.18.3
1766+tests/integration_tests.rs:34:fn bat_raw_command_with_config() -> Command {
1767+tests/integration_tests.rs:35: let mut cmd = Command::cargo_bin("bat").unwrap();
1768+tests/integration_tests.rs:37: cmd.env_remove("BAT_CACHE_PATH");
1769+tests/integration_tests.rs:38: cmd.env_remove("BAT_CONFIG_DIR");
1770+tests/integration_tests.rs:39: cmd.env_remove("BAT_CONFIG_PATH");
1771+tests/integration_tests.rs:40: cmd.env_remove("BAT_OPTS");
1772+tests/integration_tests.rs:41: cmd.env_remove("BAT_PAGER");
1773+tests/integration_tests.rs:42: cmd.env_remove("BAT_STYLE");
1774+tests/integration_tests.rs:43: cmd.env_remove("BAT_TABS");
1775+tests/integration_tests.rs:44: cmd.env_remove("BAT_THEME");
1776+tests/integration_tests.rs:51:fn bat_raw_command() -> Command {
1777+tests/integration_tests.rs:52: let mut cmd = bat_raw_command_with_config();
1778+tests/integration_tests.rs:57:fn bat_with_config() -> assert_cmd::Command {
1779+tests/integration_tests.rs:58: assert_cmd::Command::from_std(bat_raw_command_with_config())
1780+tests/integration_tests.rs:61:fn bat() -> assert_cmd::Command {
1781+tests/integration_tests.rs:62: assert_cmd::Command::from_std(bat_raw_command())
1782+tests/integration_tests.rs:67: bat()
1783+tests/integration_tests.rs:77: bat()
1784+tests/integration_tests.rs:86: bat()
1785+tests/integration_tests.rs:96: bat()
1786+tests/integration_tests.rs:108: bat()
1787+tests/integration_tests.rs:118: bat()
1788+tests/integration_tests.rs:128: bat()
1789+tests/integration_tests.rs:138: bat()
1790+tests/integration_tests.rs:149: bat()
1791+tests/integration_tests.rs:160: bat()
1792+tests/integration_tests.rs:170: bat()
1793+tests/integration_tests.rs:181: bat()
1794+tests/integration_tests.rs:192: bat()
1795+tests/integration_tests.rs:202: bat()
1796+tests/integration_tests.rs:212: bat()
1797+tests/integration_tests.rs:222: bat()
1798+tests/integration_tests.rs:245: let res = bat_raw_command()
1799+tests/integration_tests.rs:261: let res = bat_raw_command()
1800+tests/integration_tests.rs:277: let res = bat_raw_command()
1801+tests/integration_tests.rs:293: let res = bat_raw_command()
1802+tests/integration_tests.rs:307: // To simulate bat getting started from the shell, a process is created with stdin and stdout
1803+tests/integration_tests.rs:308: // as the slave end of a pseudo terminal. Although both point to the same "file", bat should
1804+tests/integration_tests.rs:316: let mut child = bat_raw_command()
1805+tests/integration_tests.rs:349: bat()
1806+tests/integration_tests.rs:372: bat()
1807+tests/integration_tests.rs:395: bat()
1808+tests/integration_tests.rs:418: bat()
1809+tests/integration_tests.rs:441: bat()
1810+tests/integration_tests.rs:464: bat()
1811+tests/integration_tests.rs:487: bat()
1812+tests/integration_tests.rs:510: bat().arg("non-existing-file").assert().failure();
1813+tests/integration_tests.rs:515: bat().arg("sub_directory").assert().failure();
1814+tests/integration_tests.rs:520: bat()
1815+tests/integration_tests.rs:530: bat()
1816+tests/integration_tests.rs:541: bat()
1817+tests/integration_tests.rs:543: .env("BAT_PAGER", "echo pager-output")
1818+tests/integration_tests.rs:553: bat()
1819+tests/integration_tests.rs:555: .env("BAT_PAGER", "")
1820+tests/integration_tests.rs:564:fn env_var_pager_value_bat() {
1821+tests/integration_tests.rs:565: bat()
1822+tests/integration_tests.rs:566: .env("PAGER", "bat")
1823+tests/integration_tests.rs:575:fn env_var_bat_pager_value_bat() {
1824+tests/integration_tests.rs:576: bat()
1825+tests/integration_tests.rs:577: .env("BAT_PAGER", "bat")
1826+tests/integration_tests.rs:582: .stderr(predicate::str::contains("bat as a pager is disallowed"));
1827+tests/integration_tests.rs:586:fn pager_value_bat() {
1828+tests/integration_tests.rs:587: bat()
1829+tests/integration_tests.rs:588: .arg("--pager=bat")
1830+tests/integration_tests.rs:593: .stderr(predicate::str::contains("bat as a pager is disallowed"));
1831+tests/integration_tests.rs:603: bat()
1832+tests/integration_tests.rs:613:/// If the bat-specific BAT_PAGER is used, obey the wish of the user
1833+tests/integration_tests.rs:617:fn pager_most_from_bat_pager_env_var() {
1834+tests/integration_tests.rs:619: bat()
1835+tests/integration_tests.rs:620: .env("BAT_PAGER", mocked_pagers::from("most"))
1836+tests/integration_tests.rs:629:/// Same reasoning with --pager as with BAT_PAGER
1837+tests/integration_tests.rs:634: bat()
1838+tests/integration_tests.rs:649: bat()
1839+tests/integration_tests.rs:664: bat()
1840+tests/integration_tests.rs:676: bat()
1841+tests/integration_tests.rs:687: bat()
1842+tests/integration_tests.rs:699: bat()
1843+tests/integration_tests.rs:700: .env("BAT_PAGER", "mismatched-quotes 'a")
1844+tests/integration_tests.rs:710: bat()
1845+tests/integration_tests.rs:714: .stdout(predicate::str::contains("BAT_PAGER="))
1846+tests/integration_tests.rs:720: bat_with_config()
1847+tests/integration_tests.rs:721: .env("BAT_CONFIG_PATH", "bat.conf")
1848+tests/integration_tests.rs:725: .stdout("bat.conf\n");
1849+tests/integration_tests.rs:727: bat_with_config()
1850+tests/integration_tests.rs:728: .env("BAT_CONFIG_PATH", "not-existing.conf")
1851+tests/integration_tests.rs:740: // Create the file with bat
1852+tests/integration_tests.rs:741: bat_with_config()
1853+tests/integration_tests.rs:742: .env("BAT_CONFIG_PATH", tmp_config_path.to_str().unwrap())
1854+tests/integration_tests.rs:756:fn config_location_from_bat_config_dir_variable() {
1855+tests/integration_tests.rs:757: bat_with_config()
1856+tests/integration_tests.rs:758: .env("BAT_CONFIG_DIR", "conf/")
1857+tests/integration_tests.rs:767: bat_with_config()
1858+tests/integration_tests.rs:768: .env("BAT_CONFIG_PATH", "bat.conf")
1859+tests/integration_tests.rs:778: bat()
1860+tests/integration_tests.rs:789: bat_with_config()
1861+tests/integration_tests.rs:799: bat_with_config()
1862+tests/integration_tests.rs:810: bat_with_config()
1863+tests/integration_tests.rs:820: bat_with_config().arg("cach").assert().failure();
1864+tests/integration_tests.rs:827: bat()
1865+tests/integration_tests.rs:836: bat_with_config()
1866+tests/integration_tests.rs:878: bat()
1867+tests/integration_tests.rs:898: bat()
1868+tests/integration_tests.rs:910: bat()
1869+tests/integration_tests.rs:922: bat()
1870+tests/integration_tests.rs:936: bat()
1871+tests/integration_tests.rs:950: bat()
1872+tests/integration_tests.rs:966: bat_with_config()
1873+tests/integration_tests.rs:979: bat()
1874+tests/integration_tests.rs:995: bat()
1875+tests/integration_tests.rs:1008: bat()
1876+tests/integration_tests.rs:1020: bat()
1877+tests/integration_tests.rs:1040: bat()
1878+tests/integration_tests.rs:1057: .stderr("\x1b[33m[bat warning]\x1b[0m: Style 'rule' is a subset of style 'grid', 'rule' will not be visible.\n");
1879+tests/integration_tests.rs:1077: bat()
1880+tests/integration_tests.rs:1093: bat()
1881+tests/integration_tests.rs:1105: let cmd_for_file = bat()
1882+tests/integration_tests.rs:1114: let cmd_for_stdin = bat()
1883+tests/integration_tests.rs:1134: bat()
1884+tests/integration_tests.rs:1147: bat()
1885+tests/integration_tests.rs:1157: bat()
1886+tests/integration_tests.rs:1169: bat()
1887+tests/integration_tests.rs:1181: bat()
1888+tests/integration_tests.rs:1193: bat()
1889+tests/integration_tests.rs:1204:// Regression test for https://github.com/sharkdp/bat/issues/299
1890+tests/integration_tests.rs:1207: bat()
1891+tests/integration_tests.rs:1231: bat()
1892+tests/integration_tests.rs:1240: bat()
1893+tests/integration_tests.rs:1250: bat()
1894+tests/examples/regression_tests/issue_985.js:3:# bat --map-syntax '*.js:Markdown' --file-name 'issue_985.js' < issue_985.js
1895+tests/examples/regression_tests/issue_985.js:4:# bat --map-syntax '*.js:Markdown' --file-name 'issue_985.js' issue_985.js
1896+tests/utils/mocked_pagers.rs:16:/// On Windows: 'most' -> 'most.bat'
1897+tests/utils/mocked_pagers.rs:19: format!("{}.bat", base)
1898+tests/benchmarks/benchmark-results/syntax-highlighting-speed-miniz.c.md:3:| `bat … miniz.c` | 96.2 ± 1.9 | 92.6 | 99.6 | 1.00 |
1899+tests/benchmarks/benchmark-results/syntax-highlighting-speed-jquery.js.md:3:| `bat … jquery.js` | 692.4 ± 5.6 | 684.2 | 701.8 | 1.00 |
1900+tests/benchmarks/benchmark-results/syntax-highlighting-speed-test_multiarray.py.json:4: "command": "bat … test_multiarray.py",
1901+tests/benchmarks/benchmark-results/syntax-highlighting-speed-jquery.js.json:4: "command": "bat … jquery.js",
1902+tests/benchmarks/benchmark-results/plain-text-speed.json:4: "command": "bat … --language=txt test_multiarray.py",
1903+tests/benchmarks/benchmark-results/syntax-highlighting-speed-test_multiarray.ansi-sequences.txt.md:3:| `bat … test_multiarray.ansi-sequences.txt` | 125.3 ± 5.6 | 119.3 | 140.4 | 1.00 |
1904+tests/benchmarks/benchmark-results/syntax-highlighting-speed-test_multiarray.py.md:3:| `bat … test_multiarray.py` | 924.7 ± 4.4 | 917.1 | 932.3 | 1.00 |
1905+tests/benchmarks/benchmark-results/report.md:1:## `bat` benchmark results
1906+tests/benchmarks/benchmark-results/report.md:7:| `bat` | 6.9 ± 0.6 | 5.6 | 9.2 | 1.00 |
1907+tests/benchmarks/benchmark-results/report.md:13:| `bat … --language=txt test_multiarray.py` | 10.4 ± 0.6 | 9.0 | 12.1 | 1.00 |
1908+tests/benchmarks/benchmark-results/report.md:19:| `bat … jquery.js` | 692.4 ± 5.6 | 684.2 | 701.8 | 1.00 |
1909+tests/benchmarks/benchmark-results/report.md:25:| `bat … miniz.c` | 96.2 ± 1.9 | 92.6 | 99.6 | 1.00 |
1910+tests/benchmarks/benchmark-results/report.md:31:| `bat … test_multiarray.ansi-sequences.txt` | 125.3 ± 5.6 | 119.3 | 140.4 | 1.00 |
1911+tests/benchmarks/benchmark-results/report.md:37:| `bat … test_multiarray.py` | 924.7 ± 4.4 | 917.1 | 932.3 | 1.00 |
1912+tests/benchmarks/benchmark-results/startup-time.md:3:| `bat` | 6.9 ± 0.6 | 5.6 | 9.2 | 1.00 |
1913+tests/benchmarks/benchmark-results/syntax-highlighting-speed-miniz.c.json:4: "command": "bat … miniz.c",
1914+tests/benchmarks/benchmark-results/plain-text-speed.md:3:| `bat … --language=txt test_multiarray.py` | 10.4 ± 0.6 | 9.0 | 12.1 | 1.00 |
1915+tests/benchmarks/benchmark-results/syntax-highlighting-speed-jquery-3.3.1.js.json:4: "command": "/home/shark/.cargo-target/release/bat --style=full --color=always --paging=never test-src/jquery-3.3.1.js",
1916+tests/benchmarks/benchmark-results/syntax-highlighting-speed-test_multiarray.highlighted.txt.json:4: "command": "bat … test_multiarray.highlighted.txt",
1917+tests/benchmarks/benchmark-results/syntax-highlighting-speed-test_multiarray.ansi-sequences.txt.json:4: "command": "bat … test_multiarray.ansi-sequences.txt",
1918+tests/benchmarks/benchmark-results/syntax-highlighting-speed-jquery-3.3.1.min.js.json:4: "command": "/home/shark/.cargo-target/release/bat --style=full --color=always --paging=never test-src/jquery-3.3.1.min.js",
1919+tests/benchmarks/benchmark-results/ansi-sequence-forwarding.json:4: "command": "bat … test_multiarray.highlighted.txt",
1920+tests/benchmarks/benchmark-results/startup-time.json:4: "command": "bat",
1921+tests/benchmarks/run-benchmarks.sh:33:unset BAT_CACHE_PATH
1922+tests/benchmarks/run-benchmarks.sh:34:unset BAT_CONFIG_DIR
1923+tests/benchmarks/run-benchmarks.sh:35:unset BAT_CONFIG_PATH
1924+tests/benchmarks/run-benchmarks.sh:36:unset BAT_OPTS
1925+tests/benchmarks/run-benchmarks.sh:37:unset BAT_PAGER
1926+tests/benchmarks/run-benchmarks.sh:38:unset BAT_STYLE
1927+tests/benchmarks/run-benchmarks.sh:39:unset BAT_TABS
1928+tests/benchmarks/run-benchmarks.sh:40:unset BAT_THEME
1929+tests/benchmarks/run-benchmarks.sh:50:TARGET_RELEASE="${TARGET_DIR}/release/bat"
1930+tests/benchmarks/run-benchmarks.sh:55:BAT=''
1931+tests/benchmarks/run-benchmarks.sh:58: --system) BAT="bat" ;;
1932+tests/benchmarks/run-benchmarks.sh:59: --release) BAT="$TARGET_RELEASE" ;;
1933+tests/benchmarks/run-benchmarks.sh:60: --bat=*) BAT="${arg:6}" ;;
1934+tests/benchmarks/run-benchmarks.sh:64:if [[ -z "$BAT" ]]; then
1935+tests/benchmarks/run-benchmarks.sh:65: echo "A build of 'bat' must be specified for benchmarking."
1936+tests/benchmarks/run-benchmarks.sh:66: echo "You can use '--system', '--release' or '--bat=path/to/bat'."
1937+tests/benchmarks/run-benchmarks.sh:70:if ! command -v "$BAT" &>/dev/null; then
1938+tests/benchmarks/run-benchmarks.sh:71: echo "Could not find the build of bat to benchmark ($BAT)."
1939+tests/benchmarks/run-benchmarks.sh:72: case "$BAT" in
1940+tests/benchmarks/run-benchmarks.sh:73: "bat") echo "Make you sure to symlink 'batcat' as 'bat'." ;;
1941+tests/benchmarks/run-benchmarks.sh:83:echo "## \`bat\` benchmark results" >> "$REPORT"
1942+tests/benchmarks/run-benchmarks.sh:88: "$(printf "%q" "$BAT") --no-config" \
1943+tests/benchmarks/run-benchmarks.sh:89: --command-name "bat" \
1944+tests/benchmarks/run-benchmarks.sh:98: "$(printf "%q" "$BAT") --no-config --language=txt --style=plain test-src/test_multiarray.py" \
1945+tests/benchmarks/run-benchmarks.sh:99: --command-name 'bat … --language=txt test_multiarray.py' \
1946+tests/benchmarks/run-benchmarks.sh:111: "$(printf "%q" "$BAT") --no-config --style=full --color=always '$SRC'" \
1947+tests/benchmarks/run-benchmarks.sh:112: --command-name "bat … ${filename}" \
1948+tests/snapshots/generate_snapshots.py:35:def build_bat():
1949+tests/snapshots/generate_snapshots.py:36: print("building bat")
1950+tests/snapshots/generate_snapshots.py:55:build_bat()
1951+tests/syntax-tests/create_highlighted_versions.py:11:BAT_OPTIONS = [
1952+tests/syntax-tests/create_highlighted_versions.py:23: "bat_options",
1953+tests/syntax-tests/create_highlighted_versions.py:28: options = BAT_OPTIONS.copy()
1954+tests/syntax-tests/create_highlighted_versions.py:31: options_file = path.join(source_dirpath, "bat_options")
1955+tests/syntax-tests/create_highlighted_versions.py:44: env.pop("BAT_CACHE_PATH", None)
1956+tests/syntax-tests/create_highlighted_versions.py:45: env.pop("BAT_CONFIG_DIR", None)
1957+tests/syntax-tests/create_highlighted_versions.py:46: env.pop("BAT_CONFIG_PATH", None)
1958+tests/syntax-tests/create_highlighted_versions.py:47: env.pop("BAT_OPTS", None)
1959+tests/syntax-tests/create_highlighted_versions.py:48: env.pop("BAT_PAGER", None)
1960+tests/syntax-tests/create_highlighted_versions.py:49: env.pop("BAT_STYLE", None)
1961+tests/syntax-tests/create_highlighted_versions.py:50: env.pop("BAT_TABS", None)
1962+tests/syntax-tests/create_highlighted_versions.py:51: env.pop("BAT_THEME", None)
1963+tests/syntax-tests/create_highlighted_versions.py:62: bat_output = subprocess.check_output(
1964+tests/syntax-tests/create_highlighted_versions.py:63: ["bat"] + get_options(source) + [source],
1965+tests/syntax-tests/create_highlighted_versions.py:74: output_file.write(bat_output)
1966+tests/syntax-tests/create_highlighted_versions.py:98: "=== bat stdout:\n{}".format(err.stdout.decode("utf-8")),
1967+tests/syntax-tests/create_highlighted_versions.py:102: "=== bat stderr:\n{}".format(err.stderr.decode("utf-8")),
1968+tests/syntax-tests/create_highlighted_versions.py:108: "Error: Could not execute 'bat'. Please make sure that the executable "
1969+tests/syntax-tests/BatTestCustomAssets.sublime-syntax:4:name: BatTestCustomAssets
1970+tests/syntax-tests/BatTestCustomAssets.sublime-syntax:6: - battestcustomassets
1971+tests/syntax-tests/BatTestCustomAssets.sublime-syntax:7:scope: source.battestcustomassets
1972+tests/syntax-tests/BatTestCustomAssets.sublime-syntax:9:# This syntax is used to test if custom assets work with bat.
1973+tests/syntax-tests/BatTestCustomAssets.sublime-syntax:20: 1: keyword.other.battestcustomassets-key
1974+tests/syntax-tests/BatTestCustomAssets.sublime-syntax:21: 2: string.other.battestcustomassets-value
1975+tests/syntax-tests/highlighted/C/test.c:21: /* This C program was written to help bat
1976+tests/syntax-tests/highlighted/QML/BatSyntaxTest.qml:19: service: "org.bat.service"
1977+tests/syntax-tests/highlighted/QML/BatSyntaxTest.qml:41: text: qsTr("Install Bat.")
1978+tests/syntax-tests/highlighted/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:16: ## `bat` as a library
1979+tests/syntax-tests/highlighted/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:17:diff --git a/src/bin/bat/app.rs b/src/bin/bat/app.rs
1980+tests/syntax-tests/highlighted/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:19:--- a/src/bin/bat/app.rs
1981+tests/syntax-tests/highlighted/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:20:+++ b/src/bin/bat/app.rs
1982+tests/syntax-tests/highlighted/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:23: use bat::{
1983+tests/syntax-tests/highlighted/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:61:diff --git a/src/bin/bat/clap_app.rs b/src/bin/bat/clap_app.rs
1984+tests/syntax-tests/highlighted/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:63:--- a/src/bin/bat/clap_app.rs
1985+tests/syntax-tests/highlighted/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:64:+++ b/src/bin/bat/clap_app.rs
1986+tests/syntax-tests/highlighted/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:66: data to bat from STDIN when bat does not otherwise know \
1987+tests/syntax-tests/highlighted/Git Attributes/example.gitattributes:10:*.bat text eol=crlf
1988+tests/syntax-tests/highlighted/SSH Config/ssh_config:8: BatchMode no
1989+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:1:BAT(1) General Commands Manual BAT(1)
1990+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:4: bat - a cat(1) clone with syntax highlighting and Git integration.
1991+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:7: bat [OPTIONS] [FILE]...
1992+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:9: bat cache [CACHE-OPTIONS] [--build|--clear]
1993+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:12: bat prints the syntax-highlighted content of a collection of FILEs to
1994+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:16: bat supports a large number of programming and markup languages. It
1995+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:18: git index. bat automatically pipes its output through a pager (by de‐
1996+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:21: Whenever the output of bat goes to a non-interactive terminal, i.e.
1997+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:22: when the output is piped into another process or into a file, bat will
1998+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:112: if the output of bat is piped to another program, but you want
1999+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:119: set BAT_PAGER to an empty string. To control which pager is
2000+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:126: PAGER and BAT_PAGER environment variables. The default pager is
2001+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:143: BAT_THEME environment variable (e.g.: export BAT_THEME="...").
2002+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:156: to the configuration file or export the BAT_STYLE environment
2003+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:157: variable (e.g.: export BAT_STYLE=".."). Possible values: *auto*,
2004+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:202: bat can also be customized with a configuration file. The location of
2005+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:206: bat --config-file
2006+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:208: Alternatively, you can use the BAT_CONFIG_PATH environment variable to
2007+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:209: point bat to a non-default location of the configuration file.
2008+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:212: bat supports Sublime Text .sublime-syntax language files, and can be
2009+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:214: do this, add the .sublime-snytax language files to `$(bat --config-
2010+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:215: dir)/syntaxes` and run `bat cache --build`.
2011+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:219: mkdir -p "$(bat --config-dir)/syntaxes"
2012+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:220: cd "$(bat --config-dir)/syntaxes"
2013+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:227: bat cache --build
2014+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:229: Once the cache is built, the new language will be visible in `bat
2015+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:232: cache with `bat cache --clear`.
2016+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:235: Similarly to custom languages, bat supports Sublime Text .tmTheme
2017+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:236: themes. These can be installed to `$(bat --config-dir)/themes`, and
2018+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:237: are added to the cache with `bat cache --build`.
2019+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:240: For more information and up-to-date documentation, visit the bat repo:
2020+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:241: https://github.com/sharkdp/bat
2021+tests/syntax-tests/highlighted/Manpage/bat-0.16.man:243: BAT(1)
2022+tests/syntax-tests/highlighted/Svelte/App.svelte:30: // This block is a regression test for a bat panic when a LiveScript syntax definition is missing
2023+tests/syntax-tests/highlighted/VimL/source.vim:77:" Error case from issue #1604 (https://github.com/sharkdp/bat/issues/1064)
2024+tests/syntax-tests/highlighted/Java/test.java:3:/* This Java program was submiited to help bat
2025+tests/syntax-tests/highlighted/Sass/example.sass:46: background-image: url("https://github.com/sharkdp/bat/raw/master/doc/logo-header.svg")
2026+tests/syntax-tests/highlighted/HTML/test.html:5: <title>Bat Syntax Test</title>
2027+tests/syntax-tests/highlighted/Cpp/test.cpp:6:/* This C program was submitted to help bat
2028+tests/syntax-tests/highlighted/Crystal/test.cr:1:# An example file to test Crystal syntax highlighting in bat
2029+tests/syntax-tests/highlighted/Crystal/test.cr:58:greeter = Greeter.new("bat")
2030+tests/syntax-tests/highlighted/GLSL/test.glsl:38: // This GLSL code serves the purpose of bat syntax highlighting tests
2031+tests/syntax-tests/highlighted/CMake/CMakeLists.txt:3:project(hello-bat VERSION 0.0.1 LANGUAGES C)
2032+tests/syntax-tests/highlighted/CMake/CMakeLists.txt:8:add_executable(hello-bat SOURCES)
2033+tests/syntax-tests/highlighted/CMake/CMakeLists.txt:11:target_link_libraries(hello-bat assimp)
2034+tests/syntax-tests/highlighted/SCSS/example.scss:48: background-image: url("https://github.com/sharkdp/bat/raw/master/doc/logo-header.svg");
2035+tests/syntax-tests/highlighted/TOML/Cargo.toml:5:homepage = "https://github.com/sharkdp/bat"
2036+tests/syntax-tests/highlighted/TOML/Cargo.toml:7:name = "bat"
2037+tests/syntax-tests/highlighted/TOML/Cargo.toml:9:repository = "https://github.com/sharkdp/bat"
2038+tests/syntax-tests/highlighted/TOML/Cargo.toml:20:# Feature required for bat the application. Should be disabled when depending on
2039+tests/syntax-tests/highlighted/TOML/Cargo.toml:21:# bat as a library.
2040+tests/syntax-tests/highlighted/Erlang/bat_erlang.erl:1:-module(bat_erlang).
2041+tests/syntax-tests/highlighted/Bash/batgrep.sh:3:# bat-extras | Copyright (C) 2020 eth-p and contributors | MIT License
2042+tests/syntax-tests/highlighted/Bash/batgrep.sh:5:# Repository: https://github.com/eth-p/bat-extras
2043+tests/syntax-tests/highlighted/Bash/batgrep.sh:6:# Issues: https://github.com/eth-p/bat-extras/issues
2044+tests/syntax-tests/highlighted/Bash/batgrep.sh:37:printc "%{YELLOW}[%s warning]%{CLEAR}: $1%{CLEAR}\n" "batgrep" "${@:2}" 1>&2
2045+tests/syntax-tests/highlighted/Bash/batgrep.sh:40:printc "%{RED}[%s error]%{CLEAR}: $1%{CLEAR}\n" "batgrep" "${@:2}" 1>&2
2046+tests/syntax-tests/highlighted/Bash/batgrep.sh:116:if [[ -n ${BAT_PAGER+x} ]];then
2047+tests/syntax-tests/highlighted/Bash/batgrep.sh:117:SCRIPT_PAGER_CMD=($BAT_PAGER)
2048+tests/syntax-tests/highlighted/Bash/batgrep.sh:169:printc "%{RED}%s: '%s' requires a value%{CLEAR}\n" "batgrep" "$ARG"
2049+tests/syntax-tests/highlighted/Bash/batgrep.sh:185:*)printc "%{RED}%s: '--color' expects value of 'auto', 'always', or 'never'%{CLEAR}\n" "batgrep"
2050+tests/syntax-tests/highlighted/Bash/batgrep.sh:217:*)printc "%{RED}%s: '--paging' expects value of 'auto', 'always', or 'never'%{CLEAR}\n" "batgrep"
2051+tests/syntax-tests/highlighted/Bash/batgrep.sh:238:"batgrep" \
2052+tests/syntax-tests/highlighted/Bash/batgrep.sh:241:"https://github.com/eth-p/bat-extras"
2053+tests/syntax-tests/highlighted/Bash/batgrep.sh:269:bat_version(){
2054+tests/syntax-tests/highlighted/Bash/batgrep.sh:270:"bat" --version|cut -d ' ' -f 2
2055+tests/syntax-tests/highlighted/Bash/batgrep.sh:319:BAT_ARGS=()
2056+tests/syntax-tests/highlighted/Bash/batgrep.sh:330:BAT_STYLE="header,numbers"
2057+tests/syntax-tests/highlighted/Bash/batgrep.sh:331:if version_compare "$(bat_version)" -gt "0.12";then
2058+tests/syntax-tests/highlighted/Bash/batgrep.sh:419:printc "%{RED}%s: unknown option '%s'%{CLEAR}\n" "batgrep" "$OPT" 1>&2
2059+tests/syntax-tests/highlighted/Bash/batgrep.sh:444:BAT_ARGS+=("--color=always")
2060+tests/syntax-tests/highlighted/Bash/batgrep.sh:446:BAT_ARGS+=("--color=never")
2061+tests/syntax-tests/highlighted/Bash/batgrep.sh:462:'the pager was explicitly disabled by $BAT_PAGER or the' \
2062+tests/syntax-tests/highlighted/Bash/batgrep.sh:482:"bat" "${BAT_ARGS[@]}" \
2063+tests/syntax-tests/highlighted/Bash/batgrep.sh:485:--style="$BAT_STYLE$OPT_SNIP" \
2064+tests/syntax-tests/highlighted/Bash/simple.sh:15: | cat | bat - | cat
2065+tests/syntax-tests/highlighted/Bash/simple.sh:20:if command -v bat &> /dev/null; then
2066+tests/syntax-tests/highlighted/Rust/output.rs:39: let pager_from_env = match (env::var("BAT_PAGER"), env::var("PAGER")) {
2067+tests/syntax-tests/highlighted/Rust/output.rs:40: (Ok(bat_pager), _) => Some(bat_pager),
2068+tests/syntax-tests/highlighted/Rust/output.rs:43: // ANSI color sequences printed by bat. If someone has set PAGER="less -F", we
2069+tests/syntax-tests/highlighted/Rust/output.rs:46: // We only do this for PAGER (as it is not specific to 'bat'), not for BAT_PAGER
2070+tests/syntax-tests/highlighted/Rust/output.rs:47: // or bats '--pager' command line option.
2071+tests/syntax-tests/highlighted/Rust/output.rs:71: if pager_path.file_stem() == Some(&OsString::from("bat")) {
2072+tests/syntax-tests/source/C/test.c:21: /* This C program was written to help bat
2073+tests/syntax-tests/source/QML/BatSyntaxTest.qml:19: service: "org.bat.service"
2074+tests/syntax-tests/source/QML/BatSyntaxTest.qml:41: text: qsTr("Install Bat.")
2075+tests/syntax-tests/source/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:16: ## `bat` as a library
2076+tests/syntax-tests/source/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:17:diff --git a/src/bin/bat/app.rs b/src/bin/bat/app.rs
2077+tests/syntax-tests/source/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:19:--- a/src/bin/bat/app.rs
2078+tests/syntax-tests/source/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:20:+++ b/src/bin/bat/app.rs
2079+tests/syntax-tests/source/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:23: use bat::{
2080+tests/syntax-tests/source/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:61:diff --git a/src/bin/bat/clap_app.rs b/src/bin/bat/clap_app.rs
2081+tests/syntax-tests/source/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:63:--- a/src/bin/bat/clap_app.rs
2082+tests/syntax-tests/source/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:64:+++ b/src/bin/bat/clap_app.rs
2083+tests/syntax-tests/source/Diff/82e7786e747b1fcfac1f963ae6415a22ec9caae1.diff:66: data to bat from STDIN when bat does not otherwise know \
2084+tests/syntax-tests/source/Git Attributes/example.gitattributes:10:*.bat text eol=crlf
2085+tests/syntax-tests/source/SSH Config/ssh_config:8: BatchMode no
2086+tests/syntax-tests/source/Manpage/bat-0.16.man:1:BAT(1) General Commands Manual BAT(1)
2087+tests/syntax-tests/source/Manpage/bat-0.16.man:4: bat - a cat(1) clone with syntax highlighting and Git integration.
2088+tests/syntax-tests/source/Manpage/bat-0.16.man:7: bat [OPTIONS] [FILE]...
2089+tests/syntax-tests/source/Manpage/bat-0.16.man:9: bat cache [CACHE-OPTIONS] [--build|--clear]
2090+tests/syntax-tests/source/Manpage/bat-0.16.man:12: bat prints the syntax-highlighted content of a collection of FILEs to
2091+tests/syntax-tests/source/Manpage/bat-0.16.man:16: bat supports a large number of programming and markup languages. It
2092+tests/syntax-tests/source/Manpage/bat-0.16.man:18: git index. bat automatically pipes its output through a pager (by de‐
2093+tests/syntax-tests/source/Manpage/bat-0.16.man:21: Whenever the output of bat goes to a non-interactive terminal, i.e.
2094+tests/syntax-tests/source/Manpage/bat-0.16.man:22: when the output is piped into another process or into a file, bat will
2095+tests/syntax-tests/source/Manpage/bat-0.16.man:112: if the output of bat is piped to another program, but you want
2096+tests/syntax-tests/source/Manpage/bat-0.16.man:119: set BAT_PAGER to an empty string. To control which pager is
2097+tests/syntax-tests/source/Manpage/bat-0.16.man:126: PAGER and BAT_PAGER environment variables. The default pager is
2098+tests/syntax-tests/source/Manpage/bat-0.16.man:143: BAT_THEME environment variable (e.g.: export BAT_THEME="...").
2099+tests/syntax-tests/source/Manpage/bat-0.16.man:156: to the configuration file or export the BAT_STYLE environment
2100+tests/syntax-tests/source/Manpage/bat-0.16.man:157: variable (e.g.: export BAT_STYLE=".."). Possible values: *auto*,
2101+tests/syntax-tests/source/Manpage/bat-0.16.man:202: bat can also be customized with a configuration file. The location of
2102+tests/syntax-tests/source/Manpage/bat-0.16.man:206: bat --config-file
2103+tests/syntax-tests/source/Manpage/bat-0.16.man:208: Alternatively, you can use the BAT_CONFIG_PATH environment variable to
2104+tests/syntax-tests/source/Manpage/bat-0.16.man:209: point bat to a non-default location of the configuration file.
2105+tests/syntax-tests/source/Manpage/bat-0.16.man:212: bat supports Sublime Text .sublime-syntax language files, and can be
2106+tests/syntax-tests/source/Manpage/bat-0.16.man:214: do this, add the .sublime-snytax language files to `$(bat --config-
2107+tests/syntax-tests/source/Manpage/bat-0.16.man:215: dir)/syntaxes` and run `bat cache --build`.
2108+tests/syntax-tests/source/Manpage/bat-0.16.man:219: mkdir -p "$(bat --config-dir)/syntaxes"
2109+tests/syntax-tests/source/Manpage/bat-0.16.man:220: cd "$(bat --config-dir)/syntaxes"
2110+tests/syntax-tests/source/Manpage/bat-0.16.man:227: bat cache --build
2111+tests/syntax-tests/source/Manpage/bat-0.16.man:229: Once the cache is built, the new language will be visible in `bat
2112+tests/syntax-tests/source/Manpage/bat-0.16.man:232: cache with `bat cache --clear`.
2113+tests/syntax-tests/source/Manpage/bat-0.16.man:235: Similarly to custom languages, bat supports Sublime Text .tmTheme
2114+tests/syntax-tests/source/Manpage/bat-0.16.man:236: themes. These can be installed to `$(bat --config-dir)/themes`, and
2115+tests/syntax-tests/source/Manpage/bat-0.16.man:237: are added to the cache with `bat cache --build`.
2116+tests/syntax-tests/source/Manpage/bat-0.16.man:240: For more information and up-to-date documentation, visit the bat repo:
2117+tests/syntax-tests/source/Manpage/bat-0.16.man:241: https://github.com/sharkdp/bat
2118+tests/syntax-tests/source/Manpage/bat-0.16.man:243: BAT(1)
2119+tests/syntax-tests/source/Svelte/App.svelte:30: // This block is a regression test for a bat panic when a LiveScript syntax definition is missing
2120+tests/syntax-tests/source/VimL/source.vim:77:" Error case from issue #1604 (https://github.com/sharkdp/bat/issues/1064)
2121+tests/syntax-tests/source/Git Config/LICENSE.md:1:The `test.gitconfig` file has been added from https://github.com/sharkdp/bat/pull/1336#issuecomment-715905807. Its "free to use".
2122+tests/syntax-tests/source/Java/test.java:3:/* This Java program was submiited to help bat
2123+tests/syntax-tests/source/Sass/example.sass:46: background-image: url("https://github.com/sharkdp/bat/raw/master/doc/logo-header.svg")
2124+tests/syntax-tests/source/HTML/test.html:5: <title>Bat Syntax Test</title>
2125+tests/syntax-tests/source/Cpp/test.cpp:6:/* This C program was submitted to help bat
2126+tests/syntax-tests/source/Crystal/test.cr:1:# An example file to test Crystal syntax highlighting in bat
2127+tests/syntax-tests/source/Crystal/test.cr:58:greeter = Greeter.new("bat")
2128+tests/syntax-tests/source/GLSL/test.glsl:38: // This GLSL code serves the purpose of bat syntax highlighting tests
2129+tests/syntax-tests/source/Java Server Page (JSP)/LICENSE.md:216:For the Eclipse JDT Core Batch Compiler (ecj-x.x.x.jar) component and the
2130+tests/syntax-tests/source/Java Server Page (JSP)/NOTICE:23:JDT Core Batch Compiler component, which is open source software.
2131+tests/syntax-tests/source/CMake/CMakeLists.txt:3:project(hello-bat VERSION 0.0.1 LANGUAGES C)
2132+tests/syntax-tests/source/CMake/CMakeLists.txt:8:add_executable(hello-bat SOURCES)
2133+tests/syntax-tests/source/CMake/CMakeLists.txt:11:target_link_libraries(hello-bat assimp)
2134+tests/syntax-tests/source/SCSS/example.scss:48: background-image: url("https://github.com/sharkdp/bat/raw/master/doc/logo-header.svg");
2135+tests/syntax-tests/source/TOML/Cargo.toml:5:homepage = "https://github.com/sharkdp/bat"
2136+tests/syntax-tests/source/TOML/Cargo.toml:7:name = "bat"
2137+tests/syntax-tests/source/TOML/Cargo.toml:9:repository = "https://github.com/sharkdp/bat"
2138+tests/syntax-tests/source/TOML/Cargo.toml:20:# Feature required for bat the application. Should be disabled when depending on
2139+tests/syntax-tests/source/TOML/Cargo.toml:21:# bat as a library.
2140+tests/syntax-tests/source/Erlang/bat_erlang.erl:1:-module(bat_erlang).
2141+tests/syntax-tests/source/Batch/LICENSE.md:1:The `build.bat` file has been added from https://github.com/Leandros/ClangOnWindows/blob/master/build.bat under the following license:
2142+tests/syntax-tests/source/Bash/batgrep.sh:3:# bat-extras | Copyright (C) 2020 eth-p and contributors | MIT License
2143+tests/syntax-tests/source/Bash/batgrep.sh:5:# Repository: https://github.com/eth-p/bat-extras
2144+tests/syntax-tests/source/Bash/batgrep.sh:6:# Issues: https://github.com/eth-p/bat-extras/issues
2145+tests/syntax-tests/source/Bash/batgrep.sh:37:printc "%{YELLOW}[%s warning]%{CLEAR}: $1%{CLEAR}\n" "batgrep" "${@:2}" 1>&2
2146+tests/syntax-tests/source/Bash/batgrep.sh:40:printc "%{RED}[%s error]%{CLEAR}: $1%{CLEAR}\n" "batgrep" "${@:2}" 1>&2
2147+tests/syntax-tests/source/Bash/batgrep.sh:116:if [[ -n ${BAT_PAGER+x} ]];then
2148+tests/syntax-tests/source/Bash/batgrep.sh:117:SCRIPT_PAGER_CMD=($BAT_PAGER)
2149+tests/syntax-tests/source/Bash/batgrep.sh:169:printc "%{RED}%s: '%s' requires a value%{CLEAR}\n" "batgrep" "$ARG"
2150+tests/syntax-tests/source/Bash/batgrep.sh:185:*)printc "%{RED}%s: '--color' expects value of 'auto', 'always', or 'never'%{CLEAR}\n" "batgrep"
2151+tests/syntax-tests/source/Bash/batgrep.sh:217:*)printc "%{RED}%s: '--paging' expects value of 'auto', 'always', or 'never'%{CLEAR}\n" "batgrep"
2152+tests/syntax-tests/source/Bash/batgrep.sh:238:"batgrep" \
2153+tests/syntax-tests/source/Bash/batgrep.sh:241:"https://github.com/eth-p/bat-extras"
2154+tests/syntax-tests/source/Bash/batgrep.sh:269:bat_version(){
2155+tests/syntax-tests/source/Bash/batgrep.sh:270:"bat" --version|cut -d ' ' -f 2
2156+tests/syntax-tests/source/Bash/batgrep.sh:319:BAT_ARGS=()
2157+tests/syntax-tests/source/Bash/batgrep.sh:330:BAT_STYLE="header,numbers"
2158+tests/syntax-tests/source/Bash/batgrep.sh:331:if version_compare "$(bat_version)" -gt "0.12";then
2159+tests/syntax-tests/source/Bash/batgrep.sh:419:printc "%{RED}%s: unknown option '%s'%{CLEAR}\n" "batgrep" "$OPT" 1>&2
2160+tests/syntax-tests/source/Bash/batgrep.sh:444:BAT_ARGS+=("--color=always")
2161+tests/syntax-tests/source/Bash/batgrep.sh:446:BAT_ARGS+=("--color=never")
2162+tests/syntax-tests/source/Bash/batgrep.sh:462:'the pager was explicitly disabled by $BAT_PAGER or the' \
2163+tests/syntax-tests/source/Bash/batgrep.sh:482:"bat" "${BAT_ARGS[@]}" \
2164+tests/syntax-tests/source/Bash/batgrep.sh:485:--style="$BAT_STYLE$OPT_SNIP" \
2165+tests/syntax-tests/source/Bash/simple.sh:15: | cat | bat - | cat
2166+tests/syntax-tests/source/Bash/simple.sh:20:if command -v bat &> /dev/null; then
2167+tests/syntax-tests/source/Rust/output.rs:39: let pager_from_env = match (env::var("BAT_PAGER"), env::var("PAGER")) {
2168+tests/syntax-tests/source/Rust/output.rs:40: (Ok(bat_pager), _) => Some(bat_pager),
2169+tests/syntax-tests/source/Rust/output.rs:43: // ANSI color sequences printed by bat. If someone has set PAGER="less -F", we
2170+tests/syntax-tests/source/Rust/output.rs:46: // We only do this for PAGER (as it is not specific to 'bat'), not for BAT_PAGER
2171+tests/syntax-tests/source/Rust/output.rs:47: // or bats '--pager' command line option.
2172+tests/syntax-tests/source/Rust/output.rs:71: if pager_path.file_stem() == Some(&OsString::from("bat")) {
2173+tests/syntax-tests/test_custom_assets.sh:6:BAT_CONFIG_DIR=$(mktemp -d)
2174+tests/syntax-tests/test_custom_assets.sh:7:export BAT_CONFIG_DIR
2175+tests/syntax-tests/test_custom_assets.sh:9:BAT_CACHE_PATH=$(mktemp -d)
2176+tests/syntax-tests/test_custom_assets.sh:10:export BAT_CACHE_PATH
2177+tests/syntax-tests/test_custom_assets.sh:13:BAT_CONFIG_DIR = ${BAT_CONFIG_DIR}
2178+tests/syntax-tests/test_custom_assets.sh:14:BAT_CACHE_PATH = ${BAT_CACHE_PATH}
2179+tests/syntax-tests/test_custom_assets.sh:20: "--language=BatTestCustomAssets"
2180+tests/syntax-tests/test_custom_assets.sh:21: "tests/syntax-tests/source/BatTestCustomAssets/NoColorsUnlessCustomAssetsAreUsed.battestcustomassets"
2181+tests/syntax-tests/test_custom_assets.sh:42:echo_step "TEST: Make sure 'BatTestCustomAssets' is not part of integrated syntaxes"
2182+tests/syntax-tests/test_custom_assets.sh:43:bat -f "${custom_syntax_args[@]}" &&
2183+tests/syntax-tests/test_custom_assets.sh:46:echo_step "PREPARE: Install custom syntax 'BatTestCustomAssets'"
2184+tests/syntax-tests/test_custom_assets.sh:47:custom_syntaxes_dir="$(bat --config-dir)/syntaxes"
2185+tests/syntax-tests/test_custom_assets.sh:49:cp -v "tests/syntax-tests/BatTestCustomAssets.sublime-syntax" \
2186+tests/syntax-tests/test_custom_assets.sh:50: "${custom_syntaxes_dir}/BatTestCustomAssets.sublime-syntax"
2187+tests/syntax-tests/test_custom_assets.sh:52:echo_step "PREPARE: Build custom assets to enable 'BatTestCustomAssets' syntax"
2188+tests/syntax-tests/test_custom_assets.sh:53:bat cache --build
2189+tests/syntax-tests/test_custom_assets.sh:55:echo_step "TEST: 'BatTestCustomAssets' is a known syntax"
2190+tests/syntax-tests/test_custom_assets.sh:56:bat -f "${custom_syntax_args[@]}" ||
2191+tests/syntax-tests/test_custom_assets.sh:60:bat -f "${integrated_syntax_args[@]}" ||
2192+tests/syntax-tests/test_custom_assets.sh:63:echo_step "TEST: 'BatTestCustomAssets' is an unknown syntax with --no-custom-assets"
2193+tests/syntax-tests/test_custom_assets.sh:64:bat -f --no-custom-assets "${custom_syntax_args[@]}" &&
2194+tests/syntax-tests/test_custom_assets.sh:67:echo_step "TEST: 'bat cache --clear' removes all files"
2195+tests/syntax-tests/test_custom_assets.sh:68:bat cache --clear
2196+tests/syntax-tests/test_custom_assets.sh:69:remaining_files=$(ls -A "${BAT_CACHE_PATH}")
2197+tests/syntax-tests/test_custom_assets.sh:74:rm -rv "${BAT_CONFIG_DIR}" "${BAT_CACHE_PATH}"
2198+tests/assets.rs:1:use bat::assets::HighlightingAssets;
2199+tests/no_duplicate_extensions.rs:3:use bat::assets::HighlightingAssets;
2200+tests/scripts/find-slow-to-highlight-files.py:3:# This script goes through all languages that are supported by 'bat'. For each
2201+tests/scripts/find-slow-to-highlight-files.py:5:# given folder for matching files. It calls 'bat' for each of these files and
2202+tests/scripts/find-slow-to-highlight-files.py:8:# execution of 'bat'.
2203+tests/scripts/find-slow-to-highlight-files.py:11:# - bat (in the $PATH)
2204+tests/scripts/find-slow-to-highlight-files.py:24:# Maximum time we allow `bat` to run
2205+tests/scripts/find-slow-to-highlight-files.py:25:BAT_TIMEOUT_SEC = 10
2206+tests/scripts/find-slow-to-highlight-files.py:62: sp.check_output(["bat", "--color=always", path], timeout=BAT_TIMEOUT_SEC)
2207+tests/scripts/find-slow-to-highlight-files.py:77: if num_chars < THRESHOLD_SPEED * BAT_TIMEOUT_SEC:
2208+tests/scripts/find-slow-to-highlight-files.py:78: print(f" Error: bat timed out on file '{path.decode()}'.")
2209+tests/scripts/find-slow-to-highlight-files.py:81: f" Warning: bat timed out on file '{path.decode()} (but the file is large)."
2210+tests/scripts/find-slow-to-highlight-files.py:85:def measure_bat_startup_speed():
2211+tests/scripts/find-slow-to-highlight-files.py:90: ["bat", "--color=always", "--language=py"], stdin=sp.PIPE, stdout=sp.PIPE
2212+tests/scripts/find-slow-to-highlight-files.py:102: output = sp.check_output(["bat", "--list-languages"]).decode()
2213+tests/scripts/find-slow-to-highlight-files.py:113: print("Measuring 'bat' startup speed ... ", flush=True, end="")
2214+tests/scripts/find-slow-to-highlight-files.py:114: startup_time = measure_bat_startup_speed()
2215+tests/tester.rs:13:pub struct BatTester {
2216+tests/tester.rs:17: /// Path to the *bat* executable
2217+tests/tester.rs:21:impl BatTester {
2218+tests/tester.rs:35: .expect("bat failed");
2219+tests/tester.rs:52:impl Default for BatTester {
2220+tests/tester.rs:61: .expect("bat executable directory")
2221+tests/tester.rs:64: let exe_name = if cfg!(windows) { "bat.exe" } else { "bat" };
2222+tests/tester.rs:67: BatTester { temp_dir, exe }
2223+tests/tester.rs:86: let signature = Signature::now("bat test runner", "bat@test.runner")?;
2224+tests/snapshot_tests.rs:3:use crate::tester::BatTester;
2225+tests/snapshot_tests.rs:10: let bat_tester = BatTester::default();
2226+tests/snapshot_tests.rs:11: bat_tester.test_snapshot(stringify!($test_name), $style);
2227+diagnostics/info.sh:2:_modules=('system' 'bat' 'bat_config' 'bat_wrapper' 'bat_wrapper_function' 'tool')
2228+diagnostics/info.sh:10:BAT="bat"
2229+diagnostics/info.sh:11:if ! command -v bat &>/dev/null; then
2230+diagnostics/info.sh:12: if command -v batcat &> /dev/null; then
2231+diagnostics/info.sh:13: BAT="batcat"
2232+diagnostics/info.sh:17: "Unable to find a bat executable on your PATH." \
2233+diagnostics/info.sh:18: "Please ensure that 'bat' exists and is not named something else."
2234+diagnostics/info.sh:28:_bat_:description() {
2235+diagnostics/info.sh:29: _collects "Version information for 'bat'."
2236+diagnostics/info.sh:30: _collects "Custom syntaxes and themes for 'bat'."
2237+diagnostics/info.sh:33:_bat_config_:description() {
2238+diagnostics/info.sh:34: _collects "The environment variables used by 'bat'."
2239+diagnostics/info.sh:35: _collects "The 'bat' configuration file."
2240+diagnostics/info.sh:38:_bat_wrapper_:description() {
2241+diagnostics/info.sh:39: _collects "Any wrapper script used by 'bat'."
2242+diagnostics/info.sh:42:_bat_wrapper_function_:description() {
2243+diagnostics/info.sh:43: _collects "The wrapper function surrounding 'bat' (if applicable)."
2244+diagnostics/info.sh:57:_bat_:run() {
2245+diagnostics/info.sh:58: _out "$BAT" --version
2246+diagnostics/info.sh:59: _out env | grep '^BAT_\|^PAGER='
2247+diagnostics/info.sh:62: cache_dir="$($BAT --cache-dir)"
2248+diagnostics/info.sh:64: _print_command "$BAT" "--list-languages"
2249+diagnostics/info.sh:69: _print_command "$BAT" "--list-themes"
2250+diagnostics/info.sh:74:_bat_config_:run() {
2251+diagnostics/info.sh:75: if [[ -f "$("$BAT" --config-file)" ]]; then
2252+diagnostics/info.sh:76: _out_fence cat "$("$BAT" --config-file)"
2253+diagnostics/info.sh:80:_bat_wrapper_:run() {
2254+diagnostics/info.sh:81: _bat_wrapper_:detect_wrapper() {
2255+diagnostics/info.sh:82: local bat="$1"
2256+diagnostics/info.sh:83: if file "$(command -v "${bat}")" | grep "text executable" &> /dev/null; then
2257+diagnostics/info.sh:84: _out_fence cat "$(command -v "${bat}")"
2258+diagnostics/info.sh:88: printf "\nNo wrapper script for '%s'.\n" "${bat}"
2259+diagnostics/info.sh:91: _bat_wrapper_:detect_wrapper bat
2260+diagnostics/info.sh:92: if [[ "$BAT" != "bat" ]]; then
2261+diagnostics/info.sh:93: _bat_wrapper_:detect_wrapper "$BAT"
2262+diagnostics/info.sh:97:_bat_wrapper_function_:run() {
2263+diagnostics/info.sh:98: _bat_wrapper_function_:detect_wrapper() {
2264+diagnostics/info.sh:125: _bat_wrapper_function_:detect_wrapper bat
2265+diagnostics/info.sh:126: _bat_wrapper_function_:detect_wrapper cat
2266+diagnostics/info.sh:127: if [[ "$BAT" != "bat" ]]; then
2267+diagnostics/info.sh:128: _bat_wrapper_function_:detect_wrapper "$BAT"
2268+diagnostics/info.sh:180:system and bat configuration. It will give you a small preview of the commands
2269+diagnostics/info.sh:201: | sed "s/\"\$BAT\"/$BAT/" 1>&2
2270+diagnostics/info.sh:228:# Tell the user if their executable isn't named "bat".
2271+diagnostics/info.sh:229:if [[ "$BAT" != "bat" ]] && [[ "$1" != '-y' ]]; then
2272+diagnostics/info.sh:235: printf "The %s executable on your system is named '%s'.\n%s\n" "bat" "$BAT" \
tests/benchmarks/test-src/jquery-3.3.1.js → tests/benchmarks/highlighting-speed-src/jquery.jsrenamed

The content is the same.

tests/benchmarks/test-src/miniz.c → tests/benchmarks/highlighting-speed-src/miniz.crenamed

The content is the same.

tests/benchmarks/highlighting-speed-src/numpy_test_multiarray.pynew file+8471

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-0.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-1.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-10.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-100.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-11.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-12.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-13.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-14.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-15.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-16.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-17.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-18.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-19.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-2.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-20.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-21.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-22.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-23.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-24.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-25.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-26.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-27.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-28.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-29.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-3.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-30.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-31.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-32.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-33.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-34.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-35.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-36.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-37.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-38.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-39.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-4.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-40.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-41.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-42.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-43.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-44.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-45.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-46.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-47.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-48.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-49.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-5.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-50.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-51.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-52.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-53.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-54.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-55.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-56.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-57.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-58.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-59.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-6.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-60.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-61.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-62.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-63.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-64.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-65.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-66.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-67.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-68.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-69.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-7.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-70.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-71.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-72.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-73.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-74.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-75.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-76.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-77.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-78.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-79.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-8.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-80.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-81.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-82.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-83.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-84.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-85.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-86.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-87.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-88.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-89.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-9.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-90.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-91.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-92.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-93.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-94.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-95.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-96.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-97.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-98.txtnew file+1

This diff is too big to show here.

tests/benchmarks/many-small-files/small-file-99.txtnew file+1

This diff is too big to show here.

tests/benchmarks/run-benchmarks.sh+108−32

This diff is too big to show here.

tests/benchmarks/startup-time-src/small-CpuInfo-file.cpuinfonew file+1

This diff is too big to show here.

tests/benchmarks/startup-time-src/small-Markdown-file.mdnew file+3

This diff is too big to show here.

tests/benchmarks/test-src/jquery-3.3.1.min.jsdeleted−2

This diff is too big to show here.

tests/examples/git/.config/git/confignew file+3

This diff is too big to show here.

tests/examples/git/.gitconfignew file+3

This diff is too big to show here.

tests/examples/longline.jsonnew file+3

This diff is too big to show here.

tests/examples/regression_tests/first_line_fallback.invalid-syntaxnew file+2

This diff is too big to show here.

tests/examples/test.json.suffixnew file+1

This diff is too big to show here.

tests/examples/test.json~new file+1

This diff is too big to show here.

tests/integration_tests.rs+406−6

This diff is too big to show here.

tests/scripts/find-slow-to-highlight-files.py+2−2

This diff is too big to show here.

tests/scripts/license-checks.shnew file+24

This diff is too big to show here.

tests/snapshots/output/changes.snapshot.txt+1

This diff is too big to show here.

tests/snapshots/output/changes_grid.snapshot.txt+1

This diff is too big to show here.

tests/snapshots/output/changes_grid_header.snapshot.txt+1

This diff is too big to show here.

tests/snapshots/output/changes_grid_header_numbers.snapshot.txt+23−22

This diff is too big to show here.

tests/snapshots/output/changes_grid_header_numbers_rule.snapshot.txt+23−22

This diff is too big to show here.

tests/snapshots/output/changes_grid_header_rule.snapshot.txt+1

This diff is too big to show here.

tests/snapshots/output/changes_grid_numbers.snapshot.txt+23−22

This diff is too big to show here.

tests/snapshots/output/changes_grid_numbers_rule.snapshot.txt+23−22

This diff is too big to show here.

tests/snapshots/output/changes_grid_rule.snapshot.txt+1

This diff is too big to show here.

tests/snapshots/output/changes_header.snapshot.txt+1

This diff is too big to show here.

tests/snapshots/output/changes_header_numbers.snapshot.txt+23−22

This diff is too big to show here.

tests/snapshots/output/changes_header_numbers_rule.snapshot.txt+23−22

This diff is too big to show here.

tests/snapshots/output/changes_header_rule.snapshot.txt+1

This diff is too big to show here.

tests/snapshots/output/changes_numbers.snapshot.txt+23−22

This diff is too big to show here.

tests/snapshots/output/changes_numbers_rule.snapshot.txt+23−22

This diff is too big to show here.

tests/snapshots/output/changes_rule.snapshot.txt+1

This diff is too big to show here.

tests/snapshots/output/full.snapshot.txt+24−22

This diff is too big to show here.

tests/snapshots/output/grid.snapshot.txt+1

This diff is too big to show here.

tests/snapshots/output/grid_header.snapshot.txt+1

This diff is too big to show here.

tests/snapshots/output/grid_header_numbers.snapshot.txt+23−22

This diff is too big to show here.

tests/snapshots/output/grid_header_numbers_rule.snapshot.txt+23−22

This diff is too big to show here.

tests/snapshots/output/grid_header_rule.snapshot.txt+1

This diff is too big to show here.

tests/snapshots/output/grid_numbers.snapshot.txt+23−22

This diff is too big to show here.

tests/snapshots/output/grid_numbers_rule.snapshot.txt+23−22

This diff is too big to show here.

tests/snapshots/output/grid_rule.snapshot.txt+1

This diff is too big to show here.

tests/snapshots/output/header.snapshot.txt+1

This diff is too big to show here.

tests/snapshots/output/header_numbers.snapshot.txt+23−22

This diff is too big to show here.

tests/snapshots/output/header_numbers_rule.snapshot.txt+23−22

This diff is too big to show here.

tests/snapshots/output/header_rule.snapshot.txt+1

This diff is too big to show here.

tests/snapshots/output/numbers.snapshot.txt+23−22

This diff is too big to show here.

tests/snapshots/output/numbers_rule.snapshot.txt+23−22

This diff is too big to show here.

tests/snapshots/output/plain.snapshot.txt+1

This diff is too big to show here.

tests/snapshots/output/rule.snapshot.txt+1

This diff is too big to show here.

tests/snapshots/sample.modified.rs+1

This diff is too big to show here.

tests/syntax-tests/BatTestCustomAssets.sublime-syntaxnew file+21

This diff is too big to show here.

tests/syntax-tests/create_highlighted_versions.py+72−56

This diff is too big to show here.

tests/syntax-tests/highlighted/BatTestCustomAssets/NoColorsUnlessCustomAssetsAreUsed.battestcustomassetsnew file+2

This diff is too big to show here.

tests/syntax-tests/highlighted/CpuInfo/test.CpuInfodeleted−45

This diff is too big to show here.

tests/syntax-tests/highlighted/CpuInfo/test.cpuinfonew file+45

This diff is too big to show here.

tests/syntax-tests/highlighted/Dart/inner_comment.dartnew file+5

This diff is too big to show here.

tests/syntax-tests/highlighted/Dart/test.dart+52−52

This diff is too big to show here.

tests/syntax-tests/highlighted/INI/test.infnew file+5

This diff is too big to show here.

tests/syntax-tests/highlighted/Ignored suffixes/test.rs.ucf-distnew file+1

This diff is too big to show here.

tests/syntax-tests/highlighted/Ignored suffixes/test.rs.ucf-newnew file+1

This diff is too big to show here.

tests/syntax-tests/highlighted/Ignored suffixes/test.rs.ucf-oldnew file+1

This diff is too big to show here.

tests/syntax-tests/highlighted/JQ/sample.jqnew file+60

This diff is too big to show here.

tests/syntax-tests/highlighted/LiveScript/livescript-demo.lsnew file+83

This diff is too big to show here.

tests/syntax-tests/highlighted/Log/example.log+1

This diff is too big to show here.

tests/syntax-tests/highlighted/MediaWiki/test.mediawikinew file+37

This diff is too big to show here.

tests/syntax-tests/highlighted/MemInfo/test.MemInfodeleted−53

This diff is too big to show here.

tests/syntax-tests/highlighted/MemInfo/test.meminfonew file+53

This diff is too big to show here.

tests/syntax-tests/highlighted/PowerShell/test.ps1+2−2

This diff is too big to show here.

tests/syntax-tests/highlighted/Racket/test.rktnew file+56

This diff is too big to show here.

tests/syntax-tests/highlighted/RequirementsTXT/requirements.txtdeleted−8

This diff is too big to show here.

tests/syntax-tests/highlighted/SCSS/example.scss+16−16

This diff is too big to show here.

tests/syntax-tests/highlighted/Sass/example.sass+18−18

This diff is too big to show here.

tests/syntax-tests/highlighted/Slim/test.slimnew file+20

This diff is too big to show here.

tests/syntax-tests/highlighted/Svelte/App.svelte+8

This diff is too big to show here.

tests/syntax-tests/highlighted/Syslog/example.syslog+6−1

This diff is too big to show here.

tests/syntax-tests/highlighted/Vue/example.vue+5

This diff is too big to show here.

tests/syntax-tests/highlighted/Zig/example.zig+39−39

This diff is too big to show here.

tests/syntax-tests/highlighted/cmd-help/test.cmd-helpnew file+54

This diff is too big to show here.

tests/syntax-tests/highlighted/nim/test.nimblenew file+23

This diff is too big to show here.

tests/syntax-tests/source/BatTestCustomAssets/NoColorsUnlessCustomAssetsAreUsed.battestcustomassetsnew file+2

This diff is too big to show here.

tests/syntax-tests/source/CpuInfo/test.CpuInfo → tests/syntax-tests/source/CpuInfo/test.cpuinforenamed

The content is the same.

tests/syntax-tests/source/Dart/inner_comment.dartnew file+5

This diff is too big to show here.

tests/syntax-tests/source/INI/test.infnew file+5

This diff is too big to show here.

tests/syntax-tests/source/Ignored suffixes/test.rs.ucf-distnew file+1

This diff is too big to show here.

tests/syntax-tests/source/Ignored suffixes/test.rs.ucf-newnew file+1

This diff is too big to show here.

tests/syntax-tests/source/Ignored suffixes/test.rs.ucf-oldnew file+1

This diff is too big to show here.

tests/syntax-tests/source/JQ/LICENSE.mdnew file+25

This diff is too big to show here.

tests/syntax-tests/source/JQ/sample.jqnew file+60

This diff is too big to show here.

tests/syntax-tests/source/LiveScript/LICENSE.mdnew file+23

This diff is too big to show here.

tests/syntax-tests/source/LiveScript/livescript-demo.lsnew file+83

This diff is too big to show here.

tests/syntax-tests/source/Log/example.log+1

This diff is too big to show here.

tests/syntax-tests/source/MediaWiki/test.mediawikinew file+37

This diff is too big to show here.

tests/syntax-tests/source/MemInfo/test.MemInfo → tests/syntax-tests/source/MemInfo/test.meminforenamed

The content is the same.

tests/syntax-tests/source/Racket/test.rktnew file+56

This diff is too big to show here.

tests/syntax-tests/source/RequirementsTXT/requirements.txtdeleted−8

This diff is too big to show here.

tests/syntax-tests/source/Slim/test.slimnew file+20

This diff is too big to show here.

tests/syntax-tests/source/Svelte/App.svelte+8

This diff is too big to show here.

tests/syntax-tests/source/Syslog/example.syslog+5

This diff is too big to show here.

tests/syntax-tests/source/Vue/example.vue+5

This diff is too big to show here.

tests/syntax-tests/source/cmd-help/test.cmd-helpnew file+54

This diff is too big to show here.

tests/syntax-tests/source/nim/test.nimblenew file+23

This diff is too big to show here.

tests/syntax-tests/test_custom_assets.shnew file+74

This diff is too big to show here.